1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-06 02:24:30 +00:00

Update create and import dialogs for the new HashDB interface.

This commit is contained in:
Samuel H. Kenyon
2013-10-25 18:01:18 -04:00
parent baec72f141
commit 6cb5b47af4
2 changed files with 19 additions and 23 deletions

View File

@@ -302,19 +302,16 @@ final class HashDbCreateDatabaseDialog extends javax.swing.JDialog {
} else {
type = DBType.KNOWN_BAD;
}
try
{
HashDb db = HashDb.createHashDatabase(databaseNameTextField.getText(), databasePathTextField.getText(), useForIngestCheckbox.isSelected(), sendInboxMessagesCheckbox.isSelected(), type);
} catch (TskException ex) {
logger.log(Level.WARNING, "Database creation error: ", ex);
JOptionPane.showMessageDialog(this, "Database file cannot be created.\n");
return;
}
/// @todo Call the HashDb create factory method here
// HashDb db = HashDb.create(databaseNameTextField.getText(),
// Arrays.asList(new String[] {databasePathTextField.getText()}),
// useForIngestCheckbox.isSelected(),
// sendInboxMessagesCheckbox.isSelected(),
// type);
// if(type == DBType.KNOWN_BAD) {
// HashDbXML.getCurrent().addKnownBadSet(db);
// } else if(type == DBType.NSRL) {
// HashDbXML.getCurrent().setNSRLSet(db);
// }
databaseName = databaseNameTextField.getText();
this.dispose();
}//GEN-LAST:event_okButtonActionPerformed

View File

@@ -303,17 +303,16 @@ final class HashDbImportDatabaseDialog extends javax.swing.JDialog {
} else {
type = DBType.KNOWN_BAD;
}
// RJCTODO: Sam is replacing this class.
// HashDb db = new HashDb(databaseNameTextField.getText(),
// Arrays.asList(new String[] {databasePathTextField.getText()}),
// useForIngestCheckbox.isSelected(),
// sendInboxMessagesCheckbox.isSelected(),
// type);
// if(type == DBType.KNOWN_BAD) {
// HashDbXML.getCurrent().addKnownBadSet(db);
// } else if(type == DBType.NSRL) {
// HashDbXML.getCurrent().setNSRLSet(db);
// }
try
{
HashDb db = HashDb.openHashDatabase(databaseNameTextField.getText(), databasePathTextField.getText(), useForIngestCheckbox.isSelected(), sendInboxMessagesCheckbox.isSelected(), type);
} catch (TskException ex) {
logger.log(Level.WARNING, "Invalid database: ", ex);
JOptionPane.showMessageDialog(this, "Database file you chose cannot be opened.\n" + "If it was just an index, please try to recreate it from the database");
return;
}
databaseName = databaseNameTextField.getText();
this.dispose();
}//GEN-LAST:event_okButtonActionPerformed