|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.services.security.torque.TorqueObject
org.apache.turbine.services.security.torque.TorqueUser
This is the User class used by the TorqueSecurity Service. It decouples all the database peer access from the actual Peer object
Field Summary |
Fields inherited from class org.apache.turbine.services.security.torque.TorqueObject |
obj |
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 | |
TorqueUser()
Constructor. |
|
TorqueUser(org.apache.torque.om.Persistent obj)
This Constructor is used when the UserPeerManager has retrieved a list of Database Objects from the peer and must 'wrap' them into TorqueRole Objects. |
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()
Returns the confirm value of the user |
java.util.Date |
getCreateDate()
Returns the creation date of the user |
java.lang.String |
getEmail()
Returns the email address of the user |
java.lang.String |
getFirstName()
Returns the first name of the User |
int |
getId()
Gets the Id of this object |
java.lang.Integer |
getIdAsObj()
Gets the Id of this object |
java.util.Date |
getLastAccessDate()
Gets the last access date for this User. |
java.util.Date |
getLastLogin()
Returns the date of the last login of the user |
java.lang.String |
getLastName()
Returns the last name of the User |
java.lang.String |
getName()
Returns the name of this object. |
byte[] |
getObjectdata()
Returns the value of the objectdata for this user. |
java.lang.String |
getPassword()
Returns the password of the User |
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()
Returns the permanent storage. |
org.apache.torque.om.Persistent |
getPersistentObj()
Returns the underlying Object for the Peer Used in the UserPeerManager when building a new Criteria. |
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()
Returns the temporary storage. |
java.lang.String |
getUserName()
Deprecated. Use getName() instead. |
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. |
java.lang.Object |
removeTemp(java.lang.String name)
Remove an object from temporary storage and return the object. |
void |
save()
Makes changes made to the User attributes permanent. |
void |
save(java.sql.Connection con)
Stores the object in the database. |
void |
save(java.lang.String torqueName)
Stores the object in the database. |
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 confirm)
Sets the new confirm value of the user |
void |
setCreateDate(java.util.Date createDate)
Sets the new creation date of the user |
void |
setEmail(java.lang.String email)
Sets the new email address of the user |
void |
setFirstName(java.lang.String firstName)
Sets the first name of the User |
void |
setHasLoggedIn(java.lang.Boolean value)
This sets whether or not someone has logged in. |
void |
setId(int id)
Sets the Id of this object |
void |
setLastAccessDate()
Sets the last access date for this User. |
void |
setLastLogin(java.util.Date lastLogin)
Sets the new date of the last login of the user |
void |
setLastName(java.lang.String lastName)
Sets the last name of User |
void |
setName(java.lang.String name)
Sets the name of this object |
void |
setObjectdata(byte[] objectdata)
Sets the value of the objectdata for the user |
void |
setPassword(java.lang.String password)
Sets the password of the User |
void |
setPerm(java.lang.String name,
java.lang.Object value)
Put an object into permanent storage. |
void |
setPermStorage(java.util.Hashtable permStorage)
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 tempStorage)
This should only be used in the case where we want to save the data to the database. |
void |
setUserName(java.lang.String name)
Sets the name of 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 org.apache.turbine.services.security.torque.TorqueObject |
compareTo, equals, equals, getPrimaryKey, hashCode, isModified, isNew, setModified, setNew, setPrimaryKey, setPrimaryKey |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TorqueUser()
public TorqueUser(org.apache.torque.om.Persistent obj)
obj
- An Object from the peerMethod Detail |
public org.apache.torque.om.Persistent getPersistentObj()
getPersistentObj
in class TorqueObject
public void save(java.lang.String torqueName) throws java.lang.Exception
save
in interface org.apache.torque.om.Persistent
save
in class TorqueObject
torqueName
- The name under which the object should be stored.
java.lang.Exception
- This method might throw an exceptionspublic void save(java.sql.Connection con) throws java.lang.Exception
save
in interface org.apache.torque.om.Persistent
save
in class TorqueObject
con
- A Connection object to save the object
java.lang.Exception
- This method might throw an exceptionspublic void save() throws TurbineSecurityException
save
in interface org.apache.torque.om.Persistent
save
in class TorqueObject
TurbineSecurityException
- if there is a problem while
saving data.public java.lang.String getName()
getName
in interface SecurityEntity
getName
in class TorqueObject
public void setName(java.lang.String name)
setName
in interface SecurityEntity
setName
in class TorqueObject
name
- The name of the objectpublic int getId()
getId
in interface SecurityEntity
public java.lang.Integer getIdAsObj()
getIdAsObj
in interface SecurityEntity
public void setId(int id)
setId
in interface SecurityEntity
id
- The new Idpublic java.lang.String getUserName()
getUserName
in interface User
public void setUserName(java.lang.String name)
setUserName
in interface User
name
- The name of the user.public java.lang.String getPassword()
getPassword
in interface User
public void setPassword(java.lang.String password)
setPassword
in interface User
password
- The new password of the Userpublic java.lang.String getFirstName()
getFirstName
in interface User
public void setFirstName(java.lang.String firstName)
setFirstName
in interface User
firstName
- The new first name of the Userpublic java.lang.String getLastName()
getLastName
in interface User
public void setLastName(java.lang.String lastName)
setLastName
in interface User
lastName
- The new last name of the Userpublic java.lang.String getEmail()
getEmail
in interface User
public void setEmail(java.lang.String email)
setEmail
in interface User
email
- The new email address of the userpublic java.lang.String getConfirmed()
getConfirmed
in interface User
public void setConfirmed(java.lang.String confirm)
setConfirmed
in interface User
confirm
- The new confirm value of the userpublic java.util.Date getCreateDate()
getCreateDate
in interface User
public void setCreateDate(java.util.Date createDate)
setCreateDate
in interface User
createDate
- The new creation date of the userpublic java.util.Date getLastLogin()
getLastLogin
in interface User
public void setLastLogin(java.util.Date lastLogin)
setLastLogin
in interface User
lastLogin
- The new the date of the last login of the userpublic byte[] getObjectdata()
public void setObjectdata(byte[] objectdata)
objectdata
- The new the date of the last login of the userpublic int getAccessCounter()
getAccessCounter
in interface User
public int getAccessCounterForSession()
getAccessCounterForSession
in interface User
public void incrementAccessCounter()
incrementAccessCounter
in interface User
public void incrementAccessCounterForSession()
incrementAccessCounterForSession
in interface User
public void setAccessCounter(int cnt)
setAccessCounter
in interface User
cnt
- The new count.public void setAccessCounterForSession(int cnt)
setAccessCounterForSession
in interface User
cnt
- The new count.public boolean isConfirmed()
isConfirmed
in interface User
public boolean hasLoggedIn()
hasLoggedIn
in interface User
public void setHasLoggedIn(java.lang.Boolean value)
setHasLoggedIn
in interface User
value
- Whether someone has logged in or not.public java.util.Date getLastAccessDate()
getLastAccessDate
in interface User
public void setLastAccessDate()
setLastAccessDate
in interface User
public java.util.Hashtable getPermStorage()
getPermStorage
in interface User
public void setPermStorage(java.util.Hashtable permStorage)
setPermStorage
in interface User
permStorage
- A Hashtable.public java.util.Hashtable getTempStorage()
getTempStorage
in interface User
public void setTempStorage(java.util.Hashtable tempStorage)
setTempStorage
in interface User
tempStorage
- A Hashtable.public java.lang.Object getPerm(java.lang.String name)
getPerm
in interface User
name
- The object's name.
public java.lang.Object getPerm(java.lang.String name, java.lang.Object def)
getPerm
in interface User
name
- The object's name.def
- A default value to return.
public void setPerm(java.lang.String name, java.lang.Object value)
setPerm
in interface User
name
- The object's name.value
- The object.public java.lang.Object getTemp(java.lang.String name)
getTemp
in interface User
name
- The object's name.
public java.lang.Object getTemp(java.lang.String name, java.lang.Object def)
getTemp
in interface User
name
- The object's name.def
- A default value to return.
public void setTemp(java.lang.String name, java.lang.Object value)
setTemp
in interface User
name
- The object's name.value
- The object.public java.lang.Object removeTemp(java.lang.String name)
removeTemp
in interface User
name
- The name of the object to remove.
public void updateLastLogin() throws java.lang.Exception
updateLastLogin
in interface User
java.lang.Exception
- A generic exception.public void valueBound(javax.servlet.http.HttpSessionBindingEvent hsbe)
valueBound
in interface javax.servlet.http.HttpSessionBindingListener
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent hsbe)
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |