mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
Finished error messaging protocol
This commit is contained in:
@@ -21,7 +21,7 @@ FileExtMismatchConfigPanel.removeExtButton.noneSelected=No extension selected\!
|
||||
FileExtMismatchConfigPanel.removeExtButton.noMimeTypeSelected=No MIME type selected\!
|
||||
FileExtMismatchConfigPanel.removeExtButton.deleted=Extension {0} deleted.
|
||||
FileExtMismatchConfigPanel.store.msg=Saved.
|
||||
FileExtMismatchConfigPanel.store.msgDlg.msg=Writing XML configuration file failed.
|
||||
FileExtMismatchConfigPanel.store.msgDlg.msg=Writing configuration file failed.
|
||||
FileExtMismatchConfigPanel.save.msgDlg.title=Save Error
|
||||
FileExtMismatchConfigPanel.ok.confDlg.msg=Would you like to save configuration changes?
|
||||
FileExtMismatchConfigPanel.confDlg.title=Unsaved Changes
|
||||
|
||||
@@ -583,8 +583,7 @@ final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel
|
||||
// Load the configuration into a buffer that the user can modify. They can choose
|
||||
// to save it back to the file after making changes.
|
||||
editableMap = FileExtMismatchXML.getDefault().load();
|
||||
updateMimeList();
|
||||
updateExtList();
|
||||
|
||||
} catch (FileExtMismatchXML.FileExtMismatchException ex) {
|
||||
//error
|
||||
JOptionPane.showMessageDialog(this,
|
||||
@@ -594,6 +593,8 @@ final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel
|
||||
"FileExtMismatchConfigPanel.save.msgDlg.title"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
updateMimeList();
|
||||
updateExtList();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -90,9 +90,7 @@ class FileExtMismatchXML {
|
||||
*
|
||||
* @return Loaded hash map or null on error or null if data does not exist
|
||||
*/
|
||||
public HashMap<String, String[]> load() throws FileExtMismatchException {
|
||||
throw new FileExtMismatchException("");
|
||||
/*HashMap<String, String[]> sigTypeToExtMap = new HashMap<>();
|
||||
public HashMap<String, String[]> load() throws FileExtMismatchException {HashMap<String, String[]> sigTypeToExtMap = new HashMap<>();
|
||||
File serializedFile = new File(DEFAULT_SERIALIZED_FILE_PATH);
|
||||
if (serializedFile.exists()) {
|
||||
try {
|
||||
@@ -148,7 +146,7 @@ class FileExtMismatchXML {
|
||||
logger.log(Level.SEVERE, "Error loading config file.", e); //NON-NLS
|
||||
return null;
|
||||
}
|
||||
return sigTypeToExtMap;*/
|
||||
return sigTypeToExtMap;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -160,14 +158,13 @@ class FileExtMismatchXML {
|
||||
* @return Loaded hash map or null on error or null if data does not exist
|
||||
*/
|
||||
public boolean save(HashMap<String, String[]> sigTypeToExtMap) throws FileExtMismatchException {
|
||||
throw new FileExtMismatchException("");
|
||||
/*try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(DEFAULT_SERIALIZED_FILE_PATH))) {
|
||||
try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(DEFAULT_SERIALIZED_FILE_PATH))) {
|
||||
FileExtMismatchSettings settings = new FileExtMismatchSettings(sigTypeToExtMap);
|
||||
out.writeObject(settings);
|
||||
return true;
|
||||
} catch (IOException ex) {
|
||||
throw new FileExtMismatchException(String.format("Failed to write settings to %s", DEFAULT_SERIALIZED_FILE_PATH), ex);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user