Class DefaultFacadeValidationService
- java.lang.Object
-
- de.hybris.platform.cmsfacades.common.validator.impl.DefaultFacadeValidationService
-
- All Implemented Interfaces:
FacadeValidationService
public class DefaultFacadeValidationService extends java.lang.Object implements FacadeValidationService
Default implementation of a facade level validation service. This service will create a new instance of theErrors, ensure that the given validator can support the object to be validated, then perform the validation.If any validation errors were found, then a
ValidationExceptionis thrown.
-
-
Constructor Summary
Constructors Constructor Description DefaultFacadeValidationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ErrorFactorygetValidatorErrorFactory()voidsetValidatorErrorFactory(ErrorFactory validatorErrorFactory)voidvalidate(org.springframework.validation.Validator validator, java.lang.Object validatee)Validate the given DTO.voidvalidate(org.springframework.validation.Validator validator, java.lang.Object validatee, java.lang.Object bindingObject)Validate the given DTO.protected voidvalidateInternal(org.springframework.validation.Validator validator, java.lang.Object validatee, org.springframework.validation.Errors errors)Validate the object using the provided binded errors
-
-
-
Method Detail
-
validate
public void validate(org.springframework.validation.Validator validator, java.lang.Object validatee) throws ValidationExceptionDescription 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, java.lang.Object validatee, java.lang.Object bindingObject) throws ValidationExceptionDescription 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, java.lang.Object validatee, org.springframework.validation.Errors errors) throws ValidationExceptionValidate the object using the provided binded errors- Parameters:
validator-validatee-errors-- Throws:
ValidationException
-
getValidatorErrorFactory
protected ErrorFactory getValidatorErrorFactory()
-
setValidatorErrorFactory
public void setValidatorErrorFactory(ErrorFactory validatorErrorFactory)
-
-