Source Code Cross Referenced for PermissionsMask.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » api » app » messageforums » 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 » ERP CRM Financial » sakai » org.sakaiproject.api.app.messageforums 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:         * $URL: https://source.sakaiproject.org/svn/msgcntr/trunk/messageforums-api/src/java/org/sakaiproject/api/app/messageforums/PermissionsMask.java $
003:         * $Id: PermissionsMask.java 9227 2006-05-15 15:02:42Z cwen@iupui.edu $
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
007:         * 
008:         * Licensed under the Educational Community License, Version 1.0 (the "License"); 
009:         * you may not use this file except in compliance with the License. 
010:         * You may obtain a copy of the License at
011:         * 
012:         *      http://www.opensource.org/licenses/ecl1.php
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:         **********************************************************************************/package org.sakaiproject.api.app.messageforums;
021:
022:        import java.util.Collection;
023:        import java.util.HashMap;
024:        import java.util.Iterator;
025:        import java.util.Map;
026:        import java.util.Set;
027:
028:        import org.apache.commons.logging.Log;
029:        import org.apache.commons.logging.LogFactory;
030:
031:        /**
032:         * This class is critical for the interaction with AuthorizationManager.
033:         * This class will be used for creating Authorizations and querying 
034:         * Authorizations. The implementation of this class is not thread safe.
035:         * 
036:         * @author <a href="mailto:lance@indiana.edu">Lance Speelmon</a>
037:         * @version $Id: PermissionsMask.java 632 2005-07-14 21:22:50 +0000 (Thu, 14 Jul 2005) janderse@umich.edu $
038:         */
039:        public class PermissionsMask implements  Map {
040:            private static final Log LOG = LogFactory
041:                    .getLog(PermissionsMask.class);
042:
043:            private Map map;
044:
045:            /**
046:             * @see HashMap#HashMap()
047:             */
048:            public PermissionsMask() {
049:                map = new HashMap();
050:            }
051:
052:            /**
053:             * @see HashMap#HashMap(int)
054:             */
055:            public PermissionsMask(int initialCapacity) {
056:                map = new HashMap(initialCapacity);
057:            }
058:
059:            /**
060:             * @see HashMap#HashMap(int, float)
061:             */
062:            public PermissionsMask(int initialCapacity, float loadFactor) {
063:                map = new HashMap(initialCapacity, loadFactor);
064:            }
065:
066:            /**
067:             * @see java.util.Map#clear()
068:             */
069:            public void clear() {
070:                map.clear();
071:            }
072:
073:            /**
074:             * @see java.util.Map#containsKey(java.lang.Object)
075:             */
076:            public boolean containsKey(Object key) {
077:                return map.containsKey(key);
078:            }
079:
080:            /**
081:             * @see java.util.Map#containsValue(java.lang.Object)
082:             */
083:            public boolean containsValue(Object value) {
084:                return map.containsValue(value);
085:            }
086:
087:            /**
088:             * @see java.util.Map#entrySet()
089:             */
090:            public Set entrySet() {
091:                return map.entrySet();
092:            }
093:
094:            /**
095:             * @see java.util.Map#equals(java.lang.Object)
096:             */
097:            public boolean equals(Object o) {
098:                return map.equals(o);
099:            }
100:
101:            /**
102:             * @see java.util.Map#get(java.lang.Object)
103:             */
104:            public Object get(Object key) {
105:                return map.get(key);
106:            }
107:
108:            /**
109:             * @see java.util.Map#hashCode()
110:             */
111:            public int hashCode() {
112:                return map.hashCode();
113:            }
114:
115:            /**
116:             * @see java.util.Map#isEmpty()
117:             */
118:            public boolean isEmpty() {
119:                return map.isEmpty();
120:            }
121:
122:            /**
123:             * @see java.util.Map#keySet()
124:             */
125:            public Set keySet() {
126:                return map.keySet();
127:            }
128:
129:            /**
130:             * @param key Must be of type String.
131:             * @param value Must be of type Boolean or null.
132:             * @see java.util.Map#put(java.lang.Object, java.lang.Object)
133:             */
134:            public Object put(Object key, Object value) {
135:                if (LOG.isDebugEnabled()) {
136:                    LOG.debug("put(Object " + key + ", Object " + value + ")");
137:                }
138:                if (key == null || !(key instanceof  String))
139:                    throw new IllegalArgumentException(
140:                            "Illegal key argument passed!");
141:                if (value != null && !(value instanceof  Boolean))
142:                    throw new IllegalArgumentException(
143:                            "Illegal value argument passed!");
144:
145:                return map.put(key, value);
146:            }
147:
148:            /**
149:             * @throws IllegalArgumentException if the specified map is null or any of the
150:             * keys are not Strings.
151:             * @see java.util.Map#putAll(java.util.Map)
152:             */
153:            public void putAll(Map t) {
154:                if (LOG.isDebugEnabled()) {
155:                    LOG.debug("putAll(Map " + t + ")");
156:                }
157:                if (t == null)
158:                    throw new IllegalArgumentException(
159:                            "Illegal map argument passed!");
160:                for (Iterator iter = t.entrySet().iterator(); iter.hasNext();) {
161:                    Map.Entry entry = (Entry) iter.next();
162:                    if (!(entry.getKey() instanceof  String))
163:                        throw new IllegalArgumentException(
164:                                "Illegal key found in Map, must be a String!");
165:                    if (entry.getValue() != null
166:                            && !(entry.getValue() instanceof  Boolean))
167:                        throw new IllegalArgumentException(
168:                                "Illegal value found in Map; must be a Boolean or null!");
169:                }
170:
171:                map.putAll(t);
172:            }
173:
174:            /**
175:             * @see java.util.Map#remove(java.lang.Object)
176:             */
177:            public Object remove(Object key) {
178:                return map.remove(key);
179:            }
180:
181:            /**
182:             * @see java.util.Map#size()
183:             */
184:            public int size() {
185:                return map.size();
186:            }
187:
188:            /**
189:             * @see java.util.Map#values()
190:             */
191:            public Collection values() {
192:                return map.values();
193:            }
194:
195:            /**
196:             * @see java.lang.Object#toString()
197:             */
198:            public String toString() {
199:                return map.toString();
200:            }
201:
202:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.