cancel
Showing results for 
Search instead for 
Did you mean: 

Audit Querying

hackyou
Champ in-the-making
Champ in-the-making
I have a issue using the audit query system. I have started the dod5015 and the new one alfresco-access audit systems, but i cant filter correctly the desired data.
Example:
using alfresco-access i want to know all the copy actions. What is the correct query url? I have tried many option, but nothing is working
1 REPLY 1

hackyou
Champ in-the-making
Champ in-the-making
it turns out that i am asking correctly, however alfresco-access audit is not saving the data.
i think jira issue should be rised but i will provide you the fix. i hope it will help someone !

   private class AccessTransactionListener extends TransactionListenerAdapter {
      @SuppressWarnings("synthetic-access")
      @Override
      public void afterCommit() {
         final Map<NodeRef, NodeChange> changedNodes = TransactionalResourceHelper
               .getMap(this);
                                               //new transaction is needed - it looks like recordAuditValues executions depends on the db
         RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>() {
            @Override
            public Void execute() throws Throwable {

               for (Map.Entry<NodeRef, NodeChange> entry : changedNodes
                     .entrySet()) {
                  NodeChange nodeChange = entry.getValue();
                  if (!nodeChange.isTemporaryNode()) {
                     Map<String, Serializable> auditMap = nodeChange
                           .getAuditData(false);
                     recordAuditValues(TRANSACTION, auditMap);
                  }
               }
               return null;

            }
         };
         transactionService.getRetryingTransactionHelper().doInTransaction(
               callback, false, true);
      }
   }
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