com.softwareag.mdm.base.text
Class UserMessageRef

java.lang.Object
  extended bycom.softwareag.mdm.base.text.UserMessage
      extended bycom.softwareag.mdm.base.text.UserMessageRef

public class UserMessageRef
extends UserMessage

Holds a user message that is persisted in a Java "resource bundle".

The raw text is looked up by calling:

 ResourceBundle resources;
 if (this.classLoader == null)
   resources = ResourceBundle.getBundle(this.bundleBaseName, aLocale);
 else
   resources = ResourceBundle.getBundle(this.bundleBaseName, aLocale, this.classLoader);
 return resources.getString(this.messageKey);
 

See Also:
ResourceBundle, MessageFormat

Constructor Summary
UserMessageRef(Severity severity, String aMessageKey, String bundleBaseName, Object[] params)
           
UserMessageRef(Severity severity, String aMessageKey, String bundleBaseName, Object[] params, ClassLoader bundleClassLoader)
           
UserMessageRef(String aMessageKey, Throwable aThrowable, String bundleBaseName, Object[] params)
           
UserMessageRef(String aMessageKey, Throwable aThrowable, String bundleBaseName, Object[] params, ClassLoader bundleClassLoader)
           
 
Method Summary
 String getBundleBaseName()
          Returns the qualified name of the bundle.
 ClassLoader getClassLoader()
          Returns the class loader used for finding the bundle, if specified.
 String getInternalId()
          Returns a specific identifier for logging and technical audit.
 String getMessageKey()
          Returns the identifier of the message in the bundle.
 String toString()
           
 
Methods inherited from class com.softwareag.mdm.base.text.UserMessage
createError, createError, createInfo, createWarning, formatMessage, getSeverity, getThrowable, isError, isFatal, isInfo, isWarning, setSeverity
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserMessageRef

public UserMessageRef(String aMessageKey,
                      Throwable aThrowable,
                      String bundleBaseName,
                      Object[] params,
                      ClassLoader bundleClassLoader)

UserMessageRef

public UserMessageRef(String aMessageKey,
                      Throwable aThrowable,
                      String bundleBaseName,
                      Object[] params)

UserMessageRef

public UserMessageRef(Severity severity,
                      String aMessageKey,
                      String bundleBaseName,
                      Object[] params,
                      ClassLoader bundleClassLoader)

UserMessageRef

public UserMessageRef(Severity severity,
                      String aMessageKey,
                      String bundleBaseName,
                      Object[] params)
Method Detail

toString

public String toString()

getInternalId

public String getInternalId()
Description copied from class: UserMessage
Returns a specific identifier for logging and technical audit. Returns null if this message has no identifier (this is the case for a UserMessageString).

Specified by:
getInternalId in class UserMessage

getBundleBaseName

public String getBundleBaseName()
Returns the qualified name of the bundle.


getClassLoader

public ClassLoader getClassLoader()
Returns the class loader used for finding the bundle, if specified.


getMessageKey

public String getMessageKey()
Returns the identifier of the message in the bundle.



(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.