Package org.impalaframework.module.definition

Examples of org.impalaframework.module.definition.ModuleDefinitionSource


    Assert.notNull(moduleOperationInput, "moduleOperationInput cannot be null");
    ModuleStateHolder moduleStateHolder = getModuleStateHolder();
   
    //note that the module definition source is externally supplied
    ModuleDefinitionSource newModuleDefinitionSource = moduleOperationInput.getModuleDefinitionSource();
    Assert.notNull(newModuleDefinitionSource, "moduleDefinitionSource is required as it specifies the new module definition to apply in " + this.getClass().getName());
   
    RootModuleDefinition newModuleDefinition = newModuleDefinitionSource.getModuleDefinition();
    RootModuleDefinition oldModuleDefinition = getExistingModuleDefinitionSource();
   
    ModificationExtractorType modificationExtractorType = getModificationExtractorType();
   
    // figure out the modules to reload
View Full Code Here


    }

    Collections.reverse(modulesToLoad);
    this.parentDefinition = parent;
   
    ModuleDefinitionSource internalModuleBuilder = getModuleBuilder();
    return internalModuleBuilder.getModuleDefinition();
  }
View Full Code Here

      throws BeansException {

    ModuleManagementFacade facade = createModuleManagementFacade(servletContext);

    // load the parent context, which is web-independent
    ModuleDefinitionSource moduleDefinitionSource = getModuleDefinitionSource(servletContext, facade);

    // add items to servlet context
    servletContext.setAttribute(WebConstants.MODULE_DEFINITION_SOURCE_ATTRIBUTE, moduleDefinitionSource);
    servletContext.setAttribute(WebConstants.IMPALA_FACTORY_ATTRIBUTE, facade);
   
View Full Code Here

    Assert.notNull(moduleOperationInput, "moduleOperationInput cannot be null");
    ModuleStateHolder moduleStateHolder = getModuleStateHolder();
   
    //note that the module definition source is externally supplied
    ModuleDefinitionSource newModuleDefinitionSource = moduleOperationInput.getModuleDefinitionSource();
    Assert.notNull(newModuleDefinitionSource, "moduleDefinitionSource is required as it specifies the new module definition to apply in " + this.getClass().getName());
   
    RootModuleDefinition newModuleDefinition = newModuleDefinitionSource.getModuleDefinition();
    RootModuleDefinition oldModuleDefinition = getExistingModuleDefinitionSource();
   
    ModificationExtractorType modificationExtractorType = getModificationExtractorType();
   
    // figure out the modules to reload
View Full Code Here

public class InitContextCommand implements Command {

  public boolean execute(CommandState commandState) {
    Impala.init();
   
    ModuleDefinitionSource moduleDefinitionSource = (ModuleDefinitionSource) GlobalCommandState.getInstance()
        .getValue(CommandStateConstants.MODULE_DEFINITION_SOURCE);
    if (moduleDefinitionSource == null) {
      System.out.println("Cannot initialize, as no module definition has been loaded.");
      return false;
    }
View Full Code Here

      c = Class.forName(testClassName, false, parent);
      try {
        Object o = c.newInstance();
        if (o instanceof ModuleDefinitionSource) {
          ModuleDefinitionSource p = (ModuleDefinitionSource) o;
          GlobalCommandState.getInstance().addValue(CommandStateConstants.MODULE_DEFINITION_SOURCE, p);
        }

        GlobalCommandState.getInstance().addValue(CommandStateConstants.TEST_CLASS, c);
        return false;
View Full Code Here

    inspectModules();
    return buildModules();
  }

  protected RootModuleDefinition buildModules() {
    ModuleDefinitionSource internalModuleBuilder = getModuleBuilder();
    return internalModuleBuilder.getModuleDefinition();
  }
View Full Code Here

    }

    Collections.reverse(modulesToLoad);
    this.parentDefinition = parent;
   
    ModuleDefinitionSource internalModuleBuilder = getModuleBuilder();
    return internalModuleBuilder.getModuleDefinition();
  }
View Full Code Here

          "No instance of "
              + ModuleManagementFacade.class.getName()
              + " found. Your context loader needs to be configured to create an instance of this class and attach it to the ServletContext using the attribue WebConstants.IMPALA_FACTORY_ATTRIBUTE");
    }

    ModuleDefinitionSource source = (ModuleDefinitionSource) servletContext
        .getAttribute(WebConstants.MODULE_DEFINITION_SOURCE_ATTRIBUTE);
    if (source == null) {
      throw new ConfigurationException(
          "No instance of "
              + ModuleDefinitionSource.class.getName()
View Full Code Here

      throws BeansException {

    ModuleManagementFacade facade = createModuleManagementFactory(servletContext);

    // load the parent context, which is web-independent
    ModuleDefinitionSource moduleDefinitionSource = getModuleDefinitionSource(servletContext, facade);

    // add items to servlet context
    servletContext.setAttribute(WebConstants.MODULE_DEFINITION_SOURCE_ATTRIBUTE, moduleDefinitionSource);
    servletContext.setAttribute(WebConstants.IMPALA_FACTORY_ATTRIBUTE, facade);
   
View Full Code Here

TOP

Related Classes of org.impalaframework.module.definition.ModuleDefinitionSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.