public class ConfigurationMgr extends BaseMgr implements ConfigurationMgrIf
| Modifier and Type | Class and Description |
|---|---|
protected class |
ConfigurationMgr.StaticData
Used to store the static data of this manager
|
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
configMgrMutex
Mutex for the configuration manager
|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.util.Map<java.lang.String,ConfigurationMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
templateBaseDir| Constructor and Description |
|---|
ConfigurationMgr(KKEngIf eng)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkIfReturnable(java.lang.String key)
Check to see if we can return this configuration parameter.
|
void |
editConfiguration(java.lang.String key,
java.lang.String value)
Deprecated.
From version 6.3.0.0 you should use the Administration APIs (KKAdminIf) instead.
|
ConfigDataIf[] |
getConfigData(java.lang.String key)
Returns the ConfigData items with the specified key or all ConfigData items if the key is
null.
|
ConfigDataIf[] |
getConfigData(java.lang.String sessionId,
java.lang.String key)
Returns the ConfigData items with the specified key or all ConfigData items if the key is
null.
|
KKConfiguration |
getConfiguration(boolean checkReturnByApi,
java.lang.String key)
Returns a Configuration object referenced by the key passed in as a parameter.
|
KKConfiguration |
getConfiguration(boolean checkReturnByApi,
java.lang.String key,
boolean noCache)
Returns a Configuration object referenced by the key passed in as a parameter.
|
KKConfiguration |
getConfiguration(java.lang.String key)
Returns a Configuration object referenced by the key passed in as a parameter.
|
KKConfiguration |
getConfigurationNoCache(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 and that have been defined to be returned via the API.
|
KKConfiguration[] |
getConfigurations(boolean checkReturnByApi)
Returns an array of Configuration objects containing all configurations that have been
defined in the system.
|
java.lang.String |
getConfigurationValue(boolean checkReturnByApi,
java.lang.String key)
Returns a Configuration Value for the key passed in as a parameter.
|
java.lang.String |
getConfigurationValue(boolean checkReturnByApi,
java.lang.String key,
boolean logIfNotFound)
Returns a Configuration Value for the key passed in as a parameter.
|
java.lang.String |
getConfigurationValue(java.lang.String key)
Returns a Configuration Value for the key passed in as a parameter.
|
java.math.BigDecimal |
getConfigurationValueAsBigDecimal(boolean checkReturnByApi,
java.lang.String key)
Returns a Configuration Value as a BigDecimal for the key passed in as a parameter.
|
java.math.BigDecimal |
getConfigurationValueAsBigDecimal(boolean checkReturnByApi,
java.lang.String key,
java.math.BigDecimal def)
Returns a Configuration Value as a BigDecimal 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(boolean checkReturnByApi,
java.lang.String key,
java.lang.Boolean def)
Returns a Configuration Value as a Boolean 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(boolean checkReturnByApi,
java.lang.String key)
Returns a Configuration Value as an integer for the key passed in as a parameter.
|
int |
getConfigurationValueAsInt(boolean checkReturnByApi,
java.lang.String key,
int def)
Returns a Configuration Value as an integer 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.
|
java.lang.Long |
getConfigurationValueAsLong(boolean checkReturnByApi,
java.lang.String key)
Returns a Configuration Value as a Long for the key passed in as a parameter
|
java.lang.Long |
getConfigurationValueAsLong(boolean checkReturnByApi,
java.lang.String key,
java.lang.Long def)
Returns a Configuration Value as a Long for the key passed in as a parameter
|
java.lang.Long |
getConfigurationValueAsLong(java.lang.String key)
Returns a Configuration Value as a Long for the key passed in as a parameter.
|
java.lang.Long |
getConfigurationValueAsLong(java.lang.String key,
java.lang.Long def)
Returns a Configuration Value as a Long for the key passed in as a parameter.
|
void |
refreshConfigs()
Refresh the configuration of the Configuration manager
|
protected void |
setCriteriaWithStandardAttributes(KKCriteria c)
Initializes the criteria with the standard attributes
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNowprotected static org.apache.commons.logging.Log log
protected static java.util.Map<java.lang.String,ConfigurationMgr.StaticData> staticDataHM
protected static java.lang.String configMgrMutex
public ConfigurationMgr(KKEngIf eng) throws java.lang.Exception
eng - the engjava.lang.Exception - an unexpected exceptionpublic KKConfiguration[] getConfigurations() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
ConfigurationMgrIfgetConfigurations in interface ConfigurationMgrIforg.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)com.konakart.app.KKException - an unexpected KKException exceptionpublic KKConfiguration[] getConfigurations(boolean checkReturnByApi) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
ConfigurationMgrIfgetConfigurations in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether each configuration parameter can be returned by
the API. Only those configuration parameters allowed to be returned by the API are
returned.
if false, no check is performed and all configuration parameters 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)com.konakart.app.KKException - an unexpected KKException exceptionpublic KKConfiguration getConfiguration(java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getConfiguration in interface ConfigurationMgrIfkey - the 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)com.konakart.app.KKException - an unexpected KKException exceptionpublic KKConfiguration getConfigurationNoCache(java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getConfigurationNoCache in interface ConfigurationMgrIfkey - the 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)com.konakart.app.KKException - an unexpected KKException exceptionpublic java.lang.String getConfigurationValue(java.lang.String key)
throws com.konakart.app.KKException
getConfigurationValue in interface ConfigurationMgrIfkey - the Configuration Keycom.konakart.app.KKException - an unexpected KKException exceptionpublic int getConfigurationValueAsInt(java.lang.String key)
throws com.konakart.app.KKException
getConfigurationValueAsInt in interface ConfigurationMgrIfkey - the Configuration Keycom.konakart.app.KKException - if there is a problem converting the configuration value into an integer.public int getConfigurationValueAsInt(java.lang.String key,
int def)
throws com.konakart.app.KKException
getConfigurationValueAsInt in interface ConfigurationMgrIfkey - the Configuration Keydef - default value to return if the key isn't found.com.konakart.app.KKException - if there is a problem converting the configuration value into an integer.public java.math.BigDecimal getConfigurationValueAsBigDecimal(java.lang.String key)
throws com.konakart.app.KKException
getConfigurationValueAsBigDecimal in interface ConfigurationMgrIfkey - the Configuration Keycom.konakart.app.KKException - if there is a problem converting the configuration value into a BigDecimal.public java.math.BigDecimal getConfigurationValueAsBigDecimal(java.lang.String key,
java.math.BigDecimal def)
throws com.konakart.app.KKException
getConfigurationValueAsBigDecimal in interface ConfigurationMgrIfkey - the Configuration Keydef - default value to use if the key doesn't exist.com.konakart.app.KKException - if there is a problem converting the configuration value into a BigDecimal.public java.lang.Boolean getConfigurationValueAsBool(java.lang.String key,
java.lang.Boolean def)
throws com.konakart.app.KKException
getConfigurationValueAsBool in interface ConfigurationMgrIfkey - the Configuration Keydef - the default value to be returned if there's a problemcom.konakart.app.KKException - an unexpected KKException exceptionpublic ConfigDataIf[] getConfigData(java.lang.String sessionId, java.lang.String key) throws java.lang.Exception
ConfigurationMgrIfgetConfigData in interface ConfigurationMgrIfsessionId - Session Id of the customer.key - Only return the ConfigData items with this keyjava.lang.Exception - an unexpected exceptionpublic ConfigDataIf[] getConfigData(java.lang.String key) throws java.lang.Exception
ConfigurationMgrIfgetConfigData in interface ConfigurationMgrIfkey - Only return the ConfigData items with this key (if null all ConfigData items are
returned)java.lang.Exception - an unexpected exceptionpublic KKConfiguration getConfiguration(boolean checkReturnByApi, java.lang.String key) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getConfiguration in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the key of the configuration parameterorg.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)com.konakart.app.KKException - an unexpected KKException exceptionpublic KKConfiguration getConfiguration(boolean checkReturnByApi, java.lang.String key, boolean noCache) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
checkReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the key of the configuration parameternoCache - when true we don't use the cacheorg.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)com.konakart.app.KKException - an unexpected KKException exceptionpublic java.lang.String getConfigurationValue(boolean checkReturnByApi,
java.lang.String key)
throws com.konakart.app.KKException
getConfigurationValue in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the key of the configuration parametercom.konakart.app.KKException - an unexpected KKException exceptionpublic java.lang.String getConfigurationValue(boolean checkReturnByApi,
java.lang.String key,
boolean logIfNotFound)
throws com.konakart.app.KKException
ConfigurationMgrIfgetConfigurationValue in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the Configuration KeylogIfNotFound - if true, a logging message is written if the key isn't foundcom.konakart.app.KKException - an unexpected KKException exceptionpublic int getConfigurationValueAsInt(boolean checkReturnByApi,
java.lang.String key)
throws com.konakart.app.KKException
getConfigurationValueAsInt in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the key of the configuration parametercom.konakart.app.KKException - if there is a problem converting the configuration value into an integer.public int getConfigurationValueAsInt(boolean checkReturnByApi,
java.lang.String key,
int def)
throws com.konakart.app.KKException
getConfigurationValueAsInt in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the key of the configuration parameterdef - default value to return if the key isn't found.com.konakart.app.KKException - if there is a problem converting the configuration value into an integer.public java.math.BigDecimal getConfigurationValueAsBigDecimal(boolean checkReturnByApi,
java.lang.String key)
throws com.konakart.app.KKException
getConfigurationValueAsBigDecimal in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the key of the configuration parametercom.konakart.app.KKException - if there is a problem converting the configuration value into a BigDecimal.public java.math.BigDecimal getConfigurationValueAsBigDecimal(boolean checkReturnByApi,
java.lang.String key,
java.math.BigDecimal def)
throws com.konakart.app.KKException
getConfigurationValueAsBigDecimal in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the key of the configuration parameterdef - default value to use if the key doesn't exist.com.konakart.app.KKException - if there is a problem converting the configuration value into a BigDecimal.public java.lang.Boolean getConfigurationValueAsBool(boolean checkReturnByApi,
java.lang.String key,
java.lang.Boolean def)
throws com.konakart.app.KKException
getConfigurationValueAsBool in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the key of the configuration parameterdef - the default value to be returned if there's a problemcom.konakart.app.KKException - an unexpected KKException exceptionpublic java.lang.Long getConfigurationValueAsLong(java.lang.String key)
throws com.konakart.app.KKException
ConfigurationMgrIfgetConfigurationValueAsLong in interface ConfigurationMgrIfkey - the Configuration Keycom.konakart.app.KKException - if there is a problem converting the configuration value into a Long.public java.lang.Long getConfigurationValueAsLong(java.lang.String key,
java.lang.Long def)
throws com.konakart.app.KKException
ConfigurationMgrIfgetConfigurationValueAsLong in interface ConfigurationMgrIfkey - the Configuration Keydef - default value to return if the key isn't found.com.konakart.app.KKException - if there is a problem converting the configuration value into a Long.public java.lang.Long getConfigurationValueAsLong(boolean checkReturnByApi,
java.lang.String key)
throws com.konakart.app.KKException
ConfigurationMgrIfgetConfigurationValueAsLong in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the Configuration Keycom.konakart.app.KKException - if there is a problem converting the configuration value into a Long.public java.lang.Long getConfigurationValueAsLong(boolean checkReturnByApi,
java.lang.String key,
java.lang.Long def)
throws com.konakart.app.KKException
ConfigurationMgrIfgetConfigurationValueAsLong in interface ConfigurationMgrIfcheckReturnByApi - if true a check is made on whether this configuration parameter can be returned by
the API. If it can't an Exception is thrown.key - the Configuration Keydef - default value to return if the key isn't found.com.konakart.app.KKException - if there is a problem converting the configuration value into a Long.@Deprecated
public void editConfiguration(java.lang.String key,
java.lang.String value)
throws com.konakart.app.KKException
Previously this call allowed the edit of an existing configuration parameter. It threw an exception if the configuration didn't exist.
editConfiguration in interface ConfigurationMgrIfkey - key whose value will be setvalue - value to setcom.konakart.app.KKException - an unexpected KKException exceptionprotected boolean checkIfReturnable(java.lang.String key)
throws com.konakart.app.KKException
key - the keycom.konakart.app.KKException - if the configuration parameter cannot be returned by the APIpublic void refreshConfigs()
throws java.lang.Exception
refreshConfigs in interface ConfigurationMgrIfjava.lang.Exception - an unexpected exceptionprotected void setCriteriaWithStandardAttributes(KKCriteria c)
c - the cCopyright © 2018 DS Data Systems UK Ltd.