com.konakartadmin.blif
Interface AdminLanguageMgrIf

All Known Implementing Classes:
AdminLanguageMgr

public interface AdminLanguageMgrIf

AdminLanguageMgrIf


Method Summary
 int deleteLanguage(int langId)
          Delete a Language
 boolean doesLanguageExistForId(int langId)
          Checks to see whether a language already exists with this id
 AdminLanguage[] getAllLanguages()
          Returns an array of language objects for all languages 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
 void setDefaultLanguage(java.lang.String langCode)
          Sets the default language.
 int updateLanguage(AdminLanguage lang)
          Update a Language
 

Method Detail

getAllLanguages

AdminLanguage[] getAllLanguages()
                                throws org.apache.torque.TorqueException,
                                       com.workingdogs.village.DataSetException,
                                       KKAdminException
Returns an array of language objects for all languages that have been defined in the system. It returns all languages in the database except those that are marked as display only.

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

getLanguages

AdminLanguageSearchResult getLanguages(AdminLanguageSearch search)
                                       throws org.apache.torque.TorqueException,
                                              com.workingdogs.village.DataSetException,
                                              KKAdminException
This returns an AdminLanguageSearchResult object. It allows you to search criteria for code and name and also to define whether or not you want to retrieve the display-only languages in addition to the data languages by setting the includeDisplayOnlyLangs attribute of the AdmnLanguageSearch object to true. The default behaviour is not to return the display-only languages.

Parameters:
search -
Returns:
Returns an AdminLanguageSearchResult object
Throws:
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException

getDefaultLanguageId

int getDefaultLanguageId()
                         throws java.lang.Exception
Returns the default language id

Returns:
Returns the default language id
Throws:
java.lang.Exception

getDefaultLanguage

AdminLanguage getDefaultLanguage()
                                 throws java.lang.Exception
Returns the default language

Returns:
Returns the default language object
Throws:
java.lang.Exception

getNumLanguages

int getNumLanguages()
                    throws java.lang.Exception
Returns the total number of languages defined for the store - it does not include the display-only languages

Returns:
Returns the total number of languages defined for the store
Throws:
java.lang.Exception

getLanguageById

AdminLanguage getLanguageById(int languageId)
                              throws java.lang.Exception
Returns the language referenced by the language id

Parameters:
languageId -
Returns:
The language object with id = languageId. Null if no object is found.
Throws:
java.lang.Exception

getLanguageByCode

AdminLanguage getLanguageByCode(java.lang.String code)
                                throws java.lang.Exception
Retrieves the language object referenced by the code (i.e. en, de, es)

Parameters:
code -
Returns:
Returns a language object
Throws:
java.lang.Exception

getLanguageIdForLocale

int getLanguageIdForLocale(java.lang.String locale)
                           throws java.lang.Exception
Retrieves the language Id for the locale

Parameters:
locale - a 2 or 4 character locale (eg. en, de, es)
Returns:
Returns the languageId of the matching language or the languageId of the default language if no matching language was found.
Throws:
java.lang.Exception

getLanguageForLocale

AdminLanguage getLanguageForLocale(java.lang.String locale)
                                   throws java.lang.Exception
Retrieves the language for the locale

Parameters:
locale - a 2 or 4 character locale (eg. en, de, es)
Returns:
Returns the language of the matching language or the default language if no matching language was found.
Throws:
java.lang.Exception

setDefaultLanguage

void setDefaultLanguage(java.lang.String langCode)
                        throws java.lang.Exception
Sets the default language. Sets a configuration variable called DEFAULT_LANGUAGE.

Parameters:
langCode -
Throws:
java.lang.Exception

getDefaultLocale

java.lang.String getDefaultLocale()
                                  throws KKAdminException
Returns:
Returns the default locale
Throws:
KKAdminException

getDefaultLanguageCode

java.lang.String getDefaultLanguageCode()
                                        throws KKAdminException
Returns:
Returns the default 2-character language code
Throws:
KKAdminException

deleteLanguage

int deleteLanguage(int langId)
                   throws KKAdminException
Delete a Language

Parameters:
langId - A language id
Returns:
returns the id of the deleted language
Throws:
KKAdminException

insertLanguage

int insertLanguage(AdminLanguage lang)
                   throws KKAdminException
Insert a Language

Parameters:
lang - A language object
Returns:
returns the id of the inserted language
Throws:
KKAdminException

updateLanguage

int updateLanguage(AdminLanguage lang)
                   throws java.lang.Exception
Update a Language

Parameters:
lang - A language object
Returns:
returns the id of the updated language
Throws:
java.lang.Exception

doesLanguageExistForId

boolean doesLanguageExistForId(int langId)
                               throws org.apache.torque.TorqueException,
                                      KKAdminException
Checks to see whether a language already exists with this id

Parameters:
langId -
Returns:
Returns true if the customer already exists
Throws:
org.apache.torque.TorqueException
KKAdminException

refreshConfigs

void refreshConfigs()
                    throws java.lang.Exception
Retrieve some commonly-used properties and set the velocity log file location

Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.