From 4f8617a16aa5d730dae274ee52a42d597d3ef54b Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Wed, 26 Mar 2014 17:12:24 -0400 Subject: [PATCH] Tidied up ingest framework API --- .../autopsy/casemodule/AddImageAction.java | 2 +- .../casemodule/services/FileManager.java | 2 +- .../DirectoryTreeFilterNode.java | 4 +- .../DataSourceIngestModuleStatusHelper.java | 2 +- .../autopsy/ingest/IngestJobContext.java | 4 +- .../autopsy/ingest/IngestJobLauncher.java | 2 +- .../autopsy/ingest/IngestManager.java | 22 +++--- .../ingest/IngestMessageTopComponent.java | 4 +- .../ingest/IngestModuleFactoryAdapter.java | 2 +- .../autopsy/ingest/IngestMonitor.java | 4 +- .../autopsy/ingest/IngestServices.java | 67 ++++++++----------- .../sleuthkit/autopsy/ingest/Installer.java | 2 +- ...a => NoIngestModuleIngestJobSettings.java} | 2 +- ...ialog.java => RunIngestModulesDialog.java} | 14 ++-- .../autopsy/report/ReportBodyFile.java | 2 +- .../sleuthkit/autopsy/report/ReportHTML.java | 2 +- .../ExifParserFileIngestModule.java | 2 +- ...ExtMismatchContextMenuActionsProvider.java | 2 +- .../FileExtMismatchIngestModule.java | 2 +- .../filetypeid/FileTypeIdIngestModule.java | 2 +- .../AddContentToHashDbAction.java | 2 +- .../hashdatabase/HashDbIngestModule.java | 2 +- .../autopsy/hashdatabase/HashDbManager.java | 2 +- .../hashdatabase/HashDbSearchPanel.java | 2 +- .../hashdatabase/HashLookupSettingsPanel.java | 4 +- .../AbstractKeywordSearchPerformer.java | 2 +- .../KeywordSearchEditListPanel.java | 2 +- ...wordSearchGlobalLanguageSettingsPanel.java | 2 +- ...eywordSearchGlobalSearchSettingsPanel.java | 2 +- .../KeywordSearchIngestModule.java | 2 +- .../KeywordSearchListsViewerPanel.java | 2 +- .../KeywordSearchResultFactory.java | 2 +- .../autopsy/recentactivity/Chrome.java | 20 +++--- .../autopsy/recentactivity/ExtractIE.java | 8 +-- .../recentactivity/ExtractRegistry.java | 4 +- .../autopsy/recentactivity/Firefox.java | 12 ++-- .../recentactivity/RAImageIngestModule.java | 4 +- .../recentactivity/RecentDocumentsByLnk.java | 4 +- .../SearchEngineURLQueryAnalyzer.java | 6 +- .../scalpel/ScalpelCarverIngestModule.java | 4 +- .../sevenzip/SevenZipIngestModule.java | 4 +- .../sleuthkit/autopsy/timeline/Timeline.java | 2 +- .../ewfverify/EwfVerifyIngestModule.java | 4 +- .../ThunderbirdMboxFileIngestModule.java | 4 +- 44 files changed, 119 insertions(+), 128 deletions(-) rename Core/src/org/sleuthkit/autopsy/ingest/{NoIngestModuleSettings.java => NoIngestModuleIngestJobSettings.java} (92%) rename Core/src/org/sleuthkit/autopsy/ingest/{IngestDialog.java => RunIngestModulesDialog.java} (90%) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java index 63221d3e8b..b0be07d43c 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageAction.java @@ -108,7 +108,7 @@ public final class AddImageAction extends CallableSystemAction implements Presen public void actionPerformed(ActionEvent e) { Logger.noteAction(AddImageAction.class); - if (IngestManager.getDefault().isIngestRunning()) { + if (IngestManager.getInstance().isIngestRunning()) { final String msg = NbBundle.getMessage(this.getClass(), "AddImageAction.ingestConfig.ongoingIngest.msg"); if (JOptionPane.showConfirmDialog(null, msg, NbBundle.getMessage(this.getClass(), diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java b/Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java index 192632eecf..20401a8b9f 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java @@ -282,7 +282,7 @@ public class FileManager implements Closeable { //for now reusing ingest events, in future this will be replaced by datamodel / observer sending out events // @@@ Is this the right place for this? A directory tree refresh will be triggered, so this may be creating a race condition // since the transaction is not yet committed. - IngestServices.getDefault().fireModuleContentEvent(new ModuleContentEvent(localFileAdded)); + IngestServices.getInstance().fireModuleContentEvent(new ModuleContentEvent(localFileAdded)); } } diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java index 3070ccb278..bb7a5abd65 100755 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeFilterNode.java @@ -33,7 +33,7 @@ import org.openide.util.lookup.ProxyLookup; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.datamodel.AbstractContentNode; import org.sleuthkit.autopsy.datamodel.DisplayableItemNode; -import org.sleuthkit.autopsy.ingest.IngestDialog; +import org.sleuthkit.autopsy.ingest.RunIngestModulesDialog; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.Directory; @@ -116,7 +116,7 @@ class DirectoryTreeFilterNode extends FilterNode { NbBundle.getMessage(this.getClass(), "DirectoryTreeFilterNode.action.runIngestMods.text")) { @Override public void actionPerformed(ActionEvent e) { - final IngestDialog ingestDialog = new IngestDialog(); + final RunIngestModulesDialog ingestDialog = new RunIngestModulesDialog(); ingestDialog.setDataSources(Collections.singletonList(content)); ingestDialog.display(); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestModuleStatusHelper.java b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestModuleStatusHelper.java index db71c51fb7..87b670bb1a 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestModuleStatusHelper.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestModuleStatusHelper.java @@ -45,7 +45,7 @@ public class DataSourceIngestModuleStatusHelper { * * @return True if the task has been canceled, false otherwise. */ - public boolean isCancelled() { + public boolean isIngestJobCancelled() { return worker.isCancelled(); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java index 7984370d6f..7d0301ce5c 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobContext.java @@ -58,9 +58,9 @@ public final class IngestJobContext { * * @param files The files to be processed by the file ingest pipeline. */ - public void addFilesToPipeline(List files) { + public void addFiles(List files) { for (AbstractFile file : files) { - IngestManager.getDefault().scheduleFile(ingestJob.getId(), file); + IngestManager.getInstance().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 261647319b..0d4675d4a0 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java @@ -232,7 +232,7 @@ public final class IngestJobLauncher { } if ((!enabledModuleTemplates.isEmpty()) && (dataSources != null) && (!dataSources.isEmpty())) { - IngestManager.getDefault().scheduleDataSourceTasks(dataSources, enabledModuleTemplates, ingestConfigPanel.getProcessUnallocSpace()); + IngestManager.getInstance().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 dd9222fba7..5e3746fe5b 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -111,7 +111,7 @@ public class IngestManager { * * @returns Instance of class. */ - synchronized public static IngestManager getDefault() { + synchronized public static IngestManager getInstance() { if (instance == null) { instance = new IngestManager(); } @@ -409,7 +409,7 @@ public class IngestManager { if (progress != null) { progress.setDisplayName(displayName + " (Cancelling...)"); } - IngestManager.getDefault().stopAll(); + IngestManager.getInstance().stopAll(); return true; } }); @@ -509,7 +509,7 @@ public class IngestManager { "IngestManager.DataSourceTaskWorker.process.cancelling", "Data source ingest")); } - IngestManager.getDefault().stopAll(); + IngestManager.getInstance().stopAll(); return true; } }); @@ -529,7 +529,7 @@ public class IngestManager { } logger.log(Level.INFO, "Data source ingest thread (id={0}) completed", this.id); - IngestManager.getDefault().reportThreadDone(this.id); + IngestManager.getInstance().reportThreadDone(this.id); return null; } @@ -539,11 +539,11 @@ public class IngestManager { super.get(); } catch (CancellationException | InterruptedException e) { logger.log(Level.INFO, "Data source ingest thread (id={0}) cancelled", this.id); - IngestManager.getDefault().reportThreadDone(this.id); + IngestManager.getInstance().reportThreadDone(this.id); } catch (Exception ex) { String message = String.format("Data source ingest thread (id=%d) experienced a fatal error", this.id); logger.log(Level.SEVERE, message, ex); - IngestManager.getDefault().reportThreadDone(this.id); + IngestManager.getInstance().reportThreadDone(this.id); } finally { progress.finish(); } @@ -580,7 +580,7 @@ public class IngestManager { NbBundle.getMessage(this.getClass(), "IngestManager.FileTaskWorker.process.cancelling", displayName)); } - IngestManager.getDefault().stopAll(); + IngestManager.getInstance().stopAll(); return true; } }); @@ -593,7 +593,7 @@ public class IngestManager { int processedFiles = 0; while (fileScheduler.hasNext()) { if (isCancelled()) { - IngestManager.getDefault().reportThreadDone(this.id); + IngestManager.getInstance().reportThreadDone(this.id); logger.log(Level.INFO, "File ingest thread (id={0}) cancelled", this.id); return null; } @@ -617,7 +617,7 @@ public class IngestManager { } logger.log(Level.INFO, "File ingest thread (id={0}) completed", this.id); - IngestManager.getDefault().reportThreadDone(this.id); + IngestManager.getInstance().reportThreadDone(this.id); return null; } @@ -627,11 +627,11 @@ public class IngestManager { super.get(); } catch (CancellationException | InterruptedException e) { logger.log(Level.INFO, "File ingest thread (id={0}) cancelled", this.id); - IngestManager.getDefault().reportThreadDone(this.id); + IngestManager.getInstance().reportThreadDone(this.id); } catch (Exception ex) { String message = String.format("File ingest thread {0} experienced a fatal error", this.id); logger.log(Level.SEVERE, message, ex); - IngestManager.getDefault().reportThreadDone(this.id); + IngestManager.getInstance().reportThreadDone(this.id); } finally { progress.finish(); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java index 13acce0d2d..d8971c476e 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMessageTopComponent.java @@ -126,7 +126,7 @@ import org.sleuthkit.datamodel.Content; super.componentOpened(); //create manager instance if (manager == null) { - manager = IngestManager.getDefault(); + manager = IngestManager.getInstance(); } } @@ -221,7 +221,7 @@ import org.sleuthkit.datamodel.Content; } //stop workers if running if (manager == null) { - manager = IngestManager.getDefault(); + manager = IngestManager.getInstance(); } try { manager.stopAll(); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryAdapter.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryAdapter.java index 75a6b79a75..9c24944b29 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryAdapter.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryAdapter.java @@ -45,7 +45,7 @@ public abstract class IngestModuleFactoryAdapter implements IngestModuleFactory @Override public IngestModuleIngestJobSettings getDefaultModuleSettings() { - return new NoIngestModuleSettings(); + return new NoIngestModuleIngestJobSettings(); } @Override diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java index ba7d21428f..dde9704379 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestMonitor.java @@ -151,7 +151,7 @@ public final class IngestMonitor { @Override public void actionPerformed(ActionEvent e) { - final IngestManager manager = IngestManager.getDefault(); + final IngestManager manager = IngestManager.getInstance(); //runs checks only if ingest is running if (manager.isIngestRunning() == false) { @@ -166,7 +166,7 @@ public final class IngestMonitor { MONITOR_LOGGER.log(Level.SEVERE, "Stopping ingest due to low disk space on disk " + diskPath); logger.log(Level.SEVERE, "Stopping ingest due to low disk space on disk " + diskPath); manager.stopAll(); - IngestServices.getDefault().postMessage(IngestMessage.createManagerErrorMessage( + IngestServices.getInstance().postMessage(IngestMessage.createManagerErrorMessage( NbBundle.getMessage(this.getClass(), "IngestMonitor.mgrErrMsg.lowDiskSpace.title", diskPath), NbBundle.getMessage(this.getClass(), "IngestMonitor.mgrErrMsg.lowDiskSpace.msg", diskPath))); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestServices.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestServices.java index b269afb50f..8efe079e1d 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestServices.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestServices.java @@ -19,11 +19,9 @@ package org.sleuthkit.autopsy.ingest; import java.util.Map; -import java.util.logging.Level; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.ModuleSettings; -import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.SleuthkitCase; /** @@ -33,12 +31,10 @@ import org.sleuthkit.datamodel.SleuthkitCase; */ public final class IngestServices { - private static final Logger logger = Logger.getLogger(IngestServices.class.getName()); - private IngestManager manager; - private static IngestServices instance; + private static IngestServices instance = null; + private final IngestManager manager = IngestManager.getInstance(); private IngestServices() { - this.manager = IngestManager.getDefault(); } /** @@ -46,7 +42,7 @@ public final class IngestServices { * * @return The ingest services singleton. */ - public static synchronized IngestServices getDefault() { + public static synchronized IngestServices getInstance() { if (instance == null) { instance = new IngestServices(); } @@ -54,7 +50,7 @@ public final class IngestServices { } /** - * Get the current Autopsy case. + * Get the current Autopsy case. * * @return The current case. */ @@ -71,17 +67,17 @@ public final class IngestServices { return Case.getCurrentCase().getSleuthkitCase(); } - /** - * Get a logger that incorporates the display name of an ingest module in + /** + * Get a logger that incorporates the display name of an ingest module in * messages written to the Autopsy log files. - * + * * @param moduleClassName The display name of the ingest module. - * @return The custom logger for the ingest module. + * @return The custom logger for the ingest module. */ public Logger getLogger(String moduleDisplayName) { return Logger.getLogger(moduleDisplayName); } - + /** * Post message to the ingest messages in box. * @@ -90,21 +86,10 @@ public final class IngestServices { public void postMessage(final IngestMessage message) { manager.postIngestMessage(message); } - - /** - * Fire module event to notify registered module event listeners - * - * @param eventType the event type, defined in - * IngestManager.IngestManagerEvents - * @param moduleName the module name - */ - public void fireModuleEvent(String eventType, String moduleName) { - IngestManager.fireModuleEvent(eventType, moduleName); - } - + /** * Fire module data event to notify registered module data event listeners - * that there is new data of a given type from a module + * that there is new data of a given type from a module. * * @param moduleDataEvent module data event, encapsulating blackboard * artifact data @@ -133,10 +118,11 @@ public final class IngestServices { */ public long getFreeDiskSpace() { return manager.getFreeDiskSpace(); - } - - /** + } + + /** * Gets a specific name/value configuration setting for a module + * * @param moduleName moduleName identifier unique to that module * @param settingName setting name to retrieve * @return setting value for the module / setting name, or null if not found @@ -144,9 +130,10 @@ public final class IngestServices { public String getConfigSetting(String moduleName, String settingName) { return ModuleSettings.getConfigSetting(moduleName, settingName); } - + /** * Sets a specific name/value configuration setting for a module + * * @param moduleName moduleName identifier unique to that module * @param settingName setting name to set * @param settingVal setting value to set @@ -154,23 +141,27 @@ public final class IngestServices { public void setConfigSetting(String moduleName, String settingName, String settingVal) { ModuleSettings.setConfigSetting(moduleName, settingName, settingVal); } - + /** * Gets all name/value configuration settings for a module + * * @param moduleName moduleName identifier unique to that module * @return settings for the module / setting name */ - public Map getConfigSettings(String moduleName) { + public Map getConfigSettings(String moduleName) { return ModuleSettings.getConfigSettings(moduleName); } - - /** - * Sets all name/value configuration setting for a module. Names not in the list will have settings preserved. + + /** + * Sets all name/value configuration setting for a module. Names not in the + * list will have settings preserved. + * * @param moduleName moduleName identifier unique to that module - * @param settings settings to set and replace old settings, keeping settings not specified in the map. - * + * @param settings settings to set and replace old settings, keeping + * settings not specified in the map. + * */ - public void setConfigSettings(String moduleName, Mapsettings) { + public void setConfigSettings(String moduleName, Map settings) { ModuleSettings.setConfigSettings(moduleName, settings); } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/Installer.java b/Core/src/org/sleuthkit/autopsy/ingest/Installer.java index 9ab47753f5..d6ba900084 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/Installer.java @@ -46,7 +46,7 @@ public class Installer extends ModuleInstall { Logger logger = Logger.getLogger(Installer.class.getName()); logger.log(Level.INFO, "Initializing ingest manager"); - final IngestManager manager = IngestManager.getDefault(); + final IngestManager manager = IngestManager.getInstance(); WindowManager.getDefault().invokeWhenUIReady(new Runnable() { @Override public void run() { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/NoIngestModuleSettings.java b/Core/src/org/sleuthkit/autopsy/ingest/NoIngestModuleIngestJobSettings.java similarity index 92% rename from Core/src/org/sleuthkit/autopsy/ingest/NoIngestModuleSettings.java rename to Core/src/org/sleuthkit/autopsy/ingest/NoIngestModuleIngestJobSettings.java index 4294e9d9b1..88f1a5f3cf 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/NoIngestModuleSettings.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/NoIngestModuleIngestJobSettings.java @@ -22,7 +22,7 @@ package org.sleuthkit.autopsy.ingest; * Implementation of the IngestModuleOptions interface for use by ingest modules * that do not have per ingest job options. */ -public final class NoIngestModuleSettings implements IngestModuleIngestJobSettings { +public final class NoIngestModuleIngestJobSettings implements IngestModuleIngestJobSettings { private final String setting = "None"; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestDialog.java b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java similarity index 90% rename from Core/src/org/sleuthkit/autopsy/ingest/IngestDialog.java rename to Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java index 4c5aa4b28b..a31b92b27d 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestDialog.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/RunIngestModulesDialog.java @@ -37,19 +37,19 @@ 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 that has + * already been added to a case. */ -public final class IngestDialog extends JDialog { +public final class RunIngestModulesDialog extends JDialog { - private static final String TITLE = NbBundle.getMessage(IngestDialog.class, "IngestDialog.title.text"); + private static final String TITLE = NbBundle.getMessage(RunIngestModulesDialog.class, "IngestDialog.title.text"); private static Dimension DIMENSIONS = new Dimension(500, 300); private List dataSources = new ArrayList<>(); private IngestJobLauncher ingestJobLauncher; - public IngestDialog(JFrame frame, String title, boolean modal) { + public RunIngestModulesDialog(JFrame frame, String title, boolean modal) { super(frame, title, modal); - ingestJobLauncher = new IngestJobLauncher(IngestDialog.class.getCanonicalName()); + ingestJobLauncher = new IngestJobLauncher(RunIngestModulesDialog.class.getCanonicalName()); List messages = ingestJobLauncher.getIngestJobConfigWarnings(); if (messages.isEmpty() == false) { StringBuilder warning = new StringBuilder(); @@ -60,7 +60,7 @@ public final class IngestDialog extends JDialog { } } - public IngestDialog() { + public RunIngestModulesDialog() { this(new JFrame(TITLE), TITLE, true); } diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java b/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java index d49c630774..ef7772fa3e 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java @@ -91,7 +91,7 @@ import org.sleuthkit.datamodel.*; // Check if ingest has finished String ingestwarning = ""; - if (IngestManager.getDefault().isIngestRunning()) { + if (IngestManager.getInstance().isIngestRunning()) { ingestwarning = NbBundle.getMessage(this.getClass(), "ReportBodyFile.ingestWarning.text"); } diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index bdab0da9d9..b06874271f 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -963,7 +963,7 @@ import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM; StringBuilder summary = new StringBuilder(); boolean running = false; - if (IngestManager.getDefault().isIngestRunning() || IngestManager.getDefault().isIngestRunning()) { + if (IngestManager.getInstance().isIngestRunning()) { running = true; } diff --git a/ExifParser/src/org/sleuthkit/autopsy/exifparser/ExifParserFileIngestModule.java b/ExifParser/src/org/sleuthkit/autopsy/exifparser/ExifParserFileIngestModule.java index a0537977f1..58656cdc80 100644 --- a/ExifParser/src/org/sleuthkit/autopsy/exifparser/ExifParserFileIngestModule.java +++ b/ExifParser/src/org/sleuthkit/autopsy/exifparser/ExifParserFileIngestModule.java @@ -56,7 +56,7 @@ import org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM; public final class ExifParserFileIngestModule extends IngestModuleAdapter implements FileIngestModule { private static final Logger logger = Logger.getLogger(ExifParserFileIngestModule.class.getName()); - private final IngestServices services = IngestServices.getDefault(); + private final IngestServices services = IngestServices.getInstance(); private int filesProcessed = 0; private boolean filesToFire = false; diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchContextMenuActionsProvider.java b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchContextMenuActionsProvider.java index 2409baee49..73907a04ac 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchContextMenuActionsProvider.java +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchContextMenuActionsProvider.java @@ -50,7 +50,7 @@ public class FileExtMismatchContextMenuActionsProvider implements ContextMenuAct ArrayList actions = new ArrayList<>(); // Ignore if file ingest is in progress. - if (!IngestManager.getDefault().isIngestRunning()) { + if (!IngestManager.getInstance().isIngestRunning()) { final Collection selectedArts = Utilities.actionsGlobalContext().lookupAll(BlackboardArtifact.class); diff --git a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java index 42cd7e699a..417a47cb24 100644 --- a/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java +++ b/FileExtMismatch/src/org/sleuthkit/autopsy/fileextmismatch/FileExtMismatchIngestModule.java @@ -48,7 +48,7 @@ public class FileExtMismatchIngestModule extends IngestModuleAdapter implements private static final Logger logger = Logger.getLogger(FileExtMismatchIngestModule.class.getName()); private static int messageId = 0; // RJCTODO: This is not thread safe - private final IngestServices services = IngestServices.getDefault(); + private final IngestServices services = IngestServices.getInstance(); private final FileExtMismatchDetectorModuleSettings settings; private HashMap SigTypeToExtMap = new HashMap<>(); private long processTime = 0; diff --git a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java index 858a4a7d7f..135f6899a9 100644 --- a/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java +++ b/FileTypeId/src/org/sleuthkit/autopsy/filetypeid/FileTypeIdIngestModule.java @@ -109,7 +109,7 @@ public class FileTypeIdIngestModule extends IngestModuleAdapter implements FileI .append(NbBundle.getMessage(this.getClass(), "FileTypeIdIngestModule.complete.totalFiles")) .append("").append(numFiles).append("\n"); detailsSb.append(""); - IngestServices.getDefault().postMessage(IngestMessage.createMessage(++messageId, IngestMessage.MessageType.INFO, FileTypeIdModuleFactory.getModuleName(), + IngestServices.getInstance().postMessage(IngestMessage.createMessage(++messageId, IngestMessage.MessageType.INFO, FileTypeIdModuleFactory.getModuleName(), NbBundle.getMessage(this.getClass(), "FileTypeIdIngestModule.complete.srvMsg.text"), detailsSb.toString())); diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/AddContentToHashDbAction.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/AddContentToHashDbAction.java index c94b2c95e0..da48f3b0ca 100755 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/AddContentToHashDbAction.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/AddContentToHashDbAction.java @@ -82,7 +82,7 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter super(SINGLE_SELECTION_NAME); // Disable the menu if file ingest is in progress. - if (IngestManager.getDefault().isIngestRunning()) { + if (IngestManager.getInstance().isIngestRunning()) { setEnabled(false); return; } diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java index 82d3f83e14..45dad3ccca 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java @@ -48,7 +48,7 @@ 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 - private final IngestServices services = IngestServices.getDefault(); + private final IngestServices services = IngestServices.getInstance(); private final Hash hasher = new Hash(); private final SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); private final HashDbManager hashDbManager = HashDbManager.getInstance(); diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbManager.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbManager.java index 06c99d2adb..22a12bdb3b 100755 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbManager.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbManager.java @@ -345,7 +345,7 @@ public class HashDbManager implements PropertyChangeListener { */ public synchronized void removeHashDatabase(HashDb hashDb) throws HashDbManagerException { // Don't remove a database if ingest is running - boolean ingestIsRunning = IngestManager.getDefault().isIngestRunning(); + boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning(); if (ingestIsRunning) { throw new HashDbManagerException(NbBundle.getMessage(this.getClass(), "HashDbManager.ingestRunningExceptionMsg")); } diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchPanel.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchPanel.java index 9df96dd09e..dd23ce2c78 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchPanel.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbSearchPanel.java @@ -55,7 +55,7 @@ import org.sleuthkit.autopsy.ingest.IngestManager; * Check if ingest is currently running and refresh the panel accordingly. */ public void refresh() { - boolean running = IngestManager.getDefault().isIngestRunning(); + boolean running = IngestManager.getInstance().isIngestRunning(); if(running) { titleLabel.setForeground(Color.red); titleLabel.setText(NbBundle.getMessage(this.getClass(), "HashDbSearchPanel.titleText.ingestOngoing")); diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java index c84dd442b1..02b307fc8f 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java @@ -105,7 +105,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSetttingsPa } private void updateComponentsForNoSelection() { - boolean ingestIsRunning = IngestManager.getDefault().isIngestRunning(); + boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning(); // Update descriptive labels. hashDbNameLabel.setText(NO_SELECTION_TEXT); @@ -135,7 +135,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSetttingsPa } private void updateComponentsForSelection(HashDb db) { - boolean ingestIsRunning = IngestManager.getDefault().isIngestRunning(); + boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning(); // Update descriptive labels. hashDbNameLabel.setText(db.getHashSetName()); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractKeywordSearchPerformer.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractKeywordSearchPerformer.java index 54779a4dab..b69eef4fe6 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractKeywordSearchPerformer.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractKeywordSearchPerformer.java @@ -86,7 +86,7 @@ abstract class AbstractKeywordSearchPerformer extends javax.swing.JPanel impleme @Override public void search() { - boolean isIngestRunning = IngestManager.getDefault().isIngestRunning(); + boolean isIngestRunning = IngestManager.getInstance().isIngestRunning(); if (filesIndexed == 0) { if (isIngestRunning) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java index 4d0d3f75c0..0014a785e0 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java @@ -124,7 +124,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec pasteMenuItem.addActionListener(actList); selectAllMenuItem.addActionListener(actList); - if (IngestManager.getDefault().isIngestRunning()) { + if (IngestManager.getInstance().isIngestRunning()) { initIngest(0); } else { initIngest(1); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalLanguageSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalLanguageSettingsPanel.java index 5fc9649427..b325d566a0 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalLanguageSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalLanguageSettingsPanel.java @@ -130,7 +130,7 @@ class KeywordSearchGlobalLanguageSettingsPanel extends javax.swing.JPanel implem enableUTF8Checkbox.setSelected(utf8); final boolean extractEnabled = utf16 || utf8; - boolean ingestNotRunning = !IngestManager.getDefault().isIngestRunning() && !IngestManager.getDefault().isIngestRunning(); + boolean ingestNotRunning = !IngestManager.getInstance().isIngestRunning() && !IngestManager.getInstance().isIngestRunning(); //enable / disable checboxes activateScriptsCheckboxes(extractEnabled && ingestNotRunning); enableUTF16Checkbox.setEnabled(ingestNotRunning); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSearchSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSearchSettingsPanel.java index b61601aa93..1bc9cccc73 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSearchSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSearchSettingsPanel.java @@ -44,7 +44,7 @@ class KeywordSearchGlobalSearchSettingsPanel extends javax.swing.JPanel implemen private void activateWidgets() { skipNSRLCheckBox.setSelected(KeywordSearchSettings.getSkipKnown()); showSnippetsCB.setSelected(KeywordSearchSettings.getShowSnippets()); - boolean enable = !IngestManager.getDefault().isIngestRunning(); + boolean enable = !IngestManager.getInstance().isIngestRunning(); skipNSRLCheckBox.setEnabled(enable); setTimeSettingEnabled(enable); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java index bba7b7fbe6..867e59eb16 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java @@ -95,7 +95,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme } }; private static final Logger logger = Logger.getLogger(KeywordSearchIngestModule.class.getName()); - private IngestServices services = IngestServices.getDefault(); + private IngestServices services = IngestServices.getInstance(); private Ingester ingester = null; private volatile boolean commitIndex = false; //whether to commit index next time private volatile boolean runSearcher = false; //whether to run searcher next time diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java index 6ff0770a16..de6d93a918 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchListsViewerPanel.java @@ -114,7 +114,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer { } }); - if (IngestManager.getDefault().isIngestRunning()) { + if (IngestManager.getInstance().isIngestRunning()) { initIngest(true); } else { initIngest(false); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchResultFactory.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchResultFactory.java index 46303382f7..5692b771c8 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchResultFactory.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchResultFactory.java @@ -543,7 +543,7 @@ class KeywordSearchResultFactory extends ChildFactory { }); if (!this.isCancelled() && !na.isEmpty()) { - IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(KeywordSearchModuleFactory.getModuleName(), ARTIFACT_TYPE.TSK_KEYWORD_HIT, na)); + IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(KeywordSearchModuleFactory.getModuleName(), ARTIFACT_TYPE.TSK_KEYWORD_HIT, na)); } } diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Chrome.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Chrome.java index 6a7086f207..8554fe04a7 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Chrome.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Chrome.java @@ -126,7 +126,7 @@ class Chrome extends Extract { continue; } File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } @@ -158,7 +158,7 @@ class Chrome extends Extract { dbFile.delete(); } - IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), + IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY)); } @@ -204,7 +204,7 @@ class Chrome extends Extract { logger.log(Level.INFO, "{0}- Now getting Bookmarks from {1}", new Object[]{moduleName, temps}); File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } @@ -300,7 +300,7 @@ class Chrome extends Extract { dbFile.delete(); } - IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK)); + IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK)); } /** @@ -344,7 +344,7 @@ class Chrome extends Extract { continue; } File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } @@ -378,7 +378,7 @@ class Chrome extends Extract { dbFile.delete(); } - IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE)); + IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE)); } /** @@ -420,7 +420,7 @@ class Chrome extends Extract { continue; } File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } @@ -467,7 +467,7 @@ class Chrome extends Extract { dbFile.delete(); } - IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), + IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD)); } @@ -511,7 +511,7 @@ class Chrome extends Extract { continue; } File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } @@ -552,7 +552,7 @@ class Chrome extends Extract { dbFile.delete(); } - IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY)); + IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent(NbBundle.getMessage(this.getClass(), "Chrome.parentModuleName"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY)); } private boolean isChromePreVersion30(String temps) { diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java index 8e8c0b020b..b1168dba98 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java @@ -60,7 +60,7 @@ import org.sleuthkit.datamodel.*; */ class ExtractIE extends Extract { private static final Logger logger = Logger.getLogger(ExtractIE.class.getName()); - private IngestServices services = IngestServices.getDefault(); + private IngestServices services = IngestServices.getInstance(); private String moduleTempResultsDir; private String PASCO_LIB_PATH; private String JAVA_PATH; @@ -110,7 +110,7 @@ class ExtractIE extends Extract { continue; } - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { break; } @@ -202,7 +202,7 @@ class ExtractIE extends Extract { dataFound = true; for (AbstractFile cookiesFile : cookiesFiles) { - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { break; } if (cookiesFile.getSize() == 0) { @@ -312,7 +312,7 @@ class ExtractIE extends Extract { //indexFileName = "index" + Long.toString(bbart.getArtifactID()) + ".dat"; temps = RAImageIngestModule.getRATempPath(currentCase, "IE") + File.separator + indexFileName; File datFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { break; } try { diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java index 4ec22f475d..5a75e9fbca 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java @@ -171,7 +171,7 @@ class ExtractRegistry extends Extract { continue; } - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { break; } @@ -187,7 +187,7 @@ class ExtractRegistry extends Extract { logger.log(Level.INFO, moduleName + "- Now getting registry information from " + regFileNameLocal); RegOutputFiles regOutputFiles = executeRegRip(regFileNameLocal, outputPathBase); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { break; } diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Firefox.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Firefox.java index 10fc9b1628..9cfd1f30ef 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Firefox.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Firefox.java @@ -58,7 +58,7 @@ class Firefox extends Extract { private static final String bookmarkQuery = "SELECT fk, moz_bookmarks.title, url, (moz_bookmarks.dateAdded/1000000) as dateAdded FROM moz_bookmarks INNER JOIN moz_places ON moz_bookmarks.fk=moz_places.id"; private static final String downloadQuery = "SELECT target, source,(startTime/1000000) as startTime, maxBytes FROM moz_downloads"; private static final String downloadQueryVersion24 = "SELECT url, content as target, (lastModified/1000000) as lastModified FROM moz_places, moz_annos WHERE moz_places.id = moz_annos.place_id AND moz_annos.anno_attribute_id = 3"; - private final IngestServices services = IngestServices.getDefault(); + private final IngestServices services = IngestServices.getInstance(); Firefox() { moduleName = NbBundle.getMessage(Firefox.class, "Firefox.moduleName"); @@ -111,7 +111,7 @@ class Firefox extends Extract { continue; } File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } @@ -195,7 +195,7 @@ class Firefox extends Extract { continue; } File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } @@ -278,7 +278,7 @@ class Firefox extends Extract { continue; } File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } @@ -392,7 +392,7 @@ class Firefox extends Extract { continue; } File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } @@ -504,7 +504,7 @@ class Firefox extends Extract { continue; } File dbFile = new File(temps); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { dbFile.delete(); break; } diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java index ea6406b627..3275252ae9 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java @@ -48,7 +48,7 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da private static int messageId = 0; private final List extracters = new ArrayList<>(); private final List browserExtracters = new ArrayList<>(); - private IngestServices services = IngestServices.getDefault(); + private IngestServices services = IngestServices.getInstance(); private StringBuilder subCompleted = new StringBuilder(); RAImageIngestModule() { @@ -93,7 +93,7 @@ public final class RAImageIngestModule extends IngestModuleAdapter implements Da for (int i = 0; i < extracters.size(); i++) { Extract extracter = extracters.get(i); - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { logger.log(Level.INFO, "Recent Activity has been canceled, quitting before {0}", extracter.getName()); break; } diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RecentDocumentsByLnk.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RecentDocumentsByLnk.java index 8a7286b1d1..47827a7ce0 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RecentDocumentsByLnk.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RecentDocumentsByLnk.java @@ -48,7 +48,7 @@ import org.sleuthkit.datamodel.*; */ class RecentDocumentsByLnk extends Extract { private static final Logger logger = Logger.getLogger(RecentDocumentsByLnk.class.getName()); - private IngestServices services = IngestServices.getDefault(); + private IngestServices services = IngestServices.getInstance(); /** * Find the documents that Windows stores about recent documents and make artifacts. @@ -76,7 +76,7 @@ class RecentDocumentsByLnk extends Extract { dataFound = true; for (AbstractFile recentFile : recentFiles) { - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { break; } diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/SearchEngineURLQueryAnalyzer.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/SearchEngineURLQueryAnalyzer.java index 1af67376c1..b57eb19a66 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/SearchEngineURLQueryAnalyzer.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/SearchEngineURLQueryAnalyzer.java @@ -255,7 +255,7 @@ class SearchEngineURLQueryAnalyzer extends Extract { Collection listAttributes = currentCase.getSleuthkitCase().getMatchingAttributes("Where `artifact_id` = " + artifact.getArtifactID()); getAttributes: for (BlackboardAttribute attribute : listAttributes) { - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { break getAll; //User cancled the process. } if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL.getTypeID()) { @@ -292,10 +292,10 @@ class SearchEngineURLQueryAnalyzer extends Extract { } catch (TskException e) { logger.log(Level.SEVERE, "Encountered error retrieving artifacts for search engine queries", e); } finally { - if (controller.isCancelled()) { + if (controller.isIngestJobCancelled()) { logger.info("Operation terminated by user."); } - IngestServices.getDefault().fireModuleDataEvent(new ModuleDataEvent( + IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent( NbBundle.getMessage(this.getClass(), "SearchEngineURLQueryAnalyzer.parentModuleName.noSpace"), BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY)); logger.info("Extracted " + totalQueries + " queries from the blackboard"); diff --git a/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java b/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java index 22ac5fdb64..5a0bc208a6 100644 --- a/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java +++ b/ScalpelCarver/src/org/sleuthkit/autopsy/scalpel/ScalpelCarverIngestModule.java @@ -201,7 +201,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges } // get the IngestServices object - IngestServices is = IngestServices.getDefault(); + IngestServices is = IngestServices.getInstance(); // get the parent directory of the carved files Content carvedFileDir = null; @@ -221,7 +221,7 @@ class ScalpelCarverIngestModule extends IngestModuleAdapter implements FileInges } // reschedule carved files - context.addFilesToPipeline(new ArrayList(carvedFiles)); + context.addFiles(new ArrayList(carvedFiles)); return ProcessResult.OK; } diff --git a/SevenZip/src/org/sleuthkit/autopsy/sevenzip/SevenZipIngestModule.java b/SevenZip/src/org/sleuthkit/autopsy/sevenzip/SevenZipIngestModule.java index 3bdd936de0..b5778984bf 100644 --- a/SevenZip/src/org/sleuthkit/autopsy/sevenzip/SevenZipIngestModule.java +++ b/SevenZip/src/org/sleuthkit/autopsy/sevenzip/SevenZipIngestModule.java @@ -68,7 +68,7 @@ import org.sleuthkit.autopsy.ingest.ModuleDataEvent; public final class SevenZipIngestModule extends IngestModuleAdapter implements FileIngestModule { private static final Logger logger = Logger.getLogger(SevenZipIngestModule.class.getName()); - private IngestServices services = IngestServices.getDefault(); + private IngestServices services = IngestServices.getInstance(); private volatile int messageID = 0; // RJCTODO: This is not actually thread safe static final String[] SUPPORTED_EXTENSIONS = {"zip", "rar", "arj", "7z", "7zip", "gzip", "gz", "bzip2", "tar", "tgz",}; // "iso"}; private String unpackDir; //relative to the case, to store in db @@ -174,7 +174,7 @@ public final class SevenZipIngestModule extends IngestModuleAdapter implements F List unpackedFiles = unpack(abstractFile); if (!unpackedFiles.isEmpty()) { sendNewFilesEvent(abstractFile, unpackedFiles); - context.addFilesToPipeline(unpackedFiles); + context.addFiles(unpackedFiles); } return ProcessResult.OK; diff --git a/Timeline/src/org/sleuthkit/autopsy/timeline/Timeline.java b/Timeline/src/org/sleuthkit/autopsy/timeline/Timeline.java index c21e7a5649..74bde34f56 100644 --- a/Timeline/src/org/sleuthkit/autopsy/timeline/Timeline.java +++ b/Timeline/src/org/sleuthkit/autopsy/timeline/Timeline.java @@ -1164,7 +1164,7 @@ public class Timeline extends CallableSystemAction implements Presenter.Toolbar, logger.log(Level.INFO, "Error creating timeline, there are no data sources. "); } else { - if (IngestManager.getDefault().isIngestRunning()) { + if (IngestManager.getInstance().isIngestRunning()) { int answer = JOptionPane.showConfirmDialog(new JFrame(), NbBundle.getMessage(this.getClass(), "Timeline.initTimeline.confDlg.genBeforeIngest.msg"), diff --git a/ewfVerify/src/org/sleuthkit/autopsy/ewfverify/EwfVerifyIngestModule.java b/ewfVerify/src/org/sleuthkit/autopsy/ewfverify/EwfVerifyIngestModule.java index 4e93987fa3..e0c7819377 100755 --- a/ewfVerify/src/org/sleuthkit/autopsy/ewfverify/EwfVerifyIngestModule.java +++ b/ewfVerify/src/org/sleuthkit/autopsy/ewfverify/EwfVerifyIngestModule.java @@ -45,7 +45,7 @@ public class EwfVerifyIngestModule extends IngestModuleAdapter implements DataSo private static final Logger logger = Logger.getLogger(EwfVerifyIngestModule.class.getName()); private static final long DEFAULT_CHUNK_SIZE = 32 * 1024; - private static final IngestServices services = IngestServices.getDefault(); + private static final IngestServices services = IngestServices.getInstance(); private Image img; private String imgName; private MessageDigest messageDigest; @@ -146,7 +146,7 @@ public class EwfVerifyIngestModule extends IngestModuleAdapter implements DataSo // Read in byte size chunks and update the hash value with the data. for (int i = 0; i < totalChunks; i++) { - if (statusHelper.isCancelled()) { + if (statusHelper.isIngestJobCancelled()) { return ProcessResult.OK; } data = new byte[(int) chunkSize]; diff --git a/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java b/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java index 2478befdd6..d2d332f439 100644 --- a/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java +++ b/thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java @@ -53,7 +53,7 @@ import org.sleuthkit.datamodel.TskException; public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter implements FileIngestModule { private static final Logger logger = Logger.getLogger(ThunderbirdMboxFileIngestModule.class.getName()); - private IngestServices services = IngestServices.getDefault(); + private IngestServices services = IngestServices.getInstance(); private int messageId = 0; // RJCTODO: Not thread safe private FileManager fileManager; private IngestJobContext context; @@ -291,7 +291,7 @@ public final class ThunderbirdMboxFileIngestModule extends IngestModuleAdapter i services.fireModuleContentEvent(new ModuleContentEvent(derived)); } } - context.addFilesToPipeline(derivedFiles); + context.addFiles(derivedFiles); services.fireModuleDataEvent(new ModuleDataEvent(EmailParserModuleFactory.getModuleName(), BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG)); }