Interface ValueService
- All Known Implementing Classes:
DefaultValueService
public interface ValueService
Value service contains methods for handling values of TypedObjects. You can read/write values of single or multiple
PropertyDescriptors.
-
Method Summary
Modifier and TypeMethodDescriptiongetValue(TypedObject typedObject, PropertyDescriptor propertyDescriptor) Reads value of a single property descriptor.getValues(TypedObject typedObject, Set<PropertyDescriptor> propertyDescriptors, Set<String> languageIsos) Reads values of a given property descriptors.voidsetValue(TypedObject typedObject, PropertyDescriptor propertyDescriptor, Object value) Stores value of a single property descriptor.voidsetValue(TypedObject typedObject, PropertyDescriptor propertyDescriptor, Object value, String langIso) Stores value of a single property descriptor for a given language.voidsetValues(TypedObject typedObject, ObjectValueContainer values) Stores given values.voidupdateValues(TypedObject typedObject, ObjectValueContainer values) Updates all valueholders in the given valueContainer, i.e.
-
Method Details
-
getValue
Object getValue(TypedObject typedObject, PropertyDescriptor propertyDescriptor) throws ValueHandlerException Reads value of a single property descriptor.- Parameters:
typedObject- the typed object to read value frompropertyDescriptor- property descriptor to read value of- Returns:
- the value
- Throws:
ValueHandlerException- if reading of the value is not possible - e.g. user rights or validation problem
-
setValue
void setValue(TypedObject typedObject, PropertyDescriptor propertyDescriptor, Object value) throws ValueHandlerException Stores value of a single property descriptor.- Parameters:
typedObject- the typed object to write value topropertyDescriptor- property descriptor to write value ofvalue- the value to set- Throws:
ValueHandlerException- if storing of the value is not possible - e.g. user rights or validation problem
-
setValue
void setValue(TypedObject typedObject, PropertyDescriptor propertyDescriptor, Object value, String langIso) throws ValueHandlerException Stores value of a single property descriptor for a given language.- Parameters:
typedObject- the typed object to write value topropertyDescriptor- property descriptor to write value ofvalue- the value to setlangIso- give language iso code- Throws:
ValueHandlerException- if storing of the value is not possible - e.g. user rights or validation problem
-
getValues
ObjectValueContainer getValues(TypedObject typedObject, Set<PropertyDescriptor> propertyDescriptors, Set<String> languageIsos) throws ValueHandlerException Reads values of a given property descriptors.- Parameters:
typedObject- the typed object to read value frompropertyDescriptors- property descriptors to read values oflanguageIsos- languages to load values for- Returns:
- the values
- Throws:
ValueHandlerException- if reading of values is not possible - e.g. user rights or validation problem
-
setValues
Stores given values.- Parameters:
typedObject- the typed object to write value tovalues- the values to set. Values of all property descriptors of the ObjectValueContainer will be stored.- Throws:
ValueHandlerException- if storing of values is not possible - e.g. user rights or validation problem
-
updateValues
void updateValues(TypedObject typedObject, ObjectValueContainer values) throws ValueHandlerException Updates all valueholders in the given valueContainer, i.e. reload them from persistence layer- Parameters:
typedObject- the object to which the value container belongsvalues- the value container to update- Throws:
ValueHandlerException
-