Class AugmentationModifiedHandler

java.lang.Object
com.broadleafcommerce.auth.user.messaging.AugmentationModifiedHandler

public class AugmentationModifiedHandler extends Object
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 Details

    • AUGMENTATION_PREFIX

      public static final String 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

      protected static final String JSON_PAYLOAD
      See Also:
    • TARGET_KEY

      protected static final String TARGET_KEY
      See Also:
    • AUGMENTATION_CONTAINER_KEY

      protected static final String AUGMENTATION_CONTAINER_KEY
      See Also:
    • AUGMENTATION_CHANGE_TYPE

      protected static final String 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

      protected com.jayway.jsonpath.DocumentContext getDocumentContext(@NonNull @NonNull String payload)
      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

      protected String[] 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

      protected AugmentationProperties getAugmentationProperties()