portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets CustomizeSetAction.java
Date Mon, 01 Apr 2002 18:05:57 GMT
taylor      02/04/01 10:05:57

  Modified:    src/java/org/apache/jetspeed/modules/actions
                        JetspeedSessionValidator.java
               src/java/org/apache/jetspeed/modules/actions/controllers
                        MultiColumnControllerAction.java
                        RowColumnControllerAction.java
               src/java/org/apache/jetspeed/modules/actions/controls
                        Customize.java
               src/java/org/apache/jetspeed/modules/actions/portlets
                        CustomizeSetAction.java
  Log:
  Customizer patches submitted by Glenn Golden
  
  Revision  Changes    Path
  1.16      +5 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java
  
  Index: JetspeedSessionValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/JetspeedSessionValidator.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JetspeedSessionValidator.java	20 Mar 2002 06:55:48 -0000	1.15
  +++ JetspeedSessionValidator.java	1 Apr 2002 18:05:57 -0000	1.16
  @@ -83,7 +83,7 @@
   @author <a href="mailto:ingo@raleigh.ibm.com">Ingo Schuster</a>
   @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
   @author <a href="mailto:sgala@apache.org">Santiago Gala</a>
  -@version $Id: JetspeedSessionValidator.java,v 1.15 2002/03/20 06:55:48 paulsp Exp $
  +@version $Id: JetspeedSessionValidator.java,v 1.16 2002/04/01 18:05:57 taylor Exp $
   */
   public class JetspeedSessionValidator extends TemplateSessionValidator
   {
  @@ -155,17 +155,17 @@
           data.getUser().setTemp("locale", locale);
           
   
  -        String maximizedPortlet = (String)jdata.getUser().getTemp("portlet");
  +        String maximizedPortlet = (String)jdata.getUser().getTemp("js_peid");
           if (maximizedPortlet != null) {
  -            jdata.setPortlet(maximizedPortlet);
  +            jdata.setJs_peid(maximizedPortlet);
               jdata.setScreenTemplate("Maximize");
           }
   
           // if a portlet is referenced in the parameters request, store it
           // in the RunData object
  -        String paramPortlet = jdata.getParameters().getString("portlet");
  +        String paramPortlet = jdata.getParameters().getString("js_peid");
           if (paramPortlet != null && paramPortlet.length() > 0) {
  -            jdata.setPortlet(paramPortlet);
  +            jdata.setJs_peid(paramPortlet);
           }
           
       }
  
  
  
  1.10      +2 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java
  
  Index: MultiColumnControllerAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MultiColumnControllerAction.java	29 Mar 2002 20:12:31 -0000	1.9
  +++ MultiColumnControllerAction.java	1 Apr 2002 18:05:57 -0000	1.10
  @@ -282,7 +282,7 @@
           PortletSet customizedSet = (PortletSet)jdata.getCustomized();
           Portlets set = jdata.getProfile()
                               .getDocument()
  -                            .getPortlets(customizedSet.getName());
  +                            .getPortletsById(customizedSet.getID());
   
           Log.debug("MultiCol: columns "+columns+" set "+set);
   
  @@ -399,7 +399,7 @@
   
                   Portlets portlets = jdata.getProfile()
                                            .getDocument()
  -                                         .getPortlets(customizedSet.getName());
  +                                         .getPortletsById(customizedSet.getID());
                   if (portlets != null)
                   {
                       for (int i=0; i < portlets.getEntryCount(); i++)
  
  
  
  1.11      +3 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/RowColumnControllerAction.java
  
  Index: RowColumnControllerAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controllers/RowColumnControllerAction.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- RowColumnControllerAction.java	29 Mar 2002 20:12:31 -0000	1.10
  +++ RowColumnControllerAction.java	1 Apr 2002 18:05:57 -0000	1.11
  @@ -149,7 +149,7 @@
   
           Portlets portlets = jdata.getProfile()
                                    .getDocument()
  -                                 .getPortlets(set.getName());
  +                                 .getPortletsById(set.getID());
   
           List plist = new ArrayList();
           List work = new ArrayList();
  @@ -348,7 +348,7 @@
           if (position > -1)
           {
               Portlets set = profile.getDocument()
  -                                  .getPortlets(customizedSet.getName());
  +                                  .getPortletsById(customizedSet.getID());
               if (set != null)
               {
                   // first try explicit portlets position
  @@ -484,7 +484,7 @@
               int target = -1;
   
               Portlets set = profile.getDocument()
  -                                  .getPortlets(customizedSet.getName());
  +                                  .getPortletsById(customizedSet.getID());
               Layout targetLayout = null;
               Layout baseLayout = null;
   
  
  
  
  1.8       +7 -26     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Customize.java
  
  Index: Customize.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Customize.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Customize.java	13 Mar 2002 05:41:15 -0000	1.7
  +++ Customize.java	1 Apr 2002 18:05:57 -0000	1.8
  @@ -89,13 +89,6 @@
               return;
           }
   
  -        // Get jsp_peid parmameter.  If it does not exist, then do nothing
  -        String peid = rundata.getParameters().getString("js_peid");
  -        if ( peid == null )
  -        {
  -            return;
  -        }
  -        
           JetspeedRunData jdata = (JetspeedRunData)rundata;
   
           // Load the profile for customization (if not already loaded!)
  @@ -127,26 +120,14 @@
           }
           // ---------------------------------------------------------------------
           
  -        
  -        String name = jdata.getPortlet();
  -        if ( name == null )
  +        // Get js_peid parmameter.
  +        // If it does not exist, we will customize the root of the profile
  +        String peid = rundata.getParameters().getString("js_peid");
  +        if ( peid == null )
           {
  -            //if no portlet specified, customized the default pane
  -            //of the profile
  -
  -            // set Portlet #1 for wml
  -            // Andreas Kempf, ICM S CP PE, Munich
  -            // ---------------------------------------------------------------------
  -            if ((editMediaType != null) && (editMediaType.equalsIgnoreCase("wml")))
  -            {
  -              name="1";
  -            }
  -            else  
  -              name="0";
  -            // ---------------------------------------------------------------------
  -
  -      
  -            jdata.setPortlet(name);
  +            // use the id of the root set of the profile
  +            peid = jdata.getProfile().getRootSet().getID();
  +            jdata.setJs_peid(peid);
           }
   
           Portlet found = null;
  
  
  
  1.16      +4 -4      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeSetAction.java
  
  Index: CustomizeSetAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeSetAction.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CustomizeSetAction.java	22 Mar 2002 18:42:06 -0000	1.15
  +++ CustomizeSetAction.java	1 Apr 2002 18:05:57 -0000	1.16
  @@ -366,7 +366,7 @@
           {
               Portlets portlets = ((JetspeedRunData)rundata).getProfile()
                                               .getDocument()
  -                                            .getPortlets(set.getName());
  +                                            .getPortletsById(set.getID());
   
               List usedPortlets = AutoProfile.getPortletList(rundata);
               boolean addIt;
  @@ -438,7 +438,7 @@
           {
               Portlets portlets = ((JetspeedRunData)rundata).getProfile()
                                               .getDocument()
  -                                            .getPortlets(set.getName());
  +                                            .getPortletsById(set.getID());
               
               if (portlets!=null)
               {
  @@ -478,7 +478,7 @@
                   {
                       set.setController(pc);
   
  -                    Portlets portlets = profile.getDocument().getPortlets(set.getName());
  +                    Portlets portlets = profile.getDocument().getPortletsById(set.getID());
   
                       Controller c = portlets.getController();
                       if (c == null)
  @@ -530,7 +530,7 @@
                       set.getPortletConfig().setPortletSkin(s);
   
                       Profile profile = ((JetspeedRunData)rundata).getProfile();
  -                    Portlets portlets = profile.getDocument().getPortlets(set.getName());
  +                    Portlets portlets = profile.getDocument().getPortletsById(set.getID());
   
                       Skin psmlSkin = portlets.getSkin();
                       if (psmlSkin == null)
  
  
  

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


Mime
View raw message