|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1.9.1) E67677-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.adf.share.props.ConfigPropertyManager
public class ConfigPropertyManager
This class provides functionality related to ADF configuration properties framework. The configuration properites are used for enabling and disabling features in ADF framework. The default values of configuration properties are specified in adf-settings.xml files as follows: The property names and default values can be supplied under the <default-values>
element. <adf-settings xmlns="http://xmlns.oracle.com/adf/settings"> <adp:adf-properties-settings xmlns="http://xmlns.oracle.com/adf/properties/settings"> <value-provider> <class>oracle.adfinternal.share.props.TestPropertyProviderImpl</class> </value-provider> <properties> <property> <name>oracle.adfinternal.share.props.MyTestPropName1</name> <default-value>oracle.adfinternal.share.props.MyTestPropValue1</default-value> </property> <property> <name>oracle.adfinternal.share.props.MyTestPropName2</name> <default-value>oracle.adfinternal.share.props.MyTestPropValue2</default-value> </property> </properties> </adp:adf-properties-settings>
The <value-provider> <class>oracle.adfinternal.share.props.TestPropertyProviderImpl</class> </value-provider>
section is required only if new provider class must be supplied. Provider provides the value of a given property name and is used by this class during property look-up as described below. There can be only one property provider per ADFContext application scope which in turn maps to a J2EE .war. The value-provider class must inherit from oracle.adf.share.props.ConfigProvider. This class provides API's for returning property value for a given key. To use this class (adf-settings.xml contents as sepcified above Here is an example usage of ConfigPropertyManager: ConfigPropertyManager configMgr = ConfigPropertyManager.getConfigPropertyManager(); String propertyname="oracle_adf_share_props_MyTestPropName1"; String propertyValue = configMgr.getProperty(propertyName); // propertyValue = oracle.adfinternal.share.props.MyTestPropValue1 Here is how property value for a given key is obtained
Following are additional considertations:
Field Summary | |
---|---|
protected static java.lang.String |
DEF_CONF_PROP_MGR |
Constructor Summary | |
---|---|
ConfigPropertyManager() DO NOT call this constructor directly. |
Method Summary | |
---|---|
protected void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) Add a PropertyChangeListener to the listener list. |
static ConfigPropertyManager |
getConfigPropertyManager() |
protected DefaultConfigPropertyProviderImpl |
getDefaultConfigPropertyProviderImpl() |
java.lang.String |
getPropDump() |
java.lang.String |
getProperty(java.lang.String name) returns the property value for the specified key. |
protected java.lang.String |
getPropertyInternal(java.lang.String name) |
protected java.util.List<java.lang.String> |
getPropKeys() |
protected ConfigPropertyMetadata |
getPropMetadata(java.lang.String name) |
protected void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list. |
protected boolean |
setProperty(java.lang.String key, java.lang.Object value) sets the specified property value. |
protected boolean |
validateKey(java.lang.String name) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String DEF_CONF_PROP_MGR
Constructor Detail |
---|
public ConfigPropertyManager()
Method Detail |
---|
public java.lang.String getProperty(java.lang.String name)
ConfigPropertyManager
If the property name is not found, null value is returned. If the property name does not start with "oracle." or is greater than 76 characters, null value is returned.name
- the name of the propertypublic java.lang.String getPropDump()
protected java.util.List<java.lang.String> getPropKeys()
protected ConfigPropertyMetadata getPropMetadata(java.lang.String name)
public static ConfigPropertyManager getConfigPropertyManager()
protected DefaultConfigPropertyProviderImpl getDefaultConfigPropertyProviderImpl()
protected boolean validateKey(java.lang.String name)
protected java.lang.String getPropertyInternal(java.lang.String name)
protected void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
is null, no exception is thrown and no action is taken.listener
- The PropertyChangeListener to be addedprotected void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
was added more than once to the same event source, it will be notified one less time after being removed. If listener
is null, or was never added, no exception is thrown and no action is taken.listener
- The PropertyChangeListener to be removedprotected boolean setProperty(java.lang.String key, java.lang.Object value)
key
- the property keyvalue
- value of the property to be set.
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Share 11g Release 1 (11.1.1.9.1) E67677-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |