T
- The type of system property.public final class SystemProperty<T> extends Object
JiveGlobals
. The only way to create a SystemProperty object
is to use a SystemProperty.Builder
.Modifier and Type | Class and Description |
---|---|
static class |
SystemProperty.Builder<T>
Used to build a
SystemProperty |
Modifier and Type | Method and Description |
---|---|
void |
addListener(Consumer<T> listener) |
String |
getDefaultDisplayValue() |
T |
getDefaultValue() |
String |
getDescription() |
String |
getDisplayValue() |
String |
getKey() |
String |
getPlugin() |
static Collection<SystemProperty> |
getProperties() |
static Optional<SystemProperty> |
getProperty(String key)
Returns the SystemProperty for the specified key
|
T |
getValue() |
String |
getValueAsSaved() |
boolean |
hasValueChanged() |
boolean |
isDynamic() |
boolean |
isEncrypted() |
boolean |
isRestartRequired() |
void |
removeListener(Consumer<T> listener) |
static void |
removePropertiesForPlugin(String plugin)
Removes all the properties for a specific plugin.
|
void |
setValue(T value)
Sets the value of the SystemProperty.
|
public static Collection<SystemProperty> getProperties()
public static void removePropertiesForPlugin(String plugin)
plugin
- The plugin for which properties should be removedpublic static Optional<SystemProperty> getProperty(String key)
key
- the key for the property to fetchpublic T getValue()
null
if the property has not been set and there is no default value.public String getValueAsSaved()
null
if there is no current value and the default is not set.public String getDisplayValue()
null
if there is no current value and the default is not set.public boolean hasValueChanged()
false
if the property has been changed from it's default value, otherwise true
public String getDefaultDisplayValue()
null
if the default value is not configured.public void setValue(T value)
value
- the new value for the SystemPropertypublic String getPlugin()
"Openfire"
public boolean isDynamic()
false
if Openfire or the plugin needs to be restarted for changes to this property to take effect, otherwise true
public boolean isEncrypted()
true
if the property was initially setup to be encrypted, or was encrypted subsequently, otherwise false
public boolean isRestartRequired()
true
if this property has changed and an Openfire or plugin restart is required, otherwise false
public void addListener(Consumer<T> listener)
listener
- a listener to add to the property, that will be called whenever the property value changespublic void removeListener(Consumer<T> listener)
listener
- the listener that is no longer requiredpublic String getKey()
JiveGlobals
key for this property.public String getDescription()
system_property.
property-key.public T getDefaultValue()
null
if there is no default value configured.Copyright © 2003–2019 Ignite Realtime. All rights reserved.