org.apache.jackrabbit.api.jsr283
Interface Workspace

All Superinterfaces:
Workspace

public interface Workspace
extends Workspace

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.


Field Summary
static String NAME_ACTIVITIES_NODE
          A constant for the name of the activities node.
static String NAME_CONFIGURATIONS_NODE
          A constant for the name of the configurations node.
static String NAME_JCR_XMLCHARACTERS
          A constant for the name of the jcr:xmlcharacters property produced on Workspace.importXML(java.lang.String, java.io.InputStream, int).
static String NAME_JCR_XMLTEXT
          A constant for the name of the jcr:xmltext node produced on Workspace.importXML(java.lang.String, java.io.InputStream, int).
static String NAME_NODE_TYPES_NODE
          A constant for the name of the node type definition storage node.
static String NAME_SYSTEM_NODE
          A constant for the name of the system node.
static String NAME_UNFILED_NODE
          A constant for the name of the unfiled storage node.
static String NAME_VERSION_STORAGE_NODE
          A constant for the name of the version storage node.
static String NAME_WORKSPACE_ROOT
          A constant for the name of the workspace root node.
static String PATH_ACTIVITIES_NODE
          A constant for the absolute path of the activities node.
static String PATH_CONFIGURATIONS_NODE
          A constant for the absolute path of the configurations node.
static String PATH_NODE_TYPES_NODE
          A constant for the absolute path of the node type definition storage node.
static String PATH_SYSTEM_NODE
          A constant for the absolute path of the system node.
static String PATH_UNFILED_NODE
          A constant for the absolute path of the unfiled storage node.
static String PATH_VERSION_STORAGE_NODE
          A constant for the absolute path of the version storage node.
static String PATH_WORKSPACE_ROOT
          A constant for the absolute path of the workspace root node.
static String RELPATH_JCR_XMLCHARACTERS
          A constant for the relative path from the node representing the imported XML element of the jcr:xmlcharacters property produced on Workspace.importXML(java.lang.String, java.io.InputStream, int).
 
Method Summary
 void createWorkspace(String name)
          Creates a new Workspace with the specified name.
 void createWorkspace(String name, String srcWorkspace)
          Creates a new Workspace with the specified name initialized with a clone of the content of the workspace srcWorkspace.
 void deleteWorkspace(String name)
          Deletes the workspace with the specified name from the repository, deleting all content within it.
 LockManager getLockManager()
          Returns the LockManager object, through which locking methods are accessed.
 VersionManager getVersionManager()
          Returns the VersionManager object.
 
Methods inherited from interface javax.jcr.Workspace
clone, copy, copy, getAccessibleWorkspaceNames, getImportContentHandler, getName, getNamespaceRegistry, getNodeTypeManager, getObservationManager, getQueryManager, getSession, importXML, move, restore
 

Field Detail

NAME_WORKSPACE_ROOT

static final String NAME_WORKSPACE_ROOT
A constant for the name of the workspace root node.

Since:
JCR 2.0
See Also:
Constant Field Values

PATH_WORKSPACE_ROOT

static final String PATH_WORKSPACE_ROOT
A constant for the absolute path of the workspace root node.

Since:
JCR 2.0
See Also:
Constant Field Values

NAME_SYSTEM_NODE

static final String NAME_SYSTEM_NODE
A constant for the name of the system node.

Since:
JCR 2.0
See Also:
Constant Field Values

PATH_SYSTEM_NODE

static final String PATH_SYSTEM_NODE
A constant for the absolute path of the system node.

Since:
JCR 2.0
See Also:
Constant Field Values

NAME_NODE_TYPES_NODE

static final String NAME_NODE_TYPES_NODE
A constant for the name of the node type definition storage node.

Since:
JCR 2.0
See Also:
Constant Field Values

PATH_NODE_TYPES_NODE

static final String PATH_NODE_TYPES_NODE
A constant for the absolute path of the node type definition storage node.

Since:
JCR 2.0
See Also:
Constant Field Values

NAME_VERSION_STORAGE_NODE

static final String NAME_VERSION_STORAGE_NODE
A constant for the name of the version storage node.

Since:
JCR 2.0
See Also:
Constant Field Values

PATH_VERSION_STORAGE_NODE

static final String PATH_VERSION_STORAGE_NODE
A constant for the absolute path of the version storage node.

Since:
JCR 2.0
See Also:
Constant Field Values

NAME_ACTIVITIES_NODE

static final String NAME_ACTIVITIES_NODE
A constant for the name of the activities node.

Since:
JCR 2.0
See Also:
Constant Field Values

PATH_ACTIVITIES_NODE

static final String PATH_ACTIVITIES_NODE
A constant for the absolute path of the activities node.

Since:
JCR 2.0
See Also:
Constant Field Values

NAME_CONFIGURATIONS_NODE

static final String NAME_CONFIGURATIONS_NODE
A constant for the name of the configurations node.

Since:
JCR 2.0
See Also:
Constant Field Values

PATH_CONFIGURATIONS_NODE

static final String PATH_CONFIGURATIONS_NODE
A constant for the absolute path of the configurations node.

