public abstract class ConfigPropertyService extends Object
See PropertyValueProvider
for information
on configuring a property value provider.
Implementation os this class are required to be thread safe allowing multiple threads to invoke methods on an instance concurrently.
Modifier and Type | Field and Description |
---|---|
protected static String |
CONFIG_PROPERTY_SERVICE_KEY
Key used to store the application's ConfigPropertyService instance in the applicationScope map.
|
Constructor and Description |
---|
ConfigPropertyService() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addPropertyChangeListener(PropertyChangeListener listener)
Register a listener to be informed if/when a property value is changed.
|
static ConfigPropertyService |
getInstance(javax.faces.context.ExternalContext externalContext)
Obtain a reference to the service.
|
abstract String |
getProperty(javax.faces.context.ExternalContext externalContext,
String name) |
protected abstract TestPropertyValueProvider |
getTestProvider()
Get the test value provider.
|
protected abstract void |
notifyValueChange(javax.faces.context.ExternalContext externalContext,
String name,
String oldValue)
Notify value change listeners of a config property value change.
|
abstract void |
removePropertyChangeListener(PropertyChangeListener listener)
Unregister a property change listener.
|
protected static final String CONFIG_PROPERTY_SERVICE_KEY
public static ConfigPropertyService getInstance(javax.faces.context.ExternalContext externalContext)
externalContext
- container context object.public abstract String getProperty(javax.faces.context.ExternalContext externalContext, String name)
externalContext
- container context object.name
- name of the requested property.null
if the property was not found.NullPointerException
- is the specified name is null.public abstract void addPropertyChangeListener(PropertyChangeListener listener)
The ConfigPropertyService
will be specified as the
'source' attribute of any change events the listener receives.
listener
- the listener to be notified of property value changes.public abstract void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the listener to unregister.protected abstract TestPropertyValueProvider getTestProvider()
protected abstract void notifyValueChange(javax.faces.context.ExternalContext externalContext, String name, String oldValue)
name
- the name of the property who's value changed.oldValue
- the previous value of the property.newValue
- the new value of the property.Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.