Package ubic.gemma.core.security.audit
Class AuditAdvice
java.lang.Object
ubic.gemma.core.security.audit.AuditAdvice
Manage audit trails on objects.
When an auditable entity is created, updated or deleted, this advice will automatically populate the audit trail with appropriate audit events before the operation occurs.
- Author:
- pavlidis, poirigui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doCreateAdvice
(org.aspectj.lang.JoinPoint pjp) Perform the audit advice on when entities are created.void
doDeleteAdvice
(org.aspectj.lang.JoinPoint pjp) Perform auditing when entities are deleted.void
doSaveAdvice
(org.aspectj.lang.JoinPoint pjp) Perform auditing when entities are saved.void
doUpdateAdvice
(org.aspectj.lang.JoinPoint pjp) Perform auditing when entities are updated.static Collection
<Auditable> extractAuditables
(Object object) Efficiently extract all auditable of a given type in an object's tree.
-
Constructor Details
-
AuditAdvice
public AuditAdvice()
-
-
Method Details
-
doCreateAdvice
public void doCreateAdvice(org.aspectj.lang.JoinPoint pjp) Perform the audit advice on when entities are created.This audit will cascade on
CascadeStyle.PERSIST
.- See Also:
-
doUpdateAdvice
public void doUpdateAdvice(org.aspectj.lang.JoinPoint pjp) Perform auditing when entities are updated.This audit will cascade on
CascadeStyle.UPDATE
.- See Also:
-
doSaveAdvice
public void doSaveAdvice(org.aspectj.lang.JoinPoint pjp) Perform auditing when entities are saved.This audit will cascade on
CascadeStyle.PERSIST
if the audited entity is transient elseCascadeStyle.MERGE
.- See Also:
-
doDeleteAdvice
public void doDeleteAdvice(org.aspectj.lang.JoinPoint pjp) Perform auditing when entities are deleted.This audit will cascade on
CascadeStyle.DELETE
.- See Also:
-
extractAuditables
Efficiently extract all auditable of a given type in an object's tree.This method traverses
Map
,Collection
,Iterable
and Java arrays, but not properties and fields of objects.
-