Autopsy  4.4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
KnownStatusChangeRunner.java
Go to the documentation of this file.
1 /*
2  * Central Repository
3  *
4  * Copyright 2015-2017 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.centralrepository.eventlisteners;
20 
21 import java.util.logging.Level;
26 import org.sleuthkit.datamodel.TskData.FileKnown;
27 
31 public class KnownStatusChangeRunner implements Runnable {
32 
33  private static final Logger LOGGER = Logger.getLogger(KnownStatusChangeRunner.class.getName());
34  private static final long serialVersionUID = 1L;
35 
37  private final FileKnown knownStatus;
38 
39  public KnownStatusChangeRunner(CorrelationAttribute artifact, FileKnown knownStatus) {
40  this.artifact = artifact;
41  this.knownStatus = knownStatus;
42  }
43 
44  @Override
45  public void run() {
46  if (!EamDb.isEnabled()) {
47  LOGGER.log(Level.WARNING, "Central Repository database not configured"); // NON-NLS
48  return;
49  }
50 
51  try {
52  EamDb dbManager = EamDb.getInstance();
53  dbManager.setArtifactInstanceKnownStatus(this.artifact, this.knownStatus);
54  } catch (EamDbException ex) {
55  LOGGER.log(Level.SEVERE, "Error connecting to Central Repository database.", ex); //NON-NLS
56  }
57  }
58 }
void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus)
synchronized static Logger getLogger(String name)
Definition: Logger.java:161
KnownStatusChangeRunner(CorrelationAttribute artifact, FileKnown knownStatus)

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