1916 adjust comments and names for LogicalFilesDspPanel

This commit is contained in:
William Schaefer 2018-02-14 14:11:50 -05:00
parent 3997ff9d6b
commit 157176f728
2 changed files with 24 additions and 6 deletions

View File

@ -156,7 +156,7 @@ public class LocalFilesDSProcessor implements DataSourceProcessor, AutoIngestDat
public void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) { public void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
if (!setDataSourceOptionsCalled) { if (!setDataSourceOptionsCalled) {
localFilePaths = configPanel.getContentPaths(); localFilePaths = configPanel.getContentPaths();
if (configPanel.contentsAreL01()) { if (configPanel.subTypeIsLogicalEvidencePanel()) {
try { try {
//if the L01 option was chosen //if the L01 option was chosen
localFilePaths = extractLogicalEvidenceFileContents(localFilePaths); localFilePaths = extractLogicalEvidenceFileContents(localFilePaths);

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2011-2016 Basis Technology Corp. * Copyright 2011-2018 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -20,12 +20,10 @@ package org.sleuthkit.autopsy.casemodule;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.swing.BoxLayout; import javax.swing.BoxLayout;
import javax.swing.JComboBox; import javax.swing.JComboBox;
import javax.swing.JPanel; import javax.swing.JPanel;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages; import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
@ -77,7 +75,7 @@ final class LogicalFilesDspPanel extends JPanel {
return instance; return instance;
} }
public String getContentType() { String getContentType() {
return NbBundle.getMessage(this.getClass(), "LocalFilesPanel.contentType.text"); return NbBundle.getMessage(this.getClass(), "LocalFilesPanel.contentType.text");
} }
@ -166,6 +164,11 @@ final class LogicalFilesDspPanel extends JPanel {
} }
}//GEN-LAST:event_dspSubtypeComboBoxActionPerformed }//GEN-LAST:event_dspSubtypeComboBoxActionPerformed
/**
* Validate the contents of the panel and its subtype.
*
* @return true if the panel is valid, false if it is not
*/
boolean validatePanel() { boolean validatePanel() {
// display warning if there is one (but don't disable "next" button) // display warning if there is one (but don't disable "next" button)
@ -183,11 +186,21 @@ final class LogicalFilesDspPanel extends JPanel {
private javax.swing.JPanel dspSubtypePanel; private javax.swing.JPanel dspSubtypePanel;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
boolean contentsAreL01() { /**
* Identify if the selected subtype panel is a LogicalEvidencePanel
*
* @return true if logical evidence files have been selected
*/
boolean subTypeIsLogicalEvidencePanel() {
String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString(); String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString();
return selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text()); return selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_l01FileOption_text());
} }
/**
* Get the selected paths of the selected panel subtype.
*
* @return a list of strings which are paths to the selected files or directories
*/
List<String> getContentPaths() { List<String> getContentPaths() {
String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString(); String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString();
if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text())) { if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text())) {
@ -200,6 +213,11 @@ final class LogicalFilesDspPanel extends JPanel {
} }
/**
* Get the name of the file set based on its subtype.
*
* @return the name of the set of files to be ingested.
*/
String getFileSetName() { String getFileSetName() {
String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString(); String selectedSubType = dspSubtypeComboBox.getSelectedItem().toString();
if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text())) { if (selectedSubType.equals(Bundle.LogicalFilesDspPanel_subTypeComboBox_localFilesOption_text())) {