|
|||||||||
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.AdminLanguageMgr
public class AdminLanguageMgr
The AdminLanguageMgr - for Managing Language Objects for the Admin Application
Nested Class Summary | |
---|---|
protected class |
AdminLanguageMgr.StaticData
StaticData |
Field Summary | |
---|---|
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 |
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir |
Constructor Summary | |
---|---|
AdminLanguageMgr(KKAdminIf eng)
Constructor |
Method Summary | |
---|---|
protected int |
addLanguageSearchCriteria(com.konakart.bl.KKCriteria c,
AdminLanguageSearch search)
|
protected void |
addOrderBy(com.konakart.bl.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 |
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 search)
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 and set the velocity log file location |
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 |
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
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
Constructor Detail |
---|
public AdminLanguageMgr(KKAdminIf eng) throws java.lang.Exception
eng
- KKAdmin engine
java.lang.Exception
Method Detail |
---|
public AdminLanguage[] getAllLanguages() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getAllLanguages
in interface AdminLanguageMgrIf
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
public AdminLanguageSearchResult getLanguages(AdminLanguageSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
AdminLanguageMgrIf
getLanguages
in interface AdminLanguageMgrIf
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
protected void deriveDataLanguage(AdminLanguage lang) throws KKAdminException
KKAdminException
public int getDefaultLanguageId() throws java.lang.Exception
AdminLanguageMgrIf
getDefaultLanguageId
in interface AdminLanguageMgrIf
java.lang.Exception
public AdminLanguage getDefaultLanguage() throws java.lang.Exception
AdminLanguageMgrIf
getDefaultLanguage
in interface AdminLanguageMgrIf
java.lang.Exception
public int getNumLanguages() throws java.lang.Exception
AdminLanguageMgrIf
getNumLanguages
in interface AdminLanguageMgrIf
java.lang.Exception
public AdminLanguage getLanguageById(int languageId) throws java.lang.Exception
AdminLanguageMgrIf
getLanguageById
in interface AdminLanguageMgrIf
languageId
-
java.lang.Exception
public AdminLanguage getLanguageByCode(java.lang.String code) throws java.lang.Exception
getLanguageByCode
in interface AdminLanguageMgrIf
code
-
java.lang.Exception
public 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
public 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
public void setDefaultLanguage(java.lang.String langCode) throws java.lang.Exception
setDefaultLanguage
in interface AdminLanguageMgrIf
langCode
-
java.lang.Exception
protected void setDefaultLanguage() throws java.lang.Exception
java.lang.Exception
protected void setNumLanguages() throws java.lang.Exception
java.lang.Exception
public AdminLanguage fetchDefaultLanguage() throws java.lang.Exception
java.lang.Exception
public int fetchNumLanguages() throws java.lang.Exception
java.lang.Exception
protected int addLanguageSearchCriteria(com.konakart.bl.KKCriteria c, AdminLanguageSearch search) throws KKAdminException
KKAdminException
public int deleteLanguage(int langId) throws KKAdminException
deleteLanguage
in interface AdminLanguageMgrIf
langId
- A language id
KKAdminException
public int insertLanguage(AdminLanguage lang) throws KKAdminException
insertLanguage
in interface AdminLanguageMgrIf
lang
- A language object
KKAdminException
public int updateLanguage(AdminLanguage lang) throws java.lang.Exception
updateLanguage
in interface AdminLanguageMgrIf
lang
- A language object
java.lang.Exception
public boolean doesLanguageExistForId(int langId) throws org.apache.torque.TorqueException, KKAdminException
doesLanguageExistForId
in interface AdminLanguageMgrIf
langId
-
org.apache.torque.TorqueException
KKAdminException
protected void addOrderBy(com.konakart.bl.KKCriteria c, AdminLanguageSearch search)
c
- search
- public java.lang.String getDefaultLocale() throws KKAdminException
getDefaultLocale
in interface AdminLanguageMgrIf
KKAdminException
public java.lang.String getDefaultLanguageCode() throws KKAdminException
getDefaultLanguageCode
in interface AdminLanguageMgrIf
KKAdminException
public void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminLanguageMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |