quintonm 2003/03/12 10:38:41
Modified: src/java/org/apache/turbine/modules/actions LogoutUser.java
Log:
- The action now delcares the actual exception that will be thrown.
- Style fixes
- replaced deprecated call to HttpSession.removeValue() with
HttpSession.removeAttribute()
Revision Changes Path
1.10 +8 -11
jakarta-turbine-2/src/java/org/apache/turbine/modules/actions/LogoutUser.java
Index: LogoutUser.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/modules/actions/LogoutUser.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- LogoutUser.java 11 Mar 2003 16:10:05 -0000 1.9
+++ LogoutUser.java 12 Mar 2003 18:38:41 -0000 1.10
@@ -58,16 +58,12 @@
import org.apache.turbine.Turbine;
import org.apache.turbine.TurbineConstants;
-
import org.apache.turbine.modules.Action;
-
import org.apache.turbine.om.security.User;
-
import org.apache.turbine.services.security.TurbineSecurity;
-
import org.apache.turbine.util.RunData;
-
import org.apache.turbine.util.security.AccessControlList;
+import org.apache.turbine.util.security.TurbineSecurityException;
/**
* This action removes a user from the session. It makes sure to save
@@ -78,7 +74,7 @@
* @version $Id$
*/
public class LogoutUser
- extends Action
+ extends Action
{
/**
* Clears the RunData user object back to an anonymous status not
@@ -95,10 +91,11 @@
* for a logged out (read not-logged-in) user.
*
* @param data Turbine information.
- * @exception Exception a generic exception.
+ * @exception TurbineSecurityException a problem occured in the security
+ * service.
*/
public void doPerform(RunData data)
- throws Exception
+ throws TurbineSecurityException
{
User user = data.getUser();
@@ -129,7 +126,7 @@
// In the event that the current screen or related navigations
// require acl info, we cannot wait for Turbine to handle
// regenerating acl.
- data.getSession().removeValue(AccessControlList.SESSION_KEY);
+ data.getSession().removeAttribute(AccessControlList.SESSION_KEY);
// If this action name is the value of action.logout then we are
// being run before the session validator, so we don't need to
@@ -138,7 +135,7 @@
// - it is recommended that action.logout is set to "LogoutUser" and
// that the session validator does handle setting the screen/template
// for a logged out (read not-logged-in) user.
- if (!conf.getString(TurbineConstants.ACTION_LOGOUT_KEY,
+ if (!conf.getString(TurbineConstants.ACTION_LOGOUT_KEY,
TurbineConstants.ACTION_LOGOUT_DEFAULT)
.equals(TurbineConstants.ACTION_LOGOUT_DEFAULT))
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]