Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.3)

E11993-02


oracle.ocs.jcr
Interface OracleWorkspace

All Superinterfaces:
javax.jcr.Workspace

public interface OracleWorkspace
extends javax.jcr.Workspace

The OracleWorkspace object represents a "view" of an actual repository workspace entity as seen through the authorization settings of its associated OracleSession. Each OracleWorkspace object is associated one-to-one with a OracleSession object. The OracleWorkspace object can be acquired by calling OracleSession.getWorkspace() on the associated OracleSession object.


Method Summary
 void clone(java.lang.String srcWorkspace, java.lang.String srcAbsPath, java.lang.String destAbsPath, boolean removeExisting)
          Clones the subtree at the node srcAbsPath in srcWorkspace to the new location at destAbsPath in this workspace.In the current implementation, this method is not supported and throws RepositoryException.
 void copy(java.lang.String srcAbsPath, java.lang.String destAbsPath)
          This method copies the node at srcAbsPath to the new location at destAbsPath.
 void copy(java.lang.String srcWorkspace, java.lang.String srcAbsPath, java.lang.String destAbsPath)
          This method copies the subtree at srcAbsPath in srcWorkspace to destAbsPath in this workspace.
 java.lang.String[] getAccessibleWorkspaceNames()
          Returns an string array containing the names of all workspaces in this implementation null is returned since multiple workspaces are not supported.
 org.xml.sax.ContentHandler getImportContentHandler(java.lang.String parentAbsPath, int uuidBehavior)
          The implementation does not support importing and exporting XML it throws an RepositoryException.
 java.lang.String getName()
          Returns the name of the actual persistent workspace represented by this Workspace object.
 javax.jcr.NamespaceRegistry getNamespaceRegistry()
          Returns the NamespaceRegistry object, which is used to access information and (in level 2) set the mapping between namespace prefixes and URIs.
 javax.jcr.nodetype.NodeTypeManager getNodeTypeManager()
          Returns the NodeTypeManager through which node type information can be queried.
 javax.jcr.observation.ObservationManager getObservationManager()
          The implementation does not support observation and hence it throws an UnsupportedRepositoryOperationException.
 javax.jcr.query.QueryManager getQueryManager()
          Gets the QueryManager.
 javax.jcr.Session getSession()
          Returns the Session object through which this Workspace object was acquired.
 void importXML(java.lang.String parentAbsPath, java.io.InputStream in, int uuidBehavior)
          The implementation does not support importing and exporting XML it throws an RepositoryException.
 void move(java.lang.String srcAbsPath, java.lang.String destAbsPath)
          Moves the node at srcAbsPath (and its entire subtree) to the new location at destAbsPath.
 void restore(javax.jcr.version.Version[] versions, boolean removeExisting)
          Restores a set of versions at once.

 

Method Detail

getSession

javax.jcr.Session getSession()
Returns the Session object through which this Workspace object was acquired.
Specified by:
getSession in interface javax.jcr.Workspace
Returns:
a Session object.

getName

java.lang.String getName()
Returns the name of the actual persistent workspace represented by this Workspace object. In the current implementation null is returned, since multiple workspaces are not supported.
Specified by:
getName in interface javax.jcr.Workspace
Returns:
the name of this workspace.

copy

void copy(java.lang.String srcAbsPath,
          java.lang.String destAbsPath)
          throws javax.jcr.nodetype.ConstraintViolationException,
                 javax.jcr.version.VersionException,
                 javax.jcr.AccessDeniedException,
                 javax.jcr.PathNotFoundException,
                 javax.jcr.ItemExistsException,
                 javax.jcr.lock.LockException,
                 javax.jcr.RepositoryException
This method copies the node at srcAbsPath to the new location at destAbsPath. If successful, the change is persisted immediately, there is no need to call save. <p/> Copies of referenceable nodes (nodes with UUIDs) are automatically given new UUIDs. <p/> The destAbsPath parameter is actually an absolute path to the parent node of the new location, appended with the new name desired for the copied node. <p/> 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). <p/> A ConstraintViolationException is thrown if the operation would violate a node-type. <p/> A VersionException is thrown if the parent node of destAbsPath is versionable and checked-in. <p/> An AccessDeniedException is thrown if the current session (i.e. the session that was used to acquire this Workspace object) does not have sufficient access rights to complete the operation. <p/> A PathNotFoundException is thrown if the node at srcAbsPath or the parent of destAbsPath does not exist. <p/> An ItemExistException is thrown if a property already exists at destAbsPath or a node already exist there, and same name siblings are not allowed. <p/> A LockException is thrown if a lock prevents the copy.
Specified by:
copy in interface javax.jcr.Workspace
Parameters:
srcAbsPath - the path of the node to be copied.
destAbsPath - the location to which the node at srcAbsPath is to be copied.
Throws:
javax.jcr.nodetype.ConstraintViolationException - if the operation would violate a node-type.
javax.jcr.version.VersionException - if the parent node of destAbsPath is versionable and checked-in.
javax.jcr.AccessDeniedException - if the current session does not have sufficient access rights to complete the operation.
javax.jcr.PathNotFoundException - if the node at srcAbsPath or the parent of destAbsPath does not exist.
javax.jcr.ItemExistsException - if a property already exists at destAbsPath or a node already exist there, and same name siblings are not allowed.
javax.jcr.lock.LockException - if a lock prevents the copy.
javax.jcr.RepositoryException - if another error occurs.

copy

void copy(java.lang.String srcWorkspace,
          java.lang.String srcAbsPath,
          java.lang.String destAbsPath)
          throws javax.jcr.NoSuchWorkspaceException,
                 javax.jcr.nodetype.ConstraintViolationException,
                 javax.jcr.version.VersionException,
                 javax.jcr.AccessDeniedException,
                 javax.jcr.PathNotFoundException,
                 javax.jcr.ItemExistsException,
                 javax.jcr.lock.LockException,
                 javax.jcr.RepositoryException
This method copies the subtree at srcAbsPath in srcWorkspace to destAbsPath in this workspace. In the current implementation, this method is not supported and throws RepositoryException.
Specified by:
copy in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException
javax.jcr.NoSuchWorkspaceException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.lock.LockException

clone

void clone(java.lang.String srcWorkspace,
           java.lang.String srcAbsPath,
           java.lang.String destAbsPath,
           boolean removeExisting)
           throws javax.jcr.NoSuchWorkspaceException,
                  javax.jcr.nodetype.ConstraintViolationException,
                  javax.jcr.version.VersionException,
                  javax.jcr.AccessDeniedException,
                  javax.jcr.PathNotFoundException,
                  javax.jcr.ItemExistsException,
                  javax.jcr.lock.LockException,
                  javax.jcr.RepositoryException
Clones the subtree at the node srcAbsPath in srcWorkspace to the new location at destAbsPath in this workspace.In the current implementation, this method is not supported and throws RepositoryException.
Specified by:
clone in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException - has an index or if another error occurs.
javax.jcr.NoSuchWorkspaceException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.lock.LockException

move

void move(java.lang.String srcAbsPath,
          java.lang.String destAbsPath)
          throws javax.jcr.nodetype.ConstraintViolationException,
                 javax.jcr.version.VersionException,
                 javax.jcr.AccessDeniedException,
                 javax.jcr.PathNotFoundException,
                 javax.jcr.ItemExistsException,
                 javax.jcr.lock.LockException,
                 javax.jcr.RepositoryException
Moves the node at srcAbsPath (and its entire subtree) to the new location at destAbsPath. If successful, the change is persisted immediately, there is no need to call save. Note that this is in contrast to Session.move(java.lang.String, java.lang.String) which operates within the transient space and hence requires a save. <p/> The destAbsPath provided is actually an absolute path to the parent node of the new location, appended with the new name desired for the moved node. <p/> This method cannot be used to move just an individual property by itself. It moves an entire node and its subtree (including, of course, any properties contained therein). <p/> A ConstraintViolationException is thrown if the operation would violate a node-type specific constraint. <p/> A VersionException is thrown if the parent node of destAbsPath or the parent node of srcAbsPath is versionable and checked-in. <p/> An AccessDeniedException is thrown if the current session (i.e. the session that was used to acquire this Workspace object) does not have sufficient access rights to complete the operation. <p/> A PathNotFoundException is thrown if the node at srcAbsPath or the parent of destAbsPath does not exist. <p/> An ItemExistException is thrown if a property already exists at destAbsPath or a node already exist there, and same name siblings are not allowed. <p/> A LockException if a lock prevents the move.
Specified by:
move in interface javax.jcr.Workspace
Parameters:
srcAbsPath - the path of the node to be moved.
destAbsPath - the location to which the node at srcAbsPath is to be moved.
Throws:
javax.jcr.nodetype.ConstraintViolationException - if the operation would violate a node-type
javax.jcr.version.VersionException - if the parent node of destAbsPath or the parent node of srcAbsPath is versionable and checked-in.
javax.jcr.AccessDeniedException - if the current session (i.e. the session that was used to acquire this Workspace object) does not have sufficient access rights to complete the operation.
javax.jcr.PathNotFoundException - if the node at srcAbsPath or the parent of destAbsPath does not exist.
javax.jcr.ItemExistsException - if a property already exists at destAbsPath or a node already exist there, and same name siblings are not allowed.
javax.jcr.lock.LockException - if a lock prevents the move.
javax.jcr.RepositoryException - if the last element of destAbsPath has an index or if another error occurs.

