Class ValidateProductOptionsCheckoutExtensionHandler
java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.core.checkout.service.workflow.extension.AbstractValidateCheckoutActivityExtensionHandler
org.broadleafcommerce.core.checkout.service.workflow.extension.ValidateProductOptionsCheckoutExtensionHandler
- All Implemented Interfaces:
org.broadleafcommerce.common.extension.ExtensionHandler,ValidateCheckoutActivityExtensionHandler
@Service("blValidateProductOptionsCheckoutExtensionHandler")
public class ValidateProductOptionsCheckoutExtensionHandler
extends AbstractValidateCheckoutActivityExtensionHandler
Re-validates the product options of each order item at checkout, as a defense-in-depth check for items that may have
entered the cart without going through the add workflow (e.g. a cart merge, a CSR tool or an import). Disabled by
default, since an option value that was valid when the item was added can become invalid if the catalog changes
afterwards, and rejecting it would block checkout. Enable with
validate.checkout.product.options.enabled.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ValidateCheckoutActivityExtensionManagerprotected ProductOptionValidationServiceprotected booleanFields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
enabled, priority -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValues(OrderItem orderItem) voidinit()org.broadleafcommerce.common.extension.ExtensionResultStatusTypevalidateCheckout(CheckoutSeed request, org.broadleafcommerce.common.extension.ExtensionResultHolder<Exception> resultHolder) This extension allows one to validate a checkout request before it succeeds and specify an exception to throw if the request is found to be invalid.Methods inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
getPriority, isEnabled, setEnabled, setPriorityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
-
Field Details
-
productOptionValidationService
-
extensionManager
-
validateCheckoutProductOptionsEnabled
@Value("${validate.checkout.product.options.enabled:false}") protected boolean validateCheckoutProductOptionsEnabled
-
-
Constructor Details
-
ValidateProductOptionsCheckoutExtensionHandler
public ValidateProductOptionsCheckoutExtensionHandler()
-
-
Method Details
-
init
@PostConstruct public void init() -
validateCheckout
public org.broadleafcommerce.common.extension.ExtensionResultStatusType validateCheckout(CheckoutSeed request, org.broadleafcommerce.common.extension.ExtensionResultHolder<Exception> resultHolder) Description copied from interface:ValidateCheckoutActivityExtensionHandlerThis extension allows one to validate a checkout request before it succeeds and specify an exception to throw if the request is found to be invalid.- Specified by:
validateCheckoutin interfaceValidateCheckoutActivityExtensionHandler- Overrides:
validateCheckoutin classAbstractValidateCheckoutActivityExtensionHandler- Returns:
-
getAttributeValues
-