Merged 5.2.N (5.2.1) to HEAD (5.2)

131073 gjames: SEARCH-189: Always return skipCount and maxItems


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@132213 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-11-03 13:30:45 +00:00
parent df49027de6
commit 04c7261d59
8 changed files with 182 additions and 32 deletions

View File

@@ -342,11 +342,23 @@ public interface RecognizedParamsExtractor
*/
default Paging findPaging(WebScriptRequest req)
{
int skipped = Paging.DEFAULT_SKIP_COUNT;
int max = Paging.DEFAULT_MAX_ITEMS;
String skip = req.getParameter(PARAM_PAGING_SKIP);
String maxItems = req.getParameter(PARAM_PAGING_MAX);
return getPaging(skip,maxItems);
}
/**
* Gets the default paging object
* @param skip
* @param maxItems
* @return
*/
default Paging getPaging(String skip, String maxItems)
{
int skipped = Paging.DEFAULT_SKIP_COUNT;
int max = Paging.DEFAULT_MAX_ITEMS;
try
{
if (skip != null) { skipped = Integer.parseInt(skip);}