Examples of MutablePropertyValues


Examples of com.volantis.styling.values.MutablePropertyValues

    }

    protected void checkNormalized(
            ImmutableStylePropertySet supportedProperties, String expectedCSS) {

        final MutablePropertyValues filteredValues =
                STYLING_FACTORY.createPropertyValues();
        supportedProperties.iterateStyleProperties(new StylePropertyIteratee() {
            public IterationAction next(StyleProperty property) {
                filteredValues.setComputedValue(property,
                        inputValues.getStyleValue(property));
                return IterationAction.CONTINUE;
            }
        });

        assertEquals(expectedCSS, filteredValues.getStandardCSS());
    }
View Full Code Here

Examples of org.springframework.beans.MutablePropertyValues

    public void testHandler()
            throws Exception
    {
        StaticWebApplicationContext appContext = new StaticWebApplicationContext();
        appContext.registerSingleton("echo", EchoImpl.class, new MutablePropertyValues());

        webAnnotations.hasWebServiceAnnotation(EchoImpl.class);
        control.setReturnValue(true);
        webAnnotations.hasHandlerChainAnnotation(EchoImpl.class);
        control.setReturnValue(false);
View Full Code Here

Examples of org.springframework.beans.MutablePropertyValues

    public void testNoAnnotation()
            throws Exception
    {
        StaticWebApplicationContext appContext = new StaticWebApplicationContext();
        appContext.registerSingleton("echo", EchoImpl.class, new MutablePropertyValues());

        webAnnotations.hasWebServiceAnnotation(EchoImpl.class);
        control.setReturnValue(false);

        control.replay();
View Full Code Here

Examples of org.springframework.beans.MutablePropertyValues

      target.setBeanClassName(source.getBeanDefinition().getBeanClassName());
      for (PropertyValue pv : target.getPropertyValues().getPropertyValues()) {
        target.getPropertyValues().removePropertyValue(pv);
      }
    }
    MutablePropertyValues pvs = source.getBeanDefinition().getPropertyValues();
    for (PropertyValue pv : pvs.getPropertyValueList()) {
      String name = pv.getName();
      target.getPropertyValues().addPropertyValue(name, pv.getValue());
      logger.debug("config {}.{} = {}", new Object[] { source.getBeanName(), name, pv.getValue() });
    }
    beanNames.add(source.getBeanName());
View Full Code Here

Examples of org.springframework.beans.MutablePropertyValues

        }

        final Object job = ctx.getBean(bundle.getJobDetail().getKey().getName());
        final BeanWrapper wrapper = PropertyAccessorFactory.forBeanPropertyAccess(job);
        if (isEligibleForPropertyPopulation(wrapper.getWrappedInstance())) {
            final MutablePropertyValues pvs = new MutablePropertyValues();
            if (this.schedulerContext != null) {
                pvs.addPropertyValues(this.schedulerContext);
            }
            pvs.addPropertyValues(bundle.getJobDetail().getJobDataMap());
            pvs.addPropertyValues(bundle.getTrigger().getJobDataMap());
            if (this.ignoredUnknownProperties == null) {
                wrapper.setPropertyValues(pvs, true);
            } else {
                for (String propName : this.ignoredUnknownProperties) {
                    if (pvs.contains(propName) && !wrapper.isWritableProperty(propName)) {

                        pvs.removePropertyValue(propName);
                    }
                }
                wrapper.setPropertyValues(pvs);
            }
        }
View Full Code Here

Examples of org.springframework.beans.MutablePropertyValues

    NamespaceUtils.setPropertyValue(element, contextBuilder, "job-tracker");
    NamespaceUtils.setPropertyValue(element, contextBuilder, "exec-type");
    NamespaceUtils.setPropertyReference(element, contextBuilder, "configuration-ref");

    // move properties setting from PigServer to PigContext class
    MutablePropertyValues pv = builder.getRawBeanDefinition().getPropertyValues();
    String prop = "properties";
    if (pv.contains(prop)) {
      contextBuilder.addPropertyValue(prop, pv.getPropertyValue(prop).getValue());
      pv.removePropertyValue(prop);
    }

    builder.addPropertyValue("pigContext", contextBuilder.getBeanDefinition());
  }
View Full Code Here

