Class TravelCompositeValidator
java.lang.Object
de.hybris.platform.coretravelbasewebservicescommons.validators.AbstractTravelValidator
de.hybris.platform.coretravelbasewebservicescommons.validators.TravelCompositeValidator
- All Implemented Interfaces:
TravelValidator,org.springframework.validation.Validator
- Direct Known Subclasses:
AddPackageToCartRequestValidator,FlightSearchRequestValidator,ListCompositeValidator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetTargetField(TravelValidator validator, Object target, org.springframework.validation.Errors errors) Return object that is to be validated for specific validator.protected List<TravelValidator>Gets validators.protected booleanisSupport(TravelValidator validator, Object target, org.springframework.validation.Errors errors) Returnstrueif this validator can validatetargetobject.protected voidpopNestedPath(org.springframework.validation.Errors errors) Pop the former nested path (if specified) from the nested path stack.protected voidpushNestedPath(org.springframework.validation.Errors errors) Push the field path (if specified) onto the nested path stack.voidsetValidators(List<TravelValidator> validators) Sets validators.booleanvoidvoidValidate the suppliedtargetobjectprotected voidvalidateInternal(Object target, org.springframework.validation.Errors errors) Internal method for validating the suppliedtargetobjectprotected voidvalidateInternal(Object target, org.springframework.validation.Errors errors, boolean ignoreNull) Internal method for validating the suppliedtargetobjectMethods inherited from class de.hybris.platform.coretravelbasewebservicescommons.validators.AbstractTravelValidator
getErrorId, getErrorMessage, getFieldPath, isOptional, isValidationRequired, reject, setErrorId, setErrorMessage, setFieldPath, setOptional
-
Constructor Details
-
TravelCompositeValidator
public TravelCompositeValidator()
-
-
Method Details
-
supports
-
validate
-
validate
public void validate(Object target, org.springframework.validation.Errors errors, boolean ignoreNull) Description copied from interface:TravelValidatorValidate the suppliedtargetobject- Specified by:
validatein interfaceTravelValidator- Overrides:
validatein classAbstractTravelValidator- Parameters:
target- the object that is to be validatederrors- contextual state about the validation processignoreNull- ignore validation for null objects
-
validateInternal
Internal method for validating the suppliedtargetobject- Parameters:
target- the object that is to be validatederrors- contextual state about the validation process
-
validateInternal
protected void validateInternal(Object target, org.springframework.validation.Errors errors, boolean ignoreNull) Internal method for validating the suppliedtargetobject- Parameters:
target- the object that is to be validatederrors- contextual state about the validation processignoreNull- ignore validation for null objects
-
isSupport
protected boolean isSupport(TravelValidator validator, Object target, org.springframework.validation.Errors errors) Returnstrueif this validator can validatetargetobject.- Parameters:
validator- the validatortarget- the object that is to be validatederrors- contextual state about the validation process
-
getTargetField
protected Object getTargetField(TravelValidator validator, Object target, org.springframework.validation.Errors errors) Return object that is to be validated for specific validator.- Parameters:
validator- the validatortarget- the object that is to be validatederrors- contextual state about the validation process
-
pushNestedPath
protected void pushNestedPath(org.springframework.validation.Errors errors) Push the field path (if specified) onto the nested path stack.- Parameters:
errors- contextual state about the validation process
-
popNestedPath
protected void popNestedPath(org.springframework.validation.Errors errors) Pop the former nested path (if specified) from the nested path stack. -
getValidators
Gets validators.- Returns:
- the validators
-
setValidators
Sets validators.- Parameters:
validators- validators
-