Package ubic.gemma.core.security.audit
Class AuditAdvice
- java.lang.Object
-
- ubic.gemma.core.security.audit.AuditAdvice
-
@Component @ParametersAreNonnullByDefault public class AuditAdvice extends Object
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 Constructor Description AuditAdvice()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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.
-
-
-
Method Detail
-
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
.
-
doUpdateAdvice
public void doUpdateAdvice(org.aspectj.lang.JoinPoint pjp)
Perform auditing when entities are updated.This audit will cascade on
CascadeStyle.UPDATE
.
-
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
.
-
doDeleteAdvice
public void doDeleteAdvice(org.aspectj.lang.JoinPoint pjp)
Perform auditing when entities are deleted.This audit will cascade on
CascadeStyle.DELETE
.
-
extractAuditables
public static Collection<Auditable> extractAuditables(Object object)
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.
-
-