Class UserCreationListener

java.lang.Object
com.broadleafcommerce.customer.messaging.UserCreationListener

@DataRouteByKey("customer") public class UserCreationListener extends Object
  • Field Details

  • Constructor Details

    • UserCreationListener

      public UserCreationListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, CustomerService<Customer> customerService)
  • Method Details

    • listen

      @StreamListener("userCreationInput") public void listen(@NonNull @NonNull org.springframework.messaging.Message<UserCreatedEvent> message)
    • processStateChange

      protected void processStateChange(@NonNull @NonNull org.springframework.messaging.Message<UserCreatedEvent> message)
      Based on the contents of the UserCreatedEvent, update the Customer with the provided User data
      Parameters:
      message - the message to be processed
    • updateCustomer

      protected void updateCustomer(User user, Customer customer)
      Updates an existing customer. We're only concerned with Auth's user_id field.
      Parameters:
      user -
      customer -
    • getIdempotentConsumptionService

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

      protected CustomerService<Customer> getCustomerService()