Java Doc for TurbineUser.java in  » Project-Management » turbine » org » apache » turbine » om » security » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Project Management » turbine » org.apache.turbine.om.security 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.turbine.om.security.SecurityObject
   org.apache.turbine.om.security.TurbineUser

TurbineUser
public class TurbineUser extends SecurityObject implements User(Code)
A generic implementation of User interface. This basic implementation contains the functionality that is expected to be common among all User implementations. You are welcome to extend this class if you wish to have custom functionality in your user objects (like accessor methods for custom attributes). Note that implementing a different scheme of user data storage normally involves writing an implementation of org.apache.turbine.services.security.UserManager interface.
author:
   Josh Lucas
author:
   Jon S. Stevens
author:
   John D. McNally
author:
   Frank Y. Kim
author:
   Craig D. Berry
author:
   Eric Pugh
author:
   Henning P. Schmiedehausen
version:
   $Id: TurbineUser.java 278822 2005-09-05 19:53:05Z henning $



Constructor Summary
public  TurbineUser()
     Constructor.

Method Summary
public  intgetAccessCounter()
     Gets the access counter for a user from perm storage.
public  intgetAccessCounterForSession()
     Gets the access counter for a user during a session.
public  StringgetConfirmed()
     Gets the confirmation value.
public  java.util.DategetCreateDate()
     Gets the create date for this User.
public  StringgetEmail()
     Returns the email address for this user.
public  StringgetFirstName()
     Returns the first name for this user.
public  java.util.DategetLastAccessDate()
     Gets the last access date for this User.
public  java.util.DategetLastLogin()
     Get last login date/time for this user.
public  StringgetLastName()
     Returns the last name for this user.
public  StringgetName()
     Returns the name of this user.
public  StringgetPassword()
     Get password for this user.
public  ObjectgetPerm(String name)
     Get an object from permanent storage.
Parameters:
  name - The object's name.
public  ObjectgetPerm(String name, Object def)
     Get an object from permanent storage; return default if value is null.
Parameters:
  name - The object's name.
Parameters:
  def - A default value to return.
public  HashtablegetPermStorage()
     This should only be used in the case where we want to save the data to the database.
public  ObjectgetTemp(String name)
     Get an object from temporary storage; return null if the object can't be found.
Parameters:
  name - The object's name.
public  ObjectgetTemp(String name, Object def)
     Get an object from temporary storage; return default if value is null.
Parameters:
  name - The object's name.
Parameters:
  def - A default value to return.
public  HashtablegetTempStorage()
     This should only be used in the case where we want to save the data to the database.
public  StringgetUserName()
     Returns the username for this user.
public  booleanhasLoggedIn()
     The user is considered logged in if they have not timed out.
public  voidincrementAccessCounter()
     Increments the permanent hit counter for the user.
public  voidincrementAccessCounterForSession()
     Increments the session hit counter for the user.
public  booleanisConfirmed()
     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.
public  ObjectremoveTemp(String name)
     Remove an object from temporary storage and return the object.
Parameters:
  name - The name of the object to remove.
public  voidsave()
     Saves this object to the data store.
public  voidsave(Connection conn)
    
public  voidsave(String dbname)
    
public  voidsetAccessCounter(int cnt)
     Sets the access counter for a user, saved in perm storage.
public  voidsetAccessCounterForSession(int cnt)
     Sets the session access counter for a user, saved in temp storage.
public  voidsetConfirmed(String value)
     Sets the confirmation value.
public  voidsetCreateDate(java.util.Date date)
     Sets the create date for this User.
public  voidsetEmail(String address)
     Sets the email address.
public  voidsetFirstName(String firstName)
     Sets the first name for this user.
public  voidsetHasLoggedIn(Boolean value)
     This sets whether or not someone has logged in.
public  voidsetLastAccessDate()
     Sets the last access date for this User.
public  voidsetLastLogin(java.util.Date date)
     Set last login date/time.
public  voidsetLastName(String lastName)
     Sets the last name for this user.
public  voidsetName(String name)
     Sets the name of this user.
public  voidsetPassword(String password)
     Set password.