Examples of org.springframework.beans.MutablePropertyValues

     */
    public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) {
        if (configurableListableBeanFactory.containsBean(validatorFactoryBeanName)) {
            BeanDefinition validatorFactoryBeanDefinition =
                    configurableListableBeanFactory.getBeanDefinition(validatorFactoryBeanName);
            MutablePropertyValues propertyValues = validatorFactoryBeanDefinition.getPropertyValues();
            PropertyValue propertyValue = propertyValues.getPropertyValue("validationConfigLocations");

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

Examples of org.springframework.beans.MutablePropertyValues

    protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
        XmlBeanFactory factory = new XmlBeanFactory(new ClassPathResource("com/tacitknowledge/flip/spring/context.xml"));
       
        BeanDefinitionBuilder beanBuilder = BeanDefinitionBuilder.rootBeanDefinition(FlipSpringAspect.class);
        String defaultUrlValue = element.getAttribute("default-url");
        MutablePropertyValues propertyValues = new MutablePropertyValues();
        propertyValues.addPropertyValue("defaultValue", defaultUrlValue);
        propertyValues.addPropertyValue(FlipSpringAspect.FEATURE_SERVICE_BEAN_NAME, new RuntimeBeanReference(FlipSpringAspect.FEATURE_SERVICE_BEAN_NAME));
        beanBuilder.getRawBeanDefinition().setPropertyValues(propertyValues);
       
        for(String name : factory.getBeanDefinitionNames()) {
            parserContext.getRegistry().registerBeanDefinition(name, factory.getBeanDefinition(name));
        }
View Full Code Here

Examples of org.springframework.beans.MutablePropertyValues

    protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
        BeanDefinitionBuilder factoryBuilder = BeanDefinitionBuilder.rootBeanDefinition(FeatureServiceDirectFactory.class);
        RootBeanDefinition factoryBean = (RootBeanDefinition) factoryBuilder.getBeanDefinition();
        parserContext.getRegistry().registerBeanDefinition(FlipSpringAspect.FEATURE_SERVICE_FACTORY_BEAN_NAME, factoryBean);
       
        MutablePropertyValues factoryPropertyValues = new MutablePropertyValues();
        factoryBean.setPropertyValues(factoryPropertyValues);
       
        String environmentBean = element.getAttribute("environment");
        if (environmentBean != null && !environmentBean.isEmpty()) {
            factoryPropertyValues.addPropertyValue("environment", new RuntimeBeanNameReference(environmentBean));
        }

        Element contextProvidersElement = DomUtils.getChildElementByTagName(element, "context-providers");
        if (contextProvidersElement != null) {
            List contextProvidersList = parserContext.getDelegate().parseListElement(contextProvidersElement, factoryBean);
            if (contextProvidersList != null && !contextProvidersList.isEmpty()) {
                factoryPropertyValues.addPropertyValue("contextProviders", contextProvidersList);
            }
        }

        Element propertyReadersElement = DomUtils.getChildElementByTagName(element, "property-readers");
        if (propertyReadersElement != null && propertyReadersElement.hasChildNodes()) {
            List propertyReadersList = parserContext.getDelegate().parseListElement(propertyReadersElement, factoryBean);
            if (propertyReadersList != null && !propertyReadersList.isEmpty()) {
                factoryPropertyValues.addPropertyValue("propertyReaders", propertyReadersList);
            }
        }
       
        Element propertiesElement = DomUtils.getChildElementByTagName(element, "properties");
        if (propertiesElement != null && propertiesElement.hasChildNodes()) {
            Properties properties = parserContext.getDelegate().parsePropsElement(propertiesElement);
            if (properties != null && !properties.isEmpty()) {
                factoryPropertyValues.addPropertyValue("properties", properties);
            }
        }
       
        BeanDefinitionBuilder featureServiceBuilder = BeanDefinitionBuilder.genericBeanDefinition();
        BeanDefinition featureServiceRawBean = featureServiceBuilder.getRawBeanDefinition();
View Full Code Here

Examples of org.springframework.beans.MutablePropertyValues

   
    @Test
    public void testCreateFlipHandlerAspect() {
        assertTrue(context.containsBeanDefinition(FlipSpringAspect.ASPECT_BEAN_NAME));
        BeanDefinition flipHandlerAspectBeanDefinition = context.getBeanDefinition(FlipSpringAspect.ASPECT_BEAN_NAME);
        MutablePropertyValues properties = flipHandlerAspectBeanDefinition.getPropertyValues();
        assertEquals(FlipSpringAspect.class.getName(), flipHandlerAspectBeanDefinition.getBeanClassName());
       
        FlipSpringAspect aspect = context.getBean(FlipSpringAspect.ASPECT_BEAN_NAME, FlipSpringAspect.class);
        assertNotNull(aspect.getFeatureService());
        assertNotNull(aspect.getDefaultValue());
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.