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.Iterator;
26
27 /***
28 * Interface to the mail functionality of a Notes mail database.
29 *
30 * @author <a href=mailto:kriede@users.sourceforge.net>Kurt Riede</a>
31 */
32 public interface Mailbox {
33
34 /***
35 * Returns the name of the owner of a mailbox.
36 *
37 * @return name of owner
38 */
39 String getOwner();
40
41 /***
42 * Returns an iterator over all mails in the Inbox.
43 *
44 * @return iterator over all mails in the Inbox
45 */
46 Iterator getInbox();
47
48 /***
49 * Returns an iterator over all mails in the Inbox.
50 *
51 * <p>Depending on how the inbox is sorted (ascending or descending by
52 * date), choose where to start reading mails.</p>
53 *
54 * @param reverseOrder whether to start at the beginning or at the end
55 * @return iterator over all mails in the Inbox
56 */
57 Iterator getInbox(final boolean reverseOrder);
58
59
60 /***
61 * Creates a new Memo.
62 *
63 * @return the new Memo instance
64 */
65 Email newEmail();
66
67 /***
68 * Sends a memo.
69 *
70 * @param memo the memo to send
71 */
72 void saveAsDraft(final Email memo);
73
74 /***
75 * Sends a memo.
76 *
77 * @param memo the memo to send
78 */
79 void send(final Email memo);
80
81 /***
82 * Creates a new memo as a forward of an existing memo.
83 *
84 * @param memo the memo to forward
85 * @return forward memo
86 */
87 Email forward(final Email memo);
88
89 /***
90 * Creates a new memo as a forward to an existing memo.
91 *
92 * @param memo an existing memo
93 * @param withAttachments forward with or without attachments
94 * @return the reply memo
95 */
96 Email forward(final Email memo, final boolean withAttachments);
97
98 /***
99 * Creates a new memo as a reply to the sender of the original memo.
100 *
101 * @param memo the memo to forward
102 * @param withHistory if the original mail should be included
103 * @param withAttachments if attachments should be included
104 * @return reply memo
105 */
106 Email reply(final Email memo, final boolean withHistory, final boolean withAttachments);
107
108 /***
109 * Creates a new memo as a reply to all original recipients of the original memo.
110 *
111 * @param memo the memo to forward
112 * @param withHistory if the original mail should be included
113 * @param withAttachments if attachments should be included
114 * @return reply memo
115 */
116 Email replyToAll(final Email memo, final boolean withHistory, final boolean withAttachments);
117
118 /***
119 * Deletes an existing memo.
120 *
121 * @param memo a memo to delete
122 */
123 void remove(final Email memo);
124
125 /***
126 * Deletes an existing memo.
127 *
128 * @param memo a memo digest to delete
129 */
130 void remove(final EmailDigest memo);
131
132 /***
133 * Returns the email represented by the given email-digest.
134 *
135 * @param emailDigest an email-digest
136 * @return the corresponding email
137 */
138 Email getEmail(EmailDigest emailDigest);
139 }