org.sape.carbon.core.config
Interface PropertyConfiguration

All Superinterfaces:
Configuration
All Known Implementing Classes:
JDOMPropertyConfiguration

public interface PropertyConfiguration
extends Configuration

This is the base interface for buisiness Configuration objects. This type of configuration should be used to define configurations that are not interfaced through a strongly-typed Java interface. This type of configuration is often used for generic data and information that is not connected to a specific business entity.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.7 $($Author: dvoet $ / $Date: 2003/05/05 21:21:16 $)
Author:
Greg Hinkle, January 2002

Method Summary
 boolean getBooleanProperty(String propertyName)
          Retrieves a configured boolean values
 boolean getBooleanProperty(String propertyName, boolean defaultValue)
          Retrieves a configured boolean values
 byte getByteProperty(String propertyName)
          Retrieves a configured byte property.
 byte getByteProperty(String propertyName, byte defaultValue)
          Retrieves a configured byte property.
 Class getClassProperty(String propertyName)
          Retrieves a configured class object
 Class getClassProperty(String propertyName, Class defaultValue)
          Retrieves a configured Class values
 String[] getCSVProperty(String propertyName)
          Retrieves an array of string values that are retrieved from the configuration document at the supplied key.
 Date getDateProperty(String propertyName)
          Retrieves a configured class object
 Date getDateProperty(String propertyName, Date defaultValue)
          Retrieves a configured Class values
 double getDoubleProperty(String propertyName)
          Retrieves a configured double value
 double getDoubleProperty(String propertyName, double defaultValue)
          Retrieves a configured double values
 float getFloatProperty(String propertyName)
          Retrieves a configured float value.
 float getFloatProperty(String propertyName, float defaultValue)
          Retrieves a configured float values
 int getIntProperty(String propertyName)
          Retrieves a configured int value
 int getIntProperty(String propertyName, int defaultValue)
          Retrieves a configured int values
 long getLongProperty(String propertyName)
          Retrieves a configured long property.
 long getLongProperty(String propertyName, long defaultValue)
          Retrieves a configured long values
 String getProperty(String propertyName)
          Retrieves a string property configuration
 String getProperty(String propertyName, String defaultValue)
          Retrieves a string property configuration or returns the supplied default if none is found.
 short getShortProperty(String propertyName)
          Retrieves a configured short value
 short getShortProperty(String propertyName, short defaultValue)
          Retrieves a configured short values
 String[] getWSVProperty(String propertyName)
          Retrieves an array of string values that are retrieved from the configuration document at the supplied key.
 void setBooleanProperty(String propertyName, boolean value)
          Sets the property named by propertyName to the value specified by value as a boolean
 void setByteProperty(String propertyName, byte value)
          Sets the property named by propertyName to the value specified by value as a byte
 void setClassProperty(String propertyName, Class value)
          Sets the property named by propertyName to the value specified by value as a Class
 void setCSVProperty(String propertyName, String[] values)
          Sets the property named by propertyName to the value specified by value as a comma separated list of strings
 void setDateProperty(String propertyName, Date value)
          Sets the property named by propertyName to the value specified by value as a Class
 void setDoubleProperty(String propertyName, double value)
          Sets the property named by propertyName to the value specified by value as a double
 void setFloatProperty(String propertyName, float value)
          Sets the property named by propertyName to the value specified by value as a float
 void setIntProperty(String propertyName, int value)
          Sets the property named by propertyName to the value specified by value as a int
 void setLongProperty(String propertyName, long value)
          Sets the property named by propertyName to the value specified by value as a long
 void setProperty(String propertyName, String value)
          Sets the property named by propertyName to the value specified by value as a String
 void setShortProperty(String propertyName, short value)
          Sets the property named by propertyName to the value specified by value as a short
 void setWSVProperty(String propertyName, String[] values)
          Sets the property named by propertyName to the value specified by value as a white-space separated list of strings
 
Methods inherited from interface org.sape.carbon.core.config.Configuration
clone, getConfigurationInterface, getConfigurationName, getDataStructure, getRootElement, isConfigurationWritable, setConfigurationName, setConfigurationReadOnly
 

Method Detail

getProperty

public String getProperty(String propertyName)
Retrieves a string property configuration

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the string value of the configuration

getProperty

public String getProperty(String propertyName,
                          String defaultValue)
Retrieves a string property configuration or returns the supplied default if none is found.

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
defaultValue - the value to be returned if not configured
Returns:
the requested configuration value or the default

setProperty

public void setProperty(String propertyName,
                        String value)
Sets the property named by propertyName to the value specified by value as a String

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value

getCSVProperty

public String[] getCSVProperty(String propertyName)
Retrieves an array of string values that are retrieved from the configuration document at the supplied key. These values should be seperated by commas (','). If no values are in the configuration, a 0 length array is returned.

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the array of values

setCSVProperty

public void setCSVProperty(String propertyName,
                           String[] values)
