19 package org.sleuthkit.autopsy.casemodule;
22 import java.nio.file.Path;
23 import java.util.Calendar;
24 import java.util.UUID;
25 import javax.swing.JPanel;
26 import org.openide.util.NbBundle;
27 import org.openide.util.lookup.ServiceProvider;
28 import org.openide.util.lookup.ServiceProviders;
41 @ServiceProviders(value={
42 @ServiceProvider(service=DataSourceProcessor.class),
43 @ServiceProvider(service=AutomatedIngestDataSourceProcessor.class)}
47 private static final String DATA_SOURCE_TYPE = NbBundle.getMessage(
LocalDiskDSProcessor.class,
"LocalDiskDSProcessor.dsType.text");
67 configPanel = LocalDiskPanel.getDefault();
78 return DATA_SOURCE_TYPE;
90 return DATA_SOURCE_TYPE;
103 configPanel.select();
116 return configPanel.validatePanel();
135 if (!setDataSourceOptionsCalled) {
136 deviceId = UUID.randomUUID().toString();
137 drivePath = configPanel.getContentPaths();
138 timeZone = configPanel.getTimeZone();
139 ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
141 addDiskTask =
new AddImageTask(deviceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, callback);
142 new Thread(addDiskTask).start();
167 addDiskTask =
new AddImageTask(deviceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, callback);
168 new Thread(addDiskTask).start();
180 if (null != addDiskTask) {
181 addDiskTask.cancelTask();
195 ignoreFatOrphanFiles =
false;
196 setDataSourceOptionsCalled =
false;
214 this.deviceId = UUID.randomUUID().toString();
215 this.drivePath = drivePath;
216 this.timeZone = Calendar.getInstance().getTimeZone().getID();
217 this.ignoreFatOrphanFiles = ignoreFatOrphanFiles;
218 setDataSourceOptionsCalled =
true;
225 File file = dataSourcePath.toFile();
227 if (file.isFile() || file.isDirectory()) {
234 String path = dataSourcePath.toString();
244 this.deviceId = deviceId;
245 this.drivePath = dataSourcePath.toString();
246 this.timeZone = Calendar.getInstance().getTimeZone().getID();
247 this.ignoreFatOrphanFiles =
false;
248 setDataSourceOptionsCalled =
true;
249 run(deviceId, drivePath, timeZone, ignoreFatOrphanFiles, progressMonitor, callBack);
static boolean isPhysicalDrive(String path)
final LocalDiskPanel configPanel
boolean ignoreFatOrphanFiles
static boolean driveExists(String path)
boolean setDataSourceOptionsCalled
void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
String getDataSourceType()
void run(String deviceId, String drivePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
int canProcess(Path dataSourcePath)
static boolean isPartition(String path)
void process(String deviceId, Path dataSourcePath, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack)
void setDataSourceOptions(String drivePath, String timeZone, boolean ignoreFatOrphanFiles)