Autopsy
4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Static Public Member Functions | |
static synchronized boolean | configExists (String moduleName) |
static synchronized String | getConfigSetting (String moduleName, String settingName) |
static synchronized Map< String, String > | getConfigSettings (String moduleName) |
static synchronized File | getPropertyFile (String moduleName) |
static synchronized boolean | makeConfigFile (String moduleName) |
static synchronized void | removeProperty (String moduleName, String settingName) |
static synchronized void | setConfigSetting (String moduleName, String settingName, String settingVal) |
static synchronized void | setConfigSettings (String moduleName, Map< String, String > settings) |
static synchronized 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 synchronized Properties | fetchProperties (String moduleName) throws IOException |
static String | getSettingsFilePath (String moduleName) |
Static Private Attributes | |
static final Logger | logger = Logger.getLogger(ModuleSettings.class.getName()) |
static final String | MODULE_DIR_PATH = PlatformUtil.getUserConfigDirectory() |
static final String | SETTINGS_FILE_EXT = ".properties" |
Provides utility methods for creating, updating, and deleting Java properties files with paths such as USERDIR%/Config/[module name].properties, where "module name" is intended to be a module name and the properties file is intended to be a settings file for the module.
Very coarse-grained thread safety is provided by these utilities if all modules confine themselves to their use when manipulating their settings files, with the consequence of serializing all such operations across the entire application.
TODO (JIRA-5964): The error handling in this class is not consistent with Autopsy error handling policy.
Definition at line 47 of file ModuleSettings.java.
|
private |
Private constructor to prevent instantiation of this utility class.
Definition at line 303 of file ModuleSettings.java.
|
static |
Indicates whether or not a settings file exists for a given module.
moduleName | The module name. |
Definition at line 99 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath().
Referenced by org.sleuthkit.autopsy.casemodule.UnpackagePortableCaseProgressDialog.UnpackageWorker.doInBackground(), org.sleuthkit.autopsy.casemodule.UnpackagePortableCaseProgressDialog.UnpackageWorker.getCaseIfUnpackedBefore(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSettings(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getPropertyFile(), org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSettings(), org.sleuthkit.autopsy.corecomponents.Installer.setModuleSettings(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.settingExists().
|
staticprivate |
Gets the contents of a module settings file as a Properties object.
moduleName | The module name. |
IOException | If there is a problem reading the settings file. |
Definition at line 276 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath().
Referenced by org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSettings(), org.sleuthkit.autopsy.coreutils.ModuleSettings.removeProperty(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSettings(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.settingExists().
|
static |
Gets the value of a setting (property) from a module settings file.
NOTE: If the settings file does not already exist, it is created.
moduleName | The module name. |
settingName | The setting name. |
Definition at line 149 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.allowUseOfCentralRepository(), org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.componentOpened(), org.sleuthkit.autopsy.report.ReportBranding.getAgencyLogoPath(), org.sleuthkit.autopsy.casemodule.UnpackagePortableCaseProgressDialog.UnpackageWorker.getCaseIfUnpackedBefore(), org.sleuthkit.autopsy.ingest.runIngestModuleWizard.IngestProfileSelectionWizardPanel.getComponent(), org.sleuthkit.autopsy.ingest.IngestServices.getConfigSetting(), org.sleuthkit.autopsy.casemodule.services.TagNameDefinition.getCRNotableList(), org.sleuthkit.autopsy.ingest.IngestProfiles.getIngestProfiles(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.getLastUsedDirectory(), org.sleuthkit.autopsy.core.UserPreferences.getMode(), org.sleuthkit.autopsy.ingest.IngestJobSettings.getModulesNames(), org.sleuthkit.autopsy.casemodule.services.TagNameDefinition.getPropertyFileVersion(), org.sleuthkit.autopsy.report.ReportBranding.getReportFooter(), org.sleuthkit.autopsy.report.ReportBranding.getReportTitle(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.getSavedDbChoice(), org.sleuthkit.autopsy.keywordsearch.Server.initSettings(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.isDisabledDueToFailure(), org.sleuthkit.autopsy.ingest.IngestJobSettings.load(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteCentralRepoSettings.loadSettings(), org.sleuthkit.autopsy.timeline.OpenTimelineAction.performAction(), org.sleuthkit.autopsy.casemodule.ImageFilePanel.readSettings(), org.sleuthkit.autopsy.coreutils.ModuleSettings.removeProperty(), org.sleuthkit.autopsy.core.Installer.updateConfig(), org.sleuthkit.autopsy.casemodule.services.TagNameDefinition.updateTagDefinitions(), org.sleuthkit.autopsy.timeline.actions.ViewArtifactInTimelineAction.ViewArtifactInTimelineAction(), and org.sleuthkit.autopsy.timeline.actions.ViewFileInTimelineAction.ViewFileInTimelineAction().
|
static |
Gets the settings (properties) from a module settings file.
NOTE: If the settings file does not already exist, it is created.
moduleName | The module name. |
Definition at line 173 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile().
Referenced by org.sleuthkit.autopsy.casemodule.UnpackagePortableCaseProgressDialog.UnpackageWorker.getCaseIfUnpackedBefore(), org.sleuthkit.autopsy.ingest.IngestServices.getConfigSettings(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoPostgresSettingsUtil.loadCustomSettings(), and org.sleuthkit.autopsy.centralrepository.eventlisteners.Installer.setupDefaultCentralRepository().
|
static |
Gets a File object for a module settings (properties) file.
moduleName | The module name. |
Definition at line 292 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath().
|
staticprivate |
Constructs a settings file path for a given module.
moduleName | The module name. |
Definition at line 134 of file ModuleSettings.java.
Referenced by org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSettings(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getPropertyFile(), org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile(), org.sleuthkit.autopsy.coreutils.ModuleSettings.removeProperty(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSettings(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.settingExists().
|
static |
Makes a new settings file for a module.
moduleName | The module name. |
Definition at line 69 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath().
Referenced by org.sleuthkit.autopsy.casemodule.UnpackagePortableCaseProgressDialog.UnpackageWorker.doInBackground(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSettings(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSetting(), org.sleuthkit.autopsy.coreutils.ModuleSettings.setConfigSettings(), and org.sleuthkit.autopsy.corecomponents.Installer.setModuleSettings().
|
static |
Removes a setting (property) in a module settings file.
moduleName | The module name. |
settingName | The setting name. |
Definition at line 252 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getConfigSetting(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath().
|
static |
Sets the value of a setting (property) in a module settings file.
NOTE: If the settings file does not already exist, it is created.
moduleName | The module name. |
settingName | The setting name. |
settingVal | The setting value. |
Definition at line 230 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile().
Referenced by org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.componentOpened(), org.sleuthkit.autopsy.casemodule.UnpackagePortableCaseProgressDialog.UnpackageWorker.doInBackground(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.exportSetButtonActionPerformed(), org.sleuthkit.autopsy.ingest.IngestJobSettings.getModulesNames(), org.sleuthkit.autopsy.report.ReportBranding.getReportFooter(), org.sleuthkit.autopsy.report.ReportBranding.getReportTitle(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.importSetButtonActionPerformed(), org.sleuthkit.autopsy.keywordsearch.Server.initSettings(), org.sleuthkit.autopsy.ingest.IngestJobSettings.load(), org.sleuthkit.autopsy.core.AutopsyOptionProcessor.process(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.saveDbChoice(), org.sleuthkit.autopsy.centralrepository.datamodel.SqliteCentralRepoSettings.saveSettings(), org.sleuthkit.autopsy.report.ReportBranding.setAgencyLogoPath(), org.sleuthkit.autopsy.ingest.IngestServices.setConfigSetting(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager.setDisabledDueToFailure(), org.sleuthkit.autopsy.core.UserPreferences.setMode(), org.sleuthkit.autopsy.corecomponents.Installer.setModuleSettings(), org.sleuthkit.autopsy.report.ReportBranding.setReportFooter(), org.sleuthkit.autopsy.report.ReportBranding.setReportTitle(), org.sleuthkit.autopsy.centralrepository.eventlisteners.Installer.setupDefaultCentralRepository(), org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil.setUseCentralRepo(), org.sleuthkit.autopsy.ingest.IngestJobSettings.store(), org.sleuthkit.autopsy.ingest.runIngestModuleWizard.IngestProfileSelectionWizardPanel.storeSettings(), org.sleuthkit.autopsy.casemodule.ImageFilePanel.storeSettings(), org.sleuthkit.autopsy.core.Installer.updateConfig(), and org.sleuthkit.autopsy.casemodule.services.TagNameDefinition.updateTagDefinitions().
|
static |
Adds a mapping of setting name to setting values to a module settings file.
NOTE: If the settings file does not already exist, it is created.
moduleName | The module name. |
settings | The module settings. |
Definition at line 201 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.makeConfigFile().
Referenced by org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoPostgresSettingsUtil.saveCustomSettings(), and org.sleuthkit.autopsy.ingest.IngestServices.setConfigSettings().
|
static |
Determines whether or not a given setting exists in the settings file for a module.
moduleName | The module name. |
settingName | The name of the setting (property). |
Definition at line 113 of file ModuleSettings.java.
References org.sleuthkit.autopsy.coreutils.ModuleSettings.configExists(), org.sleuthkit.autopsy.coreutils.ModuleSettings.fetchProperties(), and org.sleuthkit.autopsy.coreutils.ModuleSettings.getSettingsFilePath().
Referenced by org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.componentOpened(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.getLastUsedDirectory(), org.sleuthkit.autopsy.core.UserPreferences.getMode(), org.sleuthkit.autopsy.ingest.IngestJobSettings.getModulesNames(), org.sleuthkit.autopsy.keywordsearch.Server.initSettings(), and org.sleuthkit.autopsy.ingest.IngestJobSettings.load().
|
static |
Definition at line 59 of file ModuleSettings.java.
|
static |
Definition at line 57 of file ModuleSettings.java.
|
staticprivate |
Definition at line 49 of file ModuleSettings.java.
|
static |
Definition at line 58 of file ModuleSettings.java.
Referenced by org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.componentOpened(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.exportSetButtonActionPerformed(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.getLastUsedDirectory(), org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.importSetButtonActionPerformed(), and org.sleuthkit.autopsy.core.AutopsyOptionProcessor.process().
|
staticprivate |
Definition at line 50 of file ModuleSettings.java.
|
staticprivate |
Definition at line 51 of file ModuleSettings.java.
Copyright © 2012-2021 Basis Technology. Generated on: Tue Jan 19 2021
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.