Java Doc for AbstractUserDatabase.java in  » Wiki-Engine » JSPWiki » com » ecyrd » jspwiki » auth » user » 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 » Wiki Engine » JSPWiki » com.ecyrd.jspwiki.auth.user 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ecyrd.jspwiki.auth.user.AbstractUserDatabase

All known Subclasses:   com.ecyrd.jspwiki.auth.user.XMLUserDatabase,  com.ecyrd.jspwiki.auth.user.JDBCUserDatabase,
AbstractUserDatabase
abstract public class AbstractUserDatabase implements UserDatabase(Code)
Abstract UserDatabase class that provides convenience methods for finding profiles, building Principal collections and hashing passwords.
author:
   Andrew R. Jaquith
since:
   2.3


Field Summary
final protected static  StringPROP_SHARED_WITH_CONTAINER
    
final protected static  StringSHA_PREFIX
    
final protected static  Loggerlog
    


Method Summary
public synchronized  voidcommit()
     No-op method that in previous versions of JSPWiki was intended to atomically commit changes to the user database.
public  UserProfilefind(String index)
     Looks up and returns the first UserProfile in the user database that whose login name, full name, or wiki name matches the supplied string.
abstract public  UserProfilefindByEmail(String index)
    
abstract public  UserProfilefindByFullName(String index)
    
abstract public  UserProfilefindByLoginName(String index)
    
abstract public  UserProfilefindByWikiName(String index)
    
protected  StringgetHash(String text)
    
public  Principal[]getPrincipals(String identifier)
    

Looks up the Principals representing a user from the user database.

abstract public  voidinitialize(WikiEngine engine, Properties props)
    
public  UserProfilenewProfile()
     Factory method that instantiates a new DefaultUserProfile.
abstract public  voidsave(UserProfile profile)
    
public  booleanvalidatePassword(String loginName, String password)
     Validates the password for a given user.

Field Detail
PROP_SHARED_WITH_CONTAINER
final protected static String PROP_SHARED_WITH_CONTAINER(Code)



SHA_PREFIX
final protected static String SHA_PREFIX(Code)



log
final protected static Logger log(Code)





Method Detail
commit
public synchronized void commit() throws WikiSecurityException(Code)
No-op method that in previous versions of JSPWiki was intended to atomically commit changes to the user database. Now, the AbstractUserDatabase.rename(String,String) , AbstractUserDatabase.save(UserProfile) and AbstractUserDatabase.deleteByLoginName(String) methods are atomic themselves.
throws:
  WikiSecurityException -



find
public UserProfile find(String index) throws NoSuchPrincipalException(Code)
Looks up and returns the first UserProfile in the user database that whose login name, full name, or wiki name matches the supplied string. This method provides a "forgiving" search algorithm for resolving principal names when the exact profile attribute that supplied the name is unknown.
Parameters:
  index - the login name, full name, or wiki name
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.find(java.lang.String)



findByEmail
abstract public UserProfile findByEmail(String index) throws NoSuchPrincipalException(Code)

See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.findByEmail(java.lang.String)



findByFullName
abstract public UserProfile findByFullName(String index) throws NoSuchPrincipalException(Code)

See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.findByFullName(java.lang.String)



findByLoginName
abstract public UserProfile findByLoginName(String index) throws NoSuchPrincipalException(Code)

See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.findByLoginName(java.lang.String)



findByWikiName
abstract public UserProfile findByWikiName(String index) throws NoSuchPrincipalException(Code)

See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.findByWikiName(java.lang.String)



getHash
protected String getHash(String text)(Code)
Private method that calculates the SHA-1 hash of a given String
Parameters:
  text - the text to hash the result hash



getPrincipals
public Principal[] getPrincipals(String identifier) throws NoSuchPrincipalException(Code)

Looks up the Principals representing a user from the user database. These are defined as a set of WikiPrincipals manufactured from the login name, full name, and wiki name. If the user database does not contain a user with the supplied identifier, throws a NoSuchPrincipalException .

When this method creates WikiPrincipals, the Principal containing the user's full name is marked as containing the common name (see com.ecyrd.jspwiki.auth.WikiPrincipal.WikiPrincipal(StringString) ).
Parameters:
  identifier - the name of the principal to retrieve; this corresponds tovalue returned by the user profile'sUserProfile.getLoginNamemethod. the array of Principals representing the user
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.getPrincipals(java.lang.String)




initialize
abstract public void initialize(WikiEngine engine, Properties props) throws NoRequiredPropertyException(Code)

See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.initialize(com.ecyrd.jspwiki.WikiEnginejava.util.Properties)



newProfile
public UserProfile newProfile()(Code)
Factory method that instantiates a new DefaultUserProfile.
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.newProfile



save
abstract public void save(UserProfile profile) throws WikiSecurityException(Code)

See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.save(com.ecyrd.jspwiki.auth.user.UserProfile)



validatePassword
public boolean validatePassword(String loginName, String password)(Code)
Validates the password for a given user. If the user does not exist in the user database, this method always returns false. If the user exists, the supplied password is compared to the stored password. Note that if the stored password's value starts with {SHA}, the supplied password is hashed prior to the comparison.
Parameters:
  loginName - the user's login name
Parameters:
  password - the user's password (obtained from user input, e.g., a web form) true if the supplied user password matches thestored password
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.validatePassword(java.lang.Stringjava.lang.String)



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.