org.vfny.geoserver.control
Interface IPreferenceStore

All Known Implementing Classes:
PreferenceStoreImpl

public interface IPreferenceStore

An interface for obtaining and setting preferences. A default value may be optionally set.

Author:
Jesse

Method Summary
 boolean getBoolean(java.lang.String key)
          Returns the preference as a boolean.
 char getChar(java.lang.String key)
          Returns the preference as a char.
 double getDouble(java.lang.String key)
          Returns the preference as a double.
 float getFloat(java.lang.String key)
          Returns the preference as a float.
 int getInt(java.lang.String key)
          Returns the preference as an integer.
 long getLong(java.lang.String key)
          Returns the preference as a long.
 java.lang.String getString(java.lang.String key)
          Returns the preference as a string.
 java.lang.String[] keys()
          Returns all the keys of the existing preferences
 void set(java.lang.String key, boolean value)
          Sets the preference to value.
 void set(java.lang.String key, char value)
          Sets the preference to value.
 void set(java.lang.String key, double value)
          Sets the preference to value.
 void set(java.lang.String key, float value)
          Sets the preference to value.
 void set(java.lang.String key, int value)
          Sets the preference to value.
 void set(java.lang.String key, long value)
          Sets the preference to value.
 void set(java.lang.String key, java.lang.String value)
          Sets the preference to value.
 void setDefault(java.lang.String key, boolean value)
          Sets the default for the preference to value.
 void setDefault(java.lang.String key, char value)
          Sets the default for the preference to value.
 void setDefault(java.lang.String key, double value)
          Sets the default for the preference to value.
 void setDefault(java.lang.String key, float value)
          Sets the default for the preference to value.
 void setDefault(java.lang.String key, int value)
          Sets the default for the preference to value.
 void setDefault(java.lang.String key, long value)
          Sets the default for the preference to value.
 void setDefault(java.lang.String key, java.lang.String value)
          Sets the default for the preference to value.
 void unset(java.lang.String key)
          Clears the preference so the default is used.
 

Method Detail

getString

java.lang.String getString(java.lang.String key)
Returns the preference as a string. If the default is not set "" is returned.

Parameters:
key - indicates the preference to return.
Returns:
the preference as a string

getInt

int getInt(java.lang.String key)
Returns the preference as an integer. If the default is not set 0 is returned.

Parameters:
key - indicates the preference to return.
Returns:
the preference as an integer

getFloat

float getFloat(java.lang.String key)
Returns the preference as a float. If the default is not set 0 is returned.

Parameters:
key - indicates the preference to return.
Returns:
the preference as a float.

getBoolean

boolean getBoolean(java.lang.String key)
Returns the preference as a boolean. If the default is not set false is returned.

Parameters:
key - indicates the preference to return.
Returns:
the preference as a boolean

getChar

char getChar(java.lang.String key)
Returns the preference as a char. If the default is not set ' ' is returned.

Parameters:
key - indicates the preference to return.
Returns:
the preference as a char

getDouble

double getDouble(java.lang.String key)
Returns the preference as a double. If the default is not set 0 is returned.

Parameters:
key - indicates the preference to return.
Returns:
the preference as an double

getLong

long getLong(java.lang.String key)
Returns the preference as a long. If the default is not set 0 is returned.

Parameters:
key - indicates the preference to return.
Returns:
the preference as an long

set

void set(java.lang.String key,
         java.lang.String value)
Sets the preference to value.

Parameters:
key - the preference to set.
value - the new value

set

void set(java.lang.String key,
         int value)
Sets the preference to value.

Parameters:
key - the preference to set.
value - the new value

set

void set(java.lang.String key,
         float value)
Sets the preference to value.

Parameters:
key - the preference to set.
value - the new value

set

void set(java.lang.String key,
         boolean value)
Sets the preference to value.

Parameters:
key - the preference to set.
value - the new value

set

void set(java.lang.String key,
         char value)
Sets the preference to value.

Parameters:
key - the preference to set.
value - the new value

set

void set(java.lang.String key,
         double value)
Sets the preference to value.

Parameters:
key - the preference to set.
value - the new value

set

void set(java.lang.String key,
         long value)
Sets the preference to value.

Parameters:
key - the preference to set.
value - the new value

unset

void unset(java.lang.String key)
Clears the preference so the default is used.

Parameters:
key - the preference key;

setDefault

void setDefault(java.lang.String key,
                java.lang.String value)
Sets the default for the preference to value.

Parameters:
key - the preference to set.
value - the new default value

setDefault

void setDefault(java.lang.String key,
                int value)
Sets the default for the preference to value.

Parameters:
key - the preference to set.
value - the new default value

setDefault

void setDefault(java.lang.String key,
                float value)
Sets the default for the preference to value.

Parameters:
key - the preference to set.
value - the new default value

setDefault

void setDefault(java.lang.String key,
                boolean value)
Sets the default for the preference to value.

Parameters:
key - the preference to set.
value - the new default value

setDefault

void setDefault(java.lang.String key,
                char value)
Sets the default for the preference to value.

Parameters:
key - the preference to set.
value - the new default value

setDefault

void setDefault(java.lang.String key,
                double value)
Sets the default for the preference to value.

Parameters:
key - the preference to set.
value - the new default value

setDefault

void setDefault(java.lang.String key,
                long value)
Sets the default for the preference to value.

Parameters:
key - the preference to set.
value - the new default value

keys

java.lang.String[] keys()
Returns all the keys of the existing preferences

Returns:
all the keys of the existing preferences