Class EClassSuperCategoryDecorator
- java.lang.Object
-
- de.hybris.platform.impex.jalo.header.AbstractImpExCSVCellDecorator
-
- de.hybris.platform.catalog.jalo.classification.eclass.EClassSuperCategoryDecorator
-
- All Implemented Interfaces:
CSVCellDecorator
public class EClassSuperCategoryDecorator extends AbstractImpExCSVCellDecorator
Assembles the code of the super classification class of a given eclass classification class by inspecting its eclass number cell.The algorithm works as follows:
- top level numbers like
xx000000-> no super class code is needed - level 1 numbers like
xxyy0000-> super class number is xx000000 - level 2 numbers like
xxyyzz00-> super class number is xxyy0000 - leaf numbers like
xxyyzzqq-> super class number is xxyyzz00
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSRC_CELL
-
Constructor Summary
Constructors Constructor Description EClassSuperCategoryDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdecorate(int position, java.util.Map srcLine)Decorates and returns the parsed attribute value.voidinit(AbstractColumnDescriptor column)Sets the related column descriptor as member.-
Methods inherited from class de.hybris.platform.impex.jalo.header.AbstractImpExCSVCellDecorator
getColumnDescriptor
-
-
-
-
Field Detail
-
SRC_CELL
public static final java.lang.String SRC_CELL
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(AbstractColumnDescriptor column) throws HeaderValidationException
Description copied from class:AbstractImpExCSVCellDecoratorSets the related column descriptor as member.- Overrides:
initin classAbstractImpExCSVCellDecorator- Parameters:
column- column descriptor this decorator will be applied to- Throws:
HeaderValidationException- can be thrown at custom implementations in case of validation error (for example there has to be set a specific modifier at the descriptor)
-
decorate
public java.lang.String decorate(int position, java.util.Map srcLine)Description copied from interface:CSVCellDecoratorDecorates and returns the parsed attribute value. The value can be gathered from givensrcLinemap by accessing element with givenpositionkey.- Parameters:
position- element key for given map where the parsed value to decorate is locatedsrcLine- map containing whole parsed value line- Returns:
- decorated attribute value
-
-