com.plumtree.portalpages.common.login
Class LoginHTML

java.lang.Object
  extended by com.plumtree.portalpages.common.login.LoginHTML

public class LoginHTML
extends java.lang.Object

Author:
DonH This class contains common code to generate HTML for login views, including the auth source dropdown. This code was moved from PTLoginHelper during refactoring.

Field Summary
static long AUTHSOURCE_SELECT_CACHE_LIFE_MS
          This is the number of milliseconds for which the HTMLSelect presenting the various authentication sources is cached on the application.
static boolean bAllowLoginInfoPersistenceBetweenLogins
          Whether or not to store information about last-login in a client cookie, to be restored at time of next login.
static java.lang.String HTMLBUTTON_LOGIN
           
static int iMaxAuthSourceDescriptionLength
          The maximum length of the auth source description
static java.lang.String PARAM_AUTHSOURCE
           
static java.lang.String PARAM_DOLOGIN
          Parameter that indicates that the login control should attempt a login, rather than just displaying the login page.
static java.lang.String PARAM_DOLOGIN_508
           
static java.lang.String PARAM_HIDDEN_AUTHSOURCE
           
static java.lang.String PARAM_REMEMBER
           
static java.lang.String PARAM_SHOWAUTHSOURCES
           
static java.lang.String PARAM_USERNAME
           
static java.lang.String PARAM_USERPASS
           
static java.lang.String STR_JS_FUNC_NAME_DO_LOGIN
           
 
Constructor Summary
LoginHTML()
           
 
Method Summary
static HTMLSelect GetAuthSourceSelect(AActivitySpace space, IApplication application, boolean b508, java.lang.String sUniquifier)
          Call this method to obtain an HTMLSelect presenting the available authentication sources.
static HTMLTable GetLoginDirections(AActivitySpace asOwner, java.lang.String sWidth, boolean bShowAuthSource)
          This method creates the HTML that describes how to login.
static HTMLScript GetLoginJScript(boolean b508, java.lang.String sFormName, java.lang.String sUniquifier)
          This method returns the javascript for the login HTML.
static HTMLTable GetLoginTextBoxes(AActivitySpace asOwner, boolean b508, java.lang.String sUniquifier)
          This method creates the login text boxes.
static IPTSession GetPTSession(AActivitySpace aSpace)
          Helper method GetPTSession.
static HTMLTableCell MakeLoginForm(HTMLForm myForm, java.lang.String sFormName, java.lang.String sLoginASName, java.lang.String sSpaceID, java.lang.String sControlName, AActivitySpace asOwner, boolean b508, java.lang.String sUniquifier, HTMLElement myCreateLink, boolean bShowAuthSource, boolean bAllowAuthSourceDropdownDisplay)
          This method creates the HTML for the login form.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_DOLOGIN

public static final java.lang.String PARAM_DOLOGIN
Parameter that indicates that the login control should attempt a login, rather than just displaying the login page.

See Also:
Constant Field Values

PARAM_USERNAME

public static final java.lang.String PARAM_USERNAME
See Also:
Constant Field Values

PARAM_USERPASS

public static final java.lang.String PARAM_USERPASS
See Also:
Constant Field Values

PARAM_REMEMBER

public static final java.lang.String PARAM_REMEMBER
See Also:
Constant Field Values

PARAM_AUTHSOURCE

public static final java.lang.String PARAM_AUTHSOURCE
See Also:
Constant Field Values

PARAM_HIDDEN_AUTHSOURCE

public static final java.lang.String PARAM_HIDDEN_AUTHSOURCE
See Also:
Constant Field Values

PARAM_SHOWAUTHSOURCES

public static final java.lang.String PARAM_SHOWAUTHSOURCES
See Also:
Constant Field Values

PARAM_DOLOGIN_508

public static final java.lang.String PARAM_DOLOGIN_508
See Also:
Constant Field Values

HTMLBUTTON_LOGIN

public static final java.lang.String HTMLBUTTON_LOGIN
See Also:
Constant Field Values

STR_JS_FUNC_NAME_DO_LOGIN

public static final java.lang.String STR_JS_FUNC_NAME_DO_LOGIN
See Also:
Constant Field Values

iMaxAuthSourceDescriptionLength

public static final int iMaxAuthSourceDescriptionLength
The maximum length of the auth source description

See Also:
Constant Field Values

AUTHSOURCE_SELECT_CACHE_LIFE_MS

public static final long AUTHSOURCE_SELECT_CACHE_LIFE_MS
This is the number of milliseconds for which the HTMLSelect presenting the various authentication sources is cached on the application. After this many milliseconds, the server will be again querried, and a new HTMLSelect will be generated.

See Also:
Constant Field Values

bAllowLoginInfoPersistenceBetweenLogins

public static final boolean bAllowLoginInfoPersistenceBetweenLogins
Whether or not to store information about last-login in a client cookie, to be restored at time of next login. The trade-off is an nice increase in usability for a slight loss of security (i.e. hacker now knows a username and last auth source used)

See Also:
Constant Field Values
Constructor Detail

LoginHTML

public LoginHTML()
Method Detail

GetAuthSourceSelect

public static HTMLSelect GetAuthSourceSelect(AActivitySpace space,
                                             IApplication application,
                                             boolean b508,
                                             java.lang.String sUniquifier)
Call this method to obtain an HTMLSelect presenting the available authentication sources. This HTMLSelect will be generated once, and then cached on the application for AUTHSOURCE_SELECT_CACHE_LIFE_MS milliseconds. A subsequent call to this method will cause the server to be querried, and a new HTMLSelect to be generated and cached.

This method caches auth source selects based on language and 508 value. It is not entirely threadsafe.

NOTE: Since the cached HTMLSelect object is stored on the application and shared between users, absolutely no changes can be made to it without causing multi-threading problems. The returned object is READ ONLY!

Parameters:
space - the current Activity Space.
application - Pass a reference to an IApplication object.
boolean - whether or not we are displaying 508 compliant HTML.

GetLoginDirections

public static HTMLTable GetLoginDirections(AActivitySpace asOwner,
                                           java.lang.String sWidth,
                                           boolean bShowAuthSource)
This method creates the HTML that describes how to login.


MakeLoginForm

public static HTMLTableCell MakeLoginForm(HTMLForm myForm,
                                          java.lang.String sFormName,
                                          java.lang.String sLoginASName,
                                          java.lang.String sSpaceID,
                                          java.lang.String sControlName,
                                          AActivitySpace asOwner,
                                          boolean b508,
                                          java.lang.String sUniquifier,
                                          HTMLElement myCreateLink,
                                          boolean bShowAuthSource,
                                          boolean bAllowAuthSourceDropdownDisplay)
This method creates the HTML for the login form.


GetLoginJScript

public static HTMLScript GetLoginJScript(boolean b508,
                                         java.lang.String sFormName,
                                         java.lang.String sUniquifier)
This method returns the javascript for the login HTML.


GetLoginTextBoxes

public static HTMLTable GetLoginTextBoxes(AActivitySpace asOwner,
                                          boolean b508,
                                          java.lang.String sUniquifier)
This method creates the login text boxes.


GetPTSession

public static IPTSession GetPTSession(AActivitySpace aSpace)
Helper method GetPTSession. Gets IPTSession from AActivitySpace cleanly.

Parameters:
as -
Returns:
IPTSession



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