Source Code Cross Referenced for JDORole.java in  » Database-ORM » Speedo_1.4.5 » org » objectweb » speedo » pobjects » cap » 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 » Speedo_1.4.5 » org.objectweb.speedo.pobjects.cap 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Created on 29 oct. 2004
003:         */
004:        package org.objectweb.speedo.pobjects.cap;
005:
006:        import java.util.Collection;
007:
008:        /**
009:         * @author mhoudu
010:         */
011:        public class JDORole {
012:
013:            /** the role identifier */
014:            private int id;
015:
016:            /** the role label */
017:            private String label;
018:
019:            /** the role scopes */
020:            private Collection scopes;
021:
022:            /** the role actions type JDORoleHasAction*/
023:            private Collection actions;
024:
025:            /**
026:             * Default constructor.
027:             * @param id The role identifier.
028:             * @param label The role label.
029:             * @param scopes The role scopes.
030:             * @param actions The role actions.
031:             */
032:            public JDORole(int id, String label, Collection scopes,
033:                    Collection actions) {
034:                this .id = id;
035:                this .label = label;
036:                this .scopes = scopes;
037:                this .actions = actions;
038:            }
039:
040:            /**
041:             * Adds an action to the role.
042:             * @param action The action to add.
043:             * @param isDisplayedInMenu The flag which indicates if the action has to be displayed in the menu or not.
044:             * @param displayOrder The isplay order.
045:             */
046:            public void addAction(JDOAction action, boolean isDisplayedInMenu,
047:                    int displayOrder) {
048:                JDORoleHasAction action4role = new JDORoleHasAction(this ,
049:                        action, isDisplayedInMenu, displayOrder);
050:                actions.add(action4role);
051:            }
052:
053:            /**
054:             * Tells if this role has the specified scope.
055:             * @param scope the scope to check.
056:             * @return <tt>true</tt> if this role has the specified scope,
057:             * <tt>false</tt> otherwise.
058:             */
059:            public boolean hasScope(JDOScope scope) {
060:                return scopes.contains(scope);
061:            }
062:
063:            /**
064:             * Tells if this role has the specified action.
065:             * @param action the action to check.
066:             * @return <tt>true</tt> if this role has the specified action,
067:             * <tt>false</tt> otherwise.
068:             */
069:            public boolean hasAction(JDOAction action) {
070:                return actions.contains(action);
071:            }
072:
073:            /**
074:             * Gets the id.
075:             * @return Returns the id.
076:             */
077:            public int getId() {
078:                return id;
079:            }
080:
081:            /**
082:             * Sets the id.
083:             * @param id The id to set.
084:             */
085:            public void setId(int id) {
086:                this .id = id;
087:            }
088:
089:            /**
090:             * Gets the label.
091:             * @return Returns the label.
092:             */
093:            public String getLabel() {
094:                return label;
095:            }
096:
097:            /**
098:             * Sets the label.
099:             * @param label The label to set.
100:             */
101:            public void setLabel(String label) {
102:                this .label = label;
103:            }
104:
105:            /**
106:             * Gets the scopes.
107:             * @return Returns the scopes.
108:             */
109:            public Collection getScopes() {
110:                return scopes;
111:            }
112:
113:            /**
114:             * Sets the scopes.
115:             * @param scopes The scope to set.
116:             */
117:            public void setScopes(Collection scopes) {
118:                this .scopes = scopes;
119:            }
120:
121:            /**
122:             * Gets the actions.
123:             * @return Returns the actions.
124:             */
125:            public Collection getActions() {
126:                return actions;
127:            }
128:
129:            /**
130:             * Sets the actions.
131:             * @param actions The actions to set.
132:             */
133:            public void setActions(Collection actions) {
134:                this.actions = actions;
135:            }
136:
137:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.