001: package org.claros.commons.mail.models;
002:
003: import java.io.Serializable;
004: import java.util.Date;
005:
006: import javax.mail.Address;
007:
008: /**
009: * @author Umut Gokbayrak
010: */
011: public class EmailHeader implements Serializable {
012: private static final long serialVersionUID = 846372960987843509L;
013: private Address[] bcc;
014: private Address[] from;
015: private Address[] to;
016: private Address[] cc;
017: private Address[] replyTo;
018: private String subject;
019: private Date date;
020: private long size;
021: private int messageId;
022: private boolean multipart;
023: private Boolean unread;
024: private Boolean requestReceiptNotification;
025: private String receiptNotificationEmail;
026: private short priority;
027: private short sensitivity;
028:
029: // human readable portions. These are shown on jsps.
030: private String sizeShown;
031: private String fromShown;
032: private String toShown;
033: private String ccShown;
034: private String dateShown;
035:
036: /**
037: * Default constructor
038: */
039: public EmailHeader() {
040: super ();
041: }
042:
043: /**
044: * @return Returns the bcc.
045: */
046: public Address[] getBcc() {
047: return bcc;
048: }
049:
050: /**
051: * @param bcc The bcc to set.
052: */
053: public void setBcc(Address[] bcc) {
054: this .bcc = bcc;
055: }
056:
057: /**
058: * @return Returns the cc.
059: */
060: public Address[] getCc() {
061: return cc;
062: }
063:
064: /**
065: * @param cc The cc to set.
066: */
067: public void setCc(Address[] cc) {
068: this .cc = cc;
069: }
070:
071: /**
072: * @return Returns the date.
073: */
074: public Date getDate() {
075: return date;
076: }
077:
078: /**
079: * @param date The date to set.
080: */
081: public void setDate(Date date) {
082: this .date = date;
083: }
084:
085: /**
086: * @return Returns the from.
087: */
088: public Address[] getFrom() {
089: return from;
090: }
091:
092: /**
093: * @param from The from to set.
094: */
095: public void setFrom(Address[] from) {
096: this .from = from;
097: }
098:
099: /**
100: * @return Returns the messageId.
101: */
102: public int getMessageId() {
103: return messageId;
104: }
105:
106: /**
107: * @param messageId The messageId to set.
108: */
109: public void setMessageId(int messageId) {
110: this .messageId = messageId;
111: }
112:
113: /**
114: * @return Returns the multipart.
115: */
116: public boolean isMultipart() {
117: return multipart;
118: }
119:
120: /**
121: * @param multipart The multipart to set.
122: */
123: public void setMultipart(boolean multipart) {
124: this .multipart = multipart;
125: }
126:
127: /**
128: * @return Returns the replyTo.
129: */
130: public Address[] getReplyTo() {
131: return replyTo;
132: }
133:
134: /**
135: * @param replyTo The replyTo to set.
136: */
137: public void setReplyTo(Address[] replyTo) {
138: this .replyTo = replyTo;
139: }
140:
141: /**
142: * @return Returns the size.
143: */
144: public long getSize() {
145: return size;
146: }
147:
148: /**
149: * @param size The size to set.
150: */
151: public void setSize(long size) {
152: this .size = size;
153: }
154:
155: /**
156: * @return Returns the subject.
157: */
158: public String getSubject() {
159: return subject;
160: }
161:
162: /**
163: * @param subject The subject to set.
164: */
165: public void setSubject(String subject) {
166: this .subject = subject;
167: }
168:
169: /**
170: * @return Returns the to.
171: */
172: public Address[] getTo() {
173: return to;
174: }
175:
176: /**
177: * @param to The to to set.
178: */
179: public void setTo(Address[] to) {
180: this .to = to;
181: }
182:
183: /**
184: * @return
185: */
186: public String getCcShown() {
187: return ccShown;
188: }
189:
190: /**
191: * @return
192: */
193: public String getDateShown() {
194: return dateShown;
195: }
196:
197: /**
198: * @return
199: */
200: public String getFromShown() {
201: return fromShown;
202: }
203:
204: /**
205: * @return
206: */
207: public String getSizeShown() {
208: return sizeShown;
209: }
210:
211: /**
212: * @return
213: */
214: public String getToShown() {
215: return toShown;
216: }
217:
218: /**
219: * @param string
220: */
221: public void setCcShown(String string) {
222: ccShown = string;
223: }
224:
225: /**
226: * @param string
227: */
228: public void setDateShown(String string) {
229: dateShown = string;
230: }
231:
232: /**
233: * @param string
234: */
235: public void setFromShown(String string) {
236: fromShown = string;
237: }
238:
239: /**
240: * @param string
241: */
242: public void setSizeShown(String string) {
243: sizeShown = string;
244: }
245:
246: /**
247: * @param string
248: */
249: public void setToShown(String string) {
250: toShown = string;
251: }
252:
253: /**
254: * @return
255: */
256: public Boolean getUnread() {
257: return unread;
258: }
259:
260: /**
261: * @param boolean1
262: */
263: public void setUnread(Boolean boolean1) {
264: unread = boolean1;
265: }
266:
267: /**
268: * @return
269: */
270: public Boolean getRequestReceiptNotification() {
271: return requestReceiptNotification;
272: }
273:
274: /**
275: * @param boolean1
276: */
277: public void setRequestReceiptNotification(
278: Boolean requestReceiptNotification) {
279: this .requestReceiptNotification = requestReceiptNotification;
280: }
281:
282: /**
283: * @return
284: */
285: public String getReceiptNotificationEmail() {
286: return receiptNotificationEmail;
287: }
288:
289: /**
290: * @param boolean1
291: */
292: public void setReceiptNotificationEmail(
293: String receiptNotificationEmail) {
294: this .receiptNotificationEmail = receiptNotificationEmail;
295: }
296:
297: /**
298: * @return
299: */
300: public short getPriority() {
301: return priority;
302: }
303:
304: /**
305: * @param boolean1
306: */
307: public void setPriority(short priority) {
308: this .priority = priority;
309: }
310:
311: /**
312: * @return
313: */
314: public short getSensitivity() {
315: return sensitivity;
316: }
317:
318: /**
319: * @param boolean1
320: */
321: public void setSensitivity(short sensitivity) {
322: this.sensitivity = sensitivity;
323: }
324: }
|