Class AbstractClassificationRangeTranslator
java.lang.Object
com.hybris.backoffice.excel.translators.classification.AbstractClassificationAttributeTranslator
com.hybris.backoffice.excel.translators.classification.AbstractClassificationRangeTranslator
- All Implemented Interfaces:
ExcelAttributeTranslator<ExcelClassificationAttribute>,org.springframework.core.Ordered
- Direct Known Subclasses:
ExcelClassificationJavaTypeTranslator
public abstract class AbstractClassificationRangeTranslator
extends AbstractClassificationAttributeTranslator
-
Field Summary
Fields inherited from class com.hybris.backoffice.excel.translators.classification.AbstractClassificationAttributeTranslator
COMPLEX_TYPE_WITH_UNITS_REFERENCE_FORMAT, SIMPLE_TYPE_WITH_UNITS_REFERENCE_FORMAT, VALUE_WITH_UNITS_FORMATFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexportRange(ExcelClassificationAttribute excelAttribute, Collection<org.apache.commons.lang3.tuple.Pair<FeatureValue, FeatureValue>> featureToExport) protected ImportParametersgetFromImportParameters(ExcelClassificationAttribute excelClassificationAttribute, ImportParameters importParameters, Map<String, String> fromParams) protected StringgetSingle(ExcelClassificationAttribute excelAttribute, FeatureValue featureValue) getStreamOfValuesToJoin(ExcelClassificationAttribute excelAttribute, Feature feature) protected ImportParametersgetToImportParameters(ExcelClassificationAttribute excelClassificationAttribute, ImportParameters importParameters, Map<String, String> toParams) importData(ExcelAttribute excelAttribute, ImportParameters importParameters, ExcelImportContext excelImportContext) Imports data based on provided importParameters for given excel attribute.referenceFormat(ExcelClassificationAttribute excelAttribute) Methods inherited from class com.hybris.backoffice.excel.translators.classification.AbstractClassificationAttributeTranslator
canHandle, canHandleAttribute, canHandleRange, canHandleUnit, exportData, exportSingle, exportWithUnit, getClassificationAttributeHeaderValueCreator, getClassificationService, getClassificationSystemService, getCommonI18NService, getExcelParserSplitter, getFeatureValues, getLocalizedFeatureValues, getPartitionedData, getUnlocalizedFeatureValues, importSingle, importValue, setClassificationAttributeHeaderValueCreator, setClassificationService, setClassificationSystemService, setCommonI18NService, setExcelParserSplitter, singleReferenceFormatMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.Ordered
getOrder
-
Constructor Details
-
AbstractClassificationRangeTranslator
public AbstractClassificationRangeTranslator()
-
-
Method Details
-
getStreamOfValuesToJoin
@Nonnull protected Stream<String> getStreamOfValuesToJoin(@Nonnull ExcelClassificationAttribute excelAttribute, @Nonnull Feature feature) - Overrides:
getStreamOfValuesToJoinin classAbstractClassificationAttributeTranslator
-
exportRange
public Optional<String> exportRange(@Nonnull ExcelClassificationAttribute excelAttribute, @Nonnull Collection<org.apache.commons.lang3.tuple.Pair<FeatureValue, FeatureValue>> featureToExport) -
importData
public Impex importData(ExcelAttribute excelAttribute, ImportParameters importParameters, ExcelImportContext excelImportContext) Description copied from interface:ExcelAttributeTranslatorImports data based on provided importParameters for given excel attribute. The method returnsImpexthanks to that it is possible to creating additional entries ( or example creating part-of entries: product - price row, ect.)- Specified by:
importDatain interfaceExcelAttributeTranslator<ExcelClassificationAttribute>- Overrides:
importDatain classAbstractClassificationAttributeTranslator- Parameters:
excelAttribute- describes attribute which should be importedimportParameters- contains information about language for localized field, type code, parsed parameters inserted into excel's cell.excelImportContext- excel's context- Returns:
Impexobject which is representation of impex script.
-
getFromImportParameters
protected ImportParameters getFromImportParameters(ExcelClassificationAttribute excelClassificationAttribute, ImportParameters importParameters, Map<String, String> fromParams) -
getToImportParameters
protected ImportParameters getToImportParameters(ExcelClassificationAttribute excelClassificationAttribute, ImportParameters importParameters, Map<String, String> toParams) -
referenceFormat
- Specified by:
referenceFormatin interfaceExcelAttributeTranslator<ExcelClassificationAttribute>- Overrides:
referenceFormatin classAbstractClassificationAttributeTranslator
-
getSingle
-