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


001:        /**********************************************************************************
002:         * $URL: https://source.sakaiproject.org/svn/message/tags/sakai_2-4-1/message-api/api/src/java/org/sakaiproject/message/api/MessageHeader.java $
003:         * $Id: MessageHeader.java 10272 2006-06-07 13:39:32Z ggolden@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.message.api;
021:
022:        import java.util.Collection;
023:        import java.util.Stack;
024:
025:        import org.sakaiproject.entity.api.AttachmentContainer;
026:        import org.sakaiproject.time.api.Time;
027:        import org.sakaiproject.user.api.User;
028:        import org.w3c.dom.Document;
029:        import org.w3c.dom.Element;
030:
031:        /**
032:         * <p>
033:         * MessageHeader is the base Interface for a Sakai Message headers. Header fields common to all message service message headers are defined here.
034:         * </p>
035:         */
036:        public interface MessageHeader extends AttachmentContainer {
037:            /**
038:             * <p>
039:             * MessageAccess enumerates different access modes for the message: channel-wide or grouped.
040:             * </p>
041:             */
042:            public class MessageAccess {
043:                private final String m_id;
044:
045:                private MessageAccess(String id) {
046:                    m_id = id;
047:                }
048:
049:                public String toString() {
050:                    return m_id;
051:                }
052:
053:                static public MessageAccess fromString(String access) {
054:                    // if (PUBLIC.m_id.equals(access)) return PUBLIC;
055:                    if (CHANNEL.m_id.equals(access))
056:                        return CHANNEL;
057:                    if (GROUPED.m_id.equals(access))
058:                        return GROUPED;
059:                    return null;
060:                }
061:
062:                /** public access to the message: pubview */
063:                // public static final MessageAccess PUBLIC = new MessageAccess("public");
064:                /** channel (site) level access to the message */
065:                public static final MessageAccess CHANNEL = new MessageAccess(
066:                        "channel");
067:
068:                /** grouped access; only members of the getGroup() groups (authorization groups) have access */
069:                public static final MessageAccess GROUPED = new MessageAccess(
070:                        "grouped");
071:            }
072:
073:            /**
074:             * Access the unique (within the channel) message id.
075:             * 
076:             * @return The unique (within the channel) message id.
077:             */
078:            String getId();
079:
080:            /**
081:             * Access the date/time the message was sent to the channel.
082:             * 
083:             * @return The date/time the message was sent to the channel.
084:             */
085:            Time getDate();
086:
087:            /**
088:             * Access the User who sent the message to the channel.
089:             * 
090:             * @return The User who sent the message to the channel.
091:             */
092:            User getFrom();
093:
094:            /**
095:             * Access the draft status of the message.
096:             * 
097:             * @return True if the message is a draft, false if not.
098:             */
099:            boolean getDraft();
100:
101:            /**
102:             * Access the groups defined for this message.
103:             * 
104:             * @return A Collection (String) of group refs (authorization group ids) defined for this message; empty if none are defined.
105:             */
106:            Collection getGroups();
107:
108:            /**
109:             * Access the groups, as Group objects, defined for this message.
110:             * 
111:             * @return A Collection (Group) of group objects defined for this message; empty if none are defined.
112:             */
113:            Collection getGroupObjects();
114:
115:            /**
116:             * Access the access mode for the message - how we compute who has access to the message.
117:             * 
118:             * @return The MessageAccess access mode for the message.
119:             */
120:            MessageAccess getAccess();
121:
122:            /**
123:             * Serialize the resource into XML, adding an element to the doc under the top of the stack element.
124:             * 
125:             * @param doc
126:             *        The DOM doc to contain the XML (or null for a string return).
127:             * @param stack
128:             *        The DOM elements, the top of which is the containing element of the new "resource" element.
129:             * @return The newly added element.
130:             */
131:            Element toXml(Document doc, Stack stack);
132:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.