public class MediaDataTranslator extends AbstractSpecialValueTranslator
MediaDataHandler for each thread for import/export the data. So you always have to set such an
handler before using the translator.| Constructor and Description |
|---|
MediaDataTranslator() |
| Modifier and Type | Method and Description |
|---|---|
static MediaDataHandler |
getHandler()
Gets the handler currently mapped to current thread.
|
static boolean |
hasHandler() |
void |
init(SpecialColumnDescriptor columnDescriptor)
Called once upon header creation to do some initial setup logic.
|
String |
performExport(Item processedItem)
Called each time an item is exported using the enclosing header.
|
void |
performImport(String cellValue,
Item processedItem)
Called each time a non-empty cell value has to be imported.
|
static void |
setMediaDataHandler(MediaDataHandler handler)
Sets the
MediaDataHandler for current thread. |
static void |
unsetMediaDataHandler()
Unsets the handler which was mapped to the current thread for import/export.
|
void |
validate(String expr)
Validates the special column definition.
|
isEmptypublic static void setMediaDataHandler(MediaDataHandler handler)
MediaDataHandler for current thread. This handler will be used for import/export if called by
this thread.handler - the handler which will be set for current thread.public static final void unsetMediaDataHandler()
public static final boolean hasHandler()
public static final MediaDataHandler getHandler()
public void init(SpecialColumnDescriptor columnDescriptor) throws HeaderValidationException
SpecialValueTranslatorinit in interface SpecialValueTranslatorinit in class AbstractSpecialValueTranslatorcolumnDescriptor - the newly created column descriptorHeaderValidationException - indicates that the column descriptor is not configured properlypublic void validate(String expr) throws HeaderValidationException
SpecialValueTranslatorvalidate in interface SpecialValueTranslatorvalidate in class AbstractSpecialValueTranslatorexpr - the definition expressionHeaderValidationException - if the expression is not validpublic String performExport(Item processedItem) throws ImpExException
SpecialValueTranslatorperformExport in interface SpecialValueTranslatorperformExport in class AbstractSpecialValueTranslatorprocessedItem - the item to exportImpExException - indicates an export errorpublic void performImport(String cellValue, Item processedItem) throws ImpExException
SpecialValueTranslatorperformImport in interface SpecialValueTranslatorperformImport in class AbstractSpecialValueTranslatorcellValue - the cell value stringprocessedItem - the item to import the value forImpExException - indicates an import errorCopyright © 2017 SAP SE. All Rights Reserved.