BEA Systems, Inc.

WebLogic Server 8.1 API Reference

weblogic.i18ntools
Class GetText

java.lang.Object
  |
  +--weblogic.i18ntools.GetText

public class GetText
extends java.lang.Object

The GetText class provides a standard mechanism for extracting text from WLS log message catalogs. Messages are identified by their message id, and may be qualified by a subsystem name. The basic format of the String objects returned by the GetText methods is the message body of the requested message.

If detailed output is requested the output is of the form:

 nnnnnn: message body
 Subsystem: subsystem name
 Severity: message severity
 Message Detail: detailed message text
 Cause: why problem happened
 Action: what user should do to resolve
 

If verbose output is requested the output is of the form:

 nnnnnn: message body
 L10n Package: package for text properties
 I18n Package: package for formatting class
 Subsystem: subsystem name
 Severity: message severity
 Stack Trace: true|false
 Message Detail: detailed message text
 Cause: why problem happened
 Action: what user should do to resolve
 

If any of the messages is unable to locate the specified message id in the catalogs, the text

 nnnnnn: Message not found!!
 

is returned, where nnnnnn is the relevant message id.

Author:
Copyright © 2004 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
GetText()
           
 
Method Summary
static java.lang.String getDetailedText(java.lang.String id)
          Detailed message text in current locale.
static java.lang.String getDetailedText(java.lang.String id, java.util.Locale l)
          Detailed message text in specified locale.
static java.lang.String getRetiredMessage(java.lang.String id)
          Retired message text: Subsystem:id text
static java.lang.String getRetiredMessage(java.lang.String id, java.lang.String subSystem)
          Retired message text: Subsystem:id text
static java.lang.String getText(java.lang.String id)
          Message body in current locale.
static java.lang.String getText(java.lang.String id, boolean detailed, boolean verbose, java.lang.String subSystem, java.util.Locale l)
          Generalized message text retrieval.
static java.lang.String getText(java.lang.String id, java.util.Locale l)
          Message body in specified locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetText

public GetText()
Method Detail

getText

public static java.lang.String getText(java.lang.String id)
Message body in current locale.

Parameters:
id - is message id

getText

public static java.lang.String getText(java.lang.String id,
                                       java.util.Locale l)
Message body in specified locale.

Parameters:
id - is message id
l - specifies a locale

getDetailedText

public static java.lang.String getDetailedText(java.lang.String id)
Detailed message text in current locale.

Parameters:
id - is message id

getDetailedText

public static java.lang.String getDetailedText(java.lang.String id,
                                               java.util.Locale l)
Detailed message text in specified locale.

Parameters:
id - is message id
l - specifies a locale

getText

public static java.lang.String getText(java.lang.String id,
                                       boolean detailed,
                                       boolean verbose,
                                       java.lang.String subSystem,
                                       java.util.Locale l)
Generalized message text retrieval. Text only returned if message subsystem matches subSystem parameter.

Parameters:
id - is message id
detailed - specifies whether to access detailed text
verbose - specifies whether to access detailed text and other metadat in the catalog
subSystem - specifies subsystem name to match
l - specifies a locale

getRetiredMessage

public static java.lang.String getRetiredMessage(java.lang.String id)
Retired message text: Subsystem:id text

Parameters:
id - is the message id
Returns:
text if message is retired, otherwise returns null (message not retired)

getRetiredMessage

public static java.lang.String getRetiredMessage(java.lang.String id,
                                                 java.lang.String subSystem)
Retired message text: Subsystem:id text

Parameters:
id - is the message id
subSystem - filters on subsystem name
Returns:
text if message is retired and matches subsystem, otherwise returns null (message not retired)

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs81