Package org.springframework.beans.factory.support

Examples of org.springframework.beans.factory.support.RootBeanDefinition


        .getBeanDefinition(BeanName.CACHE_MANAGER);
    return cacheManager;
  }

  private Resource getConfigLocationFromCacheManager() {
    RootBeanDefinition cacheManager = getCacheManagerFromRegistry();
    return (Resource) cacheManager.getPropertyValues().getPropertyValue(
        "configLocation").getValue();
  }
View Full Code Here


  }

  public void testParseCacheSetupStrategy() {
    Element proxyElement = proxyElementBuilder.toXml();

    RootBeanDefinition beanDefinition = new RootBeanDefinition(String.class);
    BeanDefinitionHolder holder = new BeanDefinitionHolder(beanDefinition, "beanName");
    beanReferenceParser.parse(proxyElement, parserContext);
    beanReferenceParserControl.setReturnValue(holder);
    beanReferenceParserControl.replay();
View Full Code Here

    Element beanElement = createBeanElementBuilder(beanName).toXml();

    Element referenceElement = elementBuilder.toXml();
    referenceElement.appendChild(beanElement);

    RootBeanDefinition beanDefinition = new RootBeanDefinition(String.class);
    BeanDefinitionHolder holder = new BeanDefinitionHolder(beanDefinition,
        beanName);

    delegate.parseBeanDefinitionElement(beanElement, null);
    helperControl.setReturnValue(holder);
View Full Code Here

    Element beanElement = createBeanElementBuilder(beanName).toXml();

    Element referenceElement = elementBuilder.toXml();
    referenceElement.appendChild(beanElement);

    RootBeanDefinition beanDefinition = new RootBeanDefinition(String.class);
    BeanDefinitionHolder holder = new BeanDefinitionHolder(beanDefinition,
        beanName);

    delegate.parseBeanDefinitionElement(beanElement, null);
    helperControl.setReturnValue(holder);
View Full Code Here

    Element beanElement = createBeanElementBuilder(beanName).toXml();

    Element referenceElement = elementBuilder.toXml();
    referenceElement.appendChild(beanElement);

    RootBeanDefinition beanDefinition = new RootBeanDefinition(String.class);
    BeanDefinitionHolder holder = new BeanDefinitionHolder(beanDefinition,
        beanName);

    delegate.parseBeanDefinitionElement(beanElement, null);
    helperControl.setReturnValue(holder);
View Full Code Here

    parser.getCacheProviderFacadeClass();
    parserControl.setReturnValue(cacheProviderFacadeClass);
  }

  private RootBeanDefinition getCacheProviderFacade() {
    RootBeanDefinition cacheProviderFacade = (RootBeanDefinition) registry
        .getBeanDefinition(configElementBuilder.id);
    return cacheProviderFacade;
  }
View Full Code Here

  private Object getPropertyValue(RootBeanDefinition beanDefinition, String propertyName) {
    return beanDefinition.getPropertyValues().getPropertyValue(propertyName).getValue();
  }

  public void testEventListenerDefinition() throws Exception {
    RootBeanDefinition beanDefinition = (RootBeanDefinition) this.beanFactory.getBeanDefinition("eventListenerFull");
    assertSame(EventListenerDefinition.class, beanDefinition.getBeanClass());
    assertPropertyValue(beanDefinition, "absPath", "/somePath");
    assertPropertyValue(beanDefinition, "isDeep", "true");
    assertPropertyValue(beanDefinition, "noLocal", "false");
    assertPropertyValue(beanDefinition, "eventType", new Integer(17));
    assertTrue(ObjectUtils.nullSafeEquals(new String[] { "123" }, (Object[]) getPropertyValue(beanDefinition,
View Full Code Here

    assertTrue(ObjectUtils.nullSafeEquals(new String[] { "foo", "bar" }, (Object[]) getPropertyValue(
        beanDefinition, "nodeTypeName")));
  }

  public void testSessionFactory() throws Exception {
    RootBeanDefinition beanDefinition = (RootBeanDefinition) this.beanFactory.getBeanDefinition("sessionFactory");
    assertSame(JcrSessionFactory.class, beanDefinition.getBeanClass());

  }
View Full Code Here

      concurrentIndexFactoryBeanDefinition.getPropertyValues()
        .addPropertyValue(TARGET_INDEX_FACTORY_ATTRIBUTE, new RuntimeBeanReference(idIndexFactory));

      registry.registerBeanDefinition(id, concurrentIndexFactoryBeanDefinition);
    } else */if( LOCK.equals(concurrent)) {
      RootBeanDefinition concurrentIndexFactoryBeanDefinition = new RootBeanDefinition(
                                    LockIndexFactory.class);
      concurrentIndexFactoryBeanDefinition.setPropertyValues(new MutablePropertyValues());
      concurrentIndexFactoryBeanDefinition.getPropertyValues()
        .addPropertyValue(TARGET_INDEX_FACTORY_ATTRIBUTE, new RuntimeBeanReference(idIndexFactory));

      registry.registerBeanDefinition(id, concurrentIndexFactoryBeanDefinition);
    }
  }
View Full Code Here

    boolean concurrentEnabled = !"".equals(concurrent);

    BeanDefinitionRegistry registry = parserContext.getRegistry();

    //Definition of the RAM Directory
    RootBeanDefinition ramDirectoryBeanDefinition = new RootBeanDefinition(
                          RAMDirectoryFactoryBean.class);
    registry.registerBeanDefinition(RAM_DIRECTORY_ID_PREFIX + id, ramDirectoryBeanDefinition);

    //Definition of the index factory
    RootBeanDefinition simpleIndexFactoryBeanDefinition = new RootBeanDefinition(
                          SimpleIndexFactoryBean.class);
    simpleIndexFactoryBeanDefinition.setPropertyValues(new MutablePropertyValues());
    simpleIndexFactoryBeanDefinition.getPropertyValues()
        .addPropertyValue(DIRECTORY_ATTRIBUTE, new RuntimeBeanReference(RAM_DIRECTORY_ID_PREFIX + id));
    simpleIndexFactoryBeanDefinition.getPropertyValues()
        .addPropertyValue(CREATE_ATTRIBUTE, new Boolean(create));

    //Configuration of the analyzer of the factory
    configureAnalyzer(element, simpleIndexFactoryBeanDefinition, parserContext);
   
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.support.RootBeanDefinition

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.