From edc9c68186ea913e52f8506331e32842362577f1 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Mon, 24 Mar 2014 21:17:41 -0400 Subject: [PATCH] Did additional work on new ingest framework --- .../AddImageWizardIngestConfigPanel.java | 5 +- .../DirectoryTreeTopComponent.java | 8 +- .../SampleDataSourceIngestModule.java | 5 +- .../examples/SampleFileIngestModule.java | 7 +- .../autopsy/ingest/Bundle.properties | 2 +- .../ingest/DataSourceIngestModule.java | 9 +- .../DataSourceIngestModuleStatusHelper.java | 6 +- .../autopsy/ingest/FileIngestModule.java | 10 +- .../ingest/GetFilesContentVisitor.java | 77 ++++---- .../autopsy/ingest/IngestDialog.java | 51 +++-- .../sleuthkit/autopsy/ingest/IngestJob.java | 14 +- .../autopsy/ingest/IngestJobContext.java | 23 ++- .../autopsy/ingest/IngestJobLauncher.java | 175 ++++++++++-------- .../autopsy/ingest/IngestManager.java | 29 +-- .../autopsy/ingest/IngestMessagePanel.java | 2 +- ...er.java => IngestModuleFactoryLoader.java} | 27 +-- .../ingest/IngestPipelinesConfiguration.java | 6 +- .../FileExtMismatchIngestModule.java | 4 +- .../autopsy/filetypeid/Bundle.properties | 5 +- .../autopsy/filetypeid/Bundle_ja.properties | 2 +- .../FileTypeIdModuleSettingsPanel.form | 11 +- .../FileTypeIdModuleSettingsPanel.java | 9 +- .../hashdatabase/HashDbIngestModule.java | 4 +- .../hashdatabase/HashLookupSettingsPanel.java | 2 +- .../KeywordSearchConfigurationPanel.java | 7 +- .../KeywordSearchEditListPanel.java | 8 +- .../KeywordSearchListsAbstract.java | 24 +-- .../KeywordSearchListsViewerPanel.java | 8 +- .../scalpel/ScalpelCarverIngestModule.java | 2 +- .../ThunderbirdMboxFileIngestModule.java | 2 +- 30 files changed, 277 insertions(+), 267 deletions(-) rename Core/src/org/sleuthkit/autopsy/ingest/{IngestModuleLoader.java => IngestModuleFactoryLoader.java} (62%) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java index b574ec6cde..f82a73b5c0 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java @@ -74,7 +74,7 @@ class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel messages = ingestConfig.getContextSettingsWarnings(); + List messages = ingestConfig.getIngestJobConfigWarnings(); if (messages.isEmpty() == false) { StringBuilder warning = new StringBuilder(); for (String message : messages) { @@ -201,8 +201,7 @@ class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel> { - private static final Logger logger = Logger.getLogger(GetFilesContentVisitor.class.getName()); + private static final Logger logger = Logger.getLogger(GetFilesContentVisitor.class.getName()); - @Override - public Collection visit(VirtualDirectory ld) { - return getAllFromChildren(ld); - } + @Override + public Collection visit(VirtualDirectory ld) { + return getAllFromChildren(ld); + } - @Override - public Collection visit(Directory drctr) { - return getAllFromChildren(drctr); - } + @Override + public Collection visit(Directory drctr) { + return getAllFromChildren(drctr); + } - @Override - public Collection visit(Image image) { - return getAllFromChildren(image); - } + @Override + public Collection visit(Image image) { + return getAllFromChildren(image); + } - @Override - public Collection visit(Volume volume) { - return getAllFromChildren(volume); - } + @Override + public Collection visit(Volume volume) { + return getAllFromChildren(volume); + } - @Override - public Collection visit(VolumeSystem vs) { - return getAllFromChildren(vs); - } + @Override + public Collection visit(VolumeSystem vs) { + return getAllFromChildren(vs); + } - /** - * Aggregate all the matches from visiting the children Content objects of the - * one passed - * @param parent - * @return - */ - protected Collection getAllFromChildren(Content parent) { - Collection all = new ArrayList<>(); + /** + * Aggregate all the matches from visiting the children Content objects of + * a parent Content object. + * + * @param parent A content object. + * @return The child files of the content. + */ + protected Collection getAllFromChildren(Content parent) { + Collection all = new ArrayList<>(); - try { - for (Content child : parent.getChildren()) { - all.addAll(child.accept(this)); - } - } catch (TskException ex) { - logger.log(Level.SEVERE, "Error getting Content children", ex); - } + try { + for (Content child : parent.getChildren()) { + all.addAll(child.accept(this)); + } + } catch (TskException ex) { + logger.log(Level.SEVERE, "Error getting Content children", ex); + } - return all; - } + return all; + } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestDialog.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestDialog.java index 42d5816ba5..4c5aa4b28b 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestDialog.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestDialog.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2013 Basis Technology Corp. + * Copyright 2013-2014 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +25,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import java.util.ArrayList; import java.util.List; import javax.swing.BoxLayout; import javax.swing.JButton; @@ -32,24 +33,24 @@ import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; - import org.openide.util.NbBundle; import org.sleuthkit.datamodel.Content; /** - * Dialog box that allows ingest modules to be run on a data source. - * Used outside of the wizards. + * Dialog box that allows ingest modules to be run on a data source. Used + * outside of the wizards. */ public final class IngestDialog extends JDialog { - + private static final String TITLE = NbBundle.getMessage(IngestDialog.class, "IngestDialog.title.text"); private static Dimension DIMENSIONS = new Dimension(500, 300); - private IngestJobLauncher ingestConfigurator; - + private List dataSources = new ArrayList<>(); + private IngestJobLauncher ingestJobLauncher; + public IngestDialog(JFrame frame, String title, boolean modal) { super(frame, title, modal); - ingestConfigurator = new IngestJobLauncher(IngestDialog.class.getCanonicalName()); - List messages = ingestConfigurator.getContextSettingsWarnings(); + ingestJobLauncher = new IngestJobLauncher(IngestDialog.class.getCanonicalName()); + List messages = ingestJobLauncher.getIngestJobConfigWarnings(); if (messages.isEmpty() == false) { StringBuilder warning = new StringBuilder(); for (String message : messages) { @@ -58,8 +59,8 @@ public final class IngestDialog extends JDialog { JOptionPane.showMessageDialog(null, warning.toString()); } } - - public IngestDialog(){ + + public IngestDialog() { this(new JFrame(TITLE), TITLE, true); } @@ -78,51 +79,49 @@ public final class IngestDialog extends JDialog { // set the location of the popUp Window on the center of the screen setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2); - add(ingestConfigurator.getIngestJobConfigPanel(), BorderLayout.PAGE_START); + add(ingestJobLauncher.getIngestJobConfigPanel(), BorderLayout.PAGE_START); JButton startButton = new JButton(NbBundle.getMessage(this.getClass(), "IngestDialog.startButton.title")); JButton closeButton = new JButton(NbBundle.getMessage(this.getClass(), "IngestDialog.closeButton.title")); startButton.addActionListener(new ActionListener() { - @Override public void actionPerformed(ActionEvent e) { - ingestConfigurator.saveIngestJobConfig(); - ingestConfigurator.startIngestJobs(); + ingestJobLauncher.saveIngestJobConfig(); + ingestJobLauncher.startIngestJobs(dataSources); close(); } }); closeButton.addActionListener(new ActionListener() { - @Override public void actionPerformed(ActionEvent e) { - ingestConfigurator.saveIngestJobConfig(); + ingestJobLauncher.saveIngestJobConfig(); close(); } }); this.addWindowListener(new WindowAdapter() { - @Override public void windowClosing(WindowEvent e) { - ingestConfigurator.saveIngestJobConfig(); + ingestJobLauncher.saveIngestJobConfig(); close(); } }); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS)); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10,10), new Dimension(10,10), new Dimension(10,10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); buttonPanel.add(startButton); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10,10), new Dimension(10,10), new Dimension(10,10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); buttonPanel.add(closeButton); add(buttonPanel, BorderLayout.LINE_START); - + pack(); setResizable(false); setVisible(true); } - + public void setDataSources(List inputContent) { - ingestConfigurator.setDataSourcesToIngest(inputContent); - } - + dataSources.clear(); + dataSources.addAll(inputContent); + } + /** * Closes the Ingest dialog */ diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java index 918c417b86..90507048ee 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java @@ -25,6 +25,7 @@ import java.util.Map; import java.util.logging.Level; import javax.swing.SwingWorker; import org.netbeans.api.progress.ProgressHandle; +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; @@ -170,7 +171,7 @@ final class IngestJob { try { module.startUp(context); modulesByClass.put(module.getClassName(), module); - IngestManager.fireModuleEvent(IngestManager.IngestModuleEvent.STARTED.toString(), module.getDisplayName()); + IngestManager.fireModuleEvent(IngestManager.IngestEvent.STARTED.toString(), module.getDisplayName()); } catch (Exception ex) { errors.add(new IngestModuleError(module.getDisplayName(), ex)); } @@ -200,10 +201,9 @@ final class IngestJob { logger.log(Level.INFO, "Processing data source {0}", dataSource.getName()); for (DataSourceIngestModuleDecorator module : this.modules) { try { - progress.start(); - progress.switchToIndeterminate(); + String displayName = NbBundle.getMessage(this.getClass(), "IngestJob.DataSourceIngestPipeline.displayName.text", module.getDisplayName(), dataSource.getName()); + progress.setDisplayName(displayName); module.process(dataSource, new DataSourceIngestModuleStatusHelper(worker, progress, dataSource)); - progress.finish(); } catch (Exception ex) { errors.add(new IngestModuleError(module.getDisplayName(), ex)); } @@ -222,7 +222,7 @@ final class IngestJob { } catch (Exception ex) { errors.add(new IngestModuleError(module.getDisplayName(), ex)); } finally { - IngestManager.fireModuleEvent(IngestManager.IngestModuleEvent.COMPLETED.toString(), module.getDisplayName()); + IngestManager.fireModuleEvent(IngestManager.IngestEvent.COMPLETED.toString(), module.getDisplayName()); } } return errors; @@ -295,7 +295,7 @@ final class IngestJob { try { module.startUp(context); modulesByClass.put(module.getClassName(), module); - IngestManager.fireModuleEvent(IngestManager.IngestModuleEvent.STARTED.toString(), template.getModuleName()); + IngestManager.fireModuleEvent(IngestManager.IngestEvent.STARTED.toString(), template.getModuleName()); } catch (Exception ex) { errors.add(new IngestModuleError(module.getDisplayName(), ex)); } @@ -346,7 +346,7 @@ final class IngestJob { } catch (Exception ex) { errors.add(new IngestModuleError(module.getDisplayName(), ex)); } finally { - IngestManager.fireModuleEvent(IngestManager.IngestModuleEvent.COMPLETED.toString(), module.getDisplayName()); + IngestManager.fireModuleEvent(IngestManager.IngestEvent.COMPLETED.toString(), module.getDisplayName()); } } return errors; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java index 229b418c87..7984370d6f 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java @@ -33,10 +33,31 @@ public final class IngestJobContext { this.ingestJob = ingestJob; } - public boolean isIngestJobCancelled() { + /** + * Gets the identifier of the ingest job associated with this context. + * + * @return The ingest job identifier. + */ + public long getJobId() { + return this.ingestJob.getId(); + } + + /** + * Determines whether the ingest job associated with the current context has + * been canceled. + * + * @return True if the job has been canceled, false otherwise. + */ + public boolean isJobCancelled() { return this.ingestJob.isCancelled(); } + /** + * Adds one or more files to the files to be passed through the file ingest + * pipeline of the ingest job associated with the current context. + * + * @param files The files to be processed by the file ingest pipeline. + */ public void addFilesToPipeline(List files) { for (AbstractFile file : files) { IngestManager.getDefault().scheduleFile(ingestJob.getId(), file); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java index c2f5aefd59..261647319b 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2013-2014 Basis Technology Corp. + * Copyright 2014 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,9 +26,9 @@ import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.datamodel.Content; /** - * Provides a mechanism for creating and persisting a context-sensitive ingest - * pipeline configuration and launching ingest jobs to process one or more data - * sources. + * Provides a mechanism for creating and persisting an ingest job configuration + * for a particular context and for launching ingest jobs that process one or + * more data sources using the ingest job configuration. */ public final class IngestJobLauncher { @@ -36,13 +36,13 @@ public final class IngestJobLauncher { private static final String DISABLED_INGEST_MODULES_KEY = "Disabled_Ingest_Modules"; private static final String PARSE_UNALLOC_SPACE_KEY = "Process_Unallocated_Space"; private final String launcherContext; - private final List contextSettingsWarnings = new ArrayList<>(); - private final List dataSourcesToIngest = new ArrayList<>(); + private final List warnings = new ArrayList<>(); private IngestJobConfigurationPanel ingestConfigPanel; /** - * Constructs an ingest job launcher that loads and updates the ingest job - * and ingest pipeline for a particular context. + * Constructs an ingest job launcher that creates and persists an ingest job + * configuration for a particular context and launches ingest jobs that + * process one or more data sources using the ingest job configuration. * * @param launcherContext The context identifier. */ @@ -51,8 +51,7 @@ public final class IngestJobLauncher { // Get the ingest module factories discovered by the ingest module // loader. - // RJCTODO: Put in module name uniqueness test/notification either here or in the loader - List moduleFactories = IngestModuleLoader.getInstance().getIngestModuleFactories(); + List moduleFactories = IngestModuleFactoryLoader.getInstance().getIngestModuleFactories(); HashSet loadedModuleNames = new HashSet<>(); for (IngestModuleFactory moduleFactory : moduleFactories) { loadedModuleNames.add(moduleFactory.getModuleDisplayName()); @@ -79,13 +78,12 @@ public final class IngestJobLauncher { for (String moduleName : missingModuleNames) { enabledModuleNames.remove(moduleName); disabledModuleNames.remove(moduleName); - contextSettingsWarnings.add(String.format("Previously loaded %s module could not be found", moduleName)); + warnings.add(String.format("Previously loaded %s module could not be found", moduleName)); } // Create ingest module templates. List moduleTemplates = new ArrayList<>(); for (IngestModuleFactory moduleFactory : moduleFactories) { - // RJCTODO: Make sure there is a story in JIRA for this. // NOTE: In the future, this code will be modified to get the // module settings for the current context, if available, from // storage; for now always use the defaults. @@ -121,74 +119,6 @@ public final class IngestJobLauncher { ingestConfigPanel = new IngestJobConfigurationPanel(moduleTemplates, processUnallocatedSpace); } - public List getContextSettingsWarnings() { - return contextSettingsWarnings; - } - - public JPanel getIngestJobConfigPanel() { - return ingestConfigPanel; - } - - public void saveIngestJobConfig() { - List moduleTemplates = ingestConfigPanel.getIngestModuleTemplates(); - - // Save the enabled/disabled ingest module settings for the current context. - HashSet enabledModuleNames = new HashSet<>(); - HashSet disabledModuleNames = new HashSet<>(); - for (IngestModuleTemplate moduleTemplate : moduleTemplates) { - String moduleName = moduleTemplate.getModuleName(); - if (moduleTemplate.isEnabled()) { - enabledModuleNames.add(moduleName); - } else { - disabledModuleNames.add(moduleName); - } - } - ModuleSettings.setConfigSetting(launcherContext, ENABLED_INGEST_MODULES_KEY, makeCommaSeparatedList(enabledModuleNames)); - ModuleSettings.setConfigSetting(launcherContext, DISABLED_INGEST_MODULES_KEY, makeCommaSeparatedList(disabledModuleNames)); - - // Save the process unallocated space setting for the current context. - String processUnalloc = Boolean.toString(ingestConfigPanel.getProcessUnallocSpace()); - ModuleSettings.setConfigSetting(launcherContext, PARSE_UNALLOC_SPACE_KEY, processUnalloc); - - // NOTE: In the future, this code will be modified to persist the ingest - // options for each ingest module for the current launch context. - } - - public void setDataSourcesToIngest(List dataSourcesToIngest) { // RJCTODO: This should really be handled by passing the data sources to startIngestJobs() - this.dataSourcesToIngest.clear(); - this.dataSourcesToIngest.addAll(dataSourcesToIngest); - } - - public void startIngestJobs() { - // Filter out the disabled ingest module templates. - List enabledModuleTemplates = new ArrayList<>(); - List moduleTemplates = ingestConfigPanel.getIngestModuleTemplates(); - for (IngestModuleTemplate moduleTemplate : moduleTemplates) { - if (moduleTemplate.isEnabled()) { - enabledModuleTemplates.add(moduleTemplate); - } - } - - if ((!enabledModuleTemplates.isEmpty()) && (dataSourcesToIngest != null)) { - IngestManager.getDefault().scheduleDataSourceTasks(dataSourcesToIngest, enabledModuleTemplates, ingestConfigPanel.getProcessUnallocSpace()); - } - } - - private static String makeCommaSeparatedList(HashSet input) { - if (input == null || input.isEmpty()) { - return ""; - } - - ArrayList list = new ArrayList<>(); - list.addAll(input); - StringBuilder csvList = new StringBuilder(); - for (int i = 0; i < list.size() - 1; ++i) { - csvList.append(list.get(i)).append(", "); - } - csvList.append(list.get(list.size() - 1)); - return csvList.toString(); - } - private HashSet getModulesNamesFromSetting(String key, String defaultSetting) { // Get the ingest modules setting from the user's config file. // If there is no such setting yet, create the default setting. @@ -220,4 +150,89 @@ public final class IngestJobLauncher { } return moduleNames; } + + /** + * Gets any warnings generated when the persisted ingest job configuration + * for the specified context is retrieved and loaded. + * + * @return A collection of warning messages. + */ + public List getIngestJobConfigWarnings() { + return warnings; + } + + /** + * Gets the user interface panel the launcher uses to obtain the user's + * ingest job configuration for the specified context. + * + * @return A JPanel with components that can be used to create an ingest job + * configuration. + */ + public JPanel getIngestJobConfigPanel() { + return ingestConfigPanel; + } + + /** + * Persists the ingest job configuration for the specified context. + */ + public void saveIngestJobConfig() { + List moduleTemplates = ingestConfigPanel.getIngestModuleTemplates(); + + // Save the enabled/disabled ingest module settings for the current context. + HashSet enabledModuleNames = new HashSet<>(); + HashSet disabledModuleNames = new HashSet<>(); + for (IngestModuleTemplate moduleTemplate : moduleTemplates) { + String moduleName = moduleTemplate.getModuleName(); + if (moduleTemplate.isEnabled()) { + enabledModuleNames.add(moduleName); + } else { + disabledModuleNames.add(moduleName); + } + } + ModuleSettings.setConfigSetting(launcherContext, ENABLED_INGEST_MODULES_KEY, makeCommaSeparatedList(enabledModuleNames)); + ModuleSettings.setConfigSetting(launcherContext, DISABLED_INGEST_MODULES_KEY, makeCommaSeparatedList(disabledModuleNames)); + + // Save the process unallocated space setting for the current context. + String processUnalloc = Boolean.toString(ingestConfigPanel.getProcessUnallocSpace()); + ModuleSettings.setConfigSetting(launcherContext, PARSE_UNALLOC_SPACE_KEY, processUnalloc); + + // NOTE: In the future, this code will be modified to persist the ingest + // options for each ingest module for the current launch context. + } + + private static String makeCommaSeparatedList(HashSet input) { + if (input == null || input.isEmpty()) { + return ""; + } + + ArrayList list = new ArrayList<>(); + list.addAll(input); + StringBuilder csvList = new StringBuilder(); + for (int i = 0; i < list.size() - 1; ++i) { + csvList.append(list.get(i)).append(", "); + } + csvList.append(list.get(list.size() - 1)); + return csvList.toString(); + } + + /** + * Launches ingest jobs for one or more data sources using the ingest job + * configuration for the selected context. + * + * @param dataSources The data sources to ingest. + */ + public void startIngestJobs(List dataSources) { + // Filter out the disabled ingest module templates. + List enabledModuleTemplates = new ArrayList<>(); + List moduleTemplates = ingestConfigPanel.getIngestModuleTemplates(); + for (IngestModuleTemplate moduleTemplate : moduleTemplates) { + if (moduleTemplate.isEnabled()) { + enabledModuleTemplates.add(moduleTemplate); + } + } + + if ((!enabledModuleTemplates.isEmpty()) && (dataSources != null) && (!dataSources.isEmpty())) { + IngestManager.getDefault().scheduleDataSourceTasks(dataSources, enabledModuleTemplates, ingestConfigPanel.getProcessUnallocSpace()); + } + } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index cd0d8ea201..08fca422e9 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -36,12 +36,7 @@ import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; /** - * IngestManager sets up and manages ingest modules runs them in a background - * thread notifies modules when work is complete or should be interrupted - * processes messages from modules via messenger proxy and posts them to GUI. - * - * This runs as a singleton and you can access it using the getDefault() method. - * + * Manages the execution of ingest jobs. */ public class IngestManager { @@ -56,16 +51,14 @@ public class IngestManager { private DataSourceTaskWorker dataSourceTaskWorker; private long nextDataSourceTaskId = 0; private long nextThreadId = 0; - public final static String MODULE_PROPERTIES = NbBundle.getMessage(IngestManager.class, - "IngestManager.moduleProperties.text"); private volatile IngestUI ingestMessageBox; /** - * Possible events about ingest modules Event listeners can get the event - * name by using String returned by toString() method on the specific event. + * Ingest events. */ - public enum IngestModuleEvent { + public enum IngestEvent { + // RJCTODO: Update comments /** * Event sent when an ingest module has been started. Second argument of * the property change is a string form of the module name and the third @@ -174,7 +167,7 @@ public class IngestManager { */ static synchronized void fireFileDone(long objId) { try { - pcs.firePropertyChange(IngestModuleEvent.FILE_DONE.toString(), objId, null); + pcs.firePropertyChange(IngestEvent.FILE_DONE.toString(), objId, null); } catch (Exception e) { logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"), @@ -191,7 +184,7 @@ public class IngestManager { */ static synchronized void fireModuleDataEvent(ModuleDataEvent moduleDataEvent) { try { - pcs.firePropertyChange(IngestModuleEvent.DATA.toString(), moduleDataEvent, null); + pcs.firePropertyChange(IngestEvent.DATA.toString(), moduleDataEvent, null); } catch (Exception e) { logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"), @@ -208,7 +201,7 @@ public class IngestManager { */ static synchronized void fireModuleContentEvent(ModuleContentEvent moduleContentEvent) { try { - pcs.firePropertyChange(IngestModuleEvent.CONTENT_CHANGED.toString(), moduleContentEvent, null); + pcs.firePropertyChange(IngestEvent.CONTENT_CHANGED.toString(), moduleContentEvent, null); } catch (Exception e) { logger.log(Level.SEVERE, "Ingest manager listener threw exception", e); MessageNotifyUtil.Notify.show(NbBundle.getMessage(IngestManager.class, "IngestManager.moduleErr"), @@ -396,7 +389,6 @@ public class IngestManager { private final List dataSources; private final List moduleTemplates; private final boolean processUnallocatedSpace; - private final List scheduledJobIds = new ArrayList<>(); private ProgressHandle progress; TaskSchedulingWorker(List dataSources, List moduleTemplates, boolean processUnallocatedSpace) { @@ -508,15 +500,14 @@ public class IngestManager { // Set up a progress bar that can be used to cancel all of the // ingest jobs currently being performed. - final String displayName = NbBundle.getMessage(this.getClass(), "IngestManager.DataSourceTaskWorker.displayName"); - progress = ProgressHandleFactory.createHandle(displayName, new Cancellable() { + progress = ProgressHandleFactory.createHandle("Data source ingest", new Cancellable() { @Override public boolean cancel() { - logger.log(Level.INFO, "Data source ingest thread {0} cancelled", DataSourceTaskWorker.this.id); + logger.log(Level.INFO, "Data source ingest thread (id={0}) cancelled", DataSourceTaskWorker.this.id); if (progress != null) { progress.setDisplayName(NbBundle.getMessage(this.getClass(), "IngestManager.DataSourceTaskWorker.process.cancelling", - displayName)); + "Data source ingest")); } IngestManager.getDefault().stopAll(); return true; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.java index c7584fb6f0..7596e1f4cd 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessagePanel.java @@ -383,7 +383,7 @@ class IngestMessagePanel extends JPanel implements TableModelListener { } private void init() { - List moduleFactories = IngestModuleLoader.getInstance().getIngestModuleFactories(); + List moduleFactories = IngestModuleFactoryLoader.getInstance().getIngestModuleFactories(); for (IngestModuleFactory factory : moduleFactories) { groupings.put(factory.getModuleDisplayName(), new HashMap>()); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryLoader.java similarity index 62% rename from Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java rename to Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryLoader.java index 4eba4eb43f..49813595c0 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleLoader.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryLoader.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2012-2014 Basis Technology Corp. + * Copyright 2014 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.ingest; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.List; import java.util.logging.Level; import org.openide.util.Lookup; @@ -28,29 +29,33 @@ import org.sleuthkit.autopsy.coreutils.Logger; /** * Looks up loaded ingest module factories using the NetBean global lookup. */ -final class IngestModuleLoader { +final class IngestModuleFactoryLoader { - private static final Logger logger = Logger.getLogger(IngestModuleLoader.class.getName()); - private static IngestModuleLoader instance; - private final List moduleFactories = new ArrayList<>(); + private static final Logger logger = Logger.getLogger(IngestModuleFactoryLoader.class.getName()); + private static IngestModuleFactoryLoader instance; - private IngestModuleLoader() { + private IngestModuleFactoryLoader() { } - synchronized static IngestModuleLoader getInstance() { + synchronized static IngestModuleFactoryLoader getInstance() { if (instance == null) { - instance = new IngestModuleLoader(); + instance = new IngestModuleFactoryLoader(); } return instance; } synchronized List getIngestModuleFactories() { - moduleFactories.clear(); - // RJCTODO: Need a name uniqueness test/solution, here or in the launcher. + List moduleFactories = new ArrayList<>(); + HashSet moduleDisplayNames = new HashSet<>(); Collection factories = Lookup.getDefault().lookupAll(IngestModuleFactory.class); for (IngestModuleFactory factory : factories) { logger.log(Level.INFO, "Found ingest module factory: name = {0}, version = {1}", new Object[]{factory.getModuleDisplayName(), factory.getModuleVersionNumber()}); - moduleFactories.add(factory); + if (!moduleDisplayNames.contains(factory.getModuleDisplayName())) { + moduleFactories.add(factory); + moduleDisplayNames.add(factory.getModuleDisplayName()); + } else { + logger.log(Level.SEVERE, "Found duplicate ingest module display name, discarding ingest module factory (name = {0}", new Object[]{factory.getModuleDisplayName(), factory.getModuleVersionNumber()}); + } } return new ArrayList<>(moduleFactories); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestPipelinesConfiguration.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestPipelinesConfiguration.java index ee11056ae2..5c93b9d102 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestPipelinesConfiguration.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestPipelinesConfiguration.java @@ -57,7 +57,7 @@ final class IngestPipelinesConfiguration { synchronized static IngestPipelinesConfiguration getInstance() { if (instance == null) { - Logger.getLogger(IngestModuleLoader.class.getName()).log(Level.INFO, "Creating ingest module loader instance"); + Logger.getLogger(IngestPipelinesConfiguration.class.getName()).log(Level.INFO, "Creating ingest module loader instance"); instance = new IngestPipelinesConfiguration(); } return instance; @@ -73,14 +73,14 @@ final class IngestPipelinesConfiguration { private void readPipelinesConfigurationFile() { try { - PlatformUtil.extractResourceToUserConfigDir(IngestModuleLoader.class, PIPELINES_CONFIG_FILE); + PlatformUtil.extractResourceToUserConfigDir(IngestPipelinesConfiguration.class, PIPELINES_CONFIG_FILE); } catch (IOException ex) { logger.log(Level.SEVERE, "Error copying default pipeline configuration to user dir", ex); return; } String configFilePath = PlatformUtil.getUserConfigDirectory() + File.separator + PIPELINES_CONFIG_FILE; - Document doc = XMLUtil.loadDoc(IngestModuleLoader.class, configFilePath, PIPELINES_CONFIG_FILE_XSD); + Document doc = XMLUtil.loadDoc(IngestPipelinesConfiguration.class, configFilePath, PIPELINES_CONFIG_FILE_XSD); if (doc == null) { return; } diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java index 94c0e78d09..42cd7e699a 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java @@ -47,12 +47,12 @@ import org.sleuthkit.datamodel.TskException; public class FileExtMismatchIngestModule extends IngestModuleAdapter implements FileIngestModule { private static final Logger logger = Logger.getLogger(FileExtMismatchIngestModule.class.getName()); - private static long processTime = 0; // RJCTODO: This is not thread safe private static int messageId = 0; // RJCTODO: This is not thread safe - private static long numFiles = 0; // RJCTODO: This is not thread safe private final IngestServices services = IngestServices.getDefault(); private final FileExtMismatchDetectorModuleSettings settings; private HashMap SigTypeToExtMap = new HashMap<>(); + private long processTime = 0; + private long numFiles = 0; FileExtMismatchIngestModule(FileExtMismatchDetectorModuleSettings settings) { this.settings = settings; diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/Bundle.properties b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/Bundle.properties index cb37b1e7fd..4850085f1e 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/Bundle.properties +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/Bundle.properties @@ -1,7 +1,8 @@ OpenIDE-Module-Name=FileTypeId -FileTypeIdentifierModuleSettingsPanel.skipKnownCheckBox.toolTipText=Depending on how many files have known hashes, checking this box will improve the speed of file type identification. +FileTypeIdModuleSettingsPanel.skipKnownCheckBox.text=Skip known files (NSRL) +FileTypeIdModuleSettingsPanel.skipKnownCheckBox.toolTipText=Depending on how many files have known hashes, checking this box will improve the speed of file type identification. FileTypeIdIngestModule.moduleName.text=File Type Identification FileTypeIdIngestModule.moduleDesc.text=Matches file types based on binary signatures. FileTypeIdIngestModule.complete.totalProcTime=Total Processing Time FileTypeIdIngestModule.complete.totalFiles=Total Files Processed -FileTypeIdIngestModule.complete.srvMsg.text=File Type Id Results \ No newline at end of file +FileTypeIdIngestModule.complete.srvMsg.text=File Type Id Results diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/Bundle_ja.properties b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/Bundle_ja.properties index ebc84223da..047da33077 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/Bundle_ja.properties +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/Bundle_ja.properties @@ -1,5 +1,5 @@ OpenIDE-Module-Name=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u306e\u7279\u5b9a -FileTypeIdentifierModuleSettingsPanel.skipKnownCheckBox.toolTipText=\u65e2\u77e5\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\u6570\u306b\u3088\u3063\u3066\u306f\u3001\u3053\u306e\u30dc\u30c3\u30af\u30b9\u3092\u9078\u629e\u3059\u308b\u306e\u306b\u3088\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u306e\u7279\u5b9a\u3092\u52a0\u901f\u3057\u307e\u3059\u3002 +FileTypeIdModuleSettingsPanel.skipKnownCheckBox.toolTipText=\u65e2\u77e5\u306e\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\u6570\u306b\u3088\u3063\u3066\u306f\u3001\u3053\u306e\u30dc\u30c3\u30af\u30b9\u3092\u9078\u629e\u3059\u308b\u306e\u306b\u3088\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u306e\u7279\u5b9a\u3092\u52a0\u901f\u3057\u307e\u3059\u3002 FileTypeIdIngestModule.moduleName.text=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u306e\u7279\u5b9a FileTypeIdIngestModule.moduleDesc.text=\u30d0\u30a4\u30ca\u30ea\u7f72\u540d\u306b\u57fa\u3065\u3044\u3066\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u3092\u4e00\u81f4\u3059\u308b\u3002 FileTypeIdIngestModule.complete.totalProcTime=\u5408\u8a08\u51e6\u7406\u6642\u9593 diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.form b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.form index b91cd2e25e..da4b241fb4 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.form +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.form @@ -19,7 +19,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -38,10 +38,13 @@ - + - + + + + diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.java index f2d9a69655..cd4092f07d 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdModuleSettingsPanel.java @@ -56,8 +56,9 @@ final class FileTypeIdModuleSettingsPanel extends IngestModuleSettingsPanel { skipKnownCheckBox = new javax.swing.JCheckBox(); skipKnownCheckBox.setSelected(true); - skipKnownCheckBox.setText(org.openide.util.NbBundle.getMessage(FileTypeIdModuleSettingsPanel.class, "FileTypeIdSimpleConfigPanel.skipKnownCheckBox.text")); // NOI18N - skipKnownCheckBox.setToolTipText(org.openide.util.NbBundle.getMessage(FileTypeIdModuleSettingsPanel.class, "FileTypeIdSimpleConfigPanel.skipKnownCheckBox.toolTipText")); // NOI18N + skipKnownCheckBox.setText(org.openide.util.NbBundle.getMessage(FileTypeIdModuleSettingsPanel.class, "FileTypeIdModuleSettingsPanel.skipKnownCheckBox.text")); // NOI18N + skipKnownCheckBox.setToolTipText(org.openide.util.NbBundle.getMessage(FileTypeIdModuleSettingsPanel.class, "FileTypeIdModuleSettingsPanel.skipKnownCheckBox.toolTipText")); // NOI18N + skipKnownCheckBox.setLabel(org.openide.util.NbBundle.getMessage(FileTypeIdModuleSettingsPanel.class, "FileTypeIdModuleSettingsPanel.skipKnownCheckBox.text")); // NOI18N skipKnownCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { skipKnownCheckBoxActionPerformed(evt); @@ -71,14 +72,14 @@ final class FileTypeIdModuleSettingsPanel extends IngestModuleSettingsPanel { .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(skipKnownCheckBox) - .addContainerGap(138, Short.MAX_VALUE)) + .addContainerGap(608, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(11, 11, 11) .addComponent(skipKnownCheckBox) - .addContainerGap(45, Short.MAX_VALUE)) + .addContainerGap(47, Short.MAX_VALUE)) ); }// //GEN-END:initComponents diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java index 553bf2dfea..7d16a1c006 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java @@ -48,8 +48,6 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges private static final Logger logger = Logger.getLogger(HashDbIngestModule.class.getName()); private static final int MAX_COMMENT_SIZE = 500; private static int messageId = 0; // RJCTODO: This is not thread safe - static long calctime = 0; // RJCTODO: This is not thread safe - static long lookuptime = 0; // RJCTODO: This is not thread safe private final IngestServices services = IngestServices.getDefault(); private final Hash hasher = new Hash(); private final SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); @@ -58,6 +56,8 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges private List knownBadHashSets = new ArrayList<>(); private List knownHashSets = new ArrayList<>(); private int knownBadCount = 0; + private long calctime = 0; + private long lookuptime = 0; HashDbIngestModule(HashLookupModuleSettings settings) { this.settings = settings; diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java index b883d0012c..c84dd442b1 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java @@ -225,7 +225,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSetttingsPa } private boolean isFileIngestStatusChangeEvent(PropertyChangeEvent evt) { - return evt.getPropertyName().equals(IngestManager.IngestModuleEvent.STARTED.toString()) || evt.getPropertyName().equals(IngestManager.IngestModuleEvent.COMPLETED.toString()) || evt.getPropertyName().equals(IngestManager.IngestModuleEvent.STOPPED.toString()); + return evt.getPropertyName().equals(IngestManager.IngestEvent.STARTED.toString()) || evt.getPropertyName().equals(IngestManager.IngestEvent.COMPLETED.toString()) || evt.getPropertyName().equals(IngestManager.IngestEvent.STOPPED.toString()); } @Override diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel.java index 6e36f42fd5..a738a98ebb 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchConfigurationPanel.java @@ -25,8 +25,7 @@ import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel; /** * Global options panel for keyword searching. */ -// RJCTODO: Why is this a public class? -public final class KeywordSearchConfigurationPanel extends IngestModuleGlobalSetttingsPanel implements OptionsPanel { +final class KeywordSearchConfigurationPanel extends IngestModuleGlobalSetttingsPanel implements OptionsPanel { private KeywordSearchConfigurationPanel1 listsPanel; private KeywordSearchConfigurationPanel3 languagesPanel; @@ -74,13 +73,13 @@ public final class KeywordSearchConfigurationPanel extends IngestModuleGlobalSet @Override public void load() { - // This calls actually clears the component. RJCTODO: Krazy! + // This calls actually clears the component. listsPanel.load(); languagesPanel.load(); generalPanel.load(); - // Reload the XML to avoid 'ghost' vars RJCTODO: What does this mean? + // Reload the XML to avoid 'ghost' vars KeywordSearchListsXML.getCurrent().reload(); } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java index c744e65973..623fc73cfa 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java @@ -47,7 +47,7 @@ import javax.swing.table.TableCellRenderer; import javax.swing.table.TableColumn; import org.sleuthkit.autopsy.corecomponents.OptionsPanel; import org.sleuthkit.autopsy.ingest.IngestManager; -import org.sleuthkit.autopsy.ingest.IngestManager.IngestModuleEvent; +import org.sleuthkit.autopsy.ingest.IngestManager.IngestEvent; import org.sleuthkit.datamodel.BlackboardAttribute; /** @@ -171,13 +171,13 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec public void propertyChange(PropertyChangeEvent evt) { String changed = evt.getPropertyName(); Object oldValue = evt.getOldValue(); - if (changed.equals(IngestModuleEvent.COMPLETED.toString() ) + if (changed.equals(IngestEvent.COMPLETED.toString() ) && ((String) oldValue).equals(KeywordSearchModuleFactory.getModuleName())) { initIngest(1); - } else if (changed.equals(IngestModuleEvent.STARTED.toString() ) + } else if (changed.equals(IngestEvent.STARTED.toString() ) && ((String) oldValue).equals(KeywordSearchModuleFactory.getModuleName())) { initIngest(0); - } else if (changed.equals(IngestModuleEvent.STOPPED.toString() ) + } else if (changed.equals(IngestEvent.STOPPED.toString() ) && ((String) oldValue).equals(KeywordSearchModuleFactory.getModuleName())) { initIngest(1); } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsAbstract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsAbstract.java index eeb3d57f33..49ebd2a82d 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsAbstract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsAbstract.java @@ -173,7 +173,7 @@ abstract class KeywordSearchListsAbstract { } // RJCTODO: Need a manager of getting lists - // RJCTODO: There is onient, KeywordSearchEditListPanel, fetching unlocked lists + // RJCTODO: There is one client, KeywordSearchEditListPanel, fetching unlocked lists public List getListsL(boolean locked) { List ret = new ArrayList<>(); for (KeywordList list : theLists.values()) { @@ -184,7 +184,7 @@ abstract class KeywordSearchListsAbstract { return ret; } - // RJCTODO: one perhaps weird use by KeywordSearchListsManagementPanel, for manager, since global list affected + // RJCTODO: Used by KeywordSearchListsManagementPanel; for manager, since global list affected /** * Get list names of all loaded keyword list names * @@ -194,7 +194,7 @@ abstract class KeywordSearchListsAbstract { return new ArrayList<>(theLists.keySet()); } - // RJCTODO: one perhaps weird use by KeywordSearchListsManagementPanel, for manager, since global list affected + // RJCTODO: Used by KeywordSearchListsManagementPanel; for manager, since global list affected /** * Get list names of all locked or unlocked loaded keyword list names * @@ -213,24 +213,6 @@ abstract class KeywordSearchListsAbstract { return lists; } - // RJCTODO: Not used - /** - * return first list that contains the keyword - * - * @param keyword - * @return found list or null - */ -// public KeywordList getListWithKeyword(Keyword keyword) { -// KeywordList found = null; -// for (KeywordList list : theLists.values()) { -// if (list.hasKeyword(keyword)) { -// found = list; -// break; -// } -// } -// return found; -// } - /** * return first list that contains the keyword * diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java index d5edf525e4..ba8f51d474 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java @@ -41,7 +41,7 @@ import org.openide.util.NbBundle; import org.openide.util.actions.SystemAction; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.ingest.IngestManager; -import org.sleuthkit.autopsy.ingest.IngestManager.IngestModuleEvent; +import org.sleuthkit.autopsy.ingest.IngestManager.IngestEvent; /** * Viewer panel widget for keyword lists that is used in the ingest config and options area. @@ -125,13 +125,13 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer { public void propertyChange(PropertyChangeEvent evt) { String changed = evt.getPropertyName(); Object oldValue = evt.getOldValue(); - if (changed.equals(IngestModuleEvent.COMPLETED.toString()) + if (changed.equals(IngestEvent.COMPLETED.toString()) && ((String) oldValue).equals(KeywordSearchModuleFactory.getModuleName())) { initIngest(false); - } else if (changed.equals(IngestModuleEvent.STARTED.toString()) + } else if (changed.equals(IngestEvent.STARTED.toString()) && ((String) oldValue).equals(KeywordSearchModuleFactory.getModuleName())) { initIngest(true); - } else if (changed.equals(IngestModuleEvent.STOPPED.toString()) + } else if (changed.equals(IngestEvent.STOPPED.toString()) && ((String) oldValue).equals(KeywordSearchModuleFactory.getModuleName())) { initIngest(false); } diff --git a/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java b/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java index 295f26e8b1..22ac5fdb64 100644 --- a/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java +++ b/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java @@ -112,7 +112,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges @Override public ProcessResult process(AbstractFile abstractFile) { - ScalpelCarver.init(); // RJCTODO: Is this SclapelCarver class thread-safe? + ScalpelCarver.init(); // RJCTODO: Is this ScalpelCarver class thread-safe? if (!initialized) { return ProcessResult.OK; diff --git a/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java b/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java index c371f9fcfc..2478befdd6 100644 --- a/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java +++ b/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java @@ -287,7 +287,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i } if (derivedFiles.isEmpty() == false) { - for (AbstractFile derived : derivedFiles) { // RJCTODO: May want to add bulk method + for (AbstractFile derived : derivedFiles) { services.fireModuleContentEvent(new ModuleContentEvent(derived)); } }