portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r915414 - /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java
Date Tue, 23 Feb 2010 16:31:20 GMT
Author: woonsan
Date: Tue Feb 23 16:31:20 2010
New Revision: 915414

URL: http://svn.apache.org/viewvc?rev=915414&view=rev
Log:
JS2-1057: Removing unused code lines. Site navigations menu does not seem to include space
folder menus.

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java?rev=915414&r1=915413&r2=915414&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/spaces/PageNavigator.java
Tue Feb 23 16:31:20 2010
@@ -18,7 +18,6 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 
 import javax.portlet.ActionRequest;
@@ -37,9 +36,7 @@
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.administration.PortalAdministration;
 import org.apache.jetspeed.container.url.BasePortalURL;
-import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.Page;
-import org.apache.jetspeed.om.portlet.LocalizedField;
 import org.apache.jetspeed.page.PageManager;
 import org.apache.jetspeed.portalsite.Menu;
 import org.apache.jetspeed.portalsite.MenuElement;
@@ -227,9 +224,6 @@
         
         try
         {
-            String spacePath = StringUtils.trim(space.getPath());
-            boolean isRootSpace = StringUtils.isBlank(spacePath) || "/".equals(spacePath);
-            
             RequestContext rc = (RequestContext) request.getAttribute(RequestContext.REQUEST_PORTALENV);
             PortalSiteRequestContext psrc = (PortalSiteRequestContext) rc.getAttribute("org.apache.jetspeed.portalsite.PortalSiteRequestContext");
 
@@ -267,28 +261,7 @@
                     
                     if (MenuElement.MENU_ELEMENT_TYPE.equals(type))
                     {
-                        Menu folderMenu = (Menu) element;
-                        
-                        if (!isRootSpace)
-                        {
-                            spaceMenuElements.add(element);
-                        }
-                        else
-                        {
-                            // TODO: folder menu's url is same to path?
-                            String folderPath = folderMenu.getUrl();
-                            
-                            if (pageManager.folderExists(folderPath))
-                            {
-                                Folder folder = pageManager.getFolder(folderPath);
-                                Collection<LocalizedField> fields = folder.getMetadata().getFields("space-owner");
-                                
-                                if (fields == null || fields.isEmpty())
-                                {
-                                    spaceMenuElements.add(element);
-                                }
-                            }
-                        }
+                        spaceMenuElements.add(element);
                     }
                     else if (MenuElement.OPTION_ELEMENT_TYPE.equals(type))
                     {



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