Package org.impalaframework.module.definition

Examples of org.impalaframework.module.definition.BeansetModuleDefinition


  private ConfigurableApplicationContext parent;

  private ConfigurableApplicationContext child;

  public final void testInitialModuleDefinition() {
    BeansetModuleDefinition definition = new SimpleBeansetModuleDefinition(plugin4);
    loadChild(definition);
    System.out.println(Arrays.toString(child.getBeanDefinitionNames()));
    assertTrue(child.containsBean("bean1"));
    assertTrue(child.containsBean("importedBean1"));
    assertTrue(child.containsBean("importedBean2"));
View Full Code Here


    assertTrue(child.containsBean("importedBean1"));
    assertTrue(child.containsBean("importedBean2"));
  }
 
  public final void testModifiedModuleDefinition() {
    BeansetModuleDefinition definition = new SimpleBeansetModuleDefinition(plugin4, "alternative: myImports");
    loadChild(definition);
    System.out.println(Arrays.toString(child.getBeanDefinitionNames()));
    assertTrue(child.containsBean("bean1"));
    assertTrue(child.containsBean("importedBean1"));
    assertFalse(child.containsBean("importedBean2"));
View Full Code Here

    assertTrue(child.containsBean("importedBean1"));
    assertFalse(child.containsBean("importedBean2"));
  }
 
  public final void testNewBeanDefinitionReader() {
    BeansetModuleDefinition definition = new SimpleBeansetModuleDefinition(plugin4);
    BeansetApplicationModuleLoader loader = new BeansetApplicationModuleLoader();
 
    XmlBeanDefinitionReader reader = loader.newBeanDefinitionReader("id", new GenericApplicationContext(), definition);
    int definitions = reader.loadBeanDefinitions(new ClassPathResource("parentTestContext.xml"));
    assertTrue(definitions > 0);
View Full Code Here

  }

  @Override
  public XmlBeanDefinitionReader newBeanDefinitionReader(String applicationId, ConfigurableApplicationContext context, ModuleDefinition definition) {
    if (definition instanceof BeansetModuleDefinition) {
      BeansetModuleDefinition beanSetDefinition = (BeansetModuleDefinition) definition;
      Map<String, Set<String>> overrides = beanSetDefinition.getOverrides();

      ClassLoader classLoader = context.getClassLoader();

      Properties properties = new BeanSetPropertiesReader().readBeanSetDefinition(classLoader, overrides);     
     
View Full Code Here

  }

  @Override
  public XmlBeanDefinitionReader newBeanDefinitionReader(ConfigurableApplicationContext context, ModuleDefinition definition) {
    if (definition instanceof BeansetModuleDefinition) {
      BeansetModuleDefinition beanSetDefinition = (BeansetModuleDefinition) definition;
      Map<String, Set<String>> overrides = beanSetDefinition.getOverrides();

      ClassLoader classLoader = context.getClassLoader();

      Properties properties = new BeanSetPropertiesReader().readBeanSetDefinition(classLoader, overrides);     
     
View Full Code Here

TOP

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

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.