portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jf...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets PortletUpdateAction.java
Date Mon, 03 Nov 2003 05:29:06 GMT
jford       2003/11/02 21:29:06

  Modified:    src/java/org/apache/jetspeed/modules/actions/portlets
                        PortletUpdateAction.java
  Log:
  Added ability to choose existing groups/categories when adding a category
  
  PR: Bugzilla #24342
  
  Revision  Changes    Path
  1.7       +7 -22     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/PortletUpdateAction.java
  
  Index: PortletUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/PortletUpdateAction.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PortletUpdateAction.java	23 Jul 2003 19:50:12 -0000	1.6
  +++ PortletUpdateAction.java	3 Nov 2003 05:29:06 -0000	1.7
  @@ -55,10 +55,7 @@
   package org.apache.jetspeed.modules.actions.portlets;
   
   import java.util.Collection;
  -import java.util.Enumeration;
  -import java.util.HashSet;
   import java.util.Iterator;
  -import java.util.Set;
   
   import org.apache.commons.lang.SerializationUtils;
   import org.apache.jetspeed.modules.actions.portlets.security.SecurityConstants;
  @@ -70,9 +67,10 @@
   import org.apache.jetspeed.om.registry.base.BaseParameter;
   import org.apache.jetspeed.om.registry.base.BaseSecurity;
   import org.apache.jetspeed.portal.portlets.VelocityPortlet;
  +import org.apache.jetspeed.services.JetspeedSecurity;
  +import org.apache.jetspeed.services.Registry;
   import org.apache.jetspeed.services.logging.JetspeedLogFactoryService;
   import org.apache.jetspeed.services.logging.JetspeedLogger;
  -import org.apache.jetspeed.services.Registry;
   import org.apache.turbine.util.DynamicURI;
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.util.TurbineException;
  @@ -127,23 +125,7 @@
   
           if (mode != null && mode.equals(SecurityConstants.PARAM_MODE_INSERT))
           {
  -            Set parentSet = new HashSet();
  -
  -            org.apache.jetspeed.om.registry.Registry registry =
  -                Registry.get(Registry.PORTLET);
  -            Enumeration entries = registry.getEntries();
  -            while (entries.hasMoreElements())
  -            {
  -                PortletEntry regEntry = (PortletEntry) entries.nextElement();
  -
  -                String regType = regEntry.getType();
  -                if (regType.equalsIgnoreCase("abstract"))
  -                {
  -                    parentSet.add(regEntry.getName());
  -                }
  -            }
  -
  -            context.put("parents", parentSet);
  +            context.put("parents", PortletFilter.buildParentList(PortletFilter.getAllPortlets()));
               context.put(
                   "securitys",
                   CustomizeSetAction.buildList(rundata, Registry.SECURITY));
  @@ -155,6 +137,9 @@
                   rundata.getParameters().getString(PORTLET_NAME);
               PortletEntry portletEntry =
                   (PortletEntry) Registry.getEntry(Registry.PORTLET, portletName);
  +                
  +            context.put("groups", iteratorToCollection(JetspeedSecurity.getGroups()));
  +            context.put("categories", PortletFilter.buildCategoryList(PortletFilter.getAllPortlets()));
   
               String tab = rundata.getParameters().getString(TAB_PARAMETER);
               context.put("currentTab", tab);
  
  
  

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


Mime
View raw message