mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
to be merged
This commit is contained in:
parent
5dc87cc906
commit
e52591abba
@ -80,7 +80,7 @@ public class KeywordSearchConfigurationPanel1 extends javax.swing.JPanel impleme
|
|||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
final String FEATURE_NAME = "Save Keyword List";
|
final String FEATURE_NAME = "Save Keyword List";
|
||||||
KeywordSearchListsXML writer = KeywordSearchListsXML.getCurrent();
|
KeywordSearchListsXML writer = KeywordSearchListsXML.getCurrent();
|
||||||
KeywordSearchList currentKeywordList = editListPanel.getCurrentKeywordList();
|
KeywordSearchListsAbstract.KeywordSearchList currentKeywordList = editListPanel.getCurrentKeywordList();
|
||||||
|
|
||||||
List<Keyword> keywords = currentKeywordList.getKeywords();
|
List<Keyword> keywords = currentKeywordList.getKeywords();
|
||||||
if (keywords.isEmpty()) {
|
if (keywords.isEmpty()) {
|
||||||
|
@ -57,7 +57,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
|||||||
|
|
||||||
private static Logger logger = Logger.getLogger(KeywordSearchEditListPanel.class.getName());
|
private static Logger logger = Logger.getLogger(KeywordSearchEditListPanel.class.getName());
|
||||||
private KeywordTableModel tableModel;
|
private KeywordTableModel tableModel;
|
||||||
private KeywordSearchList currentKeywordList;
|
private KeywordSearchListsAbstract.KeywordSearchList currentKeywordList;
|
||||||
|
|
||||||
|
|
||||||
private boolean ingestRunning;
|
private boolean ingestRunning;
|
||||||
@ -608,7 +608,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec
|
|||||||
|
|
||||||
KeywordSearchListsXML reader = KeywordSearchListsXML.getCurrent();
|
KeywordSearchListsXML reader = KeywordSearchListsXML.getCurrent();
|
||||||
|
|
||||||
List<KeywordSearchList> toWrite = new ArrayList<KeywordSearchList>();
|
List<KeywordSearchListsAbstract.KeywordSearchList> toWrite = new ArrayList<KeywordSearchListsAbstract.KeywordSearchList>();
|
||||||
toWrite.add(reader.getList(currentKeywordList.getName()));
|
toWrite.add(reader.getList(currentKeywordList.getName()));
|
||||||
final KeywordSearchListsXML exporter = new KeywordSearchListsXML(fileAbs);
|
final KeywordSearchListsXML exporter = new KeywordSearchListsXML(fileAbs);
|
||||||
boolean written = exporter.saveLists(toWrite);
|
boolean written = exporter.saveLists(toWrite);
|
||||||
@ -693,11 +693,11 @@ private void useForIngestCheckboxActionPerformed(java.awt.event.ActionEvent evt)
|
|||||||
// Implemented by parent panel
|
// Implemented by parent panel
|
||||||
}
|
}
|
||||||
|
|
||||||
KeywordSearchList getCurrentKeywordList() {
|
KeywordSearchListsAbstract.KeywordSearchList getCurrentKeywordList() {
|
||||||
return currentKeywordList;
|
return currentKeywordList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setCurrentKeywordList(KeywordSearchList list) {
|
void setCurrentKeywordList(KeywordSearchListsAbstract.KeywordSearchList list) {
|
||||||
currentKeywordList = list;
|
currentKeywordList = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public final class KeywordSearchIngestModule implements IngestModuleAbstractFile
|
|||||||
private volatile boolean runSearcher = false; //whether to run searcher next time
|
private volatile boolean runSearcher = false; //whether to run searcher next time
|
||||||
private List<Keyword> keywords; //keywords to search
|
private List<Keyword> keywords; //keywords to search
|
||||||
private List<String> keywordLists; // lists currently being searched
|
private List<String> keywordLists; // lists currently being searched
|
||||||
private Map<String, KeywordSearchList> keywordToList; //keyword to list name mapping
|
private Map<String, KeywordSearchListsAbstract.KeywordSearchList> keywordToList; //keyword to list name mapping
|
||||||
private Timer commitTimer;
|
private Timer commitTimer;
|
||||||
private Timer searchTimer;
|
private Timer searchTimer;
|
||||||
private Indexer indexer;
|
private Indexer indexer;
|
||||||
@ -380,7 +380,7 @@ public final class KeywordSearchIngestModule implements IngestModuleAbstractFile
|
|||||||
|
|
||||||
keywords = new ArrayList<Keyword>();
|
keywords = new ArrayList<Keyword>();
|
||||||
keywordLists = new ArrayList<String>();
|
keywordLists = new ArrayList<String>();
|
||||||
keywordToList = new HashMap<String, KeywordSearchList>();
|
keywordToList = new HashMap<String, KeywordSearchListsAbstract.KeywordSearchList>();
|
||||||
|
|
||||||
initKeywords();
|
initKeywords();
|
||||||
|
|
||||||
@ -566,7 +566,7 @@ public final class KeywordSearchIngestModule implements IngestModuleAbstractFile
|
|||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
for (KeywordSearchList list : loader.getListsL()) {
|
for (KeywordSearchListsAbstract.KeywordSearchList list : loader.getListsL()) {
|
||||||
final String listName = list.getName();
|
final String listName = list.getName();
|
||||||
if (list.getUseForIngest() == true
|
if (list.getUseForIngest() == true
|
||||||
|| (listsToAdd != null && listsToAdd.contains(listName))) {
|
|| (listsToAdd != null && listsToAdd.contains(listName))) {
|
||||||
@ -798,7 +798,7 @@ public final class KeywordSearchIngestModule implements IngestModuleAbstractFile
|
|||||||
*/
|
*/
|
||||||
private List<Keyword> keywords; //keywords to search
|
private List<Keyword> keywords; //keywords to search
|
||||||
private List<String> keywordLists; // lists currently being searched
|
private List<String> keywordLists; // lists currently being searched
|
||||||
private Map<String, KeywordSearchList> keywordToList; //keyword to list name mapping
|
private Map<String, KeywordSearchListsAbstract.KeywordSearchList> keywordToList; //keyword to list name mapping
|
||||||
private AggregateProgressHandle progressGroup;
|
private AggregateProgressHandle progressGroup;
|
||||||
private final Logger logger = Logger.getLogger(Searcher.class.getName());
|
private final Logger logger = Logger.getLogger(Searcher.class.getName());
|
||||||
private boolean finalRun = false;
|
private boolean finalRun = false;
|
||||||
@ -806,7 +806,7 @@ public final class KeywordSearchIngestModule implements IngestModuleAbstractFile
|
|||||||
Searcher(List<String> keywordLists) {
|
Searcher(List<String> keywordLists) {
|
||||||
this.keywordLists = new ArrayList<String>(keywordLists);
|
this.keywordLists = new ArrayList<String>(keywordLists);
|
||||||
this.keywords = new ArrayList<Keyword>();
|
this.keywords = new ArrayList<Keyword>();
|
||||||
this.keywordToList = new HashMap<String, KeywordSearchList>();
|
this.keywordToList = new HashMap<String, KeywordSearchListsAbstract.KeywordSearchList>();
|
||||||
//keywords are populated as searcher runs
|
//keywords are populated as searcher runs
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -874,7 +874,7 @@ public final class KeywordSearchIngestModule implements IngestModuleAbstractFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String queryStr = keywordQuery.getQuery();
|
final String queryStr = keywordQuery.getQuery();
|
||||||
final KeywordSearchList list = keywordToList.get(queryStr);
|
final KeywordSearchListsAbstract.KeywordSearchList list = keywordToList.get(queryStr);
|
||||||
final String listName = list.getName();
|
final String listName = list.getName();
|
||||||
|
|
||||||
//new subProgress will be active after the initial query
|
//new subProgress will be active after the initial query
|
||||||
@ -1110,7 +1110,7 @@ public final class KeywordSearchIngestModule implements IngestModuleAbstractFile
|
|||||||
this.keywordToList.clear();
|
this.keywordToList.clear();
|
||||||
|
|
||||||
for (String name : this.keywordLists) {
|
for (String name : this.keywordLists) {
|
||||||
KeywordSearchList list = loader.getList(name);
|
KeywordSearchListsAbstract.KeywordSearchList list = loader.getList(name);
|
||||||
for (Keyword k : list.getKeywords()) {
|
for (Keyword k : list.getKeywords()) {
|
||||||
this.keywords.add(k);
|
this.keywords.add(k);
|
||||||
this.keywordToList.put(k.getQuery(), list);
|
this.keywordToList.put(k.getQuery(), list);
|
||||||
|
@ -38,12 +38,12 @@ public class KeywordSearchIngestSimplePanel extends javax.swing.JPanel {
|
|||||||
private final static Logger logger = Logger.getLogger(KeywordSearchIngestSimplePanel.class.getName());
|
private final static Logger logger = Logger.getLogger(KeywordSearchIngestSimplePanel.class.getName());
|
||||||
public static final String PROP_OPTIONS = "Keyword Search_Options";
|
public static final String PROP_OPTIONS = "Keyword Search_Options";
|
||||||
private KeywordTableModel tableModel;
|
private KeywordTableModel tableModel;
|
||||||
private List<KeywordSearchList> lists;
|
private List<KeywordSearchListsAbstract.KeywordSearchList> lists;
|
||||||
|
|
||||||
/** Creates new form KeywordSearchIngestSimplePanel */
|
/** Creates new form KeywordSearchIngestSimplePanel */
|
||||||
public KeywordSearchIngestSimplePanel() {
|
public KeywordSearchIngestSimplePanel() {
|
||||||
tableModel = new KeywordTableModel();
|
tableModel = new KeywordTableModel();
|
||||||
lists = new ArrayList<KeywordSearchList>();
|
lists = new ArrayList<KeywordSearchListsAbstract.KeywordSearchList>();
|
||||||
reloadLists();
|
reloadLists();
|
||||||
initComponents();
|
initComponents();
|
||||||
customizeComponents();
|
customizeComponents();
|
||||||
@ -222,7 +222,7 @@ public class KeywordSearchIngestSimplePanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||||
KeywordSearchList list = KeywordSearchIngestSimplePanel.this.lists.get(rowIndex);
|
KeywordSearchListsAbstract.KeywordSearchList list = KeywordSearchIngestSimplePanel.this.lists.get(rowIndex);
|
||||||
if(columnIndex == 0) {
|
if(columnIndex == 0) {
|
||||||
return list.getUseForIngest();
|
return list.getUseForIngest();
|
||||||
} else {
|
} else {
|
||||||
@ -238,7 +238,7 @@ public class KeywordSearchIngestSimplePanel extends javax.swing.JPanel {
|
|||||||
@Override
|
@Override
|
||||||
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
|
public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
|
||||||
|
|
||||||
KeywordSearchList list = KeywordSearchIngestSimplePanel.this.lists.get(rowIndex);
|
KeywordSearchListsAbstract.KeywordSearchList list = KeywordSearchIngestSimplePanel.this.lists.get(rowIndex);
|
||||||
if(columnIndex == 0){
|
if(columnIndex == 0){
|
||||||
KeywordSearchListsXML loader = KeywordSearchListsXML.getCurrent();
|
KeywordSearchListsXML loader = KeywordSearchListsXML.getCurrent();
|
||||||
loader.addList(list.getName(), list.getKeywords(), (Boolean) aValue, false);
|
loader.addList(list.getName(), list.getKeywords(), (Boolean) aValue, false);
|
||||||
|
@ -36,7 +36,7 @@ import org.sleuthkit.datamodel.BlackboardAttribute;
|
|||||||
public abstract class KeywordSearchListsAbstract {
|
public abstract class KeywordSearchListsAbstract {
|
||||||
|
|
||||||
protected String filePath;
|
protected String filePath;
|
||||||
Map<String, KeywordSearchList> theLists; //the keyword data
|
public Map<String, KeywordSearchList> theLists; //the keyword data
|
||||||
static KeywordSearchListsXML currentInstance = null;
|
static KeywordSearchListsXML currentInstance = null;
|
||||||
private static final String CUR_LISTS_FILE_NAME = "keywords.xml";
|
private static final String CUR_LISTS_FILE_NAME = "keywords.xml";
|
||||||
private static String CUR_LISTS_FILE = PlatformUtil.getUserConfigDirectory() + File.separator + CUR_LISTS_FILE_NAME;
|
private static String CUR_LISTS_FILE = PlatformUtil.getUserConfigDirectory() + File.separator + CUR_LISTS_FILE_NAME;
|
||||||
@ -60,7 +60,7 @@ public abstract class KeywordSearchListsAbstract {
|
|||||||
/**
|
/**
|
||||||
* get instance for managing the current keyword list of the application
|
* get instance for managing the current keyword list of the application
|
||||||
*/
|
*/
|
||||||
static KeywordSearchListsXML getCurrent() {
|
public static KeywordSearchListsXML getCurrent() {
|
||||||
if (currentInstance == null) {
|
if (currentInstance == null) {
|
||||||
currentInstance = new KeywordSearchListsXML(CUR_LISTS_FILE);
|
currentInstance = new KeywordSearchListsXML(CUR_LISTS_FILE);
|
||||||
currentInstance.reload();
|
currentInstance.reload();
|
||||||
@ -424,103 +424,103 @@ public abstract class KeywordSearchListsAbstract {
|
|||||||
File f = new File(filePath);
|
File f = new File(filePath);
|
||||||
return f.exists() && f.canRead() && f.canWrite();
|
return f.exists() && f.canRead() && f.canWrite();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* a representation of a single keyword list created or loaded
|
* a representation of a single keyword list created or loaded
|
||||||
*/
|
*/
|
||||||
class KeywordSearchList {
|
public class KeywordSearchList {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private Date created;
|
private Date created;
|
||||||
private Date modified;
|
private Date modified;
|
||||||
private Boolean useForIngest;
|
private Boolean useForIngest;
|
||||||
private Boolean ingestMessages;
|
private Boolean ingestMessages;
|
||||||
private List<Keyword> keywords;
|
private List<Keyword> keywords;
|
||||||
private Boolean locked;
|
private Boolean locked;
|
||||||
|
|
||||||
KeywordSearchList(String name, Date created, Date modified, Boolean useForIngest, Boolean ingestMessages, List<Keyword> keywords, boolean locked) {
|
KeywordSearchList(String name, Date created, Date modified, Boolean useForIngest, Boolean ingestMessages, List<Keyword> keywords, boolean locked) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.created = created;
|
this.created = created;
|
||||||
this.modified = modified;
|
this.modified = modified;
|
||||||
this.useForIngest = useForIngest;
|
this.useForIngest = useForIngest;
|
||||||
this.ingestMessages = ingestMessages;
|
this.ingestMessages = ingestMessages;
|
||||||
this.keywords = keywords;
|
this.keywords = keywords;
|
||||||
this.locked = locked;
|
this.locked = locked;
|
||||||
}
|
|
||||||
|
|
||||||
KeywordSearchList(String name, Date created, Date modified, Boolean useForIngest, Boolean ingestMessages, List<Keyword> keywords) {
|
|
||||||
this(name, created, modified, useForIngest, ingestMessages, keywords, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object obj) {
|
|
||||||
if (obj == null) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
if (getClass() != obj.getClass()) {
|
|
||||||
return false;
|
KeywordSearchList(String name, Date created, Date modified, Boolean useForIngest, Boolean ingestMessages, List<Keyword> keywords) {
|
||||||
|
this(name, created, modified, useForIngest, ingestMessages, keywords, false);
|
||||||
}
|
}
|
||||||
final KeywordSearchList other = (KeywordSearchList) obj;
|
|
||||||
if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public boolean equals(Object obj) {
|
||||||
int hash = 5;
|
if (obj == null) {
|
||||||
return hash;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
Date getDateCreated() {
|
|
||||||
return created;
|
|
||||||
}
|
|
||||||
|
|
||||||
Date getDateModified() {
|
|
||||||
return modified;
|
|
||||||
}
|
|
||||||
|
|
||||||
Boolean getUseForIngest() {
|
|
||||||
return useForIngest;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setUseForIngest(boolean use) {
|
|
||||||
this.useForIngest = use;
|
|
||||||
}
|
|
||||||
|
|
||||||
Boolean getIngestMessages() {
|
|
||||||
return ingestMessages;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setIngestMessages(boolean ingestMessages) {
|
|
||||||
this.ingestMessages = ingestMessages;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Keyword> getKeywords() {
|
|
||||||
return keywords;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean hasKeyword(Keyword keyword) {
|
|
||||||
return keywords.contains(keyword);
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean hasKeyword(String keyword) {
|
|
||||||
//note, this ignores isLiteral
|
|
||||||
for (Keyword k : keywords) {
|
|
||||||
if (k.getQuery().equals(keyword)) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
if (getClass() != obj.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final KeywordSearchList other = (KeywordSearchList) obj;
|
||||||
|
if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Boolean isLocked() {
|
@Override
|
||||||
return locked;
|
public int hashCode() {
|
||||||
|
int hash = 5;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDateCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getDateModified() {
|
||||||
|
return modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getUseForIngest() {
|
||||||
|
return useForIngest;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUseForIngest(boolean use) {
|
||||||
|
this.useForIngest = use;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIngestMessages() {
|
||||||
|
return ingestMessages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIngestMessages(boolean ingestMessages) {
|
||||||
|
this.ingestMessages = ingestMessages;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Keyword> getKeywords() {
|
||||||
|
return keywords;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasKeyword(Keyword keyword) {
|
||||||
|
return keywords.contains(keyword);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasKeyword(String keyword) {
|
||||||
|
//note, this ignores isLiteral
|
||||||
|
for (Keyword k : keywords) {
|
||||||
|
if (k.getQuery().equals(keyword)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean isLocked() {
|
||||||
|
return locked;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -37,7 +37,7 @@
|
|||||||
<Component id="importButton" min="-2" pref="126" max="-2" attributes="0"/>
|
<Component id="importButton" min="-2" pref="126" max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace min="0" pref="4" max="32767" attributes="0"/>
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
|
@ -243,12 +243,12 @@ class KeywordSearchListsManagementPanel extends javax.swing.JPanel implements Op
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<KeywordSearchList> toImport = reader.getListsL();
|
List<KeywordSearchListsAbstract.KeywordSearchList> toImport = reader.getListsL();
|
||||||
List<KeywordSearchList> toImportConfirmed = new ArrayList<KeywordSearchList>();
|
List<KeywordSearchListsAbstract.KeywordSearchList> toImportConfirmed = new ArrayList<KeywordSearchListsAbstract.KeywordSearchList>();
|
||||||
|
|
||||||
final KeywordSearchListsXML writer = KeywordSearchListsXML.getCurrent();
|
final KeywordSearchListsXML writer = KeywordSearchListsXML.getCurrent();
|
||||||
|
|
||||||
for (KeywordSearchList list : toImport) {
|
for (KeywordSearchListsAbstract.KeywordSearchList list : toImport) {
|
||||||
//check name collisions
|
//check name collisions
|
||||||
if (writer.listExists(list.getName())) {
|
if (writer.listExists(list.getName())) {
|
||||||
Object[] options = {"Yes, overwrite",
|
Object[] options = {"Yes, overwrite",
|
||||||
|
@ -105,7 +105,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
|||||||
ListSelectionModel listSelectionModel = (ListSelectionModel) e.getSource();
|
ListSelectionModel listSelectionModel = (ListSelectionModel) e.getSource();
|
||||||
if (!listSelectionModel.isSelectionEmpty()) {
|
if (!listSelectionModel.isSelectionEmpty()) {
|
||||||
int index = listSelectionModel.getMinSelectionIndex();
|
int index = listSelectionModel.getMinSelectionIndex();
|
||||||
KeywordSearchList list = listsTableModel.getListAt(index);
|
KeywordSearchListsAbstract.KeywordSearchList list = listsTableModel.getListAt(index);
|
||||||
keywordsTableModel.resync(list);
|
keywordsTableModel.resync(list);
|
||||||
} else {
|
} else {
|
||||||
keywordsTableModel.deleteAll();
|
keywordsTableModel.deleteAll();
|
||||||
@ -307,13 +307,13 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
|||||||
@Override
|
@Override
|
||||||
public List<Keyword> getQueryList() {
|
public List<Keyword> getQueryList() {
|
||||||
List<Keyword> ret = new ArrayList<Keyword>();
|
List<Keyword> ret = new ArrayList<Keyword>();
|
||||||
for (KeywordSearchList list : getSelectedLists()) {
|
for (KeywordSearchListsAbstract.KeywordSearchList list : getSelectedLists()) {
|
||||||
ret.addAll(list.getKeywords());
|
ret.addAll(list.getKeywords());
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<KeywordSearchList> getSelectedLists() {
|
private List<KeywordSearchListsAbstract.KeywordSearchList> getSelectedLists() {
|
||||||
return listsTableModel.getSelectedListsL();
|
return listsTableModel.getSelectedListsL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,7 +427,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
KeywordSearchList getListAt(int rowIndex) {
|
KeywordSearchListsAbstract.KeywordSearchList getListAt(int rowIndex) {
|
||||||
return listsHandle.getList((String) getValueAt(rowIndex, 1));
|
return listsHandle.getList((String) getValueAt(rowIndex, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,8 +441,8 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<KeywordSearchList> getSelectedListsL() {
|
List<KeywordSearchListsAbstract.KeywordSearchList> getSelectedListsL() {
|
||||||
List<KeywordSearchList> ret = new ArrayList<KeywordSearchList>();
|
List<KeywordSearchListsAbstract.KeywordSearchList> ret = new ArrayList<KeywordSearchListsAbstract.KeywordSearchList>();
|
||||||
for (String s : getSelectedLists()) {
|
for (String s : getSelectedLists()) {
|
||||||
ret.add(listsHandle.getList(s));
|
ret.add(listsHandle.getList(s));
|
||||||
}
|
}
|
||||||
@ -462,8 +462,8 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//add lists to the model
|
//add lists to the model
|
||||||
private void addLists(List<KeywordSearchList> lists) {
|
private void addLists(List<KeywordSearchListsAbstract.KeywordSearchList> lists) {
|
||||||
for (KeywordSearchList list : lists) {
|
for (KeywordSearchListsAbstract.KeywordSearchList list : lists) {
|
||||||
if (!listExists(list.getName())) {
|
if (!listExists(list.getName())) {
|
||||||
listData.add(new ListTableEntry(list, ingestRunning));
|
listData.add(new ListTableEntry(list, ingestRunning));
|
||||||
}
|
}
|
||||||
@ -476,7 +476,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
|||||||
String name;
|
String name;
|
||||||
Boolean selected;
|
Boolean selected;
|
||||||
|
|
||||||
ListTableEntry(KeywordSearchList list, boolean ingestRunning) {
|
ListTableEntry(KeywordSearchListsAbstract.KeywordSearchList list, boolean ingestRunning) {
|
||||||
this.name = list.getName();
|
this.name = list.getName();
|
||||||
if (ingestRunning) {
|
if (ingestRunning) {
|
||||||
this.selected = list.getUseForIngest();
|
this.selected = list.getUseForIngest();
|
||||||
@ -558,7 +558,7 @@ class KeywordSearchListsViewerPanel extends AbstractKeywordSearchPerformer {
|
|||||||
return getValueAt(0, c).getClass();
|
return getValueAt(0, c).getClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
void resync(KeywordSearchList list) {
|
void resync(KeywordSearchListsAbstract.KeywordSearchList list) {
|
||||||
listData.clear();
|
listData.clear();
|
||||||
for (Keyword k : list.getKeywords()) {
|
for (Keyword k : list.getKeywords()) {
|
||||||
listData.add(new KeywordTableEntry(k));
|
listData.add(new KeywordTableEntry(k));
|
||||||
|
@ -236,7 +236,7 @@ public class KeywordSearchResultFactory extends ChildFactory<KeyValueQuery> {
|
|||||||
|
|
||||||
//get listname
|
//get listname
|
||||||
String listName = "";
|
String listName = "";
|
||||||
KeywordSearchList list = KeywordSearchListsXML.getCurrent().getListWithKeyword(tcq.getQueryString());
|
KeywordSearchListsAbstract.KeywordSearchList list = KeywordSearchListsXML.getCurrent().getListWithKeyword(tcq.getQueryString());
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
listName = list.getName();
|
listName = list.getName();
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,15 @@
|
|||||||
<specification-version>5.0</specification-version>
|
<specification-version>5.0</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<code-name-base>org.sleuthkit.autopsy.keywordsearch</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
|
<run-dependency>
|
||||||
|
<release-version>5</release-version>
|
||||||
|
<specification-version>3.0</specification-version>
|
||||||
|
</run-dependency>
|
||||||
|
</dependency>
|
||||||
</module-dependencies>
|
</module-dependencies>
|
||||||
<test-dependencies>
|
<test-dependencies>
|
||||||
<test-type>
|
<test-type>
|
||||||
|
@ -52,6 +52,7 @@ import org.netbeans.jemmy.operators.JTableOperator;
|
|||||||
import org.netbeans.jemmy.operators.JTextFieldOperator;
|
import org.netbeans.jemmy.operators.JTextFieldOperator;
|
||||||
import org.netbeans.junit.NbModuleSuite;
|
import org.netbeans.junit.NbModuleSuite;
|
||||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||||
|
import org.sleuthkit.autopsy.keywordsearch.*;
|
||||||
/**
|
/**
|
||||||
* This test expects the following system properties to be set:
|
* This test expects the following system properties to be set:
|
||||||
* img_path: The fully qualified path to the image file (if split, the first file)
|
* img_path: The fully qualified path to the image file (if split, the first file)
|
||||||
@ -207,6 +208,8 @@ public class RegressionTest extends TestCase{
|
|||||||
logger.info("Search Configure");
|
logger.info("Search Configure");
|
||||||
JDialog jd = JDialogOperator.waitJDialog("Advanced Keyword Search Configuration", false, false);
|
JDialog jd = JDialogOperator.waitJDialog("Advanced Keyword Search Configuration", false, false);
|
||||||
JDialogOperator jdo = new JDialogOperator(jd);
|
JDialogOperator jdo = new JDialogOperator(jd);
|
||||||
|
KeywordSearchListsXML curr = KeywordSearchListsXML.getCurrent();
|
||||||
|
curr.theLists.get("URLs").setUseForIngest(true);
|
||||||
String words = System.getProperty("keyword_path");
|
String words = System.getProperty("keyword_path");
|
||||||
JButtonOperator jbo0 = new JButtonOperator(jdo, "Import List", 0);
|
JButtonOperator jbo0 = new JButtonOperator(jdo, "Import List", 0);
|
||||||
jbo0.pushNoBlock();
|
jbo0.pushNoBlock();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user