Autopsy  4.5.0
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 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.modules.hashdatabase;
20 
21 import java.util.ArrayList;
22 import java.util.List;
23 import org.openide.util.NbBundle;
24 import org.openide.util.lookup.ServiceProvider;
32 
36 @ServiceProvider(service = IngestModuleFactory.class)
38 
39  private HashLookupModuleSettingsPanel moduleSettingsPanel = null;
40 
41  @Override
42  public String getModuleDisplayName() {
43  return getModuleName();
44  }
45 
46  static String getModuleName() {
47  return NbBundle.getMessage(HashLookupModuleFactory.class, "HashDbIngestModule.moduleName");
48  }
49 
50  @Override
51  public String getModuleDescription() {
52  return NbBundle.getMessage(HashLookupModuleFactory.class, "HashDbIngestModule.moduleDescription");
53  }
54 
55  @Override
56  public String getModuleVersionNumber() {
57  return Version.getVersion();
58  }
59 
60  @Override
62  // All available hash sets are enabled and always calculate hashes is true by default.
63  return new HashLookupModuleSettings(true, HashDbManager.getInstance().getAllHashSets());
64  }
65 
66  @Override
67  public boolean hasIngestJobSettingsPanel() {
68  return true;
69  }
70 
71  @Override
73  if (!(settings instanceof HashLookupModuleSettings)) {
74  throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(),
75  "HashLookupModuleFactory.getIngestJobSettingsPanel.exception.msg"));
76  }
77  if (moduleSettingsPanel == null) {
78  moduleSettingsPanel = new HashLookupModuleSettingsPanel((HashLookupModuleSettings) settings);
79  } else {
80  moduleSettingsPanel.reset((HashLookupModuleSettings) settings);
81  }
82  return moduleSettingsPanel;
83  }
84 
85  @Override
86  public boolean hasGlobalSettingsPanel() {
87  return true;
88  }
89 
90  @Override
92  HashLookupSettingsPanel globalSettingsPanel = new HashLookupSettingsPanel();
93  globalSettingsPanel.load();
94  return globalSettingsPanel;
95  }
96 
97  @Override
98  public boolean isFileIngestModuleFactory() {
99  return true;
100  }
101 
102  @Override
104  if (!(settings instanceof HashLookupModuleSettings)) {
105  throw new IllegalArgumentException(
106  NbBundle.getMessage(this.getClass(), "HashLookupModuleFactory.createFileIngestModule.exception.msg"));
107  }
108  return new HashDbIngestModule((HashLookupModuleSettings) settings);
109  }
110 }
IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings)
FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings)

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