Package org.apache.jackrabbit.jcr2spi
Class WorkspaceImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.WorkspaceImpl
-
- All Implemented Interfaces:
Workspace
,ManagerProvider
public class WorkspaceImpl extends Object implements Workspace, ManagerProvider
WorkspaceImpl
...
-
-
Field Summary
Fields Modifier and Type Field Description protected SessionImpl
session
The Session that created thisWorkspace
object.-
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
Constructors Constructor Description WorkspaceImpl(String name, SessionImpl session, RepositoryConfig config, SessionInfo sessionInfo)
-
Method Summary
-
-
-
Field Detail
-
session
protected final SessionImpl session
The Session that created thisWorkspace
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 interfaceWorkspace
- See Also:
Workspace.getSession()
-
getName
public String getName()
- Specified by:
getName
in interfaceWorkspace
- See Also:
Workspace.getName()
-
copy
public void copy(String srcAbsPath, String destAbsPath) throws ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException
- Specified by:
copy
in interfaceWorkspace
- 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 interfaceWorkspace
- 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
-
move
public void move(String srcAbsPath, String destAbsPath) throws ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, RepositoryException
- Specified by:
move
in interfaceWorkspace
- 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 interfaceWorkspace
- Throws:
ItemExistsException
UnsupportedRepositoryOperationException
VersionException
LockException
InvalidItemStateException
RepositoryException
- See Also:
Workspace.restore(Version[], boolean)
-
getQueryManager
public QueryManager getQueryManager() throws RepositoryException
- Specified by:
getQueryManager
in interfaceWorkspace
- Throws:
RepositoryException
- See Also:
Workspace.getQueryManager()
-
getNamespaceRegistry
public NamespaceRegistry getNamespaceRegistry() throws RepositoryException
- Specified by:
getNamespaceRegistry
in interfaceWorkspace
- Throws:
RepositoryException
- See Also:
Workspace.getNamespaceRegistry()
-
getNodeTypeManager
public NodeTypeManager getNodeTypeManager() throws RepositoryException
- Specified by:
getNodeTypeManager
in interfaceWorkspace
- Throws:
RepositoryException
- See Also:
Workspace.getNodeTypeManager()
-
getObservationManager
public ObservationManager getObservationManager() throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
getObservationManager
in interfaceWorkspace
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
- See Also:
Workspace.getObservationManager()
-
getAccessibleWorkspaceNames
public String[] getAccessibleWorkspaceNames() throws RepositoryException
- Specified by:
getAccessibleWorkspaceNames
in interfaceWorkspace
- Throws:
RepositoryException
- See Also:
Workspace.getAccessibleWorkspaceNames()
-
getImportContentHandler
public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, RepositoryException
- Specified by:
getImportContentHandler
in interfaceWorkspace
- 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 interfaceWorkspace
- Throws:
IOException
PathNotFoundException
ItemExistsException
ConstraintViolationException
InvalidSerializedDataException
LockException
RepositoryException
- See Also:
Workspace.importXML(String, InputStream, int)
-
createWorkspace
public void createWorkspace(String name) throws RepositoryException
- Specified by:
createWorkspace
in interfaceWorkspace
- Throws:
RepositoryException
- See Also:
Workspace.createWorkspace(String)
-
createWorkspace
public void createWorkspace(String name, String srcWorkspace) throws RepositoryException
- Specified by:
createWorkspace
in interfaceWorkspace
- Throws:
RepositoryException
- See Also:
Workspace.createWorkspace(String, String)
-
deleteWorkspace
public void deleteWorkspace(String name) throws RepositoryException
- Specified by:
deleteWorkspace
in interfaceWorkspace
- Throws:
RepositoryException
- See Also:
Workspace.deleteWorkspace(String)
-
getLockManager
public LockManager getLockManager() throws RepositoryException
- Specified by:
getLockManager
in interfaceWorkspace
- Throws:
RepositoryException
- See Also:
Workspace.getLockManager()
-
getVersionManager
public VersionManager getVersionManager() throws RepositoryException
- Specified by:
getVersionManager
in interfaceWorkspace
- Throws:
RepositoryException
- See Also:
Workspace.getVersionManager()
-
getNamePathResolver
public NamePathResolver getNamePathResolver()
- Specified by:
getNamePathResolver
in interfaceManagerProvider
- See Also:
ManagerProvider.getNamePathResolver()
-
getNameResolver
public NameResolver getNameResolver()
- Specified by:
getNameResolver
in interfaceManagerProvider
- See Also:
ManagerProvider.getNameResolver()
-
getPathResolver
public PathResolver getPathResolver()
- Specified by:
getPathResolver
in interfaceManagerProvider
- See Also:
ManagerProvider.getPathResolver()
-
getNamespaceResolver
public NamespaceResolver getNamespaceResolver()
- Specified by:
getNamespaceResolver
in interfaceManagerProvider
- See Also:
ManagerProvider.getNamespaceResolver()
-
getHierarchyManager
public HierarchyManager getHierarchyManager()
- Specified by:
getHierarchyManager
in interfaceManagerProvider
- See Also:
ManagerProvider.getHierarchyManager()
-
getAccessManager
public AccessManager getAccessManager()
- Specified by:
getAccessManager
in interfaceManagerProvider
- See Also:
ManagerProvider.getAccessManager()
-
getLockStateManager
public LockStateManager getLockStateManager()
Description copied from interface:ManagerProvider
Returns theLockStateManager
associated with thisManagerProvider
.- Specified by:
getLockStateManager
in interfaceManagerProvider
- Returns:
- the
LockStateManager
associated with thisManagerProvider
- See Also:
ManagerProvider.getLockStateManager()
-
getVersionStateManager
public VersionManager getVersionStateManager()
Description copied from interface:ManagerProvider
Returns theVersionManager
associated with thisManagerProvider
.- Specified by:
getVersionStateManager
in interfaceManagerProvider
- Returns:
- the
VersionManager
associated with thisManagerProvider
- See Also:
ManagerProvider.getVersionStateManager()
-
getItemDefinitionProvider
public ItemDefinitionProvider getItemDefinitionProvider()
- Specified by:
getItemDefinitionProvider
in interfaceManagerProvider
- See Also:
ManagerProvider.getItemDefinitionProvider()
-
getNodeTypeDefinitionProvider
public NodeTypeDefinitionProvider getNodeTypeDefinitionProvider()
- Specified by:
getNodeTypeDefinitionProvider
in interfaceManagerProvider
- See Also:
ManagerProvider.getNodeTypeDefinitionProvider()
-
getEffectiveNodeTypeProvider
public EffectiveNodeTypeProvider getEffectiveNodeTypeProvider()
- Specified by:
getEffectiveNodeTypeProvider
in interfaceManagerProvider
- See Also:
ManagerProvider.getEffectiveNodeTypeProvider()
-
getJcrValueFactory
public ValueFactory getJcrValueFactory() throws RepositoryException
Description copied from interface:ManagerProvider
Same asSession.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 interfaceManagerProvider
- Returns:
- Throws:
RepositoryException
- See Also:
ManagerProvider.getJcrValueFactory()
-
getQValueFactory
public QValueFactory getQValueFactory() throws RepositoryException
- Specified by:
getQValueFactory
in interfaceManagerProvider
- Throws:
RepositoryException
- See Also:
ManagerProvider.getQValueFactory()
-
getAccessControlProvider
public AccessControlProvider getAccessControlProvider() throws RepositoryException
- Specified by:
getAccessControlProvider
in interfaceManagerProvider
- Throws:
RepositoryException
- See Also:
()
-
createManager
protected WorkspaceManager createManager(RepositoryConfig config, SessionInfo sessionInfo) throws RepositoryException
Create the workspace state manager. May be overridden by subclasses.- Parameters:
config
- the RepositoryConfigurationsessionInfo
- the SessionInfo used to create this instance.- Returns:
- workspace manager
- Throws:
RepositoryException
- If an error occurs
-
createLockManager
protected LockStateManager createLockManager(WorkspaceManager wspManager, ItemManager itemManager)
Create theLockManager
. May be overridden by subclasses.- Parameters:
wspManager
- the workspace manager.itemManager
- the item manager.- Returns:
- a new
LockStateManager
instance.
-
createVersionManager
protected VersionManager createVersionManager(WorkspaceManager wspManager)
Create theVersionManager
. May be overridden by subclasses.- Parameters:
wspManager
- the workspace manager.- Returns:
- a new
VersionManager
instance.
-
createObservationManager
protected ObservationManager createObservationManager(NamePathResolver resolver, NodeTypeRegistry ntRegistry) throws RepositoryException
Create theObservationManager
. May be overridden by subclasses.- Parameters:
resolver
- the namespace resolver.ntRegistry
- the node type registry.- Returns:
- a new
ObservationManager
instance - Throws:
RepositoryException
- If an error occurs.
-
-