|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.turbine.services.security.ldap.LDAPUser
public class LDAPUser
LDAPUser implements User and provides access to a user who accesses the system via LDAP.
| Field Summary |
|---|
| 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. |
String |
getConfirmed()
Returns the value of Confirmed variable |
Date |
getCreateDate()
Gets the create date for this User. |
String |
getDN()
Gets the distinguished name (DN) of the User. |
String |
getEmail()
Returns the Email for this user. |
String |
getFirstName()
Returns the first name for this user. |
int |
getId()
Not implemented. |
Integer |
getIdAsObj()
Not implemented. |
Date |
getLastAccessDate()
Gets the last access date for this User. |
Date |
getLastLogin()
Get last login date/time for this user. |
String |
getLastName()
Returns the last name for this user. |
Attributes |
getLDAPAttributes()
Get the JNDI Attributes used to store the user in LDAP. |
String |
getName()
Returns the username for this user. |
String |
getPassword()
Get password for this user. |
Object |
getPerm(String name)
Get an object from permanent storage. |
Object |
getPerm(String name,
Object def)
Get an object from permanent storage; return default if value is null. |
Hashtable |
getPermStorage()
This should only be used in the case where we want to save the data to the database. |
Object |
getTemp(String name)
Get an object from temporary storage. |
Object |
getTemp(String name,
Object def)
Get an object from temporary storage; return default if value is null. |
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. |
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. |
Object |
removeTemp(String name)
Remove an object from temporary storage and return the object. |
void |
save()
Saves this object to the data store. |
void |
save(Connection conn)
not implemented |
void |
save(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(String confirm)
Set the users confirmed variable |
void |
setCreateDate(Date date)
Sets the create date for this User. |
void |
setEmail(String email)
Set the users Email |
void |
setFirstName(String fname)
Set the users First Name |
void |
setHasLoggedIn(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(Date date)
Set last login date/time. |
void |
setLastName(String lname)
Set the users Last Name Sets the last name for this user. |
void |
setLDAPAttributes(Attributes attribs)
Populates the user with values obtained from the LDAP Service. |
void |
setName(String name)
Set the users name. |
void |
setPassword(String password)
Set password. |
void |
setPerm(String name,
Object value)
Put an object into permanent storage. |
void |
setPermStorage(Hashtable stuff)
This should only be used in the case where we want to save the data to the database. |
void |
setTemp(String name,
Object value)
Put an object into temporary storage. |
void |
setTempStorage(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 |
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 |
| Constructor Detail |
|---|
public LDAPUser()
| Method Detail |
|---|
public void setLDAPAttributes(Attributes attribs)
throws NamingException
attribs - The attributes obtained from LDAP.
NamingException - if there was an error with JNDI.
public Attributes getLDAPAttributes()
throws NamingException
NamingException - if there is a JNDI error.public String getDN()
public int getAccessCounterForSession()
getAccessCounterForSession in interface Userpublic int getAccessCounter()
getAccessCounter in interface Userpublic Date getCreateDate()
getCreateDate in interface Userpublic String getConfirmed()
getConfirmed in interface Userpublic String getEmail()
getEmail in interface Userpublic Date getLastAccessDate()
getLastAccessDate in interface Userpublic Date getLastLogin()
getLastLogin in interface Userpublic String getPassword()
getPassword in interface Userpublic Object getPerm(String name)
getPerm in interface Username - The object's name.
public Object getPerm(String name,
Object def)
getPerm in interface Username - The object's name.def - A default value to return.
public Hashtable getPermStorage()
getPermStorage in interface Userpublic Object getTemp(String name)
getTemp in interface Username - The object's name.
public Object getTemp(String name,
Object def)
getTemp in interface Username - The object's name.def - A default value to return.
public int getTimeout()
public String getFirstName()
getFirstName in interface Userpublic String getLastName()
getLastName in interface Userpublic boolean hasLoggedIn()
hasLoggedIn in interface Userpublic boolean isConfirmed()
CONFIRM_VALUE
column to see if it is equal to CONFIRM_DATA.
isConfirmed in interface Userpublic void incrementAccessCounter()
incrementAccessCounter in interface Userpublic void incrementAccessCounterForSession()
incrementAccessCounterForSession in interface Userpublic Object removeTemp(String name)
removeTemp in interface Username - The name of the object to remove.
public void setAccessCounter(int cnt)
setAccessCounter in interface Usercnt - The new count.public void setAccessCounterForSession(int cnt)
setAccessCounterForSession in interface Usercnt - The new count.public void setConfirmed(String confirm)
setConfirmed in interface Userconfirm - The new confim value.public void setLastAccessDate()
setLastAccessDate in interface Userpublic void setCreateDate(Date date)
setCreateDate in interface Userdate - The create date.public void setEmail(String email)
setEmail in interface Useremail - The new email.public void setFirstName(String fname)
setFirstName in interface Userfname - The new firstname.public void setLastLogin(Date date)
setLastLogin in interface Userdate - The last login date.public void setLastName(String lname)
setLastName in interface Userlname - The new lastname.public void setPassword(String password)
setPassword in interface Userpassword - The new password.
public void setPerm(String name,
Object value)
setPerm in interface Username - The object's name.value - The object.public void setPermStorage(Hashtable stuff)
setPermStorage in interface Userstuff - A Hashtable.public Hashtable getTempStorage()
getTempStorage in interface Userpublic void setTempStorage(Hashtable storage)
setTempStorage in interface Userstorage - A Hashtable.public void setHasLoggedIn(Boolean value)
setHasLoggedIn in interface Uservalue - Whether someone has logged in or not.
public void setTemp(String name,
Object value)
setTemp in interface Username - The object's name.value - The object.public void setTimeout(int time)
time - The user's timeout.
public void updateLastLogin()
throws Exception
updateLastLogin in interface UserException - a generic exception.public void valueBound(javax.servlet.http.HttpSessionBindingEvent hsbe)
valueBound in interface javax.servlet.http.HttpSessionBindingListenerhsbe - The HttpSessionBindingEvent.public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent hsbe)
valueUnbound in interface javax.servlet.http.HttpSessionBindingListenerhsbe - The HttpSessionBindingEvent.public String getName()
getName in interface SecurityEntitypublic void setName(String name)
setName in interface SecurityEntityname - the name of the User.public int getId()
getId in interface SecurityEntitypublic Integer getIdAsObj()
getIdAsObj in interface SecurityEntitypublic void setId(int id)
setId in interface SecurityEntityid - The id of the User.
public void save()
throws Exception
Exception - if it cannot be saved
public void save(Connection conn)
throws Exception
conn - the database connection
Exception - if there is an error
public void save(String dbname)
throws Exception
dbname - the database name
Exception - if there is an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||