Class SegmentMemberPersistenceHandler
- java.lang.Object
-
- com.broadleafcommerce.auth.user.listener.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 theUser
in their user attributes.
-
-
Constructor Summary
Constructors Constructor Description SegmentMemberPersistenceHandler(UserService<User> userService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Instant
getChangeTimestamp(com.fasterxml.jackson.databind.JsonNode persistenceMessage)
protected Set<String>
getCustomerSegments(User user)
com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
String[]
getSupportedSimpleTypeNames()
protected UserService<User>
getUserService()
void
hook(String entityJson)
boolean
isNodeNull(com.fasterxml.jackson.databind.JsonNode jsonNode)
void
processStateChange(com.fasterxml.jackson.databind.JsonNode entityJson)
-
-
-
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 interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
processStateChange
public void processStateChange(com.fasterxml.jackson.databind.JsonNode entityJson)
- Specified by:
processStateChange
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
hook
@StreamListener("persistenceInputSegmentMember") public void hook(String entityJson)
- Specified by:
hook
in interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
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 interfacecom.broadleafcommerce.common.messaging.PersistenceHandler
-
getUserService
protected UserService<User> getUserService()
-
-