Class DefaultPricedFulfillmentOptionSubmitValidator
java.lang.Object
com.broadleafcommerce.cartoperation.service.fulfillment.validation.option.DefaultPricedFulfillmentOptionSubmitValidator
- All Implemented Interfaces:
FulfillmentValidator
,PricedFulfillmentOptionSubmitValidator
,org.springframework.validation.SmartValidator
,org.springframework.validation.Validator
public class DefaultPricedFulfillmentOptionSubmitValidator
extends Object
implements PricedFulfillmentOptionSubmitValidator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
protected FulfillmentOptionRequestService
protected com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse
Class<?>
Gets the class that this validator supports.void
setFulfillmentOptionRequestService
(FulfillmentOptionRequestService fulfillmentOptionRequestService) boolean
supports
(com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) void
Validates the target.protected void
validateStaleFulfillmentOptions
(@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup, @NonNull org.springframework.validation.Errors errors, FulfillmentValidationDataHolder dataHolder) protected void
validateStaleFulfillmentOptionsForItems
(@NonNull List<com.broadleafcommerce.cart.client.domain.FulfillmentItem> fulfillmentItems, @NonNull org.springframework.validation.Errors errors, FulfillmentValidationDataHolder dataHolder) void
validateWithDataHolder
(Object target, org.springframework.validation.Errors errors, Set<Object> validationHints, FulfillmentValidationDataHolder dataHolder) Validates the target and usesFulfillmentValidationDataHolder
parameter that can be used to hold some additional data needed for the validation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.cartoperation.service.fulfillment.validation.FulfillmentValidator
supports, validate, validate, validate, validate
Methods inherited from interface org.springframework.validation.SmartValidator
validateValue
-
Constructor Details
-
DefaultPricedFulfillmentOptionSubmitValidator
public DefaultPricedFulfillmentOptionSubmitValidator()
-
-
Method Details
-
getSupportedClass
Description copied from interface:FulfillmentValidator
Gets the class that this validator supports.- Specified by:
getSupportedClass
in interfaceFulfillmentValidator
- Returns:
- the class that this validator support
-
validate
public void validate(Object target, org.springframework.validation.Errors errors, Set<Object> validationHints) Description copied from interface:FulfillmentValidator
Validates the target.- Specified by:
validate
in interfaceFulfillmentValidator
- Parameters:
target
- the target of the validationerrors
- an errors container to place rejections and pull values fromvalidationHints
- any hints that should be used during validation
-
validateWithDataHolder
public void validateWithDataHolder(Object target, org.springframework.validation.Errors errors, Set<Object> validationHints, FulfillmentValidationDataHolder dataHolder) Description copied from interface:FulfillmentValidator
Validates the target and usesFulfillmentValidationDataHolder
parameter that can be used to hold some additional data needed for the validation.- Specified by:
validateWithDataHolder
in interfaceFulfillmentValidator
- Parameters:
target
- the target of the validationerrors
- an errors container to place rejections and pull values fromvalidationHints
- any hints that should be used during validationdataHolder
- the state holder that can be used to store some additional data required for validation
-
validateStaleFulfillmentOptions
protected void validateStaleFulfillmentOptions(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup, @NonNull @NonNull org.springframework.validation.Errors errors, FulfillmentValidationDataHolder dataHolder) -
validateStaleFulfillmentOptionsForItems
protected void validateStaleFulfillmentOptionsForItems(@NonNull @NonNull List<com.broadleafcommerce.cart.client.domain.FulfillmentItem> fulfillmentItems, @NonNull @NonNull org.springframework.validation.Errors errors, FulfillmentValidationDataHolder dataHolder) -
getFulfillmentOptionsForCart
protected com.broadleafcommerce.fulfillment.common.domain.FulfillmentOptionResponse getFulfillmentOptionsForCart(FulfillmentValidationDataHolder dataHolder) -
supports
public boolean supports(com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) - Specified by:
supports
in interfacePricedFulfillmentOptionSubmitValidator
-
getFULFILLMENT_OPTIONS_FOR_CART_STATE_KEY
-
setFulfillmentOptionRequestService
@Autowired public void setFulfillmentOptionRequestService(FulfillmentOptionRequestService fulfillmentOptionRequestService) -
getFulfillmentOptionRequestService
-