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

Static Public Member Functions

static boolean makeConfigFile (String moduleName)
 
static boolean configExists (String moduleName)
 
static boolean settingExists (String moduleName, String settingName)
 
static String getConfigSetting (String moduleName, String settingName)
 
static Map< String, String > getConfigSettings (String moduleName)
 
static synchronized void setConfigSettings (String moduleName, Map< String, String > settings)
 
static synchronized void setConfigSetting (String moduleName, String settingName, String settingVal)
 
static synchronized void removeProperty (String moduleName, String key)
 
static File getPropertyFile (String moduleName)
 

Static Public Attributes

static final String DEFAULT_CONTEXT = "GeneralContext"
 
static final String MAIN_SETTINGS = "Case"
 

Private Member Functions

 ModuleSettings ()
 

Static Private Member Functions

static String getPropertyPath (String moduleName)
 
static Properties fetchProperties (String moduleName) throws IOException
 

Static Private Attributes

static final String moduleDirPath = PlatformUtil.getUserConfigDirectory()
 

Detailed Description

This class contains the framework to read, add, update, and remove from the property files located at USERDIR%/Config/x.properties

Definition at line 37 of file ModuleSettings.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.coreutils.ModuleSettings.ModuleSettings ( )
private

the constructor

Definition at line 45 of file ModuleSettings.java.

Member Function Documentation

static boolean org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists ( String  moduleName)
static
static Properties org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties ( String  moduleName) throws IOException
staticprivate
static String org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting ( String  moduleName,
String  settingName 
)
static
static Map< String, String> org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSettings ( String  moduleName)
static

Returns the given properties file's map of settings.

Parameters
moduleName- the name of the config file to read from.
Returns
- the map of all key:value pairs representing the settings of the config.
Exceptions
IOException

Definition at line 144 of file ModuleSettings.java.

References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.Logger.getLogger(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile().

Referenced by org.sleuthkit.autopsy.ingest.IngestServices.getConfigSettings().

static File org.sleuthkit.autopsy.coreutils.ModuleSettings.getPropertyFile ( String  moduleName)
static

Gets the property file as specified.

Parameters
moduleName
Returns
A new file handle, returns null if the file does not exist.

Definition at line 260 of file ModuleSettings.java.

References org.sleuthkit.autopsy.coreutils.ModuleSettings.getPropertyPath().

static String org.sleuthkit.autopsy.coreutils.ModuleSettings.getPropertyPath ( String  moduleName)
staticprivate

Returns the path of the given properties file.

Parameters
moduleName- The name of the config file to evaluate
Returns
The path of the given config file. Returns null if the config file doesn't exist.

Definition at line 105 of file ModuleSettings.java.

References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists().

Referenced by org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getPropertyFile(), org.sleuthkit.autopsy.coreutils.ModuleSettings.removeProperty(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSettings().

static boolean org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile ( String  moduleName)
static

Makes a new config file of the specified name. Do not include the extension.

Parameters
moduleName- The name of the config file to make
Returns
True if successfully created, false if already exists or an error is thrown.

Definition at line 52 of file ModuleSettings.java.

References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), and org.sleuthkit.autopsy.coreutils.Logger.getLogger().

Referenced by org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSettings(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSettings().

static synchronized void org.sleuthkit.autopsy.coreutils.ModuleSettings.removeProperty ( String  moduleName,
String  key 
)
static

Removes the given key from the given properties file.

Parameters
moduleName- The name of the properties file to be modified.
key- the name of the key to remove.

Definition at line 224 of file ModuleSettings.java.

References org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.coreutils.Logger.getLogger(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.getPropertyPath().

static synchronized void org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting ( String  moduleName,
String  settingName,
String  settingVal 
)
static

Sets the given properties file to the given settings.

Parameters
moduleName- The name of the module to be written to.
settingName- The name of the setting to be modified.
settingVal- the value to set the setting to.

Definition at line 199 of file ModuleSettings.java.

References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.Logger.getLogger(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getPropertyPath(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile().

Referenced by org.sleuthkit.autopsy.casemodule.CaseOpenAction.actionPerformed(), org.sleuthkit.autopsy.modules.stix.STIXReportModule.generateReport(), org.sleuthkit.autopsy.ingest.IngestJobSettings.getModulesNamesFromSetting(), org.sleuthkit.autopsy.report.ReportBranding.getReportFooter(), org.sleuthkit.autopsy.report.ReportBranding.getReportTitle(), org.sleuthkit.autopsy.keywordsearch.Server.initSettings(), org.sleuthkit.autopsy.modules.stix.STIXReportModuleConfigPanel.jCheckBox1ActionPerformed(), org.sleuthkit.autopsy.ingest.IngestJobSettings.load(), org.sleuthkit.autopsy.casemodule.services.TagsManager.saveTagNamesToTagsSettings(), org.sleuthkit.autopsy.report.ReportBranding.setAgencyLogoPath(), org.sleuthkit.autopsy.ingest.IngestServices.setConfigSetting(), org.sleuthkit.autopsy.report.ReportBranding.setReportFooter(), org.sleuthkit.autopsy.report.ReportBranding.setReportTitle(), org.sleuthkit.autopsy.ingest.IngestJobSettings.store(), and org.sleuthkit.autopsy.casemodule.ImageFilePanel.storeSettings().

static synchronized void org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSettings ( String  moduleName,
Map< String, String >  settings 
)
static

Sets the given properties file to the given setting map.

Parameters
moduleName- The name of the module to be written to.
settings- The mapping of all key:value pairs of settings to add to the config.

Definition at line 172 of file ModuleSettings.java.

References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.Logger.getLogger(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getPropertyPath(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile().

Referenced by org.sleuthkit.autopsy.ingest.IngestServices.setConfigSettings().

static boolean org.sleuthkit.autopsy.coreutils.ModuleSettings.settingExists ( String  moduleName,
String  settingName 
)
static

Member Data Documentation

final String org.sleuthkit.autopsy.coreutils.ModuleSettings.DEFAULT_CONTEXT = "GeneralContext"
static

Definition at line 41 of file ModuleSettings.java.

final String org.sleuthkit.autopsy.coreutils.ModuleSettings.MAIN_SETTINGS = "Case"
static
final String org.sleuthkit.autopsy.coreutils.ModuleSettings.moduleDirPath = PlatformUtil.getUserConfigDirectory()
staticprivate

Definition at line 40 of file ModuleSettings.java.


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.