|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.exceptions.i18n.message.LocalizedInfo
public class LocalizedInfo
Controls the localized information for a throwable.
Field Summary | |
---|---|
static String |
BUNDLE_NAME_SUFFIX The suffix for the auto generated bundle name. |
protected String |
bundleBaseName The fully qualified base name of the bundle to use. |
protected String |
resourceKey The localization key to fetch messages from message bundles. |
Constructor Summary | |
---|---|
LocalizedInfo(Code code, String bundleBaseName, String resourceKey) Default constructor. |
Method Summary | |
---|---|
String |
getBundleBaseName() Returns the fully qualified base name of the bundle to use. |
String |
getLocalizedMessage(Throwable throwable, Locale locale, ClassLoader loader) Returns the localized message for the given locale. |
String |
getLocalizedMessage(Throwable throwable, String keyPrefix, Locale locale, MessageType messageType, ClassLoader loader) Returns the localized message for the given locale. |
String |
getLocalizedSingleLineMessage(Throwable throwable, Locale locale, ClassLoader loader, boolean standard) Returns the localized message for the given locale. |
String |
getLocalizedTextMessage(Throwable throwable, Locale locale, ClassLoader loader) Returns the structured and localized message for the given locale, returning each part of information that is provided. |
String |
getResourceKey() Returns the localization key to fetch messages from message bundles. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String BUNDLE_NAME_SUFFIX
The value of this constant is "Bundle".
"Bundle"
protected final String resourceKey
String
representation of the provided code instance is used.
protected final String bundleBaseName
This bundle base name must never be null
.
Constructor Detail |
---|
public LocalizedInfo(Code code, String bundleBaseName, String resourceKey)
code
- the error or exception code of the exception.
bundleBaseName
- the fully qualified name of the bundle to use.
resourceKey
- the localization key to fetch messages from message bundles.
Method Detail |
---|
public String getResourceKey()
String
representation of the code instance is used.
public String getBundleBaseName()
public String getLocalizedMessage(Throwable throwable, Locale locale, ClassLoader loader)
throwable
- the throwable to construct the localized message.
locale
- the locale for which the message is requested.
loader
- the loader to read the message bundle.
public String getLocalizedSingleLineMessage(Throwable throwable, Locale locale, ClassLoader loader, boolean standard)
throwable
- the throwable to construct the localized message.
locale
- the locale for which the message is requested.
loader
- the loader to read the message bundle.
public String getLocalizedTextMessage(Throwable throwable, Locale locale, ClassLoader loader)
throwable
- the throwable to construct the localized message.
locale
- the locale for which the message is requested.
loader
- the loader to read the message bundle.
public String getLocalizedMessage(Throwable throwable, String keyPrefix, Locale locale, MessageType messageType, ClassLoader loader)
throwable
- the throwable to construct the localized message.
keyPrefix
- the prefix of the key to load from the bundle.
locale
- the locale for which the message is requested.
messageType
- the type of message to localize.
loader
- the loader to read the message bundle.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |