Class AuditedEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
ubic.gemma.core.security.audit.AuditedEvent
All Implemented Interfaces:
Serializable

public class AuditedEvent extends org.springframework.context.ApplicationEvent
Spring ApplicationEvent published by AuditedAspect every time an Audited-annotated method completes successfully. Lets downstream concerns (notification dispatch, analysis re-run triggers, cache eviction, etc.) react to a typed audit-trail write without bolting more logic into the aspect itself.

Subscribe with @TransactionalEventListener (or @EventListener if you do not need transaction-boundary semantics).

Phase A of AUDIT_SYSTEM_AUDIT.md.

See Also:
  • Constructor Details

    • AuditedEvent

      public AuditedEvent(Object source, Auditable target, AuditEventType eventType, @Nullable AuditEventPayload payload, AuditEvent auditEvent)
      Parameters:
      source - the originating object (typically the aspect bean itself; required by the ApplicationEvent contract).
      target - the Auditable to which the new AuditEvent was added.
      eventType - the resolved concrete type instance (same one stored on the AuditEvent).
      payload - the typed payload prior to JSON serialisation, or null when the Audited method declared no AuditEventPayload parameter.
      auditEvent - the persisted (or at least persisted-to-the-trail) AuditEvent row.
  • Method Details