Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
ContentTagDeletedEvent.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2015 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.casemodule.events;
20 
21 import java.io.Serializable;
22 import javax.annotation.concurrent.Immutable;
24 import org.sleuthkit.datamodel.ContentTag;
25 
29 @Immutable
30 public class ContentTagDeletedEvent extends TagDeletedEvent<ContentTag> implements Serializable {
31 
32  private static final long serialVersionUID = 1L;
33 
34  public ContentTagDeletedEvent(ContentTag deletedTag) {
35  super(Case.Events.CONTENT_TAG_DELETED.toString(), new DeletedContentTagInfo(deletedTag));
36  }
37 
43  @Override
45  return (DeletedContentTagInfo) getOldValue();
46  }
47 
52  @Immutable
53  public static class DeletedContentTagInfo extends DeletedTagInfo<ContentTag> implements Serializable {
54 
55  private static final long serialVersionUID = 1L;
56 
57  private final long contentID;
58  private final long beginByteOffset;
59  private final long endByteOffset;
60 
61  private DeletedContentTagInfo(ContentTag deletedTag) {
62  super(deletedTag);
63  beginByteOffset = deletedTag.getBeginByteOffset();
64  endByteOffset = deletedTag.getEndByteOffset();
65  contentID = deletedTag.getContent().getId();
66 
67  }
68 
69  @Override
70  public long getContentID() {
71  return contentID;
72  }
73 
74  public long getBeginByteOffset() {
75  return beginByteOffset;
76  }
77 
78  public long getEndByteOffset() {
79  return endByteOffset;
80  }
81  }
82 }

Copyright © 2012-2016 Basis Technology. Generated on: Tue Oct 25 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.