From 3bc382ce5ca238890ebd2ef0790c19e03d3e9209 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 17 Mar 2017 15:05:29 -0400 Subject: [PATCH] 2418 ingest history renenabled by using correct constructor --- .../sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java | 6 ++++-- .../IngestModulesConfigWizardPanel.java | 9 ++++++--- .../runIngestModuleWizard/RunIngestModulesAction.java | 2 +- .../RunIngestModulesWizardIterator.java | 5 +++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java index 8b1c81a19a..ac045ea63b 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobSettingsPanel.java @@ -74,6 +74,7 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel { /** * Construct a panel to allow a user to make ingest job settings. + * This constructor assumes there is no ingest history. * * @param settings The initial settings for the ingest job. */ @@ -88,12 +89,13 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel { } /** - * Construct a panel to allow a user to make ingest job settings. + * Construct a panel to allow a user to make ingest job settings. + * This constructor enables tracking of ingest job history. * * @param settings The initial settings for the ingest job. * @param dataSources The data sources ingest is being run on. */ - IngestJobSettingsPanel(IngestJobSettings settings, List dataSources) { + public IngestJobSettingsPanel(IngestJobSettings settings, List dataSources) { this.settings = settings; this.dataSources.addAll(dataSources); try { diff --git a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestModulesConfigWizardPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestModulesConfigWizardPanel.java index 7f77ce2b40..e7ac23d7ab 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestModulesConfigWizardPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/IngestModulesConfigWizardPanel.java @@ -19,12 +19,14 @@ package org.sleuthkit.autopsy.ingest.runIngestModuleWizard; import java.awt.Component; +import java.util.List; import javax.swing.event.ChangeListener; import org.openide.WizardDescriptor; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.ingest.IngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestJobSettingsPanel; +import org.sleuthkit.datamodel.Content; /** * A wizard panel for configuring an ingest job. @@ -34,16 +36,17 @@ class IngestModulesConfigWizardPanel extends ShortcutWizardDescriptorPanel { private final String executionContext; private final IngestJobSettings.IngestType ingestType; private IngestJobSettingsPanel ingestJobSettingsPanel; - + private final List dataSources; /** * Constructs a wizard panel for configuring an ingest job. * * @param executionContest The execution context for the wizard. * @param ingestType The ingest type. */ - IngestModulesConfigWizardPanel(String executionContest, IngestJobSettings.IngestType ingestType) { + IngestModulesConfigWizardPanel(String executionContest, IngestJobSettings.IngestType ingestType, List dataSources) { this.executionContext = executionContest; this.ingestType = ingestType; + this.dataSources = dataSources; } /** @@ -64,7 +67,7 @@ class IngestModulesConfigWizardPanel extends ShortcutWizardDescriptorPanel { * Creating an ingest job settings object is expensive, so it is * deferred until this panel is actually used in the wizard. */ - ingestJobSettingsPanel = new IngestJobSettingsPanel(new IngestJobSettings(executionContext, ingestType)); + ingestJobSettingsPanel = new IngestJobSettingsPanel(new IngestJobSettings(executionContext, ingestType), dataSources); } ingestJobSettingsPanel.setName(Bundle.IngestModulesConfigWizardPanel_name_text()); return ingestJobSettingsPanel; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesAction.java b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesAction.java index 01ab11e7d6..7a1e6fa4db 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesAction.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesAction.java @@ -91,7 +91,7 @@ public final class RunIngestModulesAction extends CallableSystemAction { * WizardDescriptor.Panel.getComponent().getName(). */ WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - RunIngestModulesWizardIterator wizard = new RunIngestModulesWizardIterator(EXECUTION_CONTEXT, this.ingestType); + RunIngestModulesWizardIterator wizard = new RunIngestModulesWizardIterator(EXECUTION_CONTEXT, this.ingestType, this.dataSources); WizardDescriptor wiz = new WizardDescriptor(wizard); wiz.setTitleFormat(new MessageFormat("{0}")); wiz.setTitle(Bundle.RunIngestModulesAction_name()); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesWizardIterator.java b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesWizardIterator.java index 8fb0b9ba4a..add27f8146 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesWizardIterator.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesWizardIterator.java @@ -27,6 +27,7 @@ import javax.swing.event.ChangeListener; import org.openide.WizardDescriptor; import org.sleuthkit.autopsy.ingest.IngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestProfiles; +import org.sleuthkit.datamodel.Content; /** * A wizard that allows a user to configure an ingest job. @@ -45,7 +46,7 @@ final class RunIngestModulesWizardIterator implements WizardDescriptor.Iterator< * settings can differ by execution context. * @param ingestType The type of ingest to be configured. */ - RunIngestModulesWizardIterator(String executionContext, IngestJobSettings.IngestType ingestType) { + RunIngestModulesWizardIterator(String executionContext, IngestJobSettings.IngestType ingestType, List dataSources) { this.ingestType = ingestType; panels = new ArrayList<>(); List profiles = IngestProfiles.getIngestProfiles(); @@ -53,7 +54,7 @@ final class RunIngestModulesWizardIterator implements WizardDescriptor.Iterator< panels.add(new IngestProfileSelectionWizardPanel(executionContext, PROP_LASTPROFILE_NAME)); } - panels.add(new IngestModulesConfigWizardPanel(executionContext, this.ingestType)); + panels.add(new IngestModulesConfigWizardPanel(executionContext, this.ingestType, dataSources)); String[] steps = new String[panels.size()]; for (int i = 0; i < panels.size(); i++) { Component c = panels.get(i).getComponent();