mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-09 06:39:33 +00:00
Renaming
This commit is contained in:
parent
a5eec4c20d
commit
ecf8108561
@ -106,7 +106,7 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter
|
|||||||
// Get the current set of updateable hash databases and add each
|
// Get the current set of updateable hash databases and add each
|
||||||
// one to the menu as a separate menu item. Selecting a hash database
|
// one to the menu as a separate menu item. Selecting a hash database
|
||||||
// adds the selected files to the selected database.
|
// adds the selected files to the selected database.
|
||||||
final List<HashDatabase> hashDatabases = HashDbManager.getInstance().getUpdateableHashSetsNew();
|
final List<HashDatabase> hashDatabases = HashDbManager.getInstance().getUpdateableHashDatabases();
|
||||||
if (!hashDatabases.isEmpty()) {
|
if (!hashDatabases.isEmpty()) {
|
||||||
for (final HashDatabase database : hashDatabases) {
|
for (final HashDatabase database : hashDatabases) {
|
||||||
JMenuItem databaseItem = add(database.getHashSetName());
|
JMenuItem databaseItem = add(database.getHashSetName());
|
||||||
|
@ -338,7 +338,7 @@ final class HashDbCreateDatabaseDialog extends javax.swing.JDialog {
|
|||||||
String errorMessage = NbBundle
|
String errorMessage = NbBundle
|
||||||
.getMessage(this.getClass(), "HashDbCreateDatabaseDialog.errMsg.hashDbCreationErr");
|
.getMessage(this.getClass(), "HashDbCreateDatabaseDialog.errMsg.hashDbCreationErr");
|
||||||
try {
|
try {
|
||||||
newHashDb = HashDbManager.getInstance().addNewHashDatabaseNoSave(hashSetNameTextField.getText(), fileChooser.getSelectedFile().getCanonicalPath(), true, sendIngestMessagesCheckbox.isSelected(), type);
|
newHashDb = HashDbManager.getInstance().addNewFileTypeHashDatabase(hashSetNameTextField.getText(), fileChooser.getSelectedFile().getCanonicalPath(), true, sendIngestMessagesCheckbox.isSelected(), type);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
Logger.getLogger(HashDbCreateDatabaseDialog.class.getName()).log(Level.WARNING, errorMessage, ex);
|
Logger.getLogger(HashDbCreateDatabaseDialog.class.getName()).log(Level.WARNING, errorMessage, ex);
|
||||||
JOptionPane.showMessageDialog(this,
|
JOptionPane.showMessageDialog(this,
|
||||||
|
@ -341,7 +341,7 @@ final class HashDbImportDatabaseDialog extends javax.swing.JDialog {
|
|||||||
"HashDbImportDatabaseDialog.errorMessage.failedToOpenHashDbMsg",
|
"HashDbImportDatabaseDialog.errorMessage.failedToOpenHashDbMsg",
|
||||||
selectedFilePath);
|
selectedFilePath);
|
||||||
try {
|
try {
|
||||||
selectedHashDb = HashDbManager.getInstance().addExistingHashDatabaseNoSave(hashSetNameTextField.getText(), selectedFilePath, true, sendIngestMessagesCheckbox.isSelected(), type);
|
selectedHashDb = HashDbManager.getInstance().addExistingFileTypeHashDatabase(hashSetNameTextField.getText(), selectedFilePath, true, sendIngestMessagesCheckbox.isSelected(), type);
|
||||||
} catch (HashDbManagerException ex) {
|
} catch (HashDbManagerException ex) {
|
||||||
Logger.getLogger(HashDbImportDatabaseDialog.class.getName()).log(Level.WARNING, errorMessage, ex);
|
Logger.getLogger(HashDbImportDatabaseDialog.class.getName()).log(Level.WARNING, errorMessage, ex);
|
||||||
JOptionPane.showMessageDialog(this,
|
JOptionPane.showMessageDialog(this,
|
||||||
|
@ -96,8 +96,8 @@ public class HashDbIngestModule implements FileIngestModule {
|
|||||||
if (!hashDbManager.verifyAllDatabasesLoadedCorrectly()) {
|
if (!hashDbManager.verifyAllDatabasesLoadedCorrectly()) {
|
||||||
throw new IngestModuleException("Could not load all hash databases");
|
throw new IngestModuleException("Could not load all hash databases");
|
||||||
}
|
}
|
||||||
updateEnabledHashSets(hashDbManager.getKnownBadFileHashSetsNew(), knownBadHashSets);
|
updateEnabledHashSets(hashDbManager.getNotableFileHashDatabases(), knownBadHashSets);
|
||||||
updateEnabledHashSets(hashDbManager.getKnownFileHashSetsNew(), knownHashSets);
|
updateEnabledHashSets(hashDbManager.getKnownFileHashDatabases(), knownHashSets);
|
||||||
|
|
||||||
if (refCounter.incrementAndGet(jobId) == 1) {
|
if (refCounter.incrementAndGet(jobId) == 1) {
|
||||||
// initialize job totals
|
// initialize job totals
|
||||||
|
@ -58,8 +58,6 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
|
|
||||||
private static final String HASH_DATABASE_FILE_EXTENSON = "kdb"; //NON-NLS
|
private static final String HASH_DATABASE_FILE_EXTENSON = "kdb"; //NON-NLS
|
||||||
private static HashDbManager instance = null;
|
private static HashDbManager instance = null;
|
||||||
//private List<HashDb> knownHashSets = new ArrayList<>();
|
|
||||||
//private List<HashDb> knownBadHashSets = new ArrayList<>();
|
|
||||||
private List<HashDatabase> hashSets = new ArrayList<>();
|
private List<HashDatabase> hashSets = new ArrayList<>();
|
||||||
private Set<String> hashSetNames = new HashSet<>();
|
private Set<String> hashSetNames = new HashSet<>();
|
||||||
private Set<String> hashSetPaths = new HashSet<>();
|
private Set<String> hashSetPaths = new HashSet<>();
|
||||||
@ -146,6 +144,7 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
*
|
*
|
||||||
* @throws HashDbManagerException
|
* @throws HashDbManagerException
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public synchronized HashDb addExistingHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages, HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
public synchronized HashDb addExistingHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages, HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
||||||
HashDb hashDb = null;
|
HashDb hashDb = null;
|
||||||
hashDb = this.addExistingHashDatabaseNoSave(hashSetName, path, searchDuringIngest, sendIngestMessages, knownFilesType);
|
hashDb = this.addExistingHashDatabaseNoSave(hashSetName, path, searchDuringIngest, sendIngestMessages, knownFilesType);
|
||||||
@ -153,7 +152,12 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
return hashDb;
|
return hashDb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
synchronized HashDb addExistingHashDatabaseNoSave(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages, HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
synchronized HashDb addExistingHashDatabaseNoSave(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages, HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
||||||
|
return (HashDb)addExistingFileTypeHashDatabase(hashSetName, path, searchDuringIngest, sendIngestMessages, knownFilesType);
|
||||||
|
}
|
||||||
|
|
||||||
|
synchronized HashDatabase addExistingFileTypeHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages, HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
||||||
HashDb hashDb = null;
|
HashDb hashDb = null;
|
||||||
try {
|
try {
|
||||||
if (!new File(path).exists()) {
|
if (!new File(path).exists()) {
|
||||||
@ -193,6 +197,7 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
*
|
*
|
||||||
* @throws HashDbManagerException
|
* @throws HashDbManagerException
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public synchronized HashDb addNewHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages,
|
public synchronized HashDb addNewHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages,
|
||||||
HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
||||||
|
|
||||||
@ -204,8 +209,14 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
return hashDb;
|
return hashDb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public synchronized HashDb addNewHashDatabaseNoSave(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages,
|
public synchronized HashDb addNewHashDatabaseNoSave(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages,
|
||||||
HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
||||||
|
return (HashDb)addNewFileTypeHashDatabase(hashSetName, path, searchDuringIngest, sendIngestMessages, knownFilesType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized HashDatabase addNewFileTypeHashDatabase(String hashSetName, String path, boolean searchDuringIngest, boolean sendIngestMessages,
|
||||||
|
HashDb.KnownFilesType knownFilesType) throws HashDbManagerException {
|
||||||
HashDb hashDb = null;
|
HashDb hashDb = null;
|
||||||
try {
|
try {
|
||||||
File file = new File(path);
|
File file = new File(path);
|
||||||
@ -241,7 +252,7 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
}
|
}
|
||||||
throw new TskCoreException("Invalid database type in HashDbInfo");
|
throw new TskCoreException("Invalid database type in HashDbInfo");
|
||||||
}
|
}
|
||||||
|
|
||||||
private HashDb addFileTypeHashDatabase(int handle, String hashSetName, boolean searchDuringIngest, boolean sendIngestMessages, HashDb.KnownFilesType knownFilesType) throws TskCoreException {
|
private HashDb addFileTypeHashDatabase(int handle, String hashSetName, boolean searchDuringIngest, boolean sendIngestMessages, HashDb.KnownFilesType knownFilesType) throws TskCoreException {
|
||||||
// Wrap an object around the handle.
|
// Wrap an object around the handle.
|
||||||
HashDb hashDb = new HashDb(handle, hashSetName, searchDuringIngest, sendIngestMessages, knownFilesType);
|
HashDb hashDb = new HashDb(handle, hashSetName, searchDuringIngest, sendIngestMessages, knownFilesType);
|
||||||
@ -308,16 +319,11 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
*
|
*
|
||||||
* @throws HashDbManagerException
|
* @throws HashDbManagerException
|
||||||
*/
|
*/
|
||||||
public synchronized void removeHashDatabase(HashDb hashDb) throws HashDbManagerException {
|
public synchronized void removeHashDatabase(HashDatabase hashDb) throws HashDbManagerException {
|
||||||
this.removeHashDatabaseNoSave(hashDb);
|
this.removeHashDatabaseNoSave(hashDb);
|
||||||
this.save();
|
this.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
// public synchronized void removeHashDatabaseNoSave(HashDb hashDb) throws HashDbManagerException {
|
|
||||||
// removeHashDatabaseNoSave((UnnamedHashSet)hashDb);
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
public synchronized void removeHashDatabaseNoSave(HashDatabase hashDb) throws HashDbManagerException {
|
public synchronized void removeHashDatabaseNoSave(HashDatabase hashDb) throws HashDbManagerException {
|
||||||
// Don't remove a database if ingest is running
|
// Don't remove a database if ingest is running
|
||||||
boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning();
|
boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning();
|
||||||
@ -386,14 +392,30 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public synchronized List<HashDb> getAllHashSets() {
|
public synchronized List<HashDb> getAllHashSets() {
|
||||||
|
return getAllFileTypeHashSets();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all of the file type hash databases used to classify files as known or known
|
||||||
|
* bad.
|
||||||
|
*
|
||||||
|
* @return A list, possibly empty, of hash databases.
|
||||||
|
*/
|
||||||
|
public synchronized List<HashDb> getAllFileTypeHashSets() {
|
||||||
List<HashDb> hashDbs = new ArrayList<>();
|
List<HashDb> hashDbs = new ArrayList<>();
|
||||||
this.hashSets.stream().filter((thisSet) -> (thisSet instanceof HashDb)).forEach((thisSet) -> {
|
this.hashSets.stream().filter((thisSet) -> (thisSet instanceof HashDb)).forEach((thisSet) -> {
|
||||||
hashDbs.add((HashDb)thisSet);
|
hashDbs.add((HashDb)thisSet);
|
||||||
});
|
});
|
||||||
return hashDbs;
|
return hashDbs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized List<HashDatabase> getAllHashSetsNew(){
|
/**
|
||||||
|
* Gets all of the hash databases used to classify files as known or known
|
||||||
|
* bad.
|
||||||
|
*
|
||||||
|
* @return A list, possibly empty, of hash databases.
|
||||||
|
*/
|
||||||
|
public synchronized List<HashDatabase> getAllHashDatabases(){
|
||||||
List<HashDatabase> hashDbs = new ArrayList<>();
|
List<HashDatabase> hashDbs = new ArrayList<>();
|
||||||
hashDbs.addAll(this.hashSets);
|
hashDbs.addAll(this.hashSets);
|
||||||
return hashDbs;
|
return hashDbs;
|
||||||
@ -413,7 +435,12 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
return hashDbs;
|
return hashDbs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized List<HashDatabase> getKnownFileHashSetsNew() {
|
/**
|
||||||
|
* Gets all of the hash databases used to classify files as known.
|
||||||
|
*
|
||||||
|
* @return A list, possibly empty, of hash databases.
|
||||||
|
*/
|
||||||
|
public synchronized List<HashDatabase> getKnownFileHashDatabases() {
|
||||||
List<HashDatabase> hashDbs = new ArrayList<>();
|
List<HashDatabase> hashDbs = new ArrayList<>();
|
||||||
this.hashSets.stream().filter((db) -> (db.getKnownFilesType() == HashDb.KnownFilesType.KNOWN)).forEach((db) -> {
|
this.hashSets.stream().filter((db) -> (db.getKnownFilesType() == HashDb.KnownFilesType.KNOWN)).forEach((db) -> {
|
||||||
hashDbs.add(db);
|
hashDbs.add(db);
|
||||||
@ -435,7 +462,12 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
return hashDbs;
|
return hashDbs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized List<HashDatabase> getKnownBadFileHashSetsNew() {
|
/**
|
||||||
|
* Gets all of the hash databases used to classify files as notable.
|
||||||
|
*
|
||||||
|
* @return A list, possibly empty, of hash databases.
|
||||||
|
*/
|
||||||
|
public synchronized List<HashDatabase> getNotableFileHashDatabases() {
|
||||||
List<HashDatabase> hashDbs = new ArrayList<>();
|
List<HashDatabase> hashDbs = new ArrayList<>();
|
||||||
this.hashSets.stream().filter((db) -> (db.getKnownFilesType() == HashDb.KnownFilesType.KNOWN_BAD)).forEach((db) -> {
|
this.hashSets.stream().filter((db) -> (db.getKnownFilesType() == HashDb.KnownFilesType.KNOWN_BAD)).forEach((db) -> {
|
||||||
hashDbs.add(db);
|
hashDbs.add(db);
|
||||||
@ -458,7 +490,12 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
return updateableDbs;
|
return updateableDbs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized List<HashDatabase> getUpdateableHashSetsNew(){
|
/**
|
||||||
|
* Gets all of the hash databases that accept updates.
|
||||||
|
*
|
||||||
|
* @return A list, possibly empty, of hash databases.
|
||||||
|
*/
|
||||||
|
public synchronized List<HashDatabase> getUpdateableHashDatabases(){
|
||||||
return getUpdateableHashSets(this.hashSets);
|
return getUpdateableHashSets(this.hashSets);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -684,6 +721,7 @@ public class HashDbManager implements PropertyChangeListener {
|
|||||||
|
|
||||||
void close() throws TskCoreException;
|
void close() throws TskCoreException;
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString();
|
public String toString();
|
||||||
|
|
||||||
DatabaseType getDatabaseType();
|
DatabaseType getDatabaseType();
|
||||||
|
@ -60,7 +60,7 @@ public class HashLookupModuleFactory extends IngestModuleFactoryAdapter {
|
|||||||
@Override
|
@Override
|
||||||
public IngestModuleIngestJobSettings getDefaultIngestJobSettings() {
|
public IngestModuleIngestJobSettings getDefaultIngestJobSettings() {
|
||||||
// All available hash sets are enabled and always calculate hashes is true by default.
|
// All available hash sets are enabled and always calculate hashes is true by default.
|
||||||
return new HashLookupModuleSettings(true, HashDbManager.getInstance().getAllHashSetsNew());
|
return new HashLookupModuleSettings(true, HashDbManager.getInstance().getAllHashDatabases());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,6 +55,7 @@ final class HashLookupModuleSettings implements IngestModuleIngestJobSettings {
|
|||||||
/**
|
/**
|
||||||
* This overrides the default deserialization code so we can
|
* This overrides the default deserialization code so we can
|
||||||
* copy the enabled/disabled status into the DatabaseType objects.
|
* copy the enabled/disabled status into the DatabaseType objects.
|
||||||
|
* Ignore the Netbeans warning that this method is unused.
|
||||||
* @param stream
|
* @param stream
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws ClassNotFoundException
|
* @throws ClassNotFoundException
|
||||||
@ -149,7 +150,7 @@ final class HashLookupModuleSettings implements IngestModuleIngestJobSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
databaseInfoList = HashLookupSettings.convertHashSetList(HashDbManager.getInstance().getAllHashSetsNew());
|
databaseInfoList = HashLookupSettings.convertHashSetList(HashDbManager.getInstance().getAllHashDatabases());
|
||||||
} catch (HashLookupSettings.HashLookupSettingsException ex){
|
} catch (HashLookupSettings.HashLookupSettingsException ex){
|
||||||
Logger.getLogger(HashLookupModuleSettings.class.getName()).log(Level.SEVERE, "Error updating hash database settings.", ex); //NON-NLS
|
Logger.getLogger(HashLookupModuleSettings.class.getName()).log(Level.SEVERE, "Error updating hash database settings.", ex); //NON-NLS
|
||||||
return;
|
return;
|
||||||
|
@ -53,8 +53,8 @@ public final class HashLookupModuleSettingsPanel extends IngestModuleIngestJobSe
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initializeHashSetModels(HashLookupModuleSettings settings) {
|
private void initializeHashSetModels(HashLookupModuleSettings settings) {
|
||||||
initializeHashSetModels(settings, hashDbManager.getKnownFileHashSetsNew(), knownHashSetModels);
|
initializeHashSetModels(settings, hashDbManager.getKnownFileHashDatabases(), knownHashSetModels);
|
||||||
initializeHashSetModels(settings, hashDbManager.getKnownBadFileHashSetsNew(), knownBadHashSetModels);
|
initializeHashSetModels(settings, hashDbManager.getNotableFileHashDatabases(), knownBadHashSetModels);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeHashSetModels(HashLookupModuleSettings settings, List<HashDatabase> hashDbs, List<HashSetModel> hashSetModels) {
|
private void initializeHashSetModels(HashLookupModuleSettings settings, List<HashDatabase> hashDbs, List<HashSetModel> hashSetModels) {
|
||||||
@ -125,8 +125,8 @@ public final class HashLookupModuleSettingsPanel extends IngestModuleIngestJobSe
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateHashSetModels() {
|
private void updateHashSetModels() {
|
||||||
updateHashSetModels(hashDbManager.getKnownFileHashSetsNew(), knownHashSetModels);
|
updateHashSetModels(hashDbManager.getKnownFileHashDatabases(), knownHashSetModels);
|
||||||
updateHashSetModels(hashDbManager.getKnownBadFileHashSetsNew(), knownBadHashSetModels);
|
updateHashSetModels(hashDbManager.getNotableFileHashDatabases(), knownBadHashSetModels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateHashSetModels(List<HashDatabase> hashDbs, List<HashSetModel> hashSetModels) {
|
void updateHashSetModels(List<HashDatabase> hashDbs, List<HashSetModel> hashSetModels) {
|
||||||
|
@ -279,14 +279,6 @@ final class HashLookupSettings implements Serializable {
|
|||||||
* @return Whether or not the settings were written successfully
|
* @return Whether or not the settings were written successfully
|
||||||
*/
|
*/
|
||||||
static boolean writeSettings(HashLookupSettings settings) {
|
static boolean writeSettings(HashLookupSettings settings) {
|
||||||
|
|
||||||
System.out.println("\n#####\nwriteSettings");
|
|
||||||
for(HashDbInfo info:settings.hashDbInfoList){
|
|
||||||
System.out.println(info.hashSetName);
|
|
||||||
System.out.println(" DB type: " + info.dbType.toString());
|
|
||||||
System.out.println(" Enabled: " + info.searchDuringIngest);
|
|
||||||
System.out.println(" Type: " + info.knownFilesType.getDisplayName());
|
|
||||||
}
|
|
||||||
|
|
||||||
try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(SERIALIZATION_FILE_PATH))) {
|
try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(SERIALIZATION_FILE_PATH))) {
|
||||||
out.writeObject(settings);
|
out.writeObject(settings);
|
||||||
@ -457,9 +449,8 @@ final class HashLookupSettings implements Serializable {
|
|||||||
// FILE types will always have unique names, so no more testing required
|
// FILE types will always have unique names, so no more testing required
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// To do: central repo tests
|
||||||
// TODO TODO central repo check
|
return false;
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -506,8 +497,7 @@ final class HashLookupSettings implements Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This overrides the default deserialization code so we can
|
* This overrides the default deserialization code so we can
|
||||||
* properly set the dbType enum and other new fields
|
* properly set the dbType enum given an old settings file.
|
||||||
* given an old settings file.
|
|
||||||
* @param stream
|
* @param stream
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @throws ClassNotFoundException
|
* @throws ClassNotFoundException
|
||||||
|
@ -259,7 +259,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
|||||||
public void saveSettings() {
|
public void saveSettings() {
|
||||||
//Checking for for any unindexed databases
|
//Checking for for any unindexed databases
|
||||||
List<HashDatabase> unindexed = new ArrayList<>();
|
List<HashDatabase> unindexed = new ArrayList<>();
|
||||||
for (HashDatabase hashSet : hashSetManager.getAllHashSetsNew()) {
|
for (HashDatabase hashSet : hashSetManager.getAllHashDatabases()) {
|
||||||
try {
|
try {
|
||||||
if (!hashSet.hasIndex()) {
|
if (!hashSet.hasIndex()) {
|
||||||
unindexed.add(hashSet);
|
unindexed.add(hashSet);
|
||||||
@ -408,7 +408,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
|||||||
*/
|
*/
|
||||||
private class HashSetTableModel extends AbstractTableModel {
|
private class HashSetTableModel extends AbstractTableModel {
|
||||||
|
|
||||||
List<HashDatabase> hashSets = HashDbManager.getInstance().getAllHashSetsNew();
|
List<HashDatabase> hashSets = HashDbManager.getInstance().getAllHashDatabases();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getColumnCount() {
|
public int getColumnCount() {
|
||||||
@ -483,7 +483,7 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
|
|||||||
}
|
}
|
||||||
|
|
||||||
void refreshModel() {
|
void refreshModel() {
|
||||||
hashSets = HashDbManager.getInstance().getAllHashSetsNew();
|
hashSets = HashDbManager.getInstance().getAllHashDatabases();
|
||||||
refreshDisplay();
|
refreshDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ class AddTaggedHashesToHashDbConfigPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
// Get the updateable hash databases and add their hash set names to the
|
// Get the updateable hash databases and add their hash set names to the
|
||||||
// JComboBox component.
|
// JComboBox component.
|
||||||
List<HashDatabase> updateableHashSets = HashDbManager.getInstance().getUpdateableHashSetsNew();
|
List<HashDatabase> updateableHashSets = HashDbManager.getInstance().getUpdateableHashDatabases();
|
||||||
if (!updateableHashSets.isEmpty()) {
|
if (!updateableHashSets.isEmpty()) {
|
||||||
for (HashDatabase hashDb : updateableHashSets) {
|
for (HashDatabase hashDb : updateableHashSets) {
|
||||||
hashSetsComboBox.addItem(hashDb);
|
hashSetsComboBox.addItem(hashDb);
|
||||||
|
@ -1016,7 +1016,7 @@ public class SharedConfiguration {
|
|||||||
|
|
||||||
// If a copy of the database is loaded, close it before deleting and copying.
|
// If a copy of the database is loaded, close it before deleting and copying.
|
||||||
if (localDb.exists()) {
|
if (localDb.exists()) {
|
||||||
List<HashDbManager.HashDb> hashDbs = HashDbManager.getInstance().getAllHashSets();
|
List<HashDbManager.HashDb> hashDbs = HashDbManager.getInstance().getAllFileTypeHashSets();
|
||||||
HashDbManager.HashDb matchingDb = null;
|
HashDbManager.HashDb matchingDb = null;
|
||||||
for (HashDbManager.HashDb db : hashDbs) {
|
for (HashDbManager.HashDb db : hashDbs) {
|
||||||
try {
|
try {
|
||||||
@ -1122,7 +1122,7 @@ public class SharedConfiguration {
|
|||||||
try {
|
try {
|
||||||
HashDbManager hashDbManager = HashDbManager.getInstance();
|
HashDbManager hashDbManager = HashDbManager.getInstance();
|
||||||
hashDbManager.loadLastSavedConfiguration();
|
hashDbManager.loadLastSavedConfiguration();
|
||||||
for (HashDb hashDb : hashDbManager.getAllHashSets()) {
|
for (HashDb hashDb : hashDbManager.getAllFileTypeHashSets()) {
|
||||||
if (hashDb.hasIndexOnly()) {
|
if (hashDb.hasIndexOnly()) {
|
||||||
results.add(hashDb.getIndexPath());
|
results.add(hashDb.getIndexPath());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user