Package org.impalaframework.module.definition

Examples of org.impalaframework.module.definition.RootModuleDefinition


  }

  public RootModuleDefinition getModuleDefinition() {
    Properties rootModuleProperties = getPropertiesForModule(rootModuleName);
    TypeReader typeReader = TypeReaderUtils.getTypeReader(getTypeReaders(), ModuleTypes.ROOT);
    RootModuleDefinition rootModuleDefinition = readRootModuleDefinition(rootModuleProperties, typeReader);
   
    //recursively build child definitions
    buildChildDefinitions(rootModuleDefinition, rootModuleName);
    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

    }
    return like;
  }

  public void reloadRootModule() {
    RootModuleDefinition rootModuleDefinition = getModuleStateHolder().getRootModuleDefinition();
    ModuleOperation operation = factory.getModuleOperationRegistry().getOperation(
        ModuleOperationConstants.CloseRootModuleOperation);
    operation.execute(null);
    ConstructedModuleDefinitionSource newModuleDefinitionSource = new ConstructedModuleDefinitionSource(
        rootModuleDefinition);
View Full Code Here

  }

  /* **************************** getters ************************** */

  public boolean hasModule(String moduleName) {
    RootModuleDefinition rootModuleDefinition = getModuleStateHolder().getRootModuleDefinition();
    return (rootModuleDefinition.findChildDefinition(moduleName, true) != null);
  }
View Full Code Here

    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

    List<String> locationNames = getLocationNames(definitionElement);
   
    List<String> projectNames = getRootProjectNames(definitionElement,
        locationNames);
   
    RootModuleDefinition rootModuleDefinition = new SimpleRootModuleDefinition(projectNames, locationNames);
    return rootModuleDefinition;
  }
View Full Code Here

    return directoryName.equals(rootProject);
  }

  static String getRootProject() {
   
    RootModuleDefinition md;
    try {
      md = Impala.getRootModuleDefinition();
      return (md != null ? md.getName() : null);
    } catch (NoServiceException e) {
      CommandPropertyValue property = GlobalCommandState.getInstance().getProperty(CommandStateConstants.DEBUG_MODE);
      if (property != null && "true".equalsIgnoreCase(property.getValue())) {
        e.printStackTrace();
      }
View Full Code Here

    List<String> locationNames = getLocationNames(definitionElement);
   
    List<String> projectNames = getRootProjectNames(definitionElement,
        locationNames);
   
    RootModuleDefinition rootModuleDefinition = new SimpleRootModuleDefinition(projectNames, locationNames);
    return rootModuleDefinition;
  }
View Full Code Here

    }
    return like;
  }

  public void reloadRootModule() {
    RootModuleDefinition rootModuleDefinition = getModuleStateHolder().getRootModuleDefinition();
    ModuleOperation operation = facade.getModuleOperationRegistry().getOperation(
        ModuleOperationConstants.CloseRootModuleOperation);
    operation.execute(null);
    ConstructedModuleDefinitionSource newModuleDefinitionSource = new ConstructedModuleDefinitionSource(
        rootModuleDefinition);
View Full Code Here

  }

  /* **************************** getters ************************** */

  public boolean hasModule(String moduleName) {
    RootModuleDefinition rootModuleDefinition = getModuleStateHolder().getRootModuleDefinition();
    return (rootModuleDefinition.findChildDefinition(moduleName, true) != null);
  }
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.