public interface WorkflowInventoryExtensionHandler extends ExtensionHandler
| Modifier and Type | Method and Description |
|---|---|
ExtensionResultStatusType |
checkAvailability(Sku sku,
Integer requestedQuantity,
ProcessContext<CartOperationRequest> context)
Invoked during the blAddItemWorkflow and blUpdateItemWorkflow within the
CheckAvailabilityActivity if it is hooked up. |
ExtensionResultStatusType |
decrementInventory(Map<Sku,Integer> skuQuantities,
ProcessContext<CheckoutSeed> context,
Map<String,Object> rollbackState)
Invoked during the blCheckoutWorkflow
ExtensionResultStatusType.NOT_HANDLED then the default inventory system in the framework will be checked. |
ExtensionResultStatusType |
rollbackInventoryOperation(ProcessContext<CheckoutSeed> context,
Map<String,Object> rollbackState)
Invoked from the
DecrementInventoryRollbackHandler |
getPriority, isEnabledExtensionResultStatusType checkAvailability(Sku sku, Integer requestedQuantity, ProcessContext<CartOperationRequest> context) throws InventoryUnavailableException
CheckAvailabilityActivity if it is hooked up.
If this returns
ExtensionResultStatusType.NOT_HANDLED then the default inventory system in the framework will be checked.
Therefore, if you decide to implement this method then you MUST return ExtensionResultStatusType.HANDLED,
even if the given Sku's Sku.getInventoryType() does not return InventoryType.CHECK_QUANTITYInventoryUnavailableExceptionInventoryService},
CheckAvailabilityActivity}ExtensionResultStatusType decrementInventory(Map<Sku,Integer> skuQuantities, ProcessContext<CheckoutSeed> context, Map<String,Object> rollbackState) throws InventoryUnavailableException
ExtensionResultStatusType.NOT_HANDLED then the default inventory system in the framework will be checked.
Therefore, if you decide to implement this method then you MUST return ExtensionResultStatusType.HANDLED,
even if the given Sku's Sku.getInventoryType() does not return InventoryType.CHECK_QUANTITY{@link - InventoryUnavailableException} if there is not enough inventory available for any of the Skus within
skuQuantitiesInventoryUnavailableExceptionInventoryService},
DecrementInventoryActivity}ExtensionResultStatusType rollbackInventoryOperation(ProcessContext<CheckoutSeed> context, Map<String,Object> rollbackState) throws RollbackFailureException
DecrementInventoryRollbackHandlerinventoryToIncrement - - inventory that was previously decremented and now should be incrementedincrementedInventory - - inventory that was previously incremented and now should be decrementedorderId - ExtensionResultStatusType.HANDLED{@link - RollbackFailureException} if there was a problem rolling back the inventory operationRollbackFailureExceptionCopyright © 2014. All Rights Reserved.