Class ProductExportProcessor

java.lang.Object
com.broadleafcommerce.catalog.dataexport.ProductExportProcessor
All Implemented Interfaces:
com.broadleafcommerce.common.dataexport.service.ExportProcessor<Product>

public class ProductExportProcessor extends Object implements com.broadleafcommerce.common.dataexport.service.ExportProcessor<Product>
An ExportProcessor for exports of Product.
Author:
Samarth Dhruva (samarthd)
  • Constructor Details

    • ProductExportProcessor

      public ProductExportProcessor(@NonNull ProductService<Product> productService, @NonNull com.broadleafcommerce.common.extension.TypeFactory typeFactory, @NonNull com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> filterParser, @NonNull com.broadleafcommerce.data.tracking.core.web.ContextRequestConverter contextRequestConverter, @NonNull com.fasterxml.jackson.databind.ObjectMapper objectMapper, @NonNull ExportRowProducer<Product> productExportRowProducer)
  • Method Details

    • canHandle

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

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

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

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildQueryContextInfo(com.broadleafcommerce.common.dataexport.domain.Export export) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • buildContextRequestFromExport

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

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

      @NonNull protected ProductService<Product> getProductService()
    • 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()
    • getContextRequestConverter

      @NonNull protected com.broadleafcommerce.data.tracking.core.web.ContextRequestConverter getContextRequestConverter()
    • getObjectMapper

      @NonNull protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
    • getProductExportRowProducer

      @NonNull protected ExportRowProducer<Product> getProductExportRowProducer()