public class AdminConfigurationMgr extends AdminBaseMgr implements AdminConfigurationMgrIf
| Modifier and Type | Class and Description |
|---|---|
protected class |
AdminConfigurationMgr.StaticData
Static Data Object
|
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
mutex
Mutex for this manager
|
private long |
refreshCacheRequest
Timestamp of the last refresh Cache Request.
|
protected static java.util.Map<java.lang.String,AdminConfigurationMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir| Constructor and Description |
|---|
AdminConfigurationMgr(KKAdminIf eng)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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
|
KKConfiguration |
getConfigurationFromDb(java.lang.String key)
Returns a Configuration object from the database 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
|
java.lang.String |
getConfigurationValue(java.lang.String key,
java.lang.String def)
Returns a Configuration Value for the specified key or the default if the configuration key
can't be found
|
boolean |
getConfigurationValueAsBool(java.lang.String key,
boolean defaultVal)
Returns a Configuration Value for the specified key as a boolean - or the specified default
value
|
java.lang.String |
getPropertyValue(java.lang.String propKey) |
java.lang.String |
getPropertyValue(java.lang.String propKey,
java.lang.String def)
Get the property value as a String if found, otherwise return the default
|
boolean |
getPropertyValueAsBool(java.lang.String propKey,
boolean def)
Get the property value as a boolean if found, otherwise return the default
|
int |
getPropertyValueAsInt(java.lang.String propKey,
int def)
Get the property value as an int if found, otherwise return the default
|
long |
getPropertyValueAsLong(java.lang.String propKey,
long def)
Get the property value as a long if found, otherwise return the default
|
long |
getRefreshCacheRequest() |
protected int |
insertConfigData(AdminConfigData config)
Insert the AdminConfigData item.
|
int[] |
insertConfigData(AdminConfigData[] configs)
Insert the AdminConfigData item.
|
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 |
refreshConfigs()
Clear the configuration cache
|
void |
removeConfigData(int id)
Remove the AdminConfigData item from the Database.
|
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 |
setRefreshCacheRequest(long refreshCacheRequest) |
void |
updateConfigCaches()
Updates any caches we have made of the configuration variables
|
protected void |
updateConfigData(AdminConfigData config)
Update the AdminConfigData item.
|
void |
updateConfigData(AdminConfigData[] configs)
Update the AdminConfigData items.
|
void |
updateConfiguration(KKConfiguration newConf)
Updates a KKConfiguration object
|
void |
updateConfigurationGroup(AdminConfigurationGroup newConf)
Updates an AdminConfigurationGroup object
|
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNowprotected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,AdminConfigurationMgr.StaticData> staticDataHM
private long refreshCacheRequest
public AdminConfigurationMgr(KKAdminIf eng) throws java.lang.Exception
eng - the engjava.lang.Exception - an unexpected exceptionpublic KKConfiguration[] getConfigurationsByGroup(int configGroup) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getConfigurationsByGroup in interface AdminConfigurationMgrIfconfigGroup - the Configuration GroupIdorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public KKConfiguration[] getAllConfigurations() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getAllConfigurations in interface AdminConfigurationMgrIforg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public AdminConfigurationGroup[] getAllConfigurationGroups() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getAllConfigurationGroups in interface AdminConfigurationMgrIforg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)public java.lang.String[] getConfigurationInfo(java.lang.String[] validationKeys)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
getConfigurationInfo in interface AdminConfigurationMgrIfvalidationKeys - an array of configuration keysorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic KKConfiguration getConfiguration(java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getConfiguration in interface AdminConfigurationMgrIfkey - thConfiguration Keyorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic KKConfiguration getConfigurationFromDb(java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getConfigurationFromDb in interface AdminConfigurationMgrIfkey - thConfiguration Keyorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic java.lang.String getConfigurationValue(java.lang.String key)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
getConfigurationValue in interface AdminConfigurationMgrIfkey - the Configuration keyorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic java.lang.String getConfigurationValue(java.lang.String key,
java.lang.String def)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
getConfigurationValue in interface AdminConfigurationMgrIfkey - the Configuration keydef - the default to use if the configuration key can't be foundorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic int getConfigurationIntValue(java.lang.String key)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
getConfigurationIntValue in interface AdminConfigurationMgrIfkey - the configuration keyorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic int getConfigurationIntValueOrDefault(java.lang.String key,
int defaultVal)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
getConfigurationIntValueOrDefault in interface AdminConfigurationMgrIfkey - the configuration keydefaultVal - the default value to be returned if the key isn't foundorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic boolean getConfigurationValueAsBool(java.lang.String key,
boolean defaultVal)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
AdminConfigurationMgrIfgetConfigurationValueAsBool in interface AdminConfigurationMgrIfkey - the configuration keydefaultVal - the default value to be returned if the key isn't foundorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic boolean setConfigurationValue(java.lang.String key,
java.lang.String value)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKAdminException
setConfigurationValue in interface AdminConfigurationMgrIfkey - key whose value will be setvalue - value to setorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic void saveConfigs(KKConfiguration[] configs, KKConfiguration[] origConfigs) throws java.lang.Exception
saveConfigs in interface AdminConfigurationMgrIfconfigs - 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 againstjava.lang.Exception - an unexpected exceptionprotected int findKeyInConfig(KKConfiguration[] configs, java.lang.String key)
public void insertConfigs(KKConfiguration[] config) throws org.apache.torque.TorqueException
insertConfigs in interface AdminConfigurationMgrIfconfig - an array of KKConfiguration objects to insertorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)public void removeConfigs(java.lang.String[] configKeys)
throws org.apache.torque.TorqueException,
java.lang.Exception
removeConfigs in interface AdminConfigurationMgrIfconfigKeys - an array of configuration key Strings to removeorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)java.lang.Exception - an unexpected exceptionpublic void removeConfigsByIds(int[] configIds)
throws org.apache.torque.TorqueException,
java.lang.Exception
removeConfigsByIds in interface AdminConfigurationMgrIfconfigIds - an array of configuration Id ints to removejava.lang.Exception - an unexpected exceptionorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)public void updateConfigCaches()
throws java.lang.Exception
updateConfigCaches in interface AdminConfigurationMgrIfjava.lang.Exception - an unexpected exceptionpublic int insertConfigurationGroup(AdminConfigurationGroup configGroup) throws org.apache.torque.TorqueException, KKAdminException
insertConfigurationGroup in interface AdminConfigurationMgrIfconfigGroup - an AdminConfigurationGroup object to insertorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic int insertConfiguration(KKConfiguration config) throws org.apache.torque.TorqueException, KKAdminException
insertConfiguration in interface AdminConfigurationMgrIfconfig - a KKConfiguration object to insertorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic void updateConfiguration(KKConfiguration newConf) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
updateConfiguration in interface AdminConfigurationMgrIfnewConf - the KKConfiguration to updateorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic void updateConfigurationGroup(AdminConfigurationGroup newConf) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
updateConfigurationGroup in interface AdminConfigurationMgrIfnewConf - the AdminConfigurationGroup to updateorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic AdminConfigurationGroup[] getConfigurationGroupsByTitle(java.lang.String title) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getConfigurationGroupsByTitle in interface AdminConfigurationMgrIftitle - the titleorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic AdminConfigData[] getConfigData(java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
AdminConfigurationMgrIfgetConfigData in interface AdminConfigurationMgrIfkey - Only return the AdminConfigData items with this key (if null all AdminConfigData
items are returned)org.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)KKAdminException - an unexpected exception in the KonaKart Admin enginepublic void updateConfigData(AdminConfigData[] configs) throws KKAdminException, org.apache.torque.TorqueException
updateConfigData in interface AdminConfigurationMgrIfconfigs - The AdminConfigData items to updateKKAdminException - an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)protected void updateConfigData(AdminConfigData config) throws KKAdminException, org.apache.torque.TorqueException
config - The AdminConfigData item to updateKKAdminException - an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)public int[] insertConfigData(AdminConfigData[] configs) throws KKAdminException, org.apache.torque.TorqueException
insertConfigData in interface AdminConfigurationMgrIfconfigs - The AdminConfigData items to insertKKAdminException - an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)protected int insertConfigData(AdminConfigData config) throws KKAdminException, org.apache.torque.TorqueException
config - The AdminConfigData item to insertKKAdminException - an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)public void removeConfigData(int id)
throws KKAdminException,
org.apache.torque.TorqueException
removeConfigData in interface AdminConfigurationMgrIfid - The id of the AdminConfigData items to removeKKAdminException - an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)public java.lang.String getPropertyValue(java.lang.String propKey)
throws KKAdminException
getPropertyValue in interface AdminConfigurationMgrIfgetPropertyValue in class AdminBaseMgrpropKey - the propKeyKKAdminException - an unexpected exception in the KonaKart Admin enginepublic java.lang.String getPropertyValue(java.lang.String propKey,
java.lang.String def)
throws KKAdminException
getPropertyValue in interface AdminConfigurationMgrIfgetPropertyValue in class AdminBaseMgrpropKey - the property keydef - the default to use if the key isn't foundKKAdminException - an unexpected exception in the KonaKart Admin enginepublic int getPropertyValueAsInt(java.lang.String propKey,
int def)
throws KKAdminException
getPropertyValueAsInt in interface AdminConfigurationMgrIfgetPropertyValueAsInt in class AdminBaseMgrpropKey - the property keydef - the default to use if the key isn't foundKKAdminException - an unexpected exception in the KonaKart Admin enginepublic long getPropertyValueAsLong(java.lang.String propKey,
long def)
throws KKAdminException
getPropertyValueAsLong in interface AdminConfigurationMgrIfgetPropertyValueAsLong in class AdminBaseMgrpropKey - the property keydef - the default to use if the key isn't foundKKAdminException - an unexpected exception in the KonaKart Admin enginepublic boolean getPropertyValueAsBool(java.lang.String propKey,
boolean def)
throws KKAdminException
getPropertyValueAsBool in interface AdminConfigurationMgrIfgetPropertyValueAsBool in class AdminBaseMgrpropKey - the property keydef - the default to use if the key isn't foundKKAdminException - an unexpected exception in the KonaKart Admin enginepublic long getRefreshCacheRequest()
getRefreshCacheRequest in interface AdminConfigurationMgrIfpublic void setRefreshCacheRequest(long refreshCacheRequest)
setRefreshCacheRequest in interface AdminConfigurationMgrIfrefreshCacheRequest - the refreshCacheRequest to setpublic void refreshConfigs()
throws KKAdminException
refreshConfigs in interface AdminConfigurationMgrIfrefreshConfigs in class AdminBaseMgrKKAdminException - an unexpected exception in the KonaKart Admin engineCopyright © 2018 DS Data Systems UK Ltd.