Class AbstractInventoryAdjustmentListener

    • Constructor Detail

      • AbstractInventoryAdjustmentListener

        public AbstractInventoryAdjustmentListener​(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService,
                                                   com.broadleafcommerce.common.extension.TypeFactory typeFactory,
                                                   SkuInventoryService<SkuInventory> skuInventoryService)
    • Method Detail

      • 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
      • getSkuReferenceFieldType

        protected String getSkuReferenceFieldType​(@Nullable
                                                  com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      • buildContextInfo

        protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContextInfo​(com.jayway.jsonpath.DocumentContext jsonContext)
        Builds a ContextInfo for the application context id and tenant id in the JSON payload.
        Parameters:
        jsonContext - the JSON payload
        Returns:
        a ContextInfo with the context info from the JSON object
      • buildContextInfo

        protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContextInfo​(@NonNull
                                                                                                @NonNull String tenantId,
                                                                                                @NonNull
                                                                                                @NonNull String applicationId)
        Builds a ContextInfo for the application context id and tenant id
        Parameters:
        tenantId - the tenant id of the context
        applicationId - the application id of the context
        Returns:
        a ContextInfo with the given context info
      • getIdempotentConsumptionService

        protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService getIdempotentConsumptionService()
      • getTypeFactory

        protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()