1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package de.bea.domingo.groupware;
24
25 import java.util.Calendar;
26 import java.util.Iterator;
27 import java.util.List;
28
29 /***
30 * Interface to the calendar functionality of a Notes mail database.
31 *
32 * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
33 */
34 public interface CalendarInterface {
35
36 /***
37 * Saves a new calendar entry.
38 *
39 * @param entry the calendar entry to save
40 */
41 void save(final CalendarEntry entry);
42
43 /***
44 * Returns calendar objects within the specified time frame.
45 *
46 * @param from start date
47 * @param to end date
48 * @return list of calendar entries
49 */
50 List getObjects(Calendar from, Calendar to);
51
52 /***
53 * Returns an iterator over all entries in the Calendar.
54 *
55 * @return iterator over all entries in the Calendar.
56 */
57 Iterator getCalendar();
58
59 /***
60 * Returns an iterator over all entries in the Calendar.
61 *
62 * <p>Depending on how the Calendar is sorted (ascending or descending by
63 * date), choose where to start reading entries.</p>
64 *
65 * @param reverseOrder <code>true</code> if iterator should iterate in
66 * reverse order
67 * @return iterator over all entries in the Calendar.
68 */
69 Iterator getCalendar(final boolean reverseOrder);
70
71 /***
72 * Given a CalendarEntryDigest, retrieve the corresponding CalendarEntry.
73 * @param ced the calendar entry digest
74 * @return CalendarEntry
75 */
76 Object getCalendarEntry(final CalendarEntryDigest ced);
77
78 /***
79 * Returns a calendar entry for a given unid.
80 * @see de.bea.domingo.groupware.CalendarEntry#getAppointmentUnid()
81 *
82 * @param unid the Notes document unid
83 * @return the calendar entry
84 * @throws GroupwareException if the calendar entry cannot be
85 * found or mapped.
86 */
87 Object getCalendarEntry(final String unid) throws GroupwareException;
88
89 /***
90 * Deletes an existing calendar entry.
91 *
92 * @param entry an entry to delete
93 */
94 void remove(final CalendarEntry entry);
95
96 /***
97 * Deletes an existing calendar entry.
98 *
99 * @param digest a calendar entry digest to delete
100 */
101 void remove(final CalendarEntryDigest digest);
102
103
104 }