Examples of RootBeanDefinition


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

    boolean create = mustCreateIndex(element);

    BeanDefinitionRegistry registry = parserContext.getRegistry();

    //Definition of the FS Directory
    RootBeanDefinition fsDirectoryBeanDefinition = new RootBeanDefinition(
                          FSDirectoryFactoryBean.class);
    fsDirectoryBeanDefinition.setPropertyValues(new MutablePropertyValues());
    fsDirectoryBeanDefinition.getPropertyValues()
        .addPropertyValue(LOCATION_ATTRIBUTE, location);
    registry.registerBeanDefinition(FS_DIRECTORY_ID_PREFIX + id, fsDirectoryBeanDefinition);

    //Definition of the index factory
    RootBeanDefinition simpleIndexFactoryBeanDefinition = new RootBeanDefinition(
                          SimpleIndexFactoryBean.class);
    simpleIndexFactoryBeanDefinition.setPropertyValues(new MutablePropertyValues());
    simpleIndexFactoryBeanDefinition.getPropertyValues()
        .addPropertyValue(DIRECTORY_ATTRIBUTE, new RuntimeBeanReference(FS_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
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.