
public abstract class UpdatedPropertiesFile extends Properties
| Modifier and Type | Field and Description |
|---|---|
protected File |
propertiesFile
The properties file.
|
defaults| Constructor and Description |
|---|
UpdatedPropertiesFile(File propFile)
Create a
Properties that is linked and updated with the propfile |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addDefaults(Properties defaults)
to be implemented to add the default values at the start if there is no
file.
|
protected boolean |
checkPropertiesVersion()
Checks for updates the properties file, and updates the properties.
|
abstract String |
getComments()
Get the comments for the Property file.
|
String |
getProperty(String key)
Access to the property file.
|
String |
getProperty(String key,
String defaultValue)
Access to the property file.
|
void |
loadProperties()
load configuration properties from a file, setting the default for those
which are not defined.
|
Object |
setProperty(String key,
String newValue)
Update the property file.
|
protected void |
storeProperties()
Save the current properties in the file.
|
list, list, load, load, loadFromXML, propertyNames, save, store, store, storeToXML, storeToXML, stringPropertyNamesclear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, valuesprotected File propertiesFile
public UpdatedPropertiesFile(File propFile)
Properties that is linked and updated with the propfilepropFile - the properties filepublic abstract String getComments()
protected abstract void addDefaults(Properties defaults)
defaults - public void loadProperties()
throws IOException
IOExceptionHTMLUserGenerator#propertiesprotected boolean checkPropertiesVersion()
protected void storeProperties()
throws IOException
IOExceptionpublic final String getProperty(String key)
getProperty in class Propertiesstring - Key of property to accessHTMLUserGenerator#propertiespublic final String getProperty(String key, String defaultValue)
getProperty in class Propertieskey - Key of property to accessdefaultValue - default value for the property if isn't in the property file.HTMLUserGenerator#propertiespublic final Object setProperty(String key, String newValue)
setProperty in class Propertieskey - Key of property to accessnewValue - New value for the property.HTMLUserGenerator#propertiesCopyright © 2018 universAAL Consortium. All rights reserved.