infoservice.mailsystem.central
Class MailMessages

java.lang.Object
  extended by infoservice.mailsystem.central.MailMessages

public class MailMessages
extends java.lang.Object

This class is the implementation of the mail message localizations.


Field Summary
private static java.util.Locale DEFAULT_LOCALE
          This is the default localization (English as default).
private  java.util.ResourceBundle m_messageResource
          This stores the resource for the used localization.
private static java.lang.String RESOURCE_BASE
          This is the base of the resource files.
 
Constructor Summary
MailMessages(java.util.Locale a_localeToUse)
          Creates a new MailMessages instance.
 
Method Summary
 java.lang.String getString(java.lang.String a_key)
          Returns the localized version of the message assigned to the specified key in the resource files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_BASE

private static final java.lang.String RESOURCE_BASE
This is the base of the resource files. The single single resource files append this base .properties (default resource, if necessary) or _??.properties, where ?? is the language code, e.g. 'de' (localized resources).

See Also:
Constant Field Values

DEFAULT_LOCALE

private static final java.util.Locale DEFAULT_LOCALE
This is the default localization (English as default).


m_messageResource

private java.util.ResourceBundle m_messageResource
This stores the resource for the used localization.

Constructor Detail

MailMessages

public MailMessages(java.util.Locale a_localeToUse)
Creates a new MailMessages instance.

Parameters:
a_localeToUse - The localization to use when obtaining strings via the new instance. If there is no resource for the specified localization, the default one is used.
Method Detail

getString

public java.lang.String getString(java.lang.String a_key)
Returns the localized version of the message assigned to the specified key in the resource files.

Parameters:
a_key - A key, which specifies the wanted message.
Returns:
The localized version of the specified message. If we can't find a localized version of the message, the default localization is returned. If that also fails, the key itself is returned.