19 package org.sleuthkit.autopsy.discovery.ui;
21 import org.openide.util.NbBundle.Messages;
31 class DataSourceModulesWrapper {
33 private boolean hashModuleRun =
false;
34 private boolean fileTypeModuleRun =
false;
35 private boolean exifModuleRun =
false;
36 private final String dataSourceName;
43 DataSourceModulesWrapper(String dsName) {
44 dataSourceName = dsName;
47 @Messages({
"# {0} - dataSourceName",
48 "DataSourceModuleWrapper.hashModule.text=Hash Lookup module was not run on data source: {0}\n",
49 "# {0} - dataSourceName",
50 "DataSourceModuleWrapper.fileTypeModule.text=File Type Identification module was not run on data source: {0}\n",
51 "# {0} - dataSourceName",
52 "DataSourceModuleWrapper.exifModule.text=Picture Analyzer module was not run on data source: {0}\n"
61 message += Bundle.DataSourceModuleWrapper_hashModule_text(dataSourceName);
63 if (!fileTypeModuleRun) {
64 message += Bundle.DataSourceModuleWrapper_fileTypeModule_text(dataSourceName);
67 message += Bundle.DataSourceModuleWrapper_exifModule_text(dataSourceName);
79 void updateModulesRun(IngestJobInfo jobInfo) {
80 for (IngestModuleInfo moduleInfo : jobInfo.getIngestModuleInfo()) {
81 if (hashModuleRun && fileTypeModuleRun && exifModuleRun) {
84 updateHashModuleStatus(moduleInfo);
85 updateFileTypeStatus(moduleInfo);
86 updateExifStatus(moduleInfo);
96 private void updateHashModuleStatus(IngestModuleInfo moduleInfo) {
97 if (!hashModuleRun && moduleInfo.getDisplayName().equals(HashLookupModuleFactory.getModuleName())) {
108 private void updateFileTypeStatus(IngestModuleInfo moduleInfo) {
109 if (!fileTypeModuleRun && moduleInfo.getDisplayName().equals(FileTypeIdModuleFactory.getModuleName())) {
110 fileTypeModuleRun =
true;
120 private void updateExifStatus(IngestModuleInfo moduleInfo) {
121 if (!exifModuleRun && moduleInfo.getDisplayName().equals(PictureAnalyzerIngestModuleFactory.getModuleName())) {
122 exifModuleRun =
true;