com.konakart.blif
Interface ConfigurationMgrIf

All Known Implementing Classes:
ConfigurationMgr

public interface ConfigurationMgrIf

ConfigurationMgrIf Interface which an implementation of this manager must adhere to.


Method Summary
 void editConfiguration(java.lang.String key, java.lang.String value)
          Sets a Configuration Value for the specified key
 KKConfiguration getConfiguration(java.lang.String key)
          Returns a Configuration object referenced by the key passed in as a parameter
 KKConfiguration[] getConfigurations()
          Returns an array of Configuration objects containing all configurations that have been defined in the system.
 java.lang.String getConfigurationValue(java.lang.String key)
          Returns a Configuration Value for the key passed in as a parameter
 java.math.BigDecimal getConfigurationValueAsBigDecimal(java.lang.String key)
          Returns a Configuration Value as a BigDecimal for the key passed in as a parameter
 java.math.BigDecimal getConfigurationValueAsBigDecimal(java.lang.String key, java.math.BigDecimal def)
          Returns a Configuration Value as a BigDecimal for the key passed in as a parameter
 java.lang.Boolean getConfigurationValueAsBool(java.lang.String key, java.lang.Boolean def)
          Returns a Configuration Value as a Boolean for the key passed in as a parameter
 int getConfigurationValueAsInt(java.lang.String key)
          Returns a Configuration Value as an integer for the key passed in as a parameter
 int getConfigurationValueAsInt(java.lang.String key, int def)
          Returns a Configuration Value as an integer for the key passed in as a parameter
 

Method Detail

getConfigurations

KKConfiguration[] getConfigurations()
                                    throws org.apache.torque.TorqueException,
                                           com.workingdogs.village.DataSetException
Returns an array of Configuration objects containing all configurations that have been defined in the system.

Returns:
An array of Configuration objects.
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getConfiguration

KKConfiguration getConfiguration(java.lang.String key)
                                 throws org.apache.torque.TorqueException,
                                        com.workingdogs.village.DataSetException,
                                        KKException
Returns a Configuration object referenced by the key passed in as a parameter

Parameters:
key -
Returns:
A Configuration object
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException

getConfigurationValue

java.lang.String getConfigurationValue(java.lang.String key)
                                       throws KKException
Returns a Configuration Value for the key passed in as a parameter

Parameters:
key - the Configuration Key
Returns:
A Configuration Value as a String or null if the key isn't found
Throws:
KKException

getConfigurationValueAsInt

int getConfigurationValueAsInt(java.lang.String key)
                               throws KKException
Returns a Configuration Value as an integer for the key passed in as a parameter

Parameters:
key - the Configuration Key
Returns:
A Configuration Value as an integer or KKConstants.NOT_SET if the key isn't found.
Throws:
KKException - if there is a problem converting the configuration value into an integer.

getConfigurationValueAsInt

int getConfigurationValueAsInt(java.lang.String key,
                               int def)
                               throws KKException
Returns a Configuration Value as an integer for the key passed in as a parameter

Parameters:
key - the Configuration Key
def - default value to return if the key isn't found.
Returns:
A Configuration Value as an integer or the default value if the key isn't found.
Throws:
KKException - if there is a problem converting the configuration value into an integer.

getConfigurationValueAsBigDecimal

java.math.BigDecimal getConfigurationValueAsBigDecimal(java.lang.String key)
                                                       throws KKException
Returns a Configuration Value as a BigDecimal for the key passed in as a parameter

Parameters:
key - the Configuration Key
Returns:
A Configuration Value as a BigDecimal or null if the key isn't found.
Throws:
KKException - if there is a problem converting the configuration value into a BigDecimal.

getConfigurationValueAsBigDecimal

java.math.BigDecimal getConfigurationValueAsBigDecimal(java.lang.String key,
                                                       java.math.BigDecimal def)
                                                       throws KKException
Returns a Configuration Value as a BigDecimal for the key passed in as a parameter

Parameters:
key - the Configuration Key
def - default value to use if the key doesn't exist.
Returns:
A Configuration Value as a BigDecimal or the default value if the key isn't found.
Throws:
KKException - if there is a problem converting the configuration value into a BigDecimal.

getConfigurationValueAsBool

java.lang.Boolean getConfigurationValueAsBool(java.lang.String key,
                                              java.lang.Boolean def)
                                              throws KKException
Returns a Configuration Value as a Boolean for the key passed in as a parameter

Parameters:
key - the Configuration Key
def - the default value to be returned if there's a problem
Returns:
A Configuration Value as a Boolean or the default value if the key isn't found.
Throws:
KKException

editConfiguration

void editConfiguration(java.lang.String key,
                       java.lang.String value)
                       throws org.apache.torque.TorqueException,
                              com.workingdogs.village.DataSetException,
                              KKException
Sets a Configuration Value for the specified key

Parameters:
key - key whose value will be set
value - value to set
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException


Copyright © 2011 DS Data Systems UK Ltd.