Configuration Platform SDK 7.6 API Reference

com.genesyslab.platform.commons.connection.configuration
Class PropertyConfiguration

java.lang.Object
  extended bycom.genesyslab.platform.commons.connection.AbstractConnectionConfiguration
      extended bycom.genesyslab.platform.commons.connection.configuration.PropertyConfiguration
All Implemented Interfaces:
ConnectionConfiguration
Direct Known Subclasses:
FileConfiguration

public class PropertyConfiguration
extends AbstractConnectionConfiguration

The implementation of ConnectionConfiguration interface, which contains all values in java.util.Properties. It can be instantiated with any java.util.Properties instance.


Constructor Summary
PropertyConfiguration()
          Creates empty PropertyConfiguration object.
PropertyConfiguration(java.util.Properties props)
          Creates object and set all configuration using given Hashtable object.
 
Method Summary
 java.lang.String getOption(java.lang.String name, java.lang.String defaultValue)
          Get string parameter from the configuration.
 boolean isEmpty()
          Tests if this properties set does not contain specific values.
 void setOption(java.lang.String name, java.lang.String value)
          Set string parameter into config.
 
Methods inherited from class com.genesyslab.platform.commons.connection.AbstractConnectionConfiguration
getBoolean, getBoolean, getInteger, getInteger, getOption, setBoolean, setInteger
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyConfiguration

public PropertyConfiguration()
Creates empty PropertyConfiguration object.


PropertyConfiguration

public PropertyConfiguration(java.util.Properties props)
Creates object and set all configuration using given Hashtable object.

Parameters:
props - collection with configuration properties
Method Detail

setOption

public void setOption(java.lang.String name,
                      java.lang.String value)
Set string parameter into config.

Parameters:
name - name (key) of the parameter
value - string value to set

getOption

public java.lang.String getOption(java.lang.String name,
                                  java.lang.String defaultValue)
Get string parameter from the configuration.

Parameters:
name - name (key) of the parameter
defaultValue - value to return if parameter is not found
Returns:
value of the parameter

isEmpty

public boolean isEmpty()
Tests if this properties set does not contain specific values.

Returns:
true if this hashtable maps no keys to values; false otherwise.

Configuration Platform SDK 7.6 API Reference

Send comments on this topic.
Copyright © 2006–2008 Genesys Telecommunication Laboratories, Inc. All rights reserved.