public class DefaultPropertyValueService extends Object implements PropertyValueService
| Constructor and Description |
|---|
DefaultPropertyValueService() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canProcessValueMap(Map valueMap,
String propertyQualifier) |
protected PropertyReadResult |
createPropertyResult(Object sourceObject,
List<Locale> locales,
String qualifier) |
protected ExpressionResolverFactory |
getResolverFactory() |
protected ExpressionResolverFactory |
getRestrictedResolverFactory() |
protected PropertyReadResult |
handleEvaluationException(org.springframework.expression.spel.SpelEvaluationException e) |
PropertyReadResult |
readRestrictedValue(Object sourceObject,
String propertyQualifier)
Read property value from source object.
|
Map<Locale,PropertyReadResult> |
readRestrictedValue(Object sourceObject,
String qualifier,
List<Locale> locales)
Read localized qualifier values from source object.
|
Map<String,PropertyReadResult> |
readRestrictedValues(Object sourceObject,
List<String> propertyQualifiers)
Read property values from source object.
|
Map<String,PropertyReadResult> |
readRestrictedValues(Object sourceObject,
List<String> qualifiers,
List<Locale> locales)
Read qualifiers values from the source object.
|
Object |
readValue(Object sourceObject,
String qualifier)
Calls the readValues method and return a value of an attribute.
|
Map<Locale,Object> |
readValue(Object sourceObject,
String qualifier,
List<Locale> locales)
Read localized qualifier values from source object.
|
Map<String,Object> |
readValues(Object sourceObject,
List<String> qualifiers)
Calls the readValues method and return a map of attributes and the corresponding value of each attribute.
|
Map<String,Object> |
readValues(Object sourceObject,
List<String> qualifiers,
List<Locale> locales)
Read qualifiers values from the source object.
|
void |
setLocalizedValue(Object sourceObject,
String propertyQualifier,
Object value,
Locale locale)
Sets the value for the specified property and locale.
|
void |
setResolverFactory(ExpressionResolverFactory resolverFactory) |
void |
setRestrictedResolverFactory(ExpressionResolverFactory restrictedResolverFactory) |
public void setLocalizedValue(Object sourceObject, String propertyQualifier, Object value, Locale locale)
PropertyValueServiceLocale as
second argument for the given property.setLocalizedValue in interface PropertyValueServicesourceObject - a object to write a property with given qualifier and localepropertyQualifier - qualifier of property value to setvalue - value to setlocale - locale for property valuepublic Object readValue(Object sourceObject, String qualifier)
readValue in interface PropertyValueServicesourceObject - object to read fromqualifier - property qualifier to readpublic Map<String,Object> readValues(Object sourceObject, List<String> qualifiers)
readValues in interface PropertyValueServicesourceObject - object to read fromqualifiers - a list of property qualifiers to readpublic PropertyReadResult readRestrictedValue(Object sourceObject, String propertyQualifier)
PropertyValueServicereadRestrictedValue in interface PropertyValueServicesourceObject - object to read frompropertyQualifier - property qualifier to readpublic Map<String,PropertyReadResult> readRestrictedValues(Object sourceObject, List<String> propertyQualifiers)
PropertyValueServicereadRestrictedValues in interface PropertyValueServicesourceObject - object to read frompropertyQualifiers - a list of property qualifiers to readpublic Map<Locale,Object> readValue(Object sourceObject, String qualifier, List<Locale> locales)
PropertyValueServicereadValue in interface PropertyValueServicesourceObject - object to read fromqualifier - property qualifier to readlocales - a list of locales to readpublic Map<Locale,PropertyReadResult> readRestrictedValue(Object sourceObject, String qualifier, List<Locale> locales)
PropertyValueServicereadRestrictedValue in interface PropertyValueServicesourceObject - object to read fromqualifier - property qualifier to readlocales - a list of locales to readpublic Map<String,Object> readValues(Object sourceObject, List<String> qualifiers, List<Locale> locales)
PropertyValueServicereadValues in interface PropertyValueServicesourceObject - is the instance of a typequalifiers - is a list of the attribute qualifiers of the typelocales - is a list of localespublic Map<String,PropertyReadResult> readRestrictedValues(Object sourceObject, List<String> qualifiers, List<Locale> locales)
PropertyValueServicereadRestrictedValues in interface PropertyValueServicesourceObject - is a instance of a type.qualifiers - is a list of the property qualifiers of the type.locales - is a list of locales.protected PropertyReadResult createPropertyResult(Object sourceObject, List<Locale> locales, String qualifier)
protected PropertyReadResult handleEvaluationException(org.springframework.expression.spel.SpelEvaluationException e)
protected ExpressionResolverFactory getResolverFactory()
public void setResolverFactory(ExpressionResolverFactory resolverFactory)
protected ExpressionResolverFactory getRestrictedResolverFactory()
public void setRestrictedResolverFactory(ExpressionResolverFactory restrictedResolverFactory)
Copyright © 2018. All rights reserved.