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;
43 @ServiceProviders(value={
44 @ServiceProvider(service=DataSourceProcessor.class),
45 @ServiceProvider(service=AutoIngestDataSourceProcessor.class)}
52 private static final List<FileFilter> filtersList =
new ArrayList<>();
54 filtersList.add(rawFilter);
55 filtersList.add(encaseFilter);
59 private static final long DEFAULT_CHUNK_SIZE = 2000000000L;
68 configPanel = RawDSInputPanel.createInstance(
RawDSProcessor.class.getName());
78 @Messages({
"RawDSProcessor.dataSourceType=Unallocated Space Image File"})
80 return Bundle.RawDSProcessor_dataSourceType();
92 return Bundle.RawDSProcessor_dataSourceType();
105 configPanel.readSettings();
106 configPanel.select();
119 return configPanel.validatePanel();
138 configPanel.storeSettings();
139 run(UUID.randomUUID().toString(), configPanel.getImageFilePath(), configPanel.getTimeZone(), configPanel.getChunkSize(), progressMonitor, callback);
165 AddRawImageTask addImageTask =
new AddRawImageTask(deviceId, imageFilePath, timeZone, chunkSize, progressMonitor, callback);
166 new Thread(addImageTask).start();
183 for (FileFilter filter : filters) {
184 if (filter.accept(file)) {
195 if (!
new File(dataSourcePath.toString()).isFile()) {
200 if (!isAcceptedByFiler(dataSourcePath.toFile(), filtersList)) {
209 run(deviceId, dataSourcePath.toString(), Calendar.getInstance().getTimeZone().getID(), DEFAULT_CHUNK_SIZE, progressMonitor, callBack);
int canProcess(Path dataSourcePath)
void process(String deviceId, Path dataSourcePath, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callBack)
void run(String deviceId, String imageFilePath, String timeZone, long chunkSize, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
static final String RAW_IMAGE_DESC
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)
static final List< String > RAW_IMAGE_EXTS
void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)