public class DefaultFulfillmentAddressSubmitValidator extends Object implements FulfillmentAddressSubmitValidator
HINT_CITY_NOT_REQUIRED, HINT_COMPANY_NAME_REQUIRED, HINT_COUNTRY_NOT_REQUIRED, HINT_COUNTY_REQUIRED, HINT_EMAIL_REQUIRED, HINT_PHONE_PRIMARY_NOT_REQUIRED, HINT_POSTAL_CODE_NOT_REQUIRED, HINT_STATE_PROVINCE_REGION_NOT_REQUIRED, HINT_VALIDATE_FIRST_AND_LAST
Constructor and Description |
---|
DefaultFulfillmentAddressSubmitValidator() |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getSupportedClass()
Gets the class that this validator supports.
|
boolean |
supports(com.broadleafcommerce.order.common.domain.Address address)
Tells if this validator supports the given fulfillment group address.
|
protected boolean |
useFullName(@NonNull Set<Object> hints)
Tells if the full name or the individual first and last name should be used for validation.
|
void |
validate(@NonNull Object target,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> validationHints)
Validates the target.
|
protected void |
validateAddress(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the address.
|
protected void |
validateAddressLine1(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the address line 1 on the address.
|
protected void |
validateCity(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the city on the address.
|
protected void |
validateCompanyName(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the company name on the address.
|
protected void |
validateCountry(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the country on the address.
|
protected void |
validateCounty(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the county on the address.
|
protected void |
validateEmailAddress(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the email address on the address.
|
protected void |
validateName(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the name on the address.
|
protected void |
validatePhonePrimary(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the primary phone number on the address.
|
protected void |
validatePostalCode(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the postal code on the address.
|
protected void |
validateStateProvinceRegionSubdivision(@NonNull com.broadleafcommerce.order.common.domain.Address address,
@NonNull org.springframework.validation.Errors errors,
@NonNull Set<Object> hints)
Validates the state province region on the address.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public DefaultFulfillmentAddressSubmitValidator()
public boolean supports(com.broadleafcommerce.order.common.domain.Address address)
FulfillmentAddressSubmitValidator
supports
in interface FulfillmentAddressSubmitValidator
address
- the fulfillment group address to test support ofpublic Class<?> getSupportedClass()
FulfillmentValidator
getSupportedClass
in interface FulfillmentValidator
public void validate(@NonNull @NonNull Object target, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> validationHints)
FulfillmentValidator
validate
in interface FulfillmentValidator
target
- the target of the validationerrors
- an errors container to place rejections and pull values fromvalidationHints
- any hints that should be used during validationprotected void validateAddress(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validateName(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validateEmailAddress(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validateCompanyName(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validateAddressLine1(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validateCity(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validateCounty(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validateCountry(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validateStateProvinceRegionSubdivision(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validatePostalCode(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected void validatePhonePrimary(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address, @NonNull @NonNull org.springframework.validation.Errors errors, @NonNull @NonNull Set<Object> hints)
address
- the address to validateerrors
- an errors container to place rejections and pull values fromhints
- any hints that should be used during the validationprotected boolean useFullName(@NonNull @NonNull Set<Object> hints)
hints
- any hints to take into account when deciding which name type should be validatedCopyright © 2021. All rights reserved.