Class WorkspaceImpl
- java.lang.Object
-
- org.apache.jackrabbit.oak.jcr.session.WorkspaceImpl
-
- All Implemented Interfaces:
Workspace,JackrabbitWorkspace
public class WorkspaceImpl extends Object implements JackrabbitWorkspace
TODO document
-
-
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
Constructors Constructor Description WorkspaceImpl(SessionContext sessionContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting)voidcopy(String srcAbsPath, String destAbsPath)voidcopy(String srcWorkspace, String srcAbsPath, String destAbsPath)voidcreateWorkspace(String name)Creates a workspace with the given name.voidcreateWorkspace(String name, String srcWorkspace)voidcreateWorkspace(String workspaceName, InputSource workspaceTemplate)Creates a workspace with the given name and a workspace configuration template.voiddeleteWorkspace(String name)String[]getAccessibleWorkspaceNames()ContentHandlergetImportContentHandler(String parentAbsPath, int uuidBehavior)LockManagerImplgetLockManager()StringgetName()NamespaceRegistrygetNamespaceRegistry()ReadWriteNodeTypeManagergetNodeTypeManager()ObservationManagergetObservationManager()PrivilegeManagergetPrivilegeManager()Returns the privilege manager.QueryManagergetQueryManager()@NotNull SessiongetSession()VersionManagergetVersionManager()voidimportXML(String parentAbsPath, InputStream in, int uuidBehavior)@NotNull VersionManagerImplinternalGetVersionManager()voidmove(String srcAbsPath, String destAbsPath)voidrestore(Version[] versions, boolean removeExisting)
-
-
-
Constructor Detail
-
WorkspaceImpl
public WorkspaceImpl(SessionContext sessionContext)
-
-
Method Detail
-
getSession
@NotNull public @NotNull Session getSession()
- Specified by:
getSessionin interfaceWorkspace
-
copy
public void copy(String srcAbsPath, String destAbsPath) throws RepositoryException
- Specified by:
copyin interfaceWorkspace- Throws:
RepositoryException
-
copy
public void copy(String srcWorkspace, String srcAbsPath, String destAbsPath) throws RepositoryException
- Specified by:
copyin interfaceWorkspace- Throws:
RepositoryException
-
clone
public void clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting) throws RepositoryException
- Specified by:
clonein interfaceWorkspace- Throws:
RepositoryException
-
move
public void move(String srcAbsPath, String destAbsPath) throws RepositoryException
- Specified by:
movein interfaceWorkspace- Throws:
RepositoryException
-
restore
public void restore(Version[] versions, boolean removeExisting) throws RepositoryException
- Specified by:
restorein interfaceWorkspace- Throws:
RepositoryException
-
getLockManager
public LockManagerImpl getLockManager() throws UnsupportedRepositoryOperationException
- Specified by:
getLockManagerin interfaceWorkspace- Throws:
UnsupportedRepositoryOperationException
-
getQueryManager
public QueryManager getQueryManager() throws RepositoryException
- Specified by:
getQueryManagerin interfaceWorkspace- Throws:
RepositoryException
-
getNamespaceRegistry
public NamespaceRegistry getNamespaceRegistry()
- Specified by:
getNamespaceRegistryin interfaceWorkspace
-
getNodeTypeManager
public ReadWriteNodeTypeManager getNodeTypeManager()
- Specified by:
getNodeTypeManagerin interfaceWorkspace
-
getObservationManager
public ObservationManager getObservationManager() throws RepositoryException
- Specified by:
getObservationManagerin interfaceWorkspace- Throws:
RepositoryException
-
getVersionManager
public VersionManager getVersionManager() throws RepositoryException
- Specified by:
getVersionManagerin interfaceWorkspace- Throws:
RepositoryException
-
getAccessibleWorkspaceNames
public String[] getAccessibleWorkspaceNames() throws RepositoryException
- Specified by:
getAccessibleWorkspaceNamesin interfaceWorkspace- Throws:
RepositoryException
-
getImportContentHandler
public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws RepositoryException
- Specified by:
getImportContentHandlerin interfaceWorkspace- Throws:
RepositoryException
-
importXML
public void importXML(String parentAbsPath, InputStream in, int uuidBehavior) throws IOException, RepositoryException
- Specified by:
importXMLin interfaceWorkspace- Throws:
IOExceptionRepositoryException
-
createWorkspace
public void createWorkspace(String name) throws RepositoryException
Description copied from interface:JackrabbitWorkspaceCreates a workspace with the given name.- Specified by:
createWorkspacein interfaceJackrabbitWorkspace- Specified by:
createWorkspacein interfaceWorkspace- Parameters:
name- name of the new workspace- Throws:
AccessDeniedException- if the current session is not allowed to create the workspaceRepositoryException- if a workspace with the given name already exists or if another error occurs- See Also:
Workspace.getAccessibleWorkspaceNames()
-
createWorkspace
public void createWorkspace(String name, String srcWorkspace) throws RepositoryException
- Specified by:
createWorkspacein interfaceWorkspace- Throws:
RepositoryException
-
deleteWorkspace
public void deleteWorkspace(String name) throws RepositoryException
- Specified by:
deleteWorkspacein interfaceWorkspace- Throws:
RepositoryException
-
createWorkspace
public void createWorkspace(String workspaceName, InputSource workspaceTemplate) throws RepositoryException
Description copied from interface:JackrabbitWorkspaceCreates a workspace with the given name and a workspace configuration template.- Specified by:
createWorkspacein interfaceJackrabbitWorkspace- Parameters:
workspaceName- name of the new workspaceworkspaceTemplate- the configuration template of the new workspace- Throws:
AccessDeniedException- if the current session is not allowed to create the workspaceRepositoryException- if a workspace with the given name already exists or if another error occurs- See Also:
Workspace.getAccessibleWorkspaceNames()
-
getPrivilegeManager
public PrivilegeManager getPrivilegeManager() throws RepositoryException
Description copied from interface:JackrabbitWorkspaceReturns the privilege manager.- Specified by:
getPrivilegeManagerin interfaceJackrabbitWorkspace- Returns:
- the privilege manager.
- Throws:
RepositoryException- If an error occurs.- See Also:
JackrabbitWorkspace.getPrivilegeManager()
-
internalGetVersionManager
@NotNull public @NotNull VersionManagerImpl internalGetVersionManager()
-
-