Class MarketplaceClassificationAttributeTranslator
java.lang.Object
de.hybris.platform.impex.jalo.translators.AbstractSpecialValueTranslator
de.hybris.platform.catalog.jalo.classification.impex.ClassificationAttributeTranslator
de.hybris.platform.marketplaceservices.dataimport.batch.translator.MarketplaceClassificationAttributeTranslator
- All Implemented Interfaces:
NotifiedSpecialValueTranslator,SpecialValueTranslator
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.catalog.jalo.classification.impex.ClassificationAttributeTranslator
ClassificationAttributeTranslator.Modifiers -
Field Summary
Fields inherited from class de.hybris.platform.catalog.jalo.classification.impex.ClassificationAttributeTranslator
allDoneFor, attributeSeparator, classAttr, classAttrAssignment, className, classSystemVersion, collectionDelimiter, currentCellValue, dateFormatString, IMPEX_NONEXISTEND_CLSATTRVALUE_FALLBACK_KEY, lang, locale, numberFormatString, qualfier, systemName, TO_ESCAPE, versionName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbasicInit(SpecialColumnDescriptor columnDescriptor) collectAssignmentsFromTranslators(Product product) protected voidextractAndStoreValue(ValueLine line, Product product, FeatureContainer cont, ClassAttributeAssignment assignment) protected voidextractAndStoreValues(ValueLine line, Product product, Map<ClassificationAttributeTranslator, ClassAttributeAssignment> assignmentsFromTranslators) protected voidi18nInit(SpecialColumnDescriptor columnDescriptor) protected voidimportFeatures(ValueLine line, Product product) voidinit(SpecialColumnDescriptor columnDescriptor) Called once upon header creation to do some initial setup logic.protected voidmarkTranslatorsAsDone(Product product) protected ClassAttributeAssignmentmatchAssignment(Collection<ClassificationClass> classes) voidnotifyTranslationEnd(ValueLine line, HeaderDescriptor header, Item processedItem) Is called if allSpecialValueTranslators used in header have been triggered.voidperformImport(String cellValue, Item processedItem) Called each time a non-empty cell value has to be imported.voidsetColumnDescriptor(SpecialColumnDescriptor columnDescriptor) protected voidsetUpClassAttr(String cellValue) protected voidsetUpClassAttrAssignment(String cellValue) translateCurrentUnitAwareValues(ValueLine line, ClassAttributeAssignment assignment, Product processedItem) protected voidtranslateEachValues(String singleStr, Collection<UnitAwareValue> values, AbstractValueTranslator trans, Product processedItem, ValueLine line) Methods inherited from class de.hybris.platform.catalog.jalo.classification.impex.ClassificationAttributeTranslator
getAssignment, getFallbackValueTranslator, getFeature, getSingleCellValueTranslator, getValueCtx, performExport, splitValues, translateCurrentValuesMethods inherited from class de.hybris.platform.impex.jalo.translators.AbstractSpecialValueTranslator
isEmpty, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.impex.jalo.translators.SpecialValueTranslator
isEmpty, validate
-
Constructor Details
-
MarketplaceClassificationAttributeTranslator
public MarketplaceClassificationAttributeTranslator()
-
-
Method Details
-
init
Description copied from interface:SpecialValueTranslatorCalled once upon header creation to do some initial setup logic.- Specified by:
initin interfaceSpecialValueTranslator- Overrides:
initin classClassificationAttributeTranslator- Parameters:
columnDescriptor- the newly created column descriptor- Throws:
HeaderValidationException- indicates that the column descriptor is not configured properly
-
performImport
Description copied from interface:SpecialValueTranslatorCalled each time a non-empty cell value has to be imported.- Specified by:
performImportin interfaceSpecialValueTranslator- Overrides:
performImportin classClassificationAttributeTranslator- Parameters:
cellValue- the cell value stringprocessedItem- the item to import the value for- Throws:
ImpExException- indicates an import error
-
notifyTranslationEnd
public void notifyTranslationEnd(ValueLine line, HeaderDescriptor header, Item processedItem) throws ImpExException Description copied from interface:NotifiedSpecialValueTranslatorIs called if allSpecialValueTranslators used in header have been triggered. Implement here special logic which has to be executed after end of overall translation.- Specified by:
notifyTranslationEndin interfaceNotifiedSpecialValueTranslator- Overrides:
notifyTranslationEndin classClassificationAttributeTranslator- Parameters:
line- current value lineheader- current headerprocessedItem- item which was created or updated- Throws:
ImpExException- an ImpEx specific problem has occur
-
translateCurrentUnitAwareValues
public Collection<UnitAwareValue> translateCurrentUnitAwareValues(ValueLine line, ClassAttributeAssignment assignment, Product processedItem) throws HeaderValidationException - Overrides:
translateCurrentUnitAwareValuesin classClassificationAttributeTranslator- Throws:
HeaderValidationException
-
translateEachValues
protected void translateEachValues(String singleStr, Collection<UnitAwareValue> values, AbstractValueTranslator trans, Product processedItem, ValueLine line) -
matchAssignment
- Overrides:
matchAssignmentin classClassificationAttributeTranslator
-
basicInit
-
i18nInit
- Throws:
HeaderValidationException
-
setUpClassAttrAssignment
- Throws:
HeaderValidationException
-
setUpClassAttr
- Throws:
HeaderValidationException
-
importFeatures
- Throws:
ImpExException
-
collectAssignmentsFromTranslators
protected Map<ClassificationAttributeTranslator,ClassAttributeAssignment> collectAssignmentsFromTranslators(Product product) -
extractAndStoreValues
protected void extractAndStoreValues(ValueLine line, Product product, Map<ClassificationAttributeTranslator, ClassAttributeAssignment> assignmentsFromTranslators) throws ImpExException- Throws:
ImpExException
-
markTranslatorsAsDone
-
extractAndStoreValue
protected void extractAndStoreValue(ValueLine line, Product product, FeatureContainer cont, ClassAttributeAssignment assignment) throws HeaderValidationException - Throws:
HeaderValidationException
-
getColumnDescriptor
-
setColumnDescriptor
-