com.konakart.blif
Interface LanguageMgrIf

All Known Implementing Classes:
LanguageMgr

public interface LanguageMgrIf

LanguageMgrIf Interface which an implementation of this manager must adhere to.


Method Summary
 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
 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
 

Method Detail

getAllLanguages

Language[] getAllLanguages()
                           throws org.apache.torque.TorqueException,
                                  com.workingdogs.village.DataSetException,
                                  KKException
Returns an array of language objects for all languages that have been defined in the system.

Returns:
An array of language objects.
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException

getDefaultLanguageId

int getDefaultLanguageId()
                         throws KKException
Returns the default language id

Returns:
Returns the default language id
Throws:
KKException

getDefaultLanguage

Language getDefaultLanguage()
                            throws KKException
Returns the default language object

Returns:
Returns the default language object
Throws:
KKException

getLanguagePerId

Language getLanguagePerId(int languageId)
                          throws org.apache.torque.TorqueException,
                                 com.workingdogs.village.DataSetException,
                                 KKException
Returns the language object with id = languageId. Null if no object is found.

Parameters:
languageId -
Returns:
The language object with id = languageId. Null if no object is found.
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException

getLanguagePerCode

Language getLanguagePerCode(java.lang.String code)
                            throws com.workingdogs.village.DataSetException,
                                   org.apache.torque.TorqueException,
                                   KKException
Retrieves the language object referenced by the code (i.e. en, de, es)

Parameters:
code -
Returns:
Returns a language object
Throws:
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException
KKException

refreshConfigs

void refreshConfigs()
                    throws java.lang.Exception
Refresh the configuration of the language manager

Throws:
java.lang.Exception

getMsgValue

java.lang.String getMsgValue(java.lang.String key,
                             int type,
                             java.lang.String locale)
                             throws org.apache.torque.TorqueException,
                                    com.workingdogs.village.DataSetException,
                                    KKException
Get an Application Message Value. If locale is null, the default locale is used.

Parameters:
key - the message key
type - the message type (should use KKConstants.MSG_TYP_APPLICATION for application messages)
locale - the message locale (eg. "en_GB"). Default is used if left null.
Returns:
The message for the key, type and locale. If the message isn't found the String "[key:type:locale]" is returned.
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKException

getMessages

NameValue[] getMessages(int type,
                        java.lang.String locale)
                        throws KKException,
                               com.workingdogs.village.DataSetException,
                               org.apache.torque.TorqueException
Used to fetch a message catalog for a locale and message type. If locale is null, the default locale is used.

Parameters:
type - the message type (should use KKConstants.MSG_TYP_APPLICATION for application messages)
locale - the message locale (eg. "en_GB"). Default is used if left null.
Returns:
Returns and array of NameValue objects containing the message catalog
Throws:
KKException
com.workingdogs.village.DataSetException
org.apache.torque.TorqueException


Copyright © 2011 DS Data Systems UK Ltd.