Class ConflictingReservationsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.gustavblass.commons.exceptions.IllegalArgumentException
de.gustavblass.fsu.fmi.roombooking.exceptions.ConflictingReservationsException
- All Implemented Interfaces:
Serializable
@ResponseStatus(value=CONFLICT,
reason="The request to book a room was rejected because there already is at least one reservation for the time period.")
public class ConflictingReservationsException
extends de.gustavblass.commons.exceptions.IllegalArgumentException
Indicates that the
Reservation cannot be placed because there is already at least one reservation for the
Reservation.room between Reservation.startDate and Reservation.endDate.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intHow many Reservations are active between theReservation.startDateandReservation.endDateof the Reservation that was attempted to be placed. -
Constructor Summary
ConstructorsConstructorDescriptionConflictingReservationsException(int reservationCount) SeeException().ConflictingReservationsException(String message, int reservationCount) SeeException(String).ConflictingReservationsException(String message, Throwable cause, int reservationCount) ConflictingReservationsException(Throwable cause, int reservationCount) SeeException(Throwable). -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
reservationCount
private final int reservationCountHow many Reservations are active between theReservation.startDateandReservation.endDateof the Reservation that was attempted to be placed.
-
-
Constructor Details
-
ConflictingReservationsException
public ConflictingReservationsException(int reservationCount) SeeException(). -
ConflictingReservationsException
SeeException(String). -
ConflictingReservationsException
-
ConflictingReservationsException
SeeException(Throwable).
-