Class InventoryAvailabilityValidationCheckoutWorkflowActivity
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.service.checkout.workflow.activity.InventoryAvailabilityValidationCheckoutWorkflowActivity
-
- All Implemented Interfaces:
CheckoutWorkflowActivity
public class InventoryAvailabilityValidationCheckoutWorkflowActivity extends Object implements CheckoutWorkflowActivity
-
-
Constructor Summary
Constructors Constructor Description InventoryAvailabilityValidationCheckoutWorkflowActivity(InventoryProvider inventoryProvider, org.springframework.context.MessageSource messageSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckoutProcessDtoexecute(@NonNull CheckoutProcessDto processDto, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Method responsible for executing some work against the cart that is required for checkout.protected InventoryProvidergetInventoryProvider()protected org.springframework.context.MessageSourcegetMessageSource()CheckoutProcessDtorollback(@NonNull CheckoutProcessDto processDto, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Method responsible for rolling back any work that was done during the execution of theCheckoutWorkflowActivity.execute(CheckoutProcessDto, ContextInfo)method.
-
-
-
Constructor Detail
-
InventoryAvailabilityValidationCheckoutWorkflowActivity
public InventoryAvailabilityValidationCheckoutWorkflowActivity(InventoryProvider inventoryProvider, org.springframework.context.MessageSource messageSource)
-
-
Method Detail
-
execute
public CheckoutProcessDto execute(@NonNull @NonNull CheckoutProcessDto processDto, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CheckoutWorkflowActivityMethod responsible for executing some work against the cart that is required for checkout. This may include, but is not limited to, cart validation checks, inventory reservations, or payment authorizations.- Specified by:
executein interfaceCheckoutWorkflowActivity- Parameters:
processDto- TheCheckoutProcessDtothat we're attempting to checkout with.contextInfo- Context information around sandbox and multitenant state.- Returns:
- The final state of the
CheckoutProcessDtofollowing the execution of the activity.
-
rollback
public CheckoutProcessDto rollback(@NonNull @NonNull CheckoutProcessDto processDto, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CheckoutWorkflowActivityMethod responsible for rolling back any work that was done during the execution of theCheckoutWorkflowActivity.execute(CheckoutProcessDto, ContextInfo)method.- Specified by:
rollbackin interfaceCheckoutWorkflowActivity- Parameters:
processDto- TheCheckoutProcessDtothat we were attempting to checkout with, but ran into an exception/error.contextInfo- Context information around sandbox and multitenant state.- Returns:
- The final state of the
CheckoutProcessDtofollowing the rollback of the activity.
-
getInventoryProvider
protected InventoryProvider getInventoryProvider()
-
getMessageSource
protected org.springframework.context.MessageSource getMessageSource()
-
-