|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.argouml.application.configuration.ConfigurationHandler | +--org.argouml.application.configuration.ConfigurationProperties
This class provides a user configuration based upon properties files. Eventually this configuration file will be available to users via a GUI interface to set keyboards memory allocations which modules to load user preferences font sizes user names and data etc.*
Field Summary | |
---|---|
private boolean |
_canComplain
Flag to ensure that only the first load failure is reported even though we keep trying because the file or URL may only be temporarily unavailable. |
private java.util.Properties |
_properties
The primary property bundle. |
private static Logger |
cat
logger |
private static java.lang.String |
PROPERTIES
The location of Argo's default properties resource. |
Fields inherited from class org.argouml.application.configuration.ConfigurationHandler |
---|
|
Constructor Summary | |
---|---|
ConfigurationProperties()
Anonymous constructor. |
Method Summary | |
---|---|
java.lang.String |
getDefaultPath()
Returns the default path for user properties. |
java.lang.String |
getValue(java.lang.String key,
java.lang.String defaultValue)
Returns the string value of a configuration property. |
boolean |
loadFile(java.io.File file)
Load the configuration from a specified location. |
boolean |
loadURL(java.net.URL url)
Load the configuration from a specified location. |
(package private) boolean |
saveFile(java.io.File file)
Save the configuration to a specified location. |
(package private) boolean |
saveURL(java.net.URL url)
Save the configuration to a specified location. |
void |
setValue(java.lang.String key,
java.lang.String value)
Sets the string value of a configuration property. |
Methods inherited from class org.argouml.application.configuration.ConfigurationHandler |
---|
addListener, addListener, getBoolean, getDouble, getInteger, getString, hasKey, isChangeable, isChanged, isLoaded, load, load, loadDefault, loadUnspecified, removeListener, removeListener, save, save, saveDefault, saveDefault, saveUnspecified, setBoolean, setDouble, setInteger, setString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static Logger cat
private static java.lang.String PROPERTIES
private java.util.Properties _properties
private boolean _canComplain
Constructor Detail |
public ConfigurationProperties()
Method Detail |
public java.lang.String getDefaultPath()
getDefaultPath
in class ConfigurationHandler
public boolean loadFile(java.io.File file)
loadFile
in class ConfigurationHandler
file
- the path to load the configuration from.
boolean saveFile(java.io.File file)
saveFile
in class ConfigurationHandler
file
- the path to save the configuration at.
public boolean loadURL(java.net.URL url)
loadURL
in class ConfigurationHandler
url
- the path to load the configuration from.
boolean saveURL(java.net.URL url)
saveURL
in class ConfigurationHandler
url
- the path to save the configuration at.
public java.lang.String getValue(java.lang.String key, java.lang.String defaultValue)
getValue
in class ConfigurationHandler
key
- the key to return the value of.defaultValue
- the value to return if the key was not found.
public void setValue(java.lang.String key, java.lang.String value)
setValue
in class ConfigurationHandler
key
- the key to set.value
- the value to set the key to.
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |