Class DefaultFacadeValidationService
java.lang.Object
de.hybris.platform.cmsfacades.common.validator.impl.DefaultFacadeValidationService
- All Implemented Interfaces:
FacadeValidationService
Default implementation of a facade level validation service. This service will create a new instance of the
Errors, ensure that the given validator can support the object to be validated, then perform the validation.
If any validation errors were found, then a ValidationException is thrown.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ErrorFactoryvoidsetValidatorErrorFactory(ErrorFactory validatorErrorFactory) voidValidate the given DTO.voidvalidate(org.springframework.validation.Validator validator, Object validatee, Object bindingObject) Validate the given DTO.protected voidvalidateInternal(org.springframework.validation.Validator validator, Object validatee, org.springframework.validation.Errors errors) Validate the object using the provided binded errors
-
Constructor Details
-
DefaultFacadeValidationService
public DefaultFacadeValidationService()
-
-
Method Details
-
validate
public void validate(org.springframework.validation.Validator validator, Object validatee) throws ValidationException Description copied from interface:FacadeValidationServiceValidate the given DTO.- Specified by:
validatein interfaceFacadeValidationService- Parameters:
validator- - the validator to use for the validationvalidatee- - the object being validated- Throws:
ValidationException- when validation errors were found
-
validate
public void validate(org.springframework.validation.Validator validator, Object validatee, Object bindingObject) throws ValidationException Description copied from interface:FacadeValidationServiceValidate the given DTO.- Specified by:
validatein interfaceFacadeValidationService- Parameters:
validator- - the validator to use for the validationvalidatee- - the object being validatedbindingObject- - the object to use for binding the field errors- Throws:
ValidationException- when validation errors were found
-
validateInternal
protected void validateInternal(org.springframework.validation.Validator validator, Object validatee, org.springframework.validation.Errors errors) throws ValidationException Validate the object using the provided binded errors- Parameters:
validator-validatee-errors-- Throws:
ValidationException
-
getValidatorErrorFactory
-
setValidatorErrorFactory
-