portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r921927 - /portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageManagementService.java
Date Thu, 11 Mar 2010 16:42:02 GMT
Author: woonsan
Date: Thu Mar 11 16:42:02 2010
New Revision: 921927

URL: http://svn.apache.org/viewvc?rev=921927&view=rev
Log:
JS2-1057: Allowing to change url of link from PageManagementService jax-rs component.

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=921927&r1=921926&r2=921927&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
Thu Mar 11 16:42:02 2010
@@ -294,7 +294,8 @@ public class PageManagementService
                                    @FormParam("shorttitle") String shortTitle,
                                    @FormParam("hidden") String hidden,
                                    @FormParam("skin") String skin,
-                                   @FormParam("version") String version)
+                                   @FormParam("version") String version,
+                                   @FormParam("url") String url)
     {
         RequestContext requestContext = (RequestContext) servletRequest.getAttribute(RequestContext.REQUEST_PORTALENV);
         String path = PathSegmentUtils.joinWithPrefix(pathSegments, "/", "/");
@@ -391,6 +392,18 @@ public class PageManagementService
                 }
             }
             
+            if (url != null)
+            {
+                if (node instanceof Link)
+                {
+                    if (!url.equals(((Link) node).getUrl()))
+                    {
+                        ((Link) node).setUrl(url);
+                        changed = true;
+                    }
+                }
+            }
+            
             if (changed)
             {
                 if (node instanceof Page)



---------------------------------------------------------------------
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