|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.konakartadmin.bl.AdminBaseMgr
com.konakartadmin.bl.AdminConfigurationMgr
public class AdminConfigurationMgr
The AdminConfigurationMgr - for Managing Configurations for the Admin Application
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
AdminBaseMgr.StaticData |
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
the log |
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir |
Constructor Summary | |
---|---|
AdminConfigurationMgr(KKAdminIf eng)
Constructor |
Method Summary | |
---|---|
protected int |
findKeyInConfig(KKConfiguration[] configs,
java.lang.String key)
|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
Constructor Detail |
---|
public AdminConfigurationMgr(KKAdminIf eng) throws java.lang.Exception
eng
-
java.lang.Exception
Method Detail |
---|
public KKConfiguration[] getConfigurationsByGroup(int configGroup) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getConfigurationsByGroup
in interface AdminConfigurationMgrIf
configGroup
- the Configuration GroupId
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public KKConfiguration[] getAllConfigurations() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getAllConfigurations
in interface AdminConfigurationMgrIf
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public AdminConfigurationGroup[] getAllConfigurationGroups() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getAllConfigurationGroups
in interface AdminConfigurationMgrIf
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
public java.lang.String[] getConfigurationInfo(java.lang.String[] validationKeys) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getConfigurationInfo
in interface AdminConfigurationMgrIf
validationKeys
- an array of configuration keys
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public KKConfiguration getConfiguration(java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getConfiguration
in interface AdminConfigurationMgrIf
key
- thConfiguration Key
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public java.lang.String getConfigurationValue(java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getConfigurationValue
in interface AdminConfigurationMgrIf
key
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public int getConfigurationIntValue(java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getConfigurationIntValue
in interface AdminConfigurationMgrIf
key
- the configuration key
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public int getConfigurationIntValueOrDefault(java.lang.String key, int defaultVal) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getConfigurationIntValueOrDefault
in interface AdminConfigurationMgrIf
key
- the configuration keydefaultVal
- the default value to be returned if the key isn't found
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public boolean getConfigurationValueAsBool(java.lang.String key, boolean defaultVal) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
AdminConfigurationMgrIf
getConfigurationValueAsBool
in interface AdminConfigurationMgrIf
key
- the configuration keydefaultVal
- the default value to be returned if the key isn't found
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public boolean setConfigurationValue(java.lang.String key, java.lang.String value) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
setConfigurationValue
in interface AdminConfigurationMgrIf
key
- key whose value will be setvalue
- value to set
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public void saveConfigs(KKConfiguration[] configs, KKConfiguration[] origConfigs) throws java.lang.Exception
saveConfigs
in interface AdminConfigurationMgrIf
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
java.lang.Exception
protected int findKeyInConfig(KKConfiguration[] configs, java.lang.String key)
public void insertConfigs(KKConfiguration[] config) throws org.apache.torque.TorqueException
insertConfigs
in interface AdminConfigurationMgrIf
config
- an array of KKConfiguration objects to insert
org.apache.torque.TorqueException
public void removeConfigs(java.lang.String[] configKeys) throws org.apache.torque.TorqueException
removeConfigs
in interface AdminConfigurationMgrIf
configKeys
- an array of configuration key Strings to remove
org.apache.torque.TorqueException
public void removeConfigsByIds(int[] configIds) throws org.apache.torque.TorqueException
removeConfigsByIds
in interface AdminConfigurationMgrIf
configIds
- an array of configuration Id ints to remove
org.apache.torque.TorqueException
public void updateConfigCaches() throws java.lang.Exception
updateConfigCaches
in interface AdminConfigurationMgrIf
java.lang.Exception
public int insertConfigurationGroup(AdminConfigurationGroup configGroup) throws org.apache.torque.TorqueException, KKAdminException
insertConfigurationGroup
in interface AdminConfigurationMgrIf
configGroup
- an AdminConfigurationGroup object to insert
org.apache.torque.TorqueException
KKAdminException
public int insertConfiguration(KKConfiguration config) throws org.apache.torque.TorqueException, KKAdminException
insertConfiguration
in interface AdminConfigurationMgrIf
config
- a KKConfiguration object to insert
org.apache.torque.TorqueException
KKAdminException
public void updateConfiguration(KKConfiguration newConf) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
updateConfiguration
in interface AdminConfigurationMgrIf
newConf
- the KKConfiguration to update
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public void updateConfigurationGroup(AdminConfigurationGroup newConf) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
updateConfigurationGroup
in interface AdminConfigurationMgrIf
newConf
- the AdminConfigurationGroup to update
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public AdminConfigurationGroup[] getConfigurationGroupsByTitle(java.lang.String title) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getConfigurationGroupsByTitle
in interface AdminConfigurationMgrIf
title
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public AdminConfigData[] getConfigData(java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
AdminConfigurationMgrIf
getConfigData
in interface AdminConfigurationMgrIf
key
- Only return the AdminConfigData items with this key (if null all AdminConfigData
items are returned)
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |