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

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