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
ConstructorsConstructorDescriptionAcceptedConflictEntityListener(QueryBuilderFactory queryBuilderFactory, Context context, SecurityManager securityManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidsetConflictHandlingViaBatchjob(boolean conflictHandlingViaBatchjob) Methods inherited from class InterruptibleEntityFacadeAdapter
entityChanging, entityCreating, entityCreatingInterruptible, entityDeleting, entityDeletingInterruptible, entityReceivedValues, entityReceivedValuesInterruptible, entityRelationChanging, entityRelationChangingInterruptibleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
entityChangingInterruptiblein classInterruptibleEntityFacadeAdapter
-