Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-01


oracle.stellent.wcm.common.locale
Class LocaleMessage

java.lang.Object
  extended by oracle.stellent.wcm.common.locale.LocaleMessage


public class LocaleMessage
extends java.lang.Object

Message object that holds the key and parameters for delayed locale message resolution.


Constructor Summary
LocaleMessage(java.lang.String bundle, java.lang.String key)
          Constructor
LocaleMessage(java.lang.String bundle, java.lang.String key, java.lang.Object[] parameters)
          Constructor

 

Method Summary
 java.lang.String getKey()
           
 char getMnemonicCharacter()
          Returns the mnemonic character.
 int getMnemonicCharacterIndex()
          Deprecated. Caution, this can cause exceptions if used in conjunction with getWithoutMnemonic() and Japanese!
 java.lang.Object[] getParameters()
           
 java.lang.String getText()
          Returns the text associated with this message, stripping the 'non-printing' Mnemonic character (the '&'), but leaving the rest of the text.
 java.lang.String getText(java.util.Locale locale)
          Returns the text associated with this message, stripping the 'non-printing' Mnemonic character (the '&'), but leaving the rest of the text.
 java.lang.String getWithoutMnemonic()
          SPECIAL USE ONLY, Use getText() instead.
 void setKey(java.lang.String key)
           
 void setParameters(java.lang.Object[] parameters)
           
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

LocaleMessage

public LocaleMessage(java.lang.String bundle,
                     java.lang.String key,
                     java.lang.Object[] parameters)
Constructor
Parameters:
key - the message key
parameters - the parameters

LocaleMessage

public LocaleMessage(java.lang.String bundle,
                     java.lang.String key)
Constructor
Parameters:
key - the message key

Method Detail

getKey

public java.lang.String getKey()
Returns:
the key

setKey

public void setKey(java.lang.String key)
Parameters:
key - the key to set

getParameters

public java.lang.Object[] getParameters()
Returns:
the parameters

setParameters

public void setParameters(java.lang.Object[] parameters)
Parameters:
parameters - the parameters to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getText

public java.lang.String getText()
Returns the text associated with this message, stripping the 'non-printing' Mnemonic character (the '&'), but leaving the rest of the text. This is the primary method of getting the text for a menu, label, button, etc. This will leave the (V) on the end of Japanese text indicating that the letter V is the mnemonic.
Returns:
The text of the message as a String, with the non-printing mnemonic stripped, but otherwise the message intact.

getText

public java.lang.String getText(java.util.Locale locale)
Returns the text associated with this message, stripping the 'non-printing' Mnemonic character (the '&'), but leaving the rest of the text. This is the primary method of getting the text for a menu, label, button, etc. This will leave the (V) on the end of Japanese text indicating that the letter V is the mnemonic.
Parameters:
locale - the locale to use rather that the default locale
Returns:
The text of the message as a String, with the non-printing mnemonic stripped, but otherwise the message intact.

getWithoutMnemonic

public java.lang.String getWithoutMnemonic()
SPECIAL USE ONLY, Use getText() instead. Returns the text of associated with this message without the mnemonic character. This will strip the '&' but will also strip the (V) mnemonic hint in Japanese strings. This is only useful if you are printing out to a log or some other place where you can't use the mnemonics to access the button because it is pure text.
Returns:
string containing message without mnemonic character.

getMnemonicCharacter

public char getMnemonicCharacter()
Returns the mnemonic character.
Returns:
the mnemonic character.

getMnemonicCharacterIndex

public int getMnemonicCharacterIndex()
Deprecated. Caution, this can cause exceptions if used in conjunction with getWithoutMnemonic() and Japanese!
Returns the index of the mnemonic character.
Returns:
the mnemonic character's index.

Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-01


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.