Class ReservationConflictManagerImpl
java.lang.Object
ch.tocco.nice2.optional.reservation.impl.ReservationConflictManagerImpl
- All Implemented Interfaces:
ReservationConflictManager
@Component
public class ReservationConflictManagerImpl
extends Object
implements ReservationConflictManager
-
Field Summary
-
Constructor Summary
ConstructorDescriptionReservationConflictManagerImpl
(ConflictManager conflictManager, CalendarManager calendarManager, Context context) -
Method Summary
Modifier and TypeMethodDescriptionvoid
createConflictsForNewReservation
(Entity target, String relationName, CalendarEvent event) A new reservation for the target entity has been made which has been stored as aevent
in its calendar.getConflictingEntitiesTo
(DateTimeValue start, DateTimeValue end, String entityModel, String relationName) getConflictsFor
(List<PrimaryKey> targets, String model) Returns the conflicts for either a Reservation, Registration or Lecturer_booking entity.
-
Field Details
-
CONTEXT_ATTR_KEY
-
-
Constructor Details
-
ReservationConflictManagerImpl
public ReservationConflictManagerImpl(ConflictManager conflictManager, CalendarManager calendarManager, Context context)
-
-
Method Details
-
createConflictsForNewReservation
public void createConflictsForNewReservation(Entity target, String relationName, CalendarEvent event) Description copied from interface:ReservationConflictManager
A new reservation for the target entity has been made which has been stored as a
event
in its calendar. The event must be attached to the main calendar.This will then search for conflicts with other reservations for the specified event and saves them in the database.
- Specified by:
createConflictsForNewReservation
in interfaceReservationConflictManager
- Parameters:
target
- the entity which has a new reservation date added (example: "Room")relationName
- the relation name from the calendar event to the target entity (example: "relRoom")event
- theCalendarEvent
representing the time of the reservation. the event must be attached to a calendar
-
getConflictingEntitiesTo
public Iterable<PrimaryKey> getConflictingEntitiesTo(DateTimeValue start, DateTimeValue end, String entityModel, String relationName) - Specified by:
getConflictingEntitiesTo
in interfaceReservationConflictManager
-
getConflictsFor
Description copied from interface:ReservationConflictManager
Returns the conflicts for either a Reservation, Registration or Lecturer_booking entity.- Specified by:
getConflictsFor
in interfaceReservationConflictManager
-