Examples of SimpleRootModuleDefinition


Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

        setModuleNames(this.parent, moduleNames);
    }

    public SimpleModuleDefinitionSource(String rootModuleName, String[] moduleNames) {
        super();       
        this.parent = new SimpleRootModuleDefinition(rootModuleName, new String[] { "applicationContext.xml" });
        setModuleNames(this.parent, moduleNames);
    }
View Full Code Here

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

            String[] optionalDependencyNames,
            Map<String, String> attributes,
            String runtime,
            Collection<String> capabilities, boolean reloadable) {
       
        return new SimpleRootModuleDefinition(moduleName, locationsArray, dependencyNames, attributes, new ModuleDefinition[0], null, capabilities, reloadable);
    }
View Full Code Here

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

    private SimpleModuleDefinition definition6;
   
    @Override
    protected void setUp() throws Exception {
        builder = new XMLModuleDefinitionSource();
        root = new SimpleRootModuleDefinition(rootModuleName, new String[] { "parentTestContext.xml", "extra-context.xml" });

        definition1 = new SimpleModuleDefinition(root, module1);
        definition2 = new SimpleModuleDefinition(root, module2);
        definition3 = new SimpleModuleDefinition(definition2, module3);
        definition4 = new SimpleModuleDefinition(root, module4);
View Full Code Here

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

    public final void testGetParentOnlyDefinition() {
        builder.setResource(new ClassPathResource("xmlspec/parent-only-spec.xml"));
        RootModuleDefinition actual = builder.getModuleDefinition();
        assertEquals(0, actual.getChildModuleDefinitions().size());

        RootModuleDefinition expected = new SimpleRootModuleDefinition(rootModuleName, new String[] { "parentTestContext.xml", "extra-context.xml" });
        assertEquals(expected, actual);
    }
View Full Code Here

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

       
        InternalPropertiesModuleDefinitionSource builder = new InternalPropertiesModuleDefinitionSource(typeReaderRegistry, rootModuleName, moduleProperties, children, orphans);
        RootModuleDefinition definition = builder.getModuleDefinition();
        System.out.println(definition);
       
        RootModuleDefinition root = new SimpleRootModuleDefinition("impala-core", "parentTestContext.xml");
        SimpleModuleDefinition sample2 = new SimpleModuleDefinition(root, "sample-module2");
        new SimpleModuleDefinition(sample2, "sample-module4");
       
        assertEquals(root, definition);
    }
View Full Code Here

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

    }

    public void testReadModuleDefinitionDefaults() {
        Properties properties = new Properties();
        ModuleDefinition moduleDefinition = reader.readModuleDefinition(null, "rootModule", properties);
        SimpleRootModuleDefinition definition = (SimpleRootModuleDefinition) moduleDefinition;
        assertTrue(definition.getConfigLocations().isEmpty());
    }
View Full Code Here

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

        Properties properties = new Properties();
        properties.setProperty(ModuleElementNames.CONFIG_LOCATIONS_ELEMENT, "loc1,loc2");
        properties.put(ModuleElementNames.DEPENDENCIES_ELEMENT, "module1,module2, module3 , module4 module5");
   
        ModuleDefinition moduleDefinition = reader.readModuleDefinition(null, "rootModule", properties);
        SimpleRootModuleDefinition definition = (SimpleRootModuleDefinition) moduleDefinition;
        assertEquals(Arrays.asList(new String[]{"loc1", "loc2"}), definition.getConfigLocations());
        assertEquals(Arrays.asList(new String[]{ "module1", "module2", "module3", "module4", "module5"}), moduleDefinition.getDependentModuleNames(false));
    }
View Full Code Here

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

        application = TestApplicationManager.newApplicationManager().getCurrentApplication();
    }

    public void testGetTransitions() {
        GraphModificationExtractorDelegate delegate = new GraphModificationExtractorDelegate();
        SimpleRootModuleDefinition rootDefinitionOld = rootDefinition("orig");
        SimpleRootModuleDefinition rootDefinitionNew = rootDefinition("new");
        TransitionSet transitions = delegate.getTransitions(application, rootDefinitionOld, rootDefinitionNew);
        assertEquals(2, transitions.getModuleTransitions().size());
       
        assertNotNull(delegate.getNewDependencyManager());
        assertNotNull(delegate.getOldDependencyManager());
View Full Code Here

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

        assertNotNull(delegate.getNewDependencyManager());
        assertNotNull(delegate.getOldDependencyManager());
    }

    private SimpleRootModuleDefinition rootDefinition(String name) {
        SimpleRootModuleDefinition rootDefinition = new SimpleRootModuleDefinition(name,
                new String[] {"context.xml"},
                new String[0],
                null,
                new ModuleDefinition[0], null, null, true);
        return rootDefinition;
View Full Code Here

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition

public class ModificationTestUtils {

    static RootModuleDefinition spec(String contextString, String definitionString) {
        String[] locations = contextString.split(",");
        SingleStringModuleDefinitionSource builder = new SingleStringModuleDefinitionSource(new SimpleRootModuleDefinition("project1", locations),
                definitionString);
        RootModuleDefinition rootModuleDefinition = builder.getModuleDefinition();
        return rootModuleDefinition;
    }
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.