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


java.lang.Object
   org.apache.turbine.services.security.ldap.LDAPUserManager

LDAPUserManager
public class LDAPUserManager implements UserManager(Code)
A UserManager performs org.apache.turbine.om.security.User object related tasks on behalf of the org.apache.turbine.services.security.SecurityService . This implementation uses ldap for retrieving user data. It expects that the User interface implementation will be castable to org.apache.turbine.om.BaseObject .
author:
   Jon S. Stevens
author:
   John D. McNally
author:
   Frank Y. Kim
author:
   Craig D. Berry
author:
   Rafal Krzewski
author:
   Tracy M. Adewunmi
author:
   Leonard J. Flournoy
author:
   Jason van Zyl
author:
   Daniel Rall
author:
   Humberto Hernandez
version:
   $Id: LDAPUserManager.java 264148 2005-08-29 14:21:04Z henning $




Method Summary
public  booleanaccountExists(User user)
     Check wether 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 wether 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 a User with the specified password.
public static  DirContextbind(String username, String password)
     Creates an initial context.
Parameters:
  username - admin username supplied in TRP.
Parameters:
  password - admin password supplied in TRP
throws:
  NamingException - when an error occurs with the named server.
public static  DirContextbindAsAdmin()
     Bind as the admin user.
throws:
  NamingException - when an error occurs with the named server.
public  voidchangePassword(User user, String oldPass, String newPass)
     This method is not yet implemented 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)
     This method is not yet implemented Forcibly sets new password for an User. This is supposed to be used 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)
     This is currently not implemented to behave as expected.
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)
     This method is not yet implemented. Saves User data when the session is unbound.
public  voidstore(User user)
     Save a User object to persistent storage.



Method Detail
accountExists
public boolean accountExists(User user) throws DataBackendException(Code)
Check wether 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 - Error accessing the data backend.



accountExists
public boolean accountExists(String username) throws DataBackendException(Code)
Check wether 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 - Error accessing the data backend.



authenticate
public void authenticate(User user, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException(Code)
Authenticate a User with the specified password. If authentication is successful the method returns nothing. If there are any problems, exception was thrown.
Parameters:
  user - a 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 - Error accessing the data backend.



bind
public static DirContext bind(String username, String password) throws NamingException(Code)
Creates an initial context.
Parameters:
  username - admin username supplied in TRP.
Parameters:
  password - admin password supplied in TRP
throws:
  NamingException - when an error occurs with the named server. a new DirContext.



bindAsAdmin
public static DirContext bindAsAdmin() throws NamingException(Code)
Bind as the admin user.
throws:
  NamingException - when an error occurs with the named server. a new DirContext.



changePassword
public void changePassword(User user, String oldPass, String newPass) throws PasswordMismatchException, UnknownEntityException, DataBackendException(Code)
This method is not yet implemented Change the password for an User.
Parameters:
  user - an User to change password for.
Parameters:
  newPass - the new password.
Parameters:
  oldPass - the old password.
exception:
  PasswordMismatchException - if the supplied password wasincorrect.
exception:
  UnknownEntityException - if the user's account does notexist in the database.
exception:
  DataBackendException - Error accessing the data backend.



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 - Not used yet.
throws:
  DataBackendException - Error accessing the data backend.
throws:
  EntityExistsException - if the user account already exists.



forcePassword
public void forcePassword(User user, String password) throws UnknownEntityException, DataBackendException(Code)
This method is not yet implemented Forcibly sets new password for an User. This is supposed to be used by the administrator to change the forgotten or compromised passwords. Certain implementatations of this feature would require adminstrative 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 - Error accessing the data backend.



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 - Error accessing the 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 - Error accessing the data backend.



retrieve
public User[] retrieve(Criteria criteria) throws DataBackendException(Code)
This is currently not implemented to behave as expected. It ignores the Criteria argument and returns all the users. 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 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 - Error accessing the data backend.



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 - Error accessing the data backend.



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)
This method is not yet implemented. 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 a User object to persistent storage. User's account is required to exist in the storage.
Parameters:
  user - an User object to store.
throws:
  UnknownEntityException - if the user's account does notexist in the database.
throws:
  DataBackendException - if there is an LDAP error



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.