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


java.lang.Object
   org.apache.turbine.services.security.db.DBUserManager

DBUserManager
public class DBUserManager implements UserManager(Code)
An UserManager performs org.apache.turbine.om.security.User objects related tasks on behalf of the org.apache.turbine.services.security.BaseSecurityService . This implementation uses a relational database for storing user data. It expects that the User interface implementation will be castable to org.apache.torque.om.BaseObject .
author:
   Jon S. Stevens
author:
   John D. McNally
author:
   Frank Y. Kim
author:
   Craig D. Berry
author:
   Rafal Krzewski
author:
   Quinton McCombs
author:
   Henning P. Schmiedehausen
version:
   $Id: DBUserManager.java 278824 2005-09-05 20:01:15Z henning $




Method Summary
public  booleanaccountExists(User user)
     Check whether a specified user's account exists. The login name is used for looking up the account.
Parameters:
  user - The user to be checked.
public  booleanaccountExists(String userName)
     Check whether a specified user's account exists. The login name is used for looking up the account.
Parameters:
  userName - The name of the user to be checked.
public  voidauthenticate(User user, String password)
     Authenticate an User with the specified password.
public  voidchangePassword(User user, String oldPassword, String newPassword)
     Change the password for an User.
public  voidcreateAccount(User user, String initialPassword)
     Creates new user account with specified attributes.
public  voidforcePassword(User user, String password)
     Forcibly sets new password for an User. This is supposed by the administrator to change the forgotten or compromised passwords.
public  voidinit(Configuration conf)
    
public  voidremoveAccount(User user)
     Removes an user account from the system.
public  Userretrieve(String userName)
     Retrieve a user from persistent storage using username as the key.
Parameters:
  userName - the name of the user.
public  User[]retrieve(Criteria criteria)
     Retrieve a set of users that meet the specified criteria. As the keys for the criteria, you should use the constants that are defined in User interface, plus the names of the custom attributes you added to your user representation in the data storage.
public  Userretrieve(String userName, String password)
     Retrieve a user from persistent storage using username as the key, and authenticate the user.
public  UserretrieveById(Object key)
    
public  ListretrieveList(Criteria criteria)
     Retrieve a list of users that meet the specified criteria. As the keys for the criteria, you should use the constants that are defined in User interface, plus the names of the custom attributes you added to your user representation in the data storage.
public  voidsaveOnSessionUnbind(User user)
     Saves User data when the session is unbound.
public  voidstore(User user)
     Save an User object to persistent storage.



Method Detail
accountExists
public boolean accountExists(User user) throws DataBackendException(Code)
Check whether a specified user's account exists. The login name is used for looking up the account.
Parameters:
  user - The user to be checked. true if the specified account exists
throws:
  DataBackendException - if there was an error accessingthe data backend.



accountExists
public boolean accountExists(String userName) throws DataBackendException(Code)
Check whether a specified user's account exists. The login name is used for looking up the account.
Parameters:
  userName - The name of the user to be checked. true if the specified account exists
throws:
  DataBackendException - if there was an error accessingthe data backend.



authenticate
public void authenticate(User user, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException(Code)
Authenticate an User with the specified password. If authentication is successful the method returns nothing. If there are any problems, exception was thrown.
Parameters:
  user - an User object to authenticate.
Parameters:
  password - the user supplied password.
exception:
  PasswordMismatchException - if the supplied password wasincorrect.
exception:
  UnknownEntityException - if the user's account does notexist in the database.
exception:
  DataBackendException - if there is a problem accessing thestorage.



changePassword
public void changePassword(User user, String oldPassword, String newPassword) throws PasswordMismatchException, UnknownEntityException, DataBackendException(Code)
Change the password for an User. The user must have supplied the old password to allow the change.
Parameters:
  user - an User to change password for.
Parameters:
  oldPassword - The old password to verify
Parameters:
  newPassword - The new password to set
exception:
  PasswordMismatchException - if the supplied password wasincorrect.
exception:
  UnknownEntityException - if the user's account does notexist in the database.
exception:
  DataBackendException - if there is a problem accessing thestorage.



createAccount
public void createAccount(User user, String initialPassword) throws EntityExistsException, DataBackendException(Code)
Creates new user account with specified attributes.
Parameters:
  user - The object describing account to be created.
Parameters:
  initialPassword - the password for the new account
throws:
  DataBackendException - if there was an error accessingthe data backend.
throws:
  EntityExistsException - if the user account already exists.



forcePassword
public void forcePassword(User user, String password) throws UnknownEntityException, DataBackendException(Code)
Forcibly sets new password for an User. This is supposed by the administrator to change the forgotten or compromised passwords. Certain implementatations of this feature would require administrative level access to the authenticating server / program.
Parameters:
  user - an User to change password for.
Parameters:
  password - the new password.
exception:
  UnknownEntityException - if the user's record does notexist in the database.
exception:
  DataBackendException - if there is a problem accessing thestorage.



init
public void init(Configuration conf)(Code)
Initializes the UserManager
Parameters:
  conf - A Configuration object to init this Manager



removeAccount
public void removeAccount(User user) throws UnknownEntityException, DataBackendException(Code)
Removes an user account from the system.
Parameters:
  user - the object describing the account to be removed.
throws:
  DataBackendException - if there was an error accessingthe data backend.
throws:
  UnknownEntityException - if the user account is not present.



retrieve
public User retrieve(String userName) throws UnknownEntityException, DataBackendException(Code)
Retrieve a user from persistent storage using username as the key.
Parameters:
  userName - the name of the user. an User object.
exception:
  UnknownEntityException - if the user's account does notexist in the database.
exception:
  DataBackendException - if there is a problem accessing thestorage.



retrieve
public User[] retrieve(Criteria criteria) throws DataBackendException(Code)
Retrieve a set of users that meet the specified criteria. As the keys for the criteria, you should use the constants that are defined in User interface, plus the names of the custom attributes you added to your user representation in the data storage. Use verbatim names of the attributes - without table name prefix in case of DB implementation.
Parameters:
  criteria - The criteria of selection. a List of users meeting the criteria.
throws:
  DataBackendException - if there is a problem accessing thestorage.



retrieve
public User retrieve(String userName, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException(Code)
Retrieve a user from persistent storage using username as the key, and authenticate the user. The implementation may chose to authenticate to the server as the user whose data is being retrieved.
Parameters:
  userName - the name of the user.
Parameters:
  password - the user supplied password. an User object.
exception:
  PasswordMismatchException - if the supplied password wasincorrect.
exception:
  UnknownEntityException - if the user's account does notexist in the database.
exception:
  DataBackendException - if there is a problem accessing thestorage.



retrieveById
public User retrieveById(Object key) throws UnknownEntityException, DataBackendException(Code)
Retrieve a user from persistent storage using the primary key
Parameters:
  key - The primary key object an User object.
throws:
  UnknownEntityException - if the user's record does notexist in the database.
throws:
  DataBackendException - if there is a problem accessing thestorage.



retrieveList
public List retrieveList(Criteria criteria) throws DataBackendException(Code)
Retrieve a list of users that meet the specified criteria. As the keys for the criteria, you should use the constants that are defined in User interface, plus the names of the custom attributes you added to your user representation in the data storage. Use verbatim names of the attributes - without table name prefix in case of Torque implementation.
Parameters:
  criteria - The criteria of selection. a List of users meeting the criteria.
throws:
  DataBackendException - if there is a problem accessing thestorage.



saveOnSessionUnbind
public void saveOnSessionUnbind(User user) throws UnknownEntityException, DataBackendException(Code)
Saves User data when the session is unbound. The user account is required to exist in the storage. LastLogin, AccessCounter, persistent pull tools, and any data stored in the permData hashtable that is not mapped to a column will be saved.
exception:
  UnknownEntityException - if the user's account does notexist in the database.
exception:
  DataBackendException - if there is a problem accessing thestorage.



store
public void store(User user) throws UnknownEntityException, DataBackendException(Code)
Save an User object to persistent storage. User's account is required to exist in the storage.
Parameters:
  user - an User object to store.
exception:
  UnknownEntityException - if the user's account does notexist in the database.
exception:
  DataBackendException - if there is a problem accessing thestorage.



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.