|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sap.mdm.logging.MessageResolver
The class is used to get translated semantic messages for logging. The language of the translated message can be specified by locale parameter, if no locale specified the current value of the default locale of the JVM is used. There is option to specify user defined resource bundle for a messages. If no resource bundle specified the API default resource bundle is used.
| Method Summary | |
static Locale |
getCurrentLocale()
Returns the current value of locale |
static String |
getExceptionMessage(String key)
Returns translated message. |
static String |
getExceptionMessage(String key,
Locale locale)
Returns translated message. |
static String |
getExceptionMessage(String key,
Object param)
Returns translated message formatted using the given parameter. |
static String |
getExceptionMessage(String key,
Object[] params)
Returns translated message formatted using the given parameter. |
static String |
getExceptionMessage(String key,
Object[] params,
Locale locale)
Returns translated message formatted using the given parameter. |
static String |
getExceptionMessage(String key,
Object param,
Locale locale)
Returns translated message formatted using the given parameter. |
static String |
getLogMessage(String key)
Returns translated message. |
static String |
getLogMessage(String key,
Locale locale)
Returns translated message. |
static String |
getLogMessage(String key,
Object param)
Returns translated message formatted using the given parameter. |
static String |
getLogMessage(String key,
Object[] params)
Returns translated message formatted using the given parameter. |
static String |
getLogMessage(String key,
Object[] params,
Locale locale)
Returns translated message formatted using the given parameter. |
static String |
getLogMessage(String key,
Object param,
Locale locale)
Returns translated message formatted using the given parameter. |
static String |
getMessage(String key,
Locale locale,
String resourceBundleBaseName)
Returns the translated and formatted message. |
static String |
getMessage(String key,
Object[] params,
Locale locale,
String resourceBundleBaseName)
Returns the translated and formatted message. |
static String |
getMessage(String key,
Object[] params,
String resourceBundleBaseName)
Returns the translated and formatted message. |
static String |
getMessage(String key,
Object param,
Locale locale,
String resourceBundleBaseName)
Returns the translated and formatted message. |
static String |
getMessage(String key,
Object param,
String resourceBundleBaseName)
Returns the translated and formatted message. |
static String |
getMessage(String key,
String resourceBundleBaseName)
Returns the translated and formatted message. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static String getLogMessage(String key)
The message is taken from the default log resource bundle. The message is translated into the language specified by the current value of the JVM locale.
key - key of the message in the resource bundle
public static String getLogMessage(String key,
Locale locale)
The message is taken from the default log resource bundle. The message is translated into the language specified by locale parameter.
key - key of the message in resource bundlelocale - locale specifies the desired language of the translation for the message.
if null uses the current value from the JVM
public static String getLogMessage(String key,
Object param)
The message is taken from the default log resource bundle. The message is translated into the language specified by the current value of the JVM locale.
key - key of the message in resource bundleparam - object used to format the message
public static String getLogMessage(String key,
Object param,
Locale locale)
The message is taken from the default log resource bundle. The message is translated into the language specified by locale parameter.
key - key of the message in resource bundleparam - object used to format the messagelocale - locale specifies the desired language of the translation for the message.
if null uses the current value of the locale for the JVM.
public static String getLogMessage(String key,
Object[] params)
The message is taken from the default resource bundle. The message is translated into the language specified by the current value of the JVM locale.
key - key of the message in resource bundleparams - array of objects used to format the message
public static String getLogMessage(String key,
Object[] params,
Locale locale)
The message is taken from the default resource bundle. The message is translated into the language specified by locale parameter.
key - key of the message in resource bundleparams - array of objects used to format the messagelocale - locale specifies the desired language of the translation for the message.
if null uses the current value of the locale for the JVM.
public static String getExceptionMessage(String key)
The message is taken from the default resource bundle. The message is translated into the language specified by the current value of the JVM locale.
key - key of the message in the resource bundle
public static String getExceptionMessage(String key,
Locale locale)
The message is taken from the default resource bundle. The message is translated into the language specified by locale parameter.
key - key of the message in resource bundlelocale - locale specifies the desired language of the translation for the message.
if null uses the current value of the locale for the JVM
public static String getExceptionMessage(String key,
Object param)
The message is taken from the default resource bundle. The message is translated into the language specified by the current value of default locale.
key - key of the message in resource bundleparam - object used to format the message
public static String getExceptionMessage(String key,
Object param,
Locale locale)
The message is taken from the default resource bundle. The message is translated into the language specified by locale parameter.
key - key of the message in resource bundleparam - object used to format the messagelocale - locale specifies the desired language of the translation for the message.
if null uses the current value of the locale for the JVM.
public static String getExceptionMessage(String key,
Object[] params)
The message is taken from the default resource bundle. The message is translated into the language specified by the current value of the JVM locale.
key - key of the message in resource bundleparams - array of objects used to format the message
public static String getExceptionMessage(String key,
Object[] params,
Locale locale)
The message is taken from the default resource bundle. The message is translated into the language specified by locale parameter.
key - key of the message in resource bundleparams - array of objects used to format the messagelocale - locale specifies the desired language of the translation for the message.
if null uses the current value of the JVM locale.
public static String getMessage(String key,
String resourceBundleBaseName)
The message is taken from the resource bundle specified by user. The message is translated into the language specified by the current value of the JVM locale.
key - the key of the message in resource bundleresourceBundleBaseName - the base name of the resource bundle, a fully qualified class name.
If null uses the default name 'MessagesBundle'
IllegalArgumentException - if message cannot be formatted
public static String getMessage(String key,
Locale locale,
String resourceBundleBaseName)
The message is taken from the resource bundle specified by user. The message is translated into the language specified by locale parameter.
key - the key of the message in resource bundlelocale - specifies the desired language of the translation for the message.
If null uses the current value of the locale for the JVM.resourceBundleBaseName - the base name of the resource bundle, a fully qualified class name.
If null uses the default name 'MessagesBundle'
IllegalArgumentException - if message cannot be formatted
public static String getMessage(String key,
Object param,
String resourceBundleBaseName)
The message is taken from the resource bundle specified by user. The message is translated into the language specified by the current value of the JVM locale. The message is formatted using the specified parameter.
key - the key of the message in resource bundleparam - the parameter used for formatting the messageresourceBundleBaseName - the base name of the resource bundle, a fully qualified class name.
If null uses the default name 'MessagesBundle'
IllegalArgumentException - if message cannot be formatted
public static String getMessage(String key,
Object param,
Locale locale,
String resourceBundleBaseName)
The message is taken from the resource bundle specified by user. The message is translated into the language specified by locale parameter. The message is formatted using the specified parameter.
key - the key of the message in resource bundleparam - the parameter used for formatting the messagelocale - specifies the desired language of the translation for the message.
If null uses the current value of the locale for the JVM.resourceBundleBaseName - the base name of the resource bundle, a fully qualified class name.
If null uses the default name 'MessagesBundle'
IllegalArgumentException - if message cannot be formatted
public static String getMessage(String key,
Object[] params,
String resourceBundleBaseName)
The message is taken from the resource bundle specified by user. The message is translated into the language specified by the current value of the JVM locale. The message is formatted using the specified parameters.
key - the key of the message in resource bundleparams - an array of parameter objects used for formatting the messageresourceBundleBaseName - the base name of the resource bundle, a fully qualified class name.
If null uses the default name 'MessagesBundle'
IllegalArgumentException - if message cannot be formatted
public static String getMessage(String key,
Object[] params,
Locale locale,
String resourceBundleBaseName)
The message is taken from the resource bundle specified by user. The message is translated into the language specified by locale parameter. The message is formatted using the specified parameters.
key - the key of the message in resource bundleparams - an array of parameter objects used for formatting the messagelocale - specifies the desired language of the translation for the message.
If null uses the current value of the locale for the JVM.resourceBundleBaseName - the base name of the resource bundle, a fully qualified class name.
If null uses the default name 'MessagesBundle'
IllegalArgumentException - if message cannot be formattedpublic static Locale getCurrentLocale()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright 2004-2007 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.