edu.rice.cs.drjava.config
Class FileConfiguration

java.lang.Object
  extended by edu.rice.cs.drjava.config.Configuration
      extended by edu.rice.cs.drjava.config.SavableConfiguration
          extended by edu.rice.cs.drjava.config.FileConfiguration
Direct Known Subclasses:
ResourceBundleConfiguration

public class FileConfiguration
extends SavableConfiguration

A Configuration object that is backed by a file.

Version:
$Id: FileConfiguration.java 5232 2010-04-24 00:14:05Z mgricken $

Field Summary
protected  File file
           
 
Fields inherited from class edu.rice.cs.drjava.config.Configuration
_startupException, map
 
Constructor Summary
FileConfiguration(File f)
          Creates a new Configuration object using the values stored in file f.
 
Method Summary
 File getFile()
          Returns the file that this configuration is backed by.
 void loadConfiguration()
          Calls SavableConfiguration.loadConfiguration, which loads all values from the file, based on the defaults in OptionConstants.
 void saveConfiguration()
          Saves the current settings to the stored properties file.
 void saveConfiguration(String header)
          Saves the current settings to the stored properties file.
 
Methods inherited from class edu.rice.cs.drjava.config.SavableConfiguration
loadConfiguration, saveConfiguration
 
Methods inherited from class edu.rice.cs.drjava.config.Configuration
addOptionListener, getOptionMap, getSetting, getStartupException, hadStartupException, isEditable, removeOptionListener, resetToDefaults, setSetting, storeStartupException, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

file

protected final File file
Constructor Detail

FileConfiguration

public FileConfiguration(File f)
Creates a new Configuration object using the values stored in file f. Any values not specified by f will be set to defaults from OptionConstants.

Parameters:
f - Properties file containing customized values
Method Detail

getFile

public File getFile()
Returns the file that this configuration is backed by.


loadConfiguration

public void loadConfiguration()
                       throws IOException
Calls SavableConfiguration.loadConfiguration, which loads all values from the file, based on the defaults in OptionConstants.

Throws:
IOException

saveConfiguration

public void saveConfiguration()
                       throws IOException
Saves the current settings to the stored properties file.

Throws:
IOException

saveConfiguration

public void saveConfiguration(String header)
                       throws IOException
Saves the current settings to the stored properties file.

Parameters:
header - Description of the properties list
Throws:
IOException