src/main/java/org/ucmtwine/Bootstrapper.java
public int doFilter(Workspace ws, DataBinder binder, ExecutionContext ctx) throws DataException, ServiceException {
    String configFileName = (String) ctx.getCachedObject("filterParameter");

    try {
      ClassLoader cl = getClass().getClassLoader();
      Enumeration<URL> propFiles = cl.getResources(configFileName);

      // There should be at least one entry (TwineLib contains an example file)
      if (!propFiles.hasMoreElements()) {
        propFiles = getResources11g(cl, configFileName);
      }

      while (propFiles.hasMoreElements()) {
        URL propFile = propFiles.nextElement();

        if (SystemUtils.m_verbose) {
          SystemUtils.trace("twine", "Loading config file: " + propFile.toString());
        }

        IClassInjector filterInjector = new FilterInjector();
        filterInjector.injectClasses(propFile);

        IClassInjector serviceInjector = new ServiceInjector();
        serviceInjector.injectClasses(propFile);

        IClassInjector scriptInjector = new IdocScriptInjector();
        scriptInjector.injectClasses(propFile);

      }
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    return CONTINUE;
  }
public int doFilter(Workspace ws, DataBinder binder, ExecutionContext ctx) throws DataException, ServiceException {
    String configFileName = (String) ctx.getCachedObject("filterParameter");

    try {
      ClassLoader cl = getClass().getClassLoader();
      Enumeration<URL> propFiles = cl.getResources(configFileName);

      // There should be at least one entry (TwineLib contains an example file)
      if (!propFiles.hasMoreElements()) {
        propFiles = getResources11g(cl, configFileName);
      }

      while (propFiles.hasMoreElements()) {
        URL propFile = propFiles.nextElement();

        if (SystemUtils.m_verbose) {
          SystemUtils.trace("twine", "Loading config file: " + propFile.toString());
        }

        IClassInjector filterInjector = new FilterInjector();
        filterInjector.injectClasses(propFile);

        IClassInjector serviceInjector = new ServiceInjector();
        serviceInjector.injectClasses(propFile);

        IClassInjector scriptInjector = new IdocScriptInjector();
        scriptInjector.injectClasses(propFile);

      }
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    return CONTINUE;
  }
public int doFilter ( Workspace ws , DataBinder binder , ExecutionContext ctx ) throws DataException , ServiceException { String configFileName = ( String ) ctx . getCachedObject ( "filterParameter" ) ; try { ClassLoader cl = getClass ( ) . getClassLoader ( ) ; Enumeration < URL > propFiles = cl . getResources ( configFileName ) ; // There should be at least one entry (TwineLib contains an example file) if ( ! propFiles . hasMoreElements ( ) ) { propFiles = getResources11g ( cl , configFileName ) ; } while ( propFiles . hasMoreElements ( ) ) { URL propFile = propFiles . nextElement ( ) ; if ( SystemUtils . m_verbose ) { SystemUtils . trace ( "twine" , "Loading config file: " + propFile . toString ( ) ) ; } IClassInjector filterInjector = new FilterInjector ( ) ; filterInjector . injectClasses ( propFile ) ; IClassInjector serviceInjector = new ServiceInjector ( ) ; serviceInjector . injectClasses ( propFile ) ; IClassInjector scriptInjector = new IdocScriptInjector ( ) ; scriptInjector . injectClasses ( propFile ) ; } } catch ( IOException e ) { // TODO Auto-generated catch block e . printStackTrace ( ) ; } return CONTINUE ; }
Begins injection of filters, including the Service and IdocScript injectors
required to load other ucm entities.
Begins injection of filters including the Service and IdocScript injectors required to load other ucm entities .