Package org.apache.axis2.jaxws.i18n
Class Messages
- java.lang.Object
-
- org.apache.axis2.jaxws.i18n.Messages
-
public class Messages extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_MESSAGE_BUNDLE_KEY
-
Constructor Summary
Constructors Constructor Description Messages()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addMessageBundle(String messageBundleKey, MessageBundle messageBundle)
To add a new Message Bundle to the MessageBundle list.static String
getMessage(String key)
Get a message from resource.properties from the package of the given object.static String
getMessage(String key, String arg0)
Get a message from resource.properties from the package of the given object.static String
getMessage(String key, String[] args)
Get a message from resource.properties from the package of the given object.static String
getMessage(String key, String arg0, String arg1)
Get a message from resource.properties from the package of the given object.static String
getMessage(String key, String arg0, String arg1, String arg2)
Get a message from resource.properties from the package of the given object.static String
getMessage(String key, String arg0, String arg1, String arg2, String arg3)
Get a message from resource.properties from the package of the given object.static String
getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4)
Get a message from resource.properties from the package of the given object.static MessageBundle
getMessageBundle()
static MessageBundle
getMessageBundle(String messageBundleKey)
static String
getMessageFromBundle(String messageBundleKey, String key)
Get a message from resource.properties from the package of the given object.static String
getMessageFromBundle(String messageBundleKey, String key, String arg0)
Get a message from resource.properties from the package of the given object.static String
getMessageFromBundle(String messageBundleKey, String key, String arg0, String arg1)
Get a message from resource.properties from the package of the given object.static String
getMessageFromBundle(String messageBundleKey, String key, String arg0, String arg1, String arg2)
Get a message from resource.properties from the package of the given object.static String
getMessageFromBundle(String messageBundleKey, String key, String arg0, String arg1, String arg2, String arg3)
Get a message from resource.properties from the package of the given object.static String
getMessageFromBundle(String messageBundleKey, String key, String arg0, String arg1, String arg2, String arg3, String arg4)
Get a message from resource.properties from the package of the given object.static ResourceBundle
getResourceBundle()
-
-
-
Field Detail
-
DEFAULT_MESSAGE_BUNDLE_KEY
public static final String DEFAULT_MESSAGE_BUNDLE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
addMessageBundle
public static void addMessageBundle(String messageBundleKey, MessageBundle messageBundle)
To add a new Message Bundle to the MessageBundle list.- Parameters:
messageBundleKey
- The key which will be used to refer to this message bundle later.messageBundle
- The message bundle.
-
getMessage
public static String getMessage(String key) throws MissingResourceException
Get a message from resource.properties from the package of the given object.- Parameters:
key
- The resource key- Returns:
- The formatted message
- Throws:
MissingResourceException
-
getMessage
public static String getMessage(String key, String arg0) throws MissingResourceException
Get a message from resource.properties from the package of the given object.- Parameters:
key
- The resource keyarg0
- The argument to place in variable {0}- Returns:
- The formatted message
- Throws:
MissingResourceException
-
getMessage
public static String getMessage(String key, String arg0, String arg1) throws MissingResourceException
Get a message from resource.properties from the package of the given object.- Parameters:
key
- The resource keyarg0
- The argument to place in variable {0}arg1
- The argument to place in variable {1}- Returns:
- The formatted message
- Throws:
MissingResourceException
-
getMessage
public static String getMessage(String key, String arg0, String arg1, String arg2) throws MissingResourceException
Get a message from resource.properties from the package of the given object.- Parameters:
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}- Returns:
- The formatted message
- Throws:
MissingResourceException
-
getMessage
public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3) throws MissingResourceException
Get a message from resource.properties from the package of the given object.- Parameters:
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}- Returns:
- The formatted message
- Throws:
MissingResourceException
-
getMessage
public static String getMessage(String key, String arg0, String arg1, String arg2, String arg3, String arg4) throws MissingResourceException
Get a message from resource.properties from the package of the given object.- Parameters:
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}- Returns:
- The formatted message
- Throws:
MissingResourceException
-
getMessage
public static String getMessage(String key, String[] args) throws MissingResourceException
Get a message from resource.properties from the package of the given object.- Parameters:
key
- The resource keyargs
- An array of objects to place in corresponding variables- Returns:
- The formatted message
- Throws:
MissingResourceException
-
getResourceBundle
public static ResourceBundle getResourceBundle()
-
getMessageBundle
public static MessageBundle getMessageBundle()
-
getMessageBundle
public static MessageBundle getMessageBundle(String messageBundleKey)
-
getMessageFromBundle
public static String getMessageFromBundle(String messageBundleKey, String key) throws MissingResourceException, Exception
Get a message from resource.properties from the package of the given object.- Parameters:
messageBundleKey
- The key for getting the correct message bundle.key
- The resource key- Returns:
- The formatted message
- Throws:
MissingResourceException
Exception
-
getMessageFromBundle
public static String getMessageFromBundle(String messageBundleKey, String key, String arg0) throws MissingResourceException, Exception
Get a message from resource.properties from the package of the given object.- Parameters:
messageBundleKey
- The key for getting the correct message bundle.key
- The resource keyarg0
- The argument to place in variable {0}- Returns:
- The formatted message
- Throws:
MissingResourceException
Exception
-
getMessageFromBundle
public static String getMessageFromBundle(String messageBundleKey, String key, String arg0, String arg1) throws MissingResourceException, Exception
Get a message from resource.properties from the package of the given object.- Parameters:
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}- Returns:
- The formatted message
- Throws:
MissingResourceException
Exception
-
getMessageFromBundle
public static String getMessageFromBundle(String messageBundleKey, String key, String arg0, String arg1, String arg2) throws MissingResourceException, Exception
Get a message from resource.properties from the package of the given object.- Parameters:
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}- Returns:
- The formatted message
- Throws:
MissingResourceException
Exception
-
getMessageFromBundle
public static String getMessageFromBundle(String messageBundleKey, String key, String arg0, String arg1, String arg2, String arg3) throws MissingResourceException, Exception
Get a message from resource.properties from the package of the given object.- Parameters:
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}- Returns:
- The formatted message
- Throws:
MissingResourceException
Exception
-
getMessageFromBundle
public static String getMessageFromBundle(String messageBundleKey, String key, String arg0, String arg1, String arg2, String arg3, String arg4) throws MissingResourceException, Exception
Get a message from resource.properties from the package of the given object.- Parameters:
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}- Returns:
- The formatted message
- Throws:
MissingResourceException
Exception
-
-