Since:
JCR 2.0
See Also:
Constant Field Values

NAME_UNFILED_NODE

static final String NAME_UNFILED_NODE
A constant for the name of the unfiled storage node.

Since:
JCR 2.0
See Also:
Constant Field Values

PATH_UNFILED_NODE

static final String PATH_UNFILED_NODE
A constant for the absolute path of the unfiled storage node.

Since:
JCR 2.0
See Also:
Constant Field Values

NAME_JCR_XMLTEXT

static final String NAME_JCR_XMLTEXT
A constant for the name of the jcr:xmltext node produced on Workspace.importXML(java.lang.String, java.io.InputStream, int).

Since:
JCR 2.0
See Also:
Constant Field Values

NAME_JCR_XMLCHARACTERS

static final String NAME_JCR_XMLCHARACTERS
A constant for the name of the jcr:xmlcharacters property produced on Workspace.importXML(java.lang.String, java.io.InputStream, int).

Since:
JCR 2.0
See Also:
Constant Field Values

RELPATH_JCR_XMLCHARACTERS

static final String RELPATH_JCR_XMLCHARACTERS
A constant for the relative path from the node representing the imported XML element of the jcr:xmlcharacters property produced on Workspace.importXML(java.lang.String, java.io.InputStream, int).

Since:
JCR 2.0
See Also:
Constant Field Values
Method Detail

getLockManager

LockManager getLockManager()
                           throws UnsupportedRepositoryOperationException,
                                  RepositoryException
Returns the LockManager object, through which locking methods are accessed.

Returns:
the LockManager object.
Throws:
UnsupportedRepositoryOperationException - if the implementation does not support locking.
RepositoryException - if an error occurs.
Since:
JCR 2.0

getVersionManager

VersionManager getVersionManager()
                                 throws UnsupportedRepositoryOperationException,
                                        RepositoryException
Returns the VersionManager object.

If the implementation does not support versioning, an UnsupportedRepositoryOperationException is thrown.

Returns:
an VersionManager object.
Throws:
UnsupportedRepositoryOperationException - if the implementation does not support versioning.
RepositoryException - if an error occurs.

createWorkspace

void createWorkspace(String name)
                     throws AccessDeniedException,
                            UnsupportedRepositoryOperationException,
                            RepositoryException
Creates a new Workspace with the specified name. The new workspace is empty, meaning it contains only root node.

The new workspace can be accessed through a login specifying its name.

Throws an AccessDeniedException if the session through which this Workspace object was acquired does not have permission to create the new workspace.

Throws an UnsupportedRepositoryOperationException if the repository does not support the creation of workspaces.

A RepositoryException is thrown if another error occurs.

Parameters:
name - A String, the name of the new workspace.
Throws:
AccessDeniedException - if the session through which this Workspace object was acquired does not have permission to create the new workspace.
UnsupportedRepositoryOperationException - if the repository does not support the creation of workspaces.
NoSuchWorkspaceException
RepositoryException
Since:
JCR 2.0

createWorkspace

void createWorkspace(String name,
                     String srcWorkspace)
                     throws AccessDeniedException,
                            UnsupportedRepositoryOperationException,
                            NoSuchWorkspaceException,
                            RepositoryException
Creates a new Workspace with the specified name initialized with a clone of the content of the workspace srcWorkspace. Semantically, this method is equivalent to creating a new workspace and manually cloning srcWorkspace to it; however, this method may assist some implementations in optimizing subsequent Node.update and Node.merge calls between the new workspace and its source.

The new workspace can be accessed through a login specifying its name.

Throws an AccessDeniedException if the session through which this Workspace object was acquired does not have permission to create the new workspace.

Throws an UnsupportedRepositoryOperationException if the repository does not support the creation of workspaces.

A RepositoryException is thrown if another error occurs.

Parameters:
name - A String, the name of the new workspace.
srcWorkspace - The name of the workspace from which the new workspace is to be cloned.
Throws:
AccessDeniedException - if the session through which this Workspace object was acquired does not have permission to create the new workspace.
UnsupportedRepositoryOperationException - if the repository does not support the creation of workspaces.
NoSuchWorkspaceException - is srcWorkspace does not exist.
RepositoryException - if another error occurs.
Since:
JCR 2.0

deleteWorkspace

void deleteWorkspace(String name)
                     throws AccessDeniedException,
                            UnsupportedRepositoryOperationException,
                            NoSuchWorkspaceException,
                            RepositoryException
Deletes the workspace with the specified name from the repository, deleting all content within it.

Throws an AccessDeniedException if the session through which this Workspace object was acquired does not have permission to remove the workspace.

Throws an UnsupportedRepositoryOperationException if the repository does not support the removal of workspaces.

Parameters:
name - A String, the name of the workspace to be deleted.
Throws:
AccessDeniedException - if the session through which this Workspace object was acquired does not have permission to remove the workspace.
UnsupportedRepositoryOperationException - if the repository does not support the removal of workspaces.
NoSuchWorkspaceException - is srcWorkspace does not exist.
RepositoryException - if another error occurs.
Since:
JCR 2.0


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.