19 package org.sleuthkit.autopsy.datasourceprocessors;
22 import java.nio.file.Path;
23 import java.util.ArrayList;
24 import java.util.Calendar;
25 import java.util.List;
26 import java.util.UUID;
27 import javax.swing.JPanel;
28 import javax.swing.filechooser.FileFilter;
29 import org.openide.util.NbBundle.Messages;
30 import org.openide.util.lookup.ServiceProvider;
31 import org.openide.util.lookup.ServiceProviders;
45 @ServiceProviders(value={
46 @ServiceProvider(service=DataSourceProcessor.class),
47 @ServiceProvider(service=AutoIngestDataSourceProcessor.class)}
54 private static final List<FileFilter> filtersList =
new ArrayList<>();
56 filtersList.add(rawFilter);
57 filtersList.add(encaseFilter);
61 private static final long DEFAULT_CHUNK_SIZE = 2000000000L;
70 configPanel = RawDSInputPanel.createInstance(
RawDSProcessor.class.getName());
80 @Messages({
"RawDSProcessor.dataSourceType=Unallocated Space Image File"})
82 return Bundle.RawDSProcessor_dataSourceType();
94 return Bundle.RawDSProcessor_dataSourceType();
107 configPanel.readSettings();
108 configPanel.select();
121 return configPanel.validatePanel();
140 run(null, progressMonitor, callback);
160 configPanel.storeSettings();
161 run(UUID.randomUUID().toString(), configPanel.getImageFilePath(), configPanel.getTimeZone(), configPanel.getChunkSize(), host, progressMonitor, callback);
188 AddRawImageTask addImageTask =
new AddRawImageTask(deviceId, imageFilePath, timeZone, chunkSize, host, progressMonitor, callback);
189 new Thread(addImageTask).start();
206 for (FileFilter filter : filters) {
207 if (filter.accept(file)) {
218 if (!
new File(dataSourcePath.toString()).isFile()) {
223 if (!isAcceptedByFiler(dataSourcePath.toFile(), filtersList)) {
232 process(deviceId, dataSourcePath, null, progressMonitor, callBack);
237 run(deviceId, dataSourcePath.toString(), Calendar.getInstance().getTimeZone().getID(), DEFAULT_CHUNK_SIZE, host, progressMonitor, callBack);
int canProcess(Path dataSourcePath)
void run(String deviceId, String imageFilePath, String timeZone, long chunkSize, Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
void process(String deviceId, Path dataSourcePath, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack)
static final String RAW_IMAGE_DESC
void process(String deviceId, Path dataSourcePath, Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack)
String getDataSourceType()
final RawDSInputPanel configPanel
static final String ENCASE_IMAGE_DESC
static final List< String > ENCASE_IMAGE_EXTS
static boolean isAcceptedByFiler(File file, List< FileFilter > filters)
void run(Host host, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
static final List< String > RAW_IMAGE_EXTS
void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)