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
ConstructorsConstructorDescriptionInventoryAvailabilityValidationCheckoutWorkflowActivity(InventoryProvider inventoryProvider, org.springframework.context.MessageSource messageSource) -
Method Summary
Modifier and TypeMethodDescriptionexecute(@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 InventoryProviderprotected org.springframework.context.MessageSourceprotected voidhandleAvailabilityError(CheckoutProcessDto processDto, InventoryUnavailableException e, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected voidhandleOtherError(CheckoutProcessDto processDto, InventoryUnavailableException e, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected voidthrowCheckoutFailureException(CheckoutFailureType checkoutFailureType, CheckoutProcessDto processDto, Map<String, String> itemFailureMessages, Map<String, Object> additionalErrorInfo, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.cartoperation.service.checkout.workflow.activity.CheckoutWorkflowActivity
rollback
-
Constructor Details
-
InventoryAvailabilityValidationCheckoutWorkflowActivity
public InventoryAvailabilityValidationCheckoutWorkflowActivity(InventoryProvider inventoryProvider, org.springframework.context.MessageSource messageSource)
-
-
Method Details
-
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.
-
throwCheckoutFailureException
protected void throwCheckoutFailureException(CheckoutFailureType checkoutFailureType, CheckoutProcessDto processDto, Map<String, String> itemFailureMessages, Map<String, Object> additionalErrorInfo, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
getInventoryProvider
-
getMessageSource
protected org.springframework.context.MessageSource getMessageSource()
-