Autopsy  3.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
FileTypeIdModuleFactory.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.filetypeid;
20 
21 import org.openide.util.NbBundle;
22 import org.openide.util.lookup.ServiceProvider;
30 
34 // TODO: This class does not need to be public.
35 @ServiceProvider(service = IngestModuleFactory.class)
37 
38  FileTypeIdGlobalSettingsPanel globalSettingsPanel;
39 
43  @Override
44  public String getModuleDisplayName() {
45  return getModuleName();
46  }
47 
53  static String getModuleName() {
54  return NbBundle.getMessage(FileTypeIdIngestModule.class,
55  "FileTypeIdIngestModule.moduleName.text");
56  }
57 
61  @Override
62  public String getModuleDescription() {
63  return NbBundle.getMessage(FileTypeIdIngestModule.class,
64  "FileTypeIdIngestModule.moduleDesc.text");
65  }
66 
70  @Override
71  public String getModuleVersionNumber() {
72  return Version.getVersion();
73  }
74 
78  @Override
79  public boolean hasGlobalSettingsPanel() {
80  return true;
81  }
82 
86  @Override
88  if (null == globalSettingsPanel) {
89  globalSettingsPanel = new FileTypeIdGlobalSettingsPanel();
90  }
91  globalSettingsPanel.load();
92  return globalSettingsPanel;
93  }
94 
98  @Override
100  return new FileTypeIdModuleSettings();
101  }
102 
106  @Override
107  public boolean hasIngestJobSettingsPanel() {
108  return true;
109  }
110 
114  @Override
116  assert settings instanceof FileTypeIdModuleSettings;
117  if (!(settings instanceof FileTypeIdModuleSettings)) {
118  throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(),
119  "FileTypeIdModuleFactory.getIngestJobSettingsPanel.exception.msg"));
120  }
121  return new FileTypeIdIngestJobSettingsPanel((FileTypeIdModuleSettings) settings);
122  }
123 
127  @Override
128  public boolean isFileIngestModuleFactory() {
129  return true;
130  }
131 
135  @Override
137  assert settings instanceof FileTypeIdModuleSettings;
138  if (!(settings instanceof FileTypeIdModuleSettings)) {
139  throw new IllegalArgumentException(
140  NbBundle.getMessage(this.getClass(), "FileTypeIdModuleFactory.createFileIngestModule.exception.msg"));
141  }
142  return new FileTypeIdIngestModule((FileTypeIdModuleSettings) settings);
143  }
144 }
IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings)
FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings)

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