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 Details

  • Constructor Details

    • EClassSuperCategoryDecorator

      public EClassSuperCategoryDecorator()
  • Method Details

    • init

      public void init(AbstractColumnDescriptor column) throws HeaderValidationException
      Description copied from class: AbstractImpExCSVCellDecorator
      Sets the related column descriptor as member.
      Overrides:
      init in class AbstractImpExCSVCellDecorator
      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 String decorate(int position, Map srcLine)
      Description copied from interface: CSVCellDecorator
      Decorates and returns the parsed attribute value. The value can be gathered from given srcLine map by accessing element with given position key.
      Parameters:
      position - element key for given map where the parsed value to decorate is located
      srcLine - map containing whole parsed value line
      Returns:
      decorated attribute value