portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r709876 - /portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/main/java/org/apache/jetspeed/portlets/selector/PortletSelector.java
Date Sun, 02 Nov 2008 12:39:00 GMT
Author: vkumar
Date: Sun Nov  2 04:38:59 2008
New Revision: 709876

URL: http://svn.apache.org/viewvc?rev=709876&view=rev
Log:
Fixing base portlet selector, after pluto 2.0 changes

Modified:
    portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/main/java/org/apache/jetspeed/portlets/selector/PortletSelector.java

Modified: portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/main/java/org/apache/jetspeed/portlets/selector/PortletSelector.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/main/java/org/apache/jetspeed/portlets/selector/PortletSelector.java?rev=709876&r1=709875&r2=709876&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/main/java/org/apache/jetspeed/portlets/selector/PortletSelector.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JS2-871-refactoring/src/main/java/org/apache/jetspeed/portlets/selector/PortletSelector.java
Sun Nov  2 04:38:59 2008
@@ -16,39 +16,39 @@
 */
 package org.apache.jetspeed.portlets.selector;
 
-import java.io.IOException;
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletException;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-import org.apache.jetspeed.CommonPortletServices;
-import org.apache.jetspeed.JetspeedActions;
-import org.apache.jetspeed.components.portletregistry.PortletRegistry;
-import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
-import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
-import org.apache.jetspeed.portlets.PortletInfo;
-import org.apache.jetspeed.portlets.pam.PortletApplicationResources;
-import org.apache.jetspeed.search.ParsedObject;
-import org.apache.jetspeed.search.SearchEngine;
-import org.apache.jetspeed.security.SecurityAccessController;
-import org.apache.portals.gems.browser.BrowserIterator;
-import org.apache.portals.gems.browser.BrowserPortlet;
-import org.apache.portals.gems.util.StatusMessage;
-import org.apache.portals.messaging.PortletMessaging;
+import java.io.IOException;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+import org.apache.jetspeed.CommonPortletServices;
+import org.apache.jetspeed.JetspeedActions;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
+import org.apache.jetspeed.om.portlet.PortletApplication;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.portlets.PortletInfo;
+import org.apache.jetspeed.portlets.pam.PortletApplicationResources;
+import org.apache.jetspeed.search.ParsedObject;
+import org.apache.jetspeed.search.SearchEngine;
+import org.apache.jetspeed.security.SecurityAccessController;
+import org.apache.portals.gems.browser.BrowserIterator;
+import org.apache.portals.gems.browser.BrowserPortlet;
+import org.apache.portals.gems.util.StatusMessage;
+import org.apache.portals.messaging.PortletMessaging;
 
 /**
  * Selects one or more portlets
@@ -234,9 +234,9 @@
             
             while (portlets.hasNext())
             {
-                PortletDefinitionComposite portlet = null;
+                PortletDefinition portlet = null;
                 if (filter == null)
-                    portlet = (PortletDefinitionComposite)portlets.next();
+                    portlet = (PortletDefinition)portlets.next();
                 else
                     portlet = this.getPortletFromParsedObject((ParsedObject)portlets.next());
                 
@@ -244,18 +244,18 @@
                     continue;
                 
                 // Do not display Jetspeed Layout Applications
-                MutablePortletApplication pa = (MutablePortletApplication)portlet.getPortletApplicationDefinition();
+                PortletApplication pa = (PortletApplication)portlet.getApplication();
                 if (pa.isLayoutApplication())
                     continue;
                          
                 // SECURITY filtering
-                String uniqueName = pa.getName() + "::" + portlet.getName();
+                String uniqueName = pa.getName() + "::" + portlet.getPortletName();
                 if (securityAccessController.checkPortletAccess(portlet, JetspeedActions.MASK_VIEW))
                 {
                     String name = portlet.getDisplayNameText(locale);
                     if (name == null)
                     {
-                        name = portlet.getName();
+                        name = portlet.getPortletName();
                     }
                     list.add(new PortletInfo(uniqueName, name, portlet.getDescriptionText(locale)));
                 }
@@ -293,7 +293,7 @@
         return -1;
     }
     
-    protected PortletDefinitionComposite getPortletFromParsedObject(ParsedObject po)
+    protected PortletDefinition getPortletFromParsedObject(ParsedObject po)
     {
         boolean found = false;
         String name = "";



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