Java Doc for MemoryUserDatabase.java in  » Sevlet-Container » tomcat-catalina » org » apache » catalina » users » 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 » Sevlet Container » tomcat catalina » org.apache.catalina.users 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.users.MemoryUserDatabase

MemoryUserDatabase
public class MemoryUserDatabase implements UserDatabase(Code)

Concrete implementation of UserDatabase that loads all defined users, groups, and roles into an in-memory data structure, and uses a specified XML file for its persistent storage.


author:
   Craig R. McClanahan
version:
   $Revision: 1.6 $ $Date: 2004/02/27 14:58:50 $
since:
   4.1


Field Summary
protected  HashMapgroups
     The set of Group s defined in this database, keyed by group name.
protected  Stringid
     The unique global identifier of this user database.
protected  Stringpathname
     The relative (to catalina.base) or absolute pathname to the XML file in which we will save our persistent information.
protected  StringpathnameNew
     The relative or absolute pathname ot the file in which we write our new information prior to renaming.
protected  StringpathnameOld
     The relative or absolute pathname to the file in which our old information is stored while renaming is in progress.
protected  HashMaproles
     The set of Role s defined in this database, keyed by role name.
protected  HashMapusers
     The set of User s defined in this database, keyed by user name.

Constructor Summary
public  MemoryUserDatabase()
     Create a new instance with default values.
public  MemoryUserDatabase(String id)
     Create a new instance with the specified values.

Method Summary
public  voidclose()
     Finalize access to this user database.
public  GroupcreateGroup(String groupname, String description)
     Create and return a new Group defined in this user database.
public  RolecreateRole(String rolename, String description)
     Create and return a new Role defined in this user database.
public  UsercreateUser(String username, String password, String fullName)
     Create and return a new User defined in this user database.
public  GroupfindGroup(String groupname)
     Return the Group with the specified group name, if any; otherwise return null.
public  RolefindRole(String rolename)
     Return the Role with the specified role name, if any; otherwise return null.
public  UserfindUser(String username)
     Return the User with the specified user name, if any; otherwise return null.
public  IteratorgetGroups()
     Return the set of Group s defined in this user database.
public  StringgetId()
     Return the unique global identifier of this user database.
public  StringgetPathname()
     Return the relative or absolute pathname to the persistent storage file.
public  IteratorgetRoles()
     Return the set of Role s defined in this user database.
 StringManagergetStringManager()
     Return the StringManager for use in looking up messages.
public  IteratorgetUsers()
     Return the set of User s defined in this user database.
public  voidopen()
     Initialize access to this user database.
public  voidremoveGroup(Group group)
     Remove the specified Group from this user database.
public  voidremoveRole(Role role)
     Remove the specified Role from this user database.
public  voidremoveUser(User user)
     Remove the specified User from this user database.
public  voidsave()
     Save any updated information to the persistent storage location for this user database.
public  voidsetPathname(String pathname)
     Set the relative or absolute pathname to the persistent storage file.
public  StringtoString()
     Return a String representation of this UserDatabase.

Field Detail
groups
protected HashMap groups(Code)
The set of Group s defined in this database, keyed by group name.



id
protected String id(Code)
The unique global identifier of this user database.



pathname
protected String pathname(Code)
The relative (to catalina.base) or absolute pathname to the XML file in which we will save our persistent information.



pathnameNew
protected String pathnameNew(Code)
The relative or absolute pathname ot the file in which we write our new information prior to renaming.



pathnameOld
protected String pathnameOld(Code)
The relative or absolute pathname to the file in which our old information is stored while renaming is in progress.



roles
protected HashMap roles(Code)
The set of Role s defined in this database, keyed by role name.



users
protected HashMap users(Code)
The set of User s defined in this database, keyed by user name.




Constructor Detail
MemoryUserDatabase
public MemoryUserDatabase()(Code)
Create a new instance with default values.



MemoryUserDatabase
public MemoryUserDatabase(String id)(Code)
Create a new instance with the specified values.
Parameters:
  id - Unique global identifier of this user database




Method Detail
close
public void close() throws Exception(Code)
Finalize access to this user database.
exception:
  Exception - if any exception is thrown during closing



createGroup
public Group createGroup(String groupname, String description)(Code)
Create and return a new Group defined in this user database.
Parameters:
  groupname - The group name of the new group (must be unique)
Parameters:
  description - The description of this group



createRole
public Role createRole(String rolename, String description)(Code)
Create and return a new Role defined in this user database.
Parameters:
  rolename - The role name of the new group (must be unique)
Parameters:
  description - The description of this group



createUser
public User createUser(String username, String password, String fullName)(Code)
Create and return a new User defined in this user database.
Parameters:
  username - The logon username of the new user (must be unique)
Parameters:
  password - The logon password of the new user
Parameters:
  fullName - The full name of the new user



findGroup
public Group findGroup(String groupname)(Code)
Return the Group with the specified group name, if any; otherwise return null.
Parameters:
  groupname - Name of the group to return



findRole
public Role findRole(String rolename)(Code)
Return the Role with the specified role name, if any; otherwise return null.
Parameters:
  rolename - Name of the role to return



findUser
public User findUser(String username)(Code)
Return the User with the specified user name, if any; otherwise return null.
Parameters:
  username - Name of the user to return



getGroups
public Iterator getGroups()(Code)
Return the set of Group s defined in this user database.



getId
public String getId()(Code)
Return the unique global identifier of this user database.



getPathname
public String getPathname()(Code)
Return the relative or absolute pathname to the persistent storage file.



getRoles
public Iterator getRoles()(Code)
Return the set of Role s defined in this user database.



getStringManager
StringManager getStringManager()(Code)
Return the StringManager for use in looking up messages.



getUsers
public Iterator getUsers()(Code)
Return the set of User s defined in this user database.



open
public void open() throws Exception(Code)
Initialize access to this user database.
exception:
  Exception - if any exception is thrown during opening



removeGroup
public void removeGroup(Group group)(Code)
Remove the specified Group from this user database.
Parameters:
  group - The group to be removed



removeRole
public void removeRole(Role role)(Code)
Remove the specified Role from this user database.
Parameters:
  role - The role to be removed



removeUser
public void removeUser(User user)(Code)
Remove the specified User from this user database.
Parameters:
  user - The user to be removed



save
public void save() throws Exception(Code)
Save any updated information to the persistent storage location for this user database.
exception:
  Exception - if any exception is thrown during saving



setPathname
public void setPathname(String pathname)(Code)
Set the relative or absolute pathname to the persistent storage file.
Parameters:
  pathname - The new pathname



toString
public String toString()(Code)
Return a String representation of this UserDatabase.



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.