mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 09:17:42 +00:00
Merge branch 'develop' of https://github.com/sleuthkit/autopsy into develop
This commit is contained in:
commit
7853d66ae1
@ -52,7 +52,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
private String imagePath;
|
private String imagePath;
|
||||||
private String timeZone;
|
private String timeZone;
|
||||||
private boolean ignoreFatOrphanFiles;
|
private boolean ignoreFatOrphanFiles;
|
||||||
private boolean configured;
|
private boolean setDataSourceOptionsCalled;
|
||||||
private AddImageTask addImageTask;
|
private AddImageTask addImageTask;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@ -120,8 +120,8 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the data source processor in a separate thread. Should only be
|
* Runs the data source processor using the settings from the configuration
|
||||||
* called after further configuration has been completed.
|
* panel.
|
||||||
*
|
*
|
||||||
* @param monitor Progress monitor to report progress during processing.
|
* @param monitor Progress monitor to report progress during processing.
|
||||||
* @param cbObj Callback to call when processing is done.
|
* @param cbObj Callback to call when processing is done.
|
||||||
@ -131,24 +131,22 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
/*
|
/*
|
||||||
* TODO (AUT-1867): Configuration is not currently enforced. This code
|
* TODO (AUT-1867): Configuration is not currently enforced. This code
|
||||||
* assumes that the ingest panel is providing validated inputs.
|
* assumes that the ingest panel is providing validated inputs.
|
||||||
|
*
|
||||||
|
* TODO: Remove the setDataSourceOptionsCalled when the deprecated
|
||||||
|
* methods setDataSourceOptions and reset are removed.
|
||||||
*/
|
*/
|
||||||
if (!configured) {
|
if (!setDataSourceOptionsCalled) {
|
||||||
configPanel.storeSettings();
|
configPanel.storeSettings();
|
||||||
if (null == dataSourceId) {
|
|
||||||
dataSourceId = UUID.randomUUID().toString();
|
dataSourceId = UUID.randomUUID().toString();
|
||||||
}
|
|
||||||
imagePath = configPanel.getContentPaths();
|
imagePath = configPanel.getContentPaths();
|
||||||
timeZone = configPanel.getTimeZone();
|
timeZone = configPanel.getTimeZone();
|
||||||
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
||||||
configured = true;
|
|
||||||
}
|
}
|
||||||
addImageTask = new AddImageTask(dataSourceId, imagePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
|
run(dataSourceId, imagePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
|
||||||
new Thread(addImageTask).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the data source processor in a separate thread without requiring use
|
* Runs the data source processor the given settings.
|
||||||
* the configuration panel.
|
|
||||||
*
|
*
|
||||||
* @param dataSourceId An ASCII-printable identifier for the data
|
* @param dataSourceId An ASCII-printable identifier for the data
|
||||||
* source that is intended to be unique across
|
* source that is intended to be unique across
|
||||||
@ -164,12 +162,8 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
* @param cbObj Callback to call when processing is done.
|
* @param cbObj Callback to call when processing is done.
|
||||||
*/
|
*/
|
||||||
public void run(String dataSourceId, String imagePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor monitor, DataSourceProcessorCallback cbObj) {
|
public void run(String dataSourceId, String imagePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor monitor, DataSourceProcessorCallback cbObj) {
|
||||||
this.dataSourceId = dataSourceId;
|
addImageTask = new AddImageTask(dataSourceId, imagePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
|
||||||
this.imagePath = imagePath;
|
new Thread(addImageTask).start();
|
||||||
this.timeZone = timeZone;
|
|
||||||
this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
|
|
||||||
configured = true;
|
|
||||||
run(monitor, cbObj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -183,7 +177,11 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
/**
|
/**
|
||||||
* Resets the configuration of this data source processor, including its
|
* Resets the configuration of this data source processor, including its
|
||||||
* configuration panel.
|
* configuration panel.
|
||||||
|
*
|
||||||
|
* @deprecated Was only for use with setDataSourceOptions, use the
|
||||||
|
* appropriate overload of the run method instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
dataSourceId = null;
|
dataSourceId = null;
|
||||||
@ -191,14 +189,12 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
timeZone = null;
|
timeZone = null;
|
||||||
ignoreFatOrphanFiles = false;
|
ignoreFatOrphanFiles = false;
|
||||||
configPanel.reset();
|
configPanel.reset();
|
||||||
configured = false;
|
setDataSourceOptionsCalled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the configuration of the data source processor without using the
|
* Sets the configuration of the data source processor without using the
|
||||||
* configuration panel. The data source processor will assign a UUID to the
|
* configuration panel.
|
||||||
* data source and will use the time zone of the machine executing this code
|
|
||||||
* when when processing dates and times for the image.
|
|
||||||
*
|
*
|
||||||
* @param imagePath Path to the image file.
|
* @param imagePath Path to the image file.
|
||||||
* @param timeZone The time zone to use when processing dates
|
* @param timeZone The time zone to use when processing dates
|
||||||
@ -207,7 +203,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
||||||
* FAT filesystem.
|
* FAT filesystem.
|
||||||
*
|
*
|
||||||
* @deprecated Use the run method instead.
|
* @deprecated Use the appropriate overload of the run method instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setDataSourceOptions(String imagePath, String timeZone, boolean ignoreFatOrphanFiles) {
|
public void setDataSourceOptions(String imagePath, String timeZone, boolean ignoreFatOrphanFiles) {
|
||||||
@ -215,7 +211,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
|
|||||||
this.imagePath = imagePath;
|
this.imagePath = imagePath;
|
||||||
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
||||||
this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
|
this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
|
||||||
this.configured = true;
|
setDataSourceOptionsCalled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
private String drivePath;
|
private String drivePath;
|
||||||
private String timeZone;
|
private String timeZone;
|
||||||
private boolean ignoreFatOrphanFiles;
|
private boolean ignoreFatOrphanFiles;
|
||||||
private boolean configured;
|
private boolean setDataSourceOptionsCalled;
|
||||||
private AddImageTask addDiskTask;
|
private AddImageTask addDiskTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,7 +100,8 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the data source processor in a separate thread.
|
* Runs the data source processor using the settings from the configuration
|
||||||
|
* panel.
|
||||||
*
|
*
|
||||||
* @param progressMonitor Progress monitor to report progress during
|
* @param progressMonitor Progress monitor to report progress during
|
||||||
* processing.
|
* processing.
|
||||||
@ -111,23 +112,22 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
/*
|
/*
|
||||||
* TODO (AUT-1867): Configuration is not currently enforced. This code
|
* TODO (AUT-1867): Configuration is not currently enforced. This code
|
||||||
* assumes that the ingest panel is providing validated inputs.
|
* assumes that the ingest panel is providing validated inputs.
|
||||||
|
*
|
||||||
|
* TODO: Remove the setDataSourceOptionsCalled when the deprecated
|
||||||
|
* methods setDataSourceOptions and reset are removed.
|
||||||
*/
|
*/
|
||||||
if (!configured) {
|
if (!setDataSourceOptionsCalled) {
|
||||||
if (null == dataSourceId) {
|
|
||||||
dataSourceId = UUID.randomUUID().toString();
|
dataSourceId = UUID.randomUUID().toString();
|
||||||
}
|
|
||||||
drivePath = configPanel.getContentPaths();
|
drivePath = configPanel.getContentPaths();
|
||||||
timeZone = configPanel.getTimeZone();
|
timeZone = configPanel.getTimeZone();
|
||||||
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
|
||||||
configured = true;
|
|
||||||
}
|
}
|
||||||
addDiskTask = new AddImageTask(dataSourceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, cbObj);
|
addDiskTask = new AddImageTask(dataSourceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, cbObj);
|
||||||
new Thread(addDiskTask).start();
|
new Thread(addDiskTask).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the data source processor in a separate thread without requiring use
|
* Runs the data source processor the given settings.
|
||||||
* the configuration panel.
|
|
||||||
*
|
*
|
||||||
* @param dataSourceId An ASCII-printable identifier for the data
|
* @param dataSourceId An ASCII-printable identifier for the data
|
||||||
* source that is intended to be unique across
|
* source that is intended to be unique across
|
||||||
@ -143,12 +143,8 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
* @param cbObj Callback to call when processing is done.
|
* @param cbObj Callback to call when processing is done.
|
||||||
*/
|
*/
|
||||||
public void run(String dataSourceId, String drivePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor monitor, DataSourceProcessorCallback cbObj) {
|
public void run(String dataSourceId, String drivePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor monitor, DataSourceProcessorCallback cbObj) {
|
||||||
this.dataSourceId = dataSourceId;
|
addDiskTask = new AddImageTask(dataSourceId, drivePath, timeZone, ignoreFatOrphanFiles, monitor, cbObj);
|
||||||
this.drivePath = drivePath;
|
new Thread(addDiskTask).start();
|
||||||
this.timeZone = timeZone;
|
|
||||||
this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
|
|
||||||
configured = true;
|
|
||||||
run(monitor, cbObj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,6 +158,9 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
/**
|
/**
|
||||||
* Resets the configuration of this data source processor, including its
|
* Resets the configuration of this data source processor, including its
|
||||||
* configuration panel.
|
* configuration panel.
|
||||||
|
*
|
||||||
|
* @deprecated Was only for use with setDataSourceOptions, use the
|
||||||
|
* appropriate overload of the run method instead.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void reset() {
|
public void reset() {
|
||||||
@ -170,23 +169,21 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
drivePath = null;
|
drivePath = null;
|
||||||
timeZone = null;
|
timeZone = null;
|
||||||
ignoreFatOrphanFiles = false;
|
ignoreFatOrphanFiles = false;
|
||||||
configured = false;
|
setDataSourceOptionsCalled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the configuration of the data source processor without using the
|
* Sets the configuration of the data source processor without using the
|
||||||
* configuration panel. The data source processor will assign a UUID to the
|
* configuration panel.
|
||||||
* data source and will use the time zone of the machine executing this code
|
|
||||||
* when when processing dates and times for the image.
|
|
||||||
*
|
*
|
||||||
* @param drivePath Path to the local drive.
|
* @param imagePath Path to the image file.
|
||||||
* @param timeZone The time zone to use when processing dates
|
* @param timeZone The time zone to use when processing dates
|
||||||
* and times for the image, obtained from
|
* and times for the image, obtained from
|
||||||
* java.util.TimeZone.getID.
|
* java.util.TimeZone.getID.
|
||||||
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
* @param ignoreFatOrphanFiles Whether to parse orphans if the image has a
|
||||||
* FAT filesystem.
|
* FAT filesystem.
|
||||||
*
|
*
|
||||||
* @deprecated Use the run method instead.
|
* @deprecated Use the appropriate overload of the run method instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setDataSourceOptions(String drivePath, String timeZone, boolean ignoreFatOrphanFiles) {
|
public void setDataSourceOptions(String drivePath, String timeZone, boolean ignoreFatOrphanFiles) {
|
||||||
@ -194,7 +191,7 @@ public class LocalDiskDSProcessor implements DataSourceProcessor {
|
|||||||
this.drivePath = drivePath;
|
this.drivePath = drivePath;
|
||||||
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
this.timeZone = Calendar.getInstance().getTimeZone().getID();
|
||||||
this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
|
this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
|
||||||
configured = true;
|
setDataSourceOptionsCalled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user