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 implementsExcelValueTranslatorand 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 intorder-
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 intgetOrder()TypeServicegetTypeService()ImpeximportData(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, java.lang.String typeCode)voidsetOrder(int order)voidsetTypeService(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 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, java.lang.String typeCode)
-
getOrder
public int getOrder()
-
setOrder
public void setOrder(int order)
-
getTypeService
public TypeService getTypeService()
-
setTypeService
public void setTypeService(TypeService typeService)
-
-