|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuserman.User
public class User
This User class models Environmental Simulation Project web application users. Some of the User class properties correspond directly to the columns of the users database table:
| Property | Type | Table Column |
|---|---|---|
| userId | Integer | userid |
| userName | String | name |
| hashedPassword | byte[] | password |
| accessLevel | Integer | accesslevel |
| firstName | String | first_name |
| lastName | String | last_name |
| String | ||
| institution | String | institution |
| title | String | title |
| session | String | session |
Other properties are boolean convenience properties for determining the user's access level:
| Property | True If |
|---|---|
| guest | accessLevel==0 |
| readOnly | accessLevel==1 |
| readWrite | accessLevel==2 |
| suspended | accessLevel==3 |
| pending | accessLevel==4 |
| admin | accessLevel==10 |
This class has a default constructor. Fields are populated by calls to setters.
This class does not represent a managed bean. It is best employed as a property of a managed bean such as UserManager>.
| Constructor Summary | |
|---|---|
User()
|
|
| Method Summary | |
|---|---|
int |
getAccessLevel()
Getter for the accessLevel property. |
java.lang.String |
getEmail()
Getter for the email property. |
java.lang.String |
getFirstName()
Getter for the firstName property. |
byte[] |
getHashedPassword()
Getter for the hashedPassword property. |
java.lang.String |
getInstitution()
Getter for the institution property. |
java.lang.String |
getLastName()
Getter for the lastName property. |
java.lang.String |
getPassword()
Getter for the password property. |
java.lang.String |
getSession()
Getter for the session property. |
java.lang.String |
getTitle()
Getter for the title property. |
int |
getUserId()
Getter for the userId property. |
java.lang.String |
getUserName()
Getter for the userName property. |
boolean |
isAdmin()
Getter for the admin property. |
boolean |
isGuest()
Getter for the guest property. |
boolean |
isPending()
Getter for the pending property. |
boolean |
isReadOnly()
Getter for the readOnly property. |
boolean |
isReadWrite()
Getter for the readWrite property. |
boolean |
isSuspended()
Getter for the suspended property. |
void |
setAccessLevel(int accessLevel)
Setter for the accessLevel property. |
void |
setEmail(java.lang.String email)
Setter for the email property. |
void |
setFirstName(java.lang.String firstName)
Setter for the firstName property. |
void |
setHashedPassword(byte[] hashedPassword)
Setter for the hashedPassword property. |
void |
setInstitution(java.lang.String institution)
Setter for the institution property. |
void |
setLastName(java.lang.String lastName)
Setter for the lastName property. |
void |
setPassword(java.lang.String password)
Setter for the password property. |
void |
setSession(java.lang.String session)
Setter for the session property. |
void |
setTitle(java.lang.String title)
Setter for the title property. |
void |
setUserId(int userId)
Setter for the userId property. |
void |
setUserName(java.lang.String userName)
Setter for the userName property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public User()
| Method Detail |
|---|
public boolean isGuest()
public boolean isReadOnly()
public boolean isReadWrite()
public boolean isSuspended()
public boolean isPending()
public boolean isAdmin()
public java.lang.String getEmail()
public void setEmail(java.lang.String email)
email - the user's email addresspublic int getAccessLevel()
public void setAccessLevel(int accessLevel)
accessLevel - the user's access levelpublic java.lang.String getFirstName()
public void setFirstName(java.lang.String firstName)
firstName - the user's first namepublic java.lang.String getInstitution()
public void setInstitution(java.lang.String institution)
institution - the user's institutionpublic java.lang.String getLastName()
public void setLastName(java.lang.String lastName)
lastName - the user's last namepublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
password - the user's submitted passwordpublic byte[] getHashedPassword()
public void setHashedPassword(byte[] hashedPassword)
hashedPassword - the user's hashed passwordpublic java.lang.String getSession()
public void setSession(java.lang.String session)
session - the user's session objectpublic java.lang.String getTitle()
public void setTitle(java.lang.String title)
title - the user's titlepublic int getUserId()
public void setUserId(int userId)
userId - the user's database IDpublic java.lang.String getUserName()
public void setUserName(java.lang.String userName)
userName - the user's login name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||