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/util/template JetspeedTool.java
Date Fri, 29 Mar 2002 20:12:33 GMT
taylor      02/03/29 12:12:33

  Modified:    src/java/org/apache/jetspeed/modules/actions
                        CreateNewUserAndConfirm.java
               src/java/org/apache/jetspeed/modules/actions/controllers
                        MultiColumnControllerAction.java
                        RowColumnControllerAction.java
               src/java/org/apache/jetspeed/modules/actions/portlets/security
                        GroupUpdateAction.java PermissionUpdateAction.java
                        RolePermissionUpdateAction.java
                        RoleUpdateAction.java UserRoleUpdateAction.java
                        UserUpdateAction.java
               src/java/org/apache/jetspeed/portal BasePortletSet.java
                        Portlet.java PortletCustomizer.java
               src/java/org/apache/jetspeed/portal/controls
                        VelocityPortletControl.java
               src/java/org/apache/jetspeed/portal/portlets
                        AbstractPortlet.java CustomizerVelocityPortlet.java
               src/java/org/apache/jetspeed/portal/security/portlets
                        PortletWrapper.java
               src/java/org/apache/jetspeed/util/template JetspeedTool.java
  Log:
  patches from Glenn Golden:
  - redirect fix
  - velocity portlet fix for parameters in edit mode
  
  Revision  Changes    Path
  1.31      +2 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/CreateNewUserAndConfirm.java
  
  Index: CreateNewUserAndConfirm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/CreateNewUserAndConfirm.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- CreateNewUserAndConfirm.java	25 Mar 2002 21:35:23 -0000	1.30
  +++ CreateNewUserAndConfirm.java	29 Mar 2002 20:12:31 -0000	1.31
  @@ -291,12 +291,12 @@
             data.setACL(acl);
             data.save();
   
  -          // bring logged on user to homepage with internal redirect
  +          // bring logged on user to homepage via redirect
             //data.setScreenTemplate(TurbineTemplate.getDefaultScreen());
             //data.setScreenTemplate("Home");
             DynamicURI duri = new DynamicURI (data);
             duri.addPathInfo(JetspeedResources.PATH_TEMPLATE_KEY, "Home");
  -          data.getResponse().sendRedirect(duri.toString());
  +          data.setRedirectURI(duri.toString());
   
           }
           catch ( Exception e )
  
  
  
  1.9       +2 -13     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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MultiColumnControllerAction.java	25 Mar 2002 21:35:23 -0000	1.8
  +++ MultiColumnControllerAction.java	29 Mar 2002 20:12:31 -0000	1.9
  @@ -349,19 +349,8 @@
           {
               ((JetspeedRunData)data).setMode("default");
   
  -            try
  -            {
  -                // bring logged on user to homepage with internal redirect
  -                DynamicURI duri = new DynamicURI(data);
  -                data.getResponse().sendRedirect(duri.toString());
  -            }
  -            catch ( Exception e )
  -            {
  -                Log.error(e);
  -                data.setMessage(e.toString());
  -                data.setStackTrace(StringUtils.stackTrace(e), e);
  -                data.setScreenTemplate(JetspeedResources.getString("template.error","Error"));
  -            }
  +            // bring logged on user to homepage via HTTP redirect
  +            data.setRedirectURI(new DynamicURI(data).toString());
           }
       }
   
  
  
  
  1.10      +2 -13     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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- RowColumnControllerAction.java	25 Mar 2002 21:35:23 -0000	1.9
  +++ RowColumnControllerAction.java	29 Mar 2002 20:12:31 -0000	1.10
  @@ -292,19 +292,8 @@
           {
               ((JetspeedRunData)data).setMode("default");
   
  -            try
  -            {
  -                // bring logged on user to homepage with internal redirect
  -                DynamicURI duri = new DynamicURI(data);
  -                data.getResponse().sendRedirect(duri.toString());
  -            }
  -            catch ( Exception e )
  -            {
  -                Log.error(e);
  -                data.setMessage(e.toString());
  -                data.setStackTrace(StringUtils.stackTrace(e), e);
  -                data.setScreenTemplate(JetspeedResources.getString("template.error","Error"));
  -            }
  +            // bring logged on user to homepage via HTTP redirect
  +            data.setRedirectURI(new DynamicURI(data).toString());
           }
       }
   
  
  
  
  1.5       +5 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupUpdateAction.java
  
  Index: GroupUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/GroupUpdateAction.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- GroupUpdateAction.java	25 Mar 2002 21:35:23 -0000	1.4
  +++ GroupUpdateAction.java	29 Mar 2002 20:12:32 -0000	1.5
  @@ -83,7 +83,7 @@
    * This action sets up the template context for editing security groups in the Turbine
