com.flexive.shared.interfaces
Interface LanguageEngine

All Known Subinterfaces:
LanguageEngineLocal

public interface LanguageEngine

[fleXive] language engine interface. This engine should not be used to load languages as they are available from the environment! Its purpose is to enable/disable, initially load and manage (position, etc.) languages

Version:
$Rev: 462 $
Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Method Summary
 boolean isValid(long languageId)
          Returns true if the language referenced by its unique id is valid.
 FxLanguage load(long languageId)
          Loads a language defined by its unique id.
 FxLanguage load(java.lang.String languageIsoCode)
          Loads a language defined by is iso code.
 java.util.List<FxLanguage> loadAvailable()
          Loads all available languages.
 java.util.List<FxLanguage> loadAvailable(boolean excludeSystemLanguage)
          Loads all available languages.
 java.util.List<FxLanguage> loadDisabled()
          Loads all disabled languages.
 void setAvailable(java.util.List<FxLanguage> available, boolean ignoreUsage)
          Set all available languages
 

Method Detail

load

FxLanguage load(long languageId)
                throws FxApplicationException
Loads a language defined by its unique id.

Parameters:
languageId - the unqiue id of the language to load
Returns:
the language object
Throws:
FxApplicationException - on errors

load

FxLanguage load(java.lang.String languageIsoCode)
                throws FxApplicationException
Loads a language defined by is iso code.

Parameters:
languageIsoCode - the iso code of the language to load
Returns:
the language object
Throws:
FxApplicationException - on errors

loadAvailable

java.util.List<FxLanguage> loadAvailable()
                                         throws FxApplicationException
Loads all available languages.

Returns:
an array with all available languages
Throws:
FxApplicationException - on errors

loadDisabled

java.util.List<FxLanguage> loadDisabled()
                                        throws FxApplicationException
Loads all disabled languages.

Returns:
a list with all disabled languages
Throws:
FxApplicationException - on errors

loadAvailable

java.util.List<FxLanguage> loadAvailable(boolean excludeSystemLanguage)
                                         throws FxApplicationException
Loads all available languages.

Parameters:
excludeSystemLanguage - if true the system language is exluded from the result
Returns:
a array with all available language objects
Throws:
FxApplicationException - if the function fails

isValid

boolean isValid(long languageId)
Returns true if the language referenced by its unique id is valid.

A language is valid if it may be used according to the used license.

Parameters:
languageId - the unqique id of the language to check
Returns:
a array with all available language objects

setAvailable

void setAvailable(java.util.List<FxLanguage> available,
                  boolean ignoreUsage)
                  throws FxApplicationException
Set all available languages

Parameters:
available - list containing all available languages
ignoreUsage - ignore if a language that is no longer available after calling this method is in use
Throws:
FxApplicationException - on errors