Autopsy  4.19.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
PhotoRecCarverIngestModuleFactory.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-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  */
19 package org.sleuthkit.autopsy.modules.photoreccarver;
20 
21 import org.openide.util.NbBundle;
22 import org.openide.util.lookup.ServiceProvider;
29 
34 @ServiceProvider(service = IngestModuleFactory.class)
36 
37  private static final String VERSION = "7.0"; // Version should match the PhotoRec tool version.
38 
44  static String getModuleName() {
45  return NbBundle.getMessage(PhotoRecCarverIngestModuleFactory.class, "moduleDisplayName.text");
46  }
47 
48  @Override
49  public String getModuleDisplayName() {
50  return PhotoRecCarverIngestModuleFactory.getModuleName();
51  }
52 
53  @Override
54  public String getModuleDescription() {
55  return NbBundle.getMessage(PhotoRecCarverIngestModuleFactory.class, "moduleDescription.text");
56  }
57 
58  @Override
59  public String getModuleVersionNumber() {
60  return VERSION;
61  }
62 
63  @Override
64  public boolean isFileIngestModuleFactory() {
65  return true;
66  }
67 
68  @Override
70  if (settings instanceof PhotoRecCarverIngestJobSettings) {
71  return new PhotoRecCarverFileIngestModule((PhotoRecCarverIngestJobSettings) settings);
72  }
73  /*
74  * Compatibility check for older versions.
75  */
76  if (settings instanceof NoIngestModuleIngestJobSettings) {
77  return new PhotoRecCarverFileIngestModule(new PhotoRecCarverIngestJobSettings());
78  }
79 
80  throw new IllegalArgumentException("Expected settings argument to be an instance of PhotoRecCarverIngestJobSettings");
81  }
82 
83  @Override
85  return new PhotoRecCarverIngestJobSettings();
86  }
87 
88  @Override
89  public boolean hasIngestJobSettingsPanel() {
90  return true;
91  }
92 
93  @Override
95  if (settings instanceof PhotoRecCarverIngestJobSettings) {
96  return new PhotoRecCarverIngestJobSettingsPanel((PhotoRecCarverIngestJobSettings) settings);
97  }
98  /*
99  * Compatibility check for older versions.
100  */
101  if (settings instanceof NoIngestModuleIngestJobSettings) {
102  return new PhotoRecCarverIngestJobSettingsPanel(new PhotoRecCarverIngestJobSettings());
103  }
104 
105  throw new IllegalArgumentException("Expected settings argument to be an instance of PhotoRecCarverIngestJobSettings");
106  }
107 
108 }
IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings)

Copyright © 2012-2021 Basis Technology. Generated on: Fri Aug 6 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.