Source Code Cross Referenced for Role.java in  » Wiki-Engine » JAMWiki » org » jamwiki » model » 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 » Wiki Engine » JAMWiki » org.jamwiki.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.
003:         *
004:         * This program is free software; you can redistribute it and/or modify
005:         * it under the terms of the latest version of the GNU Lesser General
006:         * Public License as published by the Free Software Foundation;
007:         *
008:         * This program is distributed in the hope that it will be useful,
009:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
010:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
011:         * GNU Lesser General Public License for more details.
012:         *
013:         * You should have received a copy of the GNU Lesser General Public License
014:         * along with this program (LICENSE.txt); if not, write to the Free Software
015:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
016:         */package org.jamwiki.model;
017:
018:        import org.acegisecurity.GrantedAuthorityImpl;
019:        import org.jamwiki.utils.WikiLogger;
020:
021:        /**
022:         * Provides an object representing a Wiki role and implementing the Acegi
023:         * <code>GrantedAuthority</code> interface.
024:         */
025:        public class Role extends GrantedAuthorityImpl {
026:
027:            private static final WikiLogger logger = WikiLogger
028:                    .getLogger(Role.class.getName());
029:            private String description = null;
030:
031:            /**
032:             * ROLE_ADMIN gives permission to perform wiki maintenance tasks not
033:             * available to normal users.  It does not allow the ability to change
034:             * system settings.
035:             */
036:            public static final Role ROLE_ADMIN = new Role("ROLE_ADMIN");
037:            /**
038:             * ROLE_ANONYMOUS is not stored in the database but is instead
039:             * automatically assigned to all non-logged in users.
040:             */
041:            public static final Role ROLE_ANONYMOUS = new Role("ROLE_ANONYMOUS");
042:            public static final Role ROLE_EDIT_EXISTING = new Role(
043:                    "ROLE_EDIT_EXISTING");
044:            public static final Role ROLE_EDIT_NEW = new Role("ROLE_EDIT_NEW");
045:            /**
046:             * ROLE_EMBEDDED is meant for use with installations that perform
047:             * authentication and user management in an external system, such as LDAP.
048:             * This role is not created during JAMWiki setup, and is not available
049:             * from the Special:Roles interface; instead it should be assigned by the
050:             * LDAP or other system that performs user authentication.
051:             */
052:            public static final Role ROLE_EMBEDDED = new Role("ROLE_EMBEDDED");
053:            public static final Role ROLE_MOVE = new Role("ROLE_MOVE");
054:            /**
055:             * ROLE_NO_ACCOUNT is meant for use with installations that do not allow
056:             * user account management from within JAMWiki.  This role is not created
057:             * during JAMWiki setup, and is not available from the Special:Roles
058:             * interface; instead it should be assigned by the LDAP or other system
059:             * that allows account management.
060:             */
061:            public static final Role ROLE_NO_ACCOUNT = new Role(
062:                    "ROLE_NO_ACCOUNT");
063:            /** ROLE_SYSADMIN provides the ability to change system settings. */
064:            public static final Role ROLE_SYSADMIN = new Role("ROLE_SYSADMIN");
065:            public static final Role ROLE_TRANSLATE = new Role("ROLE_TRANSLATE");
066:            public static final Role ROLE_UPLOAD = new Role("ROLE_UPLOAD");
067:            /**
068:             * ROLE_USER is not stored in the database but is instead automatically
069:             * assigned to all logged in users.
070:             */
071:            public static final Role ROLE_USER = new Role("ROLE_USER");
072:            public static final Role ROLE_VIEW = new Role("ROLE_VIEW");
073:
074:            /**
075:             *
076:             */
077:            public Role(String role) {
078:                super ((role == null) ? null : role.toUpperCase());
079:            }
080:
081:            /**
082:             *
083:             */
084:            public String getDescription() {
085:                return this .description;
086:            }
087:
088:            /**
089:             *
090:             */
091:            public void setDescription(String description) {
092:                this .description = description;
093:            }
094:
095:            /**
096:             * Two roles are equal if the role names are the same.
097:             */
098:            public boolean equals(Role role) {
099:                if (this .getAuthority() == null && role != null
100:                        && role.getAuthority() == null) {
101:                    return true;
102:                }
103:                return (this.getAuthority() != null && role != null && this
104:                        .getAuthority().equals(role.getAuthority()));
105:            }
106:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.