org.alfresco.web.bean
Class LoginBean

java.lang.Object
  extended by org.alfresco.web.bean.LoginBean
All Implemented Interfaces:
java.io.Serializable

public class LoginBean
extends java.lang.Object
implements java.io.Serializable

JSF Managed Bean. Backs the "login.jsp" view to provide the form fields used to enter user data for login. Also contains bean methods to validate form fields and action event fired in response to the Login button being pressed.

See Also:
Serialized Form

Field Summary
protected  BrowseBean browseBean
          The BrowseBean reference
static java.lang.String LOGIN_EXTERNAL_AUTH
           
static java.lang.String LOGIN_NOPERMISSIONS
           
static java.lang.String MSG_ERROR_LOGIN_NOPERMISSIONS
           
static java.lang.String MSG_PASSWORD_LENGTH
           
static java.lang.String MSG_USER_ERR
           
static java.lang.String MSG_USERNAME_LENGTH
           
protected  NavigationBean navigator
          The NavigationBean bean reference
protected  UserPreferencesBean preferences
          The user preferences bean reference
 
Constructor Summary
LoginBean()
           
 
Method Summary
protected  org.alfresco.service.cmr.security.AuthenticationService getAuthenticationService()
           
 java.lang.String getLogoutOutcome()
           
protected  org.alfresco.service.cmr.repository.NodeService getNodeService()
           
 java.lang.String getPassword()
           
protected  org.alfresco.service.cmr.security.PersonService getPersonService()
           
 java.lang.String getTeamLoginWarningHTML()
          Returns the HTML to display if the system is in TEAM mode
 java.lang.String getUsername()
           
 java.lang.String getUsernameInternal()
           
 UserPreferencesBean getUserPreferencesBean()
           
 boolean isLanguageSelect()
           
 java.lang.String login()
          Login action handler
 java.lang.String logout()
          Invalidate ticket and logout user
 void setAuthenticationService(org.alfresco.service.cmr.security.AuthenticationService authenticationService)
           
 void setBrowseBean(BrowseBean browseBean)
           
 void setNavigator(NavigationBean navigator)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setPassword(java.lang.String val)
           
 void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
           
 void setUsername(java.lang.String val)
           
 void setUserPreferencesBean(UserPreferencesBean preferences)
           
 void validatePassword(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          Validate password field data is acceptable
 void validateUsername(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          Validate Username field data is acceptable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_ERROR_LOGIN_NOPERMISSIONS

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

MSG_USERNAME_LENGTH

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

MSG_PASSWORD_LENGTH

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

MSG_USER_ERR

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

LOGIN_EXTERNAL_AUTH

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

LOGIN_NOPERMISSIONS

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

browseBean

protected BrowseBean browseBean
The BrowseBean reference


navigator

protected NavigationBean navigator
The NavigationBean bean reference


preferences

protected UserPreferencesBean preferences
The user preferences bean reference

Constructor Detail

LoginBean

public LoginBean()
Method Detail

setAuthenticationService

public void setAuthenticationService(org.alfresco.service.cmr.security.AuthenticationService authenticationService)
Parameters:
authenticationService - The AuthenticationService to set.

getAuthenticationService

protected org.alfresco.service.cmr.security.AuthenticationService getAuthenticationService()

setPersonService

public void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
Parameters:
personService - The personService to set.

getPersonService

protected org.alfresco.service.cmr.security.PersonService getPersonService()

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Parameters:
nodeService - The nodeService to set.

getNodeService

protected org.alfresco.service.cmr.repository.NodeService getNodeService()

setBrowseBean

public void setBrowseBean(BrowseBean browseBean)
Parameters:
browseBean - The BrowseBean to set.

setNavigator

public void setNavigator(NavigationBean navigator)
Parameters:
navigator - The NavigationBean to set.

setUserPreferencesBean

public void setUserPreferencesBean(UserPreferencesBean preferences)
Parameters:
preferences - The UserPreferencesBean to set

getUserPreferencesBean

public UserPreferencesBean getUserPreferencesBean()

getLogoutOutcome

public java.lang.String getLogoutOutcome()
Returns:
"logout" if the default Alfresco authentication process is being used, else "relogin" if an external authorisation mechanism is present.

setUsername

public void setUsername(java.lang.String val)
Parameters:
val - Username from login dialog

getUsername

public java.lang.String getUsername()
Returns:
The username string from login dialog

getUsernameInternal

public java.lang.String getUsernameInternal()

setPassword

public void setPassword(java.lang.String val)
Parameters:
val - Password from login dialog

getPassword

public java.lang.String getPassword()
Returns:
The password string from login dialog

isLanguageSelect

public boolean isLanguageSelect()
Returns:
true to display language selection, false to

getTeamLoginWarningHTML

public java.lang.String getTeamLoginWarningHTML()
Returns the HTML to display if the system is in TEAM mode

Returns:
The HTML to display

validatePassword

public void validatePassword(javax.faces.context.FacesContext context,
                             javax.faces.component.UIComponent component,
                             java.lang.Object value)
                      throws javax.faces.validator.ValidatorException
Validate password field data is acceptable

Throws:
javax.faces.validator.ValidatorException

validateUsername

public void validateUsername(javax.faces.context.FacesContext context,
                             javax.faces.component.UIComponent component,
                             java.lang.Object value)
                      throws javax.faces.validator.ValidatorException
Validate Username field data is acceptable

Throws:
javax.faces.validator.ValidatorException

login

public java.lang.String login()
Login action handler

Returns:
outcome view name

logout

public java.lang.String logout()
Invalidate ticket and logout user



Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.