java.lang.Object
com.broadleafcommerce.recommendationengine.service.messaging.CustomerEventListener

@DataRouteByKey("recommendationEngine") public class CustomerEventListener extends Object
  • Constructor Details

    • CustomerEventListener

      public CustomerEventListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentMessageService, CustomerService<Customer> customerService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • listen

      @StreamListener("recommendationEngineCustomerEventInput") public void listen(org.springframework.messaging.Message<CustomerModifiedEvent> message)
    • processEvent

      public void processEvent(@NonNull @NonNull org.springframework.messaging.Message<CustomerModifiedEvent> message)
    • processCustomerModification

      protected void processCustomerModification(@NonNull @NonNull List<Customer> customers, @NonNull @NonNull String operationType, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • processCustomerUpdates

      protected void processCustomerUpdates(@NotNull @NotNull List<Customer> customers, @NotNull @NotNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • logBulkResponseFailures

      protected void logBulkResponseFailures(com.broadleafcommerce.data.tracking.core.service.BulkPersistenceResponse<Customer> bulkResponse, boolean isCreate, @NotNull @NotNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • buildContextInfo

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContextInfo(@NonNull @NonNull CustomerModifiedEvent event, @NonNull @NonNull List<Customer> customers)
      Builds a ContextInfo for the persistence event related to the entity. Uses the one on the event if present.
      Parameters:
      event - The deserialized event.
      Returns:
      A ContextInfo for the persistence event related to the entity.
    • getIdempotentMessageService

      protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentMessageService()
    • getCustomerService

      protected CustomerService<Customer> getCustomerService()
    • getTypeFactory

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