public class ExcelAttributeTranslatorRegistry
extends java.lang.Object
| Constructor and Description |
|---|
ExcelAttributeTranslatorRegistry() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(ExcelAttribute excelAttribute)
Indicates whether there is at least one translator which can handle given attribute descriptor.
|
java.util.Optional<ExcelAttributeTranslator<ExcelAttribute>> |
findTranslator(ExcelAttribute excelAttribute)
Finds translator which can handle given excel attribute.
|
java.util.Optional<ExcelAttributeTranslator<ExcelAttribute>> |
findTranslator(ExcelAttribute excelAttribute,
java.lang.Class<? extends ExcelAttributeTranslator>... exclude)
Finds translator which can handle given excel attribute.
|
protected java.lang.Class<? extends ExcelAttributeTranslator> |
getTranslatorClass(ExcelAttributeTranslator<ExcelAttribute> translator) |
java.util.List<ExcelAttributeTranslator<ExcelAttribute>> |
getTranslators()
Returns list of registered attribute translators.
|
void |
init()
Post construct method which sorts translators by its order.
|
void |
setTranslators(java.util.List<ExcelAttributeTranslator<ExcelAttribute>> translators)
Sets list of attribute translators for the registry.
|
public java.util.Optional<ExcelAttributeTranslator<ExcelAttribute>> findTranslator(ExcelAttribute excelAttribute)
excelAttribute - which represents selected excel attribute.ExcelAttributeTranslator. If none translator can handle given attribute descriptor
then Optional.empty() will be returned.public java.util.Optional<ExcelAttributeTranslator<ExcelAttribute>> findTranslator(ExcelAttribute excelAttribute, java.lang.Class<? extends ExcelAttributeTranslator>... exclude)
excelAttribute - which represents selected excel attribute.exclude - translators classes which should not be taken into accountExcelAttributeTranslator. If none translator can handle given
attribute descriptor then Optional.empty() will be returned.protected java.lang.Class<? extends ExcelAttributeTranslator> getTranslatorClass(ExcelAttributeTranslator<ExcelAttribute> translator)
@PostConstruct public void init()
public boolean canHandle(ExcelAttribute excelAttribute)
excelAttribute - which represents selected attribute.public java.util.List<ExcelAttributeTranslator<ExcelAttribute>> getTranslators()
public void setTranslators(java.util.List<ExcelAttributeTranslator<ExcelAttribute>> translators)
translators - for the registry.Copyright © 2018 SAP SE. All Rights Reserved.