This page last changed on Feb 10, 2008 by chartra@mcmaster.ca.

ToolSetManager Calls

getToolSetPreferences

Returns a previously saved (by saveToolSetPreferences) set of preferences for the given toolset. The preferences are returned as one string of JSON key/value pairs and so can contain any preferences. The intention is to store preferences related to the UI, e.g., last screen position of a toolset, etc. but other preferences unrelated to the UI may be stored here too. Note that this method returns the string saved by 'saveToolSetPreferences' exactly as it was saved.

Parameters

name value required
toolsetid String yes

Returns:

A string, i.e., whatever was stored by the saveToolSetPreferences(toolsetid) call.

Error Message

<error> Parameter: toolsetID in ToolsetManager.getToolSetPreferences is invalid. </error>

getToolPreferences

Returns a previously saved (by saveToolPreferences) set of preferences for the given tool instance. The preferences are returned as one string of JSON key/value pairs and so can contain any preferences. Note that this method returns the string saved by 'saveToolPreferences' exactly as it was saved.

Parameters

name value required
toolid String yes

Returns:

A string, i.e., whatever was stored by the saveToolPreferences(toolsetid) call.

Error Message

<error> Parameter: toolsetID in ToolsetManager.getToolPreferences is invalid. </error>

saveToolSetPreferences

Saves a set of preferences for the given toolset. The preferences are passed in as one string of JSON key/value pairs and so can store any preferences. The intention is to store preferences related to the UI, e.g., last screen position of a toolset, etc. but other preferences unrelated to the UI may be stored here too. Note that the JSON string passed in is NOT parsed into separate preferences, but simply stored as a string.

Parameters

name value required
toolsetid String yes
preferences String yes
The 'preferences' string is a JSON string of key value pairs

Returns:

JSON indicating success or failure:

{success: true}  or {success:false}

Error Message

<error> Parameter: toolsetID in ToolSetManager.getToolSetPreferences is invalid. </error>

saveToolPreferences

Saves a set of preferences for the given tool. The preferences are passed in as one string of JSON key/value pairs and so can store any preferences. Note that the JSON string passed in is NOT parsed into separate preferences, but simply stored as a string.

Parameters

name value required
toolid String yes
preferences String yes
The 'preferences' string is a JSON string of key value pairs

Returns:

JSON indicating success or failure:

{success: true}  or {success:false}

Error Message

<error> Parameter: toolsetID in ToolManager.getToolPreferences is invalid. </error>
Document generated by Confluence on Apr 19, 2009 15:04