com.filenet.wcm.toolkit.server.ui
Class WcmSignInModule

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.base.WcmDpContainer
      extended bycom.filenet.wcm.toolkit.server.base.WcmModule
          extended bycom.filenet.wcm.toolkit.server.base.GlobalEventModule
              extended bycom.filenet.wcm.toolkit.server.base.WcmUiModule
                  extended bycom.filenet.wcm.toolkit.server.ui.WcmSignInModule
All Implemented Interfaces:
WcmModuleInterface, WcmUiModuleInterface

public class WcmSignInModule
extends WcmUiModule

UI module that renders Sign In screen


Field Summary
protected  WcmController controller
           
static WcmString CREDENTIALS_EXCEPTION
           
static WcmString ERR_LABEL
           
static WcmString GUEST_LABEL
           
protected  boolean guestAllowed
           
protected  java.lang.String guestPassword
           
protected  java.lang.String guestUserName
           
static WcmString HELP_LABEL
           
protected  boolean isClientTimeZoneDefined
           
protected  java.lang.Boolean isLocal
           
static WcmString PASSWORD_LABEL
           
static WcmString RESET_LABEL
           
protected  java.util.HashMap signInParameters
           
protected  WcmSignInProcessor signInProcessor
           
static WcmString SUBMIT_LABEL
           
protected  java.lang.String targetHelpUrl
           
static java.lang.String TYPE_GUEST
           
static WcmString USER_LABEL
           
 
Fields inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
locale, NAME_DELIMITER
 
Constructor Summary
WcmSignInModule()
           
 
Method Summary
static boolean areRequiredParametersPresent(WcmController controller, javax.servlet.http.HttpServletRequest request)
           
 java.lang.String getErrorMessage()
          If the last sign-in was unsuccessful, this method will return the error message string related to the exception that was caught.
 java.lang.String getErrorPage()
           
 java.lang.String getFormName()
          Returns the form name used by WcmSignInModule.
protected  void getGuestConfiguration()
          Override, initializes guest information
 java.lang.String getHiddenFields()
          Return a set of hidden fields that can optionally be written into the sign-in form.
 java.lang.String getLastUser()
          If the last sign-in was unsuccessful, this method will return the username that signin was attempted on - assuming it wasn't a guest sign-in.
 int getMaxErrorLength()
          Returns the recommended maximimum length of the error message's length to show on the sign-in page.
 java.util.HashMap getSignInParameters(javax.servlet.http.HttpServletRequest request)
           