public  voidsetPerm(String name, Object value)
     Put an object into permanent storage.
public  voidsetPermStorage(Hashtable permStorage)
     This should only be used in the case where we want to save the data to the database.
public  voidsetTemp(String name, Object value)
     Put an object into temporary storage.
public  voidsetTempStorage(Hashtable tempStorage)
     This should only be used in the case where we want to save the data to the database.
public  voidsetUserName(String username)
     Sets the username for this user.
public  voidupdateLastLogin()
     Updates the last login date in the database.
public  voidvalueBound(HttpSessionBindingEvent hsbe)
     Implement this method if you wish to be notified when the User has been Bound to the session.
public  voidvalueUnbound(HttpSessionBindingEvent hsbe)
     Implement this method if you wish to be notified when the User has been Unbound from the session.


Constructor Detail
TurbineUser
public TurbineUser()(Code)
Constructor. Create a new User and set the createDate.




Method Detail
getAccessCounter
public int getAccessCounter()(Code)
Gets the access counter for a user from perm storage. The access counter for the user.



getAccessCounterForSession
public int getAccessCounterForSession()(Code)
Gets the access counter for a user during a session. The access counter for the user for the session.



getConfirmed
public String getConfirmed()(Code)
Gets the confirmation value. status The confirmation value for this User



getCreateDate
public java.util.Date getCreateDate()(Code)
Gets the create date for this User. This is the time at which the user object was created. A Java Date with the date of creation for the user.



getEmail
public String getEmail()(Code)
Returns the email address for this user. A String with the user's email address.



getFirstName
public String getFirstName()(Code)
Returns the first name for this user. A String with the user's first name.



getLastAccessDate
public java.util.Date getLastAccessDate()(Code)
Gets the last access date for this User. This is the last time that the user object was referenced. A Java Date with the last access date for the user.



getLastLogin
public java.util.Date getLastLogin()(Code)
Get last login date/time for this user. A Java Date with the last login date for the user.



getLastName
public String getLastName()(Code)
Returns the last name for this user. A String with the user's last name.



getName
public String getName()(Code)
Returns the name of this user. This will be the user name/ login name. The name of the user.



getPassword
public String getPassword()(Code)
Get password for this user. A String with the password for the user.



getPerm
public Object getPerm(String name)(Code)
Get an object from permanent storage.
Parameters:
  name - The object's name. An Object with the given name, or null if not found.



getPerm
public Object getPerm(String name, Object def)(Code)
Get an object from permanent storage; return default if value is null.
Parameters:
  name - The object's name.
Parameters:
  def - A default value to return. An Object with the given name.



getPermStorage
public Hashtable getPermStorage()(Code)
This should only be used in the case where we want to save the data to the database. A Hashtable.



getTemp
public Object getTemp(String name)(Code)
Get an object from temporary storage; return null if the object can't be found.
Parameters:
  name - The object's name. An Object with the given name.



getTemp
public Object getTemp(String name, Object def)(Code)
Get an object from temporary storage; return default if value is null.
Parameters:
  name - The object's name.
Parameters:
  def - A default value to return. An Object with the given name.



getTempStorage
public Hashtable getTempStorage()(Code)
This should only be used in the case where we want to save the data to the database. A Hashtable.



getUserName
public String getUserName()(Code)
Returns the username for this user. A String with the username.TurbineUser.getName



hasLoggedIn
public boolean hasLoggedIn()(Code)
The user is considered logged in if they have not timed out. Whether the user has logged in.



incrementAccessCounter
public void incrementAccessCounter()(Code)
Increments the permanent hit counter for the user.



incrementAccessCounterForSession
public void incrementAccessCounterForSession()(Code)
Increments the session hit counter for the user.



isConfirmed
public boolean isConfirmed()(Code)
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. True if the user has been confirmed.



removeTemp
public Object removeTemp(String name)(Code)
Remove an object from temporary storage and return the object.
Parameters:
  name - The name of the object to remove. An Object.



save
public void save() throws Exception(Code)
Saves this object to the data store.



save
public void save(Connection conn) throws Exception(Code)
not implemented
Parameters:
  conn -
throws:
  Exception -



save
public void save(String dbname) throws Exception(Code)
not implemented
Parameters:
  dbname -
throws:
  Exception -



setAccessCounter
public void setAccessCounter(int cnt)(Code)
Sets the access counter for a user, saved in perm storage.
Parameters:
  cnt - The new count.



setAccessCounterForSession
public void setAccessCounterForSession(int cnt)(Code)
Sets the session access counter for a user, saved in temp storage.
Parameters:
  cnt - The new count.



setConfirmed
public void setConfirmed(String value)(Code)
Sets the confirmation value. The value should be either a random string or User.CONFIRM_DATA
Parameters:
  value - The confirmation key value.



setCreateDate
public void setCreateDate(java.util.Date date)(Code)
Sets the create date for this User. This is the time at which the user object was created.
Parameters:
  date - The create date.



setEmail
public void setEmail(String address)(Code)
Sets the email address.
Parameters:
  address - The email address.



setFirstName
public void setFirstName(String firstName)(Code)
Sets the first name for this user.
Parameters:
  firstName - User's first name.



setHasLoggedIn
public void setHasLoggedIn(Boolean value)(Code)
This sets whether or not someone has logged in. hasLoggedIn() returns this value.
Parameters:
  value - Whether someone has logged in or not.



setLastAccessDate
public void setLastAccessDate()(Code)
Sets the last access date for this User. This is the last time that the user object was referenced.



setLastLogin
public void setLastLogin(java.util.Date date)(Code)
Set last login date/time.
Parameters:
  date - The last login date.



setLastName
public void setLastName(String lastName)(Code)
Sets the last name for this user.
Parameters:
  lastName - User's last name.



setName
public void setName(String name)(Code)
Sets the name of this user. This will be the user name/ login name.
Parameters:
  name - The name of the object.



setPassword
public void setPassword(String password)(Code)
Set password.
Parameters:
  password - The new password.



setPerm
public void setPerm(String name, Object value)(Code)
Put an object into permanent storage. If the value is null, it will convert that to a "" because the underlying storage mechanism within TurbineUser is currently a Hashtable and null is not a valid value.
Parameters:
  name - The object's name.
Parameters:
  value - The object.



setPermStorage
public void setPermStorage(Hashtable permStorage)(Code)
This should only be used in the case where we want to save the data to the database.
Parameters:
  permStorage - A Hashtable.



setTemp
public void setTemp(String name, Object value)(Code)
Put an object into temporary storage. If the value is null, it will convert that to a "" because the underlying storage mechanism within TurbineUser is currently a Hashtable and null is not a valid value.
Parameters:
  name - The object's name.
Parameters:
  value - The object.



setTempStorage
public void setTempStorage(Hashtable tempStorage)(Code)
This should only be used in the case where we want to save the data to the database.
Parameters:
  storage - A Hashtable.



setUserName
public void setUserName(String username)(Code)
Sets the username for this user.
Parameters:
  username - The user's username.TurbineUser.setName



updateLastLogin
public void updateLastLogin() throws Exception(Code)
Updates the last login date in the database.
exception:
  Exception - a generic exception.



valueBound
public void valueBound(HttpSessionBindingEvent hsbe)(Code)
Implement this method if you wish to be notified when the User has been Bound to the session.
Parameters:
  hsbe - The HttpSessionBindingEvent.



valueUnbound
public void valueUnbound(HttpSessionBindingEvent hsbe)(Code)
Implement this method if you wish to be notified when the User has been Unbound from the session.
Parameters:
  hsbe - The HttpSessionBindingEvent.



Methods inherited from org.apache.turbine.om.security.SecurityObject
public int compareTo(Object obj)(Code)(Java Doc)
public Object getAttribute(String name)(Code)(Java Doc)
public Map getAttributes()(Code)(Java Doc)
public int getId()(Code)(Java Doc)
public Integer getIdAsObj()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public void setAttribute(String name, Object value)(Code)(Java Doc)
public void setAttributes(Map attributes)(Code)(Java Doc)
public void setId(int id)(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.