Class ExpressionExperimentWriteAuditServiceImpl
- All Implemented Interfaces:
ExpressionExperimentWriteAuditService
ExpressionExperimentWriteAuditService.
Each method body is intentionally a logging-only marker: the
Audited.valueSpel() attribute on the annotation drives the actual
audit-row emission through AuditedAspect, which resolves the
concrete PreferredDataChangedEvent subclass from the
vectorType parameter via
ExpressionExperimentWriteServiceImpl.getPreferredDataChangedEventForVectorType(Class)
(now a public static helper so it is reachable from SpEL).
Replaces the imperative auditTrailService.addUpdateEvent(...)
calls in ExpressionExperimentWriteServiceImpl.updateQuantitationType(ExpressionExperiment, QuantitationType, QuantitationType)
(inventory #15/#16 in AUDIT_RESIDUAL_INVENTORY.md).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrecordPreferredQtChanged(ExpressionExperiment ee, QuantitationType qt, QuantitationType previousPreferredQt, Class<? extends DataVector> vectorType) Audit that the preferredQuantitationTypefor the given vector type changed toqt.voidrecordPreferredQtCleared(ExpressionExperiment ee, QuantitationType previousPreferredQt, Class<? extends DataVector> vectorType) Audit that the preferredQuantitationTypefor the given vector type was cleared (the previously-preferred QT is no longer preferred).
-
Constructor Details
-
ExpressionExperimentWriteAuditServiceImpl
public ExpressionExperimentWriteAuditServiceImpl()
-
-
Method Details
-
recordPreferredQtChanged
@Transactional @Audited(valueSpel="T(ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentWriteServiceImpl).getPreferredDataChangedEventForVectorType(#vectorType)", messageSpel="'The preferred quantitation type for ' + #vectorType.simpleName + ' changed' + (#previousPreferredQt != null ? ' from ' + #previousPreferredQt : '') + ' to ' + #qt + '.'") public void recordPreferredQtChanged(ExpressionExperiment ee, QuantitationType qt, @Nullable QuantitationType previousPreferredQt, Class<? extends DataVector> vectorType) Audit that the preferredQuantitationTypefor the given vector type changed toqt. The recorded event class is thePreferredDataChangedEventsubclass matchingvectorType(seeExpressionExperimentWriteServiceImpl.getPreferredDataChangedEventForVectorType(Class)); the caller is responsible for not invoking this method when no event class exists for the vector type (e.g. processed data).The
valueSpelexpression resolves to a concrete subclass ofPreferredDataChangedEventchosen byvectorType; themessageSpelformats the historical "The preferred quantitation type for X changed [from Y] to Z." note.- Specified by:
recordPreferredQtChangedin interfaceExpressionExperimentWriteAuditService- Parameters:
ee- the experiment whose preferred QT changedqt- the new preferred QTpreviousPreferredQt- the prior preferred QT (may be null)vectorType- the data-vector type that drives event-class dispatch
-
recordPreferredQtCleared
@Transactional @Audited(valueSpel="T(ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentWriteServiceImpl).getPreferredDataChangedEventForVectorType(#vectorType)", messageSpel="'The preferred quantitation type for ' + #vectorType.simpleName + ' was cleared (previously ' + #previousPreferredQt + ').'") public void recordPreferredQtCleared(ExpressionExperiment ee, QuantitationType previousPreferredQt, Class<? extends DataVector> vectorType) Audit that the preferredQuantitationTypefor the given vector type was cleared (the previously-preferred QT is no longer preferred). Same dispatch rule asExpressionExperimentWriteAuditService.recordPreferredQtChanged(ExpressionExperiment, QuantitationType, QuantitationType, Class).Same dispatch as
recordPreferredQtChanged(ExpressionExperiment, QuantitationType, QuantitationType, Class); themessageSpelformats the historical "The preferred quantitation type for X was cleared (previously Y)." note.- Specified by:
recordPreferredQtClearedin interfaceExpressionExperimentWriteAuditService- Parameters:
ee- the experiment whose preferred QT was clearedpreviousPreferredQt- the QT that used to be preferred (non-null)vectorType- the data-vector type that drives event-class dispatch
-