public interface User extends HttpSessionBindingListener, TurbineUserDelegate, org.apache.fulcrum.security.model.turbine.entity.TurbineUser
Modifier and Type | Field and Description |
---|---|
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 |
CREATE_DATE
The 'perm storage' key name for the create_date field.
|
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 |
SESSION_ACCESS_COUNTER
The 'temp storage' key name for the session access counter
|
static String |
SESSION_KEY
The session key for the User object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Date |
getLastAccessDate()
Gets the last access date for this User.
|
Date |
getLastLogin()
Returns the user's last login date.
|
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.
|
Map<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.
|
Map<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 |
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 |
setPerm(String name,
Object value)
Put an object into permanent storage.
|
void |
setPermStorage(Map<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(Map<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.
|
valueBound, valueUnbound
getUserDelegate, setUserDelegate
getEmail, getFirstName, getLastName, getObjectdata, setEmail, setFirstName, setLastName, setObjectdata
static final String CREATE_DATE
static final String LAST_LOGIN
static final String CONFIRM_VALUE
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
int getAccessCounter()
int getAccessCounterForSession()
Date getLastAccessDate()
Date getCreateDate()
Date getLastLogin()
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.Map<String,Object> getPermStorage()
Map<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.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 setPerm(String name, Object value)
name
- The object's name.value
- The object.void setPermStorage(Map<String,Object> storage)
storage
- A Map.void setTempStorage(Map<String,Object> storage)
storage
- A Map.void setTemp(String name, Object value)
name
- The object's name.value
- The object.void setCreateDate(Date date)
date
- Creation dateboolean isConfirmed()
void setConfirmed(String value)
value
- The confirmation key value.String getConfirmed()
void updateLastLogin() throws Exception
Exception
- A generic exception.Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.