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
public abstract class AbstractExcelValueTranslator<T> extends AbstractValidationAwareTranslator<T>
Abstract class which implementsExcelValueTranslator
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
Fields Modifier and Type Field Description protected int
order
-
Fields inherited from class com.hybris.backoffice.excel.translators.AbstractValidationAwareTranslator
validators
-
-
Constructor Summary
Constructors Constructor Description AbstractExcelValueTranslator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getOrder()
TypeService
getTypeService()
Impex
importData(AttributeDescriptorModel attributeDescriptor, ImportParameters importParameters)
Imports data based on provided importParameters for given attributeDescriptor.abstract ImpexValue
importValue(AttributeDescriptorModel attributeDescriptor, ImportParameters importParameters)
Imports single value instead of whole Impex object.protected boolean
isLocalizedOfType(AttributeDescriptorModel attributeDescriptorModel, java.lang.String typeCode)
void
setOrder(int order)
void
setTypeService(TypeService typeService)
-
Methods inherited from class com.hybris.backoffice.excel.translators.AbstractValidationAwareTranslator
getValidators, setValidators, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hybris.backoffice.excel.translators.ExcelValueTranslator
canHandle, exportData, exportData, referenceFormat
-
-
-
-
Method Detail
-
importData
public Impex importData(AttributeDescriptorModel attributeDescriptor, ImportParameters importParameters)
Imports data based on provided importParameters for given attributeDescriptor. The method returnsImpex
thanks 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:
Impex
object 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
-AttributeDescriptorModel
describes attribute which should be importedimportParameters
- - contains information about language for localized field, type code, parsed parameters inserted into excel's cell.- Returns:
ImpexValue
value which should be imported
-
isLocalizedOfType
protected boolean isLocalizedOfType(AttributeDescriptorModel attributeDescriptorModel, java.lang.String typeCode)
-
getOrder
public int getOrder()
-
setOrder
public void setOrder(int order)
-
getTypeService
public TypeService getTypeService()
-
setTypeService
public void setTypeService(TypeService typeService)
-
-