Interface
caplin.services

WorkspaceService

The class is still an Alpha release. It should only be used for experimental development as substantial changes may occur.
The WorkspaceService provides access to the user's {caplin.services.workspace.Workspace}s, and also allows the creation of new ones.

This service can be accessed from the caplin.core.AliasRegistry, using the alias 'caplin.workspace-service'. There is no default implementation for this service.

Constructor Summary

Attributes Name and Description
caplin.services.WorkspaceService()

Method Summary

Attributes Name and Description
void closeWorkspace( workspace)

Closes the given workspace, removing it from the view and from the list of open workspaces.

caplin.services.workspace.Workspace createWorkspace(caplin.services.workspace.Workspace workspaceToCopy)

Creates a new workspace.

void deleteWorkspace( workspace)

Deletes the given workspace, removing it from the list of available workspaces.

Array getAvailableWorkspaces()

Returns an array of all workspaces that the user has available to them.

Array getOpenWorkspaces()

Returns an array of all workspaces that the user currently has open.

caplin.services.workspace.Workspace getSelectedWorkspace()

Returns the currently selected workspace.

void openWorkspace( workspace)

Opens the given workspace, adding it to the view and the list of open workspaces.

void saveWorkspace(caplin.services.workspace.Workspace workspace)

Saves the given workspace.

void selectWorkspace( workspace)

Selects the given workspace.

Constructor Detail

caplin.services.WorkspaceService()

Method Detail

void closeWorkspace( workspace)

Closes the given workspace, removing it from the view and from the list of open workspaces. Usually this will trigger a select on a different workspace, if this workspace was the currently selected workspace.

Parameters
workspace

caplin.services.workspace.Workspace createWorkspace(caplin.services.workspace.Workspace workspaceToCopy)

Creates a new workspace. If the optional workspace argument is provided, the new workspace will be a copy of the given workspace.

Parameters
caplin.services.workspace.Workspace workspaceToCopy (optional) The workspace to be copied.
Returns
{caplin.services.workspace.Workspace} The newly created workspace.

void deleteWorkspace( workspace)

Deletes the given workspace, removing it from the list of available workspaces. This will also remove it from the view and the list of open workspaces, if it was currently open. Usually this will trigger a select on a different workspace, if this workspace was the currently selected workspace.

Parameters
workspace

Array getAvailableWorkspaces()

Returns an array of all workspaces that the user has available to them.

Returns
{Array} The user's available workspaces.

Array getOpenWorkspaces()

Returns an array of all workspaces that the user currently has open.

Returns
{Array} The user's currently open workspaces.

caplin.services.workspace.Workspace getSelectedWorkspace()

Returns the currently selected workspace.

Returns
{caplin.services.workspace.Workspace} The currently selected workspace.

void openWorkspace( workspace)

Opens the given workspace, adding it to the view and the list of open workspaces. This will usually make it the selected workspace.

Parameters
workspace

void saveWorkspace(caplin.services.workspace.Workspace workspace)

Saves the given workspace.

Parameters
caplin.services.workspace.Workspace workspace The workspace to be saved.

void selectWorkspace( workspace)

Selects the given workspace. This will typically bring it to the front, and allow context sensitive actions to be performed on it.

Parameters
workspace