Java Doc for TorqueUser.java in  » Project-Management » turbine » org » apache » turbine » services » security » torque » 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.services.security.torque 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.turbine.services.security.torque.TorqueObject
      org.apache.turbine.services.security.torque.TorqueUser

TorqueUser
public class TorqueUser extends TorqueObject implements User(Code)
This is the User class used by the TorqueSecurity Service. It decouples all the database peer access from the actual Peer object
author:
   Josh Lucas
author:
   Jon S. Stevens
author:
   John D. McNally
author:
   Frank Y. Kim
author:
   Craig D. Berry
author:
   Martin Poeschl
author:
   Daniel Rall
author:
   Henning P. Schmiedehausen
version:
   $Id: TorqueUser.java 278824 2005-09-05 20:01:15Z henning $



Constructor Summary
public  TorqueUser()
     Constructor.
public  TorqueUser(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
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()
    
public  java.util.DategetCreateDate()
    
public  StringgetEmail()
    
public  StringgetFirstName()
    
public  intgetId()
    
public  IntegergetIdAsObj()
    
public  java.util.DategetLastAccessDate()
     Gets the last access date for this User.
public  java.util.DategetLastLogin()
    
public  StringgetLastName()
    
public  StringgetName()
     Returns the name of this object.
public  byte[]getObjectdata()
     Returns the value of the objectdata for this user.
public  StringgetPassword()
    
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()
     Returns the permanent storage.
public  PersistentgetPersistentObj()
     Returns the underlying Object for the Peer Used in the UserPeerManager when building a new Criteria.
public  ObjectgetTemp(String name)
     Get an object from temporary storage.
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()
     Returns the temporary storage.
public  StringgetUserName()
     Returns the name of 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(String torqueName)
     Stores the object in the database.
public  voidsave(Connection con)
     Stores the object in the database.
public  voidsave()
     Makes changes made to the User attributes permanent.
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 confirm)
    
public  voidsetCreateDate(java.util.Date createDate)
    
public  voidsetEmail(String email)
    
public  voidsetFirstName(String firstName)
    
public  voidsetHasLoggedIn(Boolean value)
     This sets whether or not someone has logged in.
public  voidsetId(int id)
    
public  voidsetLastAccessDate()
     Sets the last access date for this User.
public  voidsetLastLogin(java.util.Date lastLogin)
    
public  voidsetLastName(String lastName)
    
public  voidsetName(String name)
    
public  voidsetObjectdata(byte[] objectdata)
    
public  voidsetPassword(String 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 name)
     Sets the name of 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
TorqueUser
public TorqueUser()(Code)
Constructor. Create a new User and set the createDate.



TorqueUser
public TorqueUser(Persistent obj)(Code)
This Constructor is used when the UserPeerManager has retrieved a list of Database Objects from the peer and must 'wrap' them into TorqueRole Objects. You should not use it directly!
Parameters:
  obj - An Object from the peer




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)
Returns the confirm value of the user The confirm value of the user



getCreateDate
public java.util.Date getCreateDate()(Code)
Returns the creation date of the user The creation date of the user



getEmail
public String getEmail()(Code)
Returns the email address of the user The email address of the user



getFirstName
public String getFirstName()(Code)
Returns the first name of the User The first name of the User



getId
public int getId()(Code)
Gets the Id of this object The Id of the object



getIdAsObj
public Integer getIdAsObj()(Code)
Gets the Id of this object The Id of the object



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)
Returns the date of the last login of the user The date of the last login of the user



getLastName
public String getLastName()(Code)
Returns the last name of the User The last name of the User



getName
public String getName()(Code)
Returns the name of this object. The name of the object.



getObjectdata
public byte[] getObjectdata()(Code)
Returns the value of the objectdata for this user. Objectdata is a VARBINARY column in the table used to store the permanent storage table from the User object. The bytes in the objectdata for this user



getPassword
public String getPassword()(Code)
Returns the password of the User The password of 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.



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)
Returns the permanent storage. This is implemented as a Hashtable and backed by an VARBINARY column in the database. A Hashtable.



getPersistentObj
public Persistent getPersistentObj()(Code)
Returns the underlying Object for the Peer Used in the UserPeerManager when building a new Criteria. The underlying persistent object



getTemp
public Object getTemp(String name)(Code)
Get an object from temporary storage.
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)
Returns the temporary storage. This is implemented as a Hashtable A Hashtable.



getUserName
public String getUserName()(Code)
Returns the name of this user. The name of the user.



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(String torqueName) throws Exception(Code)
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed.
Parameters:
  torqueName - The name under which the object should be stored.
exception:
  Exception - This method might throw an exceptions



save
public void save(Connection con) throws Exception(Code)
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed. This method is meant to be used as part of a transaction, otherwise use the save() method and the connection details will be handled internally
Parameters:
  con - A Connection object to save the object
exception:
  Exception - This method might throw an exceptions



save
public void save() throws TurbineSecurityException(Code)
Makes changes made to the User attributes permanent.
throws:
  TurbineSecurityException - if there is a problem whilesaving data.



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 confirm)(Code)
Sets the new confirm value of the user
Parameters:
  confirm - The new confirm value of the user



setCreateDate
public void setCreateDate(java.util.Date createDate)(Code)
Sets the new creation date of the user
Parameters:
  createDate - The new creation date of the user



setEmail
public void setEmail(String email)(Code)
Sets the new email address of the user
Parameters:
  email - The new email address of the user



setFirstName
public void setFirstName(String firstName)(Code)
Sets the first name of the User
Parameters:
  firstName - The new first name of the User



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.



setId
public void setId(int id)(Code)
Sets the Id of this object
Parameters:
  id - The new Id



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 lastLogin)(Code)
Sets the new date of the last login of the user
Parameters:
  lastLogin - The new the date of the last login of the user



setLastName
public void setLastName(String lastName)(Code)
Sets the last name of User
Parameters:
  lastName - The new last name of the User



setName
public void setName(String name)(Code)
Sets the name of this object
Parameters:
  name - The name of the object



setObjectdata
public void setObjectdata(byte[] objectdata)(Code)
Sets the value of the objectdata for the user
Parameters:
  objectdata - The new the date of the last login of the user



setPassword
public void setPassword(String password)(Code)
Sets the password of the User
Parameters:
  password - The new password of the User



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 TorqueUser 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:
  storage - 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 TorqueUser 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 name)(Code)
Sets the name of this user.
Parameters:
  name - The name of the user.



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:
  event - Indication of value/session binding.



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:
  event - Indication of value/session unbinding.



Fields inherited from org.apache.turbine.services.security.torque.TorqueObject
protected Persistent obj(Code)(Java Doc)

Methods inherited from org.apache.turbine.services.security.torque.TorqueObject
public int compareTo(Object obj)(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public boolean equals(TorqueObject torqueObject)(Code)(Java Doc)
abstract public String getName()(Code)(Java Doc)
abstract public Persistent getPersistentObj()(Code)(Java Doc)
public ObjectKey getPrimaryKey()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isModified()(Code)(Java Doc)
public boolean isNew()(Code)(Java Doc)
public void save(String torqueName) throws Exception(Code)(Java Doc)
public void save(Connection con) throws Exception(Code)(Java Doc)
abstract public void save() throws TurbineSecurityException(Code)(Java Doc)
public void setModified(boolean m)(Code)(Java Doc)
abstract public void setName(String name)(Code)(Java Doc)
public void setNew(boolean b)(Code)(Java Doc)
public void setPrimaryKey(ObjectKey primaryKey) throws Exception(Code)(Java Doc)
public void setPrimaryKey(String primaryKey) throws Exception(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.