Class AuditAspect


  • @Service("auditAspect")
    public class AuditAspect
    extends Object
    Aspect 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 Detail

      • AuditAspect

        public AuditAspect()
    • 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 point
        entity - the entity that is being saved
        Returns:
        Throws:
        Throwable