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


001:        /**********************************************************************************
002:         * $URL: https://source.sakaiproject.org/svn/content/tags/sakai_2-4-1/content-api/api/src/java/org/sakaiproject/content/api/GroupAwareEntity.java $
003:         * $Id: GroupAwareEntity.java 13360 2006-08-03 21:35:13Z jimeng@umich.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.content.api;
021:
022:        import java.util.Collection;
023:
024:        import org.sakaiproject.entity.api.Entity;
025:        import org.sakaiproject.time.api.Time;
026:
027:        /**
028:         * <p>
029:         * GroupAwareEntity is an interface that must be implemented for entity types that are to be group aware.
030:         * </p>
031:         */
032:        public interface GroupAwareEntity extends Entity {
033:            /**
034:             * Access the groups defined for this entity.
035:             * 
036:             * @return A Collection of references to Group objects defined for this entity; empty if none are defined.
037:             */
038:            public Collection getGroups();
039:
040:            /**
041:             * Access the groups, as Group objects, defined for this entity.
042:             * 
043:             * @return A Collection (Group) of group objects defined for this entity; empty if none are defined.
044:             */
045:            public Collection getGroupObjects();
046:
047:            /**
048:             * Access the access mode defined locally for the entity.
049:             * 
050:             * @return The access mode for the entity.
051:             */
052:            public AccessMode getAccess();
053:
054:            /**
055:             * Access the groups inherited by this entity.
056:             * 
057:             * @return A Collection of Group objects defined locally for this entity; empty if none are defined.
058:             */
059:            public Collection getInheritedGroups();
060:
061:            /**
062:             * Access the groups, as Group objects, inherited by this entity.
063:             * 
064:             * @return A Collection (Group) of group objects defined for this entity; empty if none are defined.
065:             */
066:            public Collection getInheritedGroupObjects();
067:
068:            /**
069:             * Access the actual access mode used to compute who has access to the entity
070:             * (usually SITE or GROUPED, but not INHERITED).  This may be defined locally 
071:             * or inherited from elsewhere for the entity.  If the local access mode is 
072:             * INHERITED, the actual access mode must be retrieved from elsewhere. 
073:             * 
074:             * @return The actual access mode for the entity.
075:             */
076:            public AccessMode getInheritedAccess();
077:
078:            /**
079:             * Access the release date before which this entity should not be available to users 
080:             * except those with adequate permission (what defines "adequate permission" is TBD).
081:             * @return The date/time at which the entity may be accessed by all users.
082:             */
083:            public Time getReleaseDate();
084:
085:            /**
086:             * Access the retract date after which this entity should not be available to users 
087:             * except those with adequate permission (what defines "adequate permission" is TBD).
088:             * @return The date/time at which access to the entity should be restricted.
089:             */
090:            public Time getRetractDate();
091:
092:            /** 
093:             * Access the raw availability setting for this entity: is it set to "hide" or "show".
094:             * Does not take into account the release or retract dates.
095:             * @return
096:             */
097:            public boolean isHidden();
098:
099:            /**
100:             * Calculate the avilability based on whether the item is hidden and (if not) whether
101:             * it has a releaseDate or retractDate and (if so) neither of them restrict availabity
102:             * right now.
103:             * @return true if the entity is available now, false otherwise.
104:             */
105:            public boolean isAvailable();
106:
107:            /**
108:             * <p>
109:             * AccessMode enumerates different access modes for the entity: site-wide or grouped.
110:             * </p>
111:             */
112:            public class AccessMode {
113:                protected final String m_id;
114:
115:                private AccessMode(String id) {
116:                    m_id = id;
117:                }
118:
119:                public String toString() {
120:                    return m_id;
121:                }
122:
123:                public boolean equals(Object obj) {
124:                    boolean rv = false;
125:
126:                    if (obj instanceof  AccessMode) {
127:                        rv = ((AccessMode) obj).toString().equals(
128:                                this .toString());
129:                    }
130:
131:                    return rv;
132:                }
133:
134:                static public AccessMode fromString(String access) {
135:                    if (SITE.m_id.equals(access))
136:                        return SITE;
137:                    if (GROUPED.m_id.equals(access))
138:                        return GROUPED;
139:                    if (INHERITED.m_id.equals(access))
140:                        return INHERITED;
141:                    //if (PUBLIC.m_id.equals(access)) return PUBLIC;
142:                    return null;
143:                }
144:
145:                /** public access to the entity */
146:                //public static final AccessMode PUBLIC = new AccessMode("public");
147:                /** channel (site) level access to the entity */
148:                public static final AccessMode SITE = new AccessMode("site");
149:
150:                /** grouped access; only members of the getGroup() groups (authorization groups) have access */
151:                public static final AccessMode GROUPED = new AccessMode(
152:                        "grouped");
153:
154:                /** inherited access; must look up a hierarchy to determine actual access */
155:                public static final AccessMode INHERITED = new AccessMode(
156:                        "inherited");
157:
158:            }
159:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.