Class AbstractSpecialValueTranslator
- java.lang.Object
-
- de.hybris.platform.impex.jalo.translators.AbstractSpecialValueTranslator
-
- All Implemented Interfaces:
SpecialValueTranslator
- Direct Known Subclasses:
B2BUnitAddressDeletionNotificationTranslator
,ClassificationAttributeTranslator
,CustomerReplicationNotificationTranslator
,DataHubTranslator
,DataHubTranslator
,DefaultSpecialValueTranslator
,MarketplaceProductApprovalTranslator
,MarketplaceProductCarouselsSynchronizationTranslator
,MediaDataTranslator
,MyTranslator
,SapClassificationAttributeTranslator
,SapRevenueCloudCreateUpdatePayNowChargeTranslator
,SapRevenueCloudSubscriptionPricePlanEndDateTranslator
,StockTranslator
,UserPasswordTranslator
,VelocityTranslator
public class AbstractSpecialValueTranslator extends java.lang.Object implements SpecialValueTranslator
Abstract implementation ofSpecialValueTranslator
with default method implementations. This allows extensions to not specifying some methods if they are not needed.
-
-
Constructor Summary
Constructors Constructor Description AbstractSpecialValueTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(SpecialColumnDescriptor columnDescriptor)
Called once upon header creation to do some initial setup logic.boolean
isEmpty(java.lang.String cellValue)
Treatsnull
and '' as empty cells.java.lang.String
performExport(Item item)
Called each time an item is exported using the enclosing header.void
performImport(java.lang.String cellValue, Item processedItem)
Called each time a non-empty cell value has to be imported.void
validate(java.lang.String expr)
Validates the special column definition.
-
-
-
Method Detail
-
init
public void init(SpecialColumnDescriptor columnDescriptor) throws HeaderValidationException
Description copied from interface:SpecialValueTranslator
Called once upon header creation to do some initial setup logic.- Specified by:
init
in interfaceSpecialValueTranslator
- Parameters:
columnDescriptor
- the newly created column descriptor- Throws:
HeaderValidationException
- indicates that the column descriptor is not configured properly
-
validate
public void validate(java.lang.String expr) throws HeaderValidationException
Description copied from interface:SpecialValueTranslator
Validates the special column definition.- Specified by:
validate
in interfaceSpecialValueTranslator
- Parameters:
expr
- the definition expression- Throws:
HeaderValidationException
- if the expression is not valid
-
performExport
public java.lang.String performExport(Item item) throws ImpExException
Description copied from interface:SpecialValueTranslator
Called each time an item is exported using the enclosing header.- Specified by:
performExport
in interfaceSpecialValueTranslator
- Parameters:
item
- the item to export- Returns:
- the string representation of the value to export
- Throws:
ImpExException
- indicates an export error
-
performImport
public void performImport(java.lang.String cellValue, Item processedItem) throws ImpExException
Description copied from interface:SpecialValueTranslator
Called each time a non-empty cell value has to be imported.- Specified by:
performImport
in interfaceSpecialValueTranslator
- Parameters:
cellValue
- the cell value stringprocessedItem
- the item to import the value for- Throws:
ImpExException
- indicates an import error
-
isEmpty
public boolean isEmpty(java.lang.String cellValue)
Treatsnull
and '' as empty cells.- Specified by:
isEmpty
in interfaceSpecialValueTranslator
- Parameters:
cellValue
- the cell value string- Returns:
true
if the cell value is empty- See Also:
SpecialValueTranslator.isEmpty(java.lang.String)
-
-