|
|||||||||
| Home >> All >> org >> apache >> turbine >> services >> security >> [ ldap overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.turbine.services.security.ldap
Class LDAPUser

java.lang.Objectorg.apache.torque.om.BaseObject
org.apache.turbine.services.security.ldap.LDAPUser
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.http.HttpSessionBindingListener, org.apache.torque.om.Persistent, org.apache.turbine.om.security.SecurityEntity, java.io.Serializable, org.apache.turbine.om.security.User
- public class LDAPUser
- extends org.apache.torque.om.BaseObject
- implements org.apache.turbine.om.security.User
- extends org.apache.torque.om.BaseObject
LDAPUser implements User and provides access to a user who accesses the system via LDAP.
- Version:
- $Id: LDAPUser.java 278822 2005-09-05 19:53:05Z henning $
| Field Summary | |
private java.util.Date |
createDate
Date when the user was created |
private java.util.Date |
lastAccessDate
Date when the user was last accessed |
private static org.apache.commons.logging.Log |
log
Logging |
private java.util.Hashtable |
permStorage
This is data that will survive a servlet engine restart. |
private static long |
serialVersionUID
Serial Version UID |
private java.util.Hashtable |
tempStorage
This is data that will not survive a servlet engine restart. |
private int |
timeout
timeout |
| 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. |
private java.lang.Boolean |
getHasLoggedIn()
This gets whether or not someone has logged in. |
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 |
| Field Detail |
serialVersionUID
private static final long serialVersionUID
- Serial Version UID
- See Also:
- Constant Field Values
log
private static org.apache.commons.logging.Log log
- Logging
createDate
private java.util.Date createDate
- Date when the user was created
lastAccessDate
private java.util.Date lastAccessDate
- Date when the user was last accessed
timeout
private int timeout
- timeout
permStorage
private java.util.Hashtable permStorage
- This is data that will survive a servlet engine restart.
tempStorage
private java.util.Hashtable tempStorage
- This is data that will not survive a servlet engine restart.
| Constructor Detail |
LDAPUser
public LDAPUser()
- Constructor.
Create a new User and set the createDate.
| Method Detail |
setLDAPAttributes
public void setLDAPAttributes(javax.naming.directory.Attributes attribs) throws javax.naming.NamingException
- Populates the user with values obtained from the LDAP Service.
This method could be redefined in subclasses.
getLDAPAttributes
public javax.naming.directory.Attributes getLDAPAttributes() throws javax.naming.NamingException
- Get the JNDI Attributes used to store the user in LDAP.
This method could be redefined in a subclass.
getDN
public java.lang.String getDN()
- Gets the distinguished name (DN) of the User.
This method could be redefined in a subclass.
getAccessCounterForSession
public int getAccessCounterForSession()
- Gets the access counter for a user during a session.
- Specified by:
getAccessCounterForSessionin interfaceorg.apache.turbine.om.security.User
getAccessCounter
public int getAccessCounter()
- Gets the access counter for a user from perm storage.
- Specified by:
getAccessCounterin interfaceorg.apache.turbine.om.security.User
getCreateDate
public java.util.Date getCreateDate()
- Gets the create date for this User. This is the time at which
the user object was created.
- Specified by:
getCreateDatein interfaceorg.apache.turbine.om.security.User
getConfirmed
public java.lang.String getConfirmed()
- Returns the value of Confirmed variable
- Specified by:
getConfirmedin interfaceorg.apache.turbine.om.security.User
getEmail
public java.lang.String getEmail()
- Returns the Email for this user. If this is defined, then
the user is considered logged in.
- Specified by:
getEmailin interfaceorg.apache.turbine.om.security.User
getLastAccessDate
public java.util.Date getLastAccessDate()
- Gets the last access date for this User. This is the last time
that the user object was referenced.
- Specified by:
getLastAccessDatein interfaceorg.apache.turbine.om.security.User
getLastLogin
public java.util.Date getLastLogin()
- Get last login date/time for this user.
- Specified by:
getLastLoginin interfaceorg.apache.turbine.om.security.User
getPassword
public java.lang.String getPassword()
- Get password for this user.
- Specified by:
getPasswordin interfaceorg.apache.turbine.om.security.User
getPerm
public java.lang.Object getPerm(java.lang.String name)
- Get an object from permanent storage.
- Specified by:
getPermin interfaceorg.apache.turbine.om.security.User
getPerm
public java.lang.Object getPerm(java.lang.String name, java.lang.Object def)
- Get an object from permanent storage; return default if value
is null.
- Specified by:
getPermin interfaceorg.apache.turbine.om.security.User
getPermStorage
public java.util.Hashtable getPermStorage()
- This should only be used in the case where we want to save the
data to the database.
- Specified by:
getPermStoragein interfaceorg.apache.turbine.om.security.User
getTemp
public java.lang.Object getTemp(java.lang.String name)
- Get an object from temporary storage.
- Specified by:
getTempin interfaceorg.apache.turbine.om.security.User
getTemp
public java.lang.Object getTemp(java.lang.String name, java.lang.Object def)
- Get an object from temporary storage; return default if value
is null.
- Specified by:
getTempin interfaceorg.apache.turbine.om.security.User
getTimeout
public int getTimeout()
- A User object can have a variable Timeout, which is defined in
minutes. If the user has been timed out, then the
hasLoggedIn() value will return false.
getUserName
public java.lang.String getUserName()
- Deprecated. Use getName() instead
- Returns the username for this user. If this is defined, then the user is considered logged in.
- Specified by:
getUserNamein interfaceorg.apache.turbine.om.security.User
- Returns the username for this user. If this is defined, then the user is considered logged in.
getFirstName
public java.lang.String getFirstName()
- Returns the first name for this user. If this is defined, then
the user is considered logged in.
- Specified by:
getFirstNamein interfaceorg.apache.turbine.om.security.User
getLastName
public java.lang.String getLastName()
- Returns the last name for this user. If this is defined, then
the user is considered logged in.
- Specified by:
getLastNamein interfaceorg.apache.turbine.om.security.User
hasLoggedIn
public boolean hasLoggedIn()
- The user is considered logged in if they have not timed out.
- Specified by:
hasLoggedInin interfaceorg.apache.turbine.om.security.User
isConfirmed
public boolean isConfirmed()
- This method reports whether or not the user has been confirmed
in the system by checking the
CONFIRM_VALUEcolumn to see if it is equal toCONFIRM_DATA.- Specified by:
isConfirmedin interfaceorg.apache.turbine.om.security.User
incrementAccessCounter
public void incrementAccessCounter()
- Increments the permanent hit counter for the user.
- Specified by:
incrementAccessCounterin interfaceorg.apache.turbine.om.security.User
incrementAccessCounterForSession
public void incrementAccessCounterForSession()
- Increments the session hit counter for the user.
- Specified by:
incrementAccessCounterForSessionin interfaceorg.apache.turbine.om.security.User
removeTemp
public java.lang.Object removeTemp(java.lang.String name)
- Remove an object from temporary storage and return the object.
- Specified by:
removeTempin interfaceorg.apache.turbine.om.security.User
setAccessCounter
public void setAccessCounter(int cnt)
- Sets the access counter for a user, saved in perm storage.
- Specified by:
setAccessCounterin interfaceorg.apache.turbine.om.security.User
setAccessCounterForSession
public void setAccessCounterForSession(int cnt)
- Sets the session access counter for a user, saved in temp
storage.
- Specified by:
setAccessCounterForSessionin interfaceorg.apache.turbine.om.security.User
setConfirmed
public void setConfirmed(java.lang.String confirm)
- Set the users confirmed variable
- Specified by:
setConfirmedin interfaceorg.apache.turbine.om.security.User
setLastAccessDate
public void setLastAccessDate()
- Sets the last access date for this User. This is the last time
that the user object was referenced.
- Specified by:
setLastAccessDatein interfaceorg.apache.turbine.om.security.User
setCreateDate
public void setCreateDate(java.util.Date date)
- Sets the create date for this User. This is the time at which
the user object was created.
- Specified by:
setCreateDatein interfaceorg.apache.turbine.om.security.User
setEmail
public void setEmail(java.lang.String email)
- Set the users Email
- Specified by:
setEmailin interfaceorg.apache.turbine.om.security.User
setFirstName
public void setFirstName(java.lang.String fname)
- Set the users First Name
- Specified by:
setFirstNamein interfaceorg.apache.turbine.om.security.User
setLastLogin
public void setLastLogin(java.util.Date date)
- Set last login date/time.
- Specified by:
setLastLoginin interfaceorg.apache.turbine.om.security.User
setLastName
public void setLastName(java.lang.String lname)
- Set the users Last Name
Sets the last name for this user.
- Specified by:
setLastNamein interfaceorg.apache.turbine.om.security.User
setPassword
public void setPassword(java.lang.String password)
- Set password.
- Specified by:
setPasswordin interfaceorg.apache.turbine.om.security.User
setPerm
public void setPerm(java.lang.String name, java.lang.Object value)
- Put an object into permanent storage.
- Specified by:
setPermin interfaceorg.apache.turbine.om.security.User
setPermStorage
public void setPermStorage(java.util.Hashtable stuff)
- This should only be used in the case where we want to save the
data to the database.
- Specified by:
setPermStoragein interfaceorg.apache.turbine.om.security.User
getTempStorage
public java.util.Hashtable getTempStorage()
- This should only be used in the case where we want to save the
data to the database.
- Specified by:
getTempStoragein interfaceorg.apache.turbine.om.security.User
setTempStorage
public void setTempStorage(java.util.Hashtable storage)
- This should only be used in the case where we want to save the
data to the database.
- Specified by:
setTempStoragein interfaceorg.apache.turbine.om.security.User
getHasLoggedIn
private java.lang.Boolean getHasLoggedIn()
- This gets whether or not someone has logged in. hasLoggedIn()
returns this value as a boolean. This is private because you
should use hasLoggedIn() instead.
setHasLoggedIn
public void setHasLoggedIn(java.lang.Boolean value)
- This sets whether or not someone has logged in. hasLoggedIn()
returns this value.
- Specified by:
setHasLoggedInin interfaceorg.apache.turbine.om.security.User
setTemp
public void setTemp(java.lang.String name, java.lang.Object value)
- Put an object into temporary storage.
- Specified by:
setTempin interfaceorg.apache.turbine.om.security.User
setTimeout
public void setTimeout(int time)
- A User object can have a variable Timeout which is defined in
minutes. If the user has been timed out, then the
hasLoggedIn() value will return false.
setUserName
public void setUserName(java.lang.String username)
- Sets the username for this user.
- Specified by:
setUserNamein interfaceorg.apache.turbine.om.security.User
updateLastLogin
public void updateLastLogin()
throws java.lang.Exception
- Updates the last login date in the database.
- Specified by:
updateLastLoginin interfaceorg.apache.turbine.om.security.User
valueBound
public 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.
- Specified by:
valueBoundin interfacejavax.servlet.http.HttpSessionBindingListener
valueUnbound
public 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.
- Specified by:
valueUnboundin interfacejavax.servlet.http.HttpSessionBindingListener
getName
public java.lang.String getName()
- Returns the username for this user. If this is defined, then
the user is considered logged in.
- Specified by:
getNamein interfaceorg.apache.turbine.om.security.SecurityEntity
setName
public void setName(java.lang.String name)
- Not implemented.
- Specified by:
setNamein interfaceorg.apache.turbine.om.security.SecurityEntity
getId
public int getId()
- Not implemented.
- Specified by:
getIdin interfaceorg.apache.turbine.om.security.SecurityEntity
getIdAsObj
public java.lang.Integer getIdAsObj()
- Not implemented.
- Specified by:
getIdAsObjin interfaceorg.apache.turbine.om.security.SecurityEntity
setId
public void setId(int id)
- Not implemented.
- Specified by:
setIdin interfaceorg.apache.turbine.om.security.SecurityEntity
save
public void save()
throws java.lang.Exception
- Saves this object to the data store.
- Specified by:
savein interfaceorg.apache.torque.om.Persistent
save
public void save(java.sql.Connection conn) throws java.lang.Exception
- not implemented
- Specified by:
savein interfaceorg.apache.torque.om.Persistent
save
public void save(java.lang.String dbname) throws java.lang.Exception
- not implemented
- Specified by:
savein interfaceorg.apache.torque.om.Persistent
|
|||||||||
| Home >> All >> org >> apache >> turbine >> services >> security >> [ ldap overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC