public class PullMediaDataTranslator extends java.lang.Object implements SpecialValueTranslator
INSERT_UPDATE Media; @doesntMatter[translator=de.hybris.y2ysync.impexmc.PullMediaDataTranslator, baseURL='http://public.host.url'];
Import: When importing it's simply pulling the data from the previously exported URL and calls
Media.setDataFromStream(InputStream).| Constructor and Description |
|---|
PullMediaDataTranslator() |
| Modifier and Type | Method and 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.
|
protected boolean |
isExport(SpecialColumnDescriptor cd) |
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.
|
public void init(SpecialColumnDescriptor columnDescriptor) throws HeaderValidationException
SpecialValueTranslatorinit in interface SpecialValueTranslatorcolumnDescriptor - the newly created column descriptorHeaderValidationException - indicates that the column descriptor is not configured properlyprotected boolean isExport(SpecialColumnDescriptor cd)
public void validate(java.lang.String expr)
throws HeaderValidationException
SpecialValueTranslatorvalidate in interface SpecialValueTranslatorexpr - the definition expressionHeaderValidationException - if the expression is not validpublic java.lang.String performExport(Item item) throws ImpExException
SpecialValueTranslatorperformExport in interface SpecialValueTranslatoritem - the item to exportImpExException - indicates an export errorpublic void performImport(java.lang.String cellValue,
Item processedItem)
throws ImpExException
SpecialValueTranslatorperformImport in interface SpecialValueTranslatorcellValue - the cell value stringprocessedItem - the item to import the value forImpExException - indicates an import errorpublic boolean isEmpty(java.lang.String cellValue)
SpecialValueTranslator
Empty cell values are not passed to SpecialValueTranslator.performImport(String, Item).
isEmpty in interface SpecialValueTranslatorcellValue - the cell value stringtrue if the cell value is emptyCopyright © 2018 SAP SE. All Rights Reserved.