portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r926194 - /portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java
Date Mon, 22 Mar 2010 17:10:26 GMT
Author: woonsan
Date: Mon Mar 22 17:10:26 2010
New Revision: 926194

URL: http://svn.apache.org/viewvc?rev=926194&view=rev
Log:
JS2-1132: document ordering update operation in page management jax-rs service.

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java?rev=926194&r1=926193&r2=926194&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java
Mon Mar 22 17:10:26 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.jetspeed.services.rest;
 
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.Locale;
@@ -295,6 +296,7 @@ public class PageManagementService
                                    @FormParam("hidden") String hidden,
                                    @FormParam("skin") String skin,
                                    @FormParam("version") String version,
+                                   @FormParam("docorder") String documentOrder,
                                    @FormParam("url") String url)
     {
         RequestContext requestContext = (RequestContext) servletRequest.getAttribute(RequestContext.REQUEST_PORTALENV);
@@ -392,6 +394,20 @@ public class PageManagementService
                 }
             }
             
+            if (documentOrder != null)
+            {
+                if (node instanceof Folder)
+                {
+                    String [] docIndexArray = StringUtils.split(documentOrder, ",\r\n");
+                    for (int i = 0; i < docIndexArray.length; i++)
+                    {
+                        docIndexArray[i] = docIndexArray[i].trim();
+                    }
+                    ((Folder) node).setDocumentOrder(Arrays.asList(docIndexArray));
+                    changed = true;
+                }
+            }
+            
             if (url != null)
             {
                 if (node instanceof Link)



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message