com.plumtree.uiinfrastructure.pei
Interface ILoginActions

All Known Subinterfaces:
ILoginActions2
All Known Implementing Classes:
LoginPEIContainer, PTLoginActions

public interface ILoginActions

This interface was created to allow developers the ability to create functions that can be dynamically discovered by the Plumtree application for the purposes of performing some functionality when a particular login based event occurs.

NOTE: Should this interface be implemented more than once within the Dynamic Discovery process, the implementations will be processed in the order that they are displayed within the representative XML file. All implementations will be called.

NOTE: In the case where a Redirect object is returned, the first implementation of the interface that actually returns a valid Redirect will be the one that will be processed.

NOTE: In the case where multiple implementations return a String object, all the valid Strings (not null and not empty) will be appended together (separated by a blank space) and the final String will be the error message displayed on the page.

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.


Method Summary
 Redirect OnAfterLogin(java.lang.Object _oUserSession, ApplicationData _appData)
          This function allows for some functionality to occur once the user has successfully logged in and then possibly do a redirect to someplace other than the MyPage.
 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.
 

Method Detail

OnAfterLogin

Redirect OnAfterLogin(java.lang.Object _oUserSession,
                      ApplicationData _appData)
This function allows for some functionality to occur once the user has successfully logged in and then possibly do a redirect to someplace other than the MyPage.

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.

OnBeforeLogout

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. 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.

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.

OnBeforeLogin

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.

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).

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).

OnFailedLogin

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. 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.

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 "".



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