Autopsy  3.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
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

Public Member Functions

 IngestJobSettings (String context)
 
void save ()
 
List< String > getWarnings ()
 

Private Member Functions

void createSavedModuleSettingsFolder ()
 
void load ()
 
HashSet< String > getModulesNamesFromSetting (String key, String defaultSetting)
 
boolean isPythonModuleSettingsFile (String moduleSettingsFilePath)
 
IngestModuleIngestJobSettings loadModuleSettings (IngestModuleFactory factory)
 
String getModuleSettingsFilePath (IngestModuleFactory factory)
 
void store ()
 
void saveModuleSettings (IngestModuleFactory factory, IngestModuleIngestJobSettings settings)
 

Static Private Member Functions

static String makeCommaSeparatedValuesList (HashSet< String > input)
 

Private Attributes

final String context
 
String moduleSettingsFolderPath
 
final List< IngestModuleTemplate > moduleTemplates
 
boolean processUnallocatedSpace
 
final List< String > warnings
 

Static Private Attributes

static final String ENABLED_MODULES_KEY = "Enabled_Ingest_Modules"
 
static final String DISABLED_MODULES_KEY = "Disabled_Ingest_Modules"
 
static final String PARSE_UNALLOC_SPACE_KEY = "Process_Unallocated_Space"
 
static final String PROCESS_UNALLOC_SPACE_DEFAULT = "true"
 
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 String MODULE_SETTINGS_FILE_EXT = ".settings"
 
static final Logger logger = Logger.getLogger(IngestJobSettings.class.getName())
 
static final CharSequence pythonModuleSettingsPrefixCS = "org.python.proxies.".subSequence(0, "org.python.proxies.".length()-1)
 

Detailed Description

Encapsulates the ingest job settings for a particular context such as the Add Data Source wizard or the Run Ingest Modules dialog.

Definition at line 45 of file IngestJobSettings.java.

Constructor & Destructor Documentation

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

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

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

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 337 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().

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

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

Parameters
keyThe key string.
defaultSettingThe default list of module names.
Returns
The list of module names associated with the key.

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

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

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

Referenced by org.sleuthkit.autopsy.ingest.IngestJobConfigurator.getIngestJobConfigWarnings(), and org.sleuthkit.autopsy.ingest.RunIngestModulesDialog.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 290 of file IngestJobSettings.java.

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

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.

Definition at line 167 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.DISABLED_MODULES_KEY, org.sleuthkit.autopsy.ingest.IngestJobSettings.ENABLED_MODULES_KEY, org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.ingest.IngestJobSettings.getModulesNamesFromSetting(), org.sleuthkit.autopsy.ingest.IngestJobSettings.loadModuleSettings(), org.sleuthkit.autopsy.ingest.IngestJobSettings.makeCommaSeparatedValuesList(), org.sleuthkit.autopsy.ingest.IngestJobSettings.PARSE_UNALLOC_SPACE_KEY, org.sleuthkit.autopsy.ingest.IngestJobSettings.PROCESS_UNALLOC_SPACE_DEFAULT, 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 404 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 378 of file IngestJobSettings.java.

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

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

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

Saves the ingest job settings for this context.

Save the enabled/disabled ingest module settings.

Save the process unallocated space setting.

Definition at line 346 of file IngestJobSettings.java.

References org.sleuthkit.autopsy.ingest.IngestJobSettings.makeCommaSeparatedValuesList(), org.sleuthkit.autopsy.ingest.IngestJobSettings.saveModuleSettings(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting().

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

Member Data Documentation

final String org.sleuthkit.autopsy.ingest.IngestJobSettings.context
private
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
final Logger org.sleuthkit.autopsy.ingest.IngestJobSettings.logger = Logger.getLogger(IngestJobSettings.class.getName())
staticprivate

Definition at line 54 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 51 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 56 of file IngestJobSettings.java.

final List<IngestModuleTemplate> org.sleuthkit.autopsy.ingest.IngestJobSettings.moduleTemplates
private

Definition at line 58 of file IngestJobSettings.java.

final String org.sleuthkit.autopsy.ingest.IngestJobSettings.PARSE_UNALLOC_SPACE_KEY = "Process_Unallocated_Space"
staticprivate
final String org.sleuthkit.autopsy.ingest.IngestJobSettings.PROCESS_UNALLOC_SPACE_DEFAULT = "true"
staticprivate
boolean org.sleuthkit.autopsy.ingest.IngestJobSettings.processUnallocatedSpace
private

Definition at line 59 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 57 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-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.