Class UserUpdateListenerCustomer

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

@DataRouteByKey("customer") public class UserUpdateListenerCustomer extends Object
  • Constructor Details

    • UserUpdateListenerCustomer

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

    • listen

      @StreamListener("userUpdateCustomerInput") public void listen(org.springframework.messaging.Message<User> userMessage)
    • processMessage

      protected void processMessage(org.springframework.messaging.Message<User> userMessage)
    • updateAccountRoles

      protected void updateAccountRoles(User user, Customer customer, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Read AccountRoles from the User and save the role ids to the appropriate AccountMember.
      Parameters:
      user - The User that was persisted.
      customer - The Customer associated with the given User.
      contextInfo - The context of the database operation.
    • buildContextInfo

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContextInfo(User user)
    • getIdempotentConsumptionService

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

      protected AccountMemberService<AccountMember> getAccountMemberService()
    • getCustomerService

      protected CustomerService<Customer> getCustomerService()