public class Messages
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_MESSAGE_BUNDLE_KEY |
| Constructor and Description |
|---|
Messages() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addMessageBundle(java.lang.String messageBundleKey,
MessageBundle messageBundle)
To add a new Message Bundle to the MessageBundle list.
|
static java.lang.String |
getMessage(java.lang.String key)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessage(java.lang.String key,
java.lang.String arg0)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessage(java.lang.String key,
java.lang.String[] args)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessage(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessage(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessage(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessage(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4)
Get a message from resource.properties from the package of the given object.
|
static MessageBundle |
getMessageBundle() |
static MessageBundle |
getMessageBundle(java.lang.String messageBundleKey) |
static java.lang.String |
getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0,
java.lang.String arg1)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
Get a message from resource.properties from the package of the given object.
|
static java.lang.String |
getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4)
Get a message from resource.properties from the package of the given object.
|
static java.util.ResourceBundle |
getResourceBundle() |
public static final java.lang.String DEFAULT_MESSAGE_BUNDLE_KEY
public static void addMessageBundle(java.lang.String messageBundleKey,
MessageBundle messageBundle)
messageBundleKey - The key which will be used to refer to this message bundle later.messageBundle - The message bundle.public static java.lang.String getMessage(java.lang.String key)
throws java.util.MissingResourceException
key - The resource keyjava.util.MissingResourceExceptionpublic static java.lang.String getMessage(java.lang.String key,
java.lang.String arg0)
throws java.util.MissingResourceException
key - The resource keyarg0 - The argument to place in variable {0}java.util.MissingResourceExceptionpublic static java.lang.String getMessage(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1)
throws java.util.MissingResourceException
key - The resource keyarg0 - The argument to place in variable {0}arg1 - The argument to place in variable {1}java.util.MissingResourceExceptionpublic static java.lang.String getMessage(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
throws java.util.MissingResourceException
key - The resource keyarg0 - The argument to place in variable {0}arg1 - The argument to place in variable {1}arg2 - The argument to place in variable {2}java.util.MissingResourceExceptionpublic static java.lang.String getMessage(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
throws java.util.MissingResourceException
key - The resource keyarg0 - The argument to place in variable {0}arg1 - The argument to place in variable {1}arg2 - The argument to place in variable {2}arg3 - The argument to place in variable {3}java.util.MissingResourceExceptionpublic static java.lang.String getMessage(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4)
throws java.util.MissingResourceException
key - The resource keyarg0 - The argument to place in variable {0}arg1 - The argument to place in variable {1}arg2 - The argument to place in variable {2}arg3 - The argument to place in variable {3}arg4 - The argument to place in variable {4}java.util.MissingResourceExceptionpublic static java.lang.String getMessage(java.lang.String key,
java.lang.String[] args)
throws java.util.MissingResourceException
key - The resource keyargs - An array of objects to place in corresponding variablesjava.util.MissingResourceExceptionpublic static java.util.ResourceBundle getResourceBundle()
public static MessageBundle getMessageBundle()
public static MessageBundle getMessageBundle(java.lang.String messageBundleKey)
public static java.lang.String getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key)
throws java.util.MissingResourceException,
java.lang.Exception
messageBundleKey - The key for getting the correct message bundle.key - The resource keyjava.util.MissingResourceExceptionjava.lang.Exceptionpublic static java.lang.String getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0)
throws java.util.MissingResourceException,
java.lang.Exception
messageBundleKey - The key for getting the correct message bundle.key - The resource keyarg0 - The argument to place in variable {0}java.util.MissingResourceExceptionjava.lang.Exceptionpublic static java.lang.String getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0,
java.lang.String arg1)
throws java.util.MissingResourceException,
java.lang.Exception
messageBundleKey - The key for getting the correct message bundle.key - The resource keyarg0 - The argument to place in variable {0}arg1 - The argument to place in variable {1}java.util.MissingResourceExceptionjava.lang.Exceptionpublic static java.lang.String getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
throws java.util.MissingResourceException,
java.lang.Exception
messageBundleKey - The key for getting the correct message bundle.key - The resource keyarg0 - The argument to place in variable {0}arg1 - The argument to place in variable {1}arg2 - The argument to place in variable {2}java.util.MissingResourceExceptionjava.lang.Exceptionpublic static java.lang.String getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3)
throws java.util.MissingResourceException,
java.lang.Exception
messageBundleKey - The key for getting the correct message bundle.key - The resource keyarg0 - The argument to place in variable {0}arg1 - The argument to place in variable {1}arg2 - The argument to place in variable {2}arg3 - The argument to place in variable {3}java.util.MissingResourceExceptionjava.lang.Exceptionpublic static java.lang.String getMessageFromBundle(java.lang.String messageBundleKey,
java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3,
java.lang.String arg4)
throws java.util.MissingResourceException,
java.lang.Exception
messageBundleKey - The key for getting the correct message bundle.key - The resource keyarg0 - The argument to place in variable {0}arg1 - The argument to place in variable {1}arg2 - The argument to place in variable {2}arg3 - The argument to place in variable {3}arg4 - The argument to place in variable {4}java.util.MissingResourceExceptionjava.lang.ExceptionCopyright © 2004-2021 The Apache Software Foundation. All Rights Reserved.