Example usage for org.springframework.beans.factory.config TypedStringValue setValue

List of usage examples for org.springframework.beans.factory.config TypedStringValue setValue

Introduction

In this page you can find the example usage for org.springframework.beans.factory.config TypedStringValue setValue.

Prototype

public void setValue(@Nullable String value) 

Source Link

Document

Set the String value.

Usage

From source file:com.jaspersoft.jasperserver.api.common.util.spring.BeanPropertyTextAppender.java

protected Object getProcessedPropertyValue(Object originalValue) {
    Object appendedValue;//from   w w  w. j a va 2 s.co  m
    if (originalValue == null) {
        appendedValue = getAppended();
    } else {
        if (originalValue instanceof String) {
            appendedValue = originalValue + getAppended();
        } else if (originalValue instanceof TypedStringValue) {
            TypedStringValue newValue = (TypedStringValue) originalValue;
            newValue.setValue(newValue.getValue() + getAppended());

            appendedValue = newValue;
        } else {
            throw new JSException("jsexception.property.not.a.text",
                    new Object[] { getPropertyName(), getBeanName() });
        }
    }

    if (log.isInfoEnabled()) {
        log.info("Appending " + getBeanName() + "." + getPropertyName() + " with " + getAppended());
    }

    return appendedValue;
}