Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.argouml.configuration
Class ConfigurationProperties  view ConfigurationProperties download ConfigurationProperties.java

java.lang.Object
  extended byorg.argouml.configuration.ConfigurationHandler
      extended byorg.argouml.configuration.ConfigurationProperties

public class ConfigurationProperties
extends ConfigurationHandler

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.
protected  java.util.Properties _properties
          The primary property bundle.
private static java.lang.String PROPERTIES
          The location of Argo's default properties resource.
 
Fields inherited from class org.argouml.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.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

PROPERTIES

private static java.lang.String PROPERTIES
The location of Argo's default properties resource.


_properties

protected java.util.Properties _properties
The primary property bundle.


_canComplain

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.

Constructor Detail

ConfigurationProperties

public ConfigurationProperties()
Anonymous constructor.

Method Detail

getDefaultPath

public java.lang.String getDefaultPath()
Returns the default path for user properties.

Specified by:
getDefaultPath in class ConfigurationHandler

loadFile

public boolean loadFile(java.io.File file)
Load the configuration from a specified location.

Specified by:
loadFile in class ConfigurationHandler

saveFile

boolean saveFile(java.io.File file)
Save the configuration to a specified location.

Specified by:
saveFile in class ConfigurationHandler

loadURL

public boolean loadURL(java.net.URL url)
Load the configuration from a specified location.

Specified by:
loadURL in class ConfigurationHandler

saveURL

boolean saveURL(java.net.URL url)
Save the configuration to a specified location.

Specified by:
saveURL in class ConfigurationHandler

getValue

public java.lang.String getValue(java.lang.String key,
                                 java.lang.String defaultValue)
Returns the string value of a configuration property.

Specified by:
getValue in class ConfigurationHandler

setValue

public void setValue(java.lang.String key,
                     java.lang.String value)
Sets the string value of a configuration property.

Specified by:
setValue in class ConfigurationHandler