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

Classes

enum  IngestType
 

Public Member Functions

 IngestJobSettings (final String executionContext)
 
 IngestJobSettings (String executionContext, IngestType ingestType)
 
 IngestJobSettings (String executionContext, IngestType ingestType, Collection< IngestModuleTemplate > moduleTemplates)
 
 IngestJobSettings (String executionContext, IngestType ingestType, Collection< IngestModuleTemplate > moduleTemplates, FilesSet fileFilter)
 
List< IngestModuleTemplategetEnabledIngestModuleTemplates ()
 
String getExecutionContext ()
 
FilesSet getFileFilter ()
 
List< IngestModuleTemplategetIngestModuleTemplates ()
 
boolean getProcessUnallocatedSpace ()
 
Path getSavedModuleSettingsFolder ()
 
List< String > getWarnings ()
 
void save ()
 
void saveAs (String executionContext)
 
void setFileFilter (FilesSet fileIngestFilter)
 
void setIngestModuleTemplates (List< IngestModuleTemplate > moduleTemplates)
 

Private Member Functions

void createSavedModuleSettingsFolder ()
 
String getModuleSettingsFilePath (IngestModuleFactory factory)
 
boolean isPythonModuleSettingsFile (String moduleSettingsFilePath)
 
void load ()
 
IngestModuleIngestJobSettings loadModuleSettings (IngestModuleFactory factory)
 
void saveModuleSettings (IngestModuleFactory factory, IngestModuleIngestJobSettings settings)
 
void store ()
 

Static Private Member Functions

static HashSet< String > getModulesNames (String executionContext, String propertyName, String defaultSetting)
 
static String makeCsvList (Collection< String > collection)
 

Private Attributes

String executionContext
 
FilesSet fileFilter
 
final IngestType ingestType
 
String moduleSettingsFolderPath
 
final List< IngestModuleTemplatemoduleTemplates = new ArrayList<>()
 
final List< String > warnings = new ArrayList<>()
 

Static Private Attributes

static final String DISABLED_MODULES_PROPERTY = "Disabled_Ingest_Modules"
 
static final String ENABLED_MODULES_PROPERTY = "Enabled_Ingest_Modules"
 
static final String LAST_FILE_INGEST_FILTER_PROPERTY = "Last_File_Ingest_Filter"
 
static final Logger logger = Logger.getLogger(IngestJobSettings.class.getName())
 
static final String MODULE_SETTINGS_FILE_EXT = ".settings"
 
static final String MODULE_SETTINGS_FOLDER = "IngestModuleSettings"
 
static final String MODULE_SETTINGS_FOLDER_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), IngestJobSettings.MODULE_SETTINGS_FOLDER).toAbsolutePath().toString()
 
static final CharSequence PYTHON_CLASS_PROXY_PREFIX = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1)
 

Detailed Description

The settings for an ingest job.

Definition at line 48 of file IngestJobSettings.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestJobSettings ( final String  executionContext)

Loads the ingest job settings for a given execution context. If settings for the context have not been previously saved, default settings are used.

Some examples of execution contexts include the Add Data Source wizard, the Run Ingest Modules dialog, and auto ingest. Different execution contexts may have different ingest job settings.

Parameters
executionContextThe execution context identifier.

Definition at line 92 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestType.ALL_MODULES, and org.sleuthkit.autopsy.ingest.IngestJobSettings.executionContext.

org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestJobSettings ( String  executionContext,
IngestType  ingestType 
)

Loads the ingest job settings for a given execution context. If settings for the context have not been previously saved, default settings are used.

Some examples of execution contexts include the Add Data Source wizard, the Run Ingest Modules dialog, and auto ingest. Different execution contexts may have different ingest job settings.

Parameters
executionContextThe execution context identifier.
ingestTypeWhether to run all ingest modules, data source level ingest modules only, or file level ingest modules only.

Definition at line 110 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestType.ALL_MODULES, org.sleuthkit.autopsy.ingest.IngestJobSettings.createSavedModuleSettingsFolder(), org.sleuthkit.autopsy.ingest.IngestJobSettings.executionContext, org.sleuthkit.autopsy.ingest.IngestJobSettings.ingestType, and org.sleuthkit.autopsy.ingest.IngestJobSettings.load().

org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestJobSettings ( String  executionContext,
IngestType  ingestType,
Collection< IngestModuleTemplate moduleTemplates 
)

