|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakart.bl.BaseMgr
com.konakart.bl.LanguageMgr
public class LanguageMgr
Manages all business logic relevant to the management of languages within the system
| Nested Class Summary | |
|---|---|
protected class |
LanguageMgr.StaticData
Used to store the static data of this manager |
| Field Summary | |
|---|---|
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 |
| Fields inherited from class com.konakart.bl.BaseMgr |
|---|
templateBaseDir |
| Constructor Summary | |
|---|---|
LanguageMgr(KKEngIf eng)
Constructor |
|
| Method Summary | |
|---|---|
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. |
NameValue[] |
getMessages(int type,
java.lang.String locale)
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 locale)
Get an Application Message Value. |
void |
refreshConfigs()
Refresh the configuration of the language manager |
| 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
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,LanguageMgr.StaticData> staticDataHM
| Constructor Detail |
|---|
public LanguageMgr(KKEngIf eng)
throws java.lang.Exception
eng -
java.lang.Exception| Method Detail |
|---|
public Language[] getAllLanguages()
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKException
getAllLanguages in interface LanguageMgrIforg.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException
public int getDefaultLanguageId()
throws KKException
LanguageMgrIf
getDefaultLanguageId in interface LanguageMgrIfKKException
public Language getDefaultLanguage()
throws KKException
LanguageMgrIf
getDefaultLanguage in interface LanguageMgrIfKKException
public java.lang.String getDefaultLocale()
throws KKException
KKException
public Language getLanguagePerId(int languageId)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKException
LanguageMgrIf
getLanguagePerId in interface LanguageMgrIflanguageId -
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException
public Language getLanguagePerCode(java.lang.String code)
throws com.workingdogs.village.DataSetException,
org.apache.torque.TorqueException,
KKException
getLanguagePerCode in interface LanguageMgrIfcode -
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKException
protected Language fetchDefaultLanguage()
throws java.lang.Exception
java.lang.Exception
public java.lang.String getMsgValue(java.lang.String key,
int type,
java.lang.String locale)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException,
KKException
getMsgValue in interface LanguageMgrIfkey - the message keytype - the message type (should use KKConstants.MSG_TYP_APPLICATION for application
messages)locale - the message locale (eg. "en_GB")
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException
public NameValue[] getMessages(int type,
java.lang.String locale)
throws 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)locale - the message locale (eg. "en_GB")
KKException
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
public void refreshConfigs()
throws java.lang.Exception
refreshConfigs in interface LanguageMgrIfjava.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||