Class ReplaceAttributeODataCollectionValueConverter
java.lang.Object
de.hybris.platform.odata2services.converter.AbstractValueConverter
de.hybris.platform.odata2services.converter.CollectionValueConverter
de.hybris.platform.odata2services.converter.ReplaceAttributeCollectionValueConverter
de.hybris.platform.odata2services.converter.ReplaceAttributeODataCollectionValueConverter
- All Implemented Interfaces:
ValueConverter
public class ReplaceAttributeODataCollectionValueConverter
extends ReplaceAttributeCollectionValueConverter
A converter that handles a collection attribute value in PATCH requests.
-
Constructor Summary
ConstructorsConstructorDescriptionReplaceAttributeODataCollectionValueConverter(ODataEntryToIntegrationItemConverter entryConverter, PayloadAttributeValueConverter valueConverter, LocalizedValueProvider provider) A constructor that injects dependencies to be reused by subclasses. -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<?>getAttributeValue(Object attrValue) Presents attribute value, that is conceptually a collection but may not be presented so in the ODataEntry, as aCollectionbooleanisApplicable(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.ReplaceAttributeCollectionValueConverter
handleLocalizedAttributesMethods inherited from class de.hybris.platform.odata2services.converter.CollectionValueConverter
convert, handleCollectionMethods inherited from class de.hybris.platform.odata2services.converter.AbstractValueConverter
toIntegrationItem, toValue
-
Constructor Details
-
ReplaceAttributeODataCollectionValueConverter
public ReplaceAttributeODataCollectionValueConverter(ODataEntryToIntegrationItemConverter entryConverter, PayloadAttributeValueConverter valueConverter, 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.- Specified by:
isApplicablein interfaceValueConverter- Overrides:
isApplicablein classReplaceAttributeCollectionValueConverter- 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.
-
getAttributeValue
Description copied from class:CollectionValueConverterPresents attribute value, that is conceptually a collection but may not be presented so in the ODataEntry, as aCollection- Specified by:
getAttributeValuein classCollectionValueConverter- Parameters:
attrValue- a value that represents a collection of elements but may not implement one of the JavaCollectioninterfaces.- Returns:
- same value presented as a Java
Collection
-