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


001:        /**********************************************************************************
002:         * $URL: https://source.sakaiproject.org/svn/calendar/tags/sakai_2-4-1/calendar-summary-tool/tool/src/java/org/sakaiproject/tool/summarycalendar/ui/EventSummary.java $
003:         * $Id: EventSummary.java 22167 2007-03-05 10:10:26Z nuno@ufp.pt $
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2006, 2007 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.tool.summarycalendar.ui;
021:
022:        import java.io.Serializable;
023:        import java.util.ArrayList;
024:        import java.util.Iterator;
025:        import java.util.List;
026:
027:        import org.sakaiproject.entity.api.Reference;
028:        import org.sakaiproject.entity.api.ResourceProperties;
029:        import org.sakaiproject.time.api.TimeRange;
030:
031:        public class EventSummary implements  Serializable {
032:            private static final long serialVersionUID = 4943854683550852507L;
033:
034:            private final int MAX_TEXT_SIZE = 30;
035:
036:            private String displayName = "";
037:            private String type = "";
038:            private String description = "";
039:            private String date = "";
040:            private String location = "";
041:            private String site = "";
042:            private String url = "";
043:            private String calendarRef = "";
044:            private String eventRef = "";
045:            private String groups = "";
046:            private boolean hasAttachments = false;
047:            private List attachments = new ArrayList();
048:            private List attachmentsWrp = new ArrayList();
049:
050:            public String getDisplayName() {
051:                return displayName;
052:            }
053:
054:            public String getTruncatedDisplayName() {
055:                return getTruncated(displayName);
056:            }
057:
058:            public void setDisplayName(String displayName) {
059:                this .displayName = displayName;
060:            }
061:
062:            public String getDate() {
063:                return date;
064:            }
065:
066:            public void setDate(TimeRange range) {
067:                StringBuffer tmp = new StringBuffer();
068:                tmp.append(range.firstTime().toStringLocalTime());
069:                tmp.append(" - ");
070:                tmp.append(range.lastTime().toStringLocalTime());
071:                this .date = tmp.toString();
072:            }
073:
074:            public String getDescription() {
075:                return description;
076:            }
077:
078:            public String getTruncatedDescription() {
079:                return getTruncated(description);
080:            }
081:
082:            public void setDescription(String description) {
083:                this .description = description;
084:            }
085:
086:            public boolean getHasLocation() {
087:                return !location.equals("");
088:            }
089:
090:            public String getLocation() {
091:                return location;
092:            }
093:
094:            public void setLocation(String location) {
095:                this .location = location;
096:            }
097:
098:            public String getSite() {
099:                return site;
100:            }
101:
102:            public String getTruncatedSite() {
103:                return getTruncated(site);
104:            }
105:
106:            public void setSite(String site) {
107:                this .site = site;
108:            }
109:
110:            public String getType() {
111:                return type;
112:            }
113:
114:            public void setType(String type) {
115:                this .type = type;
116:            }
117:
118:            public String getUrl() {
119:                return url;
120:            }
121:
122:            public void setUrl(String url) {
123:                this .url = url;
124:            }
125:
126:            public String getGroups() {
127:                return groups;
128:            }
129:
130:            public void setGroups(String groups) {
131:                this .groups = groups;
132:            }
133:
134:            public boolean getShowGroups() {
135:                return !groups.equals("");
136:            }
137:
138:            private String getTruncated(String str) {
139:                if (str.length() < MAX_TEXT_SIZE)
140:                    return str;
141:                return str.substring(0, MAX_TEXT_SIZE).concat("...");
142:            }
143:
144:            public String getCalendarRef() {
145:                return calendarRef;
146:            }
147:
148:            public void setCalendarRef(String calendarRef) {
149:                this .calendarRef = calendarRef;
150:            }
151:
152:            public String getEventRef() {
153:                return eventRef;
154:            }
155:
156:            public void setEventRef(String eventRef) {
157:                this .eventRef = eventRef;
158:            }
159:
160:            public List getAttachments() {
161:                return attachments;
162:            }
163:
164:            public void setAttachments(List attachments) {
165:                setHasAttachments(attachments.size() > 0);
166:                this .attachments = attachments;
167:                this .attachmentsWrp = new ArrayList();
168:                Iterator it = attachments.iterator();
169:                while (it.hasNext()) {
170:                    Reference ref = (Reference) it.next();
171:                    AttachmentWrapper aw = new AttachmentWrapper();
172:                    aw.setUrl(ref.getUrl());
173:                    aw.setDisplayName(ref.getProperties().getProperty(
174:                            ResourceProperties.PROP_DISPLAY_NAME));
175:                    attachmentsWrp.add(aw);
176:                }
177:            }
178:
179:            public boolean getHasAttachments() {
180:                return this .hasAttachments;
181:            }
182:
183:            public void setHasAttachments(boolean hasAttachments) {
184:                this .hasAttachments = hasAttachments;
185:            }
186:
187:            public List getAttachmentsWrapper() {
188:                return this.attachmentsWrp;
189:            }
190:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.