|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.util.prefs.IlrPropertyManager ilog.rules.util.prefs.IlrMessages
public class IlrMessages
A class to retrieve localized messages.
Method Summary | |
---|---|
static String |
format(String key,
Object arg0)
|
static String |
format(String key,
Object[] args)
|
static String |
format(String key,
Object arg0,
Object arg1)
|
static String |
format(String key,
Object arg0,
Object arg1,
Object arg2)
|
protected String |
getBaseClassName()
Returns the base class name for the messages, that is "messages". |
static char |
getChar(IlrPropertyBundle bundle,
String key,
char defaultValue)
Returns the char associated to the key key
or the given default value if the key is not found. |
static char |
getChar(String key,
char defaultValue)
Returns the char associated to the key key
or the given default value if the key is not found. |
static int |
getInt(String key,
int defaultValue)
Returns the integer associated to the specified key, or the defaultValue if the key is not found or if the key can not be parsed as Integer. |
static String |
getMessage(IlrPropertyBundle bundle,
String key)
Returns the string associated to the specified key or the key itself if the key is not found. |
static String |
getMessage(IlrPropertyBundle bundle,
String key,
Object[] args)
Returns the formatted string associated to the specified key or the key itself if the key is not found. |
static String |
getMessage(IlrPropertyBundle bundle,
String key,
String defaultValue)
Returns the string associated to the specified key or the given default value if the key is not found. |
static String |
getMessage(IlrPropertyBundle bundle,
String key,
String defaultValue,
Object[] args)
Returns the formatted string associated to the specified key, or the defaultValue if the key is not found. |
static String |
getMessage(String key)
Returns the string associated to the specified key or the key itself if the key is not found. |
static String |
getMessage(String key,
Locale locale)
Returns the string associated to the specified key or the key itself if the key is not found. |
static String |
getMessage(String key,
Object[] args)
Returns the formatted string associated to the specified key or the key itself if the key is not found. |
static String |
getMessage(String key,
Object[] args,
Locale locale)
Returns the formatted string associated to the specified key or the key itself if the key is not found. |
static String |
getMessage(String key,
String defaultValue)
Returns the string associated to the specified key or the given default value if the key is not found. |
static String |
getMessage(String key,
String defaultValue,
Locale locale)
Returns the string associated to the specified key or the given default value if the key is not found. |
static IlrMessages |
getMessages()
Return the only instance of IlrMessages . |
Methods inherited from class ilog.rules.util.prefs.IlrPropertyManager |
---|
addPrefix, addSuffix, findPropertyBundle, findPropertyBundle, getClassLoader, getLocale, getMaximumDepth, getPrefixes, getPropertyBundle, getPropertyBundle, getSuffixes, getValue, getValue, getValue, getValue, insertPrefixAt, insertSuffixAt, removePrefixAt, removeSuffixAt, setClassLoader, setLocale, setMaximumDepth, setPrefixes, setSuffixes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static IlrMessages getMessages()
IlrMessages
. The message manager
organizes the messages as a hierarchy of property bundles.
IlrPropertyManager
protected String getBaseClassName()
getBaseClassName
in class IlrPropertyManager
public static char getChar(String key, char defaultValue)
key
or the given default value if the key is not found.
key
- The key to search.defaultValue
- The default value.public static char getChar(IlrPropertyBundle bundle, String key, char defaultValue)
key
or the given default value if the key is not found. The search is limited to
the specified property bundle.
bundle
- The bundle to look into.key
- The key to search.defaultValue
- The default value.public static String getMessage(String key)
key
- The key to search.public static String getMessage(String key, Locale locale)
key
- The key to search.locale
- The locale.public static String getMessage(IlrPropertyBundle bundle, String key)
bundle
- The bundle to look into.key
- The key to search.public static String getMessage(String key, String defaultValue)
key
- The key to search.defaultValue
- The default value.public static String getMessage(String key, String defaultValue, Locale locale)
key
- The key to search.defaultValue
- The default value.locale
- The locale.public static String getMessage(IlrPropertyBundle bundle, String key, String defaultValue)
bundle
- The bundle to look into.key
- The key to search.defaultValue
- The default value.public static String getMessage(String key, Object[] args)
java.text.MessageFormat.format(String pattern, Object[] arguments)
method.
key
- The key to search.args
- An array of objects to be formatted and substituted.public static String getMessage(String key, Object[] args, Locale locale)
java.text.MessageFormat.format(String pattern, Object[] arguments)
method.
key
- The key to search.args
- An array of objects to be formatted and substituted.locale
- The locale.public static String getMessage(IlrPropertyBundle bundle, String key, Object[] args)
bundle
- The bundle to look into.key
- The key to search.args
- An array of objects to be formatted and substituted.public static String getMessage(IlrPropertyBundle bundle, String key, String defaultValue, Object[] args)
bundle
- The bundle to look into.key
- The key to search.defaultValue
- The value to return if the key is not found.args
- An array of objects to be formatted and substituted.public static int getInt(String key, int defaultValue)
key
- The key to search.defaultValue
- The value to return if the key is not found.public static String format(String key, Object arg0)
public static String format(String key, Object arg0, Object arg1)
public static String format(String key, Object arg0, Object arg1, Object arg2)
public static String format(String key, Object[] args)
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |