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 java.lang.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AUDIT_PATH_API_ROOT
public static final java.lang.String AUDIT_PATH_API_ROOT
- See Also:
- Constant Field Values
AUDIT_PATH_API_PRE
public static final java.lang.String AUDIT_PATH_API_PRE
- See Also:
- Constant Field Values
AUDIT_PATH_API_POST
public static final java.lang.String AUDIT_PATH_API_POST
- See Also:
- Constant Field Values
AUDIT_SNIPPET_ARGS
public static final java.lang.String AUDIT_SNIPPET_ARGS
- See Also:
- Constant Field Values
AUDIT_SNIPPET_RESULT
public static final java.lang.String AUDIT_SNIPPET_RESULT
- See Also:
- Constant Field Values
AUDIT_SNIPPET_ERROR
public static final java.lang.String AUDIT_SNIPPET_ERROR
- See Also:
- Constant Field Values
AUDIT_SNIPPET_NO_ERROR
public static final java.lang.String AUDIT_SNIPPET_NO_ERROR
- See Also:
- Constant Field Values
AuditMethodInterceptor
public AuditMethodInterceptor()
setUseNewConfig
public void setUseNewConfig(boolean useNewConfig)
- Use the new audit configuration (default: false)
- Parameters:
useNewConfig
- true to use the new audit configuration
setBeanIdentifier
public void setBeanIdentifier(BeanIdentifier beanIdentifier)
setAuditComponent
public void setAuditComponent(AuditComponent auditComponent)
setTransactionService
public void setTransactionService(TransactionService transactionService)
setThreadPoolExecutor
public void setThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor threadPoolExecutor)
invoke
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation mi)
throws java.lang.Throwable
- Specified by:
invoke
in interface org.aopalliance.intercept.MethodInterceptor
- Throws:
java.lang.Throwable
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.