19 package org.sleuthkit.autopsy.thunderbirdparser;
21 import java.util.ArrayList;
22 import java.util.Date;
23 import java.util.List;
33 private String recipients =
"";
34 private String bcc =
"";
35 private String cc =
"";
36 private String sender =
"";
37 private String subject =
"";
38 private String textBody =
"";
39 private String htmlBody =
"";
40 private String rtfBody =
"";
41 private String localPath =
"";
42 private boolean hasAttachment =
false;
43 private long sentDate = 0L;
44 private List<Attachment> attachments =
new ArrayList<>();
45 private long id = -1L;
47 boolean hasAttachment() {
51 String getRecipients() {
55 void setRecipients(String recipients) {
56 if (recipients != null) {
57 this.recipients = recipients;
65 void setSender(String sender) {
75 void setSubject(String subject) {
76 if (subject != null) {
77 this.subject = subject;
81 String getTextBody() {
85 void setTextBody(String textBody) {
86 if (textBody != null) {
87 this.textBody = textBody;
91 String getHtmlBody() {
95 void setHtmlBody(String htmlBody) {
96 if (htmlBody != null) {
97 this.htmlBody = htmlBody;
101 String getRtfBody() {
105 void setRtfBody(String rtfBody) {
106 if (rtfBody != null) {
107 this.rtfBody = rtfBody;
115 void setSentDate(Date sentDate) {
116 if (sentDate != null) {
117 this.sentDate = sentDate.getTime() / 1000;
121 void setSentDate(
long sentDate) {
122 this.sentDate = sentDate;
129 void setBcc(String bcc) {
139 void setCc(String cc) {
145 void addAttachment(Attachment a) {
147 hasAttachment =
true;
150 List<Attachment> getAttachments() {
158 void setId(
long id) {
162 String getLocalPath() {
166 void setLocalPath(String localPath) {
167 if (localPath != null) {
168 this.localPath = localPath;
179 static class Attachment {
181 private String name =
"";
183 private String localPath =
"";
185 private long size = 0L;
187 private long crTime = 0L;
189 private long cTime = 0L;
191 private long aTime = 0L;
193 private long mTime = 0L;
199 void setName(String name) {
205 String getLocalPath() {
209 void setLocalPath(String localPath) {
210 if (localPath != null) {
211 this.localPath = localPath;
219 void setSize(
long size) {
227 void setCrTime(
long crTime) {
228 this.crTime = crTime;
231 void setCrTime(Date crTime) {
232 if (crTime != null) {
233 this.crTime = crTime.getTime() / 1000;
241 void setcTime(
long cTime) {
245 void setcTime(Date cTime) {
247 this.cTime = cTime.getTime() / 1000;
255 void setaTime(
long aTime) {
259 void setaTime(Date aTime) {
261 this.aTime = aTime.getTime() / 1000;
269 void setmTime(
long mTime) {
273 void setmTime(Date mTime) {
275 this.mTime = mTime.getTime() / 1000;