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:
Derek Hulley
2009-09-25 12:14:30 +00:00
parent 5f50bf11e7
commit c5b731763d
4 changed files with 62 additions and 1 deletions

View File

@@ -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);
}