|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface 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
on the associated Session.getWorkspace()
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 |
static String |
NAME_JCR_XMLTEXT
A constant for the name of the jcr:xmltext |
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 |
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 |
---|
static final String NAME_WORKSPACE_ROOT
static final String PATH_WORKSPACE_ROOT
static final String NAME_SYSTEM_NODE
static final String PATH_SYSTEM_NODE
static final String NAME_NODE_TYPES_NODE
static final String PATH_NODE_TYPES_NODE
static final String NAME_VERSION_STORAGE_NODE
static final String PATH_VERSION_STORAGE_NODE
static final String NAME_ACTIVITIES_NODE
static final String PATH_ACTIVITIES_NODE
static final String NAME_CONFIGURATIONS_NODE
static final String PATH_CONFIGURATIONS_NODE
static final String NAME_UNFILED_NODE
static final String PATH_UNFILED_NODE
static final String NAME_JCR_XMLTEXT
jcr:xmltext node produced on Workspace.importXML(java.lang.String, java.io.InputStream, int)
.
- Since:
- JCR 2.0
- See Also:
- Constant Field Values
static final String NAME_JCR_XMLCHARACTERS
jcr:xmlcharacters property produced on Workspace.importXML(java.lang.String, java.io.InputStream, int)
.
- Since:
- JCR 2.0
- See Also:
- Constant Field Values
static final String RELPATH_JCR_XMLCHARACTERS
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 |
---|
LockManager getLockManager() throws UnsupportedRepositoryOperationException, RepositoryException
LockManager
object, through which locking
methods are accessed.
LockManager
object.
UnsupportedRepositoryOperationException
- if the implementation
does not support locking.
RepositoryException
- if an error occurs.VersionManager getVersionManager() throws UnsupportedRepositoryOperationException, RepositoryException
VersionManager
object.
If the implementation does not support versioning, an
UnsupportedRepositoryOperationException
is thrown.
VersionManager
object.
UnsupportedRepositoryOperationException
- if the implementation does
not support versioning.
RepositoryException
- if an error occurs.void createWorkspace(String name) throws AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException
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.
name
- A String
, the name of the new workspace.
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
void createWorkspace(String name, String srcWorkspace) throws AccessDeniedException, UnsupportedRepositoryOperationException, NoSuchWorkspaceException, RepositoryException
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.
name
- A String
, the name of the new workspace.srcWorkspace
- The name of the workspace from which the new workspace is to be cloned.
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.void deleteWorkspace(String name) throws AccessDeniedException, UnsupportedRepositoryOperationException, NoSuchWorkspaceException, RepositoryException
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.
name
- A String
, the name of the workspace to be deleted.
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |