public class AbstractWorkflowInventoryExtensionHandler extends AbstractExtensionHandler implements WorkflowInventoryExtensionHandler
WorkflowInventoryExtensionHandler that all implementors should extend from. Defaults to
ExtensionResultStatusType.NOT_HANDLED for all methods.enabled, priority| Constructor and Description |
|---|
AbstractWorkflowInventoryExtensionHandler() |
| 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, isEnabled, setEnabled, setPriorityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPriority, isEnabledpublic AbstractWorkflowInventoryExtensionHandler()
public ExtensionResultStatusType checkAvailability(Sku sku, Integer requestedQuantity, ProcessContext<CartOperationRequest> context) throws InventoryUnavailableException
WorkflowInventoryExtensionHandlerCheckAvailabilityActivity 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_QUANTITYcheckAvailability in interface WorkflowInventoryExtensionHandlerInventoryUnavailableExceptionInventoryService},
CheckAvailabilityActivity}public ExtensionResultStatusType decrementInventory(Map<Sku,Integer> skuQuantities, ProcessContext<CheckoutSeed> context, Map<String,Object> rollbackState) throws InventoryUnavailableException
WorkflowInventoryExtensionHandlerExtensionResultStatusType.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_QUANTITYdecrementInventory in interface WorkflowInventoryExtensionHandlerInventoryUnavailableExceptionInventoryService},
DecrementInventoryActivity}public ExtensionResultStatusType rollbackInventoryOperation(ProcessContext<CheckoutSeed> context, Map<String,Object> rollbackState) throws RollbackFailureException
WorkflowInventoryExtensionHandlerDecrementInventoryRollbackHandlerrollbackInventoryOperation in interface WorkflowInventoryExtensionHandlerExtensionResultStatusType.HANDLEDRollbackFailureExceptionCopyright © 2014. All Rights Reserved.