Package org.impalaframework.module.definition

Examples of org.impalaframework.module.definition.RootModuleDefinition


    RootModuleDefinition rootModuleDefinition = getModuleStateHolder().getRootModuleDefinition();
    return (rootModuleDefinition.findChildDefinition(moduleName, true) != null);
  }

  public String findLike(String moduleName) {
    RootModuleDefinition rootModuleDefinition = getModuleStateHolder().getRootModuleDefinition();
    ModuleDefinition definition = rootModuleDefinition.findChildDefinition(moduleName, false);
    if (definition != null) {
      return definition.getName();
    }
    return null;
  }
View Full Code Here


    String moduleName = getServletName();
    if (!initialized) {

      ModuleStateHolder moduleStateHolder = factory.getModuleStateHolder();
      RootModuleDefinition rootDefinition = moduleStateHolder.cloneRootModuleDefinition();
      ModuleDefinition newDefinition = newModuleDefinition(moduleName, rootDefinition);

      ModuleOperation operation = factory.getModuleOperationRegistry().getOperation(
          ModuleOperationConstants.AddModuleOperation);
      operation.execute(new ModuleOperationInput(null, newDefinition, null));
View Full Code Here

  static List<String> getRootProjectList() {
    String rootProjectsString = System.getProperty(LocationConstants.ROOT_PROJECTS_PROPERTY);
   
    if (rootProjectsString == null) {
      RootModuleDefinition md;
      try {
        md = Impala.getRootModuleDefinition();
        return md.getRootProjectNames();
      } catch (NoServiceException e) {
        //TODO what should be logged here
      }   
      return Collections.emptyList();
    }
View Full Code Here

    this.typeReaders = typeReaders;
  }

  public RootModuleDefinition getModuleDefinition() {
    Element root = getRootElement();
    RootModuleDefinition rootModuleDefinition = getRootModuleDefinition(root);

    readChildDefinitions(rootModuleDefinition, root);

    return rootModuleDefinition;
  }
View Full Code Here

    ModuleLoader moduleLoader = moduleLoaderRegistry.getModuleLoader(newRootDefinition.getType());
    ConfigurableApplicationContext parentContext = moduleStateHolder.getRootModuleContext();

    ClassLoader classLoader = parentContext.getClassLoader();

    RootModuleDefinition existingModuleDefinition = moduleStateHolder.getRootModuleDefinition();
    Resource[] existingResources = moduleLoader.getSpringConfigResources(existingModuleDefinition, classLoader);
    Resource[] newResources = moduleLoader.getSpringConfigResources(newRootDefinition, classLoader);

    // compare difference
    List<Resource> existingResourceList = newResourceList(existingResources);
View Full Code Here

  }

  public RootModuleDefinition getModuleDefinition() {
    Properties rootModuleProperties = getPropertiesForModule(rootModuleName);
    TypeReader typeReader = getTypeReadeRegistry().getTypeReader(ModuleTypes.ROOT);
    RootModuleDefinition rootModuleDefinition = readRootModuleDefinition(rootModuleProperties, typeReader);
   
    //recursively build child definitions
    buildChildDefinitions(rootModuleDefinition, rootModuleName);
   
    for (String sibling : siblings) {
      ModuleDefinition siblingDefinition = buildModuleDefinition(null, sibling);
      buildChildDefinitions(siblingDefinition, siblingDefinition.getName());
      rootModuleDefinition.addSibling(siblingDefinition);
    }
    return rootModuleDefinition;
  }
View Full Code Here

      TypeReader typeReader) {
    ModuleDefinition moduleDefinition = typeReader.readModuleDefinition(null, rootModuleName, rootModuleProperties);
    if (!(moduleDefinition instanceof RootModuleDefinition)) {
      throw new IllegalStateException("Type reader " + typeReader + " produced " + ModuleDefinition.class.getSimpleName() + " which is not an instance of " + RootModuleDefinition.class.getName());
    }
    RootModuleDefinition rootDefinition = (RootModuleDefinition) moduleDefinition;
    return rootDefinition;
  }
View Full Code Here

TOP

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

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.