|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.om.security.BaseJetspeedUser
The default Jetspeed implementation of User interface. This basic implementation contains the functionality that is expected to be common among all User implementations. You are welcome to extend this class if you wish to have custom functionality in your user objects (like accessor methods for custom attributes).
Field Summary | |
protected boolean |
isNew
|
protected java.lang.String |
name
|
Fields inherited from interface org.apache.jetspeed.om.security.JetspeedUser |
DISABLED, PASSWORD_CHANGED, USER_ID |
Fields inherited from interface org.apache.turbine.om.security.User |
ACCESS_COUNTER, CONFIRM_DATA, CONFIRM_VALUE, EMAIL, FIRST_NAME, HAS_LOGGED_IN, LAST_LOGIN, LAST_NAME, PASSWORD, SESSION_ACCESS_COUNTER, SESSION_KEY, USERNAME |
Constructor Summary | |
BaseJetspeedUser()
Constructor. |
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. |
boolean |
getDisabled()
Returns the disabled status for the 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()
Get last login date/time for this user. |
java.lang.String |
getLastName()
Returns the last name for this user. |
java.lang.String |
getName()
|
java.lang.String |
getPassword()
Get password for this user. |
java.util.Date |
getPasswordChanged()
Returns the date of last password change |
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 |
getUserId()
Returns the primary principle for this User, the user id. |
java.lang.String |
getUserName()
Returns the username for this user. |
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 User.CONFIRM_VALUE column in the users record to see if it is equal to User.CONFIRM_DATA. |
boolean |
isNew()
|
java.lang.Object |
removeTemp(java.lang.String name)
Remove an object from temporary storage and return the object. |
void |
save()
Saves this object to the data store. |
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 create date for this User. |
void |
setDisabled(boolean disabled)
|
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 date)
Set last login date/time. |
void |
setLastName(java.lang.String lastName)
Sets the last name for this user. |
void |
setName(java.lang.String name)
|
protected void |
setNew(boolean isNew)
|
void |
setPassword(java.lang.String password)
Set password. |
void |
setPasswordChanged(java.util.Date value)
Sets the date of last password change |
void |
setPerm(java.lang.String name,
java.lang.Object value)
Put an object into permanent storage. |
void |
setPermStorage(java.util.Hashtable stuff)
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 |
setUserId(java.lang.String id)
Sets the primary principle for this User, the user id. |
void |
setUserName(java.lang.String username)
Sets the username for this user. |
void |
updateLastLogin()
Updates the last login date in the database. |
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent hsbe)
Implement this method if you wish to be notified when the User has been Bound to the session. |
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent hsbe)
Implement this method if you wish to be notified when the User has been Unbound from the session. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String name
protected boolean isNew
Constructor Detail |
public BaseJetspeedUser()
Method Detail |
public java.lang.String getUserId()
getUserId
in interface JetspeedUser
public void setUserId(java.lang.String id)
JetspeedUser
setUserId
in interface JetspeedUser
id
- the principlepublic int getAccessCounterForSession()
getAccessCounterForSession
in interface org.apache.turbine.om.security.User
public int getAccessCounter()
getAccessCounter
in interface org.apache.turbine.om.security.User
public java.util.Date getCreateDate()
getCreateDate
in interface org.apache.turbine.om.security.User
public java.util.Date getLastAccessDate()
getLastAccessDate
in interface org.apache.turbine.om.security.User
public java.util.Date getLastLogin()
getLastLogin
in interface org.apache.turbine.om.security.User
public java.lang.String getPassword()
getPassword
in interface org.apache.turbine.om.security.User
public java.lang.Object getPerm(java.lang.String name)
getPerm
in interface org.apache.turbine.om.security.User
name
- The object's name.
public java.lang.Object getPerm(java.lang.String name, java.lang.Object def)
getPerm
in interface org.apache.turbine.om.security.User
name
- The object's name.def
- A default value to return.
public java.util.Hashtable getPermStorage()
getPermStorage
in interface org.apache.turbine.om.security.User
public java.lang.Object getTemp(java.lang.String name)
getTemp
in interface org.apache.turbine.om.security.User
name
- The object's name.
public java.lang.Object getTemp(java.lang.String name, java.lang.Object def)
getTemp
in interface org.apache.turbine.om.security.User
name
- The object's name.def
- A default value to return.
public java.lang.String getUserName()
getUserName
in interface org.apache.turbine.om.security.User
public java.lang.String getFirstName()
getFirstName
in interface org.apache.turbine.om.security.User
public java.lang.String getLastName()
getLastName
in interface org.apache.turbine.om.security.User
public boolean hasLoggedIn()
hasLoggedIn
in interface org.apache.turbine.om.security.User
public java.lang.String getEmail()
getEmail
in interface org.apache.turbine.om.security.User
public void incrementAccessCounter()
incrementAccessCounter
in interface org.apache.turbine.om.security.User
public void incrementAccessCounterForSession()
incrementAccessCounterForSession
in interface org.apache.turbine.om.security.User
public java.lang.Object removeTemp(java.lang.String name)
removeTemp
in interface org.apache.turbine.om.security.User
name
- The name of the object to remove.
public void setAccessCounter(int cnt)
setAccessCounter
in interface org.apache.turbine.om.security.User
cnt
- The new count.public void setAccessCounterForSession(int cnt)
setAccessCounterForSession
in interface org.apache.turbine.om.security.User
cnt
- The new count.public void setLastAccessDate()
setLastAccessDate
in interface org.apache.turbine.om.security.User
public void setCreateDate(java.util.Date date)
setCreateDate
in interface org.apache.turbine.om.security.User
date
- The create date.public void setLastLogin(java.util.Date date)
setLastLogin
in interface org.apache.turbine.om.security.User
date
- The last login date.public void setPassword(java.lang.String password)
setPassword
in interface org.apache.turbine.om.security.User
password
- The new password.public void setPerm(java.lang.String name, java.lang.Object value)
setPerm
in interface org.apache.turbine.om.security.User
name
- The object's name.value
- The object.public void setPermStorage(java.util.Hashtable stuff)
setPermStorage
in interface org.apache.turbine.om.security.User
stuff
- A Hashtable.public java.util.Hashtable getTempStorage()
getTempStorage
in interface org.apache.turbine.om.security.User
public void setTempStorage(java.util.Hashtable storage)
setTempStorage
in interface org.apache.turbine.om.security.User
storage
- A Hashtable.public void setHasLoggedIn(java.lang.Boolean value)
setHasLoggedIn
in interface org.apache.turbine.om.security.User
value
- Whether someone has logged in or not.public void setTemp(java.lang.String name, java.lang.Object value)
setTemp
in interface org.apache.turbine.om.security.User
name
- The object's name.value
- The object.public void setUserName(java.lang.String username)
setUserName
in interface org.apache.turbine.om.security.User
username
- The user's username.public void setFirstName(java.lang.String firstName)
setFirstName
in interface org.apache.turbine.om.security.User
firstName
- User's first name.public void setLastName(java.lang.String lastName)
setLastName
in interface org.apache.turbine.om.security.User
lastName
- User's last name.public void setEmail(java.lang.String address)
setEmail
in interface org.apache.turbine.om.security.User
address
- The email address.public boolean isConfirmed()
isConfirmed
in interface org.apache.turbine.om.security.User
public void setConfirmed(java.lang.String value)
setConfirmed
in interface org.apache.turbine.om.security.User
value
- The confirmation key value.public java.lang.String getConfirmed()
getConfirmed
in interface org.apache.turbine.om.security.User
public void updateLastLogin() throws java.lang.Exception
updateLastLogin
in interface org.apache.turbine.om.security.User
Exception,
- a generic exception.
java.lang.Exception
public void valueBound(javax.servlet.http.HttpSessionBindingEvent hsbe)
valueBound
in interface javax.servlet.http.HttpSessionBindingListener
hsbe
- The HttpSessionBindingEvent.public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent hsbe)
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
hsbe
- The HttpSessionBindingEvent.public void save() throws java.lang.Exception
java.lang.Exception
public boolean getDisabled()
getDisabled
in interface JetspeedUser
public void setDisabled(boolean disabled)
setDisabled
in interface JetspeedUser
public java.lang.String getName()
getName
in interface org.apache.turbine.om.security.SecurityEntity
public void setName(java.lang.String name)
setName
in interface org.apache.turbine.om.security.SecurityEntity
public boolean isNew()
isNew
in interface JetspeedUser
protected void setNew(boolean isNew)
public java.util.Date getPasswordChanged()
JetspeedUser
getPasswordChanged
in interface JetspeedUser
JetspeedUser.getPasswordChanged()
public void setPasswordChanged(java.util.Date value)
JetspeedUser
setPasswordChanged
in interface JetspeedUser
value
- DateJetspeedUser.setPasswordChanged(java.util.Date)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |