com.konakartadmin.blif
Interface AdminConfigurationMgrIf

All Known Implementing Classes:
AdminConfigurationMgr

public interface AdminConfigurationMgrIf

AdminConfigurationMgrIf


Method Summary
 AdminConfigurationGroup[] getAllConfigurationGroups()
          Returns an array of all the Configuration Group objects
 KKConfiguration[] getAllConfigurations()
          Returns an array of all the Configuration objects
 AdminConfigData[] getConfigData(java.lang.String key)
          Returns the AdminConfigData items with the specified key or all AdminConfigData items if the key is null.
 KKConfiguration getConfiguration(java.lang.String key)
          Returns a Configuration object referenced by the specified key
 AdminConfigurationGroup[] getConfigurationGroupsByTitle(java.lang.String title)
          Returns an array of AdminConfigurationGroup objects with the specified title
 java.lang.String[] getConfigurationInfo(java.lang.String[] validationKeys)
          Get the configuration values for the given keys
 int getConfigurationIntValue(java.lang.String key)
          Returns a Configuration Value for the specified key as an integer
 int getConfigurationIntValueOrDefault(java.lang.String key, int defaultVal)
          Returns a Configuration Value for the specified key as an integer - or a default value
 KKConfiguration[] getConfigurationsByGroup(int configGroup)
          Returns an array of Configuration objects for the specified configuration group id
 java.lang.String getConfigurationValue(java.lang.String key)
          Returns a Configuration Value for the specified key
 boolean getConfigurationValueAsBool(java.lang.String key, boolean defaultVal)
          Returns a Configuration Value for the specified key as a boolean - or the specified default value
 void insertConfigs(KKConfiguration[] config)
          Insert one or more new configuration parameters
 int insertConfiguration(KKConfiguration config)
          Insert a configuration object
 int insertConfigurationGroup(AdminConfigurationGroup configGroup)
          Insert a configuration group
 void removeConfigs(java.lang.String[] configKeys)
          Remove one or more configuration parameters
 void removeConfigsByIds(int[] configIds)
          Remove one or more configuration parameters
 void saveConfigs(KKConfiguration[] configs, KKConfiguration[] origConfigs)
          Saves an array of KKConfiguration objects to the database.
 boolean setConfigurationValue(java.lang.String key, java.lang.String value)
          Sets a Configuration Value for the specified key
 void updateConfigCaches()
          Updates any caches we have made of the configuration variables
 void updateConfiguration(KKConfiguration newConf)
          Updates a KKConfiguration object
 void updateConfigurationGroup(AdminConfigurationGroup newConf)
          Updates an AdminConfigurationGroup object
 

Method Detail

getConfigurationsByGroup

KKConfiguration[] getConfigurationsByGroup(int configGroup)
                                           throws org.apache.torque.TorqueException,
                                                  com.workingdogs.village.DataSetException
Returns an array of Configuration objects for the specified configuration group id

Parameters:
configGroup - the Configuration GroupId
Returns:
An array of Configuration objects in the specified Config Group
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException

getAllConfigurations

KKConfiguration[] getAllConfigurations()
                                       throws org.apache.torque.TorqueException,
                                              com.workingdogs.village.DataSetException
Returns an array of all the Configuration objects

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

getAllConfigurationGroups

AdminConfigurationGroup[] getAllConfigurationGroups()
                                                    throws org.apache.torque.TorqueException,
                                                           com.workingdogs.village.DataSetException
Returns an array of all the Configuration Group objects

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

getConfigurationInfo

java.lang.String[] getConfigurationInfo(java.lang.String[] validationKeys)
                                        throws org.apache.torque.TorqueException,
                                               com.workingdogs.village.DataSetException,
                                               KKAdminException
Get the configuration values for the given keys

Parameters:
validationKeys - an arrray of configuration keys
Returns:
Returns an array of Configuration key values - typically used for validation on the UI
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getConfiguration

KKConfiguration getConfiguration(java.lang.String key)
                                 throws org.apache.torque.TorqueException,
                                        com.workingdogs.village.DataSetException,
                                        KKAdminException
Returns a Configuration object referenced by the specified key

Parameters:
key -
Returns:
The KKConfiguration object if the key is found, otherwise it returns null
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getConfigurationValue

java.lang.String getConfigurationValue(java.lang.String key)
                                       throws org.apache.torque.TorqueException,
                                              com.workingdogs.village.DataSetException,
                                              KKAdminException
Returns a Configuration Value for the specified key

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

getConfigurationIntValue

int getConfigurationIntValue(java.lang.String key)
                             throws org.apache.torque.TorqueException,
                                    com.workingdogs.village.DataSetException,
                                    KKAdminException
Returns a Configuration Value for the specified key as an integer

Parameters:
key - the configuration key
Returns:
the value of the key as an integer - or KonakartAdminConstants.NOT_SET if the key isn't found
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getConfigurationIntValueOrDefault

int getConfigurationIntValueOrDefault(java.lang.String key,
                                      int defaultVal)
                                      throws org.apache.torque.TorqueException,
                                             com.workingdogs.village.DataSetException,
                                             KKAdminException
Returns a Configuration Value for the specified key as an integer - or a default value

Parameters:
key - the configuration key
defaultVal - the default value to be returned if the key isn't found
Returns:
the value of the key as an integer - or the specified default if the key isn't found
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getConfigurationValueAsBool

boolean getConfigurationValueAsBool(java.lang.String key,
                                    boolean defaultVal)
                                    throws org.apache.torque.TorqueException,
                                           com.workingdogs.village.DataSetException,
                                           KKAdminException
Returns a Configuration Value for the specified key as a boolean - or the specified default value

Parameters:
key - the configuration key
defaultVal - the default value to be returned if the key isn't found
Returns:
the value of the key as a boolean - or the specified default if the key isn't found
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

setConfigurationValue

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

Parameters:
key - key whose value will be set
value - value to set
Returns:
returns true if the value is set correctly, false if the key wasn't found
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

saveConfigs

void saveConfigs(KKConfiguration[] configs,
                 KKConfiguration[] origConfigs)
                 throws java.lang.Exception
Saves an array of KKConfiguration objects to the database.

Parameters:
configs - Configuration array to save. For optimum performance, any records to insert should be placed at the end of the array and marked with the status KonakartAdminConstants.STATUS_INSERTED. Any records to be deleted should be marked with the KonakartAdminConstants.STATUS_DELETED status.
origConfigs - Original Configuration array to compare against
Throws:
java.lang.Exception

insertConfigs

void insertConfigs(KKConfiguration[] config)
                   throws org.apache.torque.TorqueException
Insert one or more new configuration parameters

Parameters:
config - an array of KKConfiguration objects to insert
Throws:
org.apache.torque.TorqueException

removeConfigs

void removeConfigs(java.lang.String[] configKeys)
                   throws org.apache.torque.TorqueException
Remove one or more configuration parameters

Parameters:
configKeys - an array of configuration key Strings to remove
Throws:
org.apache.torque.TorqueException

removeConfigsByIds

void removeConfigsByIds(int[] configIds)
                        throws org.apache.torque.TorqueException
Remove one or more configuration parameters

Parameters:
configIds - an array of configuration Id ints to remove
Throws:
org.apache.torque.TorqueException

updateConfigCaches

void updateConfigCaches()
                        throws java.lang.Exception
Updates any caches we have made of the configuration variables

Throws:
java.lang.Exception

insertConfigurationGroup

int insertConfigurationGroup(AdminConfigurationGroup configGroup)
                             throws org.apache.torque.TorqueException,
                                    KKAdminException
Insert a configuration group

Parameters:
configGroup - an AdminConfigurationGroup object to insert
Returns:
Returns the primary key of the configuration group that was inserted
Throws:
org.apache.torque.TorqueException
KKAdminException

insertConfiguration

int insertConfiguration(KKConfiguration config)
                        throws org.apache.torque.TorqueException,
                               KKAdminException
Insert a configuration object

Parameters:
config - a KKConfiguration object to insert
Returns:
Returns the primary key of the configuration object that was inserted
Throws:
org.apache.torque.TorqueException
KKAdminException

updateConfiguration

void updateConfiguration(KKConfiguration newConf)
                         throws org.apache.torque.TorqueException,
                                com.workingdogs.village.DataSetException,
                                KKAdminException
Updates a KKConfiguration object

Parameters:
newConf - the KKConfiguration to update
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

updateConfigurationGroup

void updateConfigurationGroup(AdminConfigurationGroup newConf)
                              throws org.apache.torque.TorqueException,
                                     com.workingdogs.village.DataSetException,
                                     KKAdminException
Updates an AdminConfigurationGroup object

Parameters:
newConf - the AdminConfigurationGroup to update
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getConfigurationGroupsByTitle

AdminConfigurationGroup[] getConfigurationGroupsByTitle(java.lang.String title)
                                                        throws org.apache.torque.TorqueException,
                                                               com.workingdogs.village.DataSetException,
                                                               KKAdminException
Returns an array of AdminConfigurationGroup objects with the specified title

Parameters:
title -
Returns:
An array of AdminConfigurationGroup objects
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getConfigData

AdminConfigData[] getConfigData(java.lang.String key)
                                throws org.apache.torque.TorqueException,
                                       com.workingdogs.village.DataSetException,
                                       KKAdminException
Returns the AdminConfigData items with the specified key or all AdminConfigData items if the key is null.

Parameters:
key - Only return the AdminConfigData items with this key (if null all AdminConfigData items are returned)
Returns:
Returns an array of AdminConfigData items with the specified key or all AdminConfigData items if the key is null ordered by date added
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException


Copyright © 2011 DS Data Systems UK Ltd.