Class CartPricingValidationActivity
java.lang.Object
com.broadleafcommerce.cartoperation.service.checkout.workflow.activity.CartPricingValidationActivity
- All Implemented Interfaces:
CheckoutWorkflowActivity
This
CheckoutWorkflowActivity
is responsible for validating that the Cart
and its
CartItems
have been successfully priced.- Author:
- Chad Harchar (charchar), Chris Kittrell (ckittrell)
-
Constructor Summary
ConstructorDescriptionCartPricingValidationActivity
(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 org.springframework.context.MessageSource
rollback
(@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.protected void
validatePricing
(@NonNull CheckoutProcessDto processDto, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Validate that theCart
and itsCartItems
have been successfully priced
-
Constructor Details
-
CartPricingValidationActivity
public CartPricingValidationActivity(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:CheckoutWorkflowActivity
Method 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:
execute
in interfaceCheckoutWorkflowActivity
- Parameters:
processDto
- TheCheckoutProcessDto
that we're attempting to checkout with.contextInfo
- Context information around sandbox and multitenant state.- Returns:
- The final state of the
CheckoutProcessDto
following 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:CheckoutWorkflowActivity
Method responsible for rolling back any work that was done during the execution of theCheckoutWorkflowActivity.execute(CheckoutProcessDto, ContextInfo)
method.- Specified by:
rollback
in interfaceCheckoutWorkflowActivity
- Parameters:
processDto
- TheCheckoutProcessDto
that 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
CheckoutProcessDto
following the rollback of the activity.
-
validatePricing
protected void validatePricing(@NonNull @NonNull CheckoutProcessDto processDto, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Validate that theCart
and itsCartItems
have been successfully priced- Parameters:
processDto
- theCheckoutProcessDto
used for checkoutcontextInfo
- context information related to multitenancy
-
getMessageSource
protected org.springframework.context.MessageSource getMessageSource()
-