Source Code Cross Referenced for NoAuthorization.java in  » Database-ORM » MMBase » org » mmbase » security » 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 ORM » MMBase » org.mmbase.security 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:        This software is OSI Certified Open Source Software.
004:        OSI Certified is a certification mark of the Open Source Initiative.
005:
006:        The license (Mozilla version 1.0) can be read at the MMBase site.
007:        See http://www.MMBase.org/license
008:
009:         */
010:        package org.mmbase.security;
011:
012:        import java.util.*;
013:
014:        /**
015:         * This class is used when no authorization is configured. Everything is allowed.
016:         *
017:         * @author Eduard Witteveen
018:         * @version $Id: NoAuthorization.java,v 1.11 2005/01/30 16:46:34 nico Exp $
019:         */
020:        final public class NoAuthorization extends Authorization {
021:
022:            // This defined the 'context' used everywhere where one is needed.
023:            private static final String EVERYBODY = "everybody";
024:            private static final Set possibleContexts = Collections
025:                    .unmodifiableSet(new HashSet(Arrays.asList(new String[] {
026:                            EVERYBODY,
027:                            NoAuthentication.userContext.getOwnerField() })));
028:
029:            /**
030:             *	This method does nothing
031:             */
032:            protected void load() {
033:            }
034:
035:            /**
036:             *	This method does nothing
037:             */
038:            public void create(UserContext user, int nodeid) {
039:            }
040:
041:            /**
042:             *	This method does nothing
043:             */
044:            public void update(UserContext user, int nodeid) {
045:            }
046:
047:            /**
048:             * This method does nothing
049:             */
050:            public void remove(UserContext user, int nodeid) {
051:            }
052:
053:            /**
054:             * No authorization means that everyting is allowed
055:             * @return true
056:             */
057:            public boolean check(UserContext user, int nodeid,
058:                    Operation operation) {
059:                return true;
060:            }
061:
062:            /**
063:             * This method does nothing
064:             */
065:            public void verify(UserContext user, int nodeid, Operation operation)
066:                    throws org.mmbase.security.SecurityException {
067:            }
068:
069:            /**
070:             * No authorization means that everyting is allowed
071:             * @return true
072:             */
073:            public boolean check(UserContext user, int nodeid, int srcNodeid,
074:                    int dstNodeid, Operation operation) {
075:                return true;
076:            }
077:
078:            /**
079:             * This method does nothing
080:             */
081:            public void verify(UserContext user, int nodeid, int srcNodeid,
082:                    int dstNodeid, Operation operation)
083:                    throws SecurityException {
084:            }
085:
086:            /**
087:             * This method does nothing, except from giving a specified string back
088:             */
089:            public String getContext(UserContext user, int nodeid)
090:                    throws SecurityException {
091:                return EVERYBODY;
092:            }
093:
094:            /**
095:             * Since this is not authorization, we simply allow every change of context.
096:             */
097:            public void setContext(UserContext user, int nodeid, String context)
098:                    throws SecurityException {
099:                //if(!EVERYBODY.equals(context)) throw new SecurityException("unknown context");
100:            }
101:
102:            /**
103:             * This method does nothing, except from returning a dummy value
104:             */
105:            public Set getPossibleContexts(UserContext user, int nodeid)
106:                    throws SecurityException {
107:                return possibleContexts;
108:            }
109:
110:            public QueryCheck check(UserContext user,
111:                    org.mmbase.bridge.Query query, Operation operation) {
112:                return COMPLETE_CHECK;
113:            }
114:
115:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.