Interface PropertyValueService
-
- All Known Implementing Classes:
DefaultPropertyValueService
public interface PropertyValueServiceReads property values from an object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default PropertyReadResultreadRestrictedValue(java.lang.Object sourceObject, java.lang.String propertyQualifiers)Read property value from source object.default java.util.Map<java.util.Locale,PropertyReadResult>readRestrictedValue(java.lang.Object sourceObject, java.lang.String propertyQualifier, java.util.List<java.util.Locale> locales)Read localized qualifier values from source object.default java.util.Map<java.lang.String,PropertyReadResult>readRestrictedValues(java.lang.Object sourceObject, java.util.List<java.lang.String> propertyQualifiers)Read property values from source object.default java.util.Map<java.lang.String,PropertyReadResult>readRestrictedValues(java.lang.Object sourceObject, java.util.List<java.lang.String> propertyQualifiers, java.util.List<java.util.Locale> locales)Read qualifiers values from the source object.java.lang.ObjectreadValue(java.lang.Object sourceObject, java.lang.String propertyQualifiers)Read property value from source object.java.util.Map<java.util.Locale,java.lang.Object>readValue(java.lang.Object sourceObject, java.lang.String propertyQualifier, java.util.List<java.util.Locale> locales)Read localized qualifier values from source object.java.util.Map<java.lang.String,java.lang.Object>readValues(java.lang.Object sourceObject, java.util.List<java.lang.String> propertyQualifiers)Read all property values from source object.java.util.Map<java.lang.String,java.lang.Object>readValues(java.lang.Object sourceObject, java.util.List<java.lang.String> propertyQualifiers, java.util.List<java.util.Locale> locales)Read qualifiers values from the source object.voidsetLocalizedValue(java.lang.Object sourceObject, java.lang.String propertyQualifier, java.lang.Object value, java.util.Locale locale)Sets the value for the specified property and locale.
-
-
-
Method Detail
-
readValues
java.util.Map<java.lang.String,java.lang.Object> readValues(java.lang.Object sourceObject, java.util.List<java.lang.String> propertyQualifiers)Read all property values from source object.- Parameters:
propertyQualifiers- a list of property qualifiers to readsourceObject- object to read from- Returns:
- map contains all property qualifiers with corresponding values.
-
readRestrictedValues
default java.util.Map<java.lang.String,PropertyReadResult> readRestrictedValues(java.lang.Object sourceObject, java.util.List<java.lang.String> propertyQualifiers)
Read property values from source object. Every property is first check, whether user may read it.- Parameters:
propertyQualifiers- a list of property qualifiers to readsourceObject- object to read from- Returns:
- map contains all property qualifiers with corresponding read result.
-
readValue
java.lang.Object readValue(java.lang.Object sourceObject, java.lang.String propertyQualifiers)Read property value from source object.- Parameters:
propertyQualifiers- property qualifier to readsourceObject- object to read from- Returns:
- corresponding property value.
-
readRestrictedValue
default PropertyReadResult readRestrictedValue(java.lang.Object sourceObject, java.lang.String propertyQualifiers)
Read property value from source object. Property is first check, whether user may read it.- Parameters:
propertyQualifiers- property qualifier to readsourceObject- object to read from- Returns:
- corresponding property read result.
-
readValue
java.util.Map<java.util.Locale,java.lang.Object> readValue(java.lang.Object sourceObject, java.lang.String propertyQualifier, java.util.List<java.util.Locale> locales)Read localized qualifier values from source object. The returning map holds a locale as key and the value of this map holds the corresponding localized value of the property.- Parameters:
sourceObject- object to read frompropertyQualifier- property qualifier to readlocales- a list of locales to read- Returns:
- map where the key holds a @Locale object and the value of this map holds the corresponding value of the qualifier.
-
readRestrictedValue
default java.util.Map<java.util.Locale,PropertyReadResult> readRestrictedValue(java.lang.Object sourceObject, java.lang.String propertyQualifier, java.util.List<java.util.Locale> locales)
Read localized qualifier values from source object. Every property is first check, whether user may read it. The returning map holds a locale as key and the value of this map holds the corresponding localized value of the property.- Parameters:
sourceObject- object to read frompropertyQualifier- property qualifier to readlocales- a list of locales to read- Returns:
- map where the key holds a @Locale object and the value of this map holds the corresponding value of the qualifier.
-
readValues
java.util.Map<java.lang.String,java.lang.Object> readValues(java.lang.Object sourceObject, java.util.List<java.lang.String> propertyQualifiers, java.util.List<java.util.Locale> locales)Read qualifiers values from the source object. Also Localized property values will be read.- Parameters:
sourceObject- is a instance of a type.propertyQualifiers- is a list of the property qualifiers of the type.locales- is a list of locales.- Returns:
- map contains all qualifiers with corresponding localized values.
-
readRestrictedValues
default java.util.Map<java.lang.String,PropertyReadResult> readRestrictedValues(java.lang.Object sourceObject, java.util.List<java.lang.String> propertyQualifiers, java.util.List<java.util.Locale> locales)
Read qualifiers values from the source object. Also Localized property values will be read. Every property is first check, whether user may read it.- Parameters:
sourceObject- is a instance of a type.propertyQualifiers- is a list of the property qualifiers of the type.locales- is a list of locales.- Returns:
- map contains all qualifiers with corresponding localized values.
-
setLocalizedValue
void setLocalizedValue(java.lang.Object sourceObject, java.lang.String propertyQualifier, java.lang.Object value, java.util.Locale locale)Sets the value for the specified property and locale. Assumes the the object has a setter with aLocaleas second argument for the given property.- Parameters:
sourceObject- a object to write a property with given qualifier and localepropertyQualifier- qualifier of property value to setvalue- value to setlocale- locale for property value
-
-