Class QueryParamValidator
java.lang.Object
fr.paris.lutece.plugins.appointment.modules.rest.rs.filter.QueryParamValidator
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValideDate(String dateStr) Check that a date has the search format.static ValidationErrorResponsevalidate(jakarta.servlet.http.HttpServletRequest request) Validate the parameters of a search of available time slots: the meeting points and the dates are required, the meeting point ids are plain identifiers and the number of documents a positive integer.
-
Field Details
-
MEETING_IDS_REQUIRED
- See Also:
-
START_DATE_REQUIRED
- See Also:
-
START_DATE_INVALID
- See Also:
-
END_DATE_REQUIRED
- See Also:
-
END_DATE_INVALID
- See Also:
-
MEETING_IDS_INVALID
- See Also:
-
DOCUMENTS_NUMBER_INVALID
- See Also:
-
REQUIRED
- See Also:
-
INVALID
- See Also:
-
-
Method Details
-
validate
Validate the parameters of a search of available time slots: the meeting points and the dates are required, the meeting point ids are plain identifiers and the number of documents a positive integer.- Parameters:
request- the request- Returns:
- the validation errors, empty when the parameters are valid
-
isValideDate
Check that a date has the search format.- Parameters:
dateStr- the date- Returns:
- true if the date can be parsed
-