Class ProductFeatureValueTranslator
java.lang.Object
de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
de.hybris.platform.impex.jalo.translators.SingleValueTranslator
de.hybris.platform.catalog.jalo.classification.impex.ProductFeatureValueTranslator
Translator for translating the attribute 'value' of type ProductFeature.
Will export a value by exporting the type of the value and the value itself delimited by the configured collection value delimiter. So a feature value 'test' of type string will be exported as 'string,test'.
The supported types are: string, number, boolean, enum, date. When using the enum type, the exported value will contain the classification system and version too.
For example a value 'test' of type enum of classification system 'mySystem' and version 'myVersion' will be exported as 'enum,mySystem,myVersion,test'.
The import assumes the format of the export as input.
Will export a value by exporting the type of the value and the value itself delimited by the configured collection value delimiter. So a feature value 'test' of type string will be exported as 'string,test'.
The supported types are: string, number, boolean, enum, date. When using the enum type, the exported value will contain the classification system and version too.
For example a value 'test' of type enum of classification system 'mySystem' and version 'myVersion' will be exported as 'enum,mySystem,myVersion,test'.
The import assumes the format of the export as input.
- Since:
- 3.0-u6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectconvertToJalo(String valueExpr, Item forItem) Converts a non-null and non-empty string into a jalo attribute value.protected StringconvertToString(Object value) Converts a non-null jalo attribute value into its string representation.voidinit(StandardColumnDescriptor columnDescriptor) Called once per header creation to allow configuring this translator using column modifiers etc.Methods inherited from class de.hybris.platform.impex.jalo.translators.SingleValueTranslator
exportValue, getEmptyValue, importValue, isEmptyMethods inherited from class de.hybris.platform.impex.jalo.translators.AbstractValueTranslator
clearStatus, createTranslator, createTranslator, createTranslator, debug, error, getColumnDescriptor, getFlexibleSearch, info, isDebugEnabled, isInfoEnabled, setEmpty, setError, validate, warn, wasEmpty, wasUnresolved
-
Constructor Details
-
ProductFeatureValueTranslator
public ProductFeatureValueTranslator()
-
-
Method Details
-
init
Description copied from class:AbstractValueTranslatorCalled once per header creation to allow configuring this translator using column modifiers etc.- Overrides:
initin classAbstractValueTranslator- Parameters:
columnDescriptor- descriptor where the value to translate belongs to
-
convertToJalo
Description copied from class:SingleValueTranslatorConverts a non-null and non-empty string into a jalo attribute value.- Specified by:
convertToJaloin classSingleValueTranslator- Parameters:
valueExpr- string to translateforItem- item instance the translated value will be set to as attribute- Returns:
- Object translated value
-
convertToString
Description copied from class:SingleValueTranslatorConverts a non-null jalo attribute value into its string representation.- Specified by:
convertToStringin classSingleValueTranslator- Parameters:
value- value to translate- Returns:
- translated value
-