Class AssignmentNotificationSource

java.lang.Object
su.onno.ui.notifications.AssignmentNotificationSource

public class AssignmentNotificationSource extends Object
Built-in notification producer for record assignment. When a catalog or document with a Ref<> attribute annotated AssigneeField is created or updated and that attribute points at a user, the user is notified the record was assigned to them.

It listens on the framework's EntityChangedEvent, which carries no field values, so it reads the current assignee back from the row (its own committed transaction — the event fires after the write commits). Because the event also carries no previous value, a small in-memory last-assignee cache suppresses re-notifying on unrelated updates: a fresh notification fires on create, and on update only when the assignee actually changed. The cache is best-effort — after a restart the first update to a record may re-notify its current assignee once.

Only an AssigneeField whose target is the identity catalog raises a notification; one pointing elsewhere is ignored. Gated by onno.notifications.assignments.enabled (default true).

  • Constructor Details

  • Method Details

    • onChange

      @TransactionalEventListener(phase=AFTER_COMMIT, fallbackExecution=true) public void onChange(EntityChangedEvent event)