userman
Class LoginBean

java.lang.Object
  extended by userman.LoginBean
All Implemented Interfaces:
java.io.Serializable

@Named
@RequestScoped
public class LoginBean
extends java.lang.Object
implements java.io.Serializable

This is the bean class supporting logging into and registering with the application.

See Also:
Serialized Form

Constructor Summary
LoginBean()
           
 
Method Summary
 java.lang.String getName()
          Getter for the name property.
 java.lang.String getPassword()
          Getter for the password property.
 java.lang.String getPasswordConfirm()
          Getter for the passwordConfirm property.
 boolean isConfirmNotMatched()
          Getter for the confirmNotMatched property.
 boolean isNameInUse()
          Getter for the nameInUse property.
 boolean isNameNotFound()
          Getter for the nameNotFound property.
 boolean isPasswordNotMatched()
          Getter for the passwordNotMatched property.
 java.lang.String login()
          Action method called when the user chooses to login.
 java.lang.String logout()
          Action method called when the user chooses to logout.
 java.lang.String register()
          Action method called when the user chooses to register for the website.
 void setName(java.lang.String name)
          Setter for the name property.
 void setPassword(java.lang.String password)
          Setter for the password property.
 void setPasswordConfirm(java.lang.String passwordConfirm)
          Setter for the passwordConfirm property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginBean

public LoginBean()
Method Detail

login

public java.lang.String login()
Action method called when the user chooses to login. The submitted user name and password are passed to the user manager for authentication.

Returns:
a page navigation string

logout

public java.lang.String logout()
Action method called when the user chooses to logout. The user manager clears current user information.

Returns:
a string to navigate to the welcome page

register

public java.lang.String register()
                          throws java.io.IOException,
                                 java.sql.SQLException
Action method called when the user chooses to register for the website.

Returns:
a navigation string
Throws:
java.io.IOException
java.sql.SQLException

isNameInUse

public boolean isNameInUse()
Getter for the nameInUse property.

Returns:
whether the chosen user name is already in use

isNameNotFound

public boolean isNameNotFound()
Getter for the nameNotFound property.

Returns:
whether the submitted user name was not found in the database

isPasswordNotMatched

public boolean isPasswordNotMatched()
Getter for the passwordNotMatched property.

Returns:
whether the submitted password was not found in the database

isConfirmNotMatched

public boolean isConfirmNotMatched()
Getter for the confirmNotMatched property.

Returns:
whether the submitted password and confirm password did not match

setName

public void setName(java.lang.String name)
Setter for the name property.

Parameters:
name - the submitted user name

getName

public java.lang.String getName()
Getter for the name property.

Returns:
the submitted user name

getPassword

public java.lang.String getPassword()
Getter for the password property.

Returns:
empty string so password information is not kept between pages

getPasswordConfirm

public java.lang.String getPasswordConfirm()
Getter for the passwordConfirm property.

Returns:
empty string so password information is not kept between pages

setPassword

public void setPassword(java.lang.String password)
Setter for the password property.

Parameters:
password - the submitted password

setPasswordConfirm

public void setPasswordConfirm(java.lang.String passwordConfirm)
Setter for the passwordConfirm property.

Parameters:
passwordConfirm - the submitted confirm password