Examples of IBeansConfigSet


Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

   
    BeansConfigSet configSet = new BeansConfigSet(beansProject, "test-set", IBeansConfigSet.Type.MANUAL);
    configSet.addConfig("basic-bean-config.xml");
    beansProject.addConfigSet(configSet);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(1, configs.size());
    IBeansConfig config = configs.iterator().next();
    assertEquals("basic-bean-config.xml", config.getElementName());
    assertTrue(config instanceof BeansConfig);
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

    BeansConfigSet configSet = new BeansConfigSet(beansProject, "test-set", IBeansConfigSet.Type.MANUAL);
    configSet.addConfig("basic-bean-config.xml");
    configSet.addConfig("/beans-config-tests-2/second-bean-config.xml");
    beansProject.addConfigSet(configSet);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(2, configs.size());
   
    secondProject.delete(true, null);
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

    BeansConfigSet configSet = new BeansConfigSet(beansProject, "test-set", IBeansConfigSet.Type.MANUAL);
    configSet.addConfig("basic-bean-config.xml");
    configSet.addConfig("/beans-config-tests-2/java:org.test.spring.ExternalConfigurationClass");
    beansProject.addConfigSet(configSet);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(2, configs.size());
   
    secondProject.delete(true, null);
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

    beansProject.addConfigSet(configSet);
   
    IFile configFile = (IFile) project.findMember("basic-bean-config.xml");
    beansProject.removeConfig(configFile);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(0, configs.size());
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

    beansProject.addConfigSet(configSet);
   
    IFile configFile = (IFile) secondProject.findMember("second-bean-config.xml");
    beansProject.removeConfig(configFile);
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(1, configs.size());
    IBeansConfig config = configs.iterator().next();
    assertEquals("basic-bean-config.xml", config.getElementName());
    assertTrue(config instanceof BeansConfig);
   
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

    beansProject.addConfigSet(configSet);
   
    IType type = javaProject.findType("org.test.spring.SimpleConfigurationClass");
    beansProject.removeConfig((IFile) type.getResource());
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(0, configs.size());
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

    beansProject.addConfigSet(configSet);
   
    IType type = secondJavaProject.findType("org.test.spring.ExternalConfigurationClass");
    beansProject.removeConfig((IFile) type.getResource());
   
    IBeansConfigSet set = beansProject.getConfigSet("test-set");
    Set<IBeansConfig> configs = set.getConfigs();
    assertEquals(1, configs.size());
   
    secondProject.delete(true, null);
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

    } else if (receiver instanceof IBeansConfig && "canAddToConfigSet".equals(property)) {
       IBeansConfig config = (IBeansConfig) receiver;
       boolean canAddToConfigSet = hasAvailableConfigSet(config);
       return expectedValue == null ? canAddToConfigSet : canAddToConfigSet == ((Boolean) expectedValue);
    } else if (receiver instanceof IBeansConfigSet && "isEmptyConfigSet".equals(property)) {
      IBeansConfigSet configSet = (IBeansConfigSet) receiver;
      boolean isEmpty = configSet.getConfigs().isEmpty();
      return expectedValue == null ? isEmpty : isEmpty == ((Boolean) expectedValue);
    }
    return false;
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

      assertEquals(1, autoConfigs.size());

      Set<String> autoConfigSetNames = beansProject.getAutoConfigSetNames();
      assertEquals(0, autoConfigSetNames.size());
     
      IBeansConfigSet set = beansProject.getConfigSet("test-set");
      Set<String> configNamesInSet = set.getConfigNames();
      assertEquals(1, configNamesInSet.size());
      assertEquals("WebContent/WEB-INF/spring/root-context.xml", configNamesInSet.iterator().next());
    } finally {
      waitForJobsToComplete();
      project.delete(true, null);
View Full Code Here

Examples of org.springframework.ide.eclipse.beans.core.model.IBeansConfigSet

  private BeanDefinitionRegistry createRegistry(IBeansConfig config, IResourceModelElement contextElement,
      boolean fillCompletely) {
    DefaultBeanDefinitionRegistry registry = new DefaultBeanDefinitionRegistry();
    if (contextElement instanceof BeansConfigSet) {
      IBeansConfigSet configSet = (IBeansConfigSet) contextElement;
      if (fillCompletely) {
        registry.setAllowAliasOverriding(true);
        registry.setAllowBeanDefinitionOverriding(true);
      }
      else {
        registry.setAllowAliasOverriding(configSet.isAllowAliasOverriding());
        registry.setAllowBeanDefinitionOverriding(configSet.isAllowBeanDefinitionOverriding());
      }
      for (IBeansConfig csConfig : configSet.getConfigs()) {
        if (!fillCompletely && config.equals(csConfig)) {
          break;
        }
        BeansModelUtils.register(configSet, csConfig, registry);
      }
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.