Source Code Cross Referenced for Group.java in  » Forum » nemesis-forum » org » nemesis » forum » 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 » Forum » nemesis forum » org.nemesis.forum 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * NEMESIS-FORUM.
003:         * Copyright (C) 2002  David Laurent(lithium2@free.fr). All rights reserved.
004:         * 
005:         * Copyright (c) 2000 The Apache Software Foundation. All rights reserved.
006:         * 
007:         * Copyright (C) 2001 Yasna.com. All rights reserved.
008:         * 
009:         * Copyright (C) 2000 CoolServlets.com. All rights reserved.
010:         * 
011:         * NEMESIS-FORUM. is free software; you can redistribute it and/or
012:         * modify it under the terms of the Apache Software License, Version 1.1,
013:         * or (at your option) any later version.
014:         * 
015:         * NEMESIS-FORUM core framework, NEMESIS-FORUM backoffice, NEMESIS-FORUM frontoffice
016:         * application are parts of NEMESIS-FORUM and are distributed under
017:         * same terms of licence.
018:         * 
019:         * 
020:         * NEMESIS-FORUM includes software developed by the Apache Software Foundation (http://www.apache.org/)
021:         * and software developed by CoolServlets.com (http://www.coolservlets.com).
022:         * and software developed by Yasna.com (http://www.yasna.com).
023:         * 
024:         */
025:
026:        package org.nemesis.forum;
027:
028:        import java.util.Iterator;
029:
030:        import org.nemesis.forum.exception.UnauthorizedException;
031:
032:        /**
033:         * Organizes Users into a group for easier permissions management at the
034:         * Forum level. In this way, Groups essentially serve the same purpose that
035:         * they do in Unix or Windows.<p>
036:         *
037:         * For example, CREATE_THREAD permissions can be set per forum. A forum
038:         * administrator may wish to create a "Thread Posters" group that has
039:         * CREATE_THREAD permissions in the forum. Then, users can be added to that
040:         * group and will automatically receive CREATE_THREAD permissions in that forum.
041:         * <p>
042:         *
043:         * Security for Group objects is provide by GroupProxy protection proxy objects.
044:         *
045:         * @see User
046:         */
047:        public interface Group {
048:
049:            /**
050:             * Returns the id of the group.
051:             *
052:             * @return the id of the group.
053:             */
054:            public int getID();
055:
056:            /**
057:             * Returns the name of the group. For example, 'XYZ Admins'.
058:             *
059:             * @return the name of the group.
060:             */
061:            public String getName();
062:
063:            /**
064:             * Sets the name of the group. For example, 'XYZ Admins'.<p>
065:             *
066:             * This method is restricted to those with group administration permission.
067:             *
068:             * @param name the name for the group.
069:             * @throws UnauthorizedException if does not have group admin permissions.
070:             */
071:            public void setName(String name) throws UnauthorizedException;
072:
073:            /**
074:             * Returns the description of the group. The description often summarizes
075:             * a group's function, such as 'Administrators of the XYZ forum'.
076:             *
077:             * @return the description of the group.
078:             */
079:            public String getDescription();
080:
081:            /**
082:             * Sets the description of the group.
083:             *
084:             * The description often summarizes a group's function, such as
085:             * 'Administrators of the XYZ forum'.<p>
086:             *
087:             * This method is restricted to those with group administration permission.
088:             *
089:             * @param name the description of the group.
090:             * @throws UnauthorizedException if does not have group admin permissions.
091:             */
092:            public void setDescription(String description)
093:                    throws UnauthorizedException;
094:
095:            /**
096:             * Grants administrator privileges of the group to a user.<p>
097:             *
098:             * This method is restricted to those with group administration permission.
099:             *
100:             * @param user the User to grant adminstrative privileges to.
101:             * @throws UnauthorizedException if does not have group admin permissions.
102:             */
103:            public void addAdministrator(User user)
104:                    throws UnauthorizedException;
105:
106:            /**
107:             * Revokes administrator privileges of the group to a user.<p>
108:             *
109:             * This method is restricted to those with group administration permission.
110:             *
111:             * @param user the User to grant adminstrative privileges to.
112:             * @throws UnauthorizedException if does not have group admin permissions.
113:             */
114:            public void removeAdministrator(User user)
115:                    throws UnauthorizedException;
116:
117:            /**
118:             * Adds a member to the group.<p>
119:             *
120:             * This method is restricted to those with group administration permission.
121:             *
122:             * @param user the User to add to the group.
123:             * @throws UnauthorizedException if does not have group admin permissions.
124:             */
125:            public void addMember(User user) throws UnauthorizedException;
126:
127:            /**
128:             * Removes a member from the group. If the User is not in the group, this
129:             * method does nothing.<p>
130:             *
131:             * This method is restricted to those with group administration permission.
132:             *
133:             * @param user the User to remove from the group.
134:             * @throws UnauthorizedException if does not have group admin permissions.
135:             */
136:            public void removeMember(User user) throws UnauthorizedException;
137:
138:            /**
139:             * Returns true if the User has group administrator permissions. Group
140:             * administrators are also considered to be members.
141:             *
142:             * @return true if the User is an administrator of the group.
143:             */
144:            public boolean isAdministrator(User user);
145:
146:            /**
147:             * Returns true if if the User is a member of the group.
148:             *
149:             * @return true if the User is a member of the group.
150:             */
151:            public boolean isMember(User user);
152:
153:            /**
154:             * Returns the number of group administrators.
155:             *
156:             * @return the number of group administrators.
157:             */
158:            public int getAdministratorCount();
159:
160:            /**
161:             * Returns the number of group members.
162:             *
163:             * @return the number of group members.
164:             */
165:            public int getMemberCount();
166:
167:            /**
168:             * An iterator for all the users that are members of the group.
169:             *
170:             * @return an Iterator for all members of the group.
171:             */
172:            public Iterator members();
173:
174:            /**
175:             * An iterator for all the users that are administrators of the group.
176:             *
177:             * @return an Iterator for all administrators of the group.
178:             */
179:            public Iterator administrators();
180:
181:            /**
182:             * Returns the permissions for the group that correspond to the
183:             * passed-in Authorization.
184:             *
185:             * @param authorization the auth token to lookup permissions for.
186:             */
187:            public abstract ForumPermissions getPermissions(
188:                    Authorization authorization);
189:
190:            /**
191:             * Returns true if the handle on the object has the permission specified.
192:             * A list of possible permissions can be found in the ForumPermissions
193:             * class. Certain methods of this class are restricted to certain
194:             * permissions as specified in the method comments.
195:             *
196:             * @param type a permission type.
197:             * @return true if the specified permission is valid.
198:             * @see ForumPermissions
199:             */
200:            public boolean hasPermission(int type);
201:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.