MNT-16375 "CMISChangelog auditing enablement impacts CMIS connection if quantity records are excessive" replace use of template.select with template.selectList (to prevent MySQL streaming exceptions), fix up affected client classes, and add extra AuditDAOTests around audit query fromId, toId, fromTime, toTime and maxResults

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@129387 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2016-08-09 16:02:19 +00:00
parent 02ef5d3156
commit e559032bf9
7 changed files with 370 additions and 171 deletions

View File

@@ -599,18 +599,21 @@ public class TemplateNode extends BasePermissionsNode implements NamespacePrefix
String applicationName = "alfresco-access";
AuditQueryParameters pathParams = new AuditQueryParameters();
pathParams.setApplicationName(applicationName);
pathParams.addSearchKey("/alfresco-access/transaction/path", nodePath);
services.getAuditService().auditQuery(callback, pathParams, -1);
pathParams.addSearchKey("/alfresco-access/transaction/path", nodePath);
// unfortunately, the getAuditTrail API forces us to get them all
services.getAuditService().auditQuery(callback, pathParams, Integer.MAX_VALUE);
AuditQueryParameters copyFromPathParams = new AuditQueryParameters();
copyFromPathParams.setApplicationName(applicationName);
copyFromPathParams.addSearchKey("/alfresco-access/transaction/copy/from/path", nodePath);
services.getAuditService().auditQuery(callback, copyFromPathParams, -1);
copyFromPathParams.addSearchKey("/alfresco-access/transaction/copy/from/path", nodePath);
// unfortunately, the getAuditTrail API forces us to get them all
services.getAuditService().auditQuery(callback, copyFromPathParams, Integer.MAX_VALUE);
AuditQueryParameters moveFromPathParams = new AuditQueryParameters();
moveFromPathParams.setApplicationName(applicationName);
moveFromPathParams.addSearchKey("/alfresco-access/transaction/move/from/path", nodePath);
services.getAuditService().auditQuery(callback, moveFromPathParams, -1);
moveFromPathParams.addSearchKey("/alfresco-access/transaction/move/from/path", nodePath);
// unfortunately, the getAuditTrail API forces us to get them all
services.getAuditService().auditQuery(callback, moveFromPathParams, Integer.MAX_VALUE);
return null;
}
}, AuthenticationUtil.getAdminUserName());