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:
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
|
||||
import org.alfresco.cmis.CMISResultSet;
|
||||
import org.alfresco.repo.web.scripts.RepositoryImageResolver;
|
||||
import org.alfresco.repo.web.util.paging.Cursor;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.TemplateImageResolver;
|
||||
|
||||
@@ -60,7 +61,7 @@ public final class CMISResultSetMethod implements TemplateMethodModelEx
|
||||
{
|
||||
CMISTemplateResultSet resultSet = null;
|
||||
|
||||
if (args.size() == 1)
|
||||
if (args.size() > 0)
|
||||
{
|
||||
Object arg0 = args.get(0);
|
||||
if (arg0 instanceof BeanModel)
|
||||
@@ -71,7 +72,20 @@ public final class CMISResultSetMethod implements TemplateMethodModelEx
|
||||
{
|
||||
if (wrapped instanceof CMISResultSet)
|
||||
{
|
||||
resultSet = new CMISTemplateResultSet((CMISResultSet)wrapped, serviceRegistry, imageResolver);
|
||||
Cursor cursor = null;
|
||||
if (args.size() == 2)
|
||||
{
|
||||
Object arg1 = args.get(1);
|
||||
if (arg1 instanceof BeanModel)
|
||||
{
|
||||
Object wrapped1 = ((BeanModel)arg1).getWrappedObject();
|
||||
if (wrapped1 != null && wrapped1 instanceof Cursor)
|
||||
{
|
||||
cursor = (Cursor)wrapped1;
|
||||
}
|
||||
}
|
||||
}
|
||||
resultSet = new CMISTemplateResultSet((CMISResultSet)wrapped, cursor, serviceRegistry, imageResolver);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user