Class DecrementInventoryRollbackHandler
java.lang.Object
org.broadleafcommerce.core.checkout.service.workflow.DecrementInventoryRollbackHandler
- All Implemented Interfaces:
RollbackHandler<ProcessContext<CheckoutSeed>>
@Component("blDecrementInventoryRollbackHandler")
public class DecrementInventoryRollbackHandler
extends Object
implements RollbackHandler<ProcessContext<CheckoutSeed>>
Decrements inventory that was put on by the
DecrementInventoryActivity- Author:
- Phillip Verheyden (phillipuniverse)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected ContextualInventoryServicestatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrollbackState(Activity<ProcessContext<CheckoutSeed>> activity, ProcessContext<CheckoutSeed> processContext, Map<String, Object> stateConfiguration) Rollback the state of the activity to what it was prior to execution.protected booleanshouldExecute(Activity<? extends ProcessContext<CheckoutSeed>> activity, ProcessContext<CheckoutSeed> processContext, Map<String, Object> stateConfiguration) Returns true if this rollback handler should execute
-
Field Details
-
ROLLBACK_BLC_INVENTORY_DECREMENTED
- See Also:
-
ROLLBACK_BLC_INVENTORY_INCREMENTED
- See Also:
-
ROLLBACK_BLC_ORDER_ID
- See Also:
-
EXTENDED_ROLLBACK_STATE
- See Also:
-
inventoryService
-
-
Constructor Details
-
DecrementInventoryRollbackHandler
public DecrementInventoryRollbackHandler()
-
-
Method Details
-
rollbackState
public void rollbackState(Activity<ProcessContext<CheckoutSeed>> activity, ProcessContext<CheckoutSeed> processContext, Map<String, Object> stateConfiguration) throws RollbackFailureExceptionDescription copied from interface:RollbackHandlerRollback the state of the activity to what it was prior to execution.- Specified by:
rollbackStatein interfaceRollbackHandler<ProcessContext<CheckoutSeed>>- Parameters:
activity- The Activity instance whose state is being revertedprocessContext- The ProcessContext for the workflowstateConfiguration- Any user-defined state configuration associated with the RollbackHandler- Throws:
RollbackFailureException- if there is a failure during the execution of the rollback
-
shouldExecute
protected boolean shouldExecute(Activity<? extends ProcessContext<CheckoutSeed>> activity, ProcessContext<CheckoutSeed> processContext, Map<String, Object> stateConfiguration) Returns true if this rollback handler should execute
-