19 package org.sleuthkit.autopsy.casemodule;
21 import java.util.ArrayList;
22 import java.util.List;
23 import java.util.UUID;
24 import java.util.logging.Level;
25 import javax.swing.JPanel;
26 import org.openide.util.NbBundle;
27 import org.openide.util.lookup.ServiceProvider;
44 @ServiceProvider(service = DataSourceProcessor.class)
48 private static final String DATA_SOURCE_TYPE = NbBundle.getMessage(
LocalDiskDSProcessor.class,
"LocalDiskDSProcessor.dsType.text");
71 configPanel = LocalDiskPanel.getDefault();
82 return DATA_SOURCE_TYPE;
94 return DATA_SOURCE_TYPE;
107 configPanel.resetLocalDiskSelection();
120 return configPanel.validatePanel();
139 run(null, null, progressMonitor, callback);
144 run(null, host, progressMonitor, callback);
164 deviceId = UUID.randomUUID().toString();
165 drivePath = configPanel.getContentPath();
166 sectorSize = configPanel.getSectorSize();
167 timeZone = configPanel.getTimeZone();
168 ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
169 if (configPanel.getImageWriterEnabled()) {
170 imageWriterSettings = configPanel.getImageWriterSettings();
172 imageWriterSettings = null;
176 this.password = password;
181 new String[]{drivePath}, sectorSize,
182 timeZone, null, null, null, deviceId, this.password, this.host);
184 logger.log(Level.SEVERE,
"Error adding local disk with path " + drivePath +
" to database", ex);
185 final List<String> errors =
new ArrayList<>();
186 errors.add(ex.getMessage());
191 addDiskTask =
new AddImageTask(
192 new AddImageTask.ImageDetails(deviceId, image, sectorSize, timeZone, ignoreFatOrphanFiles, null, null, null, imageWriterSettings,
this.password),
194 new StreamingAddDataSourceCallbacks(
new DefaultIngestStream()),
195 new StreamingAddImageTaskCallback(
new DefaultIngestStream(), callback));
196 new Thread(addDiskTask).start();
221 run(deviceId, drivePath, 0, timeZone, ignoreFatOrphanFiles, progressMonitor, callback);
250 new String[]{drivePath}, sectorSize,
251 timeZone, null, null, null, deviceId, this.password, null);
253 logger.log(Level.SEVERE,
"Error adding local disk with path " + drivePath +
" to database", ex);
254 final List<String> errors =
new ArrayList<>();
255 errors.add(ex.getMessage());
260 addDiskTask =
new AddImageTask(
new AddImageTask.ImageDetails(deviceId, image, sectorSize, timeZone, ignoreFatOrphanFiles, null, null, null, imageWriterSettings,
this.password),
262 new StreamingAddDataSourceCallbacks(
new DefaultIngestStream()),
263 new StreamingAddImageTaskCallback(
new DefaultIngestStream(), callback));
264 new Thread(addDiskTask).start();
276 if (null != addDiskTask) {
277 addDiskTask.cancelTask();
290 ignoreFatOrphanFiles =
false;
final LocalDiskPanel configPanel
boolean ignoreFatOrphanFiles
ImageWriterSettings imageWriterSettings
void run(Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
void run(String password, Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
void done(DataSourceProcessorResult result, List< String > errList, List< Content > newDataSources)
void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
String getDataSourceType()
void run(String deviceId, String drivePath, int sectorSize, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
SleuthkitCase getSleuthkitCase()
void run(String deviceId, String drivePath, String timeZone, boolean ignoreFatOrphanFiles, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
static Image addImageToDatabase(SleuthkitCase skCase, String[] imagePaths, int sectorSize, String timeZone, String md5fromSettings, String sha1fromSettings, String sha256fromSettings, String deviceId)
static Case getCurrentCase()
synchronized static Logger getLogger(String name)