Class AccommodationSearchRequestValidator

java.lang.Object
de.hybris.platform.coretravelbasewebservicescommons.validators.AbstractTravelValidator
de.hybris.platform.coreairlineaccommodationocc.validators.AccommodationSearchRequestValidator
All Implemented Interfaces:
TravelValidator, org.springframework.validation.Validator

public class AccommodationSearchRequestValidator extends AbstractTravelValidator implements org.springframework.validation.Validator
Validates instances of AccommodationSearchRequest for the valid destination location, check in date, check out date and the room stay details
  • Constructor Details

    • AccommodationSearchRequestValidator

      public AccommodationSearchRequestValidator()
  • Method Details

    • supports

      public boolean supports(Class<?> aClass)
      Specified by:
      supports in interface org.springframework.validation.Validator
    • validate

      public void validate(Object target, org.springframework.validation.Errors errors)
      Specified by:
      validate in interface org.springframework.validation.Validator
    • validateCheckOutDate

      protected void validateCheckOutDate(String checkInDate, String checkOutDate, org.springframework.validation.Errors errors)
      Validate the checkout date is after the check in date and maximum room stay days
      Parameters:
      checkInDate -
      checkOutDate -
      errors -
    • validateCheckInDate

      protected void validateCheckInDate(String checkInDate, org.springframework.validation.Errors errors)
      Validate the Check In date is after the current time.
      Parameters:
      checkInDate -
      errors -
    • getCurrentTimeStamp

      protected String getCurrentTimeStamp()
      Return the current time in given format
      Returns:
    • validateRoomGuestOccupancy

      protected void validateRoomGuestOccupancy(String roomGuestOccupancy, org.springframework.validation.Errors errors)
      Validate the room guest occupancy
      Parameters:
      roomGuestOccupancy - the room guest occupancy
      errors -
    • validatePax

      protected int validatePax(org.springframework.validation.Errors errors, int numberOfPaX, String passengerTypeInfo)
      validate Pax format and minimum 1 adult per room check
      Parameters:
      errors -
      numberOfPaX -
      passengerTypeInfo -
    • validateLocationPattern

      protected boolean validateLocationPattern(String location)
      Validate the location
      Parameters:
      location -
      Returns: