T - class which is supported by given translatorpublic interface ExcelValueTranslator<T>
AbstractExcelValueTranslator| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(AttributeDescriptorModel attributeDescriptorModel)
Indicates whether the translator can handle given attribute descriptor.
|
default java.util.Optional<java.lang.Object> |
exportData(AttributeDescriptorModel attributeDescriptorModel,
T objectToExport)
Converts given object to value which should be put into cell of exported excel file.
|
java.util.Optional<java.lang.Object> |
exportData(T objectToExport)
Converts given object to value which should be put into cell of exported excel file.
|
Impex |
importData(AttributeDescriptorModel attributeDescriptor,
ImportParameters importParameters)
Imports data based on provided importParameters for given attributeDescriptor.
|
default java.lang.String |
referenceFormat(AttributeDescriptorModel attributeDescriptor)
Format how a reference should be presented.
|
ExcelValidationResult |
validate(ImportParameters importParameters,
AttributeDescriptorModel attributeDescriptor,
java.util.Map<java.lang.String,java.lang.Object> context)
Validates single cell based on parsed importParameters.
|
boolean canHandle(AttributeDescriptorModel attributeDescriptorModel)
attributeDescriptorModel - AttributeDescriptorModeljava.util.Optional<java.lang.Object> exportData(T objectToExport)
objectToExport - default java.util.Optional<java.lang.Object> exportData(AttributeDescriptorModel attributeDescriptorModel, T objectToExport)
attributeDescriptorModel - AttributeDescriptorModelobjectToExport - Impex importData(AttributeDescriptorModel attributeDescriptor, ImportParameters importParameters)
Impex
thanks to that it is possible to creating additional entries ( or example creating part-of entries: product -
price row, ect.)attributeDescriptor - describes attribute which should be importedimportParameters - contains information about language for localized field, type code, parsed parameters inserted into
excel's cell.Impex object which is representation of impex script.default java.lang.String referenceFormat(AttributeDescriptorModel attributeDescriptor)
attributeDescriptor - AttributeDescriptorModelExcelValidationResult validate(ImportParameters importParameters, AttributeDescriptorModel attributeDescriptor, java.util.Map<java.lang.String,java.lang.Object> context)
ImportParameters.parameters. Otherwise the value of cell can be obtained by
ImportParameters.cellValue.importParameters - - contains information about parsed cell value (for reference format)
ImportParameters.parameters and original cell value ImportParameters.cellValueattributeDescriptor - - contains information about selected attribute for current cellcontext - - shared context which can be used as a cacheCopyright © 2018 SAP SE. All Rights Reserved.