Package org.springframework.beans

Examples of org.springframework.beans.MutablePropertyValues.addPropertyValue()


    private static class WsdlDefinitionWebApplicationContext extends StaticWebApplicationContext {

        @Override
        public void refresh() throws BeansException, IllegalStateException {
            MutablePropertyValues mpv = new MutablePropertyValues();
            mpv.addPropertyValue("wsdl", new ClassPathResource("wsdl11-input.wsdl", getClass()));
            registerSingleton("definition", SimpleWsdl11Definition.class, mpv);
            super.refresh();
        }
    }
}
View Full Code Here


                // do we have existing resourses?
                PropertyValue propertyValue = propertyValues.getPropertyValue("mappingResources");

                if (propertyValue == null) {
                    propertyValue = new PropertyValue("mappingResources", new ArrayList());
                    propertyValues.addPropertyValue(propertyValue);
                }

                // value is expected to be a list.
                List existingMappingResources = (List) propertyValue.getValue();
                existingMappingResources.addAll(mappingResources);
View Full Code Here

                // do we have existing resources?
                PropertyValue propertyValue = propertyValues.getPropertyValue("annotatedClasses");

                if (propertyValue == null) {
                    propertyValue = new PropertyValue("annotatedClasses", new ArrayList());
                    propertyValues.addPropertyValue(propertyValue);
                }

                // value is expected to be a list.
                List existingMappingResources = (List) propertyValue.getValue();
                existingMappingResources.addAll(annotatedClasses);
View Full Code Here

            if (configLocations != null) {
                PropertyValue propertyValue = propertyValues.getPropertyValue("configLocations");
                if (propertyValue == null) {
                    propertyValue = new PropertyValue("configLocations", new ArrayList());
                    propertyValues.addPropertyValue(propertyValue);
                }
                List existingConfigLocations = (List) propertyValue.getValue();
                existingConfigLocations.addAll(configLocations);
            }
View Full Code Here

            if (hibernateProperties != null) {
                PropertyValue propertyValue = propertyValues.getPropertyValue("hibernateProperties");
                if (propertyValue == null) {
                    propertyValue = new PropertyValue("hibernateProperties", new Properties());
                    propertyValues.addPropertyValue(propertyValue);
                }
                Properties existingHibernateProperties = (Properties) propertyValue.getValue();
                existingHibernateProperties.putAll(hibernateProperties);
            }
        } else {
View Full Code Here

        GenericBeanDefinition definition = new GenericBeanDefinition();
        definition.setBeanClass(GwtServiceBeanFactoryPostProcessor.class);

        MutablePropertyValues propertyValues = new MutablePropertyValues();
        propertyValues.addPropertyValue("pathPrefix", new TypedStringValue(pathPrefix));

        Element mappingsElement = DomUtils.getChildElementByTagName(element, UNEXPECTED_EXCEPTION_MAPPTINS_DEF);

        if (mappingsElement != null) {
View Full Code Here

            RootBeanDefinition mappingsBeanDefinition = (RootBeanDefinition) mappingsBuilder.getBeanDefinition();
            String id = parserContext.getReaderContext().registerWithGeneratedName(mappingsBeanDefinition);

            logger.info("Registered UnexpectedExceptionMappgins bean with id '" + id + "'");

            propertyValues.addPropertyValue("unexpectedExceptionMappingsBeanName", new TypedStringValue(id));

        }

        definition.setPropertyValues(propertyValues);
View Full Code Here

        }

        GenericBeanDefinition mapperDef = new GenericBeanDefinition();
        mapperDef.setBeanClass(SimpleUrlHandlerMapping.class);
        MutablePropertyValues propertyValues = new MutablePropertyValues();
        propertyValues.addPropertyValue("mappings", new TypedStringValue(sb.toString()));
        mapperDef.setPropertyValues(propertyValues);
        ((BeanDefinitionRegistry) beanFactory).registerBeanDefinition("__urlMapper", mapperDef);


        for (String name : names) {
View Full Code Here

        for (String name : names) {
            GenericBeanDefinition definition = new GenericBeanDefinition();
            definition.setBeanClass(GwtRpcController.class);

            propertyValues = new MutablePropertyValues();
            propertyValues.addPropertyValue("remoteService", new RuntimeBeanReference(name));
            if (unexpectedExceptionMappingsBeanName != null) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Registering unexpected exception mappings on controler: " + name + "Controller");
                }
                propertyValues.addPropertyValue("unexpectedExceptionMappings", new RuntimeBeanReference(unexpectedExceptionMappingsBeanName));
View Full Code Here

            propertyValues.addPropertyValue("remoteService", new RuntimeBeanReference(name));
            if (unexpectedExceptionMappingsBeanName != null) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Registering unexpected exception mappings on controler: " + name + "Controller");
                }
                propertyValues.addPropertyValue("unexpectedExceptionMappings", new RuntimeBeanReference(unexpectedExceptionMappingsBeanName));
            }
            definition.setPropertyValues(propertyValues);

            if (logger.isDebugEnabled()) {
                logger.debug("Registering controller: " + name + "Controller");
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.