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 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 from
      propertyDescriptor - 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 to
      propertyDescriptor - property descriptor to write value of
      value - 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 to
      propertyDescriptor - property descriptor to write value of
      value - the value to set
      langIso - 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 from
      propertyDescriptors - property descriptors to read values of
      languageIsos - 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

      void setValues(TypedObject typedObject, ObjectValueContainer values) throws ValueHandlerException
      Stores given values.
      Parameters:
      typedObject - the typed object to write value to
      values - 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 belongs
      values - the value container to update
      Throws:
      ValueHandlerException