com.limegroup.gnutella.settings
Class AbstractSettings

java.lang.Object
  extended bycom.limegroup.gnutella.settings.AbstractSettings
Direct Known Subclasses:
LimeProps, QuestionsHandler, TablesHandler

public abstract class AbstractSettings
extends java.lang.Object

Abstract Settings class that all settings classes should extend. Provides basic functionality for all settings classes.


Constructor Summary
protected AbstractSettings(java.lang.String fileName, java.lang.String header)
          Basic constructor that creates the FACTORY and PROPS_FILE.
 
Method Summary
 SettingsFactory getFactory()
          Accessor for the SettingsFactory instance that stores the properties.
 java.util.Properties getProperties()
          Accessor for the Properties instance that stores all settings.
 java.io.File getPropertiesFile()
          Accessor for the File instance taht stores all properties
 boolean getShouldSave()
          Access for shouldSave
 void reload()
          reload settings from both the property and configuration files
 void revertToDefault()
          Revert all settings to their default value
 void save()
          Save property settings to the property file
 void setShouldSave(boolean shouldSave)
          Mutator for shouldSave
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSettings

protected AbstractSettings(java.lang.String fileName,
                           java.lang.String header)
Basic constructor that creates the FACTORY and PROPS_FILE.

Method Detail

getProperties

public java.util.Properties getProperties()
Accessor for the Properties instance that stores all settings.

Returns:
the Properties instance for storing settings

getPropertiesFile

public java.io.File getPropertiesFile()
Accessor for the File instance taht stores all properties


getFactory

public SettingsFactory getFactory()
Accessor for the SettingsFactory instance that stores the properties.


reload

public void reload()
reload settings from both the property and configuration files


save

public void save()
Save property settings to the property file


revertToDefault

public void revertToDefault()
Revert all settings to their default value


setShouldSave

public void setShouldSave(boolean shouldSave)
Mutator for shouldSave


getShouldSave

public boolean getShouldSave()
Access for shouldSave