Class AirShoppingOriginDestFieldValidator

java.lang.Object
de.hybris.platform.ndc182shoppingwebservices.validators.impl.AbstractAirShoppingValidator
de.hybris.platform.ndc182shoppingwebservices.validators.impl.AirShoppingOriginDestFieldValidator
All Implemented Interfaces:
NDCFieldValidator<IATAAirShoppingRQ,List<ErrorType>>

public class AirShoppingOriginDestFieldValidator extends AbstractAirShoppingValidator implements NDCFieldValidator<IATAAirShoppingRQ,List<ErrorType>>
validator to validate the origindest fields in the air shopping request
  • Constructor Details

    • AirShoppingOriginDestFieldValidator

      public AirShoppingOriginDestFieldValidator()
  • Method Details

    • validate

      public void validate(IATAAirShoppingRQ request, List<ErrorType> errors)
      Description copied from interface: NDCFieldValidator
      Validate.
      Specified by:
      validate in interface NDCFieldValidator<IATAAirShoppingRQ,List<ErrorType>>
      Parameters:
      request - the request
      errors - the errors
    • validateOriginDepDate

      protected void validateOriginDepDate(List<OriginDestCriteriaType> originDestinationCriteria, OriginDestCriteriaType originDestCriteriaType, List<ErrorType> errors)
      Validates Location and Date of the provided origin
      Parameters:
      originDestinationCriteria - the origin destination criteria
      originDestCriteriaType - the origin dest criteria type
      errors - the errors
    • isNormalizedDateInThePast

      protected boolean isNormalizedDateInThePast(Date dateToValidate)
      Validates dates at the start of day
      Parameters:
      dateToValidate - the date to validate
      Returns:
      true if the date passed is in the past, considering the start of the day
    • getConfigurationService

      protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()
      Gets the configurationService
      Returns:
      the configurationService
    • setConfigurationService

      public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
      Sets the configurationService
      Parameters:
      configurationService - the configurationService to set
    • getTimeService

      public de.hybris.platform.servicelayer.time.TimeService getTimeService()
      Gets the timeService
      Returns:
      the timeService
    • setTimeService

      public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService)
      Sets the timeService
      Parameters:
      timeService - the timeService to set