org.openstreetmap.josm.data
Class ServerSidePreferences

java.lang.Object
  extended by org.openstreetmap.josm.data.Preferences
      extended by org.openstreetmap.josm.data.ServerSidePreferences

public class ServerSidePreferences
extends Preferences

This class tweak the Preferences class to provide server side preference settings, as example used in the applet version.


Nested Class Summary
private  class ServerSidePreferences.Connection
           
static class ServerSidePreferences.MissingPassword
           
 
Nested classes/interfaces inherited from class org.openstreetmap.josm.data.Preferences
Preferences.AbstractSetting<T>, Preferences.ColorKey, Preferences.ListListSetting, Preferences.ListSetting, Preferences.MapListSetting, Preferences.pref, Preferences.PreferenceChangedListener, Preferences.PreferenceChangeEvent<T>, Preferences.Setting<T>, Preferences.SettingVisitor, Preferences.StringSetting, Preferences.writeExplicitly
 
Field Summary
private  ServerSidePreferences.Connection connection
           
 
Fields inherited from class org.openstreetmap.josm.data.Preferences
arrayDefaults, arrayProperties, collectionDefaults, collectionProperties, colornames, defaults, listOfStructsDefaults, listOfStructsProperties, parser, properties
 
Constructor Summary
ServerSidePreferences(java.net.URL serverUrl)
           
 
Method Summary
 boolean download()
           
 void download(java.lang.String userName, java.lang.String password)
           
 java.lang.String getPreferencesDir()
          Return the location of the user defined preferences file
 void load()
          Do nothing on load.
 void save()
          Do nothing on save.
 void upload()
          Use this instead of save() for the ServerSidePreferences, since uploads are costly while save is called often.
 
Methods inherited from class org.openstreetmap.josm.data.Preferences
addPreferenceChangeListener, copyFile, deserializeStruct, equalArray, equalCollection, equalListOfStructs, firePreferenceChanged, fromXML, get, get, getAllColors, getAllDefaults, getAllPossiblePreferenceDirs, getAllPrefix, getAllPrefixCollectionKeys, getAllSettings, getArray, getArray, getBoolean, getBoolean, getBoolean, getCacheDirectory, getCollection, getCollection, getColor, getColor, getColor, getColorName, getDefaultColor, getDefaults, getDouble, getDouble, getInteger, getInteger, getListOfStructs, getListOfStructs, getListOfStructs, getLong, getOldPreferenceFile, getPluginsDirectory, getPluginSites, getPreferenceFile, getPreferencesDirFile, getUIColor, init, isEqual, loadOld, parse, parseInnerList, parseMap, parseRoot, parseToplevelList, put, put, putArray, putCollection, putCollectionBounded, putColor, putDefault, putDouble, putInteger, putListOfStructs, putListOfStructs, putLong, putSetting, removeFromCollection, removeObsolete, removePreferenceChangeListener, resetToDefault, serializeStruct, setPluginSites, throwException, toXML, updateSystemProperties, validateXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

private final ServerSidePreferences.Connection connection
Constructor Detail

ServerSidePreferences

public ServerSidePreferences(java.net.URL serverUrl)
Method Detail

getPreferencesDir

public java.lang.String getPreferencesDir()
Description copied from class: Preferences
Return the location of the user defined preferences file

Overrides:
getPreferencesDir in class Preferences

load

public void load()
Do nothing on load. Preferences are loaded with download().

Overrides:
load in class Preferences

save

public void save()
Do nothing on save. Preferences are uploaded using upload().

Overrides:
save in class Preferences

download

public void download(java.lang.String userName,
                     java.lang.String password)

download

public boolean download()
                 throws ServerSidePreferences.MissingPassword
Throws:
ServerSidePreferences.MissingPassword

upload

public void upload()
Use this instead of save() for the ServerSidePreferences, since uploads are costly while save is called often. This is triggered by an explicit menu option.



JOSM