Source Code Cross Referenced for Event.java in  » Mail-Clients » columba-1.4 » org » columba » calendar » 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 » Mail Clients » columba 1.4 » org.columba.calendar.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // The contents of this file are subject to the Mozilla Public License Version
002:        // 1.1
003:        //(the "License"); you may not use this file except in compliance with the
004:        //License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
005:        //
006:        //Software distributed under the License is distributed on an "AS IS" basis,
007:        //WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
008:        //for the specific language governing rights and
009:        //limitations under the License.
010:        //
011:        //The Original Code is "The Columba Project"
012:        //
013:        //The Initial Developers of the Original Code are Frederik Dietz and Timo
014:        // Stich.
015:        //Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
016:        //
017:        //All Rights Reserved.
018:        package org.columba.calendar.model;
019:
020:        import java.net.URL;
021:        import java.util.Calendar;
022:        import java.util.Iterator;
023:
024:        import org.columba.calendar.base.UUIDGenerator;
025:        import org.columba.calendar.model.api.IEvent;
026:        import org.columba.calendar.model.api.IRecurrence;
027:
028:        public class Event extends Component implements  IEvent {
029:
030:            private Calendar dtStart;
031:
032:            private Calendar dtEnd;
033:
034:            private String transsp;
035:
036:            private String summary;
037:
038:            private String description;
039:
040:            private String location;
041:
042:            private String priority;
043:
044:            private String eventClass;
045:
046:            private String status;
047:
048:            private boolean allDayEvent;
049:
050:            private IRecurrence recurrence;
051:
052:            private URL url;
053:
054:            private CategoryList categoryList = new CategoryList();
055:
056:            public Event() {
057:                super (TYPE.EVENT);
058:
059:                dtStart = Calendar.getInstance();
060:                dtEnd = Calendar.getInstance();
061:            }
062:
063:            public Event(String id) {
064:                super (id, TYPE.EVENT);
065:
066:                dtStart = Calendar.getInstance();
067:                dtEnd = Calendar.getInstance();
068:            }
069:
070:            public Event(Calendar dtStart, Calendar dtEnd, String summary) {
071:                super (TYPE.EVENT);
072:
073:                if (dtStart == null)
074:                    throw new IllegalArgumentException("dtStart == null");
075:
076:                if (dtEnd == null)
077:                    throw new IllegalArgumentException("dtEnd == null");
078:
079:                if (summary == null)
080:                    throw new IllegalArgumentException("summary == null");
081:
082:                this .dtStart = dtStart;
083:                this .dtEnd = dtEnd;
084:                this .summary = summary;
085:
086:            }
087:
088:            public Calendar getDtEnd() {
089:                return dtEnd;
090:            }
091:
092:            public String getLocation() {
093:                return location;
094:            }
095:
096:            public String getTranssp() {
097:                return transsp;
098:            }
099:
100:            public Calendar getDtStart() {
101:                return dtStart;
102:            }
103:
104:            public String getPriority() {
105:                return priority;
106:            }
107:
108:            public String getSummary() {
109:                return summary;
110:            }
111:
112:            public String getDescription() {
113:                return description;
114:            }
115:
116:            public URL getUrl() {
117:                return url;
118:            }
119:
120:            public String getEventClass() {
121:                return eventClass;
122:            }
123:
124:            public void addCategory(String category) {
125:                categoryList.addCategory(category);
126:            }
127:
128:            public void removeCategory(String category) {
129:                categoryList.removeCategory(category);
130:            }
131:
132:            public Iterator<String> getCategoryIterator() {
133:                return categoryList.getCategoryIterator();
134:            }
135:
136:            public String getCategories() {
137:                return categoryList.getCategories();
138:            }
139:
140:            public void setCategories(String categories) {
141:                categoryList.setCategories(categories);
142:            }
143:
144:            /**
145:             * @param description
146:             *            The description to set.
147:             */
148:            public void setDescription(String description) {
149:                this .description = description;
150:            }
151:
152:            /**
153:             * @param dtEnd
154:             *            The dtEnd to set.
155:             */
156:            public void setDtEnd(Calendar dtEnd) {
157:                this .dtEnd = dtEnd;
158:            }
159:
160:            /**
161:             * @param dtStart
162:             *            The dtStart to set.
163:             */
164:            public void setDtStart(Calendar dtStart) {
165:                this .dtStart = dtStart;
166:            }
167:
168:            /**
169:             * @param eventClass
170:             *            The eventClass to set.
171:             */
172:            public void setEventClass(String eventClass) {
173:                this .eventClass = eventClass;
174:            }
175:
176:            /**
177:             * @param location
178:             *            The location to set.
179:             */
180:            public void setLocation(String location) {
181:                this .location = location;
182:            }
183:
184:            /**
185:             * @param priority
186:             *            The priority to set.
187:             */
188:            public void setPriority(String priority) {
189:                this .priority = priority;
190:            }
191:
192:            /**
193:             * @param summary
194:             *            The summary to set.
195:             */
196:            public void setSummary(String summary) {
197:                this .summary = summary;
198:            }
199:
200:            /**
201:             * @param transsp
202:             *            The transsp to set.
203:             */
204:            public void setTranssp(String transsp) {
205:                this .transsp = transsp;
206:            }
207:
208:            /**
209:             * @param url
210:             *            The url to set.
211:             */
212:            public void setUrl(URL url) {
213:                this .url = url;
214:            }
215:
216:            /**
217:             * @see java.lang.Object#clone()
218:             */
219:            @Override
220:            protected Object clone() throws CloneNotSupportedException {
221:                // create new event with new UUID
222:                Event event = new Event(new UUIDGenerator().newUUID());
223:                // copy all attributes
224:
225:                event.setDtStart(getDtStart());
226:                event.setDtEnd(getDtEnd());
227:                event.setDtStamp(getDtStamp());
228:                event.setSummary(getSummary());
229:                event.setLocation(getLocation());
230:                event.setCalendar(getCalendar());
231:
232:                event.setAllDayEvent(isAllDayEvent());
233:
234:                event.setRecurrence(getRecurrence());
235:
236:                return event;
237:            }
238:
239:            public boolean isAllDayEvent() {
240:                return allDayEvent;
241:            }
242:
243:            public void setAllDayEvent(boolean allDayEventFlag) {
244:                this .allDayEvent = allDayEventFlag;
245:            }
246:
247:            public IRecurrence getRecurrence() {
248:                return recurrence;
249:            }
250:
251:            public void setRecurrence(IRecurrence recurrence) {
252:                this .recurrence = recurrence;
253:            }
254:
255:            public String getStatus() {
256:                return status;
257:            }
258:
259:            public void setStatus(String status) {
260:                this.status = status;
261:            }
262:
263:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.