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 SpecialValueTranslatorThis translator class represents a special translator which is only used bySpecialColumnDescriptors, similar to theAbstractValueTranslatorwhich is used byStandardColumnDescriptor. The difference is that the associatedSpecialColumnDescriptordoes not specify a mapping to anAbstractDescriptorlike 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 voidinit(SpecialColumnDescriptor columnDescriptor)Called once upon header creation to do some initial setup logic.booleanisEmpty(java.lang.String cellValue)Evaluates whether or not a cell value is treated as empty.java.lang.StringperformExport(Item item)Called each time an item is exported using the enclosing header.voidperformImport(java.lang.String cellValue, Item processedItem)Called each time a non-empty cell value has to be imported.voidvalidate(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 HeaderValidationExceptionValidates 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 ImpExExceptionCalled 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:
trueif the cell value is empty
-
-