Addressed review comments from Brian.

This commit is contained in:
raman-bt 2013-10-23 08:44:21 -04:00
parent 4584640ec3
commit e32bc5990b
4 changed files with 13 additions and 21 deletions

View File

@ -100,28 +100,26 @@ final class AddImageWizardChooseDataSourceVisual extends JPanel {
typeComboBox.setSelectedIndex(0); typeComboBox.setSelectedIndex(0);
typePanel.setLayout(new BorderLayout()); typePanel.setLayout(new BorderLayout());
updateCurrentPanel(GetCurrentDSProcessor().getPanel()); updateCurrentPanel(getCurrentDSProcessor().getPanel());
} }
private void discoverDataSourceProcessors() { private void discoverDataSourceProcessors() {
for (DataSourceProcessor dsProcessor: Lookup.getDefault().lookupAll(DataSourceProcessor.class)) { for (DataSourceProcessor dsProcessor: Lookup.getDefault().lookupAll(DataSourceProcessor.class)) {
if (!datasourceProcessorsMap.containsKey(dsProcessor.getType()) ) { if (!datasourceProcessorsMap.containsKey(dsProcessor.getType()) ) {
if (!datasourceProcessorsMap.containsKey(dsProcessor.getType()) ) { dsProcessor.reset();
datasourceProcessorsMap.put(dsProcessor.getType(), dsProcessor);
dsProcessor.reset(); }
datasourceProcessorsMap.put(dsProcessor.getType(), dsProcessor); else {
} logger.log(Level.SEVERE, "discoverDataSourceProcessors(): A DataSourceProcessor already exists for type = " + dsProcessor.getType() );
else { }
logger.log(Level.SEVERE, "discoverDataSourceProcessors(): A DataSourceProcessor already exists for type = " + dsProcessor.getType() );
}
}
} }
} }
private void dspSelectionChanged() { private void dspSelectionChanged() {
// update the current panel to selection // update the current panel to selection
currentPanel = GetCurrentDSProcessor().getPanel(); currentPanel = getCurrentDSProcessor().getPanel();
updateCurrentPanel(currentPanel); updateCurrentPanel(currentPanel);
} }
@ -155,7 +153,7 @@ final class AddImageWizardChooseDataSourceVisual extends JPanel {
* Returns the currently selected DS Processor * Returns the currently selected DS Processor
* @return DataSourceProcessor the DataSourceProcessor corresponding to the data source type selected in the combobox * @return DataSourceProcessor the DataSourceProcessor corresponding to the data source type selected in the combobox
*/ */
public DataSourceProcessor GetCurrentDSProcessor() { public DataSourceProcessor getCurrentDSProcessor() {
// get the type of the currently selected panel and then look up // get the type of the currently selected panel and then look up
// the correspodning DS Handler in the map // the correspodning DS Handler in the map
String dsType = (String) typeComboBox.getSelectedItem(); String dsType = (String) typeComboBox.getSelectedItem();
@ -296,7 +294,7 @@ final class AddImageWizardChooseDataSourceVisual extends JPanel {
*/ */
public void updateUI(DocumentEvent e) { public void updateUI(DocumentEvent e) {
// Enable the Next button if the current DSP panel is valid // Enable the Next button if the current DSP panel is valid
String err = GetCurrentDSProcessor().validatePanel(); String err = getCurrentDSProcessor().validatePanel();
if (null == err) if (null == err)
this.wizPanel.enableNextButton(true); this.wizPanel.enableNextButton(true);
else else

View File

@ -244,7 +244,7 @@ class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<WizardDe
cleanupTask.enable(); cleanupTask.enable();
// get the selected DSProcessor // get the selected DSProcessor
dsProcessor = dataSourcePanel.getComponent().GetCurrentDSProcessor(); dsProcessor = dataSourcePanel.getComponent().getCurrentDSProcessor();
DSPCallback cbObj = new DSPCallback () { DSPCallback cbObj = new DSPCallback () {
@Override @Override

View File

@ -178,7 +178,7 @@ public class ImageDSProcessor implements DataSourceProcessor {
* @param String timeZone * @param String timeZone
* @param noFat whether to parse FAT orphans * @param noFat whether to parse FAT orphans
**/ **/
public void SetDataSourceOptions(String imgPath, String tz, boolean noFat) { public void setDataSourceOptions(String imgPath, String tz, boolean noFat) {
this.imagePath = imgPath; this.imagePath = imgPath;
this.timeZone = tz; this.timeZone = tz;

View File

@ -25,12 +25,6 @@ import org.sleuthkit.datamodel.Content;
/* /*
* Defines an interface used by the Add DataSource wizard to discover different * Defines an interface used by the Add DataSource wizard to discover different
* Data SourceProcessors. * Data SourceProcessors.
* A data source for Autopsy may be:
* - Disk Image (Encase, Raw....)
* - Local Disk
* - Logical file(s)
* - Phone Image
* - A CellXML file with content extracted from phone.
* *
* Each data source may have its unique attributes and may need to be processed * Each data source may have its unique attributes and may need to be processed
* differently. * differently.