mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Add code to keep keyword search config panels in synch
This commit is contained in:
parent
b09b6ea4ea
commit
c14ec91e9d
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2013 Basis Technology Corp.
|
* Copyright 2011-2014 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -22,7 +22,6 @@ import java.awt.event.ActionEvent;
|
|||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.lang.Long;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -128,7 +127,8 @@ public final class KeywordSearchIngestModule extends IngestModuleAbstractFile {
|
|||||||
private static List<AbstractFileExtract> textExtractors;
|
private static List<AbstractFileExtract> textExtractors;
|
||||||
private static AbstractFileStringExtract stringExtractor;
|
private static AbstractFileStringExtract stringExtractor;
|
||||||
private boolean initialized = false;
|
private boolean initialized = false;
|
||||||
private KeywordSearchConfigurationPanel panel;
|
private KeywordSearchIngestSimplePanel simpleConfigPanel;
|
||||||
|
private KeywordSearchConfigurationPanel advancedConfigPanel;
|
||||||
private Tika tikaFormatDetector;
|
private Tika tikaFormatDetector;
|
||||||
|
|
||||||
|
|
||||||
@ -436,26 +436,36 @@ public final class KeywordSearchIngestModule extends IngestModuleAbstractFile {
|
|||||||
@Override
|
@Override
|
||||||
public javax.swing.JPanel getSimpleConfiguration(String context) {
|
public javax.swing.JPanel getSimpleConfiguration(String context) {
|
||||||
KeywordSearchListsXML.getCurrent().reload();
|
KeywordSearchListsXML.getCurrent().reload();
|
||||||
return new KeywordSearchIngestSimplePanel();
|
|
||||||
|
if (null == simpleConfigPanel) {
|
||||||
|
simpleConfigPanel = new KeywordSearchIngestSimplePanel();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
simpleConfigPanel.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
return simpleConfigPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public javax.swing.JPanel getAdvancedConfiguration(String context) {
|
public javax.swing.JPanel getAdvancedConfiguration(String context) {
|
||||||
//return KeywordSearchConfigurationPanel.getDefault();
|
if (advancedConfigPanel == null) {
|
||||||
getPanel().load();
|
advancedConfigPanel = new KeywordSearchConfigurationPanel();
|
||||||
return getPanel();
|
|
||||||
}
|
|
||||||
|
|
||||||
private KeywordSearchConfigurationPanel getPanel() {
|
|
||||||
if (panel == null) {
|
|
||||||
panel = new KeywordSearchConfigurationPanel();
|
|
||||||
}
|
}
|
||||||
return panel;
|
|
||||||
|
advancedConfigPanel.load();
|
||||||
|
return advancedConfigPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveAdvancedConfiguration() {
|
public void saveAdvancedConfiguration() {
|
||||||
getPanel().store();
|
if (advancedConfigPanel != null) {
|
||||||
|
advancedConfigPanel.store();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (simpleConfigPanel != null) {
|
||||||
|
simpleConfigPanel.load();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -70,10 +70,12 @@ public class KeywordSearchIngestSimplePanel extends javax.swing.JPanel {
|
|||||||
reloadEncodings();
|
reloadEncodings();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void load() {
|
public void load() {
|
||||||
|
KeywordSearchListsXML.getCurrent().reload();
|
||||||
reloadLists();
|
reloadLists();
|
||||||
reloadLangs();
|
reloadLangs();
|
||||||
reloadEncodings();
|
reloadEncodings();
|
||||||
|
tableModel.fireTableDataChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void store() {
|
public void store() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user