Class DefaultSpecialValueTranslator
- java.lang.Object
-
- de.hybris.platform.impex.jalo.translators.AbstractSpecialValueTranslator
-
- com.sap.hybris.returnsexchange.inbound.events.DefaultSpecialValueTranslator
-
- All Implemented Interfaces:
SpecialValueTranslator
- Direct Known Subclasses:
DataHubCancelReturnOrderCreationTranslator,DataHubReturnOrderCreationTranslator,DataHubReturnOrderDeliveryTranslator
public class DefaultSpecialValueTranslator extends AbstractSpecialValueTranslator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringHELPER_BEAN
-
Constructor Summary
Constructors Constructor Description DefaultSpecialValueTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DataHubInboundOrderHelpergetInboundHelper()protected java.lang.StringgetOrderCode(Item processedItem)voidinit(SpecialColumnDescriptor columnDescriptor)Called once upon header creation to do some initial setup logic.booleanisEmpty(java.lang.String paramString)Treatsnulland '' as empty cells.java.lang.StringperformExport(Item paramItem)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.protected voidsetInboundHelper(DataHubInboundOrderHelper service)voidvalidate(java.lang.String paramString)Validates the special column definition.
-
-
-
Field Detail
-
HELPER_BEAN
public static final java.lang.String HELPER_BEAN
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(SpecialColumnDescriptor columnDescriptor) throws HeaderValidationException
Description copied from interface:SpecialValueTranslatorCalled once upon header creation to do some initial setup logic.- Specified by:
initin interfaceSpecialValueTranslator- Overrides:
initin classAbstractSpecialValueTranslator- Parameters:
columnDescriptor- the newly created column descriptor- Throws:
HeaderValidationException- indicates that the column descriptor is not configured properly
-
getOrderCode
protected java.lang.String getOrderCode(Item processedItem) throws ImpExException
- Throws:
ImpExException
-
validate
public void validate(java.lang.String paramString) throws HeaderValidationExceptionDescription copied from interface:SpecialValueTranslatorValidates the special column definition.- Specified by:
validatein interfaceSpecialValueTranslator- Overrides:
validatein classAbstractSpecialValueTranslator- Parameters:
paramString- the definition expression- Throws:
HeaderValidationException- if the expression is not valid
-
performExport
public java.lang.String performExport(Item paramItem) throws ImpExException
Description copied from interface:SpecialValueTranslatorCalled each time an item is exported using the enclosing header.- Specified by:
performExportin interfaceSpecialValueTranslator- Overrides:
performExportin classAbstractSpecialValueTranslator- Parameters:
paramItem- 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 ImpExExceptionDescription copied from interface:SpecialValueTranslatorCalled each time a non-empty cell value has to be imported.- Specified by:
performImportin interfaceSpecialValueTranslator- Overrides:
performImportin classAbstractSpecialValueTranslator- 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 paramString)
Description copied from class:AbstractSpecialValueTranslatorTreatsnulland '' as empty cells.- Specified by:
isEmptyin interfaceSpecialValueTranslator- Overrides:
isEmptyin classAbstractSpecialValueTranslator- Parameters:
paramString- the cell value string- Returns:
trueif the cell value is empty- See Also:
SpecialValueTranslator.isEmpty(java.lang.String)
-
setInboundHelper
protected void setInboundHelper(DataHubInboundOrderHelper service)
-
getInboundHelper
protected DataHubInboundOrderHelper getInboundHelper()
-
-