Package org.impalaframework.module.definition

Examples of org.impalaframework.module.definition.SimpleRootModuleDefinition


  private RootModuleDefinition parent;

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


  }

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

    public final void testConstructedModuleDefinitionSource() {
        ConstructedModuleDefinitionSource provider = new ConstructedModuleDefinitionSource(null);
        assertNull(provider.getModuleDefinition());

        SimpleRootModuleDefinition definition = new SimpleRootModuleDefinition("p1", "p");
        provider = new ConstructedModuleDefinitionSource(definition);
        assertSame(definition, provider.getModuleDefinition());
    }
View Full Code Here

    String[] rootProjectNamesArray = StringUtils.tokenizeToStringArray(rootProjectNames, ",", true, true);
    if (rootProjectNamesArray == null || rootProjectNamesArray.length == 0) {
      rootProjectNamesArray = new String[]{ moduleName };
    }   
   
    SimpleRootModuleDefinition definition = new SimpleRootModuleDefinition(rootProjectNamesArray, configLocationsArray);
    return definition;
  }
View Full Code Here

    List<String> locationNames = getLocationNames(definitionElement);
   
    List<String> projectNames = getRootProjectNames(definitionElement,
        locationNames);
   
    RootModuleDefinition rootModuleDefinition = new SimpleRootModuleDefinition(projectNames, locationNames);
    return rootModuleDefinition;
  }
View Full Code Here

        loader.setResourceLoader(resourceLoader);
    }

    public final void testApplicationModuleSpringLocationsResourceLoader() {

        ModuleDefinition definition = new SimpleRootModuleDefinition(rootModuleName, new String[] { "parentTestContext.xml" });

        Resource[] springLocations = loader.getSpringLocations(definition, ClassUtils.getDefaultClassLoader());
        assertEquals(1, springLocations.length);
       
        for (Resource resource : springLocations) {
View Full Code Here

        }
    }
   
    public final void testNotFound() {

        ModuleDefinition definition = new SimpleRootModuleDefinition(rootModuleName, new String[] { "unknown.xml" });

        try {
            loader.getSpringLocations(definition, ClassUtils.getDefaultClassLoader());
            fail();
        }
View Full Code Here

        ModuleDefinitionSource moduleDefinitionSource = EasyMock.createMock(ModuleDefinitionSource.class);
       
        expect(moduleDefinitionSource.getModuleDefinition()).andReturn(originalDefinition);
       
        SimpleRootModuleDefinition definition = new SimpleRootModuleDefinition("root", "config");
        definition.freeze();
       
        TransitionSet set = new TransitionSet(new ArrayList<ModuleStateChange>(), definition);
        expect(moduleStateHolder.cloneRootModuleDefinition()).andReturn(definition);
       
        expect(repairModificationExtractor.getTransitions(application, isA(RootModuleDefinition.class), isA(RootModuleDefinition.class))).andReturn(set);
View Full Code Here

       
        //d has no parent or dependencies
        ModuleDefinition d = newDefinition(definitions, null, "d", null);
       
        //root has siblings a to d, and depends on a and b
        SimpleRootModuleDefinition root = new SimpleRootModuleDefinition("root",
                new String[] {"root.xml"},
                new String[] {"a", "b"},
                null,
                new ModuleDefinition[] {a, b, c, d}, null, null, true);
       
View Full Code Here

       
        //b depends on d but has no parent
        ModuleDefinition b = newDefinition(definitions, null, "b", null);
       
        //root has siblings a, b and depends on a
        SimpleRootModuleDefinition root = new SimpleRootModuleDefinition("root",
                new String[] {"root.xml"},
                new String[] {"a"},
                null,
                new ModuleDefinition[] {a, b}, null, null, true);
       
View Full Code Here

TOP

Related Classes of org.impalaframework.module.definition.SimpleRootModuleDefinition

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.