Autopsy  4.7.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 import org.sleuthkit.datamodel.TskData;
25 
32 class EmailMessage {
33 
34  private String recipients = "";
35  private String bcc = "";
36  private String cc = "";
37  private String sender = "";
38  private String subject = "";
39  private String headers = "";
40  private String textBody = "";
41  private String htmlBody = "";
42  private String rtfBody = "";
43  private String localPath = "";
44  private boolean hasAttachment = false;
45  private long sentDate = 0L;
46  private List<Attachment> attachments = new ArrayList<>();
47  private long id = -1L;
48 
49  boolean hasAttachment() {
50  return hasAttachment;
51  }
52 
53  String getRecipients() {
54  return recipients;
55  }
56 
57  void setRecipients(String recipients) {
58  if (recipients != null) {
59  this.recipients = recipients;
60  }
61  }
62 
63  String getSender() {
64  return sender;
65  }
66 
67  void setSender(String sender) {
68  if (sender != null) {
69  this.sender = sender;
70  }
71  }
72 
73  String getSubject() {
74  return subject;
75  }
76 
77  void setSubject(String subject) {
78  if (subject != null) {
79  this.subject = subject;
80  }
81  }
82 
83  String getHeaders() {
84  return headers;
85  }
86 
87  void setHeaders(String headers) {
88  if (headers != null) {
89  this.headers = headers;
90  }
91  }
92  String getTextBody() {
93  return textBody;
94  }
95 
96  void setTextBody(String textBody) {
97  if (textBody != null) {
98  this.textBody = textBody;
99  }
100  }
101 
102  String getHtmlBody() {
103  return htmlBody;
104  }
105 
106  void setHtmlBody(String htmlBody) {
107  if (htmlBody != null) {
108  this.htmlBody = htmlBody;
109  }
110  }
111 
112  String getRtfBody() {
113  return rtfBody;
114  }
115 
116  void setRtfBody(String rtfBody) {
117  if (rtfBody != null) {
118  this.rtfBody = rtfBody;
119  }
120  }
121 
122  long getSentDate() {
123  return sentDate;
124  }
125 
126  void setSentDate(Date sentDate) {
127  if (sentDate != null) {
128  this.sentDate = sentDate.getTime() / 1000;
129  }
130  }
131 
132  void setSentDate(long sentDate) {
133  this.sentDate = sentDate;
134  }
135 
136  String getBcc() {
137  return bcc;
138  }
139 
140  void setBcc(String bcc) {
141  if (bcc != null) {
142  this.bcc = bcc;
143  }
144  }
145 
146  String getCc() {
147  return cc;
148  }
149 
150  void setCc(String cc) {
151  if (cc != null) {
152  this.cc = cc;
153  }
154  }
155 
156  void addAttachment(Attachment a) {
157  attachments.add(a);
158  hasAttachment = true;
159  }
160 
161  List<Attachment> getAttachments() {
162  return attachments;
163  }
164 
165  long getId() {
166  return id;
167  }
168 
169  void setId(long id) {
170  this.id = id;
171  }
172 
173  String getLocalPath() {
174  return localPath;
175  }
176 
177  void setLocalPath(String localPath) {
178  if (localPath != null) {
179  this.localPath = localPath;
180  }
181  }
182 
190  static class Attachment {
191 
192  private String name = "";
193 
194  private String localPath = "";
195 
196  private long size = 0L;
197 
198  private long crTime = 0L;
199 
200  private long cTime = 0L;
201 
202  private long aTime = 0L;
203 
204  private long mTime = 0L;
205 
206  private TskData.EncodingType encodingType = TskData.EncodingType.NONE;
207 
208  String getName() {
209  return name;
210  }
211 
212  void setName(String name) {
213  if (name != null) {
214  this.name = name;
215  }
216  }
217 
218  String getLocalPath() {
219  return localPath;
220  }
221 
222  void setLocalPath(String localPath) {
223  if (localPath != null) {
224  this.localPath = localPath;
225  }
226  }
227 
228  long getSize() {
229  return size;
230  }
231 
232  void setSize(long size) {
233  this.size = size;
234  }
235 
236  long getCrTime() {
237  return crTime;
238  }
239 
240  void setCrTime(long crTime) {
241  this.crTime = crTime;
242  }
243 
244  void setCrTime(Date crTime) {
245  if (crTime != null) {
246  this.crTime = crTime.getTime() / 1000;
247  }
248  }
249 
250  long getcTime() {
251  return cTime;
252  }
253 
254  void setcTime(long cTime) {
255  this.cTime = cTime;
256  }
257 
258  void setcTime(Date cTime) {
259  if (cTime != null) {
260  this.cTime = cTime.getTime() / 1000;
261  }
262  }
263 
264  long getaTime() {
265  return aTime;
266  }
267 
268  void setaTime(long aTime) {
269  this.aTime = aTime;
270  }
271 
272  void setaTime(Date aTime) {
273  if (aTime != null) {
274  this.aTime = aTime.getTime() / 1000;
275  }
276  }
277 
278  long getmTime() {
279  return mTime;
280  }
281 
282  void setmTime(long mTime) {
283  this.mTime = mTime;
284  }
285 
286  void setmTime(Date mTime) {
287  if (mTime != null) {
288  this.mTime = mTime.getTime() / 1000;
289  }
290  }
291 
292  void setEncodingType(TskData.EncodingType encodingType){
293  this.encodingType = encodingType;
294  }
295 
296  TskData.EncodingType getEncodingType(){
297  return encodingType;
298  }
299 
300  }
301 }

Copyright © 2012-2016 Basis Technology. Generated on: Mon Jun 18 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.