Class ConfigurationManager
java.lang.Object
net.i2p.i2pcontrol.servlets.configuration.ConfigurationManager
Manage the configuration of I2PControl.
- Author:
- mathias modified: hottuna
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if a specific boolean configuration exists.int
Check if a specific boolean configuration exists.Get a specific String configuration.void
Reads configuration from file, every line is parsed as key=value.void
Set a specific boolean settingvoid
Set a specific int settingvoid
Set a specific string settingvoid
Write configuration into default config file.
-
Constructor Details
-
ConfigurationManager
-
-
Method Details
-
getConfFile
- Since:
- 0.12
-
readConfFile
public void readConfFile()Reads configuration from file, every line is parsed as key=value. -
writeConfFile
public void writeConfFile()Write configuration into default config file. As of 0.12, doesn't actually write unless something changed. -
getConf
Check if a specific boolean configuration exists.- Parameters:
settingName
- The key for the configuration.defaultValue
- If the configuration is not found, we use a default value.- Returns:
- The value of a configuration: true if found, defaultValue if not found.
-
getConf
Check if a specific boolean configuration exists.- Parameters:
settingName
- The key for the configuration.defaultValue
- If the configuration is not found, we use a default value.- Returns:
- The value of a configuration: true if found, defaultValue if not found.
-
getConf
Get a specific String configuration.- Parameters:
settingName
- The key for the configuration.defaultValue
- If the configuration is not found, we use a default value.- Returns:
- The value of the configuration, or the defaultValue.
-
setConf
Set a specific int setting- Parameters:
settingName
-nbr
-
-
setConf
Set a specific string setting- Parameters:
settingName
-str
-
-
setConf
Set a specific boolean setting- Parameters:
settingName
-bool
-
-