org.exoplatform.services.jcr.rmi.api.client
Class ClientWorkspace

java.lang.Object
  extended by org.exoplatform.services.jcr.rmi.api.client.ClientObject
      extended by org.exoplatform.services.jcr.rmi.api.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

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)
          
 java.lang.String[] getAccessibleWorkspaceNames()
          
 org.xml.sax.ContentHandler getImportContentHandler(java.lang.String path, int uuidBehaviour)
          
 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.
 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.exoplatform.services.jcr.rmi.api.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 uuidBehaviour)
                                                   throws javax.jcr.RepositoryException,
                                                          javax.jcr.PathNotFoundException,
                                                          javax.jcr.nodetype.ConstraintViolationException,
                                                          javax.jcr.version.VersionException

Specified by:
getImportContentHandler in interface javax.jcr.Workspace
Throws:
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException

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


Copyright © 2012 eXo Platform SAS. All Rights Reserved.