|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.argouml.application.api.Configuration
This class provides the core user configuration implementation logic. All fancy handling and registry access occurs behind the scenes.
Field Summary | |
---|---|
static Category |
cat
Define a static log4j category variable for ArgoUML configuration. |
static java.lang.String |
FILE_LOADED
Property to indicate configuration load from file |
static java.lang.String |
FILE_SAVED
Property to indicate configuration save to file |
static java.lang.String |
URL_LOADED
Property to indicate configuration load from url |
static java.lang.String |
URL_SAVED
Property to indicate configuration save to url |
Method Summary | |
---|---|
static void |
addListener(ConfigurationKey key,
java.beans.PropertyChangeListener pcl)
Adds a property change listener.Static for simplicity of use. |
static void |
addListener(java.beans.PropertyChangeListener pcl)
Adds a property change listener. |
static boolean |
getBoolean(ConfigurationKey key)
Returns the boolean value of a configuration property. |
static boolean |
getBoolean(ConfigurationKey key,
boolean defaultValue)
Returns the boolean value of a configuration property. |
static ConfigurationHandler |
getConfigurationHandler()
Returns the instance of the configuration singleton. |
static double |
getDouble(ConfigurationKey key)
Returns the numeric value of a configuration property. |
static double |
getDouble(ConfigurationKey key,
double defaultValue)
Returns the numeric value of a configuration property. |
static ConfigurationFactory |
getFactory()
Returns the configuration factory instance. |
static int |
getInteger(ConfigurationKey key)
Returns the numeric value of a configuration property. |
static int |
getInteger(ConfigurationKey key,
int defaultValue)
Returns the numeric value of a configuration property. |
static java.lang.String |
getString(ConfigurationKey key)
Returns the string value of a configuration property. |
static java.lang.String |
getString(ConfigurationKey key,
java.lang.String defaultValue)
Returns the string value of a configuration property. |
static boolean |
load()
Load the configuration from the default location. |
static boolean |
load(java.io.File file)
Load the configuration from a specified file |
static boolean |
load(java.net.URL url)
Load the configuration from a specified url |
static ConfigurationKey |
makeKey(ConfigurationKey ck,
java.lang.String k1)
Create a sub-component of an existing configuration key. |
static ConfigurationKey |
makeKey(java.lang.String k1)
Create a single component configuration key. |
static ConfigurationKey |
makeKey(java.lang.String k1,
java.lang.String k2)
Create a two-component configuration key. |
static ConfigurationKey |
makeKey(java.lang.String k1,
java.lang.String k2,
java.lang.String k3)
Create a three-component configuration key. |
static ConfigurationKey |
makeKey(java.lang.String k1,
java.lang.String k2,
java.lang.String k3,
java.lang.String k4)
Create a four-component configuration key. |
static ConfigurationKey |
makeKey(java.lang.String k1,
java.lang.String k2,
java.lang.String k3,
java.lang.String k4,
java.lang.String k5)
Create a five-component configuration key. |
static void |
removeListener(ConfigurationKey key,
java.beans.PropertyChangeListener pcl)
Removes a property change listener. |
static void |
removeListener(java.beans.PropertyChangeListener pcl)
Removes a property change listener. |
static boolean |
save()
Save the configuration to the default location. |
static boolean |
save(boolean force)
Save the configuration to the default location. |
static void |
setBoolean(ConfigurationKey key,
boolean newValue)
Sets the boolean value of a configuration property. |
static void |
setDouble(ConfigurationKey key,
double newValue)
Sets the numeric value of a configuration property. |
static void |
setInteger(ConfigurationKey key,
int newValue)
Sets the numeric value of a configuration property. |
static void |
setString(ConfigurationKey key,
java.lang.String newValue)
Sets the string value of a configuration property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Category cat
public static final java.lang.String FILE_LOADED
public static final java.lang.String URL_LOADED
public static final java.lang.String FILE_SAVED
public static final java.lang.String URL_SAVED
Method Detail |
public static ConfigurationHandler getConfigurationHandler()
public static final ConfigurationFactory getFactory()
public static final boolean load()
public static final boolean load(java.io.File file)
file
- the File to load
public static final boolean load(java.net.URL url)
url
- the URL to load
public static final boolean save()
public static final boolean save(boolean force)
public static java.lang.String getString(ConfigurationKey key)
key
- the key to retrieve the value of
public static final java.lang.String getString(ConfigurationKey key, java.lang.String defaultValue)
key
- the key to retrieve the value ofdefaultValue
- the value to return if the key does not exist
public static final int getInteger(ConfigurationKey key)
key
- the key to retrieve the value of
public static final double getDouble(ConfigurationKey key, double defaultValue)
key
- the key to retrieve the value of
public static final double getDouble(ConfigurationKey key)
key
- the key to retrieve the value of
public static final int getInteger(ConfigurationKey key, int defaultValue)
key
- the key to retrieve the value ofdefaultValue
- the value to return if the key does not exist
public static final boolean getBoolean(ConfigurationKey key)
key
- the key to retrieve the value of
public static final boolean getBoolean(ConfigurationKey key, boolean defaultValue)
key
- the key to retrieve the value ofdefaultValue
- the value to return if the key does not exist
public static final void setString(ConfigurationKey key, java.lang.String newValue)
key
- the key to setnewValue
- the value to set the key to.public static final void setInteger(ConfigurationKey key, int newValue)
key
- the key to setnewValue
- the value to set the key to.public static final void setDouble(ConfigurationKey key, double newValue)
key
- the key to setnewValue
- the value to set the key to.public static final void setBoolean(ConfigurationKey key, boolean newValue)
key
- the key to setnewValue
- the value to set the key to.public static final void addListener(java.beans.PropertyChangeListener pcl)
pcl
- The property change listener to addpublic static final void removeListener(java.beans.PropertyChangeListener pcl)
pcl
- The property change listener to removepublic static final void addListener(ConfigurationKey key, java.beans.PropertyChangeListener pcl)
key
- The key to listen for changes ofpcl
- The property change listener to addpublic static final void removeListener(ConfigurationKey key, java.beans.PropertyChangeListener pcl)
key
- The key to listen for changes ofpcl
- The property change listener to removepublic static ConfigurationKey makeKey(java.lang.String k1)
public static ConfigurationKey makeKey(ConfigurationKey ck, java.lang.String k1)
public static ConfigurationKey makeKey(java.lang.String k1, java.lang.String k2)
public static ConfigurationKey makeKey(java.lang.String k1, java.lang.String k2, java.lang.String k3)
public static ConfigurationKey makeKey(java.lang.String k1, java.lang.String k2, java.lang.String k3, java.lang.String k4)
public static ConfigurationKey makeKey(java.lang.String k1, java.lang.String k2, java.lang.String k3, java.lang.String k4, java.lang.String k5)
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2003 (20040216) | ArgoUML Project Home | ArgoUML Cookbook |