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
public abstract class ReplaceAttributeCollectionValueConverter extends CollectionValueConverter
A base class for collection converters applicable to PATCH requests, which replace all existing values of the item in the platform.
-
-
Constructor Summary
Constructors Constructor Description ReplaceAttributeCollectionValueConverter(@NotNull ODataEntryToIntegrationItemConverter entryConverter, @NotNull PayloadAttributeValueConverter valueConverter, @NotNull LocalizedValueProvider provider)A constructor that injects dependencies to be reused by subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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, handleCollection
-
Methods inherited from class de.hybris.platform.odata2services.converter.AbstractValueConverter
toIntegrationItem, toValue
-
-
-
-
Constructor Detail
-
ReplaceAttributeCollectionValueConverter
public 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 Detail
-
isApplicable
public boolean isApplicable(ConversionParameters parameters)
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
protected LocalizedAttributes handleLocalizedAttributes(ConversionParameters parameters)
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.
-
-