Class AbstractRawItemBuilder<T extends de.hybris.platform.servicelayer.model.AbstractItemModel>

java.lang.Object
de.hybris.platform.sap.orderexchange.outbound.impl.AbstractRawItemBuilder<T>
Type Parameters:
T - The item model for which the raw item shall be assembled
All Implemented Interfaces:
RawItemBuilder<T>
Direct Known Subclasses:
DefaultOrderCancelRequestBuilder, DefaultRawHybrisOrderBuilder

public abstract class AbstractRawItemBuilder<T extends de.hybris.platform.servicelayer.model.AbstractItemModel> extends Object implements RawItemBuilder<T>
Default raw item builder delegating the creation of the individual lines of the raw item to the registered instances of RawItemContributor. The results are merged into one list. Fields not provided by all contributors are defaulted to ""
  • Constructor Details

    • AbstractRawItemBuilder

      public AbstractRawItemBuilder()
  • Method Details

    • getContributors

      public List<RawItemContributor<T>> getContributors()
      Specified by:
      getContributors in interface RawItemBuilder<T extends de.hybris.platform.servicelayer.model.AbstractItemModel>
      Returns:
      Contributors to the CSV creation
    • getColumns

      public Set<String> getColumns()
      Specified by:
      getColumns in interface RawItemBuilder<T extends de.hybris.platform.servicelayer.model.AbstractItemModel>
      Returns:
      the union of all column names used the the registered contributors
    • setContributors

      public void setContributors(List<RawItemContributor<T>> contributors)
      Description copied from interface: RawItemBuilder
      Inject the list of contributors to the CSV string to be built. To be called before method @see RawItemBuilder.rowsAsNameValuePairs(AbstractItemModel) is called
      Specified by:
      setContributors in interface RawItemBuilder<T extends de.hybris.platform.servicelayer.model.AbstractItemModel>
    • rowsAsNameValuePairs

      public List<Map<String,Object>> rowsAsNameValuePairs(T model)
      Specified by:
      rowsAsNameValuePairs in interface RawItemBuilder<T extends de.hybris.platform.servicelayer.model.AbstractItemModel>
      Parameters:
      model - item model for which the raw item shall be assembled
      Returns:
      Columns of the CSV according to the registered contributors
    • addContributor

      public void addContributor(RawItemContributor<T> c)
      Specified by:
      addContributor in interface RawItemBuilder<T extends de.hybris.platform.servicelayer.model.AbstractItemModel>
      Parameters:
      c - contributor to add
    • isDebug

      protected boolean isDebug()
    • getLogger

      protected abstract org.apache.log4j.Logger getLogger()