Package org.apache.cloudstack.spring.module.model

Examples of org.apache.cloudstack.spring.module.model.ModuleDefinition


    }

    public Resource[] getConfigResources(String name) {
        Set<Resource> resources = new LinkedHashSet<Resource>();
       
        ModuleDefinition original = null;
        ModuleDefinition def = original = modules.get(name);
       
        if ( def == null )
            return new Resource[] {};
       
        resources.addAll(def.getContextLocations());
       
        while ( def != null ) {
            resources.addAll(def.getInheritableContextLocations());
            def = modules.get(def.getParentName());
        }
       
        resources.addAll(original.getOverrideContextLocations());
       
        return resources.toArray(new Resource[resources.size()]);
View Full Code Here


            ((ConfigurableApplicationContext)base).registerShutdownHook();
        }
    }
   
    public ModuleDefinition getModuleDefinitionForWeb(String name) {
        ModuleDefinition def = moduleDefinitionSet.getModuleDefinition(name);
       
        if ( def != null ) {
            return def;
        }
       
        /* Grab farthest descendant that is deterministic */
        def = moduleDefinitionSet.getModuleDefinition(baseName);
       
        if ( def == null ) {
            throw new RuntimeException("Failed to find base spring module to extend for web");
        }
       
        while ( def.getChildren().size() == 1 ) {
            def = def.getChildren().iterator().next();
        }
       
        return def;
    }
View Full Code Here

       
        return def;
    }
   
    public ApplicationContext getApplicationContextForWeb(String name) {
        ModuleDefinition def = getModuleDefinitionForWeb(name);
       
        return moduleDefinitionSet.getApplicationContext(def.getName());
    }
View Full Code Here

   
    public String[] getConfigLocationsForWeb(String name, String[] configured) {
        if ( configured == null )
            configured = new String[] {};
       
        ModuleDefinition def = getModuleDefinitionForWeb(name);
       
        List<Resource> inherited = new ArrayList<Resource>();
       
        while ( def != null ) {
            inherited.addAll(def.getInheritableContextLocations());
            def = moduleDefinitionSet.getModuleDefinition(def.getParentName());
        }

        List<String> urlList = new ArrayList<String>();
       
        for ( Resource r : inherited ) {
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.spring.module.model.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.