database.
    *
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: GroupUpdateAction.java,v 1.4 2002/03/25 21:35:23 kimptoc Exp $
  + * @version $Id: GroupUpdateAction.java,v 1.5 2002/03/29 20:12:32 taylor Exp $
    */
   
   public class GroupUpdateAction extends VelocityPortletAction
  @@ -199,7 +199,7 @@
                   DynamicURI duri = new DynamicURI (rundata);
                   duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_GROUP_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_INVALID_ENTITY_NAME);
  -                rundata.getResponse().sendRedirect(duri.toString());
  +                rundata.setRedirectURI(duri.toString());
                   rundata.getUser().setTemp(TEMP_GROUP, null);
                   return;
               }
  @@ -226,7 +226,7 @@
               DynamicURI duri = new DynamicURI (rundata);
               duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_GROUP_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
               // save values that user just entered so they don't have to re-enter
              if (group != null)
  @@ -272,7 +272,7 @@
               if (group != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, group.getName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_UPDATE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
              // save values that user just entered so they don't have to re-enter
              if (group != null)
  @@ -320,7 +320,7 @@
               if (group != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, group.getName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_DELETE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
               // save values that user just entered so they don't have to re-enter
              if (group != null)
  
  
  
  1.4       +5 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionUpdateAction.java
  
  Index: PermissionUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/PermissionUpdateAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PermissionUpdateAction.java	25 Mar 2002 21:35:23 -0000	1.3
  +++ PermissionUpdateAction.java	29 Mar 2002 20:12:32 -0000	1.4
  @@ -83,7 +83,7 @@
    * This action sets up the template context for editing security permissions in the Turbine
database.
    *
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: PermissionUpdateAction.java,v 1.3 2002/03/25 21:35:23 kimptoc Exp $
  + * @version $Id: PermissionUpdateAction.java,v 1.4 2002/03/29 20:12:32 taylor Exp $
    */
   public class PermissionUpdateAction extends VelocityPortletAction
   {
  @@ -199,7 +199,7 @@
                   DynamicURI duri = new DynamicURI (rundata);
                   duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_PERMISSION_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_INVALID_ENTITY_NAME);
  -                rundata.getResponse().sendRedirect(duri.toString());
  +                rundata.setRedirectURI(duri.toString());
                   rundata.getUser().setTemp(TEMP_PERMISSION, null);
                   return;
               }
  @@ -226,7 +226,7 @@
               DynamicURI duri = new DynamicURI (rundata);
               duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_PERMISSION_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
               // save values that user just entered so they don't have to re-enter
              if (permission != null)
  @@ -272,7 +272,7 @@
               if (permission != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, permission.getName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_UPDATE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
              // save values that user just entered so they don't have to re-enter
              if (permission != null)
  @@ -319,7 +319,7 @@
               if (permission != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, permission.getName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_DELETE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
               // save values that user just entered so they don't have to re-enter
              if (permission != null)
  
  
  
  1.4       +5 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RolePermissionUpdateAction.java
  
  Index: RolePermissionUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RolePermissionUpdateAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RolePermissionUpdateAction.java	25 Mar 2002 21:35:23 -0000	1.3
  +++ RolePermissionUpdateAction.java	29 Mar 2002 20:12:32 -0000	1.4
  @@ -98,7 +98,7 @@
    * for a given role.
    *
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: RolePermissionUpdateAction.java,v 1.3 2002/03/25 21:35:23 kimptoc Exp
$
  + * @version $Id: RolePermissionUpdateAction.java,v 1.4 2002/03/29 20:12:32 taylor Exp $
    */
   public class RolePermissionUpdateAction extends VelocityPortletAction
   {
  @@ -202,7 +202,7 @@
               DynamicURI duri = new DynamicURI (rundata);
               duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
               return;
           }
           Role role = JetspeedSecurity.getRole(entityid);
  @@ -212,7 +212,7 @@
               DynamicURI duri = new DynamicURI (rundata);
               duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
               return;
           }
   
  @@ -228,7 +228,7 @@
                   DynamicURI duri = new DynamicURI (rundata);
                   duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLEPERMISSION_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
  -                rundata.getResponse().sendRedirect(duri.toString());
  +                rundata.setRedirectURI(duri.toString());
                   return;
               }
   
  @@ -274,7 +274,7 @@
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (role != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, role.getName());
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
           }
       }
  
  
  
  1.7       +5 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleUpdateAction.java
  
  Index: RoleUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/RoleUpdateAction.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RoleUpdateAction.java	25 Mar 2002 21:35:23 -0000	1.6
  +++ RoleUpdateAction.java	29 Mar 2002 20:12:32 -0000	1.7
  @@ -83,7 +83,7 @@
    * This action sets up the template context for editing security roles in the Turbine database.
    *
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: RoleUpdateAction.java,v 1.6 2002/03/25 21:35:23 kimptoc Exp $
  + * @version $Id: RoleUpdateAction.java,v 1.7 2002/03/29 20:12:32 taylor Exp $
    */
   public class RoleUpdateAction extends VelocityPortletAction
   {
  @@ -198,7 +198,7 @@
                   DynamicURI duri = new DynamicURI (rundata);
                   duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLE_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_INVALID_ENTITY_NAME);
  -                rundata.getResponse().sendRedirect(duri.toString());
  +                rundata.setRedirectURI(duri.toString());
                   rundata.getUser().setTemp(TEMP_ROLE, null);
                   return;
               }
  @@ -225,7 +225,7 @@
               DynamicURI duri = new DynamicURI (rundata);
               duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_ROLE_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
               // save values that user just entered so they don't have to re-enter
              if (role != null)
  @@ -271,7 +271,7 @@
               if (role != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, role.getName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_UPDATE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
              // save values that user just entered so they don't have to re-enter
              if (role != null)
  @@ -319,7 +319,7 @@
               if (role != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, role.getName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_DELETE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
               // save values that user just entered so they don't have to re-enter
              if (role != null)
  
  
  
  1.4       +5 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserRoleUpdateAction.java
  
  Index: UserRoleUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserRoleUpdateAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UserRoleUpdateAction.java	25 Mar 2002 21:35:23 -0000	1.3
  +++ UserRoleUpdateAction.java	29 Mar 2002 20:12:32 -0000	1.4
  @@ -93,7 +93,7 @@
    * for a given user.
    *
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: UserRoleUpdateAction.java,v 1.3 2002/03/25 21:35:23 kimptoc Exp $
  + * @version $Id: UserRoleUpdateAction.java,v 1.4 2002/03/29 20:12:32 taylor Exp $
    */
   public class UserRoleUpdateAction extends VelocityPortletAction
   {
  @@ -198,7 +198,7 @@
               DynamicURI duri = new DynamicURI (rundata);
               duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USERROLE_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
               return;
           }
   
  @@ -209,7 +209,7 @@
               DynamicURI duri = new DynamicURI (rundata);
               duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USERROLE_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
               return;
           }
   
  @@ -224,7 +224,7 @@
                   DynamicURI duri = new DynamicURI (rundata);
                   duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USERROLE_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_MISSING_PARAMETER);
  -                rundata.getResponse().sendRedirect(duri.toString());
  +                rundata.setRedirectURI(duri.toString());
                   return;
               }
   
  @@ -273,7 +273,7 @@
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_UPDATE_FAILED);
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
           }
       }
  
  
  
  1.11      +9 -9      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserUpdateAction.java
  
  Index: UserUpdateAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/security/UserUpdateAction.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- UserUpdateAction.java	25 Mar 2002 21:35:23 -0000	1.10
  +++ UserUpdateAction.java	29 Mar 2002 20:12:32 -0000	1.11
  @@ -104,7 +104,7 @@
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @author <a href="mailto:kimptoc_mail@yahoo.com">Chris Kimpton</a>
    * @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>
  - * @version $Id: UserUpdateAction.java,v 1.10 2002/03/25 21:35:23 kimptoc Exp $
  + * @version $Id: UserUpdateAction.java,v 1.11 2002/03/29 20:12:32 taylor Exp $
    */
   public class UserUpdateAction extends VelocityPortletAction
   {
  @@ -218,7 +218,7 @@
                   DynamicURI duri = new DynamicURI (rundata);
                   duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
                   duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_INVALID_ENTITY_NAME);
  -                rundata.getResponse().sendRedirect(duri.toString());
  +                rundata.setRedirectURI(duri.toString());
                   // save values that user just entered so they don't have to re-enter
                   if (user != null)
                      rundata.getUser().setTemp(TEMP_USER, user);
  @@ -264,7 +264,7 @@
               DynamicURI duri = new DynamicURI (rundata);
               duri.addPathInfo(SecurityConstants.PANE_NAME, SecurityConstants.PANEID_USER_UPDATE);
               duri.addPathInfo(SecurityConstants.PARAM_MSGID, SecurityConstants.MID_ENTITY_ALREADY_EXISTS);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
               // save values that user just entered so they don't have to re-enter
               if (user != null)
                  rundata.getUser().setTemp(TEMP_USER, user);
  @@ -347,7 +347,7 @@
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_UPDATE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
               // save values that user just entered so they don't have to re-enter
               if (user != null)
                   rundata.getUser().setTemp(TEMP_USER, user);
  @@ -429,7 +429,7 @@
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_UPDATE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
               // save values that user just entered so they don't have to re-enter
               if (user != null)
                   rundata.getUser().setTemp(TEMP_USER, user);
  @@ -463,7 +463,7 @@
                   if (user != null)
                       duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
                   duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_UPDATE);
  -                rundata.getResponse().sendRedirect(duri.toString());
  +                rundata.setRedirectURI(duri.toString());
                   // save values that user just entered so they don't have to re-enter
                   if (user != null)
                      rundata.getUser().setTemp(TEMP_USER, user);
  @@ -518,7 +518,7 @@
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_UPDATE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
               // save values that user just entered so they don't have to re-enter
               if (user != null)
                  rundata.getUser().setTemp(TEMP_USER, user);
  @@ -552,7 +552,7 @@
                   if (user != null)
                       duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
                   duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_DELETE);
  -                rundata.getResponse().sendRedirect(duri.toString());
  +                rundata.setRedirectURI(duri.toString());
                   // save values that user just entered so they don't have to re-enter
                   if (user != null)
                      rundata.getUser().setTemp(TEMP_USER, user);
  @@ -579,7 +579,7 @@
               if (user != null)
                   duri.addPathInfo(SecurityConstants.PARAM_ENTITY_ID, user.getUserName());
               duri.addQueryData(SecurityConstants.PARAM_MODE, SecurityConstants.PARAM_MODE_DELETE);
  -            rundata.getResponse().sendRedirect(duri.toString());
  +            rundata.setRedirectURI(duri.toString());
   
               // save values that user just entered so they don't have to re-enter
              if (user != null)
  
  
  
  1.18      +5 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletSet.java
  
  Index: BasePortletSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletSet.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- BasePortletSet.java	11 Mar 2002 07:22:11 -0000	1.17
  +++ BasePortletSet.java	29 Mar 2002 20:12:32 -0000	1.18
  @@ -84,7 +84,7 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id: BasePortletSet.java,v 1.17 2002/03/11 07:22:11 taylor Exp $
  + * @version $Id: BasePortletSet.java,v 1.18 2002/03/29 20:12:32 taylor Exp $
    */
   public class BasePortletSet implements PortletSet, Portlet, PortletState
   {
  @@ -644,4 +644,8 @@
           this.id = id;
       }
   
  +    /**
  +    * @return true if the portlet does its own customization
  +    */
  +    public boolean providesCustomization() { return false; }
   }
  
  
  
  1.43      +6 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/Portlet.java
  
  Index: Portlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/Portlet.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Portlet.java	6 Mar 2002 17:03:33 -0000	1.42
  +++ Portlet.java	29 Mar 2002 20:12:32 -0000	1.43
  @@ -64,7 +64,7 @@
   extensible so that 3rd parties implement their own Portlets.
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -@version $Id: Portlet.java,v 1.42 2002/03/06 17:03:33 taylor Exp $
  +@version $Id: Portlet.java,v 1.43 2002/03/29 20:12:32 taylor Exp $
   */
   public interface Portlet
   {
  @@ -207,5 +207,10 @@
       public String getID();
   
       public void setID(String id);
  +
  +    /**
  +    * @return true if the portlet does its own customization
  +    */
  +    public boolean providesCustomization();
   }
   
  
  
  
  1.3       +2 -0      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletCustomizer.java
  
  Index: PortletCustomizer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletCustomizer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PortletCustomizer.java	22 Jul 2001 20:29:59 -0000	1.2
  +++ PortletCustomizer.java	29 Mar 2002 20:12:32 -0000	1.3
  @@ -62,6 +62,8 @@
    * the customizer for a given portlet
    *
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  + * @deprecated provide providesCustomization() from Portlet.java insted
  + * to indicate that a portlet can do its own customization.
    */
   public interface PortletCustomizer
   {
  
  
  
  1.14      +2 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java
  
  Index: VelocityPortletControl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- VelocityPortletControl.java	13 Mar 2002 05:41:15 -0000	1.13
  +++ VelocityPortletControl.java	29 Mar 2002 20:12:32 -0000	1.14
  @@ -66,7 +66,6 @@
   import org.apache.jetspeed.portal.PortletSet;
   import org.apache.jetspeed.portal.PortletControl;
   import org.apache.jetspeed.portal.PortletState;
  -import org.apache.jetspeed.portal.PortletCustomizer;
   import org.apache.jetspeed.services.TemplateLocator;
   import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.services.resources.JetspeedResources;
  @@ -106,7 +105,7 @@
    * @author <a href="mailto:re_carrasco@bco011.sonda.cl">Roberto Carrasco</a>
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    *
  - * @version $Id: VelocityPortletControl.java,v 1.13 2002/03/13 05:41:15 paulsp Exp $
  + * @version $Id: VelocityPortletControl.java,v 1.14 2002/03/29 20:12:32 taylor Exp $
    *
    */
   public class VelocityPortletControl extends AbstractPortletControl
  @@ -139,7 +138,7 @@
           TurbinePull.populateContext(context, rundata);
   
           if ( portlet.getName().equals(jdata.getCustomized())
  -             && (!(portlet instanceof PortletCustomizer)) )
  +             && (!portlet.providesCustomization()) )
           {            
               context.put("portlet",JetspeedTool.getCustomizer(portlet));
           }
  
  
  
  1.55      +5 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java
  
  Index: AbstractPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- AbstractPortlet.java	26 Mar 2002 09:06:54 -0000	1.54
  +++ AbstractPortlet.java	29 Mar 2002 20:12:33 -0000	1.55
  @@ -106,7 +106,7 @@
   @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
   @author <A HREF="mailto:raphael@apache.org">RaphaŽl Luta</A>
   @author <A HREF="mailto:sgala@apache.org">Santiago Gala</A>
  -@version $Id: AbstractPortlet.java,v 1.54 2002/03/26 09:06:54 taylor Exp $
  +@version $Id: AbstractPortlet.java,v 1.55 2002/03/29 20:12:33 taylor Exp $
   */
   public abstract class AbstractPortlet implements Portlet, PortletState, Cacheable, Refreshable
   {
  @@ -811,4 +811,8 @@
           this.id = id;
       }
   
  +    /**
  +    * @return true if the portlet does its own customization
  +    */
  +    public boolean providesCustomization() { return false; }
   }
  
  
  
  1.2       +4 -6      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/CustomizerVelocityPortlet.java
  
  Index: CustomizerVelocityPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/CustomizerVelocityPortlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CustomizerVelocityPortlet.java	31 May 2001 17:13:26 -0000	1.1
  +++ CustomizerVelocityPortlet.java	29 Mar 2002 20:12:33 -0000	1.2
  @@ -54,9 +54,6 @@
   
   package org.apache.jetspeed.portal.portlets;
   
  -// Jetspeed stuff
  -import org.apache.jetspeed.portal.PortletCustomizer;
  -
   /**
    * This subclass of VelocityPortlet should be used as base portlet
    * for all VelocityPortlets that implement their own customizer
  @@ -64,9 +61,10 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    */
   public class CustomizerVelocityPortlet extends VelocityPortlet
  -    implements PortletCustomizer
  -
   {
  -    // nothing to do
  +    /**
  +    * @return true if the portlet does its own customization
  +    */
  +    public boolean providesCustomization() { return true; }
   }
   
  
  
  
  1.4       +9 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/PortletWrapper.java
  
  Index: PortletWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/security/portlets/PortletWrapper.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PortletWrapper.java	6 Mar 2002 17:03:34 -0000	1.3
  +++ PortletWrapper.java	29 Mar 2002 20:12:33 -0000	1.4
  @@ -80,7 +80,7 @@
   </p>
   
   @author <A HREF="mailto:sgala@apache.org">Santiago Gala</A>
  -@version $Id: PortletWrapper.java,v 1.3 2002/03/06 17:03:34 taylor Exp $
  +@version $Id: PortletWrapper.java,v 1.4 2002/03/29 20:12:33 taylor Exp $
   */
   public class PortletWrapper implements Portlet
   {
  @@ -351,5 +351,12 @@
       {
           wrappedPortlet.setID(id);
       }
  -   
  +
  +    /**
  +    * @return true if the portlet does its own customization
  +    */
  +    public boolean providesCustomization()
  +    {
  +        return wrappedPortlet.providesCustomization();
  +    }
   }
  
  
  
  1.17      +2 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedTool.java
  
  Index: JetspeedTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedTool.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JetspeedTool.java	22 Mar 2002 18:51:57 -0000	1.16
  +++ JetspeedTool.java	29 Mar 2002 20:12:33 -0000	1.17
  @@ -62,7 +62,6 @@
   import org.apache.jetspeed.portal.Portlet;
   import org.apache.jetspeed.portal.PortletSet;
   import org.apache.jetspeed.portal.PortletControl;
  -import org.apache.jetspeed.portal.PortletCustomizer;
   import org.apache.jetspeed.services.PortalToolkit;
   import org.apache.jetspeed.services.PsmlManager;
   import org.apache.jetspeed.services.PortletFactory;
  @@ -89,7 +88,7 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    *
  - * @version $Id: JetspeedTool.java,v 1.16 2002/03/22 18:51:57 taylor Exp $
  + * @version $Id: JetspeedTool.java,v 1.17 2002/03/29 20:12:33 taylor Exp $
    */
   public class JetspeedTool implements ApplicationTool
   {
  @@ -269,7 +268,7 @@
           }
           
           // if the portlet cannot customize itself...
  -        if (! (p instanceof PortletCustomizer) )
  +        if ( !p.providesCustomization() )
           {
   
               //look for the customizer name in the portlet
  
  
  

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