Class CustomerPersistenceHandler

  • All Implemented Interfaces:
    com.broadleafcommerce.common.messaging.PersistenceHandler

    public class CustomerPersistenceHandler
    extends AuthDataUpdatePersistenceHandler
    • Method Detail

      • hook

        @StreamListener("persistenceInputAuthCustomer")
        public void hook​(String entityJson)
      • processStateChange

        public void processStateChange​(com.fasterxml.jackson.databind.JsonNode entityJson)
      • updateOrCreateUser

        protected void updateOrCreateUser​(Customer customer,
                                          com.fasterxml.jackson.databind.JsonNode entityJson)
      • createNewUser

        protected void createNewUser​(Customer customer)
      • notifyNewCustomerUserCreated

        protected void notifyNewCustomerUserCreated​(User user,
                                                    Customer customer)
      • updateExistingUser

        protected void updateExistingUser​(Customer customer,
                                          Instant timestamp)
      • updateUserFields

        protected boolean updateUserFields​(Customer customer,
                                           User user)
        Updates user fields that auth is concerned with.
        Parameters:
        customer - The customer from
        user - The user to set fields on.
        Returns:
        true if a value was updated, else false.
      • parseCustomer

        protected Customer parseCustomer​(com.fasterxml.jackson.databind.JsonNode entityJson)
      • readAuthServerId

        protected String readAuthServerId​(String applicationId)
      • getChangeTimestamp

        protected Instant getChangeTimestamp​(com.fasterxml.jackson.databind.JsonNode persistenceMessage)
      • handleUserLockoutIfNecessary

        @NotNull
        protected @NotNull User handleUserLockoutIfNecessary​(Customer customer,
                                                             User user)
      • getSupportedSimpleTypeNames

        public String[] getSupportedSimpleTypeNames()