BrightSide Workbench Full Report + Source Code
elephant/src/main/java/org/turro/plugin/calendar/DefaultCalendarEvent.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 package org.turro.plugin.calendar;
19 
20 import java.util.Collection;
21 import java.util.Date;
22 import org.turro.plugin.contacts.ContactList;
23 import org.turro.plugin.contacts.IContact;
24 
29 public class DefaultCalendarEvent implements ICalendarEvent {
30 
31  protected String eventId, path, address;
32  protected IContact organizer;
33  protected Collection<IContact> attandees = new ContactList();
34 
35  @Override
36  public String getPath() {
37  return path;
38  }
39 
40  @Override
41  public void setPath(String path) {
42  this.path = path;
43  }
44 
45  @Override
46  public String getEventId() {
47  return eventId;
48  }
49 
50  @Override
51  public void setEventId(String eventId) {
52  this.eventId = eventId;
53  }
54 
55  // Taken from SimpleCalendarEvent
56  private String _headerColor = "";
57  private String _contentColor = "";
58  private String _content = "";
59  private String _title = "";
60  private String motive = "";
61  private Date _beginDate;
62  private Date _endDate;
63  private boolean _locked;
64  private boolean _done;
65  private boolean _cancelled;
66 
67  @Override
68  public Date getBeginDate() {
69  return _beginDate;
70  }
71 
72  @Override
73  public void setBeginDate(Date beginDate) {
74  _beginDate = beginDate;
75  }
76 
77  @Override
78  public Date getEndDate() {
79  return _endDate;
80  }
81 
82  @Override
83  public void setEndDate(Date endDate) {
84  _endDate = endDate;
85  }
86 
87  @Override
88  public String getContent() {
89  return _content;
90  }
91 
92  @Override
93  public void setContent(String content) {
94  _content = content;
95  }
96 
97  @Override
98  public String getTitle() {
99  return _title;
100  }
101 
102  @Override
103  public void setTitle(String title) {
104  _title = title;
105  }
106 
107  @Override
108  public String getMotive() {
109  return motive;
110  }
111 
112  @Override
113  public void setMotive(String motive) {
114  this.motive = motive;
115  }
116 
117  @Override
118  public String getContentColor() {
119  return _contentColor;
120  }
121 
122  @Override
123  public void setContentColor(String ccolor) {
124  _contentColor = ccolor;
125  }
126 
127  @Override
128  public String getHeaderColor() {
129  return _headerColor;
130  }
131 
132  @Override
133  public void setHeaderColor(String hcolor) {
134  _headerColor = hcolor;
135  }
136 
137  @Override
138  public String getZclass() {
139  return "z-calevent";
140  }
141 
142  @Override
143  public boolean isLocked() {
144  return _locked;
145  }
146 
147  @Override
148  public void setLocked(boolean locked) {
149  _locked = locked;
150  }
151 
152  @Override
153  public boolean isDone() {
154  return _done;
155  }
156 
157  @Override
158  public void setDone(boolean _done) {
159  this._done = _done;
160  }
161 
162  @Override
163  public boolean isCancelled() {
164  return _cancelled;
165  }
166 
167  @Override
168  public void setCancelled(boolean cancelled) {
169  this._cancelled = cancelled;
170  }
171 
172  @Override
174  return organizer;
175  }
176 
177  @Override
178  public Collection<IContact> getAttendees() {
179  return attandees;
180  }
181 
182  @Override
183  public void setOrganizer(IContact contact) {
184  this.organizer = contact;
185  }
186 
187  @Override
188  public void addAttendee(IContact contact) {
189  attandees.add(contact);
190  }
191 
192  @Override
193  public String getAddress() {
194  return address;
195  }
196 
197  @Override
198  public void setAddress(String address) {
199  this.address = address;
200  }
201 
202 }