public abstract class ConfigurationGroup
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ConfigurationGroup.ConfigurationChangedListener
This listener interface receives events when any property of the configuration changed.
|
Modifier | Constructor and Description |
---|---|
protected |
ConfigurationGroup()
Initializes a new instance of the
ConfigurationGroup class. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPrefix()
Gets the prefix.
|
protected void |
initializeByProperty(java.lang.String key,
java.lang.String value)
Initialize by property.
|
boolean |
isDebug() |
void |
onChanged(ConfigurationGroup.ConfigurationChangedListener listener)
Adds the specified configuration changed listener to receive events about any configuration property that changed.
|
void |
removeChangedListener(ConfigurationGroup.ConfigurationChangedListener listener) |
protected <T> void |
set(java.lang.String fieldName,
T value)
Use this method to set configuration properties if you want to support
configurationChanged for your property. |
void |
setDebug(boolean debug) |
protected void |
storeProperties(java.util.Properties properties)
Store properties.
|
protected ConfigurationGroup()
ConfigurationGroup
class.public void onChanged(ConfigurationGroup.ConfigurationChangedListener listener)
The event is supported for any property that uses the set(String, Object)
method to set the field value.
The event will provide you with the fieldName of the called setter (e.g. "debug" for the "setDebug" call).
listener
- The listener to add.set(String, Object)
public void removeChangedListener(ConfigurationGroup.ConfigurationChangedListener listener)
public java.lang.String getPrefix()
public boolean isDebug()
public void setDebug(boolean debug)
protected void initializeByProperty(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the valueprotected void storeProperties(java.util.Properties properties)
properties
- the propertiesprotected <T> void set(java.lang.String fieldName, T value)
configurationChanged
for your property.T
- The type of the value to set.fieldName
- The name of the field to set.value
- The value to set.