|
||||||||||
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 String |
ACCESS_COUNTER
The 'perm storage' key name for the access counter. |
static String |
CONFIRM_DATA
This is the value that is stored in the database for confirmed users |
static String |
CONFIRM_VALUE
The 'perm storage' key for the confirm_value field. |
static String |
EMAIL
The 'perm storage' key for the email field. |
static String |
FIRST_NAME
The 'perm storage' key name for the first name. |
static String |
HAS_LOGGED_IN
The 'temp storage' key name for the 'has logged in' flag |
static String |
LAST_LOGIN
The 'perm storage' key name for the last_login field. |
static String |
LAST_NAME
The 'perm storage' key name for the last name. |
static String |
PASSWORD
The 'perm storage' key name for the password field. |
static String |
SESSION_ACCESS_COUNTER
The 'temp storage' key name for the session access counter |
static String |
SESSION_KEY
The session key for the User object. |
static 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. |
String |
getConfirmed()
Gets the confirmation value. |
Date |
getCreateDate()
Gets the create date for this User. |
String |
getEmail()
Returns the email address for this user. |
String |
getFirstName()
Returns the first name for this user. |
Date |
getLastAccessDate()
Gets the last access date for this User. |
Date |
getLastLogin()
Returns the user's last login date. |
String |
getLastName()
Returns the last name for this user. |
String |
getPassword()
Returns the user's password. |
Object |
getPerm(String name)
Get an object from permanent storage. |
Object |
getPerm(String name,
Object def)
Get an object from permanent storage; return default if value is null. |
Hashtable<String,Object> |
getPermStorage()
This should only be used in the case where we want to save the data to the database. |
Object |
getTemp(String name)
Get an object from temporary storage. |
Object |
getTemp(String name,
Object def)
Get an object from temporary storage; return default if value is null. |
Hashtable<String,Object> |
getTempStorage()
This should only be used in the case where we want to save the data to the database. |
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. |
Object |
removeTemp(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(String value)
Sets the confirmation value. |
void |
setCreateDate(Date date)
Sets the creation date for this user. |
void |
setEmail(String address)
Sets the email address. |
void |
setFirstName(String firstName)
Sets the first name for this user. |
void |
setHasLoggedIn(Boolean value)
This sets whether or not someone has logged in. |
void |
setLastAccessDate()
Sets the last access date for this User. |
void |
setLastLogin(Date lastLogin)
Set last login date/time. |
void |
setLastName(String lastName)
Sets the last name for this user. |
void |
setPassword(String password)
Set password. |
void |
setPerm(String name,
Object value)
Put an object into permanent storage. |
void |
setPermStorage(Hashtable<String,Object> storage)
This should only be used in the case where we want to save the data to the database. |
void |
setTemp(String name,
Object value)
Put an object into temporary storage. |
void |
setTempStorage(Hashtable<String,Object> storage)
This should only be used in the case where we want to save the data to the database. |
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 String FIRST_NAME
static final String LAST_NAME
static final String LAST_LOGIN
static final String PASSWORD
static final String USERNAME
static final String CONFIRM_VALUE
static final String EMAIL
static final String CONFIRM_DATA
static final String ACCESS_COUNTER
static final String SESSION_ACCESS_COUNTER
static final String HAS_LOGGED_IN
static final String SESSION_KEY
Method Detail |
---|
int getAccessCounter()
int getAccessCounterForSession()
Date getLastAccessDate()
Date getCreateDate()
Date getLastLogin()
String getPassword()
UserManager.authenticate(User,String)
.
Object getPerm(String name)
name
- The object's name.
Object getPerm(String name, Object def)
name
- The object's name.def
- A default value to return.
Hashtable<String,Object> getPermStorage()
Hashtable<String,Object> getTempStorage()
Object getTemp(String name)
name
- The object's name.
Object getTemp(String name, Object def)
name
- The object's name.def
- A default value to return.
String getFirstName()
String getLastName()
String getEmail()
void setHasLoggedIn(Boolean value)
value
- Whether someone has logged in or not.boolean hasLoggedIn()
void incrementAccessCounter()
void incrementAccessCounterForSession()
Object removeTemp(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(Date lastLogin)
lastLogin
- The last login date.void setPassword(String password)
getPassword()
.
See also UserManager.changePassword(User,String,String)
.
password
- The new password.void setPerm(String name, Object value)
name
- The object's name.value
- The object.void setPermStorage(Hashtable<String,Object> storage)
storage
- A Hashtable.void setTempStorage(Hashtable<String,Object> storage)
storage
- A Hashtable.void setTemp(String name, Object value)
name
- The object's name.value
- The object.void setFirstName(String firstName)
firstName
- User's first name.void setLastName(String lastName)
lastName
- User's last name.void setCreateDate(Date date)
date
- Creation datevoid setEmail(String address)
address
- The email address.boolean isConfirmed()
void setConfirmed(String value)
value
- The confirmation key value.String getConfirmed()
void updateLastLogin() throws Exception
Exception
- A generic exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |