|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mm.beans.CMBResourceCenter
Class provides central control over the translatable resources of CM beans, includes:
messages design time and default runtime messages literals literals to be displayed in build tools, such as property display names and short descriptionsThis class initially loads both literal and message resouce bundles using system locale, and then caches these resource bunldes for future use during the application session. You can call getBundle(String, Locale ) or getBundle(String) to reload the specified resouce dynamically.
Field Summary | |
static java.lang.String |
BASE_LITERAL_BUNDLE
The resource file containing literals displayed in builder tools, including poperty display name, and short description. |
static java.lang.String |
BASE_MESSAGE_BUNDLE
The message resource file containing design time and default runtime messages. |
Constructor Summary | |
CMBResourceCenter()
|
Method Summary | |
static java.util.ResourceBundle |
getBundle(java.lang.String resName)
Get the specified resource bundle, re-loaded it with current locale. |
static java.util.ResourceBundle |
getBundle(java.lang.String resName,
java.util.Locale locale)
Get the specified resource bundle, re-loaded with the specified locale. |
static java.util.ResourceBundle |
getLiteralBundle()
Get the literal resource bundle. |
static java.lang.String |
getLiteralString(java.lang.String key)
Get the literal string from resource bundle |
static java.util.ResourceBundle |
getMessageBundle()
Get the message resource bundle. |
static java.lang.String |
getMessageString(java.lang.String key)
Get the message string from resource bundle |
static java.lang.String |
getMessageString(java.lang.String key,
java.lang.String[] inserts)
Formats a message with inserts. |
static void |
setCurrentLocale(java.util.Locale locale)
Set the application-wide locale. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String BASE_LITERAL_BUNDLE
CMBBaseLiteral.properties - for default locale and English CMBBaseLiteral_it.properties - for Italian CMBBaseLiteral_ja.properties - for Japanese CMBBaseLiteral_zh_CN.properties - for simplified Chinese etc.Application designer can modify these files to provide default values global to all applications.
public static final java.lang.String BASE_MESSAGE_BUNDLE
CMBBaseMessage.properties - for default locale and English CMBBaseMessage_it.properties - for Italian CMBBaseMessage_ja.properties - for Japanese CMBBaseMessage_zh_CN.properties - for simplified Chinese etc.Application designer can modify these files to provide default values global to all applications.
Constructor Detail |
public CMBResourceCenter()
Method Detail |
public static void setCurrentLocale(java.util.Locale locale) throws java.util.MissingResourceException
locale
- the locale to use for the applicationjava.util.MissingResourceException
- resource file not foundpublic static java.util.ResourceBundle getLiteralBundle()
public static java.util.ResourceBundle getMessageBundle()
public static java.util.ResourceBundle getBundle(java.lang.String resName) throws java.util.MissingResourceException
resName
- the resource bundle property file namenull
if file not foundjava.util.MissingResourceException
- resource file not foundpublic static java.util.ResourceBundle getBundle(java.lang.String resName, java.util.Locale locale) throws java.util.MissingResourceException
resName
- the resource bundle property file namelocale
- the locale to load resource bundlepublic static java.lang.String getLiteralString(java.lang.String key)
key
- the resource IDpublic static java.lang.String getMessageString(java.lang.String key)
key
- the resource IDpublic static java.lang.String getMessageString(java.lang.String key, java.lang.String[] inserts)
key
- the resource IDinserts
- the message inserts
|
EIP JavaBeans | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |