Java Doc for UserLDAP.java in  » J2EE » Expresso » com » jcorporate » expresso » ext » 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 » J2EE » Expresso » com.jcorporate.expresso.ext.ldap 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jcorporate.expresso.ext.ldap.UserLDAP

UserLDAP
public class UserLDAP implements UserInfo(Code)
UserLDAP is an LDAP-aware implementation of the UserInfo object - this allows user information to be retrieved from an LDAP server, as opposed to simply retrieved from the database. In order for this implementation to work, the following properties must be set in the properties file for the specific db/context to be user with LDAP: ldapServer: the URL to the LDAP context via JNDI (e.g. ldap://localhost:389) ldapUser: The username to use to access the LDAP server (cn=Directory Manager) ldapPassword: The password to use when accessing the LDAP server (e.g. pass) ldapRoot: The root for the entries we look up (e.g. o=javacorp.com)

Creation date: (9/18/00 1:55:15 PM)
author:
   Michael Nash




Constructor Summary
public  UserLDAP()
     UserLDAP constructor comment.

Method Summary
public  voidadd()
    
public  voiddelete()
    
public  booleanfind()
    
public  StringgetAccountStatus()
    
public  VectorgetAllUsers()
    
public  DirContextgetContext()
     Most often used for testing to peak into things.
public  StringgetCreateDate()
    
public  StringgetDBName()
     Return the name of the context/database connection that this DB object is using.
public  StringgetDataContext()
    
public  StringgetEmail()
    
public  StringgetEmailAuthCode()
     Here we generate an authorization code that would be hard for someone to guess. The idea is that the person has to check the email sent to them to get this number, and then click on the specially encoded URL to ensure that he/she actually is checking the email account used at registration.

The little trick of getting the time in milliseconds that the person registered, multiplying by some constant, and then rounding, is extremely weak.

public  StringgetEmailValCode()
    
public  StringgetField(String fieldName)
     getField method comment.
public  EnumerationgetFieldList()
    
public  java.util.VectorgetGroups()
    
public  StringgetLoginName()
    
public  StringgetPassword()
    
public  StringgetPrimaryGroup()
    
public  booleangetRegComplete()
    
public  StringgetRegistrationDomain()
    
public  StringgetRoot()
    
public  intgetUid()
    
public  StringgetUpdateDate()
    
public  StringgetUserName()
    
public  VectorgetValues()
     Method to return a Vector of ValidValue This method may be implemented by objects that want to provide a list of valid values for other DB objects.
public  StringhashEncodePassword(String password)
     this returns an appropriately hashed password.
public  voidnotify(String subject, String message)
     Send this user a notification via e-mail.
public  booleanpasswordEquals(String tryPassword)
    
public  StringrandomPassword()
    
public  voidretrieve()
     retrieve method comment.
public  voidsendAuthEmail()
     Sends an Authorization Email to a new User.
public  voidsendFollowUpEmail()
     Once a user has validated his email address through the email validation servlet, the user will receive this message giving previously requested username/password.
public  voidsetAccountStatus(String name)
    
public  voidsetCreateDate(String name)
    
public  voidsetDBName(String newDBName)
    
public  voidsetEmail(String name)
    
public  voidsetEmailAuthCode(String name)
    
public  voidsetEmailValCode(String code)
    
public  voidsetLoginName(String name)
    
public  voidsetPassword(String password)
    
public  voidsetRegComplete(boolean status)
    
public  voidsetRegistrationDomain(String domain)
    
public  voidsetUid(int uid)
    
public  voidsetUpdateDate(String name)
    
public  voidsetUserName(String name)
    
public  voidupdate()
     update method comment.


Constructor Detail
UserLDAP
public UserLDAP()(Code)
UserLDAP constructor comment.




Method Detail
add
public void add() throws DBException(Code)

throws:
  DBException -



delete
public void delete() throws DBException(Code)
Deletes the User (Not implemented)



find
public boolean find() throws DBException(Code)
Find the LDAP user true if found



getAccountStatus
public String getAccountStatus() throws DBException(Code)



getAllUsers
public Vector getAllUsers() throws DBException(Code)



getContext
public DirContext getContext()(Code)
Most often used for testing to peak into things. the Directory Context



getCreateDate
public String getCreateDate() throws DBException(Code)



getDBName
public String getDBName()(Code)
Return the name of the context/database connection that this DB object is using. If none is set, then we are using the "default" database/context. a String containing the name of the DBName to use.



getDataContext
public String getDataContext()(Code)
gets the DB context; can return null



getEmail
public String getEmail() throws DBException(Code)



getEmailAuthCode
public String getEmailAuthCode() throws DBException(Code)
Here we generate an authorization code that would be hard for someone to guess. The idea is that the person has to check the email sent to them to get this number, and then click on the specially encoded URL to ensure that he/she actually is checking the email account used at registration.

The little trick of getting the time in milliseconds that the person registered, multiplying by some constant, and then rounding, is extremely weak. We need a better method of generating a unique code that will "play nice" in a query string.

Creation date: (8/8/00 3:00:41 PM) author Adam Rossi, PlatinumSolutions, Inc. java.lang.String




getEmailValCode
public String getEmailValCode() throws DBException(Code)



getField
public String getField(String fieldName) throws DBException(Code)
getField method comment.
Parameters:
  fieldName - The field name to retrieve The field string



getFieldList
public Enumeration getFieldList() throws DBException(Code)
java.util.Enumeration
throws:
  DBException - upon Error



getGroups
public java.util.Vector getGroups() throws DBException(Code)
Get the groups associated with this User The group list



getLoginName
public String getLoginName() throws DBException(Code)



getPassword
public String getPassword() throws DBException(Code)



getPrimaryGroup
public String getPrimaryGroup() throws DBException(Code)
the primary group of this user is appropriate for unix-like purposes, such as setting the group for a file permission name of the primary group of this user; null if no group is found



getRegComplete
public boolean getRegComplete() throws DBException(Code)



getRegistrationDomain
public String getRegistrationDomain() throws DBException(Code)



getRoot
public String getRoot()(Code)



getUid
public int getUid() throws DBException(Code)



getUpdateDate
public String getUpdateDate() throws DBException(Code)



getUserName
public String getUserName() throws DBException(Code)



getValues
public Vector getValues() throws DBException(Code)
Method to return a Vector of ValidValue This method may be implemented by objects that want to provide a list of valid values for other DB objects. It is strongly recommended that the valid value list be cached (via the CacheManager) for performance. The naming convention used in Expresso is to store the ValidValue list with a cache name the same as the db objects class name with ".validValues" appended The vector of values



hashEncodePassword
public String hashEncodePassword(String password) throws DBException(Code)
this returns an appropriately hashed password.
Parameters:
  password - to be hashed appropriately hashed password.



notify
public void notify(String subject, String message) throws DBException(Code)
Send this user a notification via e-mail.
Parameters:
  subject - Subject of the e-mail
Parameters:
  message - Message to send in body of e-mail
throws:
  DBException - If the mail message cannot be sent



passwordEquals
public boolean passwordEquals(String tryPassword) throws DBException(Code)
Checks if the supplied password equals the one on file
Parameters:
  tryPassword - The password to check true if the tryPassword equals the one on file



randomPassword
public String randomPassword()(Code)
Generate a random password a random password of printable characters



retrieve
public void retrieve() throws DBException(Code)
retrieve method comment.



sendAuthEmail
public void sendAuthEmail() throws DBException(Code)
Sends an Authorization Email to a new User. The user must click on the link encoded in this email before his account will be activated.



sendFollowUpEmail
public void sendFollowUpEmail() throws DBException(Code)
Once a user has validated his email address through the email validation servlet, the user will receive this message giving previously requested username/password.

Creation date: (8/8/00 11:44:26 PM) author: Adam Rossi, PlatinumSolutions, Inc.
throws:
  com.jcorporate.expresso.core.db.DBException - The exception description.




setAccountStatus
public void setAccountStatus(String name) throws DBException(Code)



setCreateDate
public void setCreateDate(String name) throws DBException(Code)



setDBName
public void setDBName(String newDBName) throws DBException(Code)
Sets the data context for this user
Parameters:
  newDBName - The new data context



setEmail
public void setEmail(String name) throws DBException(Code)



setEmailAuthCode
public void setEmailAuthCode(String name) throws DBException(Code)



setEmailValCode
public void setEmailValCode(String code) throws DBException(Code)



setLoginName
public void setLoginName(String name) throws DBException(Code)



setPassword
public void setPassword(String password) throws DBException(Code)



setRegComplete
public void setRegComplete(boolean status) throws DBException(Code)



setRegistrationDomain
public void setRegistrationDomain(String domain)(Code)



setUid
public void setUid(int uid) throws DBException(Code)



setUpdateDate
public void setUpdateDate(String name) throws DBException(Code)



setUserName
public void setUserName(String name) throws DBException(Code)



update
public void update() throws DBException(Code)
update method comment.



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.