Class AbstractInventoryAdjustmentListener

java.lang.Object
com.broadleafcommerce.inventory.service.messaging.AbstractInventoryAdjustmentListener
Direct Known Subclasses:
AbstractFulfillmentStatusChangeInventoryAdjustmentListener, OrderSubmittedInventoryAdjustmentMessageListener, ReturnConfirmedInventoryAdjustmentListener

public abstract class AbstractInventoryAdjustmentListener extends Object
  • Field Details

  • Constructor Details

    • AbstractInventoryAdjustmentListener

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

    • 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()
    • getSkuInventoryService

      protected SkuInventoryService<SkuInventory> getSkuInventoryService()