View Javadoc

1   /*
2    * This file is part of Domingo
3    * an Open Source Java-API to Lotus Notes/Domino
4    * hosted at http://domingo.sourceforge.net
5    *
6    * Copyright (c) 2003-2007 Beck et al. projects GmbH Munich, Germany (http://www.bea.de)
7    *
8    * This library is free software; you can redistribute it and/or
9    * modify it under the terms of the GNU Lesser General Public
10   * License as published by the Free Software Foundation; either
11   * version 2.1 of the License, or (at your option) any later version.
12   *
13   * This library is distributed in the hope that it will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16   * Lesser General Public License for more details.
17   *
18   * You should have received a copy of the GNU Lesser General Public
19   * License along with this library; if not, write to the Free Software
20   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21   */
22  
23  package de.bea.domingo.groupware;
24  
25  import java.util.ArrayList;
26  import java.util.Calendar;
27  import java.util.List;
28  
29  import de.bea.domingo.groupware.CalendarEntry.Type;
30  import de.bea.domingo.map.BaseDigest;
31  import de.bea.domingo.util.DateUtil;
32  
33  /***
34   * Represents a digest of a Notes mail document.
35   *
36   * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
37   * @author Thanx to <a href=mailto:d-rizzle at users.sourceforge.net>Dave Rowe</a> for some patches
38   */
39  public final class CalendarEntryDigest extends BaseDigest {
40  
41      private Type fEntryType;
42  
43      private Calendar fStartDateTime;
44  
45      private Calendar fEndDateTime;
46  
47      private String fSubject;
48  
49      private String fLocation;
50  
51      /*** Meeting Chairs (List of Strings). */
52      private List fChairs = new ArrayList();
53  
54  
55      /***
56       * @return Returns the subject.
57       */
58      public String getSubject() {
59          return fSubject;
60      }
61  
62      /***
63       * @param text The subject to set.
64       */
65      public void setSubject(final String text) {
66          this.fSubject = text;
67      }
68  
69      /***
70       * @return the fChair
71       */
72      public List getChairs() {
73          return fChairs;
74      }
75  
76      /***
77       * @param chairs the fChair to set
78       */
79      public void setChairs(final List chairs) {
80          fChairs = chairs;
81      }
82  
83      /***
84       * @return the fEndDateTime
85       */
86      public Calendar getEndDateTime() {
87          return fEndDateTime;
88      }
89  
90      /***
91       * @param endDateTime the fEndDateTime to set
92       */
93      public void setEndDateTime(final Calendar endDateTime) {
94          fEndDateTime = endDateTime;
95      }
96  
97      /***
98       * @return the fLocation
99       */
100     public String getLocation() {
101         return fLocation;
102     }
103 
104     /***
105      * @param location the fLocation to set
106      */
107     public void setLocation(final String location) {
108         fLocation = location;
109     }
110 
111     /***
112      * @return the fStartDateTime
113      */
114     public Calendar getStartDateTime() {
115         return fStartDateTime;
116     }
117 
118     /***
119      * @param startDateTime the fStartDateTime to set
120      */
121     public void setStartDateTime(final Calendar startDateTime) {
122         fStartDateTime = startDateTime;
123     }
124 
125     /***
126      * @return type of entry
127      */
128     public Type getType() {
129         return fEntryType;
130     }
131 
132     /***
133      * @param type type of entry
134      */
135     public void setType(final Type type) {
136         fEntryType = type;
137     }
138 
139     /***
140      * @return  a string representation of the object.
141      * @see java.lang.Object#toString()
142      */
143     public String toString() {
144         return fChairs + " " + fSubject + " " + fLocation + " Start: " + DateUtil.getDateTimeString(fStartDateTime);
145     }
146 }