From ed9c83acf59f2c350fce133098f419b43fefd76a Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Mon, 31 Mar 2014 18:06:48 -0400 Subject: [PATCH] Added addKeywordListToAllJobs method --- .../autopsy/keywordsearch/SearchRunner.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SearchRunner.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SearchRunner.java index c10b474621..0361195fae 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SearchRunner.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SearchRunner.java @@ -125,6 +125,19 @@ public final class SearchRunner { doFinalSearch(copy); } + /** + * Add this list to all of the jobs + * @param keywordListName + */ + public void addKeywordListToAllJobs(String keywordListName) { + logger.log(Level.INFO, "Adding keyword list {0} to all jobs", keywordListName); + synchronized(this) { + for(Entry j : jobs.entrySet()) { + j.getValue().getKeywordListNames().add(keywordListName); + } + } + } + /** * Commits index and notifies listeners of index update */ @@ -175,11 +188,11 @@ public final class SearchRunner { @Override public void actionPerformed(ActionEvent e) { commit(); - + + logger.log(Level.INFO, "Launching searchers"); synchronized(SearchRunner.this) { // Spawn a search thread for each job ///@todo Don't spawn a new thread if a job still has the previous one running - logger.log(Level.INFO, "Launching searchers"); for(Entry j : jobs.entrySet()) { SearchJobInfo copy = new SearchJobInfo(j.getValue()); Searcher s = new Searcher(copy, true);