Package org.impalaframework.module

Examples of org.impalaframework.module.RootModuleDefinition.findChildDefinition()


    /**
     * Returns true of a module definition is present for the named module
     */
    public boolean hasModule(String moduleName) {
        RootModuleDefinition rootModuleDefinition = getModuleStateHolder().getRootModuleDefinition();
        return (rootModuleDefinition.findChildDefinition(moduleName, true) != null);
    }

    /**
     * Returns the name of the module which matches the supplied module name, that is, the
     * first module found whose name contains that of the supplied module name
View Full Code Here


     * Returns the name of the module which matches the supplied module name, that is, the
     * first module found whose name contains that of the supplied module name
     */
    public String findModuleNameLike(String moduleName) {
        RootModuleDefinition rootModuleDefinition = getModuleStateHolder().getRootModuleDefinition();
        ModuleDefinition definition = rootModuleDefinition.findChildDefinition(moduleName, false);
        if (definition != null) {
            return definition.getName();
        }
        return null;
    }
View Full Code Here

                        + this.getClass().getName());
       
        ModuleStateHolder moduleStateHolder = application.getModuleStateHolder();
        RootModuleDefinition newDefinition = moduleStateHolder.cloneRootModuleDefinition();

        ModuleDefinition found = newDefinition.findChildDefinition(moduleToReload, false);

        if (found != null) {

            String foundModuleName = found.getName();
           
View Full Code Here

            if (parent == null) {
                newParent = newRootDefinition;
            }
            else {
                String parentName = parent.getName();
                newParent = newRootDefinition.findChildDefinition(parentName, true);

                if (newParent == null) {
                    throw new InvalidStateException("Unable to find parent module '" + parentName + "' in " + newRootDefinition);
                }
            }
View Full Code Here

        ModificationExtractorRegistry modificationExtractor = getModificationExtractorRegistry();
        ModificationExtractor calculator = modificationExtractor
                .getModificationExtractor(ModificationExtractorType.STRICT);

        ModuleDefinition childDefinition = newRootDefinition.findChildDefinition(moduleToReload, true);
        super.isReloadPermitted(childDefinition);

        if (childDefinition != null) {
            childDefinition.setState(ModuleState.STALE);
View Full Code Here

                        + this.getClass().getName());
       
        ModuleStateHolder moduleStateHolder = application.getModuleStateHolder();
        RootModuleDefinition newDefinition = moduleStateHolder.cloneRootModuleDefinition();

        ModuleDefinition found = newDefinition.findChildDefinition(moduleToReload, false);
        super.isReloadPermitted(found);

        if (found != null) {

            String foundModuleName = found.getName();
View Full Code Here

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

  public boolean hasModule(String moduleName) {
    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);
View Full Code Here

    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

            if (parent == null) {
                newParent = newRootDefinition;
            }
            else {
                String parentName = parent.getName();
                newParent = newRootDefinition.findChildDefinition(parentName, true);

                if (newParent == null) {
                    throw new InvalidStateException("Unable to find parent module '" + parentName + "' in " + newRootDefinition);
                }
            }
View Full Code Here

    ModificationExtractorRegistry modificationExtractor = getModificationExtractorRegistry();
    ModificationExtractor calculator = modificationExtractor
        .getModificationExtractor(ModificationExtractorType.STRICT);

    ModuleDefinition childDefinition = newRootDefinition.findChildDefinition(moduleToReload, true);

    if (childDefinition != null) {
      childDefinition.setState(ModuleState.STALE);

      TransitionSet transitions = calculator.getTransitions(oldRootDefinition, newRootDefinition);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.