Source Code Cross Referenced for OzoneSecurityManager.java in  » Database-DBMS » Ozone-1.1 » org » ozoneDB » core » 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 » Ozone 1.1 » org.ozoneDB.core 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // You can redistribute this software and/or modify it under the terms of
002:        // the Ozone Core License version 1 published by ozone-db.org.
003:        //
004:        // The original code and portions created by SMB are
005:        // Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
006:        //
007:        // $Id: OzoneSecurityManager.java,v 1.1 2001/12/18 10:31:30 per_nyfelt Exp $
008:
009:        package org.ozoneDB.core;
010:
011:        import org.ozoneDB.core.DbRemote.CommandThread;
012:        import java.io.*;
013:        import java.net.*;
014:
015:        public class OzoneSecurityManager extends SecurityManager {
016:
017:            static boolean enabled = false;
018:
019:            Thread thread() {
020:                return Thread.currentThread();
021:            }
022:
023:            public void enable(boolean value) {
024:                enabled = value;
025:            }
026:
027:            boolean is3XThread() {
028:                return !isTransaction();
029:            }
030:
031:            boolean isTransaction() {
032:                if (thread() instanceof  CommandThread) {
033:                    return ((CommandThread) thread()).transaction() != null;
034:                } else {
035:                    return false;
036:                }
037:            }
038:
039:            void standardSecurity() {
040:                if (enabled) {
041:                    if (isTransaction()) {
042:                        throw new SecurityException();
043:                    }
044:                }
045:            }
046:
047:            public OzoneSecurityManager() {
048:            }
049:
050:            public void checkAccept(String host, int port) {
051:                standardSecurity();
052:            }
053:
054:            public void checkAccess(Thread thread) {
055:                standardSecurity();
056:            }
057:
058:            public void checkAccess(ThreadGroup threadGroup) {
059:                standardSecurity();
060:            }
061:
062:            public void checkAwtEventQueueAccess() {
063:                standardSecurity();
064:            }
065:
066:            public void checkConnect(String host, int port) {
067:                standardSecurity();
068:            }
069:
070:            public void checkConnect(String host, int port, Object obj) {
071:                standardSecurity();
072:            }
073:
074:            public void checkCreateClassLoader() {
075:                standardSecurity();
076:            }
077:
078:            public void checkDelete(String file) {
079:                standardSecurity();
080:            }
081:
082:            public void checkExec(String command) {
083:                standardSecurity();
084:            }
085:
086:            public void checkExit(int code) {
087:                if (enabled) {
088:                    throw new SecurityException();
089:                }
090:            }
091:
092:            public void checkLink(String library) {
093:                standardSecurity();
094:            }
095:
096:            public void checkListen(int port) {
097:                standardSecurity();
098:            }
099:
100:            public void checkMemberAccess(Class clazz, int which) {
101:            }
102:
103:            public void checkMulitcast(InetAddress add, byte ip) {
104:                standardSecurity();
105:            }
106:
107:            public void checkPackageAccess(String pkg) {
108:            }
109:
110:            public void checkPackageDefinition(String pkg) {
111:            }
112:
113:            public void checkPermission(java.security.Permission perm,
114:                    Object context) {
115:            }
116:
117:            /**
118:             * Allow ObjectOutputStream.enableReplceObject() to be set to true.
119:             */
120:            public void checkPermission(java.security.Permission perm) {
121:            }
122:
123:            public void checkPrintJobAccess() {
124:            }
125:
126:            public void checkPropertiesAccess() {
127:            }
128:
129:            public void checkPropertyAccess(String prop) {
130:            }
131:
132:            public void checkRead(FileDescriptor fd) {
133:            }
134:
135:            public void checkRead(String file) {
136:            }
137:
138:            public void checkRead(String file, Object obj) {
139:            }
140:
141:            public void checkSecurityAccess(String action) {
142:            }
143:
144:            public void checkSetFactory() {
145:            }
146:
147:            public void checkSystemClipboardAccess() {
148:            }
149:
150:            public boolean checkTopLevelWindow(Object window) {
151:                // in case of LocalDatabase this would also prevent the client
152:                // from havin a GUI
153:                // throw new SecurityException();
154:                return true;
155:            }
156:
157:            public void checkWrite(FileDescriptor fd) {
158:            }
159:
160:            public void checkWrite(String file) {
161:            }
162:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.