Class AcceptedConflictEntityListener
java.lang.Object
ch.tocco.nice2.persist.core.api.entity.events.InterruptibleEntityFacadeAdapter
ch.tocco.nice2.optional.reservation.impl.entitylistener.AcceptedConflictEntityListener
- All Implemented Interfaces:
EntityFacadeListener
,EventListener
Listener to update conflict status, when the "accepted" field on a conflict changes.
Step 1: Resolve the "conflict-target". This can be one of the following: - Lecturer_booking - Registration - Reservation (for Room and Appliance)
Step 2: Find all other Conflicts for the target as followed: - Lecturer_booking.relReservation_lecturer_booking.relCalendar_event.relConflict1 or relConflict2 - Registration.relReservation_registration.relCalendar_event.relConflict1 or relConflict2 - Reservation.relCalendar_event.relConflict1 or relConflict2
Step 3: Check if all related conflicts and the current conflict of this listener are "accepted" if so, set relReservation_conflict_status to "accepted" on the "conflict-target". If not, set relReservation_conflict_status to "existing"
-
Constructor Summary
ConstructorDescriptionAcceptedConflictEntityListener
(QueryBuilderFactory queryBuilderFactory, Context context, SecurityManager securityManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
setConflictHandlingViaBatchjob
(boolean conflictHandlingViaBatchjob) Methods inherited from class ch.tocco.nice2.persist.core.api.entity.events.InterruptibleEntityFacadeAdapter
entityChanging, entityCreating, entityCreatingInterruptible, entityDeleting, entityDeletingInterruptible, entityReceivedValues, entityReceivedValuesInterruptible, entityRelationChanging, entityRelationChangingInterruptible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.entity.events.EntityFacadeListener
handleSessionOnlyEntity
-
Constructor Details
-
AcceptedConflictEntityListener
public AcceptedConflictEntityListener(QueryBuilderFactory queryBuilderFactory, Context context, SecurityManager securityManager)
-
-
Method Details
-
setConflictHandlingViaBatchjob
@Value("${feauture.conflicthandling.batchjob}") public void setConflictHandlingViaBatchjob(boolean conflictHandlingViaBatchjob) -
entityChangingInterruptible
- Overrides:
entityChangingInterruptible
in classInterruptibleEntityFacadeAdapter
-