public class LanguageMgr extends BaseMgr implements LanguageMgrIf
| Modifier and Type | Class and Description |
|---|---|
protected class |
LanguageMgr.StaticData
Used to store the static data of this manager
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_LANG
Default language id is selected with a value of ConstantsMgr.NOT_SET.
|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
mutex
Mutex for the Manager
|
protected static java.util.Map<java.lang.String,LanguageMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
templateBaseDir| Constructor and Description |
|---|
LanguageMgr(KKEngIf eng)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
deriveDataLanguage(Language lang) |
protected Language |
fetchDefaultLanguage()
The default language is referenced by a configuration variable called DEFAULT_LANGUAGE.
|
Language[] |
getAllLanguages()
Returns an array of language objects for all languages that have been defined in the system.
|
Language |
getDefaultLanguage()
Returns the default language object
|
int |
getDefaultLanguageId()
Returns the default language id
|
java.lang.String |
getDefaultLocale() |
Language |
getLanguagePerCode(java.lang.String code)
Retrieves the language object referenced by the code (i.e.
|
Language |
getLanguagePerId(int languageId)
Returns the language object with id = languageId.
|
Language[] |
getLanguages(LanguageSearchIf _search)
Returns an array of language objects for all languages that have been defined in the system that meet the defined search criteria.
|
NameValue[] |
getMessages(int type,
java.lang.String localeString)
Used to fetch a message catalog for a locale and message type.
|
java.lang.String |
getMsgValue(java.lang.String key,
int type,
java.lang.String localeString)
Get an Application Message Value.
|
void |
refreshConfigs()
Refresh the configuration of the language manager
|
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
public static final int DEFAULT_LANG
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,LanguageMgr.StaticData> staticDataHM
public LanguageMgr(KKEngIf eng) throws java.lang.Exception
eng - the engjava.lang.Exception - an unexpected exceptionpublic Language[] getAllLanguages() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
getAllLanguages in interface LanguageMgrIforg.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 Language[] getLanguages(LanguageSearchIf _search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
LanguageMgrIfgetLanguages in interface LanguageMgrIf_search - the languageSearchOptionsorg.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 exceptionprotected void deriveDataLanguage(Language lang) throws com.konakart.app.KKException
com.konakart.app.KKExceptionpublic int getDefaultLanguageId()
throws com.konakart.app.KKException
LanguageMgrIfgetDefaultLanguageId in interface LanguageMgrIfcom.konakart.app.KKException - an unexpected KKException exceptionpublic Language getDefaultLanguage() throws com.konakart.app.KKException
LanguageMgrIfgetDefaultLanguage in interface LanguageMgrIfcom.konakart.app.KKException - an unexpected KKException exceptionpublic java.lang.String getDefaultLocale()
throws com.konakart.app.KKException
getDefaultLocale in interface LanguageMgrIfcom.konakart.app.KKException - an unexpected KKException exceptionpublic Language getLanguagePerId(int languageId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
LanguageMgrIfgetLanguagePerId in interface LanguageMgrIflanguageId - the languageIdorg.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 Language getLanguagePerCode(java.lang.String code) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, com.konakart.app.KKException
getLanguagePerCode in interface LanguageMgrIfcode - the codecom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)com.konakart.app.KKException - an unexpected KKException exceptionprotected Language fetchDefaultLanguage() throws java.lang.Exception
java.lang.Exception - an unexpected exceptionpublic java.lang.String getMsgValue(java.lang.String key,
int type,
java.lang.String localeString)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
com.konakart.app.KKException
getMsgValue in interface LanguageMgrIfkey - the message keytype - the message type (should use KKConstants.MSG_TYP_APPLICATION for application
messages)localeString - the message locale (eg. "en_GB")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 NameValue[] getMessages(int type, java.lang.String localeString) throws com.konakart.app.KKException, com.workingdogs.village.DataSetException, org.apache.torque.TorqueException
getMessages in interface LanguageMgrIftype - the message type (should use KKConstants.MSG_TYP_APPLICATION for application
messages)localeString - the message locale (eg. "en_GB")com.konakart.app.KKException - an unexpected KKException exceptioncom.workingdogs.village.DataSetException - an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException - an unexpected exception in Torque (the database layer)public void refreshConfigs()
throws java.lang.Exception
refreshConfigs in interface LanguageMgrIfjava.lang.Exception - an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.