Interface AuditTrailService
-
- All Superinterfaces:
BaseImmutableService<AuditTrail>,BaseReadOnlyService<AuditTrail>
- All Known Implementing Classes:
AuditTrailServiceImpl
public interface AuditTrailService extends BaseImmutableService<AuditTrail>
Create and manipulate audit trails.This service is mainly intended to create audit events manually. Part of the auditing is done automatically using aspects via
AuditAdvice.- Author:
- kelsey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuditEventaddUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note)AuditEventaddUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note, String detail)AuditEventaddUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note, String detail, Date performedDate)Add an update audit event of a specific type to the passed auditable entity.AuditEventaddUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note, Throwable throwable)Add an update audit event with an exception.AuditEventaddUpdateEvent(Auditable auditable, String note)Add an update event defined by the given parameters, to the given auditable.AuditTrailcreate(AuditTrail auditTrail)Creates the given entity in the persistent storage.List<AuditEvent>getEvents(Auditable auditable)-
Methods inherited from interface ubic.gemma.persistence.service.BaseImmutableService
create, findOrCreate, remove, remove, remove
-
Methods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, find, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail
-
-
-
-
Method Detail
-
addUpdateEvent
@Secured("GROUP_AGENT") AuditEvent addUpdateEvent(Auditable auditable, String note)Add an update event defined by the given parameters, to the given auditable. Returns the generated event.- Parameters:
auditable- the entitynote- a short note (optional)- Returns:
- the newly created event, which will be somewhere in the auditable's
AuditTrail.getEvents()collection.
-
addUpdateEvent
@Secured("GROUP_AGENT") AuditEvent addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note)
-
addUpdateEvent
@Secured("GROUP_AGENT") AuditEvent addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, @Nullable String note, String detail)
-
addUpdateEvent
@Secured("GROUP_AGENT") AuditEvent addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, @Nullable String note, Throwable throwable)Add an update audit event with an exception.Unlike
addUpdateEvent(Auditable, Class, String, String, Date), the audit event produced by this method cannot be rolled back, so you may freely raise the exception. This is achieved by usingPropagation.REQUIRES_NEW.
-
addUpdateEvent
@Secured("GROUP_AGENT") AuditEvent addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, @Nullable String note, @Nullable String detail, Date performedDate)Add an update audit event of a specific type to the passed auditable entity.- Parameters:
auditable- the entity being auditedtype- the audit event typenote- a short note (optional)detail- full details for that eventperformedDate- the moment the audit was performed (must not be in the future!)- Returns:
- the newly created event, which will be somewhere in the auditable's
AuditTrail.getEvents()collection.
-
create
@Secured("GROUP_USER") AuditTrail create(AuditTrail auditTrail)Description copied from interface:BaseImmutableServiceCreates the given entity in the persistent storage.- Specified by:
createin interfaceBaseImmutableService<AuditTrail>- Parameters:
auditTrail- the entity to be created.- Returns:
- object referencing the persistent instance of the given entity.
-
getEvents
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") List<AuditEvent> getEvents(Auditable auditable)
-
-