19 package org.sleuthkit.autopsy.keywordsearch;
21 import java.util.ArrayList;
22 import java.util.HashSet;
23 import java.util.List;
29 final class KeywordSearchJobSettings
implements IngestModuleIngestJobSettings {
31 private static final long serialVersionUID = 1L;
32 private HashSet<String> namesOfEnabledKeywordLists;
33 private HashSet<String> namesOfDisabledKeywordLists;
40 KeywordSearchJobSettings(List<String> namesOfEnabledKeywordLists) {
41 this(namesOfEnabledKeywordLists,
new ArrayList<String>());
50 KeywordSearchJobSettings(List<String> namesOfEnabledKeywordLists, List<String> namesOfDisabledKeywordLists) {
51 this.namesOfEnabledKeywordLists =
new HashSet<>(namesOfEnabledKeywordLists);
52 this.namesOfDisabledKeywordLists =
new HashSet<>(namesOfDisabledKeywordLists);
59 public long getVersionNumber() {
60 this.upgradeFromOlderVersions();
61 return serialVersionUID;
72 boolean keywordListIsEnabled(String keywordListName) {
73 this.upgradeFromOlderVersions();
74 return namesOfEnabledKeywordLists.contains(keywordListName);
82 List<String> getNamesOfEnabledKeyWordLists() {
83 this.upgradeFromOlderVersions();
84 return new ArrayList<>(namesOfEnabledKeywordLists);
92 List<String> getNamesOfDisabledKeyWordLists() {
93 this.upgradeFromOlderVersions();
94 return new ArrayList<>(namesOfDisabledKeywordLists);
101 private void upgradeFromOlderVersions() {
102 if (null == this.namesOfDisabledKeywordLists) {
103 this.namesOfDisabledKeywordLists =
new HashSet<>();