Sets the property named by propertyName to the value specified by value as a comma separated list of strings

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
values - array of the new values that will be serialized, separated by commas

getWSVProperty

public String[] getWSVProperty(String propertyName)
Retrieves an array of string values that are retrieved from the configuration document at the supplied key. These values should be seperated by white-space of any kind including spaces tabs or newlines. If no values are in the configuration, a 0 length array is returned.

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the array of values

setWSVProperty

public void setWSVProperty(String propertyName,
                           String[] values)
Sets the property named by propertyName to the value specified by value as a white-space separated list of strings

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
values - array of the new values that will be serialized, separated by spaces.

getByteProperty

public byte getByteProperty(String propertyName)
Retrieves a configured byte property.

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the configured byte

getByteProperty

public byte getByteProperty(String propertyName,
                            byte defaultValue)
Retrieves a configured byte property.

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
defaultValue - the byte to be returned if none is configured
Returns:
the configured byte

setByteProperty

public void setByteProperty(String propertyName,
                            byte value)
Sets the property named by propertyName to the value specified by value as a byte

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value

getBooleanProperty

public boolean getBooleanProperty(String propertyName)
Retrieves a configured boolean values

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves a configured boolean

getBooleanProperty

public boolean getBooleanProperty(String propertyName,
                                  boolean defaultValue)
Retrieves a configured boolean values

Parameters:
defaultValue - the default boolean to be returned if none is configured
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves a configured boolean

setBooleanProperty

public void setBooleanProperty(String propertyName,
                               boolean value)
Sets the property named by propertyName to the value specified by value as a boolean

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value

getShortProperty

public short getShortProperty(String propertyName)
Retrieves a configured short value

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the configured short value

getShortProperty

public short getShortProperty(String propertyName,
                              short defaultValue)
Retrieves a configured short values

Parameters:
defaultValue - the default short to be returned if none is configured
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the configured short

setShortProperty

public void setShortProperty(String propertyName,
                             short value)
Sets the property named by propertyName to the value specified by value as a short

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value

getIntProperty

public int getIntProperty(String propertyName)
Retrieves a configured int value

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the configured int property

getIntProperty

public int getIntProperty(String propertyName,
                          int defaultValue)
Retrieves a configured int values

Parameters:
defaultValue - the default int to be returned if none is configured
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves a configured int

setIntProperty

public void setIntProperty(String propertyName,
                           int value)
Sets the property named by propertyName to the value specified by value as a int

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value

getLongProperty

public long getLongProperty(String propertyName)
Retrieves a configured long property.

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the configured long property

getLongProperty

public long getLongProperty(String propertyName,
                            long defaultValue)
Retrieves a configured long values

Parameters:
defaultValue - the default long to be returned if none is configured
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves a configured long

setLongProperty

public void setLongProperty(String propertyName,
                            long value)
Sets the property named by propertyName to the value specified by value as a long

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value

getFloatProperty

public float getFloatProperty(String propertyName)
Retrieves a configured float value.

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the configured float value.

getFloatProperty

public float getFloatProperty(String propertyName,
                              float defaultValue)
Retrieves a configured float values

Parameters:
defaultValue - the default float to be returned if none is configured
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves a configured float

setFloatProperty

public void setFloatProperty(String propertyName,
                             float value)
Sets the property named by propertyName to the value specified by value as a float

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value

getDoubleProperty

public double getDoubleProperty(String propertyName)
Retrieves a configured double value

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
the configured double value

getDoubleProperty

public double getDoubleProperty(String propertyName,
                                double defaultValue)
Retrieves a configured double values

Parameters:
defaultValue - the default double to be returned if none is configured
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves a configured double

setDoubleProperty

public void setDoubleProperty(String propertyName,
                              double value)
Sets the property named by propertyName to the value specified by value as a double

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value

getClassProperty

public Class getClassProperty(String propertyName)
Retrieves a configured class object

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves the configured class object

getClassProperty

public Class getClassProperty(String propertyName,
                              Class defaultValue)
Retrieves a configured Class values

Parameters:
defaultValue - a fully qualified class name to be returned if none is configured
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves a configured class object

setClassProperty

public void setClassProperty(String propertyName,
                             Class value)
Sets the property named by propertyName to the value specified by value as a Class

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value

getDateProperty

public Date getDateProperty(String propertyName)
Retrieves a configured class object

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves the configured class object

getDateProperty

public Date getDateProperty(String propertyName,
                            Date defaultValue)
Retrieves a configured Class values

Parameters:
defaultValue - a fully qualified class name to be returned if none is configured
propertyName - a dot ('.') delimeted path/key to the requested configuration value
Returns:
retrieves a configured class object

setDateProperty

public void setDateProperty(String propertyName,
                            Date value)
Sets the property named by propertyName to the value specified by value as a Class

Parameters:
propertyName - a dot ('.') delimeted path/key to the requested configuration value
value - the new value


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.