org.apache.jackrabbit.rmi.client
Class ClientWorkspace

java.lang.Object
  extended by org.apache.jackrabbit.rmi.client.ClientObject
      extended by org.apache.jackrabbit.rmi.client.ClientWorkspace
All Implemented Interfaces:
javax.jcr.Workspace

public class ClientWorkspace
extends ClientObject
implements javax.jcr.Workspace

Local adapter for the JCR-RMI RemoteWorkspace interface. This class makes a remote workspace locally available using the JCR Workspace interface.

See Also:
Workspace, RemoteWorkspace

Field Summary
 
Fields inherited from interface javax.jcr.Workspace
NAME_ACTIVITIES_NODE, NAME_CONFIGURATIONS_NODE, NAME_JCR_XMLCHARACTERS, NAME_JCR_XMLTEXT, NAME_NODE_TYPES_NODE, NAME_SYSTEM_NODE, NAME_UNFILED_NODE, NAME_VERSION_STORAGE_NODE, NAME_WORKSPACE_ROOT, PATH_ACTIVITIES_NODE, PATH_CONFIGURATIONS_NODE, PATH_NODE_TYPES_NODE, PATH_SYSTEM_NODE, PATH_UNFILED_NODE, PATH_VERSION_STORAGE_NODE, PATH_WORKSPACE_ROOT, RELPATH_JCR_XMLCHARACTERS
 
Constructor Summary
ClientWorkspace(javax.jcr.Session session, RemoteWorkspace remote, LocalAdapterFactory factory)
          Creates a client adapter for the given remote workspace.
 
Method Summary
 void clone(java.lang.String workspace, java.lang.String src, java.lang.String dst, boolean removeExisting)
          
 void copy(java.lang.String from, java.lang.String to)
          
 void copy(java.lang.String workspace, java.lang.String from, java.lang.String to)
          
 void createWorkspace(java.lang.String name)
           
 void createWorkspace(java.lang.String name, java.lang.String srcWorkspace)
           
 void deleteWorkspace(java.lang.String name)
           
 java.lang.String[] getAccessibleWorkspaceNames()
          
 org.xml.sax.ContentHandler getImportContentHandler(java.lang.String path, int mode)
          
 javax.jcr.lock.LockManager getLockManager()
           
 java.lang.String getName()
          
 javax.jcr.NamespaceRegistry getNamespaceRegistry()
          
 javax.jcr.nodetype.NodeTypeManager getNodeTypeManager()
          
 javax.jcr.observation.ObservationManager getObservationManager()
          
 javax.jcr.query.QueryManager getQueryManager()
          
 javax.jcr.Session getSession()
          Returns the current session without contacting the remote workspace.
 javax.jcr.version.VersionManager getVersionManager()
           
 void importXML(java.lang.String path, java.io.InputStream xml, int uuidBehaviour)
          
 void move(java.lang.String from, java.lang.String to)
          
 void restore(javax.jcr.version.Version[] versions, boolean removeExisting)
          
 
Methods inherited from class org.apache.jackrabbit.rmi.client.ClientObject
getFactory, getItem, getNode, getNodeTypeArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientWorkspace

public ClientWorkspace(javax.jcr.Session session,
                       RemoteWorkspace remote,
                       LocalAdapterFactory factory)
Creates a client adapter for the given remote workspace.

Parameters:
session - current session
remote - remote workspace
factory - local adapter factory
Method Detail

getSession

public javax.jcr.Session getSession()
Returns the current session without contacting the remote workspace.

Specified by:
getSession in interface javax.jcr.Workspace

getName

public java.lang.String getName()

Specified by:
getName in interface javax.jcr.Workspace

copy

public void copy(java.lang.String from,
                 java.lang.String to)
          throws javax.jcr.RepositoryException

Specified by:
copy in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

copy

public void copy(java.lang.String workspace,
                 java.lang.String from,
                 java.lang.String to)
          throws javax.jcr.RepositoryException

Specified by:
copy in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

move

public void move(java.lang.String from,
                 java.lang.String to)
          throws javax.jcr.RepositoryException

Specified by:
move in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

getQueryManager

public javax.jcr.query.QueryManager getQueryManager()
                                             throws javax.jcr.RepositoryException

Specified by:
getQueryManager in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

getNamespaceRegistry

public javax.jcr.NamespaceRegistry getNamespaceRegistry()
                                                 throws javax.jcr.RepositoryException

Specified by:
getNamespaceRegistry in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

getNodeTypeManager

public javax.jcr.nodetype.NodeTypeManager getNodeTypeManager()
                                                      throws javax.jcr.RepositoryException

Specified by:
getNodeTypeManager in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

getObservationManager

public javax.jcr.observation.ObservationManager getObservationManager()
                                                               throws javax.jcr.RepositoryException

Specified by:
getObservationManager in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

clone

public void clone(java.lang.String workspace,
                  java.lang.String src,
                  java.lang.String dst,
                  boolean removeExisting)
           throws javax.jcr.RepositoryException

Specified by:
clone in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

getAccessibleWorkspaceNames

public java.lang.String[] getAccessibleWorkspaceNames()
                                               throws javax.jcr.RepositoryException

Specified by:
getAccessibleWorkspaceNames in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

getImportContentHandler

public org.xml.sax.ContentHandler getImportContentHandler(java.lang.String path,
                                                          int mode)
                                                   throws javax.jcr.RepositoryException

Specified by:
getImportContentHandler in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

importXML

public void importXML(java.lang.String path,
                      java.io.InputStream xml,
                      int uuidBehaviour)
               throws java.io.IOException,
                      javax.jcr.RepositoryException

Specified by:
importXML in interface javax.jcr.Workspace
Throws:
java.io.IOException
javax.jcr.RepositoryException

restore

public void restore(javax.jcr.version.Version[] versions,
                    boolean removeExisting)
             throws javax.jcr.RepositoryException

Specified by:
restore in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

createWorkspace

public void createWorkspace(java.lang.String name)
                     throws javax.jcr.RepositoryException
Specified by:
createWorkspace in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

createWorkspace

public void createWorkspace(java.lang.String name,
                            java.lang.String srcWorkspace)
                     throws javax.jcr.RepositoryException
Specified by:
createWorkspace in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

deleteWorkspace

public void deleteWorkspace(java.lang.String name)
                     throws javax.jcr.RepositoryException
Specified by:
deleteWorkspace in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

getLockManager

public javax.jcr.lock.LockManager getLockManager()
                                          throws javax.jcr.RepositoryException
Specified by:
getLockManager in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException

getVersionManager

public javax.jcr.version.VersionManager getVersionManager()
                                                   throws javax.jcr.RepositoryException
Specified by:
getVersionManager in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.