Rule Execution Server API

ilog.rules.util.prefs
Class IlrPreferences

java.lang.Object
  extended by ilog.rules.util.prefs.IlrPropertyManager
      extended by ilog.rules.util.prefs.IlrPreferences

public class IlrPreferences
extends IlrPropertyManager

A class to retrieve preferences.


Method Summary
protected  String getBaseClassName()
          Returns the base class name for the preferences, that is "preferences".
static boolean getBoolean(IlrPropertyBundle bundle, String key, boolean defaultValue)
          Returns the boolean associated to the key key or the given default value if the key is not found.
static boolean getBoolean(String key, boolean defaultValue)
          Returns the boolean associated to the key key or the given default value if the key is not found.
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 float getFloat(IlrPropertyBundle bundle, String key, float defaultValue)
          Returns the integer associated to the key key or the given default value if the key is not found.
static float getFloat(String key, float defaultValue)
          Returns the float associated to the key key or the given default value if the key is not found.
static int getInt(IlrPropertyBundle bundle, String key, int defaultValue)
          Returns the integer 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 key key or the given default value if the key is not found.
static IlrPreferences getPreferences()
          Return the only instance of IlrPreferences.
static String getString(IlrPropertyBundle bundle, String key)
          Returns the string associated to the specified key.
static String getString(IlrPropertyBundle bundle, String key, String defaultString)
          Returns the string associated to the specified key or the given default value if the key is not found.
static String getString(String key)
          Returns the string associated to the specified key.
static String getString(String key, String defaultString)
          Returns the string associated to the specified key or the given default value if the key is not found.
static String[] getStringArray(IlrPropertyBundle bundle, String key)
          Returns the String array associated to the key key or null if the key is not found.
static String[] getStringArray(String key)
          Returns the String array associated to the key key or null if the key is not found.
 
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

getPreferences

public static IlrPreferences getPreferences()
Return the only instance of IlrPreferences. The preference manager organizes the preferences as a hierarchy of property bundles.

See Also:
IlrPropertyManager

getBaseClassName

protected String getBaseClassName()
Returns the base class name for the preferences, that is "preferences".

Specified by:
getBaseClassName in class IlrPropertyManager

getString

public static String getString(String key)
Returns the string associated to the specified key.

Parameters:
key - The key to search.

getString

public static String getString(String key,
                               String defaultString)
Returns the string associated to the specified key or the given default value if the key is not found.

Parameters:
key - The key to search.
defaultString - The default value.

getString

public static String getString(IlrPropertyBundle bundle,
                               String key)
Returns the string associated to the specified key. The search is limited to the specified property bundle.

Parameters:
bundle - The bundle to look into.
key - The key to search.

getString

public static String getString(IlrPropertyBundle bundle,
                               String key,
                               String defaultString)
Returns the string associated to the specified key or the given default value if the key is not found. The search is limited to the specified property bundle.

Parameters:
bundle - The bundle to look into.
key - The key to search.
defaultString - The default value.

getStringArray

public static String[] getStringArray(String key)
Returns the String array associated to the key key or null if the key is not found.

Parameters:
key - The key to search.

getStringArray

public static String[] getStringArray(IlrPropertyBundle bundle,
                                      String key)
Returns the String array associated to the key key or null if the key is not found. The search is limited to the specified property bundle.

Parameters:
bundle - The bundle to look into.
key - The key to search.

getBoolean

public static boolean getBoolean(String key,
                                 boolean defaultValue)
Returns the boolean associated to the key key or the given default value if the key is not found.

Parameters:
key - The key to search.
defaultValue - The default value.

getBoolean

public static boolean getBoolean(IlrPropertyBundle bundle,
                                 String key,
                                 boolean defaultValue)
Returns the boolean associated to the key key or the given default value if the key is not found. The search is limited to the specified property bundle.

Parameters:
bundle - The bundle to look into.
key - The key to search.
defaultValue - The default value.

getChar

public 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.

Parameters:
key - The key to search.
defaultValue - The default value.

getChar

public 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. The search is limited to the specified property bundle.

Parameters:
bundle - The bundle to look into.
key - The key to search.
defaultValue - The default value

getInt

public static int getInt(String key,
                         int defaultValue)
Returns the integer associated to the key key or the given default value if the key is not found.

Parameters:
key - The key to search.
defaultValue - The default value.

getInt

public static int getInt(IlrPropertyBundle bundle,
                         String key,
                         int defaultValue)
Returns the integer associated to the key key or the given default value if the key is not found. The search is limited to the specified property bundle.

Parameters:
bundle - The bundle to look into.
key - The key to search.
defaultValue - The default value.

getFloat

public static float getFloat(String key,
                             float defaultValue)
Returns the float associated to the key key or the given default value if the key is not found.

Parameters:
key - The key to search.
defaultValue - The default value.

getFloat

public static float getFloat(IlrPropertyBundle bundle,
                             String key,
                             float defaultValue)
Returns the integer associated to the key key or the given default value if the key is not found. The search is limited to the specified property bundle.

Parameters:
bundle - The bundle to look into.
key - The key to search.
defaultValue - The default value.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013