Class AddRoomStayValidator
java.lang.Object
de.hybris.platform.coretravelbasewebservicescommons.validators.AbstractTravelValidator
de.hybris.platform.coreaccommodationocc.validators.AddRoomStayValidator
- All Implemented Interfaces:
TravelValidator,org.springframework.validation.Validator
Validates instances of
AddRoomStayToCartRequest-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DateParse string to date.booleanvoidChecks if checkIn and checkOut dates are validprotected voidvalidateRoom(org.springframework.validation.Errors errors, String checkInString, String checkOutString) Validates checkin and checkout dates.Methods inherited from class de.hybris.platform.coretravelbasewebservicescommons.validators.AbstractTravelValidator
getErrorId, getErrorMessage, getFieldPath, isOptional, isValidationRequired, reject, setErrorId, setErrorMessage, setFieldPath, setOptional, validate
-
Field Details
-
ERROR_INVALID_CHECKIN_DATE_CODE
- See Also:
-
ERROR_INVALID_CHECKOUT_DATE_CODE
- See Also:
-
ERROR_INVALID_ACCOMMODATION_DATES_CODE
- See Also:
-
ERROR_INVALID_CHECKIN_DATE_FORMAT_CODE
- See Also:
-
ERROR_INVALID_CHECKOUT_DATE_FORMAT_CODE
- See Also:
-
-
Constructor Details
-
AddRoomStayValidator
public AddRoomStayValidator()
-
-
Method Details
-
supports
-
validate
Checks if checkIn and checkOut dates are valid- Parameters:
target- the AddRoomStayToCartRequest to be validatederrors- the list of collected errors
-
validateRoom
protected void validateRoom(org.springframework.validation.Errors errors, String checkInString, String checkOutString) Validates checkin and checkout dates.- Parameters:
errors- the errorscheckInString- the checkin datecheckOutString- the checkout date
-
parseDate
Parse string to date.- Parameters:
date- the date- Returns:
- date
-