Class DataUpdaterAuditServiceImpl
- All Implemented Interfaces:
DataUpdaterAuditService
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrecordDataReplaced(ExpressionExperiment ee, String note) Record aDataReplacedEventagainst the given experiment with the supplied note.voidrecordPlatformSwitch(ExpressionExperiment ee, String note) Record anExpressionExperimentPlatformSwitchEventagainst the given experiment with the supplied note.
-
Constructor Details
-
DataUpdaterAuditServiceImpl
public DataUpdaterAuditServiceImpl()
-
-
Method Details
-
recordDataReplaced
@Transactional @Audited(value=DataReplacedEvent.class, messageSpel="#note") public void recordDataReplaced(ExpressionExperiment ee, String note) Record aDataReplacedEventagainst the given experiment with the supplied note. Dispatch is via the@Auditedaspect.The
Auditedannotation drives emission through theAuditedAspect; this method body is intentionally a logging-only marker so the proxy-intercepted return triggers exactly oneDataReplacedEvent.- Specified by:
recordDataReplacedin interfaceDataUpdaterAuditService- Parameters:
ee- experiment to auditnote- free-text note stored inAUDIT_EVENT.NOTE
-
recordPlatformSwitch
@Transactional @Audited(value=ExpressionExperimentPlatformSwitchEvent.class, messageSpel="#note") public void recordPlatformSwitch(ExpressionExperiment ee, String note) Record anExpressionExperimentPlatformSwitchEventagainst the given experiment with the supplied note. Dispatch is via the@Auditedaspect.Three sites in
DataUpdaterImpl(addAffyDataFromAPTOutput,reprocessAffyDataFromCel,replaceData) emit this event conditionally when a platform switch actually happens. Callers gate the call on their ownif (!targetPlatform.equals(originalPlatform))predicate, so this method is unconditional -- the absence of a call is the "no switch" signal.The
Auditedannotation drives emission through theAuditedAspect; this method body is intentionally a logging-only marker so the proxy-intercepted return triggers exactly oneExpressionExperimentPlatformSwitchEvent.- Specified by:
recordPlatformSwitchin interfaceDataUpdaterAuditService- Parameters:
ee- experiment to auditnote- free-text note stored inAUDIT_EVENT.NOTE
-