Autopsy  4.4.1
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 (String executionContext)
 
 IngestJobSettings (String context, IngestType ingestType)
 
Path getSavedModuleSettingsFolder ()
 
List< String > getWarnings ()
 
void save ()
 

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 > getModulesNamesFromSetting (String context, String key, String defaultSetting)
 
static String makeCommaSeparatedValuesList (HashSet< String > input)
 

Private Attributes

String executionContext
 
FilesSet fileIngestFilter
 
final IngestType ingestType
 
String moduleSettingsFolderPath
 
final List< IngestModuleTemplate > moduleTemplates
 
final List< String > warnings
 

Static Private Attributes

static final String DISABLED_MODULES_KEY = "Disabled_Ingest_Modules"
 
static final String ENABLED_MODULES_KEY = "Enabled_Ingest_Modules"
 
static final String LAST_FILE_INGEST_FILTER_KEY = "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 pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1)
 

Detailed Description

Encapsulates the ingest job settings for a particular execution context. Examples of execution contexts include the add data source wizard and the run ingest modules dialog. Different execution contexts may have different ingest job settings.

Definition at line 51 of file IngestJobSettings.java.

Constructor & Destructor Documentation

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

Constructs an ingest job settings object for a given execution context. Examples of execution contexts include the add data source wizard and the run ingest modules dialog. Different execution contexts may have different ingest job settings.

Parameters
executionContextThe ingest execution context identifier.

Definition at line 119 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, and org.sleuthkit.autopsy.ingest.IngestJobSettings.load().

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

Constructs an ingest job settings object for a given context. Examples of execution contexts include the add data source wizard and the run ingest modules dialog. Different execution contexts may have different ingest job settings.

Parameters
contextThe context identifier string.
ingestTypeThe type of modules ingest is running.

Definition at line 137 of file IngestJobSettings.java.

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

Member Function Documentation

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

Creates the folder for saving the individual ingest module settings part of these ingest job settings.

Definition at line 278 of file IngestJobSettings.java.

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

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

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 508 of file IngestJobSettings.java.

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

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

static HashSet<String> org.sleuthkit.autopsy.ingest.IngestJobSettings.getModulesNamesFromSetting ( String  context,
String  key,
String  defaultSetting 
)
staticprivate

Gets the module names for a given key within these ingest job settings.

Parameters
contextThe identifier for the context for which to get the module names, e.g., the Add Data Source wizard or Run Ingest Modules context.
keyThe key string.
defaultSettingThe default list of module names.
Returns
The list of module names associated with the key.

Definition at line 404 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().

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

Returns the path to the ingest module settings folder.

Returns
path to the module settings folder

Definition at line 258 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 these ingest job settings.

Returns
A list of warning messages, possibly empty.

Definition at line 191 of file IngestJobSettings.java.

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

Referenced by org.sleuthkit.autopsy.ingest.IngestJobConfigurator.getIngestJobConfigWarnings().

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 459 of file IngestJobSettings.java.

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

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

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

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

Get the enabled/disabled ingest modules settings for this context. By default, all loaded modules 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 292 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_KEY, org.sleuthkit.autopsy.ingest.IngestJobSettings.ENABLED_MODULES_KEY, 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.IngestJobSettings.getModulesNamesFromSetting(), org.sleuthkit.autopsy.modules.interestingitems.FilesSet.getName(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetsManager.getStandardFileIngestFilters(), org.sleuthkit.autopsy.ingest.IngestJobSettings.LAST_FILE_INGEST_FILTER_KEY, org.sleuthkit.autopsy.ingest.IngestJobSettings.loadModuleSettings(), org.sleuthkit.autopsy.ingest.IngestJobSettings.makeCommaSeparatedValuesList(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), 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.makeCommaSeparatedValuesList ( HashSet< String >  input)
staticprivate

Makes a comma-separated values list from a hash set of strings.

Parameters
inputA hash set of strings.
Returns
The contents of the hash set as a single string of comma-separated values.

Definition at line 567 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.saveModuleSettings ( IngestModuleFactory  factory,
IngestModuleIngestJobSettings  settings 
)
private

Serializes the ingest job settings for this context for a given ingest module.

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

Definition at line 548 of file IngestJobSettings.java.

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

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

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

Member Data Documentation

final String org.sleuthkit.autopsy.ingest.IngestJobSettings.DISABLED_MODULES_KEY = "Disabled_Ingest_Modules"
staticprivate
final String org.sleuthkit.autopsy.ingest.IngestJobSettings.ENABLED_MODULES_KEY = "Enabled_Ingest_Modules"
staticprivate
String org.sleuthkit.autopsy.ingest.IngestJobSettings.executionContext
private
FilesSet org.sleuthkit.autopsy.ingest.IngestJobSettings.fileIngestFilter
private

Definition at line 60 of file IngestJobSettings.java.

final IngestType org.sleuthkit.autopsy.ingest.IngestJobSettings.ingestType
private
final String org.sleuthkit.autopsy.ingest.IngestJobSettings.LAST_FILE_INGEST_FILTER_KEY = "Last_File_Ingest_Filter"
staticprivate
final Logger org.sleuthkit.autopsy.ingest.IngestJobSettings.LOGGER = Logger.getLogger(IngestJobSettings.class.getName())
staticprivate

Definition at line 59 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 56 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
private

Definition at line 65 of file IngestJobSettings.java.

final CharSequence org.sleuthkit.autopsy.ingest.IngestJobSettings.pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length() - 1)
staticprivate

Definition at line 64 of file IngestJobSettings.java.

final List<String> org.sleuthkit.autopsy.ingest.IngestJobSettings.warnings
private

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

Copyright © 2012-2016 Basis Technology. Generated on: Fri Sep 29 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.