mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Audit enhancements
- Added marker data extractor to record the presence of a key in the audit data - AuditMethodInterceptor applies a marker key in the case of success (failure already has a key) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16519 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -71,6 +71,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
* ...
|
||||
* /result=<value>
|
||||
* /error=<value>
|
||||
* /no-error=<null>
|
||||
*
|
||||
* </pre>
|
||||
* Applications can remap the paths onto their configurations as appropriate.
|
||||
@@ -87,6 +88,7 @@ public class AuditMethodInterceptor implements MethodInterceptor
|
||||
public static final String AUDIT_SNIPPET_ARGS = "/args";
|
||||
public static final String AUDIT_SNIPPET_RESULT = "/result";
|
||||
public static final String AUDIT_SNIPPET_ERROR = "/error";
|
||||
public static final String AUDIT_SNIPPET_NO_ERROR = "/no-error";
|
||||
|
||||
private static final Log logger = LogFactory.getLog(AuditMethodInterceptor.class);
|
||||
|
||||
@@ -417,6 +419,8 @@ public class AuditMethodInterceptor implements MethodInterceptor
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add the "no error" indicator
|
||||
auditData.put(AUDIT_SNIPPET_NO_ERROR, null);
|
||||
// The current transaction will be fine
|
||||
auditedData = auditComponent.recordAuditValues(rootPath, auditData);
|
||||
}
|
||||
|
Reference in New Issue
Block a user