Improve documentation of ImageDSProcessor

This commit is contained in:
Richard Cordovano
2016-01-21 12:24:08 -05:00
parent 6231213617
commit 111d1ca631
2 changed files with 30 additions and 4 deletions
@@ -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;
@@ -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;