Class Workspace

Description

The Workspace object represents a "view" of an actual repository workspace entity as seen through the authorization settings of its associated Session.

Each Workspace object is associated one-to-one with a Session object. The Workspace object can be acquired by calling Session->getWorkspace() on the associated Session object.

  • author:
  • version: 1.0

Located in /Workspace.php (line 11)


	
			
Method Summary
 Workspace __construct ( &$pm, generic $pm)
 void copy (string $sourcePath, string $destinationPath)
 string getName ()
 void _clone (string $workspace, string $sourcePath, string $destinationPath)
Methods
Constructor __construct (line 21)

Creates a new Workspace object, given an active session (i.e. PersistenceManager).

  • access: public
Workspace __construct ( &$pm, generic $pm)
  • generic $pm: the active PersistenceManager.
  • &$pm
copy (line 95)

This method copies the node at $sourcePath to the new location at $destinationPath.

If successful, the change is persisted immediately. Strictly speaking, the $destinationPath parameter is actually an absolute path to the parent node of the new location, appended with the new name desired for the copied node. This method cannot be used to copy just an individual property by itself. It copies an entire node and its subtree (including, of course, any properties contained therein). A PathNotFoundException is thrown if the node at $sourcePath or the parent of $destinationPath does not exist. An ItemExistException is thrown if a Node already exists at $destinationPath.

  • access: public
void copy (string $sourcePath, string $destinationPath)
  • string $sourcePath: the root of the subtree to be copied.
  • string $destinationPath: the location to which the subtree is to be copied.
getAccessibleWorkspaceNames (line 124)

Returns an string array containing the names of all workspaces in the repository.

In order to access one of the listed workspaces, the user performs another Repository->login, specifying the name of the desired workspace, and receives a new Session object.

  • return: string array of names of accessible workspaces.
  • access: public
array getAccessibleWorkspaceNames ()
getName (line 146)

Returns the name of the actual persistent workspace represented by this Workspace object.

  • return: the name of this workspace.
  • access: public
string getName ()
getQueryManager (line 157)

Gets the QueryManager.

Returns the QueryManager object, through search methods are accessed.

  • return: the QueryManager object.
  • access: public
QueryManager getQueryManager ()
_clone (line 41)

Clones the subtree at the node $sourcePath in $workspace to the new location at $destinationPath in this workspace.

If successful, the change is persisted immediately. Strictly speaking, the $destinationPath parameter is actually an absolute path to the parent node of the new location, appended with the new name desired for the cloned node. This method cannot be used to clone just an individual property by itself. It clones an entire node and its subtree (including, of course, any properties contained therein). A NoSuchWorkspaceException is thrown if $workspace does not exist or if the current Session does not have permission to access it. A PathNotFoundException is thrown if the node at $sourcePath in $workspace or the parent of $destinationPath in this workspace does not exist. An ItemExistsException is thrown if a node or property already exists at $destinationPath. An ItemExistException is thrown if a node already exists at $destinationPath.

  • access: public
void _clone (string $workspace, string $sourcePath, string $destinationPath)
  • string $workspace: - The name of the workspace from which the node is to be copied.
  • string $sourcePath: - the path of the node to be cloned in $workspace.
  • string $destinationPath: - the location to which the node at $workspace=>$sourcePath is to be cloned in this workspace.

Documentation generated on Sun, 04 Oct 2009 07:13:13 +0800 by phpDocumentor 1.4.3