Interface ReservationValidator

All Known Implementing Classes:
RestrictedReservationValidator

public interface ReservationValidator
Facade of validator for reservation entities.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Checks if clientId is valid as identifier of associated client for a reservation entity.
    validateDate(String stringDate)
    Checks if stringDate is valid as date for a reservation entity.
  • Method Details

    • validateClientId

      UUID validateClientId(UUID clientId) throws IllegalArgumentException
      Checks if clientId is valid as identifier of associated client for a reservation entity.
      Parameters:
      clientId - the associated client identifier to evaluate.
      Returns:
      a valid UUID of clientId.
      Throws:
      IllegalArgumentException - if clientId is not valid.
    • validateDate

      LocalDate validateDate(String stringDate) throws IllegalArgumentException
      Checks if stringDate is valid as date for a reservation entity.
      Parameters:
      stringDate - the string date to evaluate.
      Returns:
      a valid LocalDate of date.
      Throws:
      IllegalArgumentException - if stringDate is not valid.