Class AuditAnnotationAspect
java.lang.Object
org.trustdeck.security.audittrail.annotation.AuditAnnotationAspect
Class that automatically intercepts the audit annotation and stores the collected information
using the same transaction as the database method.
- Author:
- Armin Müller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauditMethod(org.aspectj.lang.ProceedingJoinPoint joinPoint, Audit auditAnnotation) The method that intercepts the audit annotation, collects all necessary information and writes the audit trail to the database.
-
Constructor Details
-
AuditAnnotationAspect
public AuditAnnotationAspect()
-
-
Method Details
-
auditMethod
@Transactional(propagation=REQUIRED) public Object auditMethod(org.aspectj.lang.ProceedingJoinPoint joinPoint, Audit auditAnnotation) throws AuditTrailException The method that intercepts the audit annotation, collects all necessary information and writes the audit trail to the database.- Parameters:
joinPoint- the point where the process execution should proceed fromauditAnnotation- the audit annotation object that includes some audit information- Returns:
- the result of proceeding
- Throws:
AuditTrailException- if anything goes wrong while the audit trail is written, this exception is thrown in order to abort the current transaction and roll back to a consistent database state.
-