Class ReplaceAttributeCollectionValueConverter
java.lang.Object
de.hybris.platform.odata2services.converter.AbstractValueConverter
de.hybris.platform.odata2services.converter.CollectionValueConverter
de.hybris.platform.odata2services.converter.ReplaceAttributeCollectionValueConverter
- All Implemented Interfaces:
ValueConverter
- Direct Known Subclasses:
ReplaceAttributeODataCollectionValueConverter,ReplaceAttributeODataFeedValueConverter
A base class for collection converters applicable to PATCH requests, which replace all existing values of the item
in the platform.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedReplaceAttributeCollectionValueConverter(@NotNull ODataEntryToIntegrationItemConverter entryConverter, @NotNull PayloadAttributeValueConverter valueConverter, @NotNull LocalizedValueProvider provider) A constructor that injects dependencies to be reused by subclasses. -
Method Summary
Modifier and TypeMethodDescriptionprotected LocalizedAttributeshandleLocalizedAttributes(ConversionParameters parameters) Converts a collection of Localized___xxx entities representing localized attribute in the type system.booleanisApplicable(ConversionParameters parameters) Deduce based on the conversion context whether this converter can handle the attribute value or not.Methods inherited from class de.hybris.platform.odata2services.converter.CollectionValueConverter
convert, getAttributeValue, handleCollectionMethods inherited from class de.hybris.platform.odata2services.converter.AbstractValueConverter
toIntegrationItem, toValue
-
Constructor Details
-
ReplaceAttributeCollectionValueConverter
protected ReplaceAttributeCollectionValueConverter(@NotNull @NotNull ODataEntryToIntegrationItemConverter entryConverter, @NotNull @NotNull PayloadAttributeValueConverter valueConverter, @NotNull @NotNull LocalizedValueProvider provider) A constructor that injects dependencies to be reused by subclasses.- Parameters:
entryConverter- an implementation ofODataEntryToIntegrationItemConverterto use.valueConverter- an implementation ofPayloadAttributeValueConverterto use.provider- an implementation ofLocalizedValueProviderto use.
-
-
Method Details
-
isApplicable
Description copied from interface:ValueConverterDeduce 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.
-
handleLocalizedAttributes
Description copied from class:CollectionValueConverterConverts a collection of Localized___xxx entities representing localized attribute in the type system.- Overrides:
handleLocalizedAttributesin classCollectionValueConverter- Parameters:
parameters- a collection of localized values, in which each element is an ODataEntry of Localized___xxx type.- Returns:
- localized attribute values.
-