org.apache.commons.i18n.bundles
Class ErrorBundle
java.lang.Object
org.apache.commons.i18n.LocalizedBundle
org.apache.commons.i18n.bundles.TextBundle
org.apache.commons.i18n.bundles.MessageBundle
org.apache.commons.i18n.bundles.ErrorBundle
- All Implemented Interfaces:
- java.io.Serializable
public class ErrorBundle
- extends MessageBundle
The ErrorBundle
bundles together title, text, details and summary.
This bundle can be used to describe an error in detail and is used in the provided localized
exceptions.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
DETAILS
|
static java.lang.String |
SUMMARY
|
Fields inherited from class org.apache.commons.i18n.bundles.TextBundle |
TEXT |
Constructor Summary |
ErrorBundle(java.lang.String messageId)
|
ErrorBundle(java.lang.String messageId,
java.lang.Object[] arguments)
|
ErrorBundle(java.lang.String providerId,
java.lang.String messageId)
|
ErrorBundle(java.lang.String providerId,
java.lang.String messageId,
java.lang.Object[] arguments)
|
Method Summary |
java.lang.String |
getDetails(java.util.Locale locale)
|
java.lang.String |
getDetails(java.util.Locale locale,
java.lang.String defaultDetails)
|
java.lang.String |
getSummary(java.util.Locale locale)
|
java.lang.String |
getSummary(java.util.Locale locale,
java.lang.String defaultSummary)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SUMMARY
public static final java.lang.String SUMMARY
- See Also:
- Constant Field Values
DETAILS
public static final java.lang.String DETAILS
- See Also:
- Constant Field Values
ErrorBundle
public ErrorBundle(java.lang.String messageId)
- Parameters:
messageId
- Unique message id that identifies the message
ErrorBundle
public ErrorBundle(java.lang.String providerId,
java.lang.String messageId)
- Parameters:
providerId
- The name of the message provider (i.e. source) to use for the messagemessageId
- Unique message id that identifies the message
ErrorBundle
public ErrorBundle(java.lang.String messageId,
java.lang.Object[] arguments)
- Parameters:
messageId
- Unique message id that identifies the messagearguments
- An array of objects conaining the values that should be
inserted into the localized message.
ErrorBundle
public ErrorBundle(java.lang.String providerId,
java.lang.String messageId,
java.lang.Object[] arguments)
- Parameters:
providerId
- The name of the message provider (i.e. source) to use for the messagemessageId
- Unique message id that identifies the messagearguments
- An array of objects conaining the values that should be
inserted into the localized message.
getSummary
public java.lang.String getSummary(java.util.Locale locale)
throws MessageNotFoundException
- Parameters:
locale
- The locale that is used to find the appropriate localized text
- Returns:
- returns the localized message entry with the key
summary
- Throws:
MessageNotFoundException
- is thrown if no entry with key summary
could be found in the message bundle identified by the given message identifier
getSummary
public java.lang.String getSummary(java.util.Locale locale,
java.lang.String defaultSummary)
- Parameters:
locale
- The locale that is used to find the appropriate localized textdefaultSummary
- The default text will be returned, if no entry with key summary
could be found in the message bundle identified by the given message identifier
- Returns:
- returns the localized message entry with the key
summary
getDetails
public java.lang.String getDetails(java.util.Locale locale)
throws MessageNotFoundException
- Parameters:
locale
- The locale that is used to find the appropriate localized text
- Returns:
- returns the localized message entry with the key
details
- Throws:
MessageNotFoundException
- is thrown if no entry with key details
could be found in the message bundle identified by the given message identifier
getDetails
public java.lang.String getDetails(java.util.Locale locale,
java.lang.String defaultDetails)
- Parameters:
locale
- The locale that is used to find the appropriate localized textdefaultDetails
- The default text will be returned, if no entry with key details
could be found in the message bundle identified by the given message identifier
- Returns:
- returns the localized message entry with the key
details
Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.