Class ClassificationAttributeTranslator
java.lang.Object
de.hybris.platform.impex.jalo.translators.AbstractSpecialValueTranslator
de.hybris.platform.catalog.jalo.classification.impex.ClassificationAttributeTranslator
- All Implemented Interfaces:
NotifiedSpecialValueTranslator,SpecialValueTranslator
- Direct Known Subclasses:
MarketplaceClassificationAttributeTranslator
public class ClassificationAttributeTranslator
extends AbstractSpecialValueTranslator
implements NotifiedSpecialValueTranslator
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PKprotected charprotected ClassificationAttributeprotected ClassAttributeAssignmentprotected Stringprotected ClassificationSystemVersionprotected charprotected Stringprotected Stringstatic final Stringprotected Languageprotected Localeprotected Stringprotected Stringprotected Stringprotected char[]protected String -
Constructor Summary
ConstructorsConstructorDescriptionGeneral no-arg constructorClassificationAttributeTranslator(ClassificationSystemVersion sysVer, ClassificationAttribute attr, char delimiter, Language lang) Testing purpose constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassAttributeAssignmentprotected AbstractValueTranslatorprotected TypedFeaturegetFeature(Product product) protected AbstractValueTranslatorgetSingleCellValueTranslator(ClassAttributeAssignment assignment) protected SessionContextgetValueCtx(boolean localized) voidinit(SpecialColumnDescriptor columnDescriptor) Called once upon header creation to do some initial setup logic.protected ClassAttributeAssignmentmatchAssignment(Collection<ClassificationClass> classes) voidnotifyTranslationEnd(ValueLine line, HeaderDescriptor header, Item processedItem) Is called if allSpecialValueTranslators used in header have been triggered.performExport(Item item) Called each time an item is exported using the enclosing header.voidperformImport(String cellValue, Item processedItem) Called each time a non-empty cell value has to be imported.protected ListsplitValues(ClassAttributeAssignment assignment, String valueCollection) translateCurrentUnitAwareValues(ValueLine line, ClassAttributeAssignment assignment, Product processedItem) translateCurrentValues(ValueLine line, ClassAttributeAssignment assignment, Product processedItem) Deprecated.since agesMethods 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
-
Field Details
-
IMPEX_NONEXISTEND_CLSATTRVALUE_FALLBACK_KEY
- See Also:
-
qualfier
-
systemName
-
versionName
-
className
-
lang
-
locale
-
dateFormatString
-
numberFormatString
-
classAttr
-
classAttrAssignment
-
classSystemVersion
-
collectionDelimiter
protected char collectionDelimiter -
attributeSeparator
protected char attributeSeparator -
TO_ESCAPE
protected char[] TO_ESCAPE -
allDoneFor
-
currentCellValue
-
-
Constructor Details
-
ClassificationAttributeTranslator
public ClassificationAttributeTranslator()General no-arg constructor -
ClassificationAttributeTranslator
public ClassificationAttributeTranslator(ClassificationSystemVersion sysVer, ClassificationAttribute attr, char delimiter, Language lang) Testing purpose constructor.
-
-
Method Details
-
init
Description copied from interface:SpecialValueTranslatorCalled once upon header creation to do some initial setup logic.- Specified by:
initin interfaceSpecialValueTranslator- Overrides:
initin classAbstractSpecialValueTranslator- Parameters:
columnDescriptor- the newly created column descriptor- Throws:
HeaderValidationException- indicates that the column descriptor is not configured properly
-
getSingleCellValueTranslator
protected AbstractValueTranslator getSingleCellValueTranslator(ClassAttributeAssignment assignment) throws HeaderValidationException - Throws:
HeaderValidationException
-
getFallbackValueTranslator
-
getAssignment
-
matchAssignment
-
getValueCtx
- Throws:
HeaderValidationException
-
getFeature
-
performExport
Description copied from interface:SpecialValueTranslatorCalled each time an item is exported using the enclosing header.- Specified by:
performExportin interfaceSpecialValueTranslator- Overrides:
performExportin classAbstractSpecialValueTranslator- Parameters:
item- the item to export- Returns:
- the string representation of the value to export
- Throws:
ImpExException- indicates an export error
-
performImport
Description copied from interface:SpecialValueTranslatorCalled each time a non-empty cell value has to be imported.- Specified by:
performImportin interfaceSpecialValueTranslator- Overrides:
performImportin classAbstractSpecialValueTranslator- Parameters:
cellValue- the cell value stringprocessedItem- the item to import the value for- Throws:
ImpExException- indicates an import error
-
translateCurrentValues
@Deprecated(since="ages", forRemoval=false) public Collection<Object> translateCurrentValues(ValueLine line, ClassAttributeAssignment assignment, Product processedItem) throws HeaderValidationException Deprecated.since ages- Throws:
HeaderValidationException
-
translateCurrentUnitAwareValues
public Collection<UnitAwareValue> translateCurrentUnitAwareValues(ValueLine line, ClassAttributeAssignment assignment, Product processedItem) throws HeaderValidationException - Throws:
HeaderValidationException
-
splitValues
-
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- Parameters:
line- current value lineheader- current headerprocessedItem- item which was created or updated- Throws:
ImpExException- an ImpEx specific problem has occur
-