Class DataUpdaterAuditServiceImpl

java.lang.Object
ubic.gemma.core.loader.expression.DataUpdaterAuditServiceImpl
All Implemented Interfaces:
DataUpdaterAuditService

@Service public class DataUpdaterAuditServiceImpl extends Object implements DataUpdaterAuditService
Implementation of DataUpdaterAuditService: a thin co-bean that exists so recordDataReplaced(ExpressionExperiment, String) is invoked through a Spring proxy and the Audited aspect can intercept its return path and emit the DataReplacedEvent.

Previously this emission lived in a private audit(ee, note, replace) member of DataUpdaterImpl self-invoked via this. from three end-of-method callers (addAffyDataFromAPTOutput, reprocessAffyDataFromCel, replaceData) -- Spring AOP cannot intercept self-invocation, so the imperative auditTrailService.addUpdateEvent(ee, DataReplacedEvent.class, note) call could not be migrated to Audited during bucket 2g. The replace=false branch (picking DataAddedEvent) was retired when DataUpdaterImpl.addData migrated to @Audited directly in commit 40dd662883; only the replace=true path survives, so this hoist drops the boolean and writes DataReplacedEvent unconditionally.

The Transactional default propagation (REQUIRED) honours whichever transaction the caller is in. The three callers above run with @Transactional(propagation = NEVER), so each call to recordDataReplaced opens a fresh transaction here -- matching the pre-hoist behaviour (the imperative auditTrailService.addUpdateEvent also crossed a transactional service boundary on its way to the audit DAO).

  • Constructor Details

    • DataUpdaterAuditServiceImpl

      public DataUpdaterAuditServiceImpl()
  • Method Details

    • recordDataReplaced

      @Transactional @Audited(value=DataReplacedEvent.class, messageSpel="#note") public void recordDataReplaced(ExpressionExperiment ee, String note)
      Record a DataReplacedEvent against the given experiment with the supplied note. Dispatch is via the @Audited aspect.

      The Audited annotation drives emission through the AuditedAspect; this method body is intentionally a logging-only marker so the proxy-intercepted return triggers exactly one DataReplacedEvent.

      Specified by:
      recordDataReplaced in interface DataUpdaterAuditService
      Parameters:
      ee - experiment to audit
      note - free-text note stored in AUDIT_EVENT.NOTE
    • recordPlatformSwitch

      @Transactional @Audited(value=ExpressionExperimentPlatformSwitchEvent.class, messageSpel="#note") public void recordPlatformSwitch(ExpressionExperiment ee, String note)
      Record an ExpressionExperimentPlatformSwitchEvent against the given experiment with the supplied note. Dispatch is via the @Audited aspect.

      Three sites in DataUpdaterImpl (addAffyDataFromAPTOutput, reprocessAffyDataFromCel, replaceData) emit this event conditionally when a platform switch actually happens. Callers gate the call on their own if (!targetPlatform.equals(originalPlatform)) predicate, so this method is unconditional -- the absence of a call is the "no switch" signal.

      The Audited annotation drives emission through the AuditedAspect; this method body is intentionally a logging-only marker so the proxy-intercepted return triggers exactly one ExpressionExperimentPlatformSwitchEvent.

      Specified by:
      recordPlatformSwitch in interface DataUpdaterAuditService
      Parameters:
      ee - experiment to audit
      note - free-text note stored in AUDIT_EVENT.NOTE