Source Code Cross Referenced for Authorizer.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » sql » conn » 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 » db derby 10.2 » org.apache.derby.iapi.sql.conn 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:           Derby - Class org.apache.derby.iapi.sql.conn.Authorizer
004:
005:           Licensed to the Apache Software Foundation (ASF) under one or more
006:           contributor license agreements.  See the NOTICE file distributed with
007:           this work for additional information regarding copyright ownership.
008:           The ASF licenses this file to you under the Apache License, Version 2.0
009:           (the "License"); you may not use this file except in compliance with
010:           the License.  You may obtain a copy of the License at
011:
012:              http://www.apache.org/licenses/LICENSE-2.0
013:
014:           Unless required by applicable law or agreed to in writing, software
015:           distributed under the License is distributed on an "AS IS" BASIS,
016:           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:           See the License for the specific language governing permissions and
018:           limitations under the License.
019:
020:         */
021:
022:        package org.apache.derby.iapi.sql.conn;
023:
024:        import org.apache.derby.iapi.sql.Activation;
025:        import org.apache.derby.iapi.error.StandardException;
026:
027:        /**
028:         The Authorizer verifies a connected user has the authorization 
029:         to perform a requested database operation using the current
030:         connection.
031:
032:         <P>
033:         Today no object based authorization is supported.
034:         */
035:        public interface Authorizer {
036:            /** SQL write (insert,update,delete) operation */
037:            public static final int SQL_WRITE_OP = 0;
038:            /** SQL SELECT  operation */
039:            public static final int SQL_SELECT_OP = 1;
040:            /** Any other SQL operation	*/
041:            public static final int SQL_ARBITARY_OP = 2;
042:            /** SQL CALL/VALUE  operation */
043:            public static final int SQL_CALL_OP = 3;
044:            /** SQL DDL operation */
045:            public static final int SQL_DDL_OP = 4;
046:            /** database property write operation */
047:            public static final int PROPERTY_WRITE_OP = 5;
048:            /**  database jar write operation */
049:            public static final int JAR_WRITE_OP = 6;
050:
051:            /* Privilege types for SQL standard (grant/revoke) permissions checking. */
052:            public static final int NULL_PRIV = -1;
053:            public static final int SELECT_PRIV = 0;
054:            public static final int UPDATE_PRIV = 1;
055:            public static final int REFERENCES_PRIV = 2;
056:            public static final int INSERT_PRIV = 3;
057:            public static final int DELETE_PRIV = 4;
058:            public static final int TRIGGER_PRIV = 5;
059:            public static final int EXECUTE_PRIV = 6;
060:            public static final int PRIV_TYPE_COUNT = 7;
061:
062:            /* Used to check who can create schemas or who can modify objects in schema */
063:            public static final int CREATE_SCHEMA_PRIV = 16;
064:            public static final int MODIFY_SCHEMA_PRIV = 17;
065:            public static final int DROP_SCHEMA_PRIV = 18;
066:
067:            /**
068:             * The system authorization ID is defined by the SQL2003 spec as the grantor
069:             * of privileges to object owners.
070:             */
071:            public static final String SYSTEM_AUTHORIZATION_ID = "_SYSTEM";
072:
073:            /**
074:             * The public authorization ID is defined by the SQL2003 spec as implying all users.
075:             */
076:            public static final String PUBLIC_AUTHORIZATION_ID = "PUBLIC";
077:
078:            /**
079:              Verify the connected user is authorized to perform the requested
080:              operation.
081:
082:              This variation should only be used with operations that do not use tables
083:              or routines. If the operation involves tables or routines then use the
084:              variation of the authorize method that takes an Activation parameter. The
085:              activation holds the table, column, and routine lists.
086:
087:              @param operation the enumeration code for the requsted operation.
088:
089:              @exception StandardException Thrown if the operation is not allowed
090:             */
091:            public void authorize(int operation) throws StandardException;
092:
093:            /**
094:              Verify the connected user is authorized to perform the requested
095:              operation.
096:
097:              @param activation holds the list of tables, columns, and routines used.
098:              @param operation the enumeration code for the requsted operation.
099:
100:              @exception StandardException Thrown if the operation is not allowed
101:             */
102:            public void authorize(Activation activation, int operation)
103:                    throws StandardException;
104:
105:            /**
106:              Get the Authorization ID for this Authorizer.
107:             */
108:            public String getAuthorizationId();
109:
110:            /**
111:             Get the readOnly status for this authorizer's connection.
112:             */
113:            public boolean isReadOnlyConnection();
114:
115:            /**
116:             Set the readOnly status for this authorizer's connection.
117:             @param on true means set the connection to read only mode,
118:                       false means set the connection to read wrte mode.
119:             @param authorize true means to verify the caller has authority
120:                    to set the connection and false means do not check. 
121:             @exception StandardException Oops not allowed.
122:             */
123:            public void setReadOnlyConnection(boolean on, boolean authorize)
124:                    throws StandardException;
125:
126:            /**
127:             Refresh this authorizer to reflect a change in the database
128:             permissions.
129:             
130:             @exception AuthorizerSessionException Connect permission gone.
131:             @exception StandardException Oops.
132:             */
133:            public void refresh() throws StandardException;
134:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.