BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.apache.xalan.res
Class XSLMessages

java.lang.Object
  |
  +--weblogic.apache.xalan.res.XSLMessages

public class XSLMessages
extends java.lang.Object

Sets things up for issuing error messages. This class is misnamed, and should be called XalanMessages, or some such.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.


Constructor Summary
XSLMessages()
           
 
Method Summary
static java.lang.String createMessage(int errorCode, java.lang.Object[] args)
          Creates a message from the specified key and replacement arguments, localized to the given locale.
 java.lang.String createMessage(java.lang.String bundleName, int errorCode, java.lang.Object[] args)
          Creates a message from the specified key and replacement arguments, localized to the given locale.
static java.lang.String createMsg(XResourceBundleBase fResourceBundle, java.lang.String msgKey, java.lang.Object[] args)
          Creates a message from the specified key and replacement arguments, localized to the given locale.
static java.lang.String createWarning(int errorCode, java.lang.Object[] args)
          Creates a message from the specified key and replacement arguments, localized to the given locale.
static java.lang.String createXPATHMessage(int errorCode, java.lang.Object[] args)
          Creates a message from the specified key and replacement arguments, localized to the given locale.
static java.lang.String createXPATHMsg(XResourceBundleBase fResourceBundle, java.lang.String msgKey, java.lang.Object[] args)
          Creates a message from the specified key and replacement arguments, localized to the given locale.
static java.lang.String createXPATHWarning(int errorCode, java.lang.Object[] args)
          Creates a message from the specified key and replacement arguments, localized to the given locale.
 java.util.Locale getLocale()
          Get the Locale object that is being used.
static java.util.ListResourceBundle loadResourceBundle(java.lang.String className)
          Return a named ResourceBundle for a particular locale.
 void setLocale(java.util.Locale locale)
          Set the Locale object to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLMessages

public XSLMessages()
Method Detail

setLocale

public void setLocale(java.util.Locale locale)
Set the Locale object to use.

Parameters:
locale - non-null reference to Locale object.

getLocale

public java.util.Locale getLocale()
Get the Locale object that is being used.

Returns:
non-null reference to Locale object.

createXPATHWarning

public static final java.lang.String createXPATHWarning(int errorCode,
                                                        java.lang.Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.

Parameters:
errorCode - The key for the message text.
args - The arguments to be used as replacement text in the message created.
Returns:
The formatted warning string.

createXPATHMessage

public static final java.lang.String createXPATHMessage(int errorCode,
                                                        java.lang.Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.

Parameters:
errorCode - The key for the message text.
args - The arguments to be used as replacement text in the message created.
Returns:
The formatted message string.

createXPATHMsg

public static final java.lang.String createXPATHMsg(XResourceBundleBase fResourceBundle,
                                                    java.lang.String msgKey,
                                                    java.lang.Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.

Parameters:
errorCode - The key for the message text.
fResourceBundle - The resource bundle to use.
msgKey - The message key to use.
args - The arguments to be used as replacement text in the message created.
Returns:
The formatted message string.

createWarning

public static final java.lang.String createWarning(int errorCode,
                                                   java.lang.Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.

Parameters:
errorCode - The key for the message text.
args - The arguments to be used as replacement text in the message created.
Returns:
The formatted warning string.

createMessage

public static final java.lang.String createMessage(int errorCode,
                                                   java.lang.Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.

Parameters:
errorCode - The key for the message text.
args - The arguments to be used as replacement text in the message created.
Returns:
The formatted message string.

createMsg

public static final java.lang.String createMsg(XResourceBundleBase fResourceBundle,
                                               java.lang.String msgKey,
                                               java.lang.Object[] args)
Creates a message from the specified key and replacement arguments, localized to the given locale.

Parameters:
errorCode - The key for the message text.
fResourceBundle - The resource bundle to use.
msgKey - The message key to use.
args - The arguments to be used as replacement text in the message created.
Returns:
The formatted message string.

createMessage

public java.lang.String createMessage(java.lang.String bundleName,
                                      int errorCode,
                                      java.lang.Object[] args)
                               throws java.lang.Exception
Creates a message from the specified key and replacement arguments, localized to the given locale.

Parameters:
bundleName - The name of the resource bundle to be used.
errorCode - The key for the message text.
args - The arguments to be used as replacement text in the message created.
Returns:
The formatted message string.
Throws:
java.lang.Exception - if the message can not be loaded.

loadResourceBundle

public static final java.util.ListResourceBundle loadResourceBundle(java.lang.String className)
                                                             throws java.util.MissingResourceException
Return a named ResourceBundle for a particular locale. This method mimics the behavior of ResourceBundle.getBundle().

Parameters:
res - the name of the resource to load.
locale - the locale to prefer when searching for the bundle
className - The class name of the resource bundle.
Returns:
the ResourceBundle
Throws:
java.util.MissingResourceException -  

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

WebLogic classes and methods that do not appear in this reference are not public and are not supported.