Class AbstractInventoryAdjustmentListener
- java.lang.Object
-
- com.broadleafcommerce.inventory.service.messaging.AbstractInventoryAdjustmentListener
-
- Direct Known Subclasses:
AbstractFulfillmentStatusChangeInventoryAdjustmentListener
,OrderSubmittedInventoryAdjustmentMessageListener
,ReturnConfirmedInventoryAdjustmentListener
public abstract class AbstractInventoryAdjustmentListener extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
APPLICATION_ID_PATH
protected static String
TENANT_ID_PATH
-
Constructor Summary
Constructors Constructor Description AbstractInventoryAdjustmentListener(com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService idempotentConsumptionService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, SkuInventoryService<SkuInventory> skuInventoryService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.broadleafcommerce.data.tracking.core.context.ContextInfo
buildContextInfo(@NonNull String tenantId, @NonNull String applicationId)
Builds aContextInfo
for the application context id and tenant idprotected com.broadleafcommerce.data.tracking.core.context.ContextInfo
buildContextInfo(com.jayway.jsonpath.DocumentContext jsonContext)
Builds aContextInfo
for the application context id and tenant id in the JSON payload.protected com.jayway.jsonpath.DocumentContext
getDocumentContext(@NonNull String payload)
Parses the message payload into aDocumentContext
which allows forJsonPath
parsing using Jackson providers.protected com.broadleafcommerce.common.messaging.service.IdempotentMessageConsumptionService
getIdempotentConsumptionService()
protected SkuInventoryService<SkuInventory>
getSkuInventoryService()
protected String
getSkuReferenceFieldType(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected com.broadleafcommerce.common.extension.TypeFactory
getTypeFactory()
-
-
-
Field Detail
-
TENANT_ID_PATH
protected static final String TENANT_ID_PATH
- See Also:
- Constant Field Values
-
APPLICATION_ID_PATH
protected static final String APPLICATION_ID_PATH
- See Also:
- Constant Field Values
-
-
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 aDocumentContext
which allows forJsonPath
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 aContextInfo
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 aContextInfo
for the application context id and tenant id- Parameters:
tenantId
- the tenant id of the contextapplicationId
- 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()
-
-