diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchModuleFactory.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchModuleFactory.java index c6b2c39f888228c1ad2a6463c65dc35e7371bb20..43bbafaf063761d1f8b03e1ba361564ad65bbb60 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchModuleFactory.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchModuleFactory.java @@ -130,7 +130,12 @@ public boolean isDataArtifactIngestModuleFactory() { @Override public DataArtifactIngestModule createDataArtifactIngestModule(IngestModuleIngestJobSettings settings) { - return new KwsDataArtifactIngestModule(); + if (!(settings instanceof KeywordSearchJobSettings)) { + throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(), + "KeywordSearchModuleFactory.createFileIngestModule.exception.msg")); + } + + return new KwsDataArtifactIngestModule((KeywordSearchJobSettings) settings); } @Override @@ -140,7 +145,12 @@ public boolean isAnalysisResultIngestModuleFactory() { @Override public AnalysisResultIngestModule createAnalysisResultIngestModule(IngestModuleIngestJobSettings settings) { - return new KwsAnalysisResultIngestModule(); + if (!(settings instanceof KeywordSearchJobSettings)) { + throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(), + "KeywordSearchModuleFactory.createFileIngestModule.exception.msg")); + } + + return new KwsAnalysisResultIngestModule((KeywordSearchJobSettings) settings); } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KwsAnalysisResultIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KwsAnalysisResultIngestModule.java index b82c4d91fef544c3a43d06e5c68aef54a2f1aae9..26ac0180675072fda932c925a395462a86af84b4 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KwsAnalysisResultIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KwsAnalysisResultIngestModule.java @@ -41,7 +41,12 @@ public class KwsAnalysisResultIngestModule implements AnalysisResultIngestModule private static final int TSK_KEYWORD_HIT_TYPE_ID = BlackboardArtifact.Type.TSK_KEYWORD_HIT.getTypeID(); private IngestJobContext context; private KeywordSearchService searchService; + private final KeywordSearchJobSettings settings; + KwsAnalysisResultIngestModule(KeywordSearchJobSettings settings) { + this.settings = settings; + } + @Override public void startUp(IngestJobContext context) throws IngestModule.IngestModuleException { this.context = context; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KwsDataArtifactIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KwsDataArtifactIngestModule.java index fe4cac8b4fd095657450fcaa259da2b2073f9478..74e81801f618844730fccee753602b3a4fa23d77 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KwsDataArtifactIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KwsDataArtifactIngestModule.java @@ -40,7 +40,12 @@ public class KwsDataArtifactIngestModule implements DataArtifactIngestModule { private static final int TSK_ASSOCIATED_OBJECT_TYPE_ID = BlackboardArtifact.Type.TSK_ASSOCIATED_OBJECT.getTypeID(); private IngestJobContext context; private KeywordSearchService searchService; + private final KeywordSearchJobSettings settings; + KwsDataArtifactIngestModule(KeywordSearchJobSettings settings) { + this.settings = settings; + } + @Override public void startUp(IngestJobContext context) throws IngestModuleException { this.context = context;