Class AbstractSpecialValueTranslator
java.lang.Object
de.hybris.platform.impex.jalo.translators.AbstractSpecialValueTranslator
- All Implemented Interfaces:
SpecialValueTranslator
- Direct Known Subclasses:
ClassificationAttributeTranslator,MarketplaceProductApprovalTranslator,MarketplaceProductCarouselsSynchronizationTranslator,MediaDataTranslator,MyTranslator,StockTranslator,UserPasswordTranslator,VelocityTranslator
Abstract implementation of
SpecialValueTranslator with default method implementations. This allows extensions
to not specifying some methods if they are not needed.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(SpecialColumnDescriptor columnDescriptor) Called once upon header creation to do some initial setup logic.booleanTreatsnulland '' as empty cells.performExport(Item item) Called each time an item is exported using the enclosing header.voidperformImport(String cellValue, Item processedItem) Called each time a non-empty cell value has to be imported.voidValidates the special column definition.
-
Constructor Details
-
AbstractSpecialValueTranslator
public AbstractSpecialValueTranslator()
-
-
Method Details
-
init
Description copied from interface:SpecialValueTranslatorCalled once upon header creation to do some initial setup logic.- Specified by:
initin interfaceSpecialValueTranslator- Parameters:
columnDescriptor- the newly created column descriptor- Throws:
HeaderValidationException- indicates that the column descriptor is not configured properly
-
validate
Description copied from interface:SpecialValueTranslatorValidates the special column definition.- Specified by:
validatein interfaceSpecialValueTranslator- Parameters:
expr- the definition expression- Throws:
HeaderValidationException- if the expression is not valid
-
performExport
Description copied from interface:SpecialValueTranslatorCalled each time an item is exported using the enclosing header.- Specified by:
performExportin interfaceSpecialValueTranslator- Parameters:
item- the item to export- Returns:
- the string representation of the value to export
- Throws:
ImpExException- indicates an export error
-
performImport
Description copied from interface:SpecialValueTranslatorCalled each time a non-empty cell value has to be imported.- Specified by:
performImportin interfaceSpecialValueTranslator- Parameters:
cellValue- the cell value stringprocessedItem- the item to import the value for- Throws:
ImpExException- indicates an import error
-
isEmpty
Treatsnulland '' as empty cells.- Specified by:
isEmptyin interfaceSpecialValueTranslator- Parameters:
cellValue- the cell value string- Returns:
trueif the cell value is empty- See Also:
-