diff --git a/source/java/org/alfresco/repo/jscript/ScriptUtils.java b/source/java/org/alfresco/repo/jscript/ScriptUtils.java index 586f1c5142..8b889be46f 100644 --- a/source/java/org/alfresco/repo/jscript/ScriptUtils.java +++ b/source/java/org/alfresco/repo/jscript/ScriptUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2010 Alfresco Software Limited. + * Copyright (C) 2005-2014 Alfresco Software Limited. * * 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 * Service does not know how to guess which locator to use. *

* This service supports 'virtual' nodes including the following: *

- * alfresco://company/home The Company Home root node - * alfresco://user/home The User Home node under Company Home - * alfresco://company/shared The Shared node under Company Home - * alfresco://sites/home The Sites home node under Company Home - * workspace://.../... Any standard NodeRef - * /app:company_home/cm:... XPath QName style node reference + * alfresco://company/home The Company Home root node
+ * alfresco://user/home The User Home node under Company Home
+ * alfresco://company/shared The Shared node under Company Home
+ * alfresco://sites/home The Sites home node under Company Home
+ * workspace://.../... Any standard NodeRef
+ * /app:company_home/cm:... XPath QName style node reference
* - * @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 */ @@ -292,6 +292,13 @@ public class ScriptUtils extends BaseScopableProcessorExtension * Builds a paging object, from the supplied Args object. * Requires that the parameters have their standard names, * i.e. "maxItems" and "skipCount" + * + * @param args Mandatory hash of paging arguments

+ * Possible arguments include:

+ * maxItems - max count of items to return, default -1 (all)
+ * skipCount - number of items to skip, default -1 (none)
+ * queryId
+ * queryExecutionId */ public ScriptPagingDetails createPaging(Map args) { @@ -299,7 +306,7 @@ public class ScriptUtils extends BaseScopableProcessorExtension int skipCount = -1; String queryId = null; - if(args.containsKey("maxItems")) + if (args.containsKey("maxItems")) { try { @@ -308,7 +315,7 @@ public class ScriptUtils extends BaseScopableProcessorExtension catch(NumberFormatException e) {} } - if(args.containsKey("skipCount")) + if (args.containsKey("skipCount")) { try { @@ -318,7 +325,7 @@ public class ScriptUtils extends BaseScopableProcessorExtension {} } - if(args.containsKey("queryId")) + if (args.containsKey("queryId")) { queryId = args.get("queryId"); } diff --git a/source/java/org/alfresco/util/ScriptPagingDetails.java b/source/java/org/alfresco/util/ScriptPagingDetails.java index 77e61edc05..8d96481ffd 100644 --- a/source/java/org/alfresco/util/ScriptPagingDetails.java +++ b/source/java/org/alfresco/util/ScriptPagingDetails.java @@ -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 . + */ package org.alfresco.util; import org.alfresco.query.PagingRequest;