Autopsy  4.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
EmailMessage.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2013 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.thunderbirdparser;
20 
21 import java.util.ArrayList;
22 import java.util.Date;
23 import java.util.List;
24 
31 class EmailMessage {
32 
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;
46 
47  boolean hasAttachment() {
48  return hasAttachment;
49  }
50 
51  String getRecipients() {
52  return recipients;
53  }
54 
55  void setRecipients(String recipients) {
56  if (recipients != null) {
57  this.recipients = recipients;
58  }
59  }
60 
61  String getSender() {
62  return sender;
63  }
64 
65  void setSender(String sender) {
66  if (sender != null) {
67  this.sender = sender;
68  }
69  }
70 
71  String getSubject() {
72  return subject;
73  }
74 
75  void setSubject(String subject) {
76  if (subject != null) {
77  this.subject = subject;
78  }
79  }
80 
81  String getTextBody() {
82  return textBody;
83  }
84 
85  void setTextBody(String textBody) {
86  if (textBody != null) {
87  this.textBody = textBody;
88  }
89  }
90 
91  String getHtmlBody() {
92  return htmlBody;
93  }
94 
95  void setHtmlBody(String htmlBody) {
96  if (htmlBody != null) {
97  this.htmlBody = htmlBody;
98  }
99  }
100 
101  String getRtfBody() {
102  return rtfBody;
103  }
104 
105  void setRtfBody(String rtfBody) {
106  if (rtfBody != null) {
107  this.rtfBody = rtfBody;
108  }
109  }
110 
111  long getSentDate() {
112  return sentDate;
113  }
114 
115  void setSentDate(Date sentDate) {
116  if (sentDate != null) {
117  this.sentDate = sentDate.getTime() / 1000;
118  }
119  }
120 
121  void setSentDate(long sentDate) {
122  this.sentDate = sentDate;
123  }
124 
125  String getBcc() {
126  return bcc;
127  }
128 
129  void setBcc(String bcc) {
130  if (bcc != null) {
131  this.bcc = bcc;
132  }
133  }
134 
135  String getCc() {
136  return cc;
137  }
138 
139  void setCc(String cc) {
140  if (cc != null) {
141  this.cc = cc;
142  }
143  }
144 
145  void addAttachment(Attachment a) {
146  attachments.add(a);
147  hasAttachment = true;
148  }
149 
150  List<Attachment> getAttachments() {
151  return attachments;
152  }
153 
154  long getId() {
155  return id;
156  }
157 
158  void setId(long id) {
159  this.id = id;
160  }
161 
162  String getLocalPath() {
163  return localPath;
164  }
165 
166  void setLocalPath(String localPath) {
167  if (localPath != null) {
168  this.localPath = localPath;
169  }
170  }
171 
179  static class Attachment {
180 
181  private String name = "";
182 
183  private String localPath = "";
184 
185  private long size = 0L;
186 
187  private long crTime = 0L;
188 
189  private long cTime = 0L;
190 
191  private long aTime = 0L;
192 
193  private long mTime = 0L;
194 
195  String getName() {
196  return name;
197  }
198 
199  void setName(String name) {
200  if (name != null) {
201  this.name = name;
202  }
203  }
204 
205  String getLocalPath() {
206  return localPath;
207  }
208 
209  void setLocalPath(String localPath) {
210  if (localPath != null) {
211  this.localPath = localPath;
212  }
213  }
214 
215  long getSize() {
216  return size;
217  }
218 
219  void setSize(long size) {
220  this.size = size;
221  }
222 
223  long getCrTime() {
224  return crTime;
225  }
226 
227  void setCrTime(long crTime) {
228  this.crTime = crTime;
229  }
230 
231  void setCrTime(Date crTime) {
232  if (crTime != null) {
233  this.crTime = crTime.getTime() / 1000;
234  }
235  }
236 
237  long getcTime() {
238  return cTime;
239  }
240 
241  void setcTime(long cTime) {
242  this.cTime = cTime;
243  }
244 
245  void setcTime(Date cTime) {
246  if (cTime != null) {
247  this.cTime = cTime.getTime() / 1000;
248  }
249  }
250 
251  long getaTime() {
252  return aTime;
253  }
254 
255  void setaTime(long aTime) {
256  this.aTime = aTime;
257  }
258 
259  void setaTime(Date aTime) {
260  if (aTime != null) {
261  this.aTime = aTime.getTime() / 1000;
262  }
263  }
264 
265  long getmTime() {
266  return mTime;
267  }
268 
269  void setmTime(long mTime) {
270  this.mTime = mTime;
271  }
272 
273  void setmTime(Date mTime) {
274  if (mTime != null) {
275  this.mTime = mTime.getTime() / 1000;
276  }
277  }
278  }
279 }

Copyright © 2012-2015 Basis Technology. Generated on: Wed Apr 6 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.