Class ExternalDatabaseReleaseAuditServiceImpl

java.lang.Object
ubic.gemma.persistence.service.common.description.ExternalDatabaseReleaseAuditServiceImpl
All Implemented Interfaces:
ExternalDatabaseReleaseAuditService

@Service public class ExternalDatabaseReleaseAuditServiceImpl extends Object implements ExternalDatabaseReleaseAuditService
Implementation of ExternalDatabaseReleaseAuditService. The Audited aspect intercepts recordReleaseDetailsUpdate(ExternalDatabase, String, ReleaseDetailsUpdatePayload) on return, picks up the ReleaseDetailsUpdatePayload argument, serialises it to JSON and writes it to AUDIT_EVENT.PAYLOAD via addUpdateEventWithPayload. The note parameter is forwarded into AUDIT_EVENT.NOTE via messageSpel = "#note".

Default propagation (REQUIRED) so the audit row joins the caller's surrounding transaction -- the callers (updateReleaseDetails and updateReleaseLastUpdated on ExternalDatabaseServiceImpl) are themselves @Transactional and the audit event must mutate the same in-memory audit trail bag so existing assertions on ed.getAuditTrail().getEvents() continue to see the new row immediately. Contrast with OutlierFlaggingAuditServiceImpl (which uses REQUIRES_NEW because its caller runs with Propagation.NEVER).

Phase C bucket 2g (audit-residual inventory #9 + #10). Replaces the legacy imperative 5-arg auditTrailService.addUpdateEvent(ed, ReleaseDetailsUpdateEvent.class, note, detail, lastUpdated) calls.