|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.common.CommonGlobalProvider
public class CommonGlobalProvider
This class is meant to provide the common resource bundle with a localized format based on the end users needs.
Field Summary | |
---|---|
static String |
COMMON_RESOURCES
Location of common resource package |
Constructor Summary | |
---|---|
CommonGlobalProvider()
|
Method Summary | |
---|---|
static String |
format(ResourceBundle resourceBundle,
String messageKey,
Object[] args)
Format a string from a resource bundle key with arguments |
static ResourceBundle |
getResourceBundle(String clazz)
Get resource bundle based on class input |
static ResourceBundle |
getResourceBundle(String clazz,
ClassLoader loader)
Get resource bundle based on class and loader types. |
static String |
localize(String resBundle,
String messageKey,
Object[] args,
ClassLoader loader)
Localize the bundle using arguments and specific loaders |
static String |
localizeTemplate(String template,
Locale locale,
ClassLoader loader,
String defaultBundleName)
Replaces tokens in a template with resolved resource-bundle strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COMMON_RESOURCES
Constructor Detail |
---|
public CommonGlobalProvider()
Method Detail |
---|
public static String localize(String resBundle, String messageKey, Object[] args, ClassLoader loader)
resBundle
- resource bundlemessageKey
- the message keyargs
- object array of argumentsloader
- class loader
public static ResourceBundle getResourceBundle(String clazz, ClassLoader loader)
clazz
- loader
-
public static ResourceBundle getResourceBundle(String clazz)
clazz
-
public static String format(ResourceBundle resourceBundle, String messageKey, Object[] args)
resourceBundle
- the resource bundle containing the stringmessageKey
- the key in the resource bundleargs
- the arguments to used to format the resource string
public static String localizeTemplate(String template, Locale locale, ClassLoader loader, String defaultBundleName)
template
- Template containing tokens to localize.locale
- Locale with which to localize.loader
- Class loader to use to load resource bundles.defaultBundleName
- Bundle to use if token doesn't specify bundle.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |