Examples of PropertyValue


Examples of org.springframework.beans.PropertyValue

  /**
   * Asserts that the cache provider facade definition has a reference to the
   * definition of a cache manager factory.
   */
  private void assertCacheProviderFacadeHasCacheManagerAsProperty() {
    PropertyValue cacheManagerProperty = cacheProviderFacade
        .getPropertyValues().getPropertyValue("cacheManager");

    RuntimeBeanReference cacheManager = (RuntimeBeanReference) cacheManagerProperty
        .getValue();
    assertEquals(BeanName.CACHE_MANAGER, cacheManager.getBeanName());
  }
View Full Code Here

Examples of org.springframework.beans.PropertyValue

    BeanDefinition proxyDefinition = registry
        .getBeanDefinition(proxyElementBuilder.id);

    // verify property "target" is correct.
    PropertyValue target = proxyDefinition.getPropertyValues()
        .getPropertyValue("target");
    assertEquals(holder, target.getValue());
    assertCacheProxyFactoryBeanDefinitionIsCorrect(proxyDefinition);

    beanReferenceParserControl.verify();
  }
View Full Code Here

Examples of org.springframework.beans.PropertyValue

  private void assertCacheProxyFactoryBeanDefinitionIsCorrect(
      BeanDefinition cacheProxyFactoryBeanDefinition) {

    // verify cache proxy factory bean.
    PropertyValue expected = propertySource.getCacheKeyGeneratorProperty();
    ConfigAssert.assertBeanDefinitionHasProperty(
        cacheProxyFactoryBeanDefinition, expected);

    // verify property "cacheProviderFacade" is correct.
    expected = new PropertyValue("cacheProviderFacade",
        new RuntimeBeanReference("cacheProvider"));
    ConfigAssert.assertBeanDefinitionHasProperty(
        cacheProxyFactoryBeanDefinition, expected);

    // verify rest of properties.
View Full Code Here

Examples of org.springframework.beans.PropertyValue

   */
  public static void assertPropertyIsPresent(
      MutablePropertyValues propertyValues, PropertyValue expectedPropertyValue) {

    String propertyName = expectedPropertyValue.getName();
    PropertyValue actualPropertyValue = propertyValues
        .getPropertyValue(propertyName);

    Assert.assertNotNull("Property " + StringUtils.quote(propertyName)
        + " not found", actualPropertyValue);

    Object expectedValue = expectedPropertyValue.getValue();
    Object actualValue = actualPropertyValue.getValue();
    String message = "<Property " + StringUtils.quote(propertyName) + ">";

    assertEquals(message, expectedValue, actualValue);
  }
View Full Code Here

Examples of org.springframework.beans.PropertyValue

  }

  private void assertAttributesPropertyIsPresent(
      MutablePropertyValues propertyValues) {

    PropertyValue expected = new PropertyValue("attributes",
        new RuntimeBeanReference(ATTRIBUTES_BEAN_NAME));
    ConfigAssert.assertPropertyIsPresent(propertyValues, expected);
  }
View Full Code Here

Examples of org.springframework.beans.PropertyValue

  protected void tearDown() {
    parserControl.verify();
  }

  private void assertFailQuietlyEnabledIsCorrect(Boolean expected) {
    PropertyValue expectedPropertyValue = new PropertyValue(
        "failQuietlyEnabled", expected);
    ConfigAssert.assertBeanDefinitionHasProperty(getCacheProviderFacade(),
        expectedPropertyValue);
  }
View Full Code Here

Examples of org.springframework.beans.PropertyValue

    assertFailQuietlyEnabledIsCorrect(Boolean.TRUE);
  }

  private void assertSerializableFactoryPropertyIsCorrect(
      SerializableFactory expected) {
    PropertyValue expectedPropertyValue = new PropertyValue(
        "serializableFactory", expected);
    ConfigAssert.assertBeanDefinitionHasProperty(getCacheProviderFacade(),
        expectedPropertyValue);
  }
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.PropertyValue

    /**
     * Creates a <code>CascadedStyle</code>, setting the display property to
     * to the value of the <code>display</code> parameter. 
     */
    public static CascadedStyle createAnonymousStyle(IdentValue display) {
        CSSPrimitiveValue val = new PropertyValue(display);
       
        List props = Collections.singletonList(
                new PropertyDeclaration(CSSName.DISPLAY, val, true, StylesheetInfo.USER));
       
        return new CascadedStyle(props.iterator());
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.PropertyValue

     * {@link #createLayoutStyle(PropertyDeclaration[])} or
     * {@link #createLayoutStyle(CascadedStyle, PropertyDeclaration[])}
     */
    public static PropertyDeclaration createLayoutPropertyDeclaration(
            CSSName cssName, IdentValue display) {
        CSSPrimitiveValue val = new PropertyValue(display);
        // Urk... kind of ugly, but we really want this value to be used
        return new PropertyDeclaration(cssName, val, true, StylesheetInfo.USER);
    }
View Full Code Here

Examples of us.codecraft.tinyioc.beans.PropertyValue

      if (node instanceof Element) {
        Element propertyEle = (Element) node;
        String name = propertyEle.getAttribute("name");
        String value = propertyEle.getAttribute("value");
        if (value != null && value.length() > 0) {
          beanDefinition.getPropertyValues().addPropertyValue(new PropertyValue(name, value));
        } else {
          String ref = propertyEle.getAttribute("ref");
          if (ref == null || ref.length() == 0) {
            throw new IllegalArgumentException("Configuration problem: <property> element for property '"
                + name + "' must specify a ref or value");
          }
          BeanReference beanReference = new BeanReference(ref);
          beanDefinition.getPropertyValues().addPropertyValue(new PropertyValue(name, beanReference));
        }
      }
    }
  }
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.