Class AugmentationModifiedHandler
java.lang.Object
com.broadleafcommerce.auth.user.messaging.AugmentationModifiedHandler
Listen for augmentation changes from the metadata service. Specifically responsible for tracking
fields marked as `showInQueryBuilder`. This is important for tracking custom fields added to
Customers that should be used as Access Token claims.
- Since:
- 2.0.2-GA
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAugmentationModifiedHandler
(UserFieldMappingService<UserFieldMapping> service, com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, AugmentationProperties augmentationProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected UserFieldMapping
buildUserFieldMapping
(String targetKey, String prefixedAttributeName, String name, String tenantId) protected AugmentationProperties
protected com.broadleafcommerce.data.tracking.core.context.ContextInfo
getContextInfo
(com.jayway.jsonpath.DocumentContext jsonContext) protected com.jayway.jsonpath.DocumentContext
getDocumentContext
(@NonNull String payload) Parses the message payload into a `DocumentContext` which allows for JsonPath parsing using Jackson providers.protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService
com.fasterxml.jackson.databind.ObjectMapper
protected String[]
com.broadleafcommerce.common.extension.TypeFactory
void
protected void
processMessage
(@NonNull org.springframework.messaging.Message<String> message)
-
Field Details
-
AUGMENTATION_PREFIX
Prefix used to designate the attribute as the result of a custom field that should be targetable by rule builders. This allows them to be automatically detected in other services and used in target objects like `ResolveCustomerSegmentsRequest` for Dynamic Customer Segments.- See Also:
-
JSON_PAYLOAD
- See Also:
-
TARGET_KEY
- See Also:
-
AUGMENTATION_CONTAINER_KEY
- See Also:
-
AUGMENTATION_CHANGE_TYPE
- See Also:
-
-
Constructor Details
-
AugmentationModifiedHandler
public AugmentationModifiedHandler(UserFieldMappingService<UserFieldMapping> service, com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, AugmentationProperties augmentationProperties)
-
-
Method Details
-
listen
@StreamListener("augmentationModifiedInputAuth") public void listen(org.springframework.messaging.Message<String> message) -
processMessage
protected void processMessage(@NonNull @NonNull org.springframework.messaging.Message<String> message) -
buildUserFieldMapping
protected UserFieldMapping buildUserFieldMapping(String targetKey, String prefixedAttributeName, String name, String tenantId) -
getDocumentContext
Parses the message payload into a `DocumentContext` which allows for JsonPath parsing using Jackson providers.- Parameters:
payload
- the message payload- Returns:
- a `DocumentContext` representation of the message payload
-
getContextInfo
protected com.broadleafcommerce.data.tracking.core.context.ContextInfo getContextInfo(com.jayway.jsonpath.DocumentContext jsonContext) -
getSupportedSimpleTypeNames
-
getService
-
getIdempotentConsumptionService
protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentConsumptionService() -
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
getTypeFactory
public com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getAugmentationProperties
-