Methods Summary |
---|
public boolean | doLogin()Business method to actually perform login. This method just checks that
the password exists and is longer than 3 characters long. Real versions
should check with some kind of real mechanism to determing username and
password validity.
if (password == null || password.length() < 3) {
setLoggedIn(false);
} else {
setLoggedIn(true);
}
return isLoggedIn();
|
public java.lang.String | getPassword()Get the password
return this.password;
|
public java.lang.String | getUsername()Get the user name
return this.username;
|
public boolean | isLoggedIn()Determine if we are currently logged in or not
return loggedIn;
|
private void | setLoggedIn(boolean loggedIn)Set whether we are currently logged in or not
this.loggedIn = loggedIn;
|
public void | setPassword(java.lang.String password)Set the password
this.password = password;
|
public void | setUsername(java.lang.String username)Set the user name
this.username = username;
|