[portal-commits] JBoss Portal SVN: r13027 - branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Fri Mar 13 09:10:04 EDT 2009


Author: thomas.heute at jboss.com
Date: 2009-03-13 09:10:04 -0400 (Fri, 13 Mar 2009)
New Revision: 13027

Modified:
   branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
Log:
JBEPP-41: Portal admin portlet / Dashboard configuration can be slow with many objects/dasboards

Modified: branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java	2009-03-13 13:04:17 UTC (rev 13026)
+++ branches/Enterprise_Portal_Platform_4_3/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java	2009-03-13 13:10:04 UTC (rev 13027)
@@ -35,7 +35,6 @@
 import org.jboss.portal.core.model.content.ContentType;
 import org.jboss.portal.core.model.content.spi.ContentProvider;
 import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet;
-import org.jboss.portal.core.model.instance.Instance;
 import org.jboss.portal.core.model.instance.InstanceContainer;
 import org.jboss.portal.core.model.portal.Page;
 import org.jboss.portal.core.model.portal.PortalObject;
@@ -64,7 +63,6 @@
 import javax.xml.namespace.QName;
 import java.io.Serializable;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.LinkedList;
@@ -139,12 +137,6 @@
    private final AuthorizationBean auth = new PortalObjectAuthorizationBean();
 
    /** . */
-   private SelectItem[] instanceItems;
-
-   /** . */
-   private SelectItem[] portalPageItems;
-
-   /** . */
    private List selectedObjectPath;
 
    /** . */
@@ -366,16 +358,6 @@
       return auth;
    }
 
-   public SelectItem[] getInstanceItems()
-   {
-      return instanceItems;
-   }
-
-   public SelectItem[] getPortalPageItems()
-   {
-      return portalPageItems;
-   }
-
    public List getSelectedObjectPath()
    {
       return selectedObjectPath;
@@ -651,8 +633,6 @@
    public void refresh()
    {
       propertyAction = null;
-      instanceItems = null;
-      portalPageItems = null;
       selectedObjectPath = null;
       selectedObject = null;
       selectedProperties = null;
@@ -686,18 +666,6 @@
       //
       theme = new ThemeBean(selectedObject);
 
-      //
-      Collection<PortalObject> pages = getSelectedObject().getChildren(PortalObject.PAGE_MASK);
-      ArrayList<SelectItem> list = new ArrayList<SelectItem>(pages.size() + 1);
-      for (PortalObject page : pages)
-      {
-         SelectItem item = new SelectItem(page.getName());
-         list.add(item);
-      }
-      list.add(new SelectItem("", "no selection"));
-      portalPageItems = list.toArray(new SelectItem[list.size()]);
-
-      //
       PortalObject o = getSelectedObject();
       ArrayList<PortalObject> path = new ArrayList<PortalObject>();
       while (o != null)
@@ -707,17 +675,6 @@
       }
       Collections.reverse(path);
       selectedObjectPath = path;
-
-      // rather dirty code...
-      List tmp = new ArrayList(instanceContainer.getDefinitions());
-      Collections.sort(tmp, InstanceManagerBean.INSTANCE_COMPARATOR);
-      for (int i = 0; i < tmp.size(); i++)
-      {
-         Instance instance = (Instance)tmp.get(i);
-         SelectItem item = new SelectItem(instance.getId());
-         tmp.set(i, item);
-      }
-      instanceItems = (SelectItem[])tmp.toArray(new SelectItem[tmp.size()]);
    }
 
    public void processEvent(ActionEvent event)




More information about the portal-commits mailing list