mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ALF-8968 - Extend ScriptAuthorityService to also allow the fetching of users, so that the JS layer can find people without needing lucene queries
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28423 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -82,30 +82,39 @@ public class ScriptPagingDetails extends PagingRequest
|
||||
*/
|
||||
public <R> void setTotalItems(PagingResults<R> results)
|
||||
{
|
||||
Integer min = results.getTotalResultCount().getFirst();
|
||||
Integer max = results.getTotalResultCount().getSecond();
|
||||
|
||||
// Get the total count and confidence
|
||||
if(min == null)
|
||||
if(results.getTotalResultCount() == null)
|
||||
{
|
||||
// No count calculated
|
||||
this.totalItems = -1;
|
||||
this.confidence = ItemsSizeConfidence.UNKNOWN;
|
||||
}
|
||||
else if(max == null)
|
||||
{
|
||||
this.totalItems = min;
|
||||
this.confidence = ItemsSizeConfidence.AT_LEAST;
|
||||
}
|
||||
else if(min == max)
|
||||
{
|
||||
this.totalItems = min;
|
||||
this.confidence = ItemsSizeConfidence.EXACT;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.totalItems = min;
|
||||
this.totalItemsRangeMax = max;
|
||||
this.confidence = ItemsSizeConfidence.RANGE;
|
||||
// Get the total count and confidence
|
||||
Integer min = results.getTotalResultCount().getFirst();
|
||||
Integer max = results.getTotalResultCount().getSecond();
|
||||
|
||||
if(min == null)
|
||||
{
|
||||
this.totalItems = -1;
|
||||
this.confidence = ItemsSizeConfidence.UNKNOWN;
|
||||
}
|
||||
else if(max == null)
|
||||
{
|
||||
this.totalItems = min;
|
||||
this.confidence = ItemsSizeConfidence.AT_LEAST;
|
||||
}
|
||||
else if(min == max)
|
||||
{
|
||||
this.totalItems = min;
|
||||
this.confidence = ItemsSizeConfidence.EXACT;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.totalItems = min;
|
||||
this.totalItemsRangeMax = max;
|
||||
this.confidence = ItemsSizeConfidence.RANGE;
|
||||
}
|
||||
}
|
||||
|
||||
// Finally record the query execution ID
|
||||
|
Reference in New Issue
Block a user