|
|||||||||||
| 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 peer| Method 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.Persistentsave in class TorqueObjecttorqueName - The name under which the object should be stored.
java.lang.Exception - This method might throw an exceptions
public void save(java.sql.Connection con)
throws java.lang.Exception
save in interface org.apache.torque.om.Persistentsave in class TorqueObjectcon - A Connection object to save the object
java.lang.Exception - This method might throw an exceptions
public void save()
throws TurbineSecurityException
save in interface org.apache.torque.om.Persistentsave in class TorqueObjectTurbineSecurityException - if there is a problem while
saving data.public java.lang.String getName()
getName in interface SecurityEntitygetName in class TorqueObjectpublic void setName(java.lang.String name)
setName in interface SecurityEntitysetName in class TorqueObjectname - The name of the objectpublic int getId()
getId in interface SecurityEntitypublic java.lang.Integer getIdAsObj()
getIdAsObj in interface SecurityEntitypublic void setId(int id)
setId in interface SecurityEntityid - The new Idpublic java.lang.String getUserName()
getUserName in interface Userpublic void setUserName(java.lang.String name)
setUserName in interface Username - The name of the user.public java.lang.String getPassword()
getPassword in interface Userpublic void setPassword(java.lang.String password)
setPassword in interface Userpassword - The new password of the Userpublic java.lang.String getFirstName()
getFirstName in interface Userpublic void setFirstName(java.lang.String firstName)
setFirstName in interface UserfirstName - The new first name of the Userpublic java.lang.String getLastName()
getLastName in interface Userpublic void setLastName(java.lang.String lastName)
setLastName in interface UserlastName - The new last name of the Userpublic java.lang.String getEmail()
getEmail in interface Userpublic void setEmail(java.lang.String email)
setEmail in interface Useremail - The new email address of the userpublic java.lang.String getConfirmed()
getConfirmed in interface Userpublic void setConfirmed(java.lang.String confirm)
setConfirmed in interface Userconfirm - The new confirm value of the userpublic java.util.Date getCreateDate()
getCreateDate in interface Userpublic void setCreateDate(java.util.Date createDate)
setCreateDate in interface UsercreateDate - The new creation date of the userpublic java.util.Date getLastLogin()
getLastLogin in interface Userpublic void setLastLogin(java.util.Date lastLogin)
setLastLogin in interface UserlastLogin - 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 Userpublic int getAccessCounterForSession()
getAccessCounterForSession in interface Userpublic void incrementAccessCounter()
incrementAccessCounter in interface Userpublic void incrementAccessCounterForSession()
incrementAccessCounterForSession in interface Userpublic void setAccessCounter(int cnt)
setAccessCounter in interface Usercnt - The new count.public void setAccessCounterForSession(int cnt)
setAccessCounterForSession in interface Usercnt - The new count.public boolean isConfirmed()
isConfirmed in interface Userpublic boolean hasLoggedIn()
hasLoggedIn in interface Userpublic void setHasLoggedIn(java.lang.Boolean value)
setHasLoggedIn in interface Uservalue - Whether someone has logged in or not.public java.util.Date getLastAccessDate()
getLastAccessDate in interface Userpublic void setLastAccessDate()
setLastAccessDate in interface Userpublic java.util.Hashtable getPermStorage()
getPermStorage in interface Userpublic void setPermStorage(java.util.Hashtable permStorage)
setPermStorage in interface UserpermStorage - A Hashtable.public java.util.Hashtable getTempStorage()
getTempStorage in interface Userpublic void setTempStorage(java.util.Hashtable tempStorage)
setTempStorage in interface UsertempStorage - A Hashtable.public java.lang.Object getPerm(java.lang.String name)
getPerm in interface Username - The object's name.
public java.lang.Object getPerm(java.lang.String name,
java.lang.Object def)
getPerm in interface Username - The object's name.def - A default value to return.
public void setPerm(java.lang.String name,
java.lang.Object value)
setPerm in interface Username - The object's name.value - The object.public java.lang.Object getTemp(java.lang.String name)
getTemp in interface Username - The object's name.
public java.lang.Object getTemp(java.lang.String name,
java.lang.Object def)
getTemp in interface Username - The object's name.def - A default value to return.
public void setTemp(java.lang.String name,
java.lang.Object value)
setTemp in interface Username - The object's name.value - The object.public java.lang.Object removeTemp(java.lang.String name)
removeTemp in interface Username - The name of the object to remove.
public void updateLastLogin()
throws java.lang.Exception
updateLastLogin in interface Userjava.lang.Exception - A generic exception.public void valueBound(javax.servlet.http.HttpSessionBindingEvent hsbe)
valueBound in interface javax.servlet.http.HttpSessionBindingListenerpublic 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 | ||||||||||