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 TypeMethodDescriptionconvert(@NotNull ConversionParameters parameters) Converts ODataEntry attribute value to the value that can exist inside anIntegrationItem.booleanisApplicable(@NotNull ConversionParameters parameters) Deduce based on the conversion context whether this converter can handle the attribute value or not.
-
Method Details
-
isApplicable
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;falseotherwise.
-
convert
Converts ODataEntry attribute value to the value that can exist inside anIntegrationItem. In a typical usecase, whenisApplicable(ConversionParameters)returnstrue, only then call this method.- Parameters:
parameters- conversion context containing the attribute value and other context information. This should be sameConversionParameters, which were passedisApplicable(ConversionParameters)- Returns:
- converted value.
-