Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
HashLookupModuleFactory.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2014-2018 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.modules.hashdatabase;
20
21import org.openide.util.NbBundle;
22import org.openide.util.lookup.ServiceProvider;
23import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
24import org.sleuthkit.autopsy.coreutils.Version;
25import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
26import org.sleuthkit.autopsy.ingest.FileIngestModule;
27import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
28import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
29import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel;
30import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel;
31
35@ServiceProvider(service = IngestModuleFactory.class)
37
39
40 @Override
41 public String getModuleDisplayName() {
42 return getModuleName();
43 }
44
50 public static String getModuleName() {
51 return NbBundle.getMessage(HashLookupModuleFactory.class, "HashLookupModuleFactory.moduleName.text");
52 }
53
54 @Override
55 public String getModuleDescription() {
56 return NbBundle.getMessage(HashLookupModuleFactory.class, "HashLookupModuleFactory.moduleDescription.text");
57 }
58
59 @Override
60 public String getModuleVersionNumber() {
61 return Version.getVersion();
62 }
63
64 @Override
66 // All available hash sets are enabled and always calculate hashes is true by default.
67 return new HashLookupModuleSettings(true, HashDbManager.getInstance().getAllHashSets());
68 }
69
70 @Override
71 public boolean hasIngestJobSettingsPanel() {
72 return true;
73 }
74
75 @Override
77 if (!(settings instanceof HashLookupModuleSettings)) {
78 throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(),
79 "HashLookupModuleFactory.getIngestJobSettingsPanel.exception.msg"));
80 }
81 if (moduleSettingsPanel == null) {
82 moduleSettingsPanel = new HashLookupModuleSettingsPanel((HashLookupModuleSettings) settings);
83 } else {
84 moduleSettingsPanel.reset((HashLookupModuleSettings) settings);
85 }
87 }
88
89 @Override
90 public boolean hasGlobalSettingsPanel() {
91 return true;
92 }
93
94 @Override
96 HashLookupSettingsPanel globalSettingsPanel = new HashLookupSettingsPanel();
97 globalSettingsPanel.load();
98 return globalSettingsPanel;
99 }
100
101 @Override
102 public boolean isFileIngestModuleFactory() {
103 return true;
104 }
105
106 @Override
108 if (!(settings instanceof HashLookupModuleSettings)) {
109 throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(),
110 "HashLookupModuleFactory.createFileIngestModule.exception.msg"));
111 }
112 try {
113 return new HashDbIngestModule((HashLookupModuleSettings) settings);
114 } catch (NoCurrentCaseException ex) {
115 throw new IllegalArgumentException("Exception while getting open case.", ex);
116 }
117 }
118}
FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings)
IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings)

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