Add data source id to org.sleuthkit.autopsy.casemodule.AddImageTask

This commit is contained in:
Richard Cordovano 2016-01-22 14:14:39 -05:00
parent 05e38ee961
commit 466fedd871
3 changed files with 8 additions and 10 deletions

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2013-2014 Basis Technology Corp.
* Copyright 2013-2016 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -30,11 +30,9 @@ import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.Image;
import org.sleuthkit.datamodel.SleuthkitCase;
import org.sleuthkit.datamodel.SleuthkitJNI;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskDataException;
import org.sleuthkit.datamodel.TskException;
/*
* A background task that adds the given image to database using the Sleuthkit
@ -73,6 +71,8 @@ class AddImageTask implements Runnable {
String timeZone;
boolean noFatOrphans;
private final String dataSourceId;
/*
* A thread that updates the progressMonitor with the name of the directory
* currently being processed by the AddImageTask
@ -113,14 +113,12 @@ class AddImageTask implements Runnable {
}
}
public AddImageTask(String imgPath, String tz, boolean noOrphans, DataSourceProcessorProgressMonitor aProgressMonitor, DataSourceProcessorCallback cbObj) {
AddImageTask(String dataSourceId, String imgPath, String tz, boolean noOrphans, DataSourceProcessorProgressMonitor aProgressMonitor, DataSourceProcessorCallback cbObj) {
currentCase = Case.getCurrentCase();
this.dataSourceId = dataSourceId;
this.imagePath = imgPath;
this.timeZone = tz;
this.noFatOrphans = noOrphans;
this.callbackObj = cbObj;
this.progressMonitor = aProgressMonitor;
}

View File

@ -139,7 +139,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
configured = true;
}
addImageTask = new AddImageTask(imagePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
addImageTask = new AddImageTask(dataSourceId, imagePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
new Thread(addImageTask).start();
}

View File

@ -122,7 +122,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
configured = true;
}
addDiskTask = new AddImageTask(drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, cbObj);
addDiskTask = new AddImageTask(dataSourceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, cbObj);
new Thread(addDiskTask).start();
}