org.vfny.geoserver.control.internal
Class PreferenceStoreImpl

java.lang.Object
  extended by org.vfny.geoserver.control.internal.PreferenceStoreImpl
All Implemented Interfaces:
IPreferenceStore

public class PreferenceStoreImpl
extends java.lang.Object
implements IPreferenceStore

NOT API. Default implementation that backs onto a IPreferenceStoreStrategy.

Author:
Jesse

Constructor Summary
PreferenceStoreImpl(IPreferenceStoreStrategy store)
           
 
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.
 IValidator getValidator()
           
 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 setValidator(IValidator validator)
           
 void unset(java.lang.String key)
          Clears the preference so the default is used.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreferenceStoreImpl

public PreferenceStoreImpl(IPreferenceStoreStrategy store)
Method Detail

getValidator

public IValidator getValidator()

setValidator

public void setValidator(IValidator validator)

getBoolean

public boolean getBoolean(java.lang.String key)
Description copied from interface: IPreferenceStore
Returns the preference as a boolean. If the default is not set false is returned.

Specified by:
getBoolean in interface IPreferenceStore
Parameters:
key - indicates the preference to return.
Returns:
the preference as a boolean

getChar

public char getChar(java.lang.String key)
Description copied from interface: IPreferenceStore
Returns the preference as a char. If the default is not set ' ' is returned.

Specified by:
getChar in interface IPreferenceStore
Parameters:
key - indicates the preference to return.
Returns:
the preference as a char

getDouble

public double getDouble(java.lang.String key)
Description copied from interface: IPreferenceStore
Returns the preference as a double. If the default is not set 0 is returned.

Specified by:
getDouble in interface IPreferenceStore
Parameters:
key - indicates the preference to return.
Returns:
the preference as an double

getFloat

public float getFloat(java.lang.String key)
Description copied from interface: IPreferenceStore
Returns the preference as a float. If the default is not set 0 is returned.

Specified by:
getFloat in interface IPreferenceStore
Parameters:
key - indicates the preference to return.
Returns:
the preference as a float.

getInt

public int getInt(java.lang.String key)
Description copied from interface: IPreferenceStore
Returns the preference as an integer. If the default is not set 0 is returned.

Specified by:
getInt in interface IPreferenceStore
Parameters:
key - indicates the preference to return.
Returns:
the preference as an integer

getLong

public long getLong(java.lang.String key)
Description copied from interface: IPreferenceStore
Returns the preference as a long. If the default is not set 0 is returned.

Specified by:
getLong in interface IPreferenceStore
Parameters:
key - indicates the preference to return.
Returns:
the preference as an long

getString

public java.lang.String getString(java.lang.String key)
Description copied from interface: IPreferenceStore
Returns the preference as a string. If the default is not set "" is returned.

Specified by:
getString in interface IPreferenceStore
Parameters:
key - indicates the preference to return.
Returns:
the preference as a string

set

public void set(java.lang.String key,
                java.lang.String value)
Description copied from interface: IPreferenceStore
Sets the preference to value.

Specified by:
set in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new value

set

public void set(java.lang.String key,
                int value)
Description copied from interface: IPreferenceStore
Sets the preference to value.

Specified by:
set in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new value

set

public void set(java.lang.String key,
                float value)
Description copied from interface: IPreferenceStore
Sets the preference to value.

Specified by:
set in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new value

set

public void set(java.lang.String key,
                boolean value)
Description copied from interface: IPreferenceStore
Sets the preference to value.

Specified by:
set in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new value

set

public void set(java.lang.String key,
                char value)
Description copied from interface: IPreferenceStore
Sets the preference to value.

Specified by:
set in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new value

set

public void set(java.lang.String key,
                double value)
Description copied from interface: IPreferenceStore
Sets the preference to value.

Specified by:
set in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new value

set

public void set(java.lang.String key,
                long value)
Description copied from interface: IPreferenceStore
Sets the preference to value.

Specified by:
set in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new value

unset

public void unset(java.lang.String key)
Description copied from interface: IPreferenceStore
Clears the preference so the default is used.

Specified by:
unset in interface IPreferenceStore
Parameters:
key - the preference key;

setDefault

public void setDefault(java.lang.String key,
                       java.lang.String value)
Description copied from interface: IPreferenceStore
Sets the default for the preference to value.

Specified by:
setDefault in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new default value

setDefault

public void setDefault(java.lang.String key,
                       int value)
Description copied from interface: IPreferenceStore
Sets the default for the preference to value.

Specified by:
setDefault in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new default value

setDefault

public void setDefault(java.lang.String key,
                       float value)
Description copied from interface: IPreferenceStore
Sets the default for the preference to value.

Specified by:
setDefault in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new default value

setDefault

public void setDefault(java.lang.String key,
                       boolean value)
Description copied from interface: IPreferenceStore
Sets the default for the preference to value.

Specified by:
setDefault in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new default value

setDefault

public void setDefault(java.lang.String key,
                       char value)
Description copied from interface: IPreferenceStore
Sets the default for the preference to value.

Specified by:
setDefault in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new default value

setDefault

public void setDefault(java.lang.String key,
                       double value)
Description copied from interface: IPreferenceStore
Sets the default for the preference to value.

Specified by:
setDefault in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new default value

setDefault

public void setDefault(java.lang.String key,
                       long value)
Description copied from interface: IPreferenceStore
Sets the default for the preference to value.

Specified by:
setDefault in interface IPreferenceStore
Parameters:
key - the preference to set.
value - the new default value

keys

public java.lang.String[] keys()
Description copied from interface: IPreferenceStore
Returns all the keys of the existing preferences

Specified by:
keys in interface IPreferenceStore
Returns:
all the keys of the existing preferences