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
ConstructorsConstructorDescriptionCartPricingValidationActivity(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 booleanfulfillmentGroupHasRetailDeliveryFee(@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup fg, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected org.springframework.context.MessageSourceprotected voidvalidatePricing(@NonNull CheckoutProcessDto processDto, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Validate that theCartand itsCartItemshave been successfully pricedprotected voidvalidateRetailDeliveryFeeCartItemsExist(@NonNull CheckoutProcessDto processDto, @NonNull Collection<com.broadleafcommerce.cart.client.domain.FulfillmentGroup> fulfillmentGroups, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected voidvalidateTaxRetailDeliveryFeePricing(@NonNull CheckoutProcessDto processDto, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) 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
-
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: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.
-
validatePricing
protected void validatePricing(@NonNull @NonNull CheckoutProcessDto processDto, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Validate that theCartand itsCartItemshave been successfully priced- Parameters:
processDto- theCheckoutProcessDtoused for checkoutcontextInfo- context information related to multitenancy
-
validateTaxRetailDeliveryFeePricing
protected void validateTaxRetailDeliveryFeePricing(@NonNull @NonNull CheckoutProcessDto processDto, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
fulfillmentGroupHasRetailDeliveryFee
protected boolean fulfillmentGroupHasRetailDeliveryFee(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup fg, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
validateRetailDeliveryFeeCartItemsExist
protected void validateRetailDeliveryFeeCartItemsExist(@NonNull @NonNull CheckoutProcessDto processDto, @NonNull @NonNull Collection<com.broadleafcommerce.cart.client.domain.FulfillmentGroup> fulfillmentGroups, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getMessageSource
protected org.springframework.context.MessageSource getMessageSource()
-