Package zleurtor.scanmanager.model
Class Configuration
java.lang.Object
zleurtor.scanmanager.model.Configuration
The class having in charge to read and store the configuration.
- Author:
- Zleurtor
-
Method Summary
Modifier and TypeMethodDescriptionstatic Configuration
Returns the singleton instance of the configuration.int
Searches for the property with the specified key in this property list.Searches for the property with the specified key in this property list.void
Set the specified value to the specified key.void
updateVersion
(String newVersion) Update the version in the main configuration file.
-
Method Details
-
getInstance
Returns the singleton instance of the configuration.- Returns:
- The singleton instance of the configuration.
-
getString
Searches for the property with the specified key in this property list.- Parameters:
key
- The property key.- Returns:
- The value in this property list with the specified key value.
-
getInt
Searches for the property with the specified key in this property list.- Parameters:
key
- The property key.- Returns:
- The value (as an integer) in this property list with the specified key value.
-
setString
Set the specified value to the specified key.- Parameters:
key
- The key for which the value shall be set.value
- The value to set to the key.
-
updateVersion
Update the version in the main configuration file.- Parameters:
newVersion
- The new version to set in the configuration file.- Throws:
IOException
- if an error occurred when reading/writing the configuration file.
-