com.plumtree.portalpages.pei
Class PTLoginActions

java.lang.Object
  extended by com.plumtree.portalpages.pei.PTLoginActions
All Implemented Interfaces:
ILoginActions

public class PTLoginActions
extends java.lang.Object
implements ILoginActions

Author:
Ben Geislinger This class is automatically called during logins and caches the user's personal settings from the SessionInfo object.

Field Summary
static java.lang.String PASSWORD_LAST_CHANGED
           
 
Constructor Summary
PTLoginActions()
           
 
Method Summary
 Redirect CheckPasswordExpiration(IPTSession _ptSession, ApplicationData _appData)
          This internal helper method checks if the password has expired or not.
static java.lang.String GetBrowserLocaleSetting(AActivitySpace _asOwner)
          This method gets a supported locale from the browser settings, but does not set it anywhere.
protected static java.lang.String InternalGetBrowserLocale(java.lang.String sBrowserLocaleList, IApplication _application, XPResourceManager _rm)
          This method gets a supported locale from the browser settings, and sets it on the http session and as a runtime setting.
protected static void InternalSetBrowserLocaleSetting(java.lang.String sLocale, IPTSession _ptSession, ISessionManager _sessionManager, ISessionManager _persistentSessionManager, IApplication _application, XPResourceManager _rm)
          This method gets a supported locale from the browser settings, and sets it on the http session and as a runtime setting.
 Redirect OnAfterLogin(java.lang.Object _oUserSession, ApplicationData _appData)
          This function will take a given userSession and grab all of the users personal settings and take care of caching them.
 Redirect OnBeforeLogin(ApplicationData _appData, java.lang.String _strUserName)
          This functions allows for some functionality to occur before the user has logged in to the Portal.
 Redirect OnBeforeLogout(java.lang.Object _oUserSession, ApplicationData _appData)
          This function allows for some functionality to occur once the user has clicked on the Logoff link.
 java.lang.String OnFailedLogin(ApplicationData _appData, java.lang.String _strUserName, XPException _xpError)
          This function allows for some functionality to occur if a user should not login successfully.
protected  void SetBrowserLocaleSetting(ApplicationData _appData, IPTSession _ptSession, ISessionManager _sessionManager, ISessionManager _persistentSessionManager, IApplication _application, XPResourceManager _rm)
          This method gets a supported locale from the browser settings, and sets it on the http session and as a runtime setting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PASSWORD_LAST_CHANGED

public static final java.lang.String PASSWORD_LAST_CHANGED
See Also:
Constant Field Values
Constructor Detail

PTLoginActions

public PTLoginActions()
Method Detail

OnAfterLogin

public Redirect OnAfterLogin(java.lang.Object _oUserSession,
                             ApplicationData _appData)
This function will take a given userSession and grab all of the users personal settings and take care of caching them.

Specified by:
OnAfterLogin in interface ILoginActions
Parameters:
_oUserSession - - Session object for the current user
_appData - - This parameter provides access to some of the application data that would normally be available through the current Activity Space
Returns:
Redirect - Location that the User will be redirected after the functionality has completed. This redirect will be ignored if we are attempting to login the guest user.
See Also:
com.plumtree.uiinfrastructure.login.ILoginActions#OnAfterLogin(Object, ApplicationData)

CheckPasswordExpiration

public Redirect CheckPasswordExpiration(IPTSession _ptSession,
                                        ApplicationData _appData)
This internal helper method checks if the password has expired or not. It is public for unit test purposes only and should not be used outside of this class.

Parameters:
_ptSession - the current user session.
_appData - the application data for this PEI
Returns:
a Redirect if the password has expired, null if the password is valid.

OnBeforeLogin

public Redirect OnBeforeLogin(ApplicationData _appData,
                              java.lang.String _strUserName)
Description copied from interface: ILoginActions
This functions allows for some functionality to occur before the user has logged in to the Portal.

WARNING: The user name in argument (_strUserName) will be empty if this is an auto-login. It will have a valid value in all other cases (through the Login Page, SSO Login, Guest Login).

