|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 static Logger |
LOG
Logger. |
private Properties |
propertyBundle
The primary property bundle. |
private static String |
propertyLocation
The location of Argo's default properties resource. |
Fields inherited from class org.argouml.application.configuration.ConfigurationHandler |
|
Constructor Summary | |
ConfigurationProperties()
Anonymous constructor. |
Method Summary | |
String |
getDefaultPath()
Returns the default path for user properties. |
String |
getValue(String key,
String defaultValue)
Returns the string value of a configuration property. |
boolean |
loadFile(File file)
Load the configuration from a specified location. |
boolean |
loadURL(URL url)
Load the configuration from a specified location. |
(package private) boolean |
saveFile(File file)
Save the configuration to a specified location. |
(package private) boolean |
saveURL(URL url)
Save the configuration to a specified location. |
void |
setValue(String key,
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 final Logger LOG
private static String propertyLocation
private Properties propertyBundle
private boolean canComplain
Constructor Detail |
public ConfigurationProperties()
Method Detail |
public String getDefaultPath()
getDefaultPath
in class ConfigurationHandler
public boolean loadFile(File file)
loadFile
in class ConfigurationHandler
file
- the path to load the configuration from.
boolean saveFile(File file)
saveFile
in class ConfigurationHandler
file
- the path to save the configuration at.
public boolean loadURL(URL url)
loadURL
in class ConfigurationHandler
url
- the path to load the configuration from.
boolean saveURL(URL url)
saveURL
in class ConfigurationHandler
url
- the path to save the configuration at.
public String getValue(String key, 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(String key, 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 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |