Package com.ocs.dynamo.aop
Class AuditAspect
- java.lang.Object
-
- com.ocs.dynamo.aop.AuditAspect
-
@Service("auditAspect") public class AuditAspect extends ObjectAspect for intercepting calls and automatically setting audit information (created by/created on etc) Can be used in your application simply by adding "com.ocs.dynamo.aop" to the list of packages to scan for components- Author:
- bas.rutten
-
-
Constructor Summary
Constructors Constructor Description AuditAspect()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidanySaveMethod()Intercept all save methods on all classes that inherit from BaseServiceObjectauditSave(org.aspectj.lang.ProceedingJoinPoint joinPoint, AbstractAuditableEntity<?> entity)intercept any method that saves an auditable entity
-
-
-
Method Detail
-
anySaveMethod
public static void anySaveMethod()
Intercept all save methods on all classes that inherit from BaseService
-
auditSave
public Object auditSave(org.aspectj.lang.ProceedingJoinPoint joinPoint, AbstractAuditableEntity<?> entity) throws Throwable
intercept any method that saves an auditable entity- Parameters:
joinPoint- the join pointentity- the entity that is being saved- Returns:
- Throws:
Throwable
-
-