Specified by:
OnBeforeLogin in interface ILoginActions
Parameters:
_appData - - This parameter provides access to some of the application data that would normally be available through the current Activity Space
_strUserName - - This is the name of the user that is about to log in. This is blank if this is an auto-login. It will be "Guest" if it is the guest user (This value will always be the same, even if you rename the guest user).
Returns:
Redirect - Location that the User will be redirected after the functionality has completed. This redirect will be ignored if we are attempting to login the guest user and it is an internal redirect (These kinds of redirects should be done from OnAfterLogin since you can't access the portal if you're not even logged in as Guest).

OnBeforeLogout

public Redirect OnBeforeLogout(java.lang.Object _oUserSession,
                               ApplicationData _appData)
Description copied from interface: ILoginActions
This function allows for some functionality to occur once the user has clicked on the Logoff link. This is not called when the guest user is logged off in order to log in a normal user. This method is also not called when a user session is timed out by the application server. It is only called when a user clicks directly on the logout link.

Specified by:
OnBeforeLogout in interface ILoginActions
Parameters:
_oUserSession - - Session object for the current user
_appData - - This parameter provides access to some of the application data that would normally be available through the current Activity Space
Returns:
Redirect - Location that the User will be redirected after the functionality has completed.

OnFailedLogin

public java.lang.String OnFailedLogin(ApplicationData _appData,
                                      java.lang.String _strUserName,
                                      XPException _xpError)
Description copied from interface: ILoginActions
This function allows for some functionality to occur if a user should not login successfully. NOTE: To return a Redirect object on a failed login event, implement the ILoginActions2 interface instead in your LoginActions PEI, and use the OnFailedLoginDoRedirect method. PEIs implementing the ILoginActions2 interface are loaded exactly the same as PEIs implementing the ILoginActions interface. If a FailedLoginRedirect is returned by OnFailedLoginDoRedirect, then the error message returned by this method may or may not be displayed, depending upon where the user is redirected to.

Specified by:
OnFailedLogin in interface ILoginActions
Parameters:
_appData - - This parameter provides access to some of the application data that would normally be available through the current Activity Space
_strUserName - - This is the name of the user who failed on login..
_xpError - - the error that caused login to fail. May be null
Returns:
String - Any kind of specialized error message that needs to be returned to the user because of the failed login. This will override the error message from the exception it is not null or "".

SetBrowserLocaleSetting

protected void SetBrowserLocaleSetting(ApplicationData _appData,
                                       IPTSession _ptSession,
                                       ISessionManager _sessionManager,
                                       ISessionManager _persistentSessionManager,
                                       IApplication _application,
                                       XPResourceManager _rm)
This method gets a supported locale from the browser settings, and sets it on the http session and as a runtime setting.

Parameters:
_appData -
_oUserSession -
_sessionManager -
_application -
_rm -

GetBrowserLocaleSetting

public static java.lang.String GetBrowserLocaleSetting(AActivitySpace _asOwner)
This method gets a supported locale from the browser settings, but does not set it anywhere.

Parameters:
_asOwner -
Returns:
String The browser locale.

InternalGetBrowserLocale

protected static java.lang.String InternalGetBrowserLocale(java.lang.String sBrowserLocaleList,
                                                           IApplication _application,
                                                           XPResourceManager _rm)
This method gets a supported locale from the browser settings, and sets it on the http session and as a runtime setting.

Parameters:
_appData -
_oUserSession -
_sessionManager -
_application -
_rm -

InternalSetBrowserLocaleSetting

protected static void InternalSetBrowserLocaleSetting(java.lang.String sLocale,
                                                      IPTSession _ptSession,
                                                      ISessionManager _sessionManager,
                                                      ISessionManager _persistentSessionManager,
                                                      IApplication _application,
                                                      XPResourceManager _rm)
This method gets a supported locale from the browser settings, and sets it on the http session and as a runtime setting.

Parameters:
_appData -
_oUserSession -
_sessionManager -
_application -
_rm -



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.