|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface User
This interface represents functionality that all users of the Turbine system require.
Field Summary | |
---|---|
static java.lang.String |
ACCESS_COUNTER
The 'perm storage' key name for the access counter. |
static java.lang.String |
CONFIRM_DATA
This is the value that is stored in the database for confirmed users |
static java.lang.String |
CONFIRM_VALUE
The 'perm storage' key for the confirm_value field. |
static java.lang.String |
EMAIL
The 'perm storage' key for the email field. |
static java.lang.String |
FIRST_NAME
The 'perm storage' key name for the first name. |
static java.lang.String |
HAS_LOGGED_IN
The 'temp storage' key name for the 'has logged in' flag |
static java.lang.String |
LAST_LOGIN
The 'perm storage' key name for the last_login field. |
static java.lang.String |
LAST_NAME
The 'perm storage' key name for the last name. |
static java.lang.String |
PASSWORD
The 'perm storage' key name for the password field. |
static java.lang.String |
SESSION_ACCESS_COUNTER
The 'temp storage' key name for the session access counter |
static java.lang.String |
SESSION_KEY
The session key for the User object. |
static java.lang.String |
USERNAME
The 'perm storage' key name for the username field. |
Method Summary | |
---|---|
int |
getAccessCounter()
Gets the access counter for a user from perm storage. |
int |
getAccessCounterForSession()
Gets the access counter for a user during a session. |
java.lang.String |
getConfirmed()
Gets the confirmation value. |
java.util.Date |
getCreateDate()
Gets the create date for this User. |
java.lang.String |
getEmail()
Returns the email address for this user. |
java.lang.String |
getFirstName()
Returns the first name for this user. |
java.util.Date |
getLastAccessDate()
Gets the last access date for this User. |
java.util.Date |
getLastLogin()
Returns the user's last login date. |
java.lang.String |
getLastName()
Returns the last name for this user. |
java.lang.String |
getPassword()
Returns the user's password. |
java.lang.Object |
getPerm(java.lang.String name)
Get an object from permanent storage. |
java.lang.Object |
getPerm(java.lang.String name,
java.lang.Object def)
Get an object from permanent storage; return default if value is null. |
java.util.Hashtable |
getPermStorage()
This should only be used in the case where we want to save the data to the database. |
java.lang.Object |
getTemp(java.lang.String name)
Get an object from temporary storage. |
java.lang.Object |
getTemp(java.lang.String name,
java.lang.Object def)
Get an object from temporary storage; return default if value is null. |
java.util.Hashtable |
getTempStorage()
This should only be used in the case where we want to save the data to the database. |
java.lang.String |
getUserName()
Deprecated. This is the same as getName(), so use this. |
boolean |
hasLoggedIn()
The user is considered logged in if they have not timed out. |
void |
incrementAccessCounter()
Increments the permanent hit counter for the user. |
void |
incrementAccessCounterForSession()
Increments the session hit counter for the user. |
boolean |
isConfirmed()
This method reports whether or not the user has been confirmed in the system by checking the TurbineUserPeer.CONFIRM_VALUE column to see if it is equal to CONFIRM_DATA. |
java.lang.Object |
removeTemp(java.lang.String name)
Remove an object from temporary storage and return the object. |
void |
setAccessCounter(int cnt)
Sets the access counter for a user, saved in perm storage. |
void |
setAccessCounterForSession(int cnt)
Sets the session access counter for a user, saved in temp storage. |
void |
setConfirmed(java.lang.String value)
Sets the confirmation value. |
void |
setCreateDate(java.util.Date date)
Sets the creation date for this user. |
void |
setEmail(java.lang.String address)
Sets the email address. |
void |
setFirstName(java.lang.String firstName)
Sets the first name for this user. |
void |
setHasLoggedIn(java.lang.Boolean value)
This sets whether or not someone has logged in. |
void |
setLastAccessDate()
Sets the last access date for this User. |
void |
setLastLogin(java.util.Date lastLogin)
Set last login date/time. |
void |
setLastName(java.lang.String lastName)
Sets the last name for this user. |
void |
setPassword(java.lang.String password)
Set password. |
void |
setPerm(java.lang.String name,
java.lang.Object value)
Put an object into permanent storage. |
void |
setPermStorage(java.util.Hashtable storage)
This should only be used in the case where we want to save the data to the database. |
void |
setTemp(java.lang.String name,
java.lang.Object value)
Put an object into temporary storage. |
void |
setTempStorage(java.util.Hashtable storage)
This should only be used in the case where we want to save the data to the database. |
void |
setUserName(java.lang.String username)
Deprecated. This is the same as setName(), so use this. |
void |
updateLastLogin()
Updates the last login date in the database. |
Methods inherited from interface javax.servlet.http.HttpSessionBindingListener |
---|
valueBound, valueUnbound |
Methods inherited from interface org.apache.turbine.om.security.SecurityEntity |
---|
getId, getIdAsObj, getName, setId, setName |
Field Detail |
---|
static final java.lang.String FIRST_NAME
static final java.lang.String LAST_NAME
static final java.lang.String LAST_LOGIN
static final java.lang.String PASSWORD
static final java.lang.String USERNAME
static final java.lang.String CONFIRM_VALUE
static final java.lang.String EMAIL
static final java.lang.String CONFIRM_DATA
static final java.lang.String ACCESS_COUNTER
static final java.lang.String SESSION_ACCESS_COUNTER
static final java.lang.String HAS_LOGGED_IN
static final java.lang.String SESSION_KEY
Method Detail |
---|
int getAccessCounter()
int getAccessCounterForSession()
java.util.Date getLastAccessDate()
java.util.Date getCreateDate()
java.util.Date getLastLogin()
java.lang.String getPassword()
UserManager.authenticate(User,String)
.
java.lang.Object getPerm(java.lang.String name)
name
- The object's name.
java.lang.Object getPerm(java.lang.String name, java.lang.Object def)
name
- The object's name.def
- A default value to return.
java.util.Hashtable getPermStorage()
java.util.Hashtable getTempStorage()
java.lang.Object getTemp(java.lang.String name)
name
- The object's name.
java.lang.Object getTemp(java.lang.String name, java.lang.Object def)
name
- The object's name.def
- A default value to return.
java.lang.String getUserName()
java.lang.String getFirstName()
java.lang.String getLastName()
java.lang.String getEmail()
void setHasLoggedIn(java.lang.Boolean value)
value
- Whether someone has logged in or not.boolean hasLoggedIn()
void incrementAccessCounter()
void incrementAccessCounterForSession()
java.lang.Object removeTemp(java.lang.String name)
name
- The name of the object to remove.
void setAccessCounter(int cnt)
cnt
- The new count.void setAccessCounterForSession(int cnt)
cnt
- The new count.void setLastAccessDate()
void setLastLogin(java.util.Date lastLogin)
lastLogin
- The last login date.void setPassword(java.lang.String password)
getPassword()
.
See also UserManager.changePassword(User,String,String)
.
password
- The new password.void setPerm(java.lang.String name, java.lang.Object value)
name
- The object's name.value
- The object.void setPermStorage(java.util.Hashtable storage)
storage
- A Hashtable.void setTempStorage(java.util.Hashtable storage)
storage
- A Hashtable.void setTemp(java.lang.String name, java.lang.Object value)
name
- The object's name.value
- The object.void setUserName(java.lang.String username)
username
- The user's username.void setFirstName(java.lang.String firstName)
firstName
- User's first name.void setLastName(java.lang.String lastName)
lastName
- User's last name.void setCreateDate(java.util.Date date)
date
- Creation datevoid setEmail(java.lang.String address)
address
- The email address.boolean isConfirmed()
void setConfirmed(java.lang.String value)
value
- The confirmation key value.java.lang.String getConfirmed()
void updateLastLogin() throws java.lang.Exception
java.lang.Exception
- A generic exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |