Author: thomas.heute(a)jboss.com
Date: 2008-06-27 11:34:50 -0400 (Fri, 27 Jun 2008)
New Revision: 11174
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java
Log:
- Deprecate signout method in favor of the event
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java 2008-06-27
15:32:28 UTC (rev 11173)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java 2008-06-27
15:34:50 UTC (rev 11174)
@@ -150,31 +150,18 @@
/**
* Perform a programmatic sign out.
*
+ * @deprecated Use the QName("urn:jboss:portal", "signOut") event
instead
* @throws IllegalStateException if programmatic signout cannot be done
*/
public void signOut() throws IllegalStateException
- {
-
+ {
setEvent(new QName(CoreEventControllerContext.PORTAL_NAMESPACE,
"signOut"), null);
-/*
- if (!PortletRequest.FORM_AUTH.equals(preq.getAuthType()))
- {
- throw new IllegalStateException("Cannot perform programmatic
signout");
- }
- try
- {
- sendRedirect(null);
- }
- catch (IOException e)
- {
- throw new IllegalStateException("Cannot perform programmatic
signout");
- }
- */
}
/**
* Perform a programmatic sign out and navigate to the URL specified by the location
parameter.
*
+ * @deprecated Use the QName("urn:jboss:portal", "signOut") event
instead (Pass the redirection URL as payload)
* @param location URL to redirect to after signout; can be null to indicate default
behavior.
* @throws IllegalStateException if programmatic signout cannot be done
* @throws IllegalArgumentException if the location is not valid
@@ -183,26 +170,6 @@
{
setEvent(new QName(CoreEventControllerContext.PORTAL_NAMESPACE,
"signOut"), location);
-// throw new NotYetImplemented();
- /*
- if (!PortletRequest.FORM_AUTH.equals(preq.getAuthType()))
- {
- throw new IllegalStateException("Cannot perform programmatic
signout");
- }
- if (location == null)
- {
- throw new IllegalArgumentException("Null location is not accepted");
- }
- URLTools.enforceAbsoluteURL(location);
- try
- {
- sendRedirect(location);
- }
- catch (IOException e)
- {
- throw new IllegalStateException("Cannot perform programmatic
signout");
- }
- */
}
}
Show replies by date