public class AdminLanguageMgr extends AdminBaseMgr implements AdminLanguageMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
AdminLanguageMgr.StaticData
StaticData
|
Modifier and Type | Field and Description |
---|---|
static int |
ALL_LANGUAGES
All languages indicator.
|
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,AdminLanguageMgr.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 |
---|
AdminLanguageMgr(KKAdminIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected int |
addLanguageSearchCriteria(com.konakart.db.KKCriteria c,
AdminLanguageSearch search) |
protected void |
addOrderBy(com.konakart.db.KKCriteria c,
AdminLanguageSearch search)
Add Order By clauses
|
int |
deleteLanguage(int langId)
Delete a Language
|
protected void |
deriveDataLanguage(AdminLanguage lang) |
boolean |
doesLanguageExistForId(int langId)
Checks to see whether a language already exists with this id
|
AdminLanguage |
fetchDefaultLanguage()
This fetches the default language regardless of whether it's already set.
|
int |
fetchNumLanguages()
This fetches the number of languages from the database for the current engine/store.
|
AdminLanguage[] |
getAllLanguages()
Returns an array of language objects that have been defined in the system.
|
AdminLanguage |
getDefaultLanguage()
Returns the default language
|
java.lang.String |
getDefaultLanguageCode() |
int |
getDefaultLanguageId()
Returns the default language id
|
java.lang.String |
getDefaultLocale() |
AdminLanguage |
getLanguageByCode(java.lang.String code)
Retrieves the language object referenced by the code (i.e.
|
AdminLanguage |
getLanguageById(int languageId)
Returns the language referenced by the language id
|
AdminLanguage |
getLanguageById(int languageId,
java.sql.Connection con)
Returns the language referenced by the language id
|
AdminLanguage |
getLanguageForLocale(java.lang.String locale)
Retrieves the language for the locale
|
int |
getLanguageIdForLocale(java.lang.String locale)
Retrieves the language Id for the locale
|
AdminLanguageSearchResult |
getLanguages(AdminLanguageSearch languageSearchOptions)
This returns an AdminLanguageSearchResult object.
|
int |
getNumLanguages()
Returns the total number of languages defined for the store - it does not include the
display-only languages
|
int |
insertLanguage(AdminLanguage lang)
Insert a Language
|
void |
refreshConfigs()
Retrieve some commonly-used properties
|
protected void |
setDefaultLanguage()
The default language is referenced by a configuration variable called DEFAULT_LANGUAGE.
|
void |
setDefaultLanguage(java.lang.String langCode)
Sets the default language.
|
protected void |
setNumLanguages()
The number of languages is retrieved from the database first time round and is then stored in
a static variable.
|
int |
updateLanguage(AdminLanguage lang)
Update a Language
|
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, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, 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, updateStaticVariablesNow
protected static org.apache.commons.logging.Log log
public static final int DEFAULT_LANG
public static final int ALL_LANGUAGES
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,AdminLanguageMgr.StaticData> staticDataHM
public AdminLanguageMgr(KKAdminIf eng) throws java.lang.Exception
eng
- KKAdmin enginejava.lang.Exception
- an unexpected exceptionpublic AdminLanguage[] getAllLanguages() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getAllLanguages
in interface AdminLanguageMgrIf
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
- unexpected exception in the KonaKart Admin Enginepublic AdminLanguageSearchResult getLanguages(AdminLanguageSearch languageSearchOptions) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
AdminLanguageMgrIf
getLanguages
in interface AdminLanguageMgrIf
languageSearchOptions
- 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)KKAdminException
- an unexpected exception in the KonaKart Admin engineprotected void deriveDataLanguage(AdminLanguage lang) throws KKAdminException
KKAdminException
public int getDefaultLanguageId() throws java.lang.Exception
AdminLanguageMgrIf
getDefaultLanguageId
in interface AdminLanguageMgrIf
java.lang.Exception
- an unexpected exceptionpublic AdminLanguage getDefaultLanguage() throws java.lang.Exception
AdminLanguageMgrIf
getDefaultLanguage
in interface AdminLanguageMgrIf
java.lang.Exception
- an unexpected exceptionpublic int getNumLanguages() throws java.lang.Exception
AdminLanguageMgrIf
getNumLanguages
in interface AdminLanguageMgrIf
java.lang.Exception
- an unexpected exceptionpublic AdminLanguage getLanguageById(int languageId) throws java.lang.Exception
AdminLanguageMgrIf
getLanguageById
in interface AdminLanguageMgrIf
languageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic AdminLanguage getLanguageById(int languageId, java.sql.Connection con) throws java.lang.Exception
AdminLanguageMgrIf
getLanguageById
in interface AdminLanguageMgrIf
languageId
- the languageIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionpublic AdminLanguage getLanguageByCode(java.lang.String code) throws java.lang.Exception
getLanguageByCode
in interface AdminLanguageMgrIf
code
- the codejava.lang.Exception
- an unexpected exceptionpublic int getLanguageIdForLocale(java.lang.String locale) throws java.lang.Exception
getLanguageIdForLocale
in interface AdminLanguageMgrIf
locale
- a 2 or 4 character locale (eg. en, de, es)java.lang.Exception
- an unexpected exceptionpublic AdminLanguage getLanguageForLocale(java.lang.String locale) throws java.lang.Exception
AdminLanguageMgrIf
getLanguageForLocale
in interface AdminLanguageMgrIf
locale
- a 2 or 4 character locale (eg. en, de, es)java.lang.Exception
- an unexpected exceptionpublic void setDefaultLanguage(java.lang.String langCode) throws java.lang.Exception
setDefaultLanguage
in interface AdminLanguageMgrIf
langCode
- the langCodejava.lang.Exception
- an unexpected exceptionprotected void setDefaultLanguage() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionprotected void setNumLanguages() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionpublic AdminLanguage fetchDefaultLanguage() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionpublic int fetchNumLanguages() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionprotected int addLanguageSearchCriteria(com.konakart.db.KKCriteria c, AdminLanguageSearch search) throws KKAdminException
KKAdminException
public int deleteLanguage(int langId) throws KKAdminException
deleteLanguage
in interface AdminLanguageMgrIf
langId
- A language idKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int insertLanguage(AdminLanguage lang) throws KKAdminException
insertLanguage
in interface AdminLanguageMgrIf
lang
- A language objectKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int updateLanguage(AdminLanguage lang) throws java.lang.Exception
updateLanguage
in interface AdminLanguageMgrIf
lang
- A language objectjava.lang.Exception
- an unexpected exceptionpublic boolean doesLanguageExistForId(int langId) throws org.apache.torque.TorqueException, KKAdminException
doesLanguageExistForId
in interface AdminLanguageMgrIf
langId
- the langIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void addOrderBy(com.konakart.db.KKCriteria c, AdminLanguageSearch search)
c
- the csearch
- the searchpublic java.lang.String getDefaultLocale() throws KKAdminException
getDefaultLocale
in interface AdminLanguageMgrIf
KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic java.lang.String getDefaultLanguageCode() throws KKAdminException
getDefaultLanguageCode
in interface AdminLanguageMgrIf
KKAdminException
- an unexpected exception in the KonaKart Admin enginepublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminLanguageMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.