From 111d1ca63130ca08b68b460e86cd8cd3df4f1c24 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Thu, 21 Jan 2016 12:24:08 -0500 Subject: [PATCH] Improve documentation of ImageDSProcessor --- .../autopsy/casemodule/ImageDSProcessor.java | 11 +++++---- .../casemodule/LocalDiskDSProcessor.java | 23 +++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/ImageDSProcessor.java b/Core/src/org/sleuthkit/autopsy/casemodule/ImageDSProcessor.java index 427d477f04..94928ae76f 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/ImageDSProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/ImageDSProcessor.java @@ -71,10 +71,13 @@ public class ImageDSProcessor implements DataSourceProcessor { /** * Constructs an image data source processor. * - * @param dataSourceId - * @param imagePath - * @param timeZone - * @param ignoreFatOrphanFiles + * @param dataSourceId A identifier for the data source that is + * unique across multiple cases (e.g., a UUID). + * @param imagePath Path to the image file. + * @param timeZone The time zone to use when processing dates + * and times for the image. + * @param ignoreFatOrphanFiles Whether to parse orphans if the image has a + * FAT filesystem. */ public ImageDSProcessor(String dataSourceId, String imagePath, String timeZone, boolean ignoreFatOrphanFiles) { this.dataSourceId = dataSourceId; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java index dd58c09033..377d213b92 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskDSProcessor.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.casemodule; +import java.util.UUID; import javax.swing.JPanel; import org.openide.util.NbBundle; import org.openide.util.lookup.ServiceProvider; @@ -35,6 +36,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor { static final Logger logger = Logger.getLogger(ImageDSProcessor.class.getName()); private static final String dsType = NbBundle.getMessage(LocalDiskDSProcessor.class, "LocalDiskDSProcessor.dsType.text"); private final LocalDiskPanel configPanel; + private String dataSourceId; private String drivePath; private String timeZone; private boolean ignoreFatOrphanFiles; @@ -51,6 +53,23 @@ public class LocalDiskDSProcessor implements DataSourceProcessor { configPanel = LocalDiskPanel.getDefault(); } + /* + * Constructs a local drive data source processor. @param dataSourceId A + * identifier for the data source that is unique across multiple cases + * (e.g., a UUID). @param imagePath Path to the image file. @param timeZone + * The time zone to use when processing dates and times for the image. + * @param ignoreFatOrphanFiles Whether to parse orphans if the image has a + * FAT filesystem. + */ + public LocalDiskDSProcessor(String dataSourceId, String drivePath, String timeZone, boolean ignoreFatOrphanFiles) { + this.dataSourceId = dataSourceId; + this.drivePath = drivePath; + this.timeZone = timeZone; + this.ignoreFatOrphanFiles = ignoreFatOrphanFiles; + configured = true; + configPanel = LocalDiskPanel.getDefault(); + } + /** * Gets the display name of the type of data source this type of data source * processor is able to process. @@ -105,6 +124,9 @@ public class LocalDiskDSProcessor implements DataSourceProcessor { @Override public void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback cbObj) { if (!configured) { + if (null == dataSourceId) { + dataSourceId = UUID.randomUUID().toString(); + } drivePath = configPanel.getContentPaths(); timeZone = configPanel.getTimeZone(); ignoreFatOrphanFiles = configPanel.getNoFatOrphans(); @@ -129,6 +151,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor { @Override public void reset() { configPanel.reset(); + dataSourceId = null; drivePath = null; timeZone = null; ignoreFatOrphanFiles = false;