Class AugmentationModifiedHandler
java.lang.Object
com.broadleafcommerce.catalog.messaging.AugmentationModifiedHandler
Listen for augmentation changes from the metadata service. Specifically responsible for tracking
fields marked as `showInQueryBuilder`.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAugmentationModifiedHandler
(CartFieldMappingService<CartFieldMapping> service, com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
com.broadleafcommerce.common.extension.TypeFactory
void
protected void
processMessage
(@NonNull org.springframework.messaging.Message<String> message)
-
Field Details
-
JSON_PAYLOAD
- See Also:
-
AUGMENTATION_CONTAINER_KEY
- See Also:
-
AUGMENTATION_CHANGE_TYPE
- See Also:
-
-
Constructor Details
-
AugmentationModifiedHandler
public AugmentationModifiedHandler(CartFieldMappingService<CartFieldMapping> service, com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
listen
@StreamListener("augmentationModifiedInputCatalog") public void listen(org.springframework.messaging.Message<String> message) -
processMessage
protected void processMessage(@NonNull @NonNull org.springframework.messaging.Message<String> message) -
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) -
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()
-