Java Doc for UserManager.java in  » Database-DBMS » hsql » org » hsqldb » 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 » Database DBMS » hsql » org.hsqldb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.hsqldb.UserManager

UserManager
class UserManager implements GrantConstants(Code)
Manages the User objects for a Database instance. The special users PUBLIC_USER_NAME and SYSTEM_AUTHORIZATION_NAME are created and managed here. SYSTEM_AUTHORIZATION_NAME is also special in that the name is not kept in the user "list" (PUBLIC_USER_NAME is kept in the list because it's needed by MetaData routines via "listVisibleUsers(x, true)"). Partly based on Hypersonic code.
author:
   Thomas Mueller (Hypersonic SQL Group)
author:
   boucherb@users
author:
   fredt@users
version:
   1.8.0
since:
   1.7.2
See Also:   User


Field Summary
 UsersysUser
     We keep a link to the SYSTEM_AUTHORIZATION_NAME user because it is the only User with no entry in the User map.

Constructor Summary
 UserManager(Database database)
     Construction happens once for each Database object.

Method Summary
 UsercreateUser(String name, String password)
     Creates a new User object under management of this object.
 voiddropUser(String name)
     Attempts to drop a User object with the specified name from this object's set.
 booleanexists(String name)
    
 Userget(String name)
     Returns the User object identified by the name argument.
static  String[]getRightsArray(int rights)
    
 UsergetSysUser()
     Returns the specially constructed SYSTEM_AUTHORIZATION_NAME User object for the current Database object.
throws:
  HsqlException - - if the specified Databasehas no SYS_AUTHORIZATION_NAMEUser object.
 UsergetUser(String name, String password)
     Returns the User object with the specified name and password from this object's set.
 HashMappedListgetUsers()
     Retrieves this object's set of User objects as an HsqlArrayList.
 HsqlArrayListlistVisibleUsers(Session session, boolean andPublicUser)
     Retrieves the User objects representing the database users that are visible to the User object represented by the session argument.
 voidremoveDbObject(Object dbobject)
     Removes all rights mappings for the database object identified by the dbobject argument from all Grantee objects in the set.
public synchronized  voidremoveSchemaReference(Schema schema)
    

Field Detail
sysUser
User sysUser(Code)
We keep a link to the SYSTEM_AUTHORIZATION_NAME user because it is the only User with no entry in the User map.




Constructor Detail
UserManager
UserManager(Database database) throws HsqlException(Code)
Construction happens once for each Database object. Creates special users PUBLIC_USER_NAME and SYSTEM_AUTHORIZATION_NAME. Sets up association with the GranteeManager for this database.




Method Detail
createUser
User createUser(String name, String password) throws HsqlException(Code)
Creates a new User object under management of this object.

A set of constraints regarding user creation is imposed:

  1. If the specified name is null, then an ASSERTION_FAILED exception is thrown stating that the name is null.
  2. If this object's collection already contains an element whose name attribute equals the name argument, then a GRANTEE_ALREADY_EXISTS exception is thrown. (This will catch attempts to create Reserved grantee names).



dropUser
void dropUser(String name) throws HsqlException(Code)
Attempts to drop a User object with the specified name from this object's set.

A successful drop action consists of:

  • removing the User object with the specified name from the set.
  • revoking all rights from the removed object
    (this ensures that in case there are still references to the just dropped User object, those references cannot be used to erronously access database objects).




exists
boolean exists(String name)(Code)



get
User get(String name) throws HsqlException(Code)
Returns the User object identified by the name argument.




getRightsArray
static String[] getRightsArray(int rights)(Code)



getSysUser
User getSysUser()(Code)
Returns the specially constructed SYSTEM_AUTHORIZATION_NAME User object for the current Database object.
throws:
  HsqlException - - if the specified Databasehas no SYS_AUTHORIZATION_NAMEUser object. the SYS_AUTHORIZATION_NAMEUser object



getUser
User getUser(String name, String password) throws HsqlException(Code)
Returns the User object with the specified name and password from this object's set.



getUsers
HashMappedList getUsers()(Code)
Retrieves this object's set of User objects as an HsqlArrayList.




listVisibleUsers
HsqlArrayList listVisibleUsers(Session session, boolean andPublicUser)(Code)
Retrieves the User objects representing the database users that are visible to the User object represented by the session argument.

If the session argument's User object attribute has isAdmin() true (directly or by virtue of a Role), then all of the User objects in this collection are considered visible. Otherwise, only this object's special PUBLIC User object attribute and the session User object, if it exists in this collection, are considered visible.


Parameters:
  session - The Session object used to determinevisibility
Parameters:
  andPublicUser - whether to include the special PUBLICUser object in the retrieved list a list of User objects visible tothe User object contained by thesession argument.




removeDbObject
void removeDbObject(Object dbobject)(Code)
Removes all rights mappings for the database object identified by the dbobject argument from all Grantee objects in the set.



removeSchemaReference
public synchronized void removeSchemaReference(Schema schema)(Code)



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.