Class ShipTypeFulfillmentGroupSubmitValidator
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.service.fulfillment.validation.type.AbstractTypeFulfillmentGroupSubmitValidator
-
- com.broadleafcommerce.cartoperation.service.fulfillment.validation.type.ShipTypeFulfillmentGroupSubmitValidator
-
- All Implemented Interfaces:
FulfillmentValidator
,TypeFulfillmentGroupSubmitValidator
,org.springframework.validation.SmartValidator
,org.springframework.validation.Validator
public class ShipTypeFulfillmentGroupSubmitValidator extends AbstractTypeFulfillmentGroupSubmitValidator
Validates fulfillment information specific toFulfillmentType.SHIP
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
Constructors Constructor Description ShipTypeFulfillmentGroupSubmitValidator(Set<FulfillmentAddressSubmitValidator> addressValidators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>
getSupportedClass()
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
-
-
-
-
Constructor Detail
-
ShipTypeFulfillmentGroupSubmitValidator
public ShipTypeFulfillmentGroupSubmitValidator(Set<FulfillmentAddressSubmitValidator> addressValidators)
-
-
Method Detail
-
getSupportedClass
public Class<?> 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
protected boolean shouldValidateAddress(@NonNull @NonNull Set<Object> hints)
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
-
-