Autopsy  4.4.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 configExists (String moduleName)
 
static String getConfigSetting (String moduleName, String settingName)
 
static Map< String, String > getConfigSettings (String moduleName)
 
static File getPropertyFile (String moduleName)
 
static boolean makeConfigFile (String moduleName)
 
static synchronized void removeProperty (String moduleName, String key)
 
static synchronized void setConfigSetting (String moduleName, String settingName, String settingVal)
 
static synchronized void setConfigSettings (String moduleName, Map< String, String > settings)
 
static boolean settingExists (String moduleName, String settingName)
 

Static Public Attributes

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

Private Member Functions

 ModuleSettings ()
 

Static Private Member Functions

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

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 36 of file ModuleSettings.java.

Constructor & Destructor Documentation

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

the constructor

Definition at line 47 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

Returns the given properties file's setting as specific by settingName.

Parameters
moduleName- The name of the config file to read from.
settingName- The setting name to retrieve.
Returns
- the value associated with the setting.
Exceptions
IOException

Definition at line 132 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.casemodule.CaseOpenAction.CaseOpenAction(), org.sleuthkit.autopsy.report.ReportBranding.getAgencyLogoPath(), org.sleuthkit.autopsy.ingest.runIngestModuleWizard.IngestProfileSelectionWizardPanel.getComponent(), org.sleuthkit.autopsy.ingest.IngestServices.getConfigSetting(), org.sleuthkit.autopsy.ingest.IngestProfiles.getIngestProfiles(), org.sleuthkit.autopsy.core.UserPreferences.getMode(), 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.centralrepository.datamodel.SqliteEamDbSettings.isChanged(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.isChanged(), org.sleuthkit.autopsy.ingest.IngestJobSettings.load(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbPlatformEnum.loadSettings(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.loadSettings(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.loadSettings(), org.sleuthkit.autopsy.casemodule.ImageFilePanel.readSettings(), org.sleuthkit.autopsy.coreutils.ModuleSettings.removeProperty(), org.sleuthkit.autopsy.modules.stix.STIXReportModuleConfigPanel.STIXReportModuleConfigPanel(), and org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.useCentralRepo().

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 159 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 283 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 114 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 59 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 243 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 217 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.centralrepository.datamodel.EamDbPlatformEnum.saveSelectedPlatform(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteEamDbSettings.saveSettings(), org.sleuthkit.autopsy.centralrepository.datamodel.PostgresEamDbSettings.saveSettings(), org.sleuthkit.autopsy.report.ReportBranding.setAgencyLogoPath(), org.sleuthkit.autopsy.ingest.IngestServices.setConfigSetting(), org.sleuthkit.autopsy.core.UserPreferences.setMode(), org.sleuthkit.autopsy.report.ReportBranding.setReportFooter(), org.sleuthkit.autopsy.report.ReportBranding.setReportTitle(), org.sleuthkit.autopsy.centralrepository.datamodel.EamDbUtil.setUseCentralRepo(), org.sleuthkit.autopsy.ingest.IngestJobSettings.store(), org.sleuthkit.autopsy.ingest.runIngestModuleWizard.IngestProfileSelectionWizardPanel.storeSettings(), 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 189 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.CURRENT_CASE_TYPE = "Current_Case_Type"
static

Definition at line 42 of file ModuleSettings.java.

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

Definition at line 40 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 39 of file ModuleSettings.java.


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.