|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.om.BaseObject
org.apache.turbine.services.security.ldap.LDAPUser
LDAPUser implements User and provides access to a user who accesses the system via LDAP.
Field Summary |
Fields inherited from class org.apache.torque.om.BaseObject |
NEW_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 | |
LDAPUser()
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()
Returns the value of Confirmed variable |
java.util.Date |
getCreateDate()
Gets the create date for this User. |
java.lang.String |
getDN()
Gets the distinguished name (DN) of the User. |
java.lang.String |
getEmail()
Returns the Email for this user. |
java.lang.String |
getFirstName()
Returns the first name for this user. |
int |
getId()
Not implemented. |
java.lang.Integer |
getIdAsObj()
Not implemented. |
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. |
javax.naming.directory.Attributes |
getLDAPAttributes()
Get the JNDI Attributes used to store the user in LDAP. |
java.lang.String |
getName()
Returns the username for this user. |
java.lang.String |
getPassword()
Get password for this 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()
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. |
int |
getTimeout()
A User object can have a variable Timeout, which is defined in minutes. |
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 CONFIRM_VALUE
column to see if it is equal to CONFIRM_DATA . |
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 |
save(java.sql.Connection conn)
not implemented |
void |
save(java.lang.String dbname)
not implemented |
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)
Set the users confirmed variable |
void |
setCreateDate(java.util.Date date)
Sets the create date for this User. |
void |
setEmail(java.lang.String email)
Set the users Email |
void |
setFirstName(java.lang.String fname)
Set the users First Name |
void |
setHasLoggedIn(java.lang.Boolean value)
This sets whether or not someone has logged in. |
void |
setId(int id)
Not implemented. |
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 lname)
Set the users Last Name Sets the last name for this user. |
void |
setLDAPAttributes(javax.naming.directory.Attributes attribs)
Populates the user with values obtained from the LDAP Service. |
void |
setName(java.lang.String name)
Not implemented. |
void |
setPassword(java.lang.String password)
Set password. |
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 |
setTimeout(int time)
A User object can have a variable Timeout which is defined in minutes. |
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 org.apache.torque.om.BaseObject |
equals, equals, getByName, getByPeerName, getByPosition, getLog, getPrimaryKey, hashCode, isModified, isNew, log, resetModified, setModified, setNew, setPrimaryKey, setPrimaryKey, setPrimaryKey |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LDAPUser()
Method Detail |
public void setLDAPAttributes(javax.naming.directory.Attributes attribs) throws javax.naming.NamingException
attribs
- The attributes obtained from LDAP.
javax.naming.NamingException
- if there was an error with JNDI.public javax.naming.directory.Attributes getLDAPAttributes() throws javax.naming.NamingException
javax.naming.NamingException
- if there is a JNDI error.public java.lang.String getDN()
public int getAccessCounterForSession()
getAccessCounterForSession
in interface User
public int getAccessCounter()
getAccessCounter
in interface User
public java.util.Date getCreateDate()
getCreateDate
in interface User
public java.lang.String getConfirmed()
getConfirmed
in interface User
public java.lang.String getEmail()
getEmail
in interface User
public java.util.Date getLastAccessDate()
getLastAccessDate
in interface User
public java.util.Date getLastLogin()
getLastLogin
in interface User
public java.lang.String getPassword()
getPassword
in interface User
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 java.util.Hashtable getPermStorage()
getPermStorage
in interface User
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 int getTimeout()
public java.lang.String getUserName()
getUserName
in interface User
public java.lang.String getFirstName()
getFirstName
in interface User
public java.lang.String getLastName()
getLastName
in interface User
public boolean hasLoggedIn()
hasLoggedIn
in interface User
public boolean isConfirmed()
CONFIRM_VALUE
column to see if it is equal to CONFIRM_DATA
.
isConfirmed
in interface User
public void incrementAccessCounter()
incrementAccessCounter
in interface User
public void incrementAccessCounterForSession()
incrementAccessCounterForSession
in interface User
public java.lang.Object removeTemp(java.lang.String name)
removeTemp
in interface User
name
- The name of the object to remove.
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 void setConfirmed(java.lang.String confirm)
setConfirmed
in interface User
confirm
- The new confim value.public void setLastAccessDate()
setLastAccessDate
in interface User
public void setCreateDate(java.util.Date date)
setCreateDate
in interface User
date
- The create date.public void setEmail(java.lang.String email)
setEmail
in interface User
email
- The new email.public void setFirstName(java.lang.String fname)
setFirstName
in interface User
fname
- The new firstname.public void setLastLogin(java.util.Date date)
setLastLogin
in interface User
date
- The last login date.public void setLastName(java.lang.String lname)
setLastName
in interface User
lname
- The new lastname.public void setPassword(java.lang.String password)
setPassword
in interface User
password
- The new password.public void setPerm(java.lang.String name, java.lang.Object value)
setPerm
in interface User
name
- The object's name.value
- The object.public void setPermStorage(java.util.Hashtable stuff)
setPermStorage
in interface User
stuff
- A Hashtable.public java.util.Hashtable getTempStorage()
getTempStorage
in interface User
public void setTempStorage(java.util.Hashtable storage)
setTempStorage
in interface User
storage
- A Hashtable.public void setHasLoggedIn(java.lang.Boolean value)
setHasLoggedIn
in interface User
value
- Whether someone has logged in or not.public void setTemp(java.lang.String name, java.lang.Object value)
setTemp
in interface User
name
- The object's name.value
- The object.public void setTimeout(int time)
time
- The user's timeout.public void setUserName(java.lang.String username)
setUserName
in interface User
username
- The user's username.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
hsbe
- The HttpSessionBindingEvent.public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent hsbe)
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
hsbe
- The HttpSessionBindingEvent.public java.lang.String getName()
getName
in interface SecurityEntity
public void setName(java.lang.String name)
setName
in interface SecurityEntity
name
- the name of the User.public 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 id of the User.public void save() throws java.lang.Exception
save
in interface org.apache.torque.om.Persistent
java.lang.Exception
- if it cannot be savedpublic void save(java.sql.Connection conn) throws java.lang.Exception
save
in interface org.apache.torque.om.Persistent
conn
- the database connection
java.lang.Exception
- if there is an errorpublic void save(java.lang.String dbname) throws java.lang.Exception
save
in interface org.apache.torque.om.Persistent
dbname
- the database name
java.lang.Exception
- if there is an error
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |