Interface RawItemBuilder<T extends de.hybris.platform.servicelayer.model.AbstractItemModel>

Type Parameters:
T -
All Known Implementing Classes:
AbstractRawItemBuilder, DefaultOrderCancelRequestBuilder, DefaultRawHybrisOrderBuilder

public interface RawItemBuilder<T extends de.hybris.platform.servicelayer.model.AbstractItemModel>
Converter from a hybris item model to a CSV string. Depends on RawItemContributor instances defining the columns and extracting the values. The CsvBuilder creates the header rows and data rows and takes care for escaping.
  • Method Details

    • setContributors

      void setContributors(List<RawItemContributor<T>> contributors)
      Inject the list of contributors to the CSV string to be built. To be called before method @see rowsAsNameValuePairs(AbstractItemModel) is called
      Parameters:
      contributors -
    • getContributors

      List<RawItemContributor<T>> getContributors()
      Returns:
      Contributors to the CSV creation
    • rowsAsNameValuePairs

      List<Map<String,Object>> rowsAsNameValuePairs(T model)
      Parameters:
      model - item model for which the raw item shall be assembled
      Returns:
      Columns of the CSV according to the registered contributors
    • getColumns

      Set<String> getColumns()
      Returns:
      the union of all column names used the the registered contributors
    • addContributor

      void addContributor(RawItemContributor<T> c)
      Parameters:
      c - contributor to add