com.fatwire.gst.foundation.facade.runtag.user
Class SwitchUser

java.lang.Object
  extended by com.fatwire.gst.foundation.facade.runtag.user.SwitchUser

public final class SwitchUser
extends Object

This class provides the user.su body tag functionality. Unfortunately, RunTag does not support body tags with actions in both the starttag and endtag, and this functionality requires this. Instead, this class is stateful and contains a switchTo() and switchBack() method.

Note that this class is NOT THREAD SAFE.

Since:
Feb 1, 2011
Author:
Tony Field

Constructor Summary
SwitchUser(COM.FutureTense.Interfaces.ICS ics)
           
 
Method Summary
 void switchBack()
          Switch back to the previous user.
 boolean switchTo(String username, String password)
          Switch from the current user to a new user, (if username and password are correct).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwitchUser

public SwitchUser(COM.FutureTense.Interfaces.ICS ics)
Method Detail

switchTo

public boolean switchTo(String username,
                        String password)
Switch from the current user to a new user, (if username and password are correct). If Username and password aren't correct, nothing happens. The new user sees no variables or session variables from the previous user, but lists and objects in the object pool are not affected.

Parameters:
username - new userid. Null is not allowed
password - new password. Null is not allowed.
Returns:
true on success, false on login failure

switchBack

public void switchBack()
Switch back to the previous user.



Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.