Class AbstractExcelValueTranslator<T>
java.lang.Object
com.hybris.backoffice.excel.translators.AbstractValidationAwareTranslator<T>
com.hybris.backoffice.excel.translators.AbstractExcelValueTranslator<T>
- Type Parameters:
T- class which is supported by given translator
- All Implemented Interfaces:
ExcelValueTranslator<T>,org.springframework.core.Ordered
- Direct Known Subclasses:
AbstractCatalogVersionAwareTranslator,ExcelEnumTypeTranslator,ExcelEurope1PricesTypeTranslator,ExcelJavaTypeTranslator
Abstract class which implements
ExcelValueTranslator and simplifies importData method. This class should be
used when during importing process a translator will be returned just single value and creation of additional entries
(for example creating part-of entries: product - price row, ect.) is not required.-
Field Summary
FieldsFields inherited from class com.hybris.backoffice.excel.translators.AbstractValidationAwareTranslator
validatorsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()importData(AttributeDescriptorModel attributeDescriptor, ImportParameters importParameters) Imports data based on provided importParameters for given attributeDescriptor.abstract ImpexValueimportValue(AttributeDescriptorModel attributeDescriptor, ImportParameters importParameters) Imports single value instead of whole Impex object.protected booleanisLocalizedOfType(AttributeDescriptorModel attributeDescriptorModel, String typeCode) voidsetOrder(int order) voidsetTypeService(TypeService typeService) Methods inherited from class com.hybris.backoffice.excel.translators.AbstractValidationAwareTranslator
getValidators, setValidators, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hybris.backoffice.excel.translators.ExcelValueTranslator
canHandle, canHandle, exportData, exportData, referenceFormat
-
Field Details
-
order
protected int order
-
-
Constructor Details
-
AbstractExcelValueTranslator
public AbstractExcelValueTranslator()
-
-
Method Details
-
importData
public Impex importData(AttributeDescriptorModel attributeDescriptor, ImportParameters importParameters) Imports data based on provided importParameters for given attributeDescriptor. The method returnsImpexthanks to that it is possible to creating additional entries ( or example creating part-of entries: product - price row, ect.)- Parameters:
attributeDescriptor- describes attribute which should be importedimportParameters- contains information about language for localized field, type code, parsed parameters inserted into excel's cell.- Returns:
Impexobject which is representation of impex script.
-
importValue
public abstract ImpexValue importValue(AttributeDescriptorModel attributeDescriptor, ImportParameters importParameters) Imports single value instead of whole Impex object. Impex value consists of header and value.- Parameters:
attributeDescriptor-AttributeDescriptorModeldescribes attribute which should be importedimportParameters- - contains information about language for localized field, type code, parsed parameters inserted into excel's cell.- Returns:
ImpexValuevalue which should be imported
-
isLocalizedOfType
protected boolean isLocalizedOfType(AttributeDescriptorModel attributeDescriptorModel, String typeCode) -
getOrder
public int getOrder() -
setOrder
public void setOrder(int order) -
getTypeService
-
setTypeService
-