Class Index | File Index

## Classes

- _global_
- OWF
- OWF.Chrome
- OWF.DragAndDrop
- OWF.Eventing
- OWF.Intents
- OWF.Lang
- OWF.Launcher
- OWF.Log
- OWF.Metrics
- OWF.Preferences
- OWF.RPC
- OWF.Util
- Ozone.chrome.WidgetChrome
- Ozone.dragAndDrop.WidgetDragAndDrop
- Ozone.eventing.Widget
- Ozone.eventing.WidgetProxy
- Ozone.lang
- Ozone.launcher.WidgetLauncher
- Ozone.launcher.WidgetLauncherUtils
- Ozone.log
- Ozone.metrics
- Ozone.pref.PrefServer
- Ozone.state.WidgetState
- Ozone.state.WidgetStateHandler
- Ozone.util
- Ozone.util.pageLoad

# Namespace OWF.Preferences

Defined in: Widget.js.

Namespace Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| OWF.Preferences This object is used to create, retrieve, update and delete user preferences.

Method Summary
Method Attributes | Method Name and Description
--- | ---
<static> | OWF.Preferences.cloneDashboard(cfg) Copies an existing dashboard and saves it as new
<static> | OWF.Preferences.createOrUpdateDashboard(cfg) Saves changes to a new or existing dashboard
<static> | OWF.Preferences.deleteDashboard(cfg) Deletes the dashboard with the specified id
<static> | OWF.Preferences.deleteUserPreference(cfg) Deletes a user preference with the provided namespace and name.
<static> | OWF.Preferences.doesUserPreferenceExist(cfg) Checks for the existence of a user preference for a given namespace and name
<static> | OWF.Preferences.findDashboards(cfg) Returns all dashboards for the logged in user.
<static> | OWF.Preferences.findDashboardsByType(cfg) Returns all dashboards for the logged in user filtered by the type of dashboard.
<static> | OWF.Preferences.findWidgets(cfg) Gets all widgets for a given user.
<static> | OWF.Preferences.getCurrentUser(cfg) retrieves the current user logged into the system
<static> | OWF.Preferences.getDashboard(cfg) Gets the dashboard with the specified id
<static> | OWF.Preferences.getDefaultDashboard(cfg) Gets the user's default dashboard
<static> | OWF.Preferences.getServerVersion(cfg) For retrieving the OWF system server version
<static> | OWF.Preferences.getUrl() Get the url for the Preference Server
<static> | OWF.Preferences.getUserPreference(cfg) Retrieves the user preference for the provided name and namespace
<static> | OWF.Preferences.getWidget(cfg) Gets the widget with the specified id
<static> | OWF.Preferences.setDefaultDashboard(cfg) Sets the user's default dashboard
<static> | OWF.Preferences.setUrl(url) Sets the url for the Preference Server
<static> | OWF.Preferences.setUserPreference(cfg) Creates or updates a user preference for the provided namespace and name.
<static> | OWF.Preferences.updateAndDeleteDashboards(cfg) Saves changes to existing dashboards
<static> | OWF.Preferences.updateAndDeleteWidgets(cfg) Saves changes to existing widgets

Namespace Detail
OWF.Preferences
This object is used to create, retrieve, update and delete user preferences.
Method Detail
<static> OWF.Preferences.cloneDashboard(cfg)
Copies an existing dashboard and saves it as new

    var onSuccess = function(dashboard) {
      alert(dashboard.name);
    };

    var onFailure = function(error) {
      alert(error);
    };

    var dashboard = {
      alteredByAdmin: 'false',
      createdDate: '04/18/2012 11:29 AM EDT',
      isGroupDashboard: false,
      isdefault: false,
      name: 'My Dashboard',
      user: {
        userId: 'testAdmin1',
      },
      createdBy: {
        userId: 'testAdmin1',
        userRealName: 'Test Admin 1'
      },
      editedDate: '04/18/2012 11:29 AM EDT',
      groups: [],
      description: 'This is my dashboard',
      guid: guid.util.guid(),
    };

    OWF.Preferences.cloneDashboard({
      json: dashboard,
      onSuccess: onSuccess,
      onFailure: onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{Object} cfg.json
  The encoded JSON object representing the dashboard. The dashboard object has the following properties:
  {Boolean} alteredByAdmin: true if altered by an administrator
  {Date} createdDate: date dashboard was created
  {Boolean} isGroupDashboard: true if dashboard is a group dashboard
  {Boolean} isdefault: true if this is a default dashboard
  {String} name: name of dashboard
  {Object} user: the dashoard owner. Has the following properties:
  {String} userId: unique user identifier
  {Object} createdBy: dashboard creator. Has the following properties:
  {String} userId: unique user identifier
  {String} userRealName: user's name
  {Date} editedDate: date dashboard was last edited
  {Array} groups: groups dashboard is assigned to
  {String} description: description of dashboard
  {String} guid: uniqued dashboard identifier
  {String} layoutConfig: Holds the various containers and panes on a dashboard and the widgets inside of the panes, including the widget states. This parameter provides an EXT JS style configuration used to layout the supported pane types in an OWF dashboard along. Each internal definition can hold nested panes in an items array, widgets in a widgets array, and default values for those widgets in a defaultValues array. Panes can have the following parameters:
  - {String} xtype: container|accordionpane|desktoppane|fitpane|portalpane|tabbedpane|dashboardsplitter
  - {Number} flex: 1 if for a pane; 3 for a container
  - {String} htmlText: in pixels (e.g., 300px) or percent (e.g., 100%) or "variable"; valid if nested in a horizontally/vertically split pane
  - {String} cls: left|right if nested in a horizontally split pane; top|bottom if nested in a vertically split pane; vbox|hbox if xtype is container
  - {Array} items: an array of 2 nested pane configurations along with a possible dashboardspliiter for vbox and hbox containers; empty otherwise
  - {String} paneType: accordionpane|desktoppane|fitpane|portalpane|tabbedpane; valid if xtype is not container
  - {Array} layout: valid only for container xtype. Includes the following elements:
  - {String} type: vbox|hbox
  - {String} align: stretch
  - {Array} widgets: array of widget state objects. Each has the following properties:
  - {String} widgetGuid: unique widget identifier
  - {Number} width: width of widget in pixels
  - {Number} zIndex: in pixels
  - {String} region: containing region on dashboard. Dashboard type specific.
  - {Boolean} pinned: true if widget is pinned open
  - {String} buttonId: identifier of button that opens widget
  - {Number} height: height of widget in pixels
  - {Number} columnPos: position of widget in a column
  - {String} name: widget name
  - {Number} statePosition
  - {Boolean} active: true if this widget is the active (has focus) widget
  - {String} uniqueId: unique widget identifier on dashboard
  - {Boolean} minimized: true if widget is minimized
  - {Boolean} buttonOpened: true if button launched widget is opened
  - {Boolean} collapsed: true if widget is collapsed
  - {Number} y: y-axis position in pixels
  - {Number} x: x-axis position in pixels
  - {Boolean} maximized: true if widget is maximized
  - {String} defaultSettings: JSON string of default settings which varies by pane type; not valid for containers
{Function} cfg.onSuccess
  Callback function to capture the success result. Callback parameter is json representation of a Dashboard. This method will be passed the dashboard object which has the following properties:
  {Boolean} alteredByAdmin: true if altered by an administrator
  {Date} createdDate: date dashboard was created
  {Boolean} isGroupDashboard: true if dashboard is a group dashboard
  {Boolean} isdefault: true if this is a default dashboard
  {String} name: name of dashboard
  {Object} user: the dashoard owner. Has the following properties:
  {String} userId: unique user identifier
  {Object} createdBy: dashboard creator. Has the following properties:
  {String} userId: unique user identifier
  {String} userRealName: user's name
  {Date} editedDate: date dashboard was last edited
  {Array} groups: groups dashboard is assigned to
  {String} description: description of dashboard
  {String} guid: uniqued dashboard identifier
  {String} layoutConfig: Holds the various containers and panes on a dashboard and the widgets inside of the panes, including the widget states. This parameter provides an EXT JS style configuration used to layout the supported pane types in an OWF dashboard along. Each internal definition can hold nested panes in an items array, widgets in a widgets array, and default values for those widgets in a defaultValues array. Panes can have the following parameters:
  - {String} xtype: container|accordionpane|desktoppane|fitpane|portalpane|tabbedpane|dashboardsplitter
  - {Number} flex: 1 if for a pane; 3 for a container
  - {String} htmlText: in pixels (e.g., 300px) or percent (e.g., 100%) or "variable"; valid if nested in a horizontally/vertically split pane
  - {String} cls: left|right if nested in a horizontally split pane; top|bottom if nested in a vertically split pane; vbox|hbox if xtype is container
  - {Array} items: an array of 2 nested pane configurations along with a possible dashboardspliiter for vbox and hbox containers; empty otherwise
  - {String} paneType: accordionpane|desktoppane|fitpane|portalpane|tabbedpane; valid if xtype is not container
  - {Array} layout: valid only for container xtype. Includes the following elements:
  - {String} type: vbox|hbox
  - {String} align: stretch
  - {Array} widgets: array of widget state objects. Each has the following properties:
  - {String} widgetGuid: unique widget identifier
  - {Number} width: width of widget in pixels
  - {Number} zIndex: in pixels
  - {String} region: containing region on dashboard. Dashboard type specific.
  - {Boolean} pinned: true if widget is pinned open
  - {String} buttonId: identifier of button that opens widget
  - {Number} height: height of widget in pixels
  - {Number} columnPos: position of widget in a column
  - {String} name: widget name
  - {Number} statePosition
  - {Boolean} active: true if this widget is the active (has focus) widget
  - {String} uniqueId: unique widget identifier on dashboard
  - {Boolean} minimized: true if widget is minimized
  - {Boolean} buttonOpened: true if button launched widget is opened
  - {Boolean} collapsed: true if widget is collapsed
  - {Number} y: y-axis position in pixels
  - {Number} x: x-axis position in pixels
  - {Boolean} maximized: true if widget is maximized
  - {String} defaultSettings: JSON string of default settings which varies by pane type; not valid for containers
{Function} cfg.onFailure Optional
  Callback to execute if there is an error (optional, a default alert provided). Callback parameter is an error string.

<static> OWF.Preferences.createOrUpdateDashboard(cfg)
Saves changes to a new or existing dashboard

    var onSuccess = function(dashboard) {
      alert(dashboard.name);
    };

    var onFailure = function(error) {
      alert(error);
    };

    var dashboard = {
      alteredByAdmin: 'false',
      createdDate: '04/18/2012 11:29 AM EDT',
      isGroupDashboard: false,
      isdefault: false,
      locked: false,
      name: 'My Dashboard',
      user: {
        userId: 'testAdmin1',
      },
      createdBy: {
        userId: 'testAdmin1',
        userRealName: 'Test Admin 1'
      },
      editedDate: '04/18/2012 11:29 AM EDT',
      groups: [],
      description: 'This is my dashboard',
      guid: guid.util.guid(),
      layoutConfig: {
          xtype: "desktoppane",
          flex: 1,
          height: "100%",
          items: [
          ],
          paneType: "desktoppane",
          widgets: [{
                  widgetGuid: "ec5435cf-4021-4f2a-ba69-dde451d12551",
                  uniqueId: guid.util.guid(),
                  dashboardGuid: "6d7219cb-b485-ace5-946b-0affa1f227a3",
                  paneGuid: guid.util.guid(),
                  name: "Channel Listener",
                  active: false,
                  x: 50,
                  y: 66,
                  minimized: false,
                  maximized: false,
                  pinned: false,
                  collapsed: false,
                  columnPos: 0,
                  buttonId: null,
                  buttonOpened: false,
                  region: "none",
                  statePosition: 1,
                  intentConfig: null,
                  singleton: false,
                  floatingWidget: false,
                  background: false,
                  zIndex: 19050,
                  height: 440,
                  width: 540
              }
          ],
          defaultSettings: {
              widgetStates: {
                  "ec5435cf-4021-4f2a-ba69-dde451d12551": {
                      x: 50,
                      y: 66,
                      height: 440,
                      width: 540,
                      timestamp: 1349809747336
                   }
              }
          }
         }
    };

    OWF.Preferences.createOrUpdateDashboard({
      json: dashboard,
      saveAsNew: true,
      onSuccess: onSuccess,
      onFailure: onFailure,
      async: true
    });

Parameters:
{Object} cfg
  config object see below for properties
{Object} cfg.json
  The encoded JSON object representing the dashboard. The dashboard object has the following properties:
  {Boolean} alteredByAdmin: true if altered by an administrator
  {Date} createdDate: date dashboard was created
  {Boolean} isGroupDashboard: true if dashboard is a group dashboard
  {String} layout: layout of dashboard
  {Boolean} isdefault: true if this is a default dashboard
  {String} name: name of dashboard
  {Number} columnCount: number of columns if dashboard is a portal type
  {Object} user: the dashoard owner. Has the following properties:
  {String} userId: unique user identifier
  {List} EDashboardLayoutList: list of dashboard types
  {String} defaultSettings: JSON string of default settings which varies by dashboard type
  {Object} createdBy: dashboard creator. Has the following properties:
  {String} userId: unique user identifier
  {String} userRealName: user's name
  {Date} editedDate: date dashboard was last edited
  {Array} groups: groups dashboard is assigned to
  {String} description: description of dashboard
  {String} guid: uniqued dashboard identifier
  {String} layoutConfig: Holds the various containers and panes on a dashboard and the widgets inside of the panes, including the widget states. This parameter provides an EXT JS style configuration used to layout the supported pane types in an OWF dashboard along. Each internal definition can hold nested panes in an items array, widgets in a widgets array, and default values for those widgets in a defaultValues array. Panes can have the following parameters:
  - {String} xtype: container|accordionpane|desktoppane|fitpane|portalpane|tabbedpane|dashboardsplitter
  - {Number} flex: 1 if for a pane; 3 for a container
  - {String} htmlText: in pixels (e.g., 300px) or percent (e.g., 100%) or "variable"; valid if nested in a horizontally/vertically split pane
  - {String} cls: left|right if nested in a horizontally split pane; top|bottom if nested in a vertically split pane; vbox|hbox if xtype is container
  - {Array} items: an array of 2 nested pane configurations along with a possible dashboardspliiter for vbox and hbox containers; empty otherwise
  - {String} paneType: accordionpane|desktoppane|fitpane|portalpane|tabbedpane; valid if xtype is not container
  - {Array} layout: valid only for container xtype. Includes the following elements:
  - {String} type: vbox|hbox
  - {String} align: stretch
  - {Array} widgets: array of widget state objects. Each has the following properties:
  - {String} widgetGuid: unique widget identifier
  - {Number} width: width of widget in pixels
  - {Number} zIndex: in pixels
  - {String} region: containing region on dashboard. Dashboard type specific.
  - {Boolean} pinned: true if widget is pinned open
  - {String} buttonId: identifier of button that opens widget
  - {Number} height: height of widget in pixels
  - {Number} columnPos: position of widget in a column
  - {String} name: widget name
  - {Number} statePosition
  - {Boolean} active: true if this widget is the active (has focus) widget
  - {String} uniqueId: unique widget identifier on dashboard
  - {Boolean} minimized: true if widget is minimized
  - {Boolean} buttonOpened: true if button launched widget is opened
  - {Boolean} collapsed: true if widget is collapsed
  - {Number} y: y-axis position in pixels
  - {Number} x: x-axis position in pixels
  - {Boolean} maximized: true if widget is maximized
  - {String} defaultSettings: JSON string of default settings which varies by pane type; not valid for containers
{Boolean} cfg.saveAsNew
  A Boolean indicating whether the entity being saved is new.
{Function} cfg.onSuccess
  Callback function to capture the success result. Callback parameter is json representation of a Dashboard. This method will be passed the dashboard object which has the following properties:
  {Boolean} alteredByAdmin: true if altered by an administrator
  {Date} createdDate: date dashboard was created
  {Boolean} isGroupDashboard: true if dashboard is a group dashboard
  {Boolean} isdefault: true if this is a default dashboard
  {String} name: name of dashboard
  {Object} user: the dashoard owner. Has the following properties:
  {String} userId: unique user identifier
  {Object} createdBy: dashboard creator. Has the following properties:
  {String} userId: unique user identifier
  {String} userRealName: user's name
  {Date} editedDate: date dashboard was last edited
  {Array} groups: groups dashboard is assigned to
  {String} description: description of dashboard
  {String} guid: uniqued dashboard identifier
  {String} layoutConfig: Holds the various containers and panes on a dashboard and the widgets inside of the panes, including the widget states. This parameter provides an EXT JS style configuration used to layout the supported pane types in an OWF dashboard along. Each internal definition can hold nested panes in an items array, widgets in a widgets array, and default values for those widgets in a defaultValues array. Panes can have the following parameters:
  - {String} xtype: container|accordionpane|desktoppane|fitpane|portalpane|tabbedpane|dashboardsplitter
  - {Number} flex: 1 if for a pane; 3 for a container
  - {String} htmlText: in pixels (e.g., 300px) or percent (e.g., 100%) or "variable"; valid if nested in a horizontally/vertically split pane
  - {String} cls: left|right if nested in a horizontally split pane; top|bottom if nested in a vertically split pane; vbox|hbox if xtype is container
  - {Array} items: an array of 2 nested pane configurations along with a possible dashboardspliiter for vbox and hbox containers; empty otherwise
  - {String} paneType: accordionpane|desktoppane|fitpane|portalpane|tabbedpane; valid if xtype is not container
  - {Array} layout: valid only for container xtype. Includes the following elements:
  - {String} type: vbox|hbox
  - {String} align: stretch
  - {Array} widgets: array of widget state objects. Each has the following properties:
  - {String} widgetGuid: unique widget identifier
  - {Number} width: width of widget in pixels
  - {Number} zIndex: in pixels
  - {String} region: containing region on dashboard. Dashboard type specific.
  - {Boolean} pinned: true if widget is pinned open
  - {String} buttonId: identifier of button that opens widget
  - {Number} height: height of widget in pixels
  - {Number} columnPos: position of widget in a column
  - {String} name: widget name
  - {Number} statePosition
  - {Boolean} active: true if this widget is the active (has focus) widget
  - {String} uniqueId: unique widget identifier on dashboard
  - {Boolean} minimized: true if widget is minimized
  - {Boolean} buttonOpened: true if button launched widget is opened
  - {Boolean} collapsed: true if widget is collapsed
  - {Number} y: y-axis position in pixels
  - {Number} x: x-axis position in pixels
  - {Boolean} maximized: true if widget is maximized
  - {String} defaultSettings: JSON string of default settings which varies by pane type; not valid for containers
{Function} cfg.onFailure Optional
  Callback to execute if there is an error (optional, a default alert provided). Callback parameter is an error string.
{Boolean} cfg.async Optional
  Async true or false defaults to true

<static> OWF.Preferences.deleteDashboard(cfg)
Deletes the dashboard with the specified id

    var onSuccess = function(dashboard) {
        alert(dashboard.name);
    };

    var onFailure = function(error) {
        alert(error);
    };

    OWF.Preferences.deleteDashboard({
        dashboardId:'917b4cd0-ecbd-410b-afd9-42d150c26426',
        onSuccess:onSuccess,
        onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{String} cfg.dashboardId
  Unigue dashbard identifier
{Function} cfg.onSuccess
  Callback function to capture the success result. Callback parameter is json representation of a Dashboard. This method will be passed the dashboard object which has the following properties:
  {Boolean} alteredByAdmin: true if altered by an administrator
  {Date} createdDate: date dashboard was created
  {Boolean} isGroupDashboard: true if dashboard is a group dashboard
  {Boolean} isdefault: true if this is a default dashboard
  {String} name: name of dashboard
  {Object} user: the dashoard owner. Has the following properties:
  {String} userId: unique user identifier
  {Object} createdBy: dashboard creator. Has the following properties:
  {String} userId: unique user identifier
  {String} userRealName: user's name
  {Date} editedDate: date dashboard was last edited
  {Array} groups: groups dashboard is assigned to
  {String} description: description of dashboard
  {String} guid: uniqued dashboard identifier
  {String} layoutConfig: Holds the various containers and panes on a dashboard and the widgets inside of the panes, including the widget states. This parameter provides an EXT JS style configuration used to layout the supported pane types in an OWF dashboard along. Each internal definition can hold nested panes in an items array, widgets in a widgets array, and default values for those widgets in a defaultValues array. Panes can have the following parameters:
  - {String} xtype: container|accordionpane|desktoppane|fitpane|portalpane|tabbedpane|dashboardsplitter
  - {Number} flex: 1 if for a pane; 3 for a container
  - {String} htmlText: in pixels (e.g., 300px) or percent (e.g., 100%) or "variable"; valid if nested in a horizontally/vertically split pane
  - {String} cls: left|right if nested in a horizontally split pane; top|bottom if nested in a vertically split pane; vbox|hbox if xtype is container
  - {Array} items: an array of 2 nested pane configurations along with a possible dashboardspliiter for vbox and hbox containers; empty otherwise
  - {String} paneType: accordionpane|desktoppane|fitpane|portalpane|tabbedpane; valid if xtype is not container
  - {Array} layout: valid only for container xtype. Includes the following elements:
  - {String} type: vbox|hbox
  - {String} align: stretch
  - {Array} widgets: array of widget state objects. Each has the following properties:
  - {String} widgetGuid: unique widget identifier
  - {Number} width: width of widget in pixels
  - {Number} zIndex: in pixels
  - {String} region: containing region on dashboard. Dashboard type specific.
  - {Boolean} pinned: true if widget is pinned open
  - {String} buttonId: identifier of button that opens widget
  - {Number} height: height of widget in pixels
  - {Number} columnPos: position of widget in a column
  - {String} name: widget name
  - {Number} statePosition
  - {Boolean} active: true if this widget is the active (has focus) widget
  - {String} uniqueId: unique widget identifier on dashboard
  - {Boolean} minimized: true if widget is minimized
  - {Boolean} buttonOpened: true if button launched widget is opened
  - {Boolean} collapsed: true if widget is collapsed
  - {Number} y: y-axis position in pixels
  - {Number} x: x-axis position in pixels
  - {Boolean} maximized: true if widget is maximized
  - {String} defaultSettings: JSON string of default settings which varies by pane type; not valid for containers
{Function} cfg.onFailure Optional
  Callback to execute if there is an error (optional, a default alert provided). Callback parameter is an error string.

<static> OWF.Preferences.deleteUserPreference(cfg)
Deletes a user preference with the provided namespace and name.

    The following is an example of a complete preference object passed to the onSuccess
    function:

    {
    	"value":"true",
    	"path":"militaryTime",
    	"user":
    	{
    		"userId":"testAdmin1"
    	},
    	"namespace":"com.mycompany.AnnouncingClock"
    }

    function onSuccess(pref){
    	alert(pref.value);
    }

    function onFailure(error,status){
    	alert('Error ' + error);
    	alert(status);
    }

    OWF.Preferences.deleteUserPreference({
    	namespace:'com.company.widget',
    	name:'First President',
    	onSuccess:onSuccess,
    	onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{String} cfg.namespace
  The namespace of the user preference
{String} cfg.name
  The name of the user preference
{Function} cfg.onSuccess
  The function to be called if the user preference is successfully deleted from the database.
{Function} cfg.onFailure Optional
  The function to be called if the user preference cannot be deleted from the database or if the preference does not exist. If this function is not specified a default error message will be displayed. This function is passed back the following parameters:
  error: String
  The error message
  Status: The HTTP Status code
  401: You are not authorized to access this entity.
  500: An unexpected error occurred.
  404: The user preference was not found.
  400: The requested entity failed to pass validation.

<static> OWF.Preferences.doesUserPreferenceExist(cfg)
Checks for the existence of a user preference for a given namespace and name

    var onSuccess = function(obj) {
    	if (obj.statusCode = 200) {
    		alert(obj.preferenceExist);
    	}
    };

    var onFailure = function(error) {
    	alert(error);
    };

    OWF.Preferences.doesUserPreferenceExist({
    	namespace:'foo.bar.0',
    	name:'test path entry 0',
    	onSuccess:onSuccess,
    	onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{String} cfg.namespace
  The namespace of the requested user
{String} cfg.name
  The name of the requested user
{Function} cfg.onSuccess
  The callback function that is called if a preference successfully return from the database. This method is passed an object having the following properties:
  {Number} statusCode: status code
  {Boolean} preferenceExist: true if preference exists
{Function} cfg.onFailure Optional
  The callback function that is called if there was an error looking up the preference. This function is not called if the preference simply does not exist

<static> OWF.Preferences.findDashboards(cfg)
Returns all dashboards for the logged in user.

    var onSuccess = function(obj) {
        alert(obj.results);
        if (obj.results > 0) {
            for (var i = 0; i < obj.results; i++) {
                alert(obj.data[i].name);
            }
        }
    };

    var onFailure = function(error) {
        alert(error);
    };

    OWF.Preferences.findDashboards({
        onSuccess:onSuccess,
        onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{Function} cfg.onSuccess
  Callback function to capture the success result. This method is passed an object having the following properties:
  {Boolean} success: true if dashboards found
  {Number} results: number of dashboards found
  {Array} data: array of dashboards objects found. Dashboard object has the following properties:
  {Boolean} alteredByAdmin: true if altered by an administrator
  {Date} createdDate: date dashboard was created
  {Boolean} isGroupDashboard: true if dashboard is a group dashboard
  {Boolean} isdefault: true if this is a default dashboard
  {String} name: name of dashboard
  {Object} user: the dashoard owner. Has the following properties:
  {String} userId: unique user identifier
  {Object} createdBy: dashboard creator. Has the following properties:
  {String} userId: unique user identifier
  {String} userRealName: user's name
  {Date} editedDate: date dashboard was last edited
  {Array} groups: groups dashboard is assigned to
  {String} description: description of dashboard
  {String} guid: uniqued dashboard identifier
  {String} layoutConfig: Holds the various containers and panes on a dashboard and the widgets inside of the panes, including the widget states. This parameter provides an EXT JS style configuration used to layout the supported pane types in an OWF dashboard along. Each internal definition can hold nested panes in an items array, widgets in a widgets array, and default values for those widgets in a defaultValues array. Panes can have the following parameters:
  - {String} xtype: container|accordionpane|desktoppane|fitpane|portalpane|tabbedpane|dashboardsplitter
  - {Number} flex: 1 if for a pane; 3 for a container
  - {String} htmlText: in pixels (e.g., 300px) or percent (e.g., 100%) or "variable"; valid if nested in a horizontally/vertically split pane
  - {String} cls: left|right if nested in a horizontally split pane; top|bottom if nested in a vertically split pane; vbox|hbox if xtype is container
  - {Array} items: an array of 2 nested pane configurations along with a possible dashboardspliiter for vbox and hbox containers; empty otherwise
  - {String} paneType: accordionpane|desktoppane|fitpane|portalpane|tabbedpane; valid if xtype is not container
  - {Array} layout: valid only for container xtype. Includes the following elements:
  - {String} type: vbox|hbox
  - {String} align: stretch
  - {Array} widgets: array of widget state objects. Each has the following properties:
  - {String} widgetGuid: unique widget identifier
  - {Number} width: width of widget in pixels
  - {Number} zIndex: in pixels
  - {String} region: containing region on dashboard. Dashboard type specific.
  - {Boolean} pinned: true if widget is pinned open
  - {String} buttonId: identifier of button that opens widget
  - {Number} height: height of widget in pixels
  - {Number} columnPos: position of widget in a column
  - {String} name: widget name
  - {Number} statePosition
  - {Boolean} active: true if this widget is the active (has focus) widget
  - {String} uniqueId: unique widget identifier on dashboard
  - {Boolean} minimized: true if widget is minimized
  - {Boolean} buttonOpened: true if button launched widget is opened
  - {Boolean} collapsed: true if widget is collapsed
  - {Number} y: y-axis position in pixels
  - {Number} x: x-axis position in pixels
  - {Boolean} maximized: true if widget is maximized
  - {String} defaultSettings: JSON string of default settings which varies by pane type; not valid for containers
{Function} cfg.onFailure Optional
  Callback to execute if there is an error (optional, a default alert provided). Callback parameter is an error string.

<static> OWF.Preferences.findDashboardsByType(cfg)
Returns all dashboards for the logged in user filtered by the type of dashboard.

    var onSuccess = function(obj) {
        alert(obj.results);
        if (obj.results > 0) {
            for (var i = 0; i < obj.results; i++) {
                alert(obj.data[i].name);
            }
        }
    };

    var onFailure = function(error) {
        alert(error);
    };

    OWF.Preferences.findDashboardsByType({
        type:'desktop',
        onSuccess:onSuccess,
        onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{String} cfg.type
  A string representing the type of dashboard. If using built in dashboard types, this would include desktop, tabbed, portal, and accordion.
{Function} cfg.onSuccess
  Callback function to capture the success result. This method is passed an object having the following properties:
  {Boolean} success: true if dashboards found
  {Number} results: number of dashboards found
  {Array} data: an empty array
{Function} cfg.onFailure Optional
  Callback to execute if there is an error (optional, a default alert provided). Callback parameter is an error string.

Deprecated:
Deprecated starting with OWF 7. Dashboards no longer have a specific type. This function is stubbed to return success with 0 results until removal.

<static> OWF.Preferences.findWidgets(cfg)
Gets all widgets for a given user.

    var onSuccess = function(widgets) {
    	if (widgets.length > 0) {
    		alert(widgets[0].value.namespace);
    	}
    };

    var onFailure = function(error, status) {
    	alert(error);
    };

    OWF.Preferences.findWidgets({
    	onSuccess:onSuccess,
    	onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{Boolean} cfg.userOnly Optional
  boolean flag that determines whether to only return widgets assigned to the user (excluding widgets to which the user only has access via their assigned groups)
{Object} cfg.searchParams Optional
  object containing search parameters
{String} cfg.searchParams.widgetName Optional
  name of widget '%' are wildcards
{String} cfg.searchParams.widgetNameExactMatch Optional
  true or false to match the name exactly. defaults to false
{String} cfg.searchParams.widgetVersion Optional
  version of widget '%' are wildcards
{String} cfg.searchParams.widgetGuid Optional
  guid of widget '%' are wildcards
{Function} cfg.onSuccess
  callback function to capture the success result. This method is passed an array of objects having the following properties:
  {Number} id: database pk identifier
  {String} namespace: "widget"
  {Object} value: widget object having the following properties:
  {Boolean} editable: true if widget can be edited
  {Boolean} visible: true if widget is visible
  {Number} position
  {String} userId: widget owner identifier
  {String} userRealName: widget owner name
  {String} namespace: widget name
  {String} url: url of widget application
  {String} headerIcon: url of widget header icon
  {String} image: url of widget image
  {String} smallIconUrl: url of widget's small icon
  {String} largeIconUrl: url of widget's large icon
  {Number} width: width of the widget in pixels
  {Number} height: height of the widget in pixels
  {Number} x: x-axis position
  {Number} y: y-axis position
  {Boolean} minimized: true if widget is minimized
  {Boolean} maximized: true if widget is maximized
  {String} widgetVersion: widget version
  {Array} tags: array of tag strings
  {Boolean} definitionVisible: true if definition is visible
  {Boolean} singleton: true if widget is a singleton
  {Boolean} background: true if widget runs in the background
  {Array} allRequired: array of all widgets required by this widget
  {Array} directRequired: array of all widgets directly required by this widget
  {Array} widgetTypes: array of widget types this widget belongs to
  {String} path: unnique widget identifier
{Function} cfg.onFailure Optional
  callback to execute if there is an error (optional, a default alert provided). This callback is called with two parameters: a error message string, and optionally a status code

<static> OWF.Preferences.getCurrentUser(cfg)
retrieves the current user logged into the system

    var onSuccess = function(obj) {
    	if (obj) {
    		alert(obj.currentUser);
    	}
    };

    var onFailure = function(error) {
    	alert(error);
    };

    OWF.Preferences.getCurrentUser({
    	onSuccess:onSuccess,
    	onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{Function} cfg.onSuccess
  The callback function that is called for a successful retrieval of the user logged in. This method is passed an object having the following properties:
  {String} currentUserName: user name
  {String} currentUser: user real name
  {Date} currentUserPrevLogin: previous login date
  {Number} currentId: database pk index
{Function} cfg.[onFailure]
  The callback function that is called when the system is unable to retrieve the current user logged in. Callback parameter is an error string.

<static> OWF.Preferences.getDashboard(cfg)
Gets the dashboard with the specified id

    var onSuccess = function(dashboard) {
        alert(dashboard.name);
    };

    var onFailure = function(error) {
        alert(error);
    };

    Ozone.Preferences.getDashboard({
        dashboardId:'917b4cd0-ecbd-410b-afd9-42d150c26426',
        onSuccess:onSuccess,
        onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{String} cfg.dashboardId
  Unigue dashbard identifier
{Function} cfg.onSuccess
  Callback function to capture the success result. Callback parameter is json representation of a dashboard. This method will be passed the dashboard object which has the following properties:
  {Boolean} alteredByAdmin: true if altered by an administrator
  {Date} createdDate: date dashboard was created
  {Boolean} isGroupDashboard: true if dashboard is a group dashboard
  {Boolean} isdefault: true if this is a default dashboard
  {String} name: name of dashboard
  {Object} user: the dashoard owner. Has the following properties:
  {String} userId: unique user identifier
  {Object} createdBy: dashboard creator. Has the following properties:
  {String} userId: unique user identifier
  {String} userRealName: user's name
  {Date} editedDate: date dashboard was last edited
  {Array} groups: groups dashboard is assigned to
  {String} description: description of dashboard
  {String} guid: uniqued dashboard identifier
  {String} layoutConfig: Holds the various containers and panes on a dashboard and the widgets inside of the panes, including the widget states. This parameter provides an EXT JS style configuration used to layout the supported pane types in an OWF dashboard along. Each internal definition can hold nested panes in an items array, widgets in a widgets array, and default values for those widgets in a defaultValues array. Panes can have the following parameters:
  - {String} xtype: container|accordionpane|desktoppane|fitpane|portalpane|tabbedpane|dashboardsplitter
  - {Number} flex: 1 if for a pane; 3 for a container
  - {String} htmlText: in pixels (e.g., 300px) or percent (e.g., 100%) or "variable"; valid if nested in a horizontally/vertically split pane
  - {String} cls: left|right if nested in a horizontally split pane; top|bottom if nested in a vertically split pane; vbox|hbox if xtype is container
  - {Array} items: an array of 2 nested pane configurations along with a possible dashboardspliiter for vbox and hbox containers; empty otherwise
  - {String} paneType: accordionpane|desktoppane|fitpane|portalpane|tabbedpane; valid if xtype is not container
  - {Array} layout: valid only for container xtype. Includes the following elements:
  - {String} type: vbox|hbox
  - {String} align: stretch
  - {Array} widgets: array of widget state objects. Each has the following properties:
  - {String} widgetGuid: unique widget identifier
  - {Number} width: width of widget in pixels
  - {Number} zIndex: in pixels
  - {String} region: containing region on dashboard. Dashboard type specific.
  - {Boolean} pinned: true if widget is pinned open
  - {String} buttonId: identifier of button that opens widget
  - {Number} height: height of widget in pixels
  - {Number} columnPos: position of widget in a column
  - {String} name: widget name
  - {Number} statePosition
  - {Boolean} active: true if this widget is the active (has focus) widget
  - {String} uniqueId: unique widget identifier on dashboard
  - {Boolean} minimized: true if widget is minimized
  - {Boolean} buttonOpened: true if button launched widget is opened
  - {Boolean} collapsed: true if widget is collapsed
  - {Number} y: y-axis position in pixels
  - {Number} x: x-axis position in pixels
  - {Boolean} maximized: true if widget is maximized
  - {String} defaultSettings: JSON string of default settings which varies by pane type; not valid for containers
{Function} cfg.onFailure Optional
  Callback to execute if there is an error (optional, a default alert provided). Callback parameter is an error string.

<static> OWF.Preferences.getDefaultDashboard(cfg)
Gets the user's default dashboard

    var onSuccess = function(dashboard) {
        alert(dashboard.name);
    };

    var onFailure = function(error) {
        alert(error);
    };

    Ozone.Preferences.getDashboard({
        onSuccess:onSuccess,
        onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{Function} cfg.onSuccess
  Callback function to capture the success result. Callback parameter is json representation of a Dashboard. This method will be passed the dashboard object which has the following properties:
  {Boolean} alteredByAdmin: true if altered by an administrator
  {Date} createdDate: date dashboard was created
  {Boolean} isGroupDashboard: true if dashboard is a group dashboard
  {Boolean} isdefault: true if this is a default dashboard
  {String} name: name of dashboard
  {Object} user: the dashoard owner. Has the following properties:
  {String} userId: unique user identifier
  {Object} createdBy: dashboard creator. Has the following properties:
  {String} userId: unique user identifier
  {String} userRealName: user's name
  {Date} editedDate: date dashboard was last edited
  {Array} groups: groups dashboard is assigned to
  {String} description: description of dashboard
  {String} guid: uniqued dashboard identifier
  {String} layoutConfig: Holds the various containers and panes on a dashboard and the widgets inside of the panes, including the widget states. This parameter provides an EXT JS style configuration used to layout the supported pane types in an OWF dashboard along. Each internal definition can hold nested panes in an items array, widgets in a widgets array, and default values for those widgets in a defaultValues array. Panes can have the following parameters:
  - {String} xtype: container|accordionpane|desktoppane|fitpane|portalpane|tabbedpane|dashboardsplitter
  - {Number} flex: 1 if for a pane; 3 for a container
  - {String} htmlText: in pixels (e.g., 300px) or percent (e.g., 100%) or "variable"; valid if nested in a horizontally/vertically split pane
  - {String} cls: left|right if nested in a horizontally split pane; top|bottom if nested in a vertically split pane; vbox|hbox if xtype is container
  - {Array} items: an array of 2 nested pane configurations along with a possible dashboardspliiter for vbox and hbox containers; empty otherwise
  - {String} paneType: accordionpane|desktoppane|fitpane|portalpane|tabbedpane; valid if xtype is not container
  - {Array} layout: valid only for container xtype. Includes the following elements:
  - {String} type: vbox|hbox
  - {String} align: stretch
  - {Array} widgets: array of widget state objects. Each has the following properties:
  - {String} widgetGuid: unique widget identifier
  - {Number} width: width of widget in pixels
  - {Number} zIndex: in pixels
  - {String} region: containing region on dashboard. Dashboard type specific.
  - {Boolean} pinned: true if widget is pinned open
  - {String} buttonId: identifier of button that opens widget
  - {Number} height: height of widget in pixels
  - {Number} columnPos: position of widget in a column
  - {String} name: widget name
  - {Number} statePosition
  - {Boolean} active: true if this widget is the active (has focus) widget
  - {String} uniqueId: unique widget identifier on dashboard
  - {Boolean} minimized: true if widget is minimized
  - {Boolean} buttonOpened: true if button launched widget is opened
  - {Boolean} collapsed: true if widget is collapsed
  - {Number} y: y-axis position in pixels
  - {Number} x: x-axis position in pixels
  - {Boolean} maximized: true if widget is maximized
  - {String} defaultSettings: JSON string of default settings which varies by pane type; not valid for containers
{Function} cfg.onFailure Optional
  Callback to execute if there is an error (optional, a default alert provided). Callback parameter is an error string.

<static> OWF.Preferences.getServerVersion(cfg)
For retrieving the OWF system server version

    var onSuccess = function(obj) {
    	if (obj) {
    		alert(obj.serverVersion);
    	}
    };

    var onFailure = function(error) {
    	alert(error);
    };

    OWF.Preferences.getServerVersion({
    	onSuccess:onSuccess,
    	onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{Function} cfg.onSuccess
  The callback function that is called for successfully retrieving the server version of the OWF system. This method is passed an object having the following properties:
  {String} {serverVersion: server version
{Function} cfg.onFailure Optional
  The callback function that is called when the system fails to retrieve the server version of the OWF system. Callback parameter is an error string.

<static> {String} OWF.Preferences.getUrl()
Get the url for the Preference Server

Returns:
  {String} url

<static> OWF.Preferences.getUserPreference(cfg)
Retrieves the user preference for the provided name and namespace

    The following is an example of a complete preference object passed to the onSuccess
    function:
    {
    	"value":"true",
    	"path":"militaryTime",
    	"user":
    	{
    		"userId":"testAdmin1"
    	},
    	"namespace":"com.mycompany.AnnouncingClock"
    }

    The following shows how to make a call to getUserPreference:
    function onSuccess(pref){
    	alert(Ozone.util.toString(pref.value));
    }

    function onFailure(error,status){
    	alert('Error ' + error);
    	alert(status);
    }

    // The following code calls getUserPreference with the above defined onSuccess and
    // onFailure callbacks.
    OWF.Preferences.getUserPreference({
    	namespace:'com.company.widget',
    	name:'First President',
    	onSuccess:onSuccess,
    	onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{String} cfg.namespace
  The namespace of the requested user preference
{String} cfg.name
  The name of the requested user preference
{Function} cfg.onSuccess
  The function to be called if the user preference is successfully retrieved from the database. This function takes a single argument, which is a JSON object. If a preference is found, the complete JSON structure as shown below will be returned. If it is not found this function be passed an empty JSON object.
{Function} cfg.onFailure Optional
  This parameter is optional. If this function is not specified a default error message will be displayed.This function is called if an error occurs on preference retrieval. It is not called if the preference is simply missing. This function should accept two arguments:
  error: String
  The error message
  Status: The numeric HTTP Status code (if applicable)
  401: You are not authorized to access this entity.
  500: An unexpected error occurred.
  404: The user preference was not found.
  400: The requested entity failed to pass validation.

<static> OWF.Preferences.getWidget(cfg)
Gets the widget with the specified id

    var onSuccess = function(obj) {
    	if (obj.value) {
    		alert(obj.value.namespace);
    	}
    };

    var onFailure = function(error) {
    	alert(error);
    };

    OWF.Preferences.getWidget({
    	widgetId:'ea5435cf-4021-4f2a-ba69-dde451d12551',
    	onSuccess:onSuccess,
    	onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{String} cfg.widgetId
  The unique identifier (normally a guid) for the widget.
{Function} cfg.onSuccess
  Callback function to capture the success result. Callback is passed the following object as a parameter: {id:Number, namespace:String, value:Object, path:String} This method is passed an object having the following properties:
  {Number} id: database pk identifier
  {String} namespace: "widget"
  {Object} value: widget object having the following properties:
  {Boolean} editable: true if widget can be edited
  {Boolean} visible: true if widget is visible
  {Number} position
  {String} userId: widget owner identifier
  {String} userRealName: widget owner name
  {String} namespace: widget name
  {String} url: url of widget application
  {String} headerIcon: url of widget header icon
  {String} image: url of widget image
  {String} smallIconUrl: url of widget's small icon
  {String} largeIconUrl: url of widget's large icon
  {Number} width: width of the widget in pixels
  {Number} height: height of the widget in pixels
  {Number} x: x-axis position
  {Number} y: y-axis position
  {Boolean} minimized: true if widget is minimized
  {Boolean} maximized: true if widget is maximized
  {String} widgetVersion: widget version
  {Array} tags: array of tag strings
  {Boolean} definitionVisible: true if definition is visible
  {Boolean} singleton: true if widget is a singleton
  {Boolean} background: true if widget runs in the background
  {Array} allRequired: array of all widgets required by this widget
  {Array} directRequired: array of all widgets directly required by this widget
  {Array} widgetTypes: array of widget types this widget belongs to
  {String} path: unnique widget identifier
{Function} cfg.onFailure Optional
  Callback to execute if there is an error (optional, a default alert provided). Callback parameter is an error string.

<static> OWF.Preferences.setDefaultDashboard(cfg)
Sets the user's default dashboard

    var onSuccess = function(dashboard) {
        alert(dashboard.name);
    };

    var onFailure = function(error) {
        alert(error);
    };

    OWF.Preferences.setDefaultDashboard({
        dashboardId:'917b4cd0-ecbd-410b-afd9-42d150c26426',
        isDefault:true,
        onSuccess:onSuccess,
        onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{String} cfg.dashboardId
  Unigue dashbard identifier
{Boolean} cfg.isDefault
  true to set as default dashboard
{Function} cfg.onSuccess
  Callback function to capture the success result. Callback parameter is json representation of a Dashboard. This method will be passed the dashboard object which has the following properties:
  {Boolean} alteredByAdmin: true if altered by an administrator
  {Date} createdDate: date dashboard was created
  {Boolean} isGroupDashboard: true if dashboard is a group dashboard
  {Boolean} isdefault: true if this is a default dashboard
  {String} name: name of dashboard
  {Object} user: the dashoard owner. Has the following properties:
  {String} userId: unique user identifier
  {Object} createdBy: dashboard creator. Has the following properties:
  {String} userId: unique user identifier
  {String} userRealName: user's name
  {Date} editedDate: date dashboard was last edited
  {Array} groups: groups dashboard is assigned to
  {String} description: description of dashboard
  {String} guid: uniqued dashboard identifier
  {String} layoutConfig: Holds the various containers and panes on a dashboard and the widgets inside of the panes, including the widget states. This parameter provides an EXT JS style configuration used to layout the supported pane types in an OWF dashboard along. Each internal definition can hold nested panes in an items array, widgets in a widgets array, and default values for those widgets in a defaultValues array. Panes can have the following parameters:
  - {String} xtype: container|accordionpane|desktoppane|fitpane|portalpane|tabbedpane|dashboardsplitter
  - {Number} flex: 1 if for a pane; 3 for a container
  - {String} htmlText: in pixels (e.g., 300px) or percent (e.g., 100%) or "variable"; valid if nested in a horizontally/vertically split pane
  - {String} cls: left|right if nested in a horizontally split pane; top|bottom if nested in a vertically split pane; vbox|hbox if xtype is container
  - {Array} items: an array of 2 nested pane configurations along with a possible dashboardspliiter for vbox and hbox containers; empty otherwise
  - {String} paneType: accordionpane|desktoppane|fitpane|portalpane|tabbedpane; valid if xtype is not container
  - {Array} layout: valid only for container xtype. Includes the following elements:
  - {String} type: vbox|hbox
  - {String} align: stretch
  - {Array} widgets: array of widget state objects. Each has the following properties:
  - {String} widgetGuid: unique widget identifier
  - {Number} width: width of widget in pixels
  - {Number} zIndex: in pixels
  - {String} region: containing region on dashboard. Dashboard type specific.
  - {Boolean} pinned: true if widget is pinned open
  - {String} buttonId: identifier of button that opens widget
  - {Number} height: height of widget in pixels
  - {Number} columnPos: position of widget in a column
  - {String} name: widget name
  - {Number} statePosition
  - {Boolean} active: true if this widget is the active (has focus) widget
  - {String} uniqueId: unique widget identifier on dashboard
  - {Boolean} minimized: true if widget is minimized
  - {Boolean} buttonOpened: true if button launched widget is opened
  - {Boolean} collapsed: true if widget is collapsed
  - {Number} y: y-axis position in pixels
  - {Number} x: x-axis position in pixels
  - {Boolean} maximized: true if widget is maximized
  - {String} defaultSettings: JSON string of default settings which varies by pane type; not valid for containers
{Function} cfg.onFailure Optional
  Callback to execute if there is an error (optional, a default alert provided). Callback parameter is an error string.

<static> OWF.Preferences.setUrl(url)
Sets the url for the Preference Server

Parameters:
{String} url

Returns:
  void

<static> OWF.Preferences.setUserPreference(cfg)
Creates or updates a user preference for the provided namespace and name.

    The following is an example of a complete preference object passed to the onSuccess function:
    {
    	"value":"true",
    	"path":"militaryTime",
    	"user": {
    		"userId":"testAdmin1"
    	},
    	"namespace":"com.mycompany.AnnouncingClock"
    }

    function onSuccess(pref){
    	alert(pref.value);
    }

    function onFailure(error,status){
    	alert('Error ' + error);
    	alert(status);
    }

    var text = 'George Washington';
    OWF.Preferences.setUserPreference({
    	namespace:'com.company.widget',
    	name:'First President',
    	value:text,
    	onSuccess:onSuccess,
    	onFailure:onFailure
    });

Parameters:
{Object} cfg
  config object see below for properties
{String} cfg.namespace
  The namespace of the user preference
{String} cfg.name
  The name of the user preference
{String} cfg.value
  The value of the user preference. The value can be any string including JSON.
{Function} cfg.onSuccess
  The function to be called if the user preference is successfully updated in the database.
{Function} cfg.onFailure Optional
  The function to be called if the user preference cannot be stored in the database. If this function is not specified a default error message will be displayed. This function is passed back the following parameters:
  error: String
  The error message
  Status: The HTTP Status code
  401: You are not authorized to access this entity.
  500: An unexpected error occurred.
  404: The requested entity was not found.
  400: The requested entity failed to pass validation.

<static> OWF.Preferences.updateAndDeleteDashboards(cfg)
Saves changes to existing dashboards

Parameters:
{Object} cfg
  config object see below for properties
{Array} cfg.viewsToUpdate
  array of JSON objects containing the view guid and data to be updated
{Array} cfg.viewGuidsToDelete
  array of guids of views to be deleted
{Boolean} cfg.updateOrder
  flag to update order
{Function} cfg.onSuccess
  callback function to capture the success result
{Function} cfg.onFailure Optional
  callback to execute if there is an error (optional, a default alert provided)

<static> OWF.Preferences.updateAndDeleteWidgets(cfg)
Saves changes to existing widgets

Parameters:
{Object} cfg
  config object see below for properties
{Array} cfg.widgetsToUpdate
  array of JSON objects containing the widget guid and data to be updated
{Array} cfg.widgetGuidsToDelete
  array of guids of widgets to be deleted
{Boolean} cfg.updateOrder
  flag to update order
{Function} cfg.onSuccess
  callback function to capture the success result
{Function} cfg.onFailure Optional
  callback to execute if there is an error (optional, a default alert provided)

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Dec 21 2012 17:25:00 GMT-0500 (EST)