Class ConfigurationManager
java.lang.Object
net.i2p.i2pcontrol.servlets.configuration.ConfigurationManager
Manage the configuration of I2PControl.
- Author:
 - mathias modified: hottuna
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if a specific boolean configuration exists.intCheck if a specific boolean configuration exists.Get a specific String configuration.voidReads configuration from file, every line is parsed as key=value.voidSet a specific boolean settingvoidSet a specific int settingvoidSet a specific string settingvoidWrite 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-
 
 -