Class UserMessageRef

java.lang.Object
com.onwbp.base.text.UserMessage
com.onwbp.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:
  • Constructor Details

  • Method Details

    • getInternalId

      public final String getInternalId()
      Description copied from class: UserMessage
      Returns a specific identifier for logging and technical auditing. Returns null if this message has no identifier (this is the case for a UserMessageString).
      Specified by:
      getInternalId in class UserMessage
    • getBundleBaseName

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

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

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

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object