mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Resolve ALF-4935: CMIS query interface returns incorrect total result count
- cmis query modified to hit configured permission limits, but paging still adhered to (so, only the appropriate rows are sent across the wire) - total count now reports the number of rows found before permission limits are hit git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22906 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -649,9 +649,8 @@ public class CMISScript extends BaseScopableProcessorExtension
|
||||
CMISQueryOptions options = new CMISQueryOptions(statement, cmisService.getDefaultRootStoreRef());
|
||||
options.setQueryMode(CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS);
|
||||
options.setSkipCount(unknownRows.getStartRow());
|
||||
options.setMaxItems(unknownRows.getPageSize());
|
||||
CMISResultSet resultSet = cmisQueryService.query(options);
|
||||
Cursor cursor = paging.createCursor(unknownRows.getStartRow() + resultSet.getLength() + (resultSet.hasMore() ? 1 : 0) , page);
|
||||
Cursor cursor = paging.createCursor(unknownRows.getStartRow() + resultSet.getLength(), page);
|
||||
return paging.createPagedResult(resultSet, cursor);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user