Class PreboardedAuditServiceImpl

java.lang.Object
ubic.gemma.persistence.service.expression.experiment.PreboardedAuditServiceImpl
All Implemented Interfaces:
PreboardedAuditService

@Service public class PreboardedAuditServiceImpl extends Object implements PreboardedAuditService
Implementation of PreboardedAuditService: a thin co-bean that exists so recordPreboardedCreated(PreboardedExperiment, String) is invoked through a Spring proxy and the @Audited aspect can intercept its return path and emit the PreboardedCreatedEvent.

The AuditedAspect can only locate an Auditable target on the argument list (see AuditedAspect#findAuditable); the original imperative call in PreboardedExperimentServiceImpl.createPreboarded targeted a freshly constructed PreboardedExperiment that was not in the argument list. Hoisting to this co-bean lets the target be passed in as the first argument.

The Transactional default propagation (REQUIRED) joins the wrapping @Transactional on createPreboarded.

  • Constructor Details

    • PreboardedAuditServiceImpl

      public PreboardedAuditServiceImpl()
  • Method Details

    • recordPreboardedCreated

      @Transactional @Audited(value=PreboardedCreatedEvent.class, messageSpel="'Preboarded created for accession ' + #accession") public void recordPreboardedCreated(PreboardedExperiment preboarded, String accession)
      Record a PreboardedCreatedEvent against the freshly persisted preboarded with a note that interpolates the accession. 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 PreboardedCreatedEvent.

      Specified by:
      recordPreboardedCreated in interface PreboardedAuditService
      Parameters:
      preboarded - the freshly persisted preboarded; receives the audit row
      accession - the accession the preboarded was created for; included in the note