Examples of containsBean()


Examples of org.grails.spring.DefaultRuntimeSpringConfiguration.containsBean()

        GrailsApplication app = new DefaultGrailsApplication(new Class[]{}, gcl);
        RuntimeSpringConfiguration springConfig = new DefaultRuntimeSpringConfiguration();
        GrailsRuntimeConfigurator.loadExternalSpringConfig(springConfig, app);

        for (String bean : new String[] { "b", "b2" }) {
            assertTrue(springConfig.containsBean(bean));
            BeanConfiguration beanConfig = springConfig.getBeanConfig(bean);
            assertTrue(beanConfig.hasProperty("value"));
            assertEquals(app, beanConfig.getPropertyValue("value"));
        }
    }
View Full Code Here

Examples of org.grails.spring.GrailsApplicationContext.containsBean()

        WebRuntimeSpringConfiguration springConfig = conf.getWebRuntimeSpringConfiguration();
        GrailsRuntimeConfigurator.loadExternalSpringConfig(springConfig, app);

        springConfig.registerBeansWithContext(ctx);
        assertTrue(ctx.containsBean("foo"));
        assertTrue(ctx.containsBean("bar"));
//        assertTrue(ctx.containsBean("grapp"));
    }

    @SuppressWarnings("unchecked")
View Full Code Here

Examples of org.grails.spring.RuntimeSpringConfiguration.containsBean()

        GrailsApplication app = new DefaultGrailsApplication(new Class[]{}, gcl);
        RuntimeSpringConfiguration springConfig = new DefaultRuntimeSpringConfiguration();
        GrailsRuntimeConfigurator.loadExternalSpringConfig(springConfig, app);

        for (String bean : new String[] { "b", "b2" }) {
            assertTrue(springConfig.containsBean(bean));
            BeanConfiguration beanConfig = springConfig.getBeanConfig(bean);
            assertTrue(beanConfig.hasProperty("value"));
            assertEquals(app, beanConfig.getPropertyValue("value"));
        }
    }
View Full Code Here

Examples of org.impalaframework.facade.ModuleManagementFacade.containsBean()

    @Override
    protected RequestModuleMapper newRequestModuleMapper(FilterConfig config) {
        final ServletContext servletContext = config.getServletContext();

        ModuleManagementFacade facade = WebServletUtils.getModuleManagementFacade(servletContext);
        if (facade.containsBean("requestModuleMapper")) {
            return ObjectUtils.cast(facade.getBean("requestModuleMapper"), RequestModuleMapper.class);
        }
        return super.newRequestModuleMapper(config);
    }
}
View Full Code Here

Examples of org.impalaframework.module.bootstrap.ModuleManagementFactory.containsBean()

    ApplicationContext context = factory.getModuleStateHolder().getModuleContexts().get(moduleName);

    if (!initialized) {

      if (factory.containsBean("scheduledModuleChangeMonitor")) {
        logger.info("Registering " + getServletName() + " for module modifications");
        ModuleChangeMonitor moduleChangeMonitor = (ModuleChangeMonitor) factory
            .getBean("scheduledModuleChangeMonitor");
        moduleChangeMonitor.addModificationListener(this);
      }
View Full Code Here

Examples of org.soybeanMilk.example.spring.org.springframework.web.context.WebApplicationContext.containsBean()

      {
        public Object getResolverObject(Serializable resolverObjectId)
        {
          String name=(resolverObjectId instanceof String ? (String)resolverObjectId : resolverObjectId.toString());
         
          if(springContext.containsBean(name))
            return springContext.getBeans(name);
          else
            return null;
        }
       
View Full Code Here

Examples of org.springframework.beans.factory.BeanFactory.containsBean()

   * @throws BuildException if the bean cannot be located
   */
  public Object getValue() throws BuildException {
    if (value!=null) return value;
    BeanFactory beanFactory = BeanFactoryLoader.getBeanFactory(contextRef, factoryKey);
    if ((name == null) || !beanFactory.containsBean(name)) {
      throw new BuildException(
          "The BeanFactory does not contain the required bean: ["
              + name + "]");
    }
    value = beanFactory.getBean(name);
View Full Code Here

Examples of org.springframework.beans.factory.BeanFactory.containsBean()

   * Test method for 'org.springmodules.ant.util.BeanFactoryLoader'
   */
  public void testBeanFactoryWithContext() throws Exception {
    BeanFactory factory = BeanFactoryLoader.getBeanFactory("classpath:beanRefContext.xml", "test.bootstrap");
    assertNotNull("Null bean factory test.child", factory);
    assertTrue("Factory does not contain bean", factory.containsBean("properties"));
  }

  /*
   * Test method for 'org.springmodules.ant.util.BeanFactoryLoader'
   */
 
View Full Code Here

Examples of org.springframework.beans.factory.BeanFactory.containsBean()

   * Test method for 'org.springmodules.ant.util.BeanFactoryLoader'
   */
  public void testBeanFactoryDefaultContext() throws Exception {
    BeanFactory factory = BeanFactoryLoader.getBeanFactory("test.bootstrap");
    assertNotNull("Null bean factory test.child", factory);
    assertTrue("Factory does not contain bean", factory.containsBean("properties"));
  }

  /*
   * Test method for 'org.springmodules.ant.util.BeanFactoryLoader'
   */
 
View Full Code Here

Examples of org.springframework.beans.factory.BeanFactory.containsBean()

   * Test method for 'org.springmodules.ant.util.BeanFactoryLoader'
   */
  public void testParentBeanFactory() throws Exception {
    BeanFactory factory = BeanFactoryLoader.getBeanFactory("test.child");
    assertNotNull("Null bean factory test.child", factory);
    assertTrue("Factory does not contain bean", factory.containsBean("properties"));
  }

  /*
   * Test method for 'org.springmodules.ant.util.BeanFactoryLoader'
   */
 
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.