Package com.onwbp.base.text
Class UserMessageRef
java.lang.Object
com.onwbp.base.text.UserMessage
com.onwbp.base.text.UserMessageRef
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 Summary
ConstructorDescriptionUserMessageRef
(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
Modifier and TypeMethodDescriptionboolean
final String
Returns the qualified name of the bundle.final ClassLoader
Returns the class loader used for finding the bundle, if specified.final String
Returns a specific identifier for logging and technical auditing.final String
Returns the identifier of the message in the bundle.int
hashCode()
toString()
Methods inherited from class com.onwbp.base.text.UserMessage
createError, createError, createFatal, createFatal, createInfo, createWarning, formatMessage, getSeverity, getThrowable, isError, isFatal, isInfo, isWarning, setSeverity, setSeverity
-
Constructor Details
-
UserMessageRef
public UserMessageRef(String aMessageKey, Throwable aThrowable, String bundleBaseName, Object[] params, ClassLoader bundleClassLoader) -
UserMessageRef
-
UserMessageRef
public UserMessageRef(Severity severity, String aMessageKey, String bundleBaseName, Object[] params, ClassLoader bundleClassLoader) -
UserMessageRef
-
-
Method Details
-
getInternalId
Description copied from class:UserMessage
Returns a specific identifier for logging and technical auditing. Returnsnull
if this message has no identifier (this is the case for aUserMessageString
).- Specified by:
getInternalId
in classUserMessage
-
getBundleBaseName
Returns the qualified name of the bundle. -
getClassLoader
Returns the class loader used for finding the bundle, if specified. -
getMessageKey
Returns the identifier of the message in the bundle. -
toString
-
equals
-
hashCode
public int hashCode()
-