Class DefaultPayloadAttributeValueConverter

java.lang.Object
de.hybris.platform.odata2services.converter.DefaultPayloadAttributeValueConverter
All Implemented Interfaces:
PayloadAttributeValueConverter

public class DefaultPayloadAttributeValueConverter extends Object implements PayloadAttributeValueConverter
Default implementation of the ODataEntry attribute value converter, which handles different kinds of attribute values, e.g. a map, a collection, an ODataFeed, etc by delegating to the registered ValueConverters.
  • Constructor Details

    • DefaultPayloadAttributeValueConverter

      public DefaultPayloadAttributeValueConverter()
  • Method Details

    • convertAttributeValue

      public Object convertAttributeValue(ConversionParameters parameters)
      Description copied from interface: PayloadAttributeValueConverter
      Converts an ODataEntry attribute value to values acceptable by IntegrationItem.
      Specified by:
      convertAttributeValue in interface PayloadAttributeValueConverter
      Parameters:
      parameters - context for the value conversion, which carries attribute name, value, ODataContext, etc. For that reason the conversion parameters cannot be null or otherwise conversion is not possible.
      Returns:
      converted value that is OData independent and can be used as attribute value in IntegrationItem. This value may be null because attributes may have null values.
    • setValueConverters

      public void setValueConverters(@NotNull @NotNull List<ValueConverter> converters)
      Injects a list of value converters that will handle different kinds of possible ODataEntry attribute values. Calling this method subsequently with different lists of converters, resets the previously set converters and keeps only converters of the last call.
      Parameters:
      converters - a list of converters in the order of how they will be applied for the value conversion. Ideally the converters should be mutually exclusive and only one converter should be responsible for conversion of a given ConversionParameters. If it's not so, keep in mind that order of the converters is important because once a converter for handling the attribute value is found no other converters will be even assessed.
      See Also: