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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.servicelayer.config.ConfigurationServiceGets the configurationServicede.hybris.platform.servicelayer.time.TimeServiceGets the timeServiceprotected booleanisNormalizedDateInThePast(Date dateToValidate) Validates dates at the start of dayvoidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets the configurationServicevoidsetTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) Sets the timeServicevoidvalidate(IATAAirShoppingRQ request, List<ErrorType> errors) Validate.protected voidvalidateOriginDepDate(List<OriginDestCriteriaType> originDestinationCriteria, OriginDestCriteriaType originDestCriteriaType, List<ErrorType> errors) Validates Location and Date of the provided originMethods inherited from class de.hybris.platform.ndc182shoppingwebservices.validators.impl.AbstractAirShoppingValidator
addError
-
Constructor Details
-
AirShoppingOriginDestFieldValidator
public AirShoppingOriginDestFieldValidator()
-
-
Method Details
-
validate
Description copied from interface:NDCFieldValidatorValidate.- Specified by:
validatein interfaceNDCFieldValidator<IATAAirShoppingRQ,List<ErrorType>> - Parameters:
request- the requesterrors- 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 criteriaoriginDestCriteriaType- the origin dest criteria typeerrors- the errors
-
isNormalizedDateInThePast
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
-