protected  WcmSignInProcessor getSignInProcessor(javax.servlet.http.HttpServletRequest request)
           
 java.lang.String getTargetBase()
          Get the value of the target base.
 java.lang.String getTargetUrl()
          Get the value of the target URL.
 void initialize()
          Override, and initialize this UI module.
 boolean isGuestAllowed()
          Return true or false value that specifies whether or not this application is configured to allow guest sign ins.
 boolean isSessionLocal()
           
 boolean isSessionLocal(javax.servlet.http.HttpServletRequest request)
          Returns true if the session is local
 boolean isTokenException()
           
 void onGuestSignIn(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Event handler for GuestSignIn event.
 void onReset(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Event handler for the Reset event, which causes any displayed error messages to be cleared, causes "getErrorMessage()" to return null.
 void onSignIn(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Event handler for SignIn event - when the user has entered credentials, and submits the form.
 void onStartPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Event handler for the Reset event, which causes any displayed error messages to be cleared, causes "getErrorMessage()" to return null.
 void render(java.io.Writer w)
          Renders the module
protected  void returnToPage()
          Redirect to the start page as specified either by targetBase and targetUrl.
protected  void setErrorMessage(java.lang.String value)
           
protected  void setErrorPage(java.lang.String value)
           
protected  void setLastUser(java.lang.String value)
           
protected  void setTokenException(boolean value)
           
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmUiModule
getActive, getBasePath, getBaseUrl, getBaseURLBuilder, getControllerEventUrl, getControllerEventUrl, getEventFormFields, getEventFormFields, getEventFormTag, getEventFormTag, getEventUrl, getEventUrl, getEventUrl, getEventUrl, getFormSubmitUrl, getFormSubmitUrl, getGlobalEventUrl, getGlobalEventUrl, getPageUrl, getPageUrl, getPageUrl, getPageUrl, getUiParent, peekEvent, renderJSP, routeEvent, routeEvent, serverSideInclude, serverSideInclude, setActive, setJSP
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.GlobalEventModule
subscribeGlobalEvent
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
addChild, addChild, addChild, cleanup, debugTrace, getClassProperty, getClassProperty, getClassPropertyKeys, getConfiguration, getController, getDataStore, getModuleProperty, getModuleProperty, getModuleProperty, getModuleProperty, getModulePropertyKeys, getName, getParent, getWindowProperty, getWindowProperty, persist, queryDataProvider, setClassProperty, setClassProperty, setController, setModuleProperty, setModuleProperty, setName, setParent, setPortletParent, setWindowProperty
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmDpContainer
addDataProvider, addDataProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.filenet.wcm.toolkit.server.base.WcmModuleInterface
addDataProvider, cleanup, getDataStore, getModuleProperty, getName, getParent, persist, queryDataProvider, setController, setModuleProperty, setName, setParent
 

Field Detail

TYPE_GUEST

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

SUBMIT_LABEL

public static final WcmString SUBMIT_LABEL

RESET_LABEL

public static final WcmString RESET_LABEL

GUEST_LABEL

public static final WcmString GUEST_LABEL

HELP_LABEL

public static final WcmString HELP_LABEL

USER_LABEL

public static final WcmString USER_LABEL

PASSWORD_LABEL

public static final WcmString PASSWORD_LABEL

ERR_LABEL

public static final WcmString ERR_LABEL

CREDENTIALS_EXCEPTION

public static final WcmString CREDENTIALS_EXCEPTION

guestAllowed

protected boolean guestAllowed

guestUserName

protected java.lang.String guestUserName

guestPassword

protected java.lang.String guestPassword

targetHelpUrl

protected java.lang.String targetHelpUrl

signInProcessor

protected WcmSignInProcessor signInProcessor

isLocal

protected java.lang.Boolean isLocal

controller

protected WcmController controller

signInParameters

protected java.util.HashMap signInParameters

isClientTimeZoneDefined

protected boolean isClientTimeZoneDefined
Constructor Detail

WcmSignInModule

public WcmSignInModule()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Override, and initialize this UI module.

Specified by:
initialize in interface WcmModuleInterface
Overrides:
initialize in class WcmModule
Throws:
java.lang.Exception

onStartPage

public void onStartPage(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws java.lang.Exception
Event handler for the Reset event, which causes any displayed error messages to be cleared, causes "getErrorMessage()" to return null.

Specified by:
onStartPage in interface WcmUiModuleInterface
Overrides:
onStartPage in class GlobalEventModule
Parameters:
request - HttpServletRequest
response - HttpServletResponse
Throws:
java.lang.Exception

isSessionLocal

public boolean isSessionLocal()

isSessionLocal

public boolean isSessionLocal(javax.servlet.http.HttpServletRequest request)
                       throws java.lang.Exception
Returns true if the session is local

Parameters:
request -
Returns:
Throws:
java.lang.Exception

getFormName

public java.lang.String getFormName()
Returns the form name used by WcmSignInModule.

Specified by:
getFormName in interface WcmUiModuleInterface
Overrides:
getFormName in class WcmUiModule
Returns:
The form name, returns null if no form is used.

getMaxErrorLength

public int getMaxErrorLength()
Returns the recommended maximimum length of the error message's length to show on the sign-in page.

Returns:
int

getHiddenFields

public java.lang.String getHiddenFields()
Return a set of hidden fields that can optionally be written into the sign-in form. These include the sign-in page parameters, so that they are persisted in the browser, and hidden fields to support retrieval of the browser machine's timezone information (when required).

Returns:
A String of HTML.

getGuestConfiguration

protected void getGuestConfiguration()
                              throws java.lang.Exception
Override, initializes guest information

Throws:
java.lang.Exception

getSignInParameters

public java.util.HashMap getSignInParameters(javax.servlet.http.HttpServletRequest request)

getSignInProcessor

protected WcmSignInProcessor getSignInProcessor(javax.servlet.http.HttpServletRequest request)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

areRequiredParametersPresent

public static boolean areRequiredParametersPresent(WcmController controller,
                                                   javax.servlet.http.HttpServletRequest request)

isGuestAllowed

public boolean isGuestAllowed()
Return true or false value that specifies whether or not this application is configured to allow guest sign ins. If this method returns true, you can provide a click when rendering the module for the "onGuestSignIn" event.

Returns:
boolean true/false

getTargetBase

public java.lang.String getTargetBase()
Get the value of the target base. This is the "base" portion of the URL that the sign in page routes to after a successful sign in.

Returns:
The target base value.

getTargetUrl

public java.lang.String getTargetUrl()
Get the value of the target URL. This is the "page" portion of the URL that the sign in page routes to after a successful sign in.

Returns:
The target base value.

returnToPage

protected void returnToPage()
                     throws java.lang.Exception
Redirect to the start page as specified either by targetBase and targetUrl. If targetUrl is not passed in as a page parameter to the sign in page, use the URL returned from signInLocal or signInRemote. Override if you want to customize this behavior.

Throws:
java.lang.Exception

onSignIn

public void onSignIn(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws java.lang.Exception
Event handler for SignIn event - when the user has entered credentials, and submits the form.

Parameters:
request - HttpServletRequest
response - HttpServletResponse
Throws:
java.lang.Exception

onGuestSignIn

public void onGuestSignIn(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws java.lang.Exception
Event handler for GuestSignIn event.

Parameters:
request - HttpServletRequest
response - HttpServletResponse
Throws:
java.lang.Exception

onReset

public void onReset(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws java.lang.Exception
Event handler for the Reset event, which causes any displayed error messages to be cleared, causes "getErrorMessage()" to return null.

Parameters:
request - HttpServletRequest
response - HttpServletResponse
Throws:
java.lang.Exception

getLastUser

public java.lang.String getLastUser()
                             throws java.lang.Exception
If the last sign-in was unsuccessful, this method will return the username that signin was attempted on - assuming it wasn't a guest sign-in.

Returns:
User name from last failed attempt to sign-in.
Throws:
java.lang.Exception

setLastUser

protected void setLastUser(java.lang.String value)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getErrorMessage

public java.lang.String getErrorMessage()
                                 throws java.lang.Exception
If the last sign-in was unsuccessful, this method will return the error message string related to the exception that was caught.

Returns:
Error message from last failed attempt to sign-in.
Throws:
java.lang.Exception

setErrorMessage

protected void setErrorMessage(java.lang.String value)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getErrorPage

public java.lang.String getErrorPage()
                              throws java.lang.Exception
Throws:
java.lang.Exception

setErrorPage

protected void setErrorPage(java.lang.String value)
                     throws java.lang.Exception
Throws:
java.lang.Exception

isTokenException

public boolean isTokenException()
                         throws java.lang.Exception
Throws:
java.lang.Exception

setTokenException

protected void setTokenException(boolean value)
                          throws java.lang.Exception
Throws:
java.lang.Exception

render

public void render(java.io.Writer w)
            throws java.lang.Exception
Renders the module

Specified by:
render in interface WcmUiModuleInterface
Overrides:
render in class WcmUiModule
Parameters:
w -
Throws:
java.lang.Exception


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.