Class VirtualTypeFulfillmentGroupSubmitValidator
java.lang.Object
com.broadleafcommerce.cartoperation.service.fulfillment.validation.type.AbstractTypeFulfillmentGroupSubmitValidator
com.broadleafcommerce.cartoperation.service.fulfillment.validation.type.VirtualTypeFulfillmentGroupSubmitValidator
- All Implemented Interfaces:
FulfillmentValidator
,TypeFulfillmentGroupSubmitValidator
,org.springframework.validation.SmartValidator
,org.springframework.validation.Validator
public class VirtualTypeFulfillmentGroupSubmitValidator
extends AbstractTypeFulfillmentGroupSubmitValidator
Validates fulfillment information specific to
FulfillmentType.VIRTUAL
fulfillment groups.- Author:
- Jacob Mitash
-
Field Summary
Fields inherited from interface com.broadleafcommerce.cartoperation.service.fulfillment.validation.type.TypeFulfillmentGroupSubmitValidator
HINT_FORCE_ADDRESS_VALIDATION, HINT_SKIP_ADDRESS_VALIDATION
-
Constructor Summary
ConstructorsConstructorDescriptionVirtualTypeFulfillmentGroupSubmitValidator
(Set<FulfillmentAddressSubmitValidator> addressValidators) -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
Gets the class that this validator supports.protected boolean
shouldValidateAddress
(@NonNull Set<Object> hints) Tells whether this validator should validate the address or not.boolean
supports
(@NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group) Tells if this validator supports the given fulfillment group.Methods inherited from class com.broadleafcommerce.cartoperation.service.fulfillment.validation.type.AbstractTypeFulfillmentGroupSubmitValidator
getAddressValidators, validate, validateAddress
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
-
VirtualTypeFulfillmentGroupSubmitValidator
public VirtualTypeFulfillmentGroupSubmitValidator(Set<FulfillmentAddressSubmitValidator> addressValidators)
-
-
Method Details
-
getSupportedClass
Description copied from interface:FulfillmentValidator
Gets the class that this validator supports.- Returns:
- the class that this validator support
-
supports
public boolean supports(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.FulfillmentGroup group) Description copied from interface:TypeFulfillmentGroupSubmitValidator
Tells if this validator supports the given fulfillment group. This is typically determined by theFulfillmentGroup.getType()
.- Parameters:
group
- the fulfillment group to test support of- Returns:
- true if this supports validation of the given fulfillment group, false otherwise
-
shouldValidateAddress
Description copied from class:AbstractTypeFulfillmentGroupSubmitValidator
Tells whether this validator should validate the address or not.- Specified by:
shouldValidateAddress
in classAbstractTypeFulfillmentGroupSubmitValidator
- Parameters:
hints
- hints to use when determining whether or not to validate the address- Returns:
- true to validate the address, false otherwise
-