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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReservationConflictManagerImpl(ConflictManager conflictManager, CalendarManager calendarManager, Context context) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateConflictsForNewReservation(Entity target, String relationName, CalendarEvent event) A new reservation for the target entity has been made which has been stored as aeventin 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:ReservationConflictManagerA new reservation for the target entity has been made which has been stored as a
eventin 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:
createConflictsForNewReservationin 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- theCalendarEventrepresenting 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:
getConflictingEntitiesToin interfaceReservationConflictManager
-
getConflictsFor
Description copied from interface:ReservationConflictManagerReturns the conflicts for either a Reservation, Registration or Lecturer_booking entity.- Specified by:
getConflictsForin interfaceReservationConflictManager
-