Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.9.0)

E52934-01


oracle.adfinternal.share.props
Class ConfigPropertyManagerTester

java.lang.Object
  extended by oracle.adfinternal.share.props.ConfigPropertyManagerTester


public class ConfigPropertyManagerTester
extends java.lang.Object

This class provides functionality for writing SRG tests for the ADF configuration properties feature. Specifically it provides the setDefaultProperty API that allows setting of properties during runtime. For writing SRG tests use: CacheConfigPropertyManagerTester configPropTester = CacheConfigPropertyManagerTester.getCacheConfigPropertyManagerTester(); configPropTester.setTestMode(true); configPropTester.getProperty("oracle.adf.share.SomeProp"); configPropTester.setDefaultProperty("oracle.adf.share.SomeProp","newValue");

See Also:
oracle.adf.share.props.CacheConfigPropertyManager

Constructor Summary
protected ConfigPropertyManagerTester()
           

 

Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 java.lang.Boolean getBooleanProperty(java.lang.String key)
          returns the property value for the specified key.
static ConfigPropertyManagerTester getConfigPropertyManagerTester()
          Returns the instance of this class with test mode 'false'
 java.lang.Integer getIntegerProperty(java.lang.String key)
          returns the property value for the specified key.
 java.lang.String getPropDump()
           
 java.lang.String getProperty(java.lang.String name)
          returns the property value for the specified key.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 void setProperty(java.lang.String key, java.lang.Object value)
          sets the specified property value.
 void setProperty(java.lang.String name, java.lang.String value)
          sets the property value.
 void setTestMode(boolean mode)
          sets the test Mode.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ConfigPropertyManagerTester

protected ConfigPropertyManagerTester()

Method Detail

getConfigPropertyManagerTester

public static ConfigPropertyManagerTester getConfigPropertyManagerTester()
Returns the instance of this class with test mode 'false'
Returns:
instance of CacheConfigPropertyManagerTester

setTestMode

public void setTestMode(boolean mode)
sets the test Mode. The setProperty API is a no-op if the test mode is not true
Parameters:
mode - the test mode to set to

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
sets the property value. This method will be a no-op if test mode is false. oracle.adf.share.props.CacheConfigPropertyManagerTester#setTestMode
Parameters:
name - name of the property
value - value of the property

getProperty

public java.lang.String getProperty(java.lang.String name)
returns the property value for the specified key. For value look-up details, please see 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.
Parameters:
name - the name of the property
Returns:
string value of the property

getPropDump

public java.lang.String getPropDump()
Returns:
the String representation of properties dump. This includes property name, value, type, source of the property and location of adf-settings.xml file from where the default value is read

getBooleanProperty

public java.lang.Boolean getBooleanProperty(java.lang.String key)
returns the property value for the specified key. For value look-up details, please see oracle.adf.share.props.CacheConfigPropertyManager the string value of the property is converted to Boolean. For conversion Boolean.valueOf(boolean) operation is used. The converted value is cached so only the first call to this API takes the type conversion hit An ADFShareException is thrown if the conversion fails.
Parameters:
name - the name of the property
Returns:
Boolean value of the property

getIntegerProperty

public java.lang.Integer getIntegerProperty(java.lang.String key)
returns the property value for the specified key. For value look-up details, please see oracle.adf.share.props.CacheConfigPropertyManager the string value of the property is converted to Integer. For conversion Integer.valueOf(java.lang.String, int) operation is used. The converted value is cached so only the first call to this API takes the type conversion hit An ADFShareException is thrown if the conversion fails.
Parameters:
name - the name of the property
Returns:
Integer value of the property

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. If listener is null, no exception is thrown and no action is taken.
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If 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.
Parameters:
listener - The PropertyChangeListener to be removed

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
sets the specified property value. This API will delegate to the registered provider
Parameters:
key - the property key
value - value of the property to be set.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.9.0)

E52934-01


Copyright © 1997, 2015, Oracle. All rights reserved.