Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
IngestServices.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2012-2021 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 */
19package org.sleuthkit.autopsy.ingest;
20
21import java.util.Map;
22import java.util.logging.Level;
23import org.sleuthkit.autopsy.casemodule.Case;
24import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
25import org.sleuthkit.autopsy.coreutils.Logger;
26import org.sleuthkit.autopsy.coreutils.ModuleSettings;
27import org.sleuthkit.datamodel.Blackboard;
28import org.sleuthkit.datamodel.SleuthkitCase;
29
34public final class IngestServices {
35
36 private final static Logger logger = Logger.getLogger(IngestServices.class.getName());
37 private static IngestServices instance = null;
38
44 private IngestServices() {
45 }
46
54 public static synchronized IngestServices getInstance() {
55 if (instance == null) {
57 }
58 return instance;
59 }
60
70 }
71
79 public SleuthkitCase getCaseDatabase() throws NoCurrentCaseException {
81 }
82
91 public Logger getLogger(String moduleDisplayName) {
92 return Logger.getLogger(moduleDisplayName);
93 }
94
100 public void postMessage(final IngestMessage message) {
101 IngestManager.getInstance().postIngestMessage(message);
102 }
103
114 @Deprecated
115 public void fireModuleDataEvent(ModuleDataEvent moduleDataEvent) {
116 try {
117 Blackboard blackboard = Case.getCurrentCaseThrows().getSleuthkitCase().getBlackboard();
118 blackboard.postArtifacts(moduleDataEvent.getArtifacts(), moduleDataEvent.getModuleName(), null);
119 } catch (NoCurrentCaseException | Blackboard.BlackboardException ex) {
120 logger.log(Level.SEVERE, "Failed to post artifacts", ex);
121 }
122 }
123
132 public void fireModuleContentEvent(ModuleContentEvent moduleContentEvent) {
133 IngestManager.getInstance().fireIngestModuleContentEvent(moduleContentEvent);
134 }
135
143 public long getFreeDiskSpace() {
144 return IngestManager.getInstance().getFreeDiskSpace();
145 }
146
155 public String getConfigSetting(String moduleName, String settingName) {
156 return ModuleSettings.getConfigSetting(moduleName, settingName);
157 }
158
166 public void setConfigSetting(String moduleName, String settingName, String setting) {
167 ModuleSettings.setConfigSetting(moduleName, settingName, setting);
168 }
169
177 public Map<String, String> getConfigSettings(String moduleName) {
178 return ModuleSettings.getConfigSettings(moduleName);
179 }
180
187 public void setConfigSettings(String moduleName, Map<String, String> settings) {
188 ModuleSettings.setConfigSettings(moduleName, settings);
189 }
190
198 @Deprecated
199 public SleuthkitCase getCurrentSleuthkitCaseDb() {
201 }
202
210 @Deprecated
212 return Case.getCurrentCase();
213 }
214
215}
synchronized static Logger getLogger(String name)
Definition Logger.java:124
static synchronized void setConfigSettings(String moduleName, Map< String, String > settings)
static synchronized void setConfigSetting(String moduleName, String settingName, String settingVal)
static synchronized Map< String, String > getConfigSettings(String moduleName)
static synchronized String getConfigSetting(String moduleName, String settingName)
static synchronized IngestManager getInstance()
void setConfigSetting(String moduleName, String settingName, String setting)
Logger getLogger(String moduleDisplayName)
void fireModuleContentEvent(ModuleContentEvent moduleContentEvent)
void postMessage(final IngestMessage message)
String getConfigSetting(String moduleName, String settingName)
static synchronized IngestServices getInstance()
void fireModuleDataEvent(ModuleDataEvent moduleDataEvent)
Map< String, String > getConfigSettings(String moduleName)
void setConfigSettings(String moduleName, Map< String, String > settings)
Collection< BlackboardArtifact > getArtifacts()

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.