public interface PACommonProperties
Modifier and Type | Method and Description |
---|---|
String |
getCmdLine()
Returns the string to be passed on the command line
The property surrounded by '-D' and '='
|
String |
getConfigurationDefaultRelativeFilePath()
Returns the default relative path used to store the property file
|
String |
getConfigurationFilePathPropertyName()
Returns the System property name used to store the configuration file path
|
String |
getKey()
Get the key.
|
PropertyType |
getType()
Return the type of the given properties.
|
boolean |
getValueAsBoolean()
Returns the value of this property as a boolean.
|
int |
getValueAsInt()
Returns the value of this property as an integer.
|
List<String> |
getValueAsList(String separator)
Returns the value of this property as a List of strings.
|
long |
getValueAsLong()
Returns the value of this property as a long integer.
|
String |
getValueAsString()
Returns the value of this property as a string.
|
String |
getValueAsStringOrNull()
Returns the value of this property as a string.
|
boolean |
isSet()
Return true if this property is set or has a default value, false otherwise.
|
void |
loadPropertiesFromFile(String filename)
Load the properties from the given file.
|
void |
reloadConfiguration()
Reload the properties using the default property file configuration
This method will clean every loaded properties before.
|
void |
unSet()
Unset this property, if this property has a default value, calling unSet will revert to the default.
|
void |
updateProperty(String value)
Set the value of this property to the given one.
|
String getKey()
void updateProperty(String value)
value
- the new value to set.boolean isSet()
void unSet()
String getCmdLine()
int getValueAsInt()
long getValueAsLong()
String getValueAsString()
String getValueAsStringOrNull()
boolean getValueAsBoolean()
Boolean.parseBoolean(String s)
.List<String> getValueAsList(String separator)
separator
- the separator to usePropertyType getType()
String getConfigurationFilePathPropertyName()
String getConfigurationDefaultRelativeFilePath()
void loadPropertiesFromFile(String filename)
filename
- the file containing the properties to be loaded.void reloadConfiguration()