public abstract class UpdatedPropertiesFile extends Properties
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 void |
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, stringPropertyNames
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
IOException
HTMLUserGenerator.properties
protected void checkPropertiesVersion()
protected void storeProperties() throws IOException
IOException
public final String getProperty(String key)
getProperty
in class Properties
string
- Key of property to accessHTMLUserGenerator.properties
public final String getProperty(String key, String defaultValue)
getProperty
in class Properties
key
- Key of property to accessdefaultValue
- default value for the property if isn't in the property file.HTMLUserGenerator.properties
public final Object setProperty(String key, String newValue)
setProperty
in class Properties
key
- Key of property to accessnewValue
- New value for the property.HTMLUserGenerator.properties
Copyright © 2015 universAAL Consortium. All Rights Reserved.