Package org.impalaframework.module.spi

Examples of org.impalaframework.module.spi.TransitionSet


        populateTransitions(transitions, originalDefinition, newDefinition);
       
        if (newDefinition != null) {
            ModuleDefinitionUtils.freeze(newDefinition);
        }
        return new TransitionSet(transitions, newDefinition);
    }
View Full Code Here


                moduleDefinition.setState(ModuleState.LOADING);
            }
        }
       
        copy.freeze();
        return new TransitionSet(transitions, copy);
    }
View Full Code Here

    public final TransitionSet getTransitions(
            Application application,
            RootModuleDefinition originalDefinition, RootModuleDefinition newDefinition) {
       
        GraphAwareModificationExtractor delegate = newDelegate();
        TransitionSet transitions = delegate.getTransitions(application, originalDefinition, newDefinition);
       
        GraphModuleStateHolder moduleStateHolder = ObjectUtils.cast(application.getModuleStateHolder(), GraphModuleStateHolder.class);
       
        //method marked as final means this will be called
        moduleStateHolder.setDependencyManager(delegate.getNewDependencyManager());    
View Full Code Here

        transitions = sortTransitions(transitions, originalDefinition, newDefinition);
       
        if (newDefinition != null) {
            ModuleDefinitionUtils.freeze(newDefinition);
        }
        return new TransitionSet(transitions, newDefinition);
    }
View Full Code Here

                "META-INF/impala-jmx-adaptor-bootstrap.xml"});
        Object bean = context.getBean("moduleManagementFacade");
        facade = ObjectUtils.cast(bean, ModuleManagementFacade.class);
        RootModuleDefinition moduleDefinition = new Provider().getModuleDefinition();

        TransitionSet transitions = facade.getModificationExtractorRegistry()
                .getModificationExtractor(ModificationExtractorType.STICKY).getTransitions(null, null, moduleDefinition);

        ModuleStateHolder moduleStateHolder = facade.getApplicationManager().getCurrentApplication().getModuleStateHolder();
        TransitionManager transitionManager = facade.getTransitionManager();
       
View Full Code Here

      newParent.addChildModuleDefinition(moduleDefinition);
     
      moduleDefinition.setParentDefinition(newParent);
    }

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

    ModuleDefinition definitionToRemove = newRootDefinition.findChildDefinition(moduleToRemove, true);

    if (definitionToRemove != null) {
      if (definitionToRemove instanceof RootModuleDefinition) {
        //we're removing the rootModuleDefinition
        TransitionSet transitions = calculator.getTransitions(oldRootDefinition, null);
        moduleStateHolder.processTransitions(transitions);
        return true;
      }
      else {
        ModuleDefinition parent = definitionToRemove.getParentDefinition();
        if (parent != null) {
          parent.removeChildModuleDefinition(moduleToRemove);
         
          definitionToRemove.setParentDefinition(null);

          TransitionSet transitions = calculator.getTransitions(oldRootDefinition, newRootDefinition);
          moduleStateHolder.processTransitions(transitions);
          return true;
        }
        else {
          throw new InvalidStateException("Module to remove does not have a parent module. "
View Full Code Here

        populateTransitions(transitions, originalDefinition, newDefinition);
       
        if (newDefinition != null) {
            ModuleDefinitionUtils.freeze(newDefinition);
        }
        return new TransitionSet(transitions, newDefinition);
    }
View Full Code Here

                moduleDefinition.setState(ModuleState.LOADING);
            }
        }
       
        copy.freeze();
        return new TransitionSet(transitions, copy);
    }
View Full Code Here

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

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

            TransitionSet transitions = calculator.getTransitions(oldRootDefinition, newRootDefinition);
            moduleStateHolder.processTransitions(transitions);

            boolean result = !transitions.getModuleTransitions().isEmpty();
            return result ? ModuleOperationResult.TRUE : ModuleOperationResult.FALSE;
        }
       
        return ModuleOperationResult.FALSE;
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.module.spi.TransitionSet

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.