Class SegmentMemberPersistenceHandler

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

    public class SegmentMemberPersistenceHandler
    extends Object
    implements com.broadleafcommerce.common.messaging.PersistenceHandler
    Handles creation and deletes of customer segment/customer relationships. Segments are stored on the User in their user attributes.
    • Constructor Detail

      • SegmentMemberPersistenceHandler

        public SegmentMemberPersistenceHandler​(UserService<User> userService,
                                               com.fasterxml.jackson.databind.ObjectMapper objectMapper)
    • Method Detail

      • getObjectMapper

        public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
        Specified by:
        getObjectMapper in interface com.broadleafcommerce.common.messaging.PersistenceHandler
      • processStateChange

        public void processStateChange​(com.fasterxml.jackson.databind.JsonNode entityJson)
        Specified by:
        processStateChange in interface com.broadleafcommerce.common.messaging.PersistenceHandler
      • hook

        @StreamListener("persistenceInputSegmentMember")
        public void hook​(String entityJson)
        Specified by:
        hook in interface com.broadleafcommerce.common.messaging.PersistenceHandler
      • getCustomerSegments

        protected Set<String> getCustomerSegments​(User user)
      • getChangeTimestamp

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

        public boolean isNodeNull​(com.fasterxml.jackson.databind.JsonNode jsonNode)
      • getSupportedSimpleTypeNames

        public String[] getSupportedSimpleTypeNames()
        Specified by:
        getSupportedSimpleTypeNames in interface com.broadleafcommerce.common.messaging.PersistenceHandler