org.tigris.scarab.tools.localization
Class L10NKey

java.lang.Object
  extended byorg.tigris.scarab.tools.localization.L10NKey
All Implemented Interfaces:
Localizable, LocalizationKey

public final class L10NKey
extends java.lang.Object
implements LocalizationKey, Localizable

Default implementation of a Localization Key.

Acts as a simple wrapper around the real key. Instances are immutable.

Author:
Hussayn Dabbous

Constructor Summary
L10NKey(java.lang.String theKey)
          Constructs a L10NKey instance using the specified key.
 
Method Summary
 java.lang.String getMessage()
          resolve the instance to the ScarabLocalizationTool.DEFAULT_LOCALE Note: This method should return english messages independent of any l10n settings.
 java.lang.String getMessage(ScarabLocalizationTool l10n)
          resolve the message according to the parameters of the given ScarabLocalizationTool instance.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

L10NKey

public L10NKey(java.lang.String theKey)
Constructs a L10NKey instance using the specified key. Only used internaly from ScarabLocalizationTool.

Parameters:
theKey - the final String representation of the key
Method Detail

toString

public java.lang.String toString()
Specified by:
toString in interface LocalizationKey
Returns:
the String representation of the key. Only used from L10NKeySet to construct keys.

getMessage

public java.lang.String getMessage()
Description copied from interface: Localizable
resolve the instance to the ScarabLocalizationTool.DEFAULT_LOCALE Note: This method should return english messages independent of any l10n settings. If a ScarabLocalizationTool instance is available, it is preferreable to use resolve(ScarabLocalizationTool) instead.

Specified by:
getMessage in interface Localizable
Returns:
the resolved String

getMessage

public java.lang.String getMessage(ScarabLocalizationTool l10n)
Description copied from interface: Localizable
resolve the message according to the parameters of the given ScarabLocalizationTool instance. It may contain L10NMessage instances and Exceptions. The parameters should be resolved recursively if necessary.

Specified by:
getMessage in interface Localizable
Returns:


Copyright © 2000-2004 Tigris.org. All Rights Reserved.