Class 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
    • Method Detail

      • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object