Class eclipse.Preferences
A preference object provides functions for accessing and setting preferences
Defined in: </shared/eclipse/e4/orion/I201103010200/plugins/org.eclipse.orion.client.core/static/js/preferences.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
A preference object provides functions for accessing and setting preferences
stored in some asynchronously accessible back end store (for example on a server).
|
Method Attributes | Method Name and Description |
---|---|
<static> |
eclipse.Preferences.get(key, onDone, onError)
Retrieves the preference with the given key from the preference service at the
given location.
|
<static> |
eclipse.Preferences.getNode(node, onDone)
Retrieves the preferences and children of the given preferences node.
|
<inner> |
Preferences(location, location)
Creates a new preferences object that interacts with a remote preference server
at the given location.
|
<static> |
eclipse.Preferences.put(key, value)
Sets the preference with the given key to the provided value.
|
<static> |
eclipse.Preferences.putNode(node, value)
Sets an entire node of preferences.
|
Class Detail
eclipse.Preferences()
A preference object provides functions for accessing and setting preferences
stored in some asynchronously accessible back end store (for example on a server).
Method Detail
<static>
eclipse.Preferences.get(key, onDone, onError)
Retrieves the preference with the given key from the preference service at the
given location. On completion, the onDone method is invoked with the preference
value as a parameter. A null value is returned if there is no preference defined
or if there was an error retrieving the value.
- Parameters:
- {String} key
- The preference key. The key is either a simple name, or a path where the key is the final segment.
- {Function} onDone
- A function that is invoked with the loaded preference as an argument, or
with no argument if the preference could not be retrieved and
onError
is not provided. - {Function} onError
- Function to be invoked if retrieval failed, if not profiled
onDone
is invoked with no argument.
<static>
eclipse.Preferences.getNode(node, onDone)
Retrieves the preferences and children of the given preferences node.
- Parameters:
- {String} node
- Path to a preference node
- {Function} onDone
- Function to be invoked with the result, or with no argument if retrieval failed.
<inner>
Preferences(location, location)
Creates a new preferences object that interacts with a remote preference server
at the given location.
- Parameters:
- {String} location
- The location of the remote preference service
- location
<static>
eclipse.Preferences.put(key, value)
Sets the preference with the given key to the provided value.
- Parameters:
- {String} key
- The preference key. The key is either a simple name, or a path where the key is the final segment.
- {String} value
- The preference value.
<static>
eclipse.Preferences.putNode(node, value)
Sets an entire node of preferences.
- Parameters:
- {String} node
- Path to a preference node
- {String} value
- A JSON object of key/value pairs to save