restore

void restore(javax.jcr.version.Version[] versions,
             boolean removeExisting)
             throws javax.jcr.ItemExistsException,
                    javax.jcr.UnsupportedRepositoryOperationException,
                    javax.jcr.version.VersionException,
                    javax.jcr.lock.LockException,
                    javax.jcr.InvalidItemStateException,
                    javax.jcr.RepositoryException
Restores a set of versions at once. This operation is not supported.
Specified by:
restore in interface javax.jcr.Workspace
Throws:
RepositoryException.
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException

getQueryManager

javax.jcr.query.QueryManager getQueryManager()
                                             throws javax.jcr.RepositoryException
Gets the QueryManager. Returns the QueryManager object, through search methods are accessed. In the current implementation, null is returned since search is not supported yet.
Specified by:
getQueryManager in interface javax.jcr.Workspace
Returns:
the QueryManager object.
Throws:
RepositoryException.
javax.jcr.RepositoryException

getNamespaceRegistry

javax.jcr.NamespaceRegistry getNamespaceRegistry()
                                                 throws javax.jcr.RepositoryException
Returns the NamespaceRegistry object, which is used to access information and (in level 2) set the mapping between namespace prefixes and URIs.
Specified by:
getNamespaceRegistry in interface javax.jcr.Workspace
Returns:
the NamespaceRegistry.
Throws:
javax.jcr.RepositoryException - if an error occurs.

getNodeTypeManager

javax.jcr.nodetype.NodeTypeManager getNodeTypeManager()
                                                      throws javax.jcr.RepositoryException
Returns the NodeTypeManager through which node type information can be queried. There is one node type registry per repository, therefore the NodeTypeManager is not workspace-specific; it provides introspection methods for the global, repository-wide set of available node types.
Specified by:
getNodeTypeManager in interface javax.jcr.Workspace
Returns:
a NodeTypeManager object.
Throws:
javax.jcr.RepositoryException - if an error occurs.

getObservationManager

javax.jcr.observation.ObservationManager getObservationManager()
                                                               throws javax.jcr.UnsupportedRepositoryOperationException,
                                                                      javax.jcr.RepositoryException
The implementation does not support observation and hence it throws an UnsupportedRepositoryOperationException.
Specified by:
getObservationManager in interface javax.jcr.Workspace
Returns:
an ObservationManager object.
Throws:
javax.jcr.UnsupportedRepositoryOperationException - if the implementation does not support observation.
javax.jcr.RepositoryException

getAccessibleWorkspaceNames

java.lang.String[] getAccessibleWorkspaceNames()
                                               throws javax.jcr.RepositoryException
Returns an string array containing the names of all workspaces in this implementation null is returned since multiple workspaces are not supported.
Specified by:
getAccessibleWorkspaceNames in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

getImportContentHandler

org.xml.sax.ContentHandler getImportContentHandler(java.lang.String parentAbsPath,
                                                   int uuidBehavior)
                                                   throws javax.jcr.PathNotFoundException,
                                                          javax.jcr.nodetype.ConstraintViolationException,
                                                          javax.jcr.version.VersionException,
                                                          javax.jcr.lock.LockException,
                                                          javax.jcr.AccessDeniedException,
                                                          javax.jcr.RepositoryException
The implementation does not support importing and exporting XML it throws an RepositoryException.
Specified by:
getImportContentHandler in interface javax.jcr.Workspace
Throws:
RepositoryException.
javax.jcr.PathNotFoundException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException

importXML

void importXML(java.lang.String parentAbsPath,
               java.io.InputStream in,
               int uuidBehavior)
               throws java.io.IOException,
                      javax.jcr.PathNotFoundException,
                      javax.jcr.ItemExistsException,
                      javax.jcr.nodetype.ConstraintViolationException,
                      javax.jcr.InvalidSerializedDataException,
                      javax.jcr.lock.LockException,
                      javax.jcr.AccessDeniedException,
                      javax.jcr.RepositoryException
The implementation does not support importing and exporting XML it throws an RepositoryException.
Specified by:
importXML in interface javax.jcr.Workspace
Throws:
RepositoryException.
java.io.IOException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.InvalidSerializedDataException
javax.jcr.lock.LockException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException

Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.3)

E11993-02


Copyright © 2007, 2008, Oracle. All rights reserved.