Interface ValueConverter

All Known Implementing Classes:
AbstractValueConverter, CollectionValueConverter, MapValueConverter, ODataCollectionValueConverter, ODataFeedValueConverter, ReplaceAttributeCollectionValueConverter, ReplaceAttributeODataCollectionValueConverter, ReplaceAttributeODataFeedValueConverter, SingularLocalizedAttributeValueConverter

public interface ValueConverter
Converter of a particular kind of ODataEntry attribue value. For example, one implementation may be responsible for converting Collection values, another one for converting ODataEntry values, etc.
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(@NotNull ConversionParameters parameters)
    Converts ODataEntry attribute value to the value that can exist inside an IntegrationItem.
    boolean
    isApplicable(@NotNull ConversionParameters parameters)
    Deduce based on the conversion context whether this converter can handle the attribute value or not.
  • Method Details

    • isApplicable

      boolean isApplicable(@NotNull @NotNull ConversionParameters parameters)
      Deduce based on the conversion context whether this converter can handle the attribute value or not.
      Parameters:
      parameters - conversion parameters carrying the context for the value conversion.
      Returns:
      true, if this converter is applicable to the provided conversion parameters and can handle the attribute value conversion; false otherwise.
    • convert

      Object convert(@NotNull @NotNull ConversionParameters parameters)
      Converts ODataEntry attribute value to the value that can exist inside an IntegrationItem. In a typical usecase, when isApplicable(ConversionParameters) returns true, only then call this method.
      Parameters:
      parameters - conversion context containing the attribute value and other context information. This should be same ConversionParameters, which were passed isApplicable(ConversionParameters)
      Returns:
      converted value.