Interface SpecialValueTranslator
-
- All Known Subinterfaces:
NotifiedSpecialValueTranslator
- All Known Implementing Classes:
AbstractSpecialValueTranslator
,B2BUnitAddressDeletionNotificationTranslator
,ClassificationAttributeTranslator
,ConvertPlaintextToEncodedUserPasswordTranslator
,CustomerReplicationNotificationTranslator
,DataHubCancelReturnOrderCreationTranslator
,DataHubDeliveryTranslator
,DataHubGoodsIssueTranslator
,DataHubOrderCancelTranslator
,DataHubOrderCreationTranslator
,DataHubReturnOrderCreationTranslator
,DataHubReturnOrderDeliveryTranslator
,DataHubTranslator
,DataHubTranslator
,DefaultSpecialValueTranslator
,MarketplaceClassificationAttributeTranslator
,MarketplaceProductApprovalTranslator
,MarketplaceProductCarouselsSynchronizationTranslator
,MarketplaceStockTranslator
,MediaDataTranslator
,MyTranslator
,PullMediaDataTranslator
,QuoteDiscountTranslator
,RandomPasswordTranslator
,SapClassificationAttributeAuthorTranslator
,SapClassificationAttributeTranslator
,SapOmsDataHubDeliveryTranslator
,SapOmsDataHubGoodsIssueTranslator
,SapOmsDataHubStockLevelTranslator
,SapRevenueCloudCreateUpdatePayNowChargeTranslator
,SapRevenueCloudSubscriptionPricePlanEndDateTranslator
,StockTranslator
,UserPasswordTranslator
,VelocityTranslator
public interface SpecialValueTranslator
This translator class represents a special translator which is only used bySpecialColumnDescriptor
s, similar to theAbstractValueTranslator
which is used byStandardColumnDescriptor
. The difference is that the associatedSpecialColumnDescriptor
does not specify a mapping to anAbstractDescriptor
like theStandardColumnDescriptor
. So it is not clear when reading the ImpEx script which attribute will be updated. This translator always implements special logic.
-
-
Method Summary
All Methods Instance Methods Abstract 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)
Evaluates whether or not a cell value is treated as empty.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
void init(SpecialColumnDescriptor columnDescriptor) throws HeaderValidationException
Called once upon header creation to do some initial setup logic.- Parameters:
columnDescriptor
- the newly created column descriptor- Throws:
HeaderValidationException
- indicates that the column descriptor is not configured properly
-
validate
void validate(java.lang.String expr) throws HeaderValidationException
Validates the special column definition.- Parameters:
expr
- the definition expression- Throws:
HeaderValidationException
- if the expression is not valid
-
performExport
java.lang.String performExport(Item item) throws ImpExException
Called each time an item is exported using the enclosing header.- Parameters:
item
- the item to export- Returns:
- the string representation of the value to export
- Throws:
ImpExException
- indicates an export error
-
performImport
void performImport(java.lang.String cellValue, Item processedItem) throws ImpExException
Called each time a non-empty cell value has to be imported.- Parameters:
cellValue
- the cell value stringprocessedItem
- the item to import the value for- Throws:
ImpExException
- indicates an import error
-
isEmpty
boolean isEmpty(java.lang.String cellValue)
Evaluates whether or not a cell value is treated as empty.Empty cell values are not passed to
performImport(String, Item)
.- Parameters:
cellValue
- the cell value string- Returns:
true
if the cell value is empty
-
-