mymobilesite.controller
Class Language

java.lang.Object
  extended by mymobilesite.controller.Language
Direct Known Subclasses:
LanguageGB, LanguageNB

public abstract class Language
extends java.lang.Object

The Language class is abstract class to allow use of several languages. It holds variables for the labels and texts in the application which should be initialized by any implementing class which must be made to support a new language.

Author:
Gunn Olaussen & Kirsti N. Torgersen

Field Summary
 java.lang.String command_back
           
 java.lang.String command_exit
           
 java.lang.String command_help
           
 java.lang.String command_ok
          The text on the command buttons:
 java.lang.String command_save
           
 java.lang.String command_settings
           
 java.lang.String command_tryagain
           
static int ERROR_AUTH_NOTACCEPTED
           
static int ERROR_DS_LOSTCONTACT
           
static int ERROR_DS_NORESULTS
           
static int ERROR_DS_TIMESTAMPDEVIATION
           
static int ERROR_IDP_FAULT
           
static int ERROR_IDP_LOSTCONTACT
           
static int ERROR_IDP_NOTFOUND
           
static int ERROR_IDP_NOTTRUSTED
           
static int ERROR_IDP_TIMESTAMPDEVIATION
           
static int ERROR_IDPNAME_NOTFOUND
          ID number of the error messages:
static int ERROR_INVALID_MESSAGE
           
protected static java.lang.String[] error_messages
          List of error messages and waiting messages:
static int ERROR_REPLAY_DETECTED
           
static int ERROR_WSP_LOSTCONTACT
           
static int ERROR_WSP_NORESULTS
           
static int ERROR_WSP_RECEIVEDFAULT
           
static int ERROR_WSP_TIMESTAMPDEVIATION
           
 java.lang.String help
          The text featured on the help screen:
 java.lang.String label_applName
          Labels used in the application:
 java.lang.String label_error
           
 java.lang.String label_help
           
 java.lang.String label_idp
           
 java.lang.String label_language
           
 java.lang.String label_providers
           
 java.lang.String label_pwd
           
 java.lang.String label_services
           
 java.lang.String label_un
           
 java.lang.String label_waiting
           
 java.lang.String[] languageList
          List of supported languages:
static int WAITING_FINDING_WSP
           
static int WAITING_GETTING_SERVICES
           
static int WAITING_IDP_SESSION
          Waiting messages:
protected static java.lang.String[] waiting_messages
           
static int WAITING_VERIFYING_PWD
           
 
Constructor Summary
Language()
          The language constructor initializes the message arrays and populates the list of languages.
 
Method Summary
static java.lang.String getErrorMsg(int errorCode)
          This method is used to get the message in the correct language.
static Language getLanguage()
          This method creates a Language object and the exact class is determined by the language in the Configurations class.
static java.lang.String getWaitingMsg(int code)
          This method is used to get the message in the correct language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_IDPNAME_NOTFOUND

public static final int ERROR_IDPNAME_NOTFOUND
ID number of the error messages:

See Also:
Constant Field Values

ERROR_IDP_NOTFOUND

public static final int ERROR_IDP_NOTFOUND
See Also:
Constant Field Values

ERROR_IDP_NOTTRUSTED

public static final int ERROR_IDP_NOTTRUSTED
See Also:
Constant Field Values

ERROR_REPLAY_DETECTED

public static final int ERROR_REPLAY_DETECTED
See Also:
Constant Field Values

ERROR_INVALID_MESSAGE

public static final int ERROR_INVALID_MESSAGE
See Also:
Constant Field Values

ERROR_AUTH_NOTACCEPTED

public static final int ERROR_AUTH_NOTACCEPTED
See Also:
Constant Field Values

ERROR_IDP_LOSTCONTACT

public static final int ERROR_IDP_LOSTCONTACT
See Also:
Constant Field Values

ERROR_IDP_FAULT

public static final int ERROR_IDP_FAULT
See Also:
Constant Field Values

ERROR_DS_LOSTCONTACT

public static final int ERROR_DS_LOSTCONTACT
See Also:
Constant Field Values

ERROR_DS_NORESULTS

public static final int ERROR_DS_NORESULTS
See Also:
Constant Field Values

ERROR_WSP_LOSTCONTACT

public static final int ERROR_WSP_LOSTCONTACT
See Also:
Constant Field Values

ERROR_WSP_NORESULTS

public static final int ERROR_WSP_NORESULTS
See Also:
Constant Field Values

ERROR_WSP_RECEIVEDFAULT

public static final int ERROR_WSP_RECEIVEDFAULT
See Also:
Constant Field Values

ERROR_IDP_TIMESTAMPDEVIATION

public static final int ERROR_IDP_TIMESTAMPDEVIATION
See Also:
Constant Field Values

ERROR_DS_TIMESTAMPDEVIATION

public static final int ERROR_DS_TIMESTAMPDEVIATION
See Also:
Constant Field Values

ERROR_WSP_TIMESTAMPDEVIATION

public static final int ERROR_WSP_TIMESTAMPDEVIATION
See Also:
Constant Field Values

WAITING_IDP_SESSION

public static final int WAITING_IDP_SESSION
Waiting messages:

See Also:
Constant Field Values

WAITING_VERIFYING_PWD

public static final int WAITING_VERIFYING_PWD
See Also:
Constant Field Values

WAITING_FINDING_WSP

public static final int WAITING_FINDING_WSP
See Also:
Constant Field Values

WAITING_GETTING_SERVICES

public static final int WAITING_GETTING_SERVICES
See Also:
Constant Field Values

languageList

public java.lang.String[] languageList
List of supported languages:


label_applName

public java.lang.String label_applName
Labels used in the application:


label_idp

public java.lang.String label_idp

label_un

public java.lang.String label_un

label_pwd

public java.lang.String label_pwd

label_help

public java.lang.String label_help

label_language

public java.lang.String label_language

label_providers

public java.lang.String label_providers

label_services

public java.lang.String label_services

label_error

public java.lang.String label_error

label_waiting

public java.lang.String label_waiting

help

public java.lang.String help
The text featured on the help screen:


command_ok

public java.lang.String command_ok
The text on the command buttons:


command_exit

public java.lang.String command_exit

command_settings

public java.lang.String command_settings

command_help

public java.lang.String command_help

command_save

public java.lang.String command_save

command_back

public java.lang.String command_back

command_tryagain

public java.lang.String command_tryagain

error_messages

protected static java.lang.String[] error_messages
List of error messages and waiting messages:


waiting_messages

protected static java.lang.String[] waiting_messages
Constructor Detail

Language

public Language()
The language constructor initializes the message arrays and populates the list of languages.

Method Detail

getLanguage

public static Language getLanguage()
This method creates a Language object and the exact class is determined by the language in the Configurations class.

Returns:
Language An instance of the Language class.

getErrorMsg

public static java.lang.String getErrorMsg(int errorCode)
This method is used to get the message in the correct language. It returns the error message identified in the input.

Parameters:
errorCode - int A number identifying the error message to return.
Returns:
String The error message in the correct language.

getWaitingMsg

public static java.lang.String getWaitingMsg(int code)
This method is used to get the message in the correct language. It returns the waiting message identified in the input.

Parameters:
code - int A number identifying the waiting message to return.
Returns:
String The waiting message in the correct language.