Package org.impalaframework.module

Examples of org.impalaframework.module.ModuleDefinition


                if (logger.isDebugEnabled()) {
                    logger.debug("Processing module state change: " + change);
                }
               
                String transition = change.getTransition();
                ModuleDefinition currentModuleDefinition = change.getModuleDefinition();

                TransitionProcessor transitionProcessor = transitionProcessorRegistry.getTransitionProcessor(transition);
                transitionProcessor.process(transitions.getNewRootModuleDefinition(), currentModuleDefinition);
           
                if (moduleStateChangeNotifier != null) {
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);
            moduleStateHolder.processTransitions(transitions);

            boolean result = !transitions.getModuleTransitions().isEmpty();
View Full Code Here

                }
            }
           
            for (ModuleDefinition newSibling : newSiblings) {
                if (originalDefinition.hasSibling(newSibling.getName())) {
                    final ModuleDefinition siblingModule = originalDefinition.getSiblingModule(newSibling.getName());
                    compare(siblingModule, newSibling, transitions);
                }
            }
        }
    }
View Full Code Here

        Collection<ModuleDefinition> loadable = new LinkedHashSet<ModuleDefinition>();
       
        //collect unloaded first
        for (ModuleStateChange moduleStateChange : transitions) {
            if (moduleStateChange.getTransition().equals(Transition.UNLOADED_TO_LOADED)) {
                final ModuleDefinition moduleDefinition = moduleStateChange.getModuleDefinition();
               
                //are we likely to get duplicates
                loadable.add(moduleDefinition);
            }
        }
View Full Code Here

        Collection<ModuleDefinition> unloadable = new LinkedHashSet<ModuleDefinition>();
       
        //collect unloaded first
        for (ModuleStateChange moduleStateChange : transitions) {
            if (moduleStateChange.getTransition().equals(Transition.LOADED_TO_UNLOADED)) {
                final ModuleDefinition moduleDefinition = moduleStateChange.getModuleDefinition();
               
                //are we likely to get duplicates
                unloadable.add(moduleDefinition);
            }
        }
View Full Code Here

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

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

        if (found != null) {

            String foundModuleName = found.getName();
           
            Assert.notNull(moduleOperationRegistry, "moduleOperationRegistry cannot be null");
           
            ModuleOperation operation = moduleOperationRegistry.getOperation(
                    ModuleOperationConstants.ReloadNamedModuleOperation);
View Full Code Here

    protected ModuleDefinition buildModuleDefinition(
            ModuleDefinition parentDefinition, String moduleName) {
        Properties properties = moduleProperties.get(moduleName);
        String type = getType(properties);
        TypeReader reader = typeReadeRegistry.getTypeReader(type);
        ModuleDefinition definition = reader.readModuleDefinition(parentDefinition, moduleName, properties);
        definition.setParentDefinition(parentDefinition);
        return definition;
    }
View Full Code Here

            Collection<ModuleDefinition> oldChildren,
            Collection<ModuleDefinition> newChildren,
            List<ModuleStateChange> transitions) {
   
        for (ModuleDefinition oldChild : oldChildren) {
            ModuleDefinition newChild = ModuleDefinitionUtils.getModuleFromCollection(newChildren, oldChild.getName());

            if (newChild == null) {
                newParent.addChildModuleDefinition(oldChild);
                oldChild.setParentDefinition(newParent);
            }
View Full Code Here

                if (logger.isDebugEnabled()) {
                    logger.debug("Processing module state change: " + change);
                }
               
                String transition = change.getTransition();
                ModuleDefinition currentModuleDefinition = change.getModuleDefinition();

                TransitionProcessor transitionProcessor = transitionProcessorRegistry.getTransitionProcessor(transition);
                transitionProcessor.process(transitions.getNewRootModuleDefinition(), currentModuleDefinition);
           
                if (moduleStateChangeNotifier != null) {
View Full Code Here

   
    logger.info("With parent '" + parent + "', adding module: " + moduleDefinition);
   
    final Vertex parentVertex = getRequiredVertex(parent);
   
    ModuleDefinition parentDefinition = parentVertex.getModuleDefinition();
    parentDefinition.addChildModuleDefinition(moduleDefinition);
    moduleDefinition.setParentDefinition(parentDefinition);
   
    //now recursively add definitions
    List<Vertex> addedVertices = new ArrayList<Vertex>();
    populateDefinition(addedVertices, moduleDefinition);
View Full Code Here

TOP

Related Classes of org.impalaframework.module.ModuleDefinition

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.