| java.lang.Object org.underworldlabs.util.SystemProperties
SystemProperties | public class SystemProperties (Code) | | A convenience class to store and return system properties
not limited to the String datatype provided
by java.util.Properties .
It provides the set and get methods for integer, string,
boolean and colour datatypes [and objects] where applicable.
author: Takis Diakoumis version: $Revision: 1.4 $ |
Method Summary | |
final public static boolean | containsKey(String propertiesName, String key) | final public static boolean | getBooleanProperty(String propertiesName, String key) | final public static Color | getColourProperty(String propertiesName, String key) | final public static int | getIntProperty(String propertiesName, String key) | public static Properties | getProperties(String name) Returns the properties object with the specified name in the cache. | final public static String | getProperty(String propertiesName, String key) | final public static String | getProperty(String propertiesName, String name, Object[] args) Returns the property with the specified name, formatting it with
the java.text.MessageFormat.format() method. | final public static String | getStringProperty(String propertiesName, String key) | public static void | loadProperties(String name, String path) Loads and stores in the cache the properties file at the
specified file system path. | public static void | loadProperties(String name, String path, Properties defaults) Loads and stores in the cache the properties file at the
specified file system path. | public static void | loadPropertiesResource(String name, String path) Loads and stores in the cache the properties file at the
specified package resource path. | final public static void | setBooleanProperty(String propertiesName, String key, boolean value) | final public static void | setColourProperty(String propertiesName, String key, Color value) | final public static void | setIntProperty(String propertiesName, String key, int value) | final public static void | setProperty(String propertiesName, String key, String value) | final public static void | setStringProperty(String propertiesName, String key, String value) |
containsKey | final public static boolean containsKey(String propertiesName, String key)(Code) | | |
getBooleanProperty | final public static boolean getBooleanProperty(String propertiesName, String key)(Code) | | Retrieves a property of type boolean
Parameters: key - - the property key the boolean value |
getColourProperty | final public static Color getColourProperty(String propertiesName, String key)(Code) | | Retrieves a property of object type Color
Parameters: key - - the property key the Color value |
getIntProperty | final public static int getIntProperty(String propertiesName, String key)(Code) | | Retrieves a property of type int
Parameters: key - - the property key - the int value |
getProperties | public static Properties getProperties(String name)(Code) | | Returns the properties object with the specified name in the cache.
Parameters: name - - the name assigned to the properties bundle the properties object or null if doesn't exist |
getProperty | final public static String getProperty(String propertiesName, String key)(Code) | | Retrieves a property using the Properties
method getProperty(key)
Parameters: key - - the property key the property value |
getProperty | final public static String getProperty(String propertiesName, String name, Object[] args)(Code) | | Returns the property with the specified name, formatting it with
the java.text.MessageFormat.format() method.
Parameters: key - - the property key Parameters: args - The positional parameters |
getStringProperty | final public static String getStringProperty(String propertiesName, String key)(Code) | | Retrieves a property of object type String
Parameters: key - - the property key the String value |
loadProperties | public static void loadProperties(String name, String path)(Code) | | Loads and stores in the cache the properties file at the
specified file system path. The properties are stored in the
cache under the specified name and accessed using that name.
Parameters: name - - the cache name to store the props Parameters: path - - the file system to the properties file |
loadProperties | public static void loadProperties(String name, String path, Properties defaults)(Code) | | Loads and stores in the cache the properties file at the
specified file system path. The properties are stored in the
cache under the specified name and accessed using that name.
Parameters: name - - the cache name to store the props Parameters: path - - the file system to the properties file |
loadPropertiesResource | public static void loadPropertiesResource(String name, String path)(Code) | | Loads and stores in the cache the properties file at the
specified package resource path. The properties are stored
in the cache under the specified name and accessed using that name.
Parameters: name - - the cache name to store the props Parameters: path - - the package resource path to the properties file |
setBooleanProperty | final public static void setBooleanProperty(String propertiesName, String key, boolean value)(Code) | | Sets a property with a boolean value
Parameters: key - - the property key Parameters: value - - the property value |
setColourProperty | final public static void setColourProperty(String propertiesName, String key, Color value)(Code) | | Sets a property with a Color value
Parameters: key - - the property key Parameters: value - - the property value |
setIntProperty | final public static void setIntProperty(String propertiesName, String key, int value)(Code) | | Sets a property with an int value
Parameters: key - - the property key Parameters: value - - the property value |
setProperty | final public static void setProperty(String propertiesName, String key, String value)(Code) | | Sets a property using the Properties
method setProperty(key, value)
Parameters: key - - the property key Parameters: value - - the property value |
setStringProperty | final public static void setStringProperty(String propertiesName, String key, String value)(Code) | | Sets a property with a String value
Parameters: key - - the property key Parameters: value - - the property value |
|
|