Added by jeichar@refractions.net, last edited by bowens on Sep 27, 2006  (view change)

Labels

 
(None)

Preference Modules

The preferences module allows remote systems to share "preferences" (or other key-value data) usingGeoServer.  Each preference must have a non-null String Key and a String value.  The very simple interface allows client programs to set and get the preferences.  There is also the concept of a "Default" value.  The default value is returned if the value has not been set or has been set to NULL.

The Preferences Module is divided into 2 sub-modules.  The core module, which is designed to allow access using spring-remoting (provided the server is configured properly) and the web module which handles Web GET/POST requests.

Support

Bug Tracker Preferences JIRA
Javadoc Documentation http://geo.openplans.org/geoserver/javadoc/

Example GET Requests

The following example gets value the preference pref

http://localhost:8080/geoserver/wfs?service=wpss&request=getPreference&key=pref

The following example sets the preference pref to the value newValue

http://localhost:8080/geoserver/wfs?service=wpss&request=setPreference&key=pref&value=newValue

The following example sets default value of the preference pref to the value newValue.

http://localhost:8080/geoserver/wfs?service=wpss&request=setDefault&key=pref&value=newValue

Spring Remoting Interface

The javadoc of the interface used for spring remoting is here.

This is the method list of the of the interface, take a look at the javadoc of the interface for the method comments.

public interface IPreferenceStore {
    String getString(String key);
    int getInt(String key);
    float getFloat(String key);
    boolean getBoolean(String key);
    char getChar(String key);
    double getDouble(String key);
    long getLong(String key);
    void set(String key, String value);
    void set(String key, int value);
    void set(String key, float value);
    void set(String key, boolean value);
    void set(String key, char value);
    void set(String key, double value);
    void set(String key, long value);
    void unset(String key);
    void setDefault(String key, String value);
    void setDefault(String key, int value);
    void setDefault(String key, float value);
    void setDefault(String key, boolean value);
    void setDefault(String key, char value);
    void setDefault(String key, double value);
    void setDefault(String key, long value);
    String[] keys();
}

Powered by a free Atlassian Confluence Open Source Project License granted to GeoServer . Evaluate Confluence today.

GeoServer wiki is hosted by OpenGeo - Contact Administrators