Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
RawDSProcessor.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2016 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.datasourceprocessors;
20 
21 import java.util.UUID;
22 import javax.swing.JPanel;
23 import org.openide.util.NbBundle.Messages;
24 import org.openide.util.lookup.ServiceProvider;
28 
35 @ServiceProvider(service = DataSourceProcessor.class)
36 public class RawDSProcessor implements DataSourceProcessor {
37  private final RawDSInputPanel configPanel;
38  private AddRawImageTask addImageTask;
39 
40  /*
41  * Constructs a Raw data source processor that implements the
42  * DataSourceProcessor service provider interface to allow integration
43  * with the add data source wizard. It also provides a run method
44  * overload to allow it to be used independently of the wizard.
45  */
46  public RawDSProcessor() {
47  configPanel = RawDSInputPanel.createInstance(RawDSProcessor.class.getName());
48  }
49 
57  @Messages({"RawDSProcessor.dataSourceType=Unallocated Space Image File"})
58  public static String getType() {
59  return Bundle.RawDSProcessor_dataSourceType();
60  }
61 
69  @Override
70  public String getDataSourceType() {
71  return Bundle.RawDSProcessor_dataSourceType();
72  }
73 
82  @Override
83  public JPanel getPanel() {
84  configPanel.readSettings();
85  configPanel.select();
86  return configPanel;
87  }
88 
96  @Override
97  public boolean isPanelValid() {
98  return configPanel.validatePanel();
99  }
100 
115  @Override
116  public void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
117  configPanel.storeSettings();
118  run(UUID.randomUUID().toString(), configPanel.getImageFilePath(), configPanel.getTimeZone(), configPanel.getChunkSize(), progressMonitor, callback);
119  }
120 
138  private void run(String deviceId, String imageFilePath, String timeZone, long chunkSize, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback) {
139  addImageTask = new AddRawImageTask(deviceId, imageFilePath, timeZone, chunkSize, progressMonitor, callback);
140  new Thread(addImageTask).start();
141  }
142 
143 
144  @Override
145  public void cancel() {
146  }
147 
152  @Override
153  public void reset() {
154  configPanel.reset();
155  }
156 
157 }
void run(String deviceId, String imageFilePath, String timeZone, long chunkSize, DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)
void run(DataSourceProcessorProgressMonitor progressMonitor, DataSourceProcessorCallback callback)

Copyright © 2012-2016 Basis Technology. Generated on: Mon Jan 2 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.