Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

91636: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud)
      91586: Missing license headers and improve method comments


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94823 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 11:37:17 +00:00
parent ed32b91ee6
commit a5fd70c692
2 changed files with 37 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2005-2010 Alfresco Software Limited. * Copyright (C) 2005-2014 Alfresco Software Limited.
* *
* This file is part of Alfresco * This file is part of Alfresco
* *
@@ -120,20 +120,20 @@ public class ScriptUtils extends BaseScopableProcessorExtension
} }
/** /**
* Use the Node Locator Service to find the given root node from a number of possible locator types. * Use the Node Locator Service to find the a node reference from a number of possible locator types.
* This method is responsible for determining the locator type and then calling the Service as the * This method is responsible for determining the locator type and then calling the Service as the
* Service does not know how to guess which locator to use. * Service does not know how to guess which locator to use.
* <p> * <p>
* This service supports 'virtual' nodes including the following: * This service supports 'virtual' nodes including the following:
* <p> * <p>
* alfresco://company/home The Company Home root node * alfresco://company/home The Company Home root node<br>
* alfresco://user/home The User Home node under Company Home * alfresco://user/home The User Home node under Company Home<br>
* alfresco://company/shared The Shared node under Company Home * alfresco://company/shared The Shared node under Company Home<br>
* alfresco://sites/home The Sites home node under Company Home * alfresco://sites/home The Sites home node under Company Home<br>
* workspace://.../... Any standard NodeRef * workspace://.../... Any standard NodeRef<br>
* /app:company_home/cm:... XPath QName style node reference * /app:company_home/cm:... XPath QName style node reference<br>
* *
* @param rootNode * @param reference The node reference - See above for list of possible node references supported.
* *
* @return ScriptNode representing the node or null if not found * @return ScriptNode representing the node or null if not found
*/ */
@@ -292,6 +292,13 @@ public class ScriptUtils extends BaseScopableProcessorExtension
* Builds a paging object, from the supplied Args object. * Builds a paging object, from the supplied Args object.
* Requires that the parameters have their standard names, * Requires that the parameters have their standard names,
* i.e. "maxItems" and "skipCount" * i.e. "maxItems" and "skipCount"
*
* @param args Mandatory hash of paging arguments<p>
* Possible arguments include:<p>
* maxItems - max count of items to return, default -1 (all)<br>
* skipCount - number of items to skip, default -1 (none)<br>
* queryId<br>
* queryExecutionId
*/ */
public ScriptPagingDetails createPaging(Map<String, String> args) public ScriptPagingDetails createPaging(Map<String, String> args)
{ {
@@ -299,7 +306,7 @@ public class ScriptUtils extends BaseScopableProcessorExtension
int skipCount = -1; int skipCount = -1;
String queryId = null; String queryId = null;
if(args.containsKey("maxItems")) if (args.containsKey("maxItems"))
{ {
try try
{ {
@@ -308,7 +315,7 @@ public class ScriptUtils extends BaseScopableProcessorExtension
catch(NumberFormatException e) catch(NumberFormatException e)
{} {}
} }
if(args.containsKey("skipCount")) if (args.containsKey("skipCount"))
{ {
try try
{ {
@@ -318,7 +325,7 @@ public class ScriptUtils extends BaseScopableProcessorExtension
{} {}
} }
if(args.containsKey("queryId")) if (args.containsKey("queryId"))
{ {
queryId = args.get("queryId"); queryId = args.get("queryId");
} }

View File

@@ -1,3 +1,21 @@
/*
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.util; package org.alfresco.util;
import org.alfresco.query.PagingRequest; import org.alfresco.query.PagingRequest;