Author: mpodolin
Date: 2010-03-25 07:10:41 -0400 (Thu, 25 Mar 2010)
New Revision: 2364
Modified:
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
Log:
JBEPP-244:GTNPORTAL-896 to the EPP branch
Modified:
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
---
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2010-03-25
10:53:23 UTC (rev 2363)
+++
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2010-03-25
11:10:41 UTC (rev 2364)
@@ -49,6 +49,8 @@
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;
@@ -141,6 +143,10 @@
{
handleErrorResponse((ErrorResponse)portletResponse);
}
+ else if (portletResponse instanceof SecurityResponse)
+ {
+ handleSecurityResponse((SecurityResponse)portletResponse);
+ }
else
{
throw new Exception("Unexpected response type [" + portletResponse
+ "]. Expected an UpdateNavigationResponse" +
@@ -246,6 +252,19 @@
{
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.");
+ }
+ }
}
/**
Show replies by date