Creates entirely new ingest job settings for a given context without saving them.

Parameters
executionContextThe execution context identifier.
ingestTypeWhether to run all ingest modules, data source level ingest modules only, or file level ingest modules only.
moduleTemplatesA collection of ingest module templates for creating fully configured ingest modules; each template combines an ingest module factory with ingest module job settings and an enabled flag.

Definition at line 134 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestType.ALL_MODULES, org.sleuthkit.autopsy.ingest.IngestJobSettings.executionContext, and org.sleuthkit.autopsy.ingest.IngestJobSettings.ingestType.

org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestJobSettings ( String  executionContext,
IngestType  ingestType,
Collection< IngestModuleTemplate moduleTemplates,
FilesSet  fileFilter 
)

Creates entirely new ingest job settings for a given context without saving them.

Parameters
executionContextThe execution context identifier.
ingestTypeWhether to run all ingest modules, data source level ingest modules only, or file level ingest modules only.
moduleTemplatesA collection of ingest module templates for creating fully configured ingest modules; each template combines an ingest module factory with ingest module job settings and an enabled flag.
fileFilterA file filter in the form of a files set.

Definition at line 158 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.executionContext, org.sleuthkit.autopsy.ingest.IngestJobSettings.ingestType, org.sleuthkit.autopsy.ingest.IngestJobSettings.moduleTemplates, and org.sleuthkit.autopsy.ingest.IngestJobSettings.setFileFilter().

Member Function Documentation

void org.sleuthkit.autopsy.ingest.IngestJobSettings.createSavedModuleSettingsFolder ( )
private
List<IngestModuleTemplate> org.sleuthkit.autopsy.ingest.IngestJobSettings.getEnabledIngestModuleTemplates ( )

Gets the enabled ingest module templates for this ingest job.

Returns
The list of enabled ingest module templates.

Definition at line 266 of file IngestJobSettings.java.

Referenced by org.sleuthkit.autopsy.ingest.DataSourceIngestJob.createIngestPipelines().

String org.sleuthkit.autopsy.ingest.IngestJobSettings.getExecutionContext ( )

Gets the execution context identifier.

Some examples of execution contexts include the Add Data Source wizard, the Run Ingest Modules dialog, and auto ingest. Different execution contexts may have different ingest job settings.

Returns
The execution context identifier.

Definition at line 217 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.executionContext.

FilesSet org.sleuthkit.autopsy.ingest.IngestJobSettings.getFileFilter ( )
List<IngestModuleTemplate> org.sleuthkit.autopsy.ingest.IngestJobSettings.getIngestModuleTemplates ( )

Gets the enabled ingest module templates for the ingest job.

Returns
The list of ingest module templates.

Definition at line 247 of file IngestJobSettings.java.

Referenced by org.sleuthkit.autopsy.ingest.IngestJobSettingsPanel.IngestJobSettingsPanel().

String org.sleuthkit.autopsy.ingest.IngestJobSettings.getModuleSettingsFilePath ( IngestModuleFactory  factory)
private

Returns the absolute path for the ingest job settings file for a given ingest module for these ingest job settings.

Parameters
factoryThe ingest module factory for an ingest module.
Returns
The file path.

Definition at line 541 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.MODULE_SETTINGS_FILE_EXT.

Referenced by org.sleuthkit.autopsy.ingest.IngestJobSettings.loadModuleSettings(), and org.sleuthkit.autopsy.ingest.IngestJobSettings.saveModuleSettings().

static HashSet<String> org.sleuthkit.autopsy.ingest.IngestJobSettings.getModulesNames ( String  executionContext,
String  propertyName,
String  defaultSetting 
)
staticprivate

Gets a list of enabled module names from the properties file for the execution context of these ingest job settings.

Parameters
executionContextThe execution context identifier.
propertyNameThe property name.
defaultSettingThe default list of module names to se and return if the property does not exist.
Returns

Definition at line 444 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.settingExists().

Referenced by org.sleuthkit.autopsy.ingest.IngestJobSettings.load().

boolean org.sleuthkit.autopsy.ingest.IngestJobSettings.getProcessUnallocatedSpace ( )

Gets the process unallocated space flag for this ingest job.

Returns
True or false.

Definition at line 282 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.modules.interestingitems.FilesSet.ingoresUnallocatedSpace().

Path org.sleuthkit.autopsy.ingest.IngestJobSettings.getSavedModuleSettingsFolder ( )

Gets the path to the module settings folder for these ingest job settings.

Returns
The path to the ingest module settings folder.

Definition at line 169 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.MODULE_SETTINGS_FOLDER_PATH.

Referenced by org.sleuthkit.autopsy.ingest.IngestJobSettings.createSavedModuleSettingsFolder().

List<String> org.sleuthkit.autopsy.ingest.IngestJobSettings.getWarnings ( )

Gets and clears any accumulated warnings associated with the loading or saving of these ingest job settings.

Returns
A list of warning messages, possibly empty.

Definition at line 202 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.warnings.

Referenced by org.sleuthkit.autopsy.commandlineingest.CommandLineIngestManager.JobProcessingTask.analyze(), and org.sleuthkit.autopsy.commandlineingest.CommandLineIngestSettingsPanel.showWarnings().

boolean org.sleuthkit.autopsy.ingest.IngestJobSettings.isPythonModuleSettingsFile ( String  moduleSettingsFilePath)
private

Determines if the moduleSettingsFilePath is that of a serialized jython instance. Serialized Jython instances (settings saved on the disk) contain "org.python.proxies." in their fileName based on the current implementation.

Parameters
moduleSettingsFilePathpath to the module settings file.
Returns
True or false

Definition at line 503 of file IngestJobSettings.java.

void org.sleuthkit.autopsy.ingest.IngestJobSettings.load ( )
private

Loads the saved or default ingest job settings for the execution context into memory.

Get the ingest module factories discovered by the ingest module loader.

Hard coding Plaso to be disabled by default. loadedModuleNames is passed below as the default list of enabled modules so briefly remove Plaso from loaded modules to get the list of enabled and disabled modules names. Then put Plaso back into loadedModulesNames to let the rest of the code continue as before.

Get the enabled/disabled ingest modules settings for this context. By default, all loaded modules except Plaso are enabled.

Check for missing modules and create warnings if any are found.

Create ingest module templates. Each template encapsulates a module factory, the module settings for this context, and an enabled flag.

Update the enabled/disabled ingest module settings for this context to reflect any missing modules or newly discovered modules.

Restore the last used File Ingest Filter

Definition at line 309 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestType.ALL_MODULES, org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestType.DATA_SOURCE_ONLY, org.sleuthkit.autopsy.ingest.IngestJobSettings.DISABLED_MODULES_PROPERTY, org.sleuthkit.autopsy.ingest.IngestJobSettings.ENABLED_MODULES_PROPERTY, org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestType.FILES_ONLY, org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetsManager.getCustomFileIngestFilters(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetsManager.getDefaultFilter(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetsManager.getInstance(), org.sleuthkit.autopsy.ingest.IngestModuleTemplate.getModuleName(), org.sleuthkit.autopsy.ingest.IngestJobSettings.getModulesNames(), org.sleuthkit.autopsy.modules.interestingitems.FilesSet.getName(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetsManager.getStandardFileIngestFilters(), org.sleuthkit.autopsy.ingest.IngestJobSettings.LAST_FILE_INGEST_FILTER_PROPERTY, org.sleuthkit.autopsy.ingest.IngestJobSettings.loadModuleSettings(), org.sleuthkit.autopsy.ingest.IngestJobSettings.makeCsvList(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), org.sleuthkit.autopsy.ingest.IngestModuleTemplate.setEnabled(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.settingExists().

Referenced by org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestJobSettings().

IngestModuleIngestJobSettings org.sleuthkit.autopsy.ingest.IngestJobSettings.loadModuleSettings ( IngestModuleFactory  factory)
private
static String org.sleuthkit.autopsy.ingest.IngestJobSettings.makeCsvList ( Collection< String >  collection)
staticprivate

Makes a comma-separated values list from a collection of strings.

Parameters
collectionA collection of strings.
Returns
The contents of the collection as a single string of comma-separated values.

Definition at line 599 of file IngestJobSettings.java.

Referenced by org.sleuthkit.autopsy.ingest.IngestJobSettings.load(), and org.sleuthkit.autopsy.ingest.IngestJobSettings.store().

void org.sleuthkit.autopsy.ingest.IngestJobSettings.save ( )
void org.sleuthkit.autopsy.ingest.IngestJobSettings.saveAs ( String  executionContext)

Saves these ingest job settings for use in a different execution context.

Some examples of execution contexts include the Add Data Source wizard, the Run Ingest Modules dialog, and auto ingest. Different execution contexts may have different ingest job settings.

Parameters
executionContextThe new execution context.

Definition at line 190 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.createSavedModuleSettingsFolder(), org.sleuthkit.autopsy.ingest.IngestJobSettings.executionContext, and org.sleuthkit.autopsy.ingest.IngestJobSettings.store().

void org.sleuthkit.autopsy.ingest.IngestJobSettings.saveModuleSettings ( IngestModuleFactory  factory,
IngestModuleIngestJobSettings  settings 
)
private

Serializes the ingest job settings for a given ingest module.

Parameters
factoryThe ingest module factory for the module.
settingsThe ingest job settings for the ingest module

Definition at line 580 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.executionContext, org.sleuthkit.autopsy.ingest.IngestModuleFactory.getModuleDisplayName(), and org.sleuthkit.autopsy.ingest.IngestJobSettings.getModuleSettingsFilePath().

Referenced by org.sleuthkit.autopsy.ingest.IngestJobSettings.store().

void org.sleuthkit.autopsy.ingest.IngestJobSettings.setFileFilter ( FilesSet  fileIngestFilter)

Sets the file filter for the ingest job.

Parameters
fileIngestFilterThe filter as a files set.

Definition at line 238 of file IngestJobSettings.java.

Referenced by org.sleuthkit.autopsy.ingest.IngestJobSettings.IngestJobSettings(), and org.sleuthkit.autopsy.ingest.IngestJobSettingsPanel.updateSelectedFilter().

void org.sleuthkit.autopsy.ingest.IngestJobSettings.setIngestModuleTemplates ( List< IngestModuleTemplate moduleTemplates)

Sets the enabled ingest module templates for the ingest job.

Parameters
moduleTemplatesThe ingest module templates.

Definition at line 256 of file IngestJobSettings.java.

Referenced by org.sleuthkit.autopsy.ingest.IngestJobSettingsPanel.getSettings().

void org.sleuthkit.autopsy.ingest.IngestJobSettings.store ( )
private

Member Data Documentation

final String org.sleuthkit.autopsy.ingest.IngestJobSettings.DISABLED_MODULES_PROPERTY = "Disabled_Ingest_Modules"
staticprivate
final String org.sleuthkit.autopsy.ingest.IngestJobSettings.ENABLED_MODULES_PROPERTY = "Enabled_Ingest_Modules"
staticprivate
String org.sleuthkit.autopsy.ingest.IngestJobSettings.executionContext
private
FilesSet org.sleuthkit.autopsy.ingest.IngestJobSettings.fileFilter
private
final IngestType org.sleuthkit.autopsy.ingest.IngestJobSettings.ingestType
private
final String org.sleuthkit.autopsy.ingest.IngestJobSettings.LAST_FILE_INGEST_FILTER_PROPERTY = "Last_File_Ingest_Filter"
staticprivate
final Logger org.sleuthkit.autopsy.ingest.IngestJobSettings.logger = Logger.getLogger(IngestJobSettings.class.getName())
staticprivate

Definition at line 57 of file IngestJobSettings.java.

final String org.sleuthkit.autopsy.ingest.IngestJobSettings.MODULE_SETTINGS_FILE_EXT = ".settings"
staticprivate
final String org.sleuthkit.autopsy.ingest.IngestJobSettings.MODULE_SETTINGS_FOLDER = "IngestModuleSettings"
staticprivate

Definition at line 53 of file IngestJobSettings.java.

final String org.sleuthkit.autopsy.ingest.IngestJobSettings.MODULE_SETTINGS_FOLDER_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), IngestJobSettings.MODULE_SETTINGS_FOLDER).toAbsolutePath().toString()
staticprivate
String org.sleuthkit.autopsy.ingest.IngestJobSettings.moduleSettingsFolderPath
private

Definition at line 63 of file IngestJobSettings.java.

final List<IngestModuleTemplate> org.sleuthkit.autopsy.ingest.IngestJobSettings.moduleTemplates = new ArrayList<>()
private
final CharSequence org.sleuthkit.autopsy.ingest.IngestJobSettings.PYTHON_CLASS_PROXY_PREFIX = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1)
staticprivate

Definition at line 56 of file IngestJobSettings.java.

final List<String> org.sleuthkit.autopsy.ingest.IngestJobSettings.warnings = new ArrayList<>()
private

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

Copyright © 2012-2018 Basis Technology. Generated on: Wed Sep 18 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.