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 Modifier and Type Field Description static StringAUDIT_PATH_API_POSTstatic StringAUDIT_PATH_API_PREstatic StringAUDIT_PATH_API_ROOTstatic StringAUDIT_SNIPPET_ARGSstatic StringAUDIT_SNIPPET_ERRORstatic StringAUDIT_SNIPPET_NO_ERRORstatic StringAUDIT_SNIPPET_PRE_CALL_DATAstatic StringAUDIT_SNIPPET_RESULT
-
Constructor Summary
Constructors Constructor Description AuditMethodInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectinvoke(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 Detail
-
AUDIT_PATH_API_ROOT
public static final String AUDIT_PATH_API_ROOT
- See Also:
- Constant Field Values
-
AUDIT_PATH_API_PRE
public static final String AUDIT_PATH_API_PRE
- See Also:
- Constant Field Values
-
AUDIT_PATH_API_POST
public static final String AUDIT_PATH_API_POST
- See Also:
- Constant Field Values
-
AUDIT_SNIPPET_ARGS
public static final String AUDIT_SNIPPET_ARGS
- See Also:
- Constant Field Values
-
AUDIT_SNIPPET_PRE_CALL_DATA
public static final String AUDIT_SNIPPET_PRE_CALL_DATA
- See Also:
- Constant Field Values
-
AUDIT_SNIPPET_RESULT
public static final String AUDIT_SNIPPET_RESULT
- See Also:
- Constant Field Values
-
AUDIT_SNIPPET_ERROR
public static final String AUDIT_SNIPPET_ERROR
- See Also:
- Constant Field Values
-
AUDIT_SNIPPET_NO_ERROR
public static final String AUDIT_SNIPPET_NO_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
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(ThreadPoolExecutor threadPoolExecutor)
-
-