Package org.alfresco.repo.audit
Class AuditMethodInterceptor
java.lang.Object
org.alfresco.repo.audit.AuditMethodInterceptor
- All Implemented Interfaces:
org.aopalliance.aop.Advice,org.aopalliance.intercept.Interceptor,org.aopalliance.intercept.MethodInterceptor
public class AuditMethodInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor
A method interceptor to wrap method invocations with auditing.
V3.2 Configuration: As of V3.2, the pre- and post-invocation values are passed to the audit component for processing. Individual applications have to extract the desired audit values. Values are audited before and after the invocation so that applications that desire to extract derived data before the invocation can have a chance to do so; generally, however, the post-invocation values will be the most useful.
The values passed to the audit component (assuming auditing is enabled and the new configuration is being used) are:
/alfresco-api
/pre
/<service>
/<method>
/args
/<arg-name>=<value>
/<arg-name>=<value>
...
/service
/post
/<service>
/<method>
/args
/<arg-name>=<value>
/<arg-name>=<value>
...
/result=<value>
/error=<value>
/no-error=<null>
Applications can remap the paths onto their configurations as appropriate.
TODO: Audit configuration mapping needs to support conditionals- Author:
- Andy Hind, Derek Hulley
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninvoke(org.aopalliance.intercept.MethodInvocation mi) voidsetAuditComponent(AuditComponent auditComponent) voidsetBeanIdentifier(BeanIdentifier beanIdentifier) voidsetThreadPoolExecutor(ThreadPoolExecutor threadPoolExecutor) voidsetTransactionService(TransactionService transactionService) voidsetUseNewConfig(boolean useNewConfig) Use the new audit configuration (default: false)
-
Field Details
-
AUDIT_PATH_API_ROOT
- See Also:
-
AUDIT_PATH_API_PRE
- See Also:
-
AUDIT_PATH_API_POST
- See Also:
-
AUDIT_SNIPPET_ARGS
- See Also:
-
AUDIT_SNIPPET_PRE_CALL_DATA
- See Also:
-
AUDIT_SNIPPET_RESULT
- See Also:
-
AUDIT_SNIPPET_ERROR
- See Also:
-
AUDIT_SNIPPET_NO_ERROR
- See Also:
-
-
Constructor Details
-
AuditMethodInterceptor
public AuditMethodInterceptor()
-
-
Method Details
-
setUseNewConfig
public void setUseNewConfig(boolean useNewConfig) Use the new audit configuration (default: false)- Parameters:
useNewConfig- true to use the new audit configuration
-
setBeanIdentifier
-
setAuditComponent
-
setTransactionService
-
setThreadPoolExecutor
-
invoke
- Specified by:
invokein interfaceorg.aopalliance.intercept.MethodInterceptor- Throws:
Throwable
-