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");
70 configPanel = LocalDiskPanel.getDefault();
81 return DATA_SOURCE_TYPE;
93 return DATA_SOURCE_TYPE;
106 configPanel.resetLocalDiskSelection();
119 return configPanel.validatePanel();
138 run(null, progressMonitor, callback);
158 deviceId = UUID.randomUUID().toString();
159 drivePath = configPanel.getContentPath();
160 sectorSize = configPanel.getSectorSize();
161 timeZone = configPanel.getTimeZone();
162 ignoreFatOrphanFiles = configPanel.getNoFatOrphans();
163 if (configPanel.getImageWriterEnabled()) {
164 imageWriterSettings = configPanel.getImageWriterSettings();
166 imageWriterSettings = null;
174 new String[]{drivePath}, sectorSize,
175 timeZone, null, null, null, deviceId, this.host);
176 }
catch (TskCoreException ex) {
177 logger.log(Level.SEVERE,
"Error adding local disk with path " + drivePath +
" to database", ex);
178 final List<String> errors =
new ArrayList<>();
179 errors.add(ex.getMessage());
184 addDiskTask =
new AddImageTask(
185 new AddImageTask.ImageDetails(deviceId, image, sectorSize, timeZone, ignoreFatOrphanFiles, null, null, null, imageWriterSettings),
187 new StreamingAddDataSourceCallbacks(
new DefaultIngestStream()),
188 new StreamingAddImageTaskCallback(
new DefaultIngestStream(), callback));
189 new Thread(addDiskTask).start();
214 run(deviceId, drivePath, 0, timeZone, ignoreFatOrphanFiles, progressMonitor, callback);
243 new String[]{drivePath}, sectorSize,
244 timeZone, null, null, null, deviceId);
245 }
catch (TskCoreException ex) {
246 logger.log(Level.SEVERE,
"Error adding local disk with path " + drivePath +
" to database", ex);
247 final List<String> errors =
new ArrayList<>();
248 errors.add(ex.getMessage());
253 addDiskTask =
new AddImageTask(
new AddImageTask.ImageDetails(deviceId, image, sectorSize, timeZone, ignoreFatOrphanFiles, null, null, null, imageWriterSettings),
255 new StreamingAddDataSourceCallbacks(
new DefaultIngestStream()),
256 new StreamingAddImageTaskCallback(
new DefaultIngestStream(), callback));
257 new Thread(addDiskTask).start();
269 if (null != addDiskTask) {
270 addDiskTask.cancelTask();
283 ignoreFatOrphanFiles =
false;
final LocalDiskPanel configPanel
boolean ignoreFatOrphanFiles
ImageWriterSettings imageWriterSettings
void run(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 Case getCurrentCase()
synchronized static Logger getLogger(String name)