org.apache.jackrabbit.jcr2spi
Class WorkspaceImpl

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.WorkspaceImpl
All Implemented Interfaces:
Workspace, ManagerProvider

public class WorkspaceImpl
extends Object
implements Workspace, ManagerProvider

WorkspaceImpl...


Field Summary
protected  SessionImpl session
          The Session that created this Workspace object.
 
Constructor Summary
WorkspaceImpl(String name, SessionImpl session, RepositoryConfig config, SessionInfo sessionInfo)
           
 
Method Summary
 void clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting)
           
 void copy(String srcAbsPath, String destAbsPath)
           
 void copy(String srcWorkspace, String srcAbsPath, String destAbsPath)
           
protected  LockManager createLockManager(WorkspaceManager wspManager, ItemManager itemManager)
          Create the LockManager.
protected  WorkspaceManager createManager(RepositoryService service, SessionInfo sessionInfo, CacheBehaviour cacheBehaviour, int pollTimeout)
          Create the workspace state manager.
protected  ObservationManager createObservationManager(NamePathResolver resolver, NodeTypeRegistry ntRegistry)
          Create the ObservationManager.
protected  VersionManager createVersionManager(WorkspaceManager wspManager)
          Create the VersionManager.
 String[] getAccessibleWorkspaceNames()
           
 AccessManager getAccessManager()
           
 EffectiveNodeTypeProvider getEffectiveNodeTypeProvider()
           
 HierarchyManager getHierarchyManager()
           
 ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior)
           
 ItemDefinitionProvider getItemDefinitionProvider()
           
 ValueFactory getJcrValueFactory()
          Same as Session#getValueFactory() but omits the check, if this repository is really level 2 compliant.
 LockManager getLockManager()
          Returns the AccessManager associated with this ManagerProvider.
 String getName()
           
 NamePathResolver getNamePathResolver()
           
 NameResolver getNameResolver()
           
 NamespaceRegistry getNamespaceRegistry()
           
 NamespaceResolver getNamespaceResolver()
           
 NodeTypeManager getNodeTypeManager()
           
 ObservationManager getObservationManager()
           
 PathResolver getPathResolver()
           
 QueryManager getQueryManager()
           
 QValueFactory getQValueFactory()
           
 Session getSession()
           
 VersionManager getVersionManager()
          Returns the VersionManager associated with this ManagerProvider.
 void importXML(String parentAbsPath, InputStream in, int uuidBehavior)
           
 void move(String srcAbsPath, String destAbsPath)
           
 void restore(Version[] versions, boolean removeExisting)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

protected final SessionImpl session
The Session that created this Workspace object.

Constructor Detail

WorkspaceImpl

public WorkspaceImpl(String name,
                     SessionImpl session,
                     RepositoryConfig config,
                     SessionInfo sessionInfo)
              throws RepositoryException
Throws:
RepositoryException
Method Detail

getSession

public Session getSession()
Specified by:
getSession in interface Workspace
See Also:
Workspace.getSession()

getName

public String getName()
Specified by:
getName in interface Workspace
See Also:
Workspace.getName()

copy

public void copy(String srcAbsPath,
                 String destAbsPath)
          throws ConstraintViolationException,
                 VersionException,
                 AccessDeniedException,
                 PathNotFoundException,
                 ItemExistsException,
                 LockException,
                 RepositoryException
Specified by:
copy in interface Workspace
Throws:
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException
See Also:
Workspace.copy(String, String)

copy

public void copy(String srcWorkspace,
                 String srcAbsPath,
                 String destAbsPath)
          throws NoSuchWorkspaceException,
                 ConstraintViolationException,
                 VersionException,
                 AccessDeniedException,
                 PathNotFoundException,
                 ItemExistsException,
                 LockException,
                 RepositoryException
Specified by:
copy in interface Workspace
Throws:
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException
See Also:
Workspace.copy(String, String, String)

clone

public void clone(String srcWorkspace,
                  String srcAbsPath,
                  String destAbsPath,
                  boolean removeExisting)
           throws NoSuchWorkspaceException,
                  ConstraintViolationException,
                  VersionException,
                  AccessDeniedException,
                  PathNotFoundException,
                  ItemExistsException,
                  LockException,
                  RepositoryException
Specified by:
clone in interface Workspace
Throws:
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException
See Also:
Workspace.clone(String, String, String, boolean)

move

public void move(String srcAbsPath,
                 String destAbsPath)
          throws ConstraintViolationException,
                 VersionException,
                 AccessDeniedException,
                 PathNotFoundException,
                 ItemExistsException,
                 LockException,
                 RepositoryException
Specified by:
move in interface Workspace
Throws:
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException
See Also:
Workspace.move(String, String)

restore

public void restore(Version[] versions,
                    boolean removeExisting)
             throws ItemExistsException,
                    UnsupportedRepositoryOperationException,
                    VersionException,
                    LockException,
                    InvalidItemStateException,
                    RepositoryException
Specified by:
restore in interface Workspace
Throws:
ItemExistsException
UnsupportedRepositoryOperationException
VersionException
LockException
InvalidItemStateException
RepositoryException
See Also:
Workspace.restore(Version[], boolean)

getQueryManager

public QueryManager getQueryManager()
                             throws RepositoryException
Specified by:
getQueryManager in interface Workspace
Throws:
RepositoryException
See Also:
Workspace.getQueryManager()

getNamespaceRegistry

public NamespaceRegistry getNamespaceRegistry()
                                       throws RepositoryException
Specified by:
getNamespaceRegistry in interface Workspace
Throws:
RepositoryException
See Also:
Workspace.getNamespaceRegistry()

getNodeTypeManager

public NodeTypeManager getNodeTypeManager()
                                   throws RepositoryException
Specified by:
getNodeTypeManager in interface Workspace
Throws:
RepositoryException
See Also:
Workspace.getNodeTypeManager()

getObservationManager

public ObservationManager getObservationManager()
                                         throws UnsupportedRepositoryOperationException,
                                                RepositoryException
Specified by:
getObservationManager in interface Workspace
Throws:
UnsupportedRepositoryOperationException
RepositoryException
See Also:
Workspace.getObservationManager()

getAccessibleWorkspaceNames

public String[] getAccessibleWorkspaceNames()
                                     throws RepositoryException
Specified by:
getAccessibleWorkspaceNames in interface Workspace
Throws:
RepositoryException
See Also:
Workspace.getAccessibleWorkspaceNames()

getImportContentHandler

public ContentHandler getImportContentHandler(String parentAbsPath,
                                              int uuidBehavior)
                                       throws PathNotFoundException,
                                              ConstraintViolationException,
                                              VersionException,
                                              LockException,
                                              RepositoryException
Specified by:
getImportContentHandler in interface Workspace
Throws:
PathNotFoundException
ConstraintViolationException
VersionException
LockException
RepositoryException
See Also:
Workspace.getImportContentHandler(String, int)

importXML

public void importXML(String parentAbsPath,
                      InputStream in,
                      int uuidBehavior)
               throws IOException,
                      PathNotFoundException,
                      ItemExistsException,
                      ConstraintViolationException,
                      InvalidSerializedDataException,
                      LockException,
                      RepositoryException
Specified by:
importXML in interface Workspace
Throws:
IOException
PathNotFoundException
ItemExistsException
ConstraintViolationException
InvalidSerializedDataException
LockException
RepositoryException
See Also:
Workspace.importXML(String, InputStream, int)

getNamePathResolver

public NamePathResolver getNamePathResolver()
Specified by:
getNamePathResolver in interface ManagerProvider
See Also:
ManagerProvider.getNamePathResolver()

getNameResolver

public NameResolver getNameResolver()
Specified by:
getNameResolver in interface ManagerProvider
See Also:
ManagerProvider.getNameResolver()

getPathResolver

public PathResolver getPathResolver()
Specified by:
getPathResolver in interface ManagerProvider
See Also:
ManagerProvider.getPathResolver()

getNamespaceResolver

public NamespaceResolver getNamespaceResolver()
Specified by:
getNamespaceResolver in interface ManagerProvider
See Also:
ManagerProvider.getNamespaceResolver()

getHierarchyManager

public HierarchyManager getHierarchyManager()
Specified by:
getHierarchyManager in interface ManagerProvider
See Also:
ManagerProvider.getHierarchyManager()

getAccessManager

public AccessManager getAccessManager()
Specified by:
getAccessManager in interface ManagerProvider
See Also:
ManagerProvider.getAccessManager()

getLockManager

public LockManager getLockManager()
Description copied from interface: ManagerProvider
Returns the AccessManager associated with this ManagerProvider.

Specified by:
getLockManager in interface ManagerProvider
Returns:
the AccessManager associated with this ManagerProvider
See Also:
ManagerProvider.getLockManager()

getVersionManager

public VersionManager getVersionManager()
Description copied from interface: ManagerProvider
Returns the VersionManager associated with this ManagerProvider.

Specified by:
getVersionManager in interface ManagerProvider
Returns:
the VersionManager associated with this ManagerProvider
See Also:
ManagerProvider.getVersionManager()

getItemDefinitionProvider

public ItemDefinitionProvider getItemDefinitionProvider()
Specified by:
getItemDefinitionProvider in interface ManagerProvider
See Also:
ManagerProvider.getItemDefinitionProvider()

getEffectiveNodeTypeProvider

public EffectiveNodeTypeProvider getEffectiveNodeTypeProvider()
Specified by:
getEffectiveNodeTypeProvider in interface ManagerProvider

getJcrValueFactory

public ValueFactory getJcrValueFactory()
                                throws RepositoryException
Description copied from interface: ManagerProvider
Same as Session#getValueFactory() but omits the check, if this repository is really level 2 compliant. Therefore, this method may be used for internal functionality only, that require creation and conversion of JCR values.

Specified by:
getJcrValueFactory in interface ManagerProvider
Returns:
Throws:
RepositoryException

getQValueFactory

public QValueFactory getQValueFactory()
                               throws RepositoryException
Specified by:
getQValueFactory in interface ManagerProvider
Throws:
RepositoryException

createManager

protected WorkspaceManager createManager(RepositoryService service,
                                         SessionInfo sessionInfo,
                                         CacheBehaviour cacheBehaviour,
                                         int pollTimeout)
                                  throws RepositoryException
Create the workspace state manager. May be overridden by subclasses.

Parameters:
service - the RepositoryService
Returns:
state manager
Throws:
RepositoryException

createLockManager

protected LockManager createLockManager(WorkspaceManager wspManager,
                                        ItemManager itemManager)
Create the LockManager. May be overridden by subclasses.

Parameters:
wspManager -
itemManager -
Returns:
a new LockManager instance.

createVersionManager

protected VersionManager createVersionManager(WorkspaceManager wspManager)
Create the VersionManager. May be overridden by subclasses.

Parameters:
wspManager -
Returns:
a new VersionManager instance.

createObservationManager

protected ObservationManager createObservationManager(NamePathResolver resolver,
                                                      NodeTypeRegistry ntRegistry)
Create the ObservationManager. May be overridden by subclasses.

Returns:
a new ObservationManager instance


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