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:
Workspace

public class ClientWorkspace
extends ClientObject
implements 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(Session session, RemoteWorkspace remote, LocalAdapterFactory factory)
          Creates a client adapter for the given remote workspace.
 
Method Summary
 void clone(String workspace, String src, String dst, boolean removeExisting)
          
 void copy(String from, String to)
          
 void copy(String workspace, String from, String to)
          
 void createWorkspace(String name)
           
 void createWorkspace(String name, String srcWorkspace)
           
 void deleteWorkspace(String name)
           
 String[] getAccessibleWorkspaceNames()
          
 ContentHandler getImportContentHandler(String path, int mode)
          
 LockManager getLockManager()
          
 String getName()
          
 NamespaceRegistry getNamespaceRegistry()
          
 NodeTypeManager getNodeTypeManager()
          
 ObservationManager getObservationManager()
          
 QueryManager getQueryManager()
          
 Session getSession()
          Returns the current session without contacting the remote workspace.
 VersionManager getVersionManager()
           
 void importXML(String path, InputStream xml, int uuidBehaviour)
          
 void move(String from, String to)
          
 void restore(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(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 Session getSession()
Returns the current session without contacting the remote workspace.

Specified by:
getSession in interface Workspace

getName

public String getName()

Specified by:
getName in interface Workspace

copy

public void copy(String from,
                 String to)
          throws RepositoryException

Specified by:
copy in interface Workspace
Throws:
RepositoryException

copy

public void copy(String workspace,
                 String from,
                 String to)
          throws RepositoryException

Specified by:
copy in interface Workspace
Throws:
RepositoryException

move

public void move(String from,
                 String to)
          throws RepositoryException

Specified by:
move in interface Workspace
Throws:
RepositoryException

getQueryManager

public QueryManager getQueryManager()
                             throws RepositoryException

Specified by:
getQueryManager in interface Workspace
Throws:
RepositoryException

getNamespaceRegistry

public NamespaceRegistry getNamespaceRegistry()
                                       throws RepositoryException

Specified by:
getNamespaceRegistry in interface Workspace
Throws:
RepositoryException

getNodeTypeManager

public NodeTypeManager getNodeTypeManager()
                                   throws RepositoryException

Specified by:
getNodeTypeManager in interface Workspace
Throws:
RepositoryException

getObservationManager

public ObservationManager getObservationManager()
                                         throws RepositoryException

Specified by:
getObservationManager in interface Workspace
Throws:
RepositoryException

clone

public void clone(String workspace,
                  String src,
                  String dst,
                  boolean removeExisting)
           throws RepositoryException

Specified by:
clone in interface Workspace
Throws:
RepositoryException

getAccessibleWorkspaceNames

public String[] getAccessibleWorkspaceNames()
                                     throws RepositoryException

Specified by:
getAccessibleWorkspaceNames in interface Workspace
Throws:
RepositoryException

getImportContentHandler

public ContentHandler getImportContentHandler(String path,
                                              int mode)
                                       throws RepositoryException

Specified by:
getImportContentHandler in interface Workspace
Throws:
RepositoryException

importXML

public void importXML(String path,
                      InputStream xml,
                      int uuidBehaviour)
               throws IOException,
                      RepositoryException

Specified by:
importXML in interface Workspace
Throws:
IOException
RepositoryException

restore

public void restore(Version[] versions,
                    boolean removeExisting)
             throws RepositoryException

Specified by:
restore in interface Workspace
Throws:
RepositoryException

createWorkspace

public void createWorkspace(String name)
                     throws RepositoryException
Specified by:
createWorkspace in interface Workspace
Throws:
RepositoryException

createWorkspace

public void createWorkspace(String name,
                            String srcWorkspace)
                     throws RepositoryException
Specified by:
createWorkspace in interface Workspace
Throws:
RepositoryException

deleteWorkspace

public void deleteWorkspace(String name)
                     throws RepositoryException
Specified by:
deleteWorkspace in interface Workspace
Throws:
RepositoryException

getLockManager

public LockManager getLockManager()
                           throws RepositoryException

Specified by:
getLockManager in interface Workspace
Throws:
RepositoryException

getVersionManager

public VersionManager getVersionManager()
                                 throws RepositoryException
Specified by:
getVersionManager in interface Workspace
Throws:
RepositoryException


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