Class CartPricingValidationActivity
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.service.checkout.workflow.activity.CartPricingValidationActivity
-
- All Implemented Interfaces:
CheckoutWorkflowActivity
public class CartPricingValidationActivity extends Object implements CheckoutWorkflowActivity
ThisCheckoutWorkflowActivity
is responsible for validating that theCart
and itsCartItems
have been successfully priced.- Author:
- Chad Harchar (charchar), Chris Kittrell (ckittrell)
-
-
Constructor Summary
Constructors Constructor Description CartPricingValidationActivity(org.springframework.context.MessageSource messageSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.broadleafcommerce.cart.client.domain.Cart
execute(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull String requestId, 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
getMessageSource()
com.broadleafcommerce.cart.client.domain.Cart
rollback(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart, String requestId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Method responsible for rolling back any work that was done during the execution of the#execute(Cart, String)
method.protected void
validatePricing(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart)
Validate that theCart
and itsCartItems
have been successfully priced
-
-
-
Method Detail
-
execute
public com.broadleafcommerce.cart.client.domain.Cart execute(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull String requestId, @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:
cart
- TheCart
that we're attempting to checkout with.requestId
- The id used to identify changes tied to the specific execution requestcontextInfo
- Context information around sandbox and multitenant state.- Returns:
- The final state of the cart following the execution of the activity.
-
rollback
public com.broadleafcommerce.cart.client.domain.Cart rollback(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, String requestId, @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 the#execute(Cart, String)
method.- Specified by:
rollback
in interfaceCheckoutWorkflowActivity
- Parameters:
cart
- TheCart
that we were attempting to checkout with, but ran into an exception/error.requestId
- The id used to identify changes tied to the specific execution requestcontextInfo
- Context information around sandbox and multitenant state.- Returns:
- The final state of the cart following the rollback of the activity.
-
validatePricing
protected void validatePricing(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart)
Validate that theCart
and itsCartItems
have been successfully priced- Parameters:
cart
-
-
getMessageSource
protected org.springframework.context.MessageSource getMessageSource()
-
-