From cd82f49d45a15e9869b60fded558b657eae929d6 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 14 Feb 2017 17:12:15 -0500 Subject: [PATCH] 2199 resolve conflicts from merge and fix formatting on modified files --- .../AddImageWizardAddingProgressPanel.java | 2 +- .../AddImageWizardChooseDataSourcePanel.java | 2 +- .../AddImageWizardIngestConfigPanel.java | 3 +- .../casemodule/AddImageWizardIterator.java | 29 ++++++-------- .../ingest/IngestJobSettingsPanel.java | 2 +- .../IngestProfileSelectionWizardPanel.java | 15 ++++--- .../RunIngestModulesWizardIterator.java | 13 ++---- .../ShortcutWizardDescriptorPanel.java | 40 ++++++++++--------- 8 files changed, 49 insertions(+), 57 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java index 50134fa88a..c39e541f25 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardAddingProgressPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2014 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java index 259cb4f4d3..65847a6eba 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardChooseDataSourcePanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java index a37df4227a..e137875e1a 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -216,7 +216,6 @@ class AddImageWizardIngestConfigPanel extends ShortcutWizardDescriptorPanel { } } - @Override public void processThisPanelBeforeSkipped() { if (!(ModuleSettings.getConfigSetting(IngestProfileSelectionWizardPanel.getLastProfilePropertiesFile(), AddImageWizardIterator.getPropLastprofileName()) == null) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIterator.java b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIterator.java index 51aaab6313..8616f5bc67 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIterator.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIterator.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,12 +22,11 @@ import java.awt.Component; import java.util.ArrayList; import java.util.List; import java.util.NoSuchElementException; -import java.util.TreeMap; import javax.swing.JComponent; import javax.swing.event.ChangeListener; import org.openide.WizardDescriptor; import org.openide.util.NbBundle; -import org.sleuthkit.autopsy.ingest.IngestProfileMap; +import org.sleuthkit.autopsy.ingest.IngestProfiles; import org.sleuthkit.autopsy.ingest.runIngestModuleWizard.IngestProfileSelectionWizardPanel; import org.sleuthkit.autopsy.ingest.runIngestModuleWizard.ShortcutWizardDescriptorPanel; @@ -42,7 +41,7 @@ class AddImageWizardIterator implements WizardDescriptor.Iterator profileMap = new IngestProfileMap().getIngestProfileMap(); - if (!profileMap.isEmpty()) { - panels.add(profileSelectionPanel); + List profiles = IngestProfiles.getIngestProfiles(); + if (!profiles.isEmpty()) { + panels.add(new IngestProfileSelectionWizardPanel(AddImageWizardIngestConfigPanel.class.getCanonicalName(), getPropLastprofileName())); } panels.add(ingestConfigPanel); panels.add(progressPanel); @@ -100,25 +98,24 @@ class AddImageWizardIterator implements WizardDescriptor.Iterator listeners = new HashSet<>(1); private final static String LAST_PROFILE_PROPERTIES_FILE = "IngestProfileSelectionPanel"; //NON-NLS /** @@ -57,15 +55,16 @@ public class IngestProfileSelectionWizardPanel extends ShortcutWizardDescriptorP String getDefaultContext() { return defaultContext; } - + /** * Gets the name of the file which stores the last profile used properties. - * + * * @return the LAST_PROFILE_PROPERTIES_FILE */ public static String getLastProfilePropertiesFile() { return LAST_PROFILE_PROPERTIES_FILE; } + // Get the visual component for the panel. In this template, the component // is kept separate. This can be more efficient: if the wizard is created // but never displayed, or not all panels are displayed, it is better to @@ -139,9 +138,9 @@ public class IngestProfileSelectionWizardPanel extends ShortcutWizardDescriptorP public boolean skipNextPanel() { return component.isLastPanel; } - + @Override - public boolean panelEnablesSkipping(){ - return true; - } + public boolean panelEnablesSkipping() { + return true; + } } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesWizardIterator.java b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesWizardIterator.java index 21db01eb8b..ca242095fd 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesWizardIterator.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/RunIngestModulesWizardIterator.java @@ -46,16 +46,9 @@ final class RunIngestModulesWizardIterator implements WizardDescriptor.Iterator< private List getPanels() { if (panels == null) { panels = new ArrayList<>(); -<<<<<<< HEAD - IngestProfileSelectionWizardPanel profilePanel = new IngestProfileSelectionWizardPanel(RunIngestModulesAction.getDefaultContext(), PROP_LASTPROFILE_NAME); - TreeMap profileMap = new IngestProfileMap().getIngestProfileMap(); - if (!profileMap.isEmpty()) { - panels.add(profilePanel); -======= List profiles = IngestProfiles.getIngestProfiles(); if (!profiles.isEmpty()) { - panels.add( new IngestProfileSelectionWizardPanel(RunIngestModulesAction.getDefaultContext(), PROP_LASTPROFILE_NAME)); ->>>>>>> c4c7cbb9f8c52b7aa09e9e4f83ecbfe599dd2254 + panels.add(new IngestProfileSelectionWizardPanel(RunIngestModulesAction.getDefaultContext(), PROP_LASTPROFILE_NAME)); } panels.add(new IngestModulesConfigWizardPanel()); @@ -89,8 +82,8 @@ final class RunIngestModulesWizardIterator implements WizardDescriptor.Iterator< @Override public boolean hasNext() { - return (index < getPanels().size() - 1 && - !(current().panelEnablesSkipping() && current().skipNextPanel())); + return (index < getPanels().size() - 1 + && !(current().panelEnablesSkipping() && current().skipNextPanel())); } @Override diff --git a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/ShortcutWizardDescriptorPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/ShortcutWizardDescriptorPanel.java index 35c9cf7705..589ebdee14 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/ShortcutWizardDescriptorPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/runIngestModuleWizard/ShortcutWizardDescriptorPanel.java @@ -21,44 +21,48 @@ package org.sleuthkit.autopsy.ingest.runIngestModuleWizard; import org.openide.WizardDescriptor; /** - * An abstract class providing a methods which can be checked by - * the iterator containing panels of this type. So that Wizards containing these - * panels can skip panels, but still call necessary methods of those panels. + * An abstract class providing a methods which can be checked by the iterator + * containing panels of this type. So that Wizards containing these panels can + * skip panels, but still call necessary methods of those panels. */ public abstract class ShortcutWizardDescriptorPanel implements WizardDescriptor.Panel { - + /** - * Whether or not this panel under the correct conditions can enable the skipping of the panel after it. + * Whether or not this panel under the correct conditions can enable the + * skipping of the panel after it. + * * @return true or false */ - public boolean panelEnablesSkipping(){ - /* - * This method should be overriden by any panel that might want to + public boolean panelEnablesSkipping() { + /* + * This method should be overriden by any panel that might want to * enable the iterator to skip the panel that comes after it. */ return false; } - + /** - * Whether or not the panel immediately following this one should be skipped . - * + * Whether or not the panel immediately following this one should be skipped + * . + * * @return true or false */ - public boolean skipNextPanel(){ + public boolean skipNextPanel() { /* - * This method should be overriden by any panel that might want to + * This method should be overriden by any panel that might want to * enable the iterator to skip the panel that comes after it. */ return false; } - + /** - * Provides a method which will allow code to be executed in a panel you plan to skip + * Provides a method which will allow code to be executed in a panel you + * plan to skip */ - public void processThisPanelBeforeSkipped(){ + public void processThisPanelBeforeSkipped() { /* - * If you need to perform some actions of this panel before it is skipped - * override this method to have it call the necessary code. + * If you need to perform some actions of this panel before it is + * skipped override this method to have it call the necessary code. */ } }