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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user