Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.keywordsearch.KwsAnalysisResultIngestModule Class Reference

Inherits org.sleuthkit.autopsy.ingest.AnalysisResultIngestModule.

Public Member Functions

IngestModule.ProcessResult process (AnalysisResult result)
 
default void shutDown ()
 
void startUp (IngestJobContext context) throws IngestModule.IngestModuleException
 

Private Attributes

IngestJobContext context
 
KeywordSearchService searchService
 

Static Private Attributes

static final Logger LOGGER = Logger.getLogger(KeywordSearchIngestModule.class.getName())
 
static final int TSK_KEYWORD_HIT_TYPE_ID = BlackboardArtifact.Type.TSK_KEYWORD_HIT.getTypeID()
 

Detailed Description

An analysis result ingest module that indexes text for keyword search. All keyword searching of indexed text, whether from files, data artifacts, or analysis results, including the final keyword search of an ingest job, is done in the last instance of the companion keyword search file ingest module.

Definition at line 38 of file KwsAnalysisResultIngestModule.java.

Member Function Documentation

IngestModule.ProcessResult org.sleuthkit.autopsy.keywordsearch.KwsAnalysisResultIngestModule.process ( AnalysisResult  result)

Processes an analysis result.

IMPORTANT: In addition to returning ProcessResult.OK or ProcessResult.ERROR, modules should log all errors using methods provided by the org.sleuthkit.autopsy.coreutils.Logger class. Log messages should include the name and object ID of the data being processed. If an exception has been caught by the module, the exception should be sent to the Logger along with the log message so that a stack trace will appear in the application log.

Parameters
resultThe analysis result to process.
Returns
A result code indicating success or failure of the processing.

Implements org.sleuthkit.autopsy.ingest.AnalysisResultIngestModule.

Definition at line 52 of file KwsAnalysisResultIngestModule.java.

References org.sleuthkit.autopsy.ingest.IngestModule.ProcessResult.ERROR, org.sleuthkit.autopsy.ingest.IngestJobContext.getJobId(), org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService.index(), org.sleuthkit.autopsy.ingest.IngestModule.ProcessResult.OK, and org.sleuthkit.autopsy.keywordsearch.KwsAnalysisResultIngestModule.TSK_KEYWORD_HIT_TYPE_ID.

default void org.sleuthkit.autopsy.ingest.IngestModule.shutDown ( )
inherited

Invoked by Autopsy when an ingest job is completed (either because the data has been analyzed or because the job was cancelled), before the ingest module instance is discarded. The module should respond by doing things like releasing private resources, submitting final results, and posting a final ingest message.

IMPORTANT: If the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. See IngestModuleReferenceCounter.

Implemented in org.sleuthkit.autopsy.thunderbirdparser.ThunderbirdMboxFileIngestModule, org.sleuthkit.autopsy.modules.hashdatabase.HashDbIngestModule, org.sleuthkit.autopsy.keywordsearch.KeywordSearchIngestModule, org.sleuthkit.autopsy.centralrepository.ingestmodule.CentralRepoDataArtifactIngestModule, org.sleuthkit.autopsy.modules.filetypeid.FileTypeIdIngestModule, org.sleuthkit.autopsy.modules.fileextmismatch.FileExtMismatchIngestModule, org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorIngestModule, org.sleuthkit.autopsy.recentactivity.RAImageIngestModule, and org.sleuthkit.autopsy.modules.yara.YaraIngestModule.

Definition at line 91 of file IngestModule.java.

void org.sleuthkit.autopsy.keywordsearch.KwsAnalysisResultIngestModule.startUp ( IngestJobContext  context) throws IngestModule.IngestModuleException

Invoked by Autopsy to allow an ingest module instance to set up any internal data structures and acquire any private resources it will need during an ingest job. If the module depends on loading any resources, it should do so in this method so that it can throw an exception in the case of an error and alert the user. Exceptions that are thrown from startUp() are logged and stop processing of the data source.

IMPORTANT: If the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. See IngestModuleReferenceCounter.

IMPORTANT: Start up IngestModuleException messages are displayed to the user, if a user is present. Therefore, an exception to the policy that exception messages are not localized is appropriate in this method. Also, the exception messages should be user-friendly.

Parameters
contextProvides data and services specific to the ingest job and the ingest pipeline of which the module is a part.
Exceptions
org.sleuthkit.autopsy.ingest.IngestModule.IngestModuleException

Implements org.sleuthkit.autopsy.ingest.IngestModule.

Definition at line 46 of file KwsAnalysisResultIngestModule.java.

References org.sleuthkit.autopsy.keywordsearch.KwsAnalysisResultIngestModule.context.

Member Data Documentation

IngestJobContext org.sleuthkit.autopsy.keywordsearch.KwsAnalysisResultIngestModule.context
private
final Logger org.sleuthkit.autopsy.keywordsearch.KwsAnalysisResultIngestModule.LOGGER = Logger.getLogger(KeywordSearchIngestModule.class.getName())
staticprivate

Definition at line 40 of file KwsAnalysisResultIngestModule.java.

KeywordSearchService org.sleuthkit.autopsy.keywordsearch.KwsAnalysisResultIngestModule.searchService
private

Definition at line 43 of file KwsAnalysisResultIngestModule.java.

final int org.sleuthkit.autopsy.keywordsearch.KwsAnalysisResultIngestModule.TSK_KEYWORD_HIT_TYPE_ID = BlackboardArtifact.Type.TSK_KEYWORD_HIT.getTypeID()
staticprivate

The documentation for this class was generated from the following file:

Copyright © 2012-2022 Basis Technology. Generated on: Tue Oct 4 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.