Java Doc for XMLUserDatabase.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
      com.ecyrd.jspwiki.auth.user.XMLUserDatabase

XMLUserDatabase
public class XMLUserDatabase extends AbstractUserDatabase (Code)

Manages DefaultUserProfile objects using XML files for persistence. Passwords are hashed using SHA1. User entries are simple <user> elements under the root. User profile properties are attributes of the element. For example:

<users>
  <user loginName="janne" fullName="Janne Jalkanen"
    wikiName="JanneJalkanen" email="janne@ecyrd.com"
    password="{SHA}457b08e825da547c3b77fbc1ff906a1d00a7daee"/>
</users>

In this example, the un-hashed password is myP@5sw0rd. Passwords are hashed without salt.


author:
   Andrew Jaquith
since:
   2.3


Field Summary
final public static  StringPROP_USERDATABASE
     The jspwiki.properties property specifying the file system location of the user database.


Method Summary
public synchronized  voiddeleteByLoginName(String loginName)
     Looks up and deletes the first UserProfile in the user database that matches a profile having a given login name.
public  UserProfilefindByEmail(String index)
     Looks up and returns the first UserProfile in the user database that matches a profile having a given e-mail address.
public  UserProfilefindByFullName(String index)
     Looks up and returns the first UserProfile in the user database that matches a profile having a given full name.
public  UserProfilefindByLoginName(String index)
     Looks up and returns the first UserProfile in the user database that matches a profile having a given login name.
public  UserProfilefindByWikiName(String index)
     Looks up and returns the first UserProfile in the user database that matches a profile having a given wiki name.
public  Principal[]getWikiNames()
     Returns all WikiNames that are stored in the UserDatabase as an array of WikiPrincipal objects.
public  voidinitialize(WikiEngine engine, Properties props)
     Initializes the user database based on values from a Properties object.
public  booleanisSharedWithContainer()
     Determines whether the user database shares user/password data with the web container; always returns false.
public synchronized  voidrename(String loginName, String newName)
    
public synchronized  voidsave(UserProfile profile)
     Saves a UserProfile to the user database, overwriting the existing profile if it exists.

Field Detail
PROP_USERDATABASE
final public static String PROP_USERDATABASE(Code)
The jspwiki.properties property specifying the file system location of the user database.





Method Detail
deleteByLoginName
public synchronized void deleteByLoginName(String loginName) throws NoSuchPrincipalException, WikiSecurityException(Code)
Looks up and deletes the first UserProfile in the user database that matches a profile having a given login name. If the user database does not contain a user with a matching attribute, throws a NoSuchPrincipalException .
Parameters:
  loginName - the login name of the user profile that shall be deleted



findByEmail
public UserProfile findByEmail(String index) throws NoSuchPrincipalException(Code)
Looks up and returns the first UserProfile in the user database that matches a profile having a given e-mail address. If the user database does not contain a user with a matching attribute, throws a NoSuchPrincipalException .
Parameters:
  index - the e-mail address of the desired user profile the user profile
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.findByEmail(String)



findByFullName
public UserProfile findByFullName(String index) throws NoSuchPrincipalException(Code)
Looks up and returns the first UserProfile in the user database that matches a profile having a given full name. If the user database does not contain a user with a matching attribute, throws a NoSuchPrincipalException .
Parameters:
  index - the fill name of the desired user profile the user profile
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.findByFullName(java.lang.String)



findByLoginName
public UserProfile findByLoginName(String index) throws NoSuchPrincipalException(Code)
Looks up and returns the first UserProfile in the user database that matches a profile having a given login name. If the user database does not contain a user with a matching attribute, throws a NoSuchPrincipalException .
Parameters:
  index - the login name of the desired user profile the user profile
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.findByLoginName(java.lang.String)



findByWikiName
public UserProfile findByWikiName(String index) throws NoSuchPrincipalException(Code)
Looks up and returns the first UserProfile in the user database that matches a profile having a given wiki name. If the user database does not contain a user with a matching attribute, throws a NoSuchPrincipalException .
Parameters:
  index - the wiki name of the desired user profile the user profile
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.findByWikiName(java.lang.String)



getWikiNames
public Principal[] getWikiNames() throws WikiSecurityException(Code)
Returns all WikiNames that are stored in the UserDatabase as an array of WikiPrincipal objects. If the database does not contain any profiles, this method will return a zero-length array. the WikiNames



initialize
public void initialize(WikiEngine engine, Properties props) throws NoRequiredPropertyException(Code)
Initializes the user database based on values from a Properties object. The properties object must contain a file path to the XML database file whose key is XMLUserDatabase.PROP_USERDATABASE .
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.initialize(com.ecyrd.jspwiki.WikiEnginejava.util.Properties)
throws:
  NoRequiredPropertyException - if the user database cannot be located, parsed, or opened



isSharedWithContainer
public boolean isSharedWithContainer()(Code)
Determines whether the user database shares user/password data with the web container; always returns false.
See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.isSharedWithContainer



rename
public synchronized void rename(String loginName, String newName) throws NoSuchPrincipalException, DuplicateUserException, WikiSecurityException(Code)

See Also:   com.ecyrd.jspwiki.auth.user.UserDatabase.rename(StringString)



save
public synchronized void save(UserProfile profile) throws WikiSecurityException(Code)
Saves a UserProfile to the user database, overwriting the existing profile if it exists. The user name under which the profile should be saved is returned by the supplied profile's UserProfile.getLoginName method.
Parameters:
  profile - the user profile to save
throws:
  WikiSecurityException - if the profile cannot be saved



Fields inherited from com.ecyrd.jspwiki.auth.user.AbstractUserDatabase
final protected static String PROP_SHARED_WITH_CONTAINER(Code)(Java Doc)
final protected static String SHA_PREFIX(Code)(Java Doc)
final protected static Logger log(Code)(Java Doc)

Methods inherited from com.ecyrd.jspwiki.auth.user.AbstractUserDatabase
public synchronized void commit() throws WikiSecurityException(Code)(Java Doc)
public UserProfile find(String index) throws NoSuchPrincipalException(Code)(Java Doc)
abstract public UserProfile findByEmail(String index) throws NoSuchPrincipalException(Code)(Java Doc)
abstract public UserProfile findByFullName(String index) throws NoSuchPrincipalException(Code)(Java Doc)
abstract public UserProfile findByLoginName(String index) throws NoSuchPrincipalException(Code)(Java Doc)
abstract public UserProfile findByWikiName(String index) throws NoSuchPrincipalException(Code)(Java Doc)
protected String getHash(String text)(Code)(Java Doc)
public Principal[] getPrincipals(String identifier) throws NoSuchPrincipalException(Code)(Java Doc)
abstract public void initialize(WikiEngine engine, Properties props) throws NoRequiredPropertyException(Code)(Java Doc)
public UserProfile newProfile()(Code)(Java Doc)
abstract public void save(UserProfile profile) throws WikiSecurityException(Code)(Java Doc)
public boolean validatePassword(String loginName, String password)(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.