[gatein-commits] gatein SVN: r2266 - in portal/trunk/webui/portal/src/main/java/org/exoplatform/portal: webui/application and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Mar 15 14:58:29 EDT 2010


Author: mwringe
Date: 2010-03-15 14:58:28 -0400 (Mon, 15 Mar 2010)
New Revision: 2266

Modified:
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java
Log:
Revert changes since we are suppose to be in a code freeze (oops).

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java	2010-03-15 18:24:17 UTC (rev 2265)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java	2010-03-15 18:58:28 UTC (rev 2266)
@@ -131,7 +131,7 @@
       
       
       //The encoding needs to be set before reading any of the parameters since the parameters's encoding
-      //is set at the first access.
+      //is set at the first acces.
       
       //TODO use the encoding from the locale-config.xml file
       response_.setContentType("text/html; charset=UTF-8");
@@ -152,15 +152,8 @@
       }
 
       requestURI_ = URLDecoder.decode(req.getRequestURI(), "UTF-8");
-      
-      // req.getPathInfo will already have the encoding set from the server.
-      // We need to use the UTF-8 value since this is how we store the portal name.
-      // Reconstructing the getPathInfo from the non server decoded values.
-      String servletPath = URLDecoder.decode(req.getServletPath(), "UTF-8");
-      String contextPath = URLDecoder.decode(req.getContextPath(), "UTF-8");
-      String pathInfo = requestURI_.substring((servletPath + contextPath).length());
-      
-      if (pathInfo == null || pathInfo.isEmpty())
+      String pathInfo = req.getPathInfo();
+      if (pathInfo == null)
       {
          pathInfo = "/";
       }

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java	2010-03-15 18:24:17 UTC (rev 2265)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java	2010-03-15 18:58:28 UTC (rev 2266)
@@ -49,8 +49,6 @@
 import org.gatein.pc.api.invocation.response.ErrorResponse;
 import org.gatein.pc.api.invocation.response.HTTPRedirectionResponse;
 import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
-import org.gatein.pc.api.invocation.response.SecurityErrorResponse;
-import org.gatein.pc.api.invocation.response.SecurityResponse;
 import org.gatein.pc.api.invocation.response.UpdateNavigationalStateResponse;
 
 import javax.portlet.PortletMode;
@@ -143,10 +141,6 @@
          {
             handleErrorResponse((ErrorResponse)portletResponse);
          }
-         else if (portletResponse instanceof SecurityResponse)
-         {
-            handleSecurityResponse((SecurityResponse)portletResponse);
-         }
          else
          {
             throw new Exception("Unexpected response type [" + portletResponse + "]. Expected an UpdateNavigationResponse" +
@@ -252,19 +246,6 @@
       {
          throw (Exception)response.getCause();  
       }
-      
-      private void handleSecurityResponse(SecurityResponse response) throws Exception
-      {
-         if (response instanceof SecurityErrorResponse)
-         {
-            SecurityErrorResponse securityErrorResponse = (SecurityErrorResponse)response;
-            throw new Exception("SecurityErrorResponse Returned while trying to process portlet action. ", securityErrorResponse.getThrowable());
-         }
-         else
-         {
-            throw new Exception("Security Response of type " + response.getClass() + " encountered while trying to process portlet action.");
-         }
-      }
    }
 
    /**

Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java	2010-03-15 18:24:17 UTC (rev 2265)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java	2010-03-15 18:58:28 UTC (rev 2266)
@@ -290,8 +290,7 @@
                      PortletExceptionHandleService portletExceptionService =
                         (PortletExceptionHandleService)container
                            .getComponentInstanceOfType(PortletExceptionHandleService.class);
-                     if (portletExceptionService != null)
-                        portletExceptionService.handle(pcException);
+                     portletExceptionService.handle(pcException);
 
                      markup = Text.create("This portlet encountered an error and could not be displayed.");
                   }



More information about the gatein-commits mailing list