ca.sqlpower.architect
Interface UserSettings

All Known Implementing Classes:
AbstractUserSetting, ArchitectSwingUserSettings, DDLUserSettings, ETLUserSettings, QFAUserSettings

public interface UserSettings


Method Summary
 boolean getBoolean(java.lang.String propName, boolean defaultValue)
          Gets the named property from the settings map.
 int getInt(java.lang.String propName, int defaultValue)
          Gets the named property from the settings map.
 java.lang.Object getObject(java.lang.String propName, java.lang.Object defaultValue)
           
 java.util.Set getSettingNames()
          Returns the names of all settings currently held by this SwingUserSettings object.
 java.lang.String getString(java.lang.String propName, java.lang.String defaultValue)
           
 void putSetting(java.lang.String propName, java.lang.String propClassName, java.lang.String propValue)
          Adds a new setting or updates the value of an existing setting.
 void setBoolean(java.lang.String propName, boolean value)
           
 void setInt(java.lang.String propName, int value)
           
 void setObject(java.lang.String propName, java.lang.Object value)
           
 void setString(java.lang.String propName, java.lang.String value)
           
 

Method Detail

getInt

int getInt(java.lang.String propName,
           int defaultValue)
Gets the named property from the settings map. If the value in the map is a Number, the value is obtained by calling intValue() on it. If it is a String, it is converted with Integer.parseInt(). Otherwise, the default value is returned a warning is logged using logger. If there is no such value in the map, the default is returned without logging a warning.


setInt

void setInt(java.lang.String propName,
            int value)

getBoolean

boolean getBoolean(java.lang.String propName,
                   boolean defaultValue)
Gets the named property from the settings map. If the value in the map is a Boolean, the value is obtained by calling booleanValue() on it. If it is a String, it is converted with Boolean.parseBoolean(). Otherwise, the default value is returned and a warning is logged using logger. If there is no such value in the map, the default is returned without logging a warning.


setBoolean

void setBoolean(java.lang.String propName,
                boolean value)

setObject

void setObject(java.lang.String propName,
               java.lang.Object value)

putSetting

void putSetting(java.lang.String propName,
                java.lang.String propClassName,
                java.lang.String propValue)
Adds a new setting or updates the value of an existing setting. This method is meant to be used by the ConfigFile read method: The set<Type> methods are an easier interface to the same thing.

Parameters:
propName - The name of the property to add or update.
propClassName - The class name of the property's value. Currently, "java.lang.Integer" and "java.lang.Boolean" are supported.
propValue - A string representation of the property's value.

getString

java.lang.String getString(java.lang.String propName,
                           java.lang.String defaultValue)

setString

void setString(java.lang.String propName,
               java.lang.String value)

getObject

java.lang.Object getObject(java.lang.String propName,
                           java.lang.Object defaultValue)

getSettingNames

java.util.Set getSettingNames()
Returns the names of all settings currently held by this SwingUserSettings object. They will all be Strings.



Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca