Class DefaultSegmentProcessingService

java.lang.Object
com.broadleafcommerce.customer.service.bulk.DefaultSegmentProcessingService
All Implemented Interfaces:
SegmentProcessingService

public class DefaultSegmentProcessingService extends Object implements SegmentProcessingService
  • Constructor Details

  • Method Details

    • processRuleBasedSegment

      @NonNull public SegmentProcessHistory processRuleBasedSegment(@NonNull String segmentId, @NonNull @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: SegmentProcessingService
      Initiates a bulk process operation on a customer rule based customer segment
      Specified by:
      processRuleBasedSegment in interface SegmentProcessingService
      Parameters:
      segmentId - The ID of the segment to process
      contextInfo - context information surrounding sandboxing and multitenant state
      Returns:
      The created SegmentProcessHistory
      See Also:
    • buildBulkUpdateRequest

      protected com.broadleafcommerce.bulk.domain.BulkUpdateRequest buildBulkUpdateRequest(@NonNull @NonNull @NonNull CustomerSegment segment, @NonNull String bulkUpdateType, @NonNull @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context) throws com.fasterxml.jackson.core.JsonProcessingException
      Builds a request to perform a bulk update operation
      Parameters:
      segment - The segment to process
      bulkUpdateType - The bulk update type
      context - The context
      Returns:
      A BulkUpdateRequest instance
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
      See Also:
    • throwIfNull

      protected String throwIfNull(String property, String propertyName)
    • createSegmentBulkUpdateRelationship

      protected SegmentProcessHistory createSegmentBulkUpdateRelationship(CustomerSegment segment, com.broadleafcommerce.bulk.domain.BulkUpdate bulkUpdate, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Creates the relationship between the bulk update process and the customer segment
      Parameters:
      segment - The customer segment being processed
      bulkUpdate - The bulk update
      context - context information surrounding sandboxing and multitenant state
      Returns:
      The SegmentProcessHistory connecting the bulk update to the segment
    • getBulkUpdateManager

      protected com.broadleafcommerce.bulk.service.BulkUpdateManager getBulkUpdateManager()
    • getCustomerSegmentService

      protected CustomerSegmentService<? extends CustomerSegment> getCustomerSegmentService()
    • getCustomerService

      protected CustomerService<? extends Customer> getCustomerService()
    • getSegmentProcessHistoryService

      protected SegmentProcessHistoryService<SegmentProcessHistory> getSegmentProcessHistoryService()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • getObjectMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()