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

public class TravelCompositeValidator extends AbstractTravelValidator
It has a composite of TravelValidator
Iterates and executes validate for each TravelValidator
  • Constructor Details

    • TravelCompositeValidator

      public TravelCompositeValidator()
  • Method Details

    • supports

      public boolean supports(Class<?> clazz)
    • validate

      public void validate(Object target, org.springframework.validation.Errors errors)
    • validate

      public void validate(Object target, org.springframework.validation.Errors errors, boolean ignoreNull)
      Description copied from interface: TravelValidator
      Validate the supplied target object
      Specified by:
      validate in interface TravelValidator
      Overrides:
      validate in class AbstractTravelValidator
      Parameters:
      target - the object that is to be validated
      errors - contextual state about the validation process
      ignoreNull - ignore validation for null objects
    • validateInternal

      protected void validateInternal(Object target, org.springframework.validation.Errors errors)
      Internal method for validating the supplied target object
      Parameters:
      target - the object that is to be validated
      errors - contextual state about the validation process
    • validateInternal

      protected void validateInternal(Object target, org.springframework.validation.Errors errors, boolean ignoreNull)
      Internal method for validating the supplied target object
      Parameters:
      target - the object that is to be validated
      errors - contextual state about the validation process
      ignoreNull - ignore validation for null objects
    • isSupport

      protected boolean isSupport(TravelValidator validator, Object target, org.springframework.validation.Errors errors)
      Returns true if this validator can validate target object.
      Parameters:
      validator - the validator
      target - the object that is to be validated
      errors - 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 validator
      target - the object that is to be validated
      errors - 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

      protected List<TravelValidator> getValidators()
      Gets validators.
      Returns:
      the validators
    • setValidators

      public void setValidators(List<TravelValidator> validators)
      Sets validators.
      Parameters:
      validators - validators