Class CountryAwareAddressDTOValidator
- java.lang.Object
-
- de.hybris.platform.warehousingwebservices.validators.CountryAwareAddressDTOValidator
-
- All Implemented Interfaces:
org.springframework.validation.Validator
public class CountryAwareAddressDTOValidator extends java.lang.Object implements org.springframework.validation.ValidatorImplementation ofValidatorthat validate instances ofAddressWsDTO. TheCountryAwareAddressValidatordoes not validate all fields itself, but delegates to other ValidatorscountrySpecificAddressWsDTOValidators.AddressValidatoruses the country.isocode field to select a suitable validator for a specific country. If a matching validator cannot be found,commonAddressWsDTOValidatoris used.
-
-
Constructor Summary
Constructors Constructor Description CountryAwareAddressDTOValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.validation.ValidatorgetCommonAddressValidator()protected java.util.Map<java.lang.String,org.springframework.validation.Validator>getCountrySpecificAddressValidators()voidsetCommonAddressValidator(org.springframework.validation.Validator commonAddressValidator)voidsetCountrySpecificAddressValidators(java.util.Map<java.lang.String,org.springframework.validation.Validator> customAddressValidators)booleansupports(java.lang.Class clazz)voidvalidate(java.lang.Object target, org.springframework.validation.Errors errors)
-
-
-
Method Detail
-
supports
public boolean supports(java.lang.Class clazz)
- Specified by:
supportsin interfaceorg.springframework.validation.Validator
-
validate
public void validate(java.lang.Object target, org.springframework.validation.Errors errors)- Specified by:
validatein interfaceorg.springframework.validation.Validator
-
setCommonAddressValidator
public void setCommonAddressValidator(org.springframework.validation.Validator commonAddressValidator)
-
getCommonAddressValidator
protected org.springframework.validation.Validator getCommonAddressValidator()
-
setCountrySpecificAddressValidators
public void setCountrySpecificAddressValidators(java.util.Map<java.lang.String,org.springframework.validation.Validator> customAddressValidators)
-
getCountrySpecificAddressValidators
protected java.util.Map<java.lang.String,org.springframework.validation.Validator> getCountrySpecificAddressValidators()
-
-