Class OfferCodeExportProcessor

java.lang.Object
com.broadleafcommerce.promotion.offer.dataexport.OfferCodeExportProcessor
All Implemented Interfaces:
com.broadleafcommerce.common.dataexport.service.ExportProcessor<OfferCode>

public class OfferCodeExportProcessor extends Object implements com.broadleafcommerce.common.dataexport.service.ExportProcessor<OfferCode>
An ExportProcessor for exports of OfferCode.
Author:
Dima Myroniuk (dmyroniuk)
  • Constructor Details

    • OfferCodeExportProcessor

      public OfferCodeExportProcessor(@NonNull OfferCodeService<OfferCode> offerCodeService, @NonNull com.broadleafcommerce.common.extension.TypeFactory typeFactory, @NonNull com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> filterParser, @NonNull OfferCodeRowConverter rowConverter)
  • Method Details

    • canHandle

      public boolean canHandle(com.broadleafcommerce.common.dataexport.domain.Export export)
      Specified by:
      canHandle in interface com.broadleafcommerce.common.dataexport.service.ExportProcessor<OfferCode>
    • getHeaders

      public LinkedHashSet<String> getHeaders()
      Specified by:
      getHeaders in interface com.broadleafcommerce.common.dataexport.service.ExportProcessor<OfferCode>
    • readRecordsToProcess

      public com.broadleafcommerce.common.dataexport.service.ReadRecordsResponse<OfferCode> readRecordsToProcess(com.broadleafcommerce.common.dataexport.domain.Export export)
      Specified by:
      readRecordsToProcess in interface com.broadleafcommerce.common.dataexport.service.ExportProcessor<OfferCode>
    • generateRows

      public com.broadleafcommerce.common.dataexport.service.RowGenerationResponse generateRows(List<OfferCode> batchToProcess, com.broadleafcommerce.common.dataexport.domain.Export export)
      Specified by:
      generateRows in interface com.broadleafcommerce.common.dataexport.service.ExportProcessor<OfferCode>
    • readOfferCodesByExportTarget

      protected Stream<OfferCode> readOfferCodesByExportTarget(@NonNull @NonNull com.broadleafcommerce.common.dataexport.domain.Export export)
      Reads OfferCodes based on the Export.getTarget().
      Parameters:
      export - the Export to use to read the OfferCodes
      Returns:
      a stream of OfferCodes based on the Export.getTarget()
    • buildQueryContextInfo

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildQueryContextInfo(com.broadleafcommerce.common.dataexport.domain.Export export)
    • buildContextRequestFromExport

      protected com.broadleafcommerce.data.tracking.core.context.ContextRequest buildContextRequestFromExport(com.broadleafcommerce.common.dataexport.domain.Export export)
    • getOfferCodeService

      @NonNull protected OfferCodeService<OfferCode> getOfferCodeService()
    • getTypeFactory

      @NonNull protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • getFilterParser

      @NonNull protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> getFilterParser()
    • getRowConverter

      @NonNull protected OfferCodeRowConverter getRowConverter()