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 void
clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting)
void
copy(String srcAbsPath, String destAbsPath)
void
copy(String srcWorkspace, String srcAbsPath, String destAbsPath)
void
createWorkspace(String name)
Creates a workspace with the given name.void
createWorkspace(String name, String srcWorkspace)
void
createWorkspace(String workspaceName, InputSource workspaceTemplate)
Creates a workspace with the given name and a workspace configuration template.void
deleteWorkspace(String name)
String[]
getAccessibleWorkspaceNames()
ContentHandler
getImportContentHandler(String parentAbsPath, int uuidBehavior)
LockManagerImpl
getLockManager()
String
getName()
NamespaceRegistry
getNamespaceRegistry()
ReadWriteNodeTypeManager
getNodeTypeManager()
ObservationManager
getObservationManager()
PrivilegeManager
getPrivilegeManager()
Returns the privilege manager.QueryManager
getQueryManager()
@NotNull Session
getSession()
VersionManager
getVersionManager()
void
importXML(String parentAbsPath, InputStream in, int uuidBehavior)
@NotNull VersionManagerImpl
internalGetVersionManager()
void
move(String srcAbsPath, String destAbsPath)
void
restore(Version[] versions, boolean removeExisting)
-
-
-
Constructor Detail
-
WorkspaceImpl
public WorkspaceImpl(SessionContext sessionContext)
-
-
Method Detail
-
getSession
@NotNull public @NotNull Session getSession()
- Specified by:
getSession
in interfaceWorkspace
-
copy
public void copy(String srcAbsPath, String destAbsPath) throws RepositoryException
- Specified by:
copy
in interfaceWorkspace
- Throws:
RepositoryException
-
copy
public void copy(String srcWorkspace, String srcAbsPath, String destAbsPath) throws RepositoryException
- Specified by:
copy
in interfaceWorkspace
- Throws:
RepositoryException
-
clone
public void clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting) throws RepositoryException
- Specified by:
clone
in interfaceWorkspace
- Throws:
RepositoryException
-
move
public void move(String srcAbsPath, String destAbsPath) throws RepositoryException
- Specified by:
move
in interfaceWorkspace
- Throws:
RepositoryException
-
restore
public void restore(Version[] versions, boolean removeExisting) throws RepositoryException
- Specified by:
restore
in interfaceWorkspace
- Throws:
RepositoryException
-
getLockManager
public LockManagerImpl getLockManager() throws UnsupportedRepositoryOperationException
- Specified by:
getLockManager
in interfaceWorkspace
- Throws:
UnsupportedRepositoryOperationException
-
getQueryManager
public QueryManager getQueryManager() throws RepositoryException
- Specified by:
getQueryManager
in interfaceWorkspace
- Throws:
RepositoryException
-
getNamespaceRegistry
public NamespaceRegistry getNamespaceRegistry()
- Specified by:
getNamespaceRegistry
in interfaceWorkspace
-
getNodeTypeManager
public ReadWriteNodeTypeManager getNodeTypeManager()
- Specified by:
getNodeTypeManager
in interfaceWorkspace
-
getObservationManager
public ObservationManager getObservationManager() throws RepositoryException
- Specified by:
getObservationManager
in interfaceWorkspace
- Throws:
RepositoryException
-
getVersionManager
public VersionManager getVersionManager() throws RepositoryException
- Specified by:
getVersionManager
in interfaceWorkspace
- Throws:
RepositoryException
-
getAccessibleWorkspaceNames
public String[] getAccessibleWorkspaceNames() throws RepositoryException
- Specified by:
getAccessibleWorkspaceNames
in interfaceWorkspace
- Throws:
RepositoryException
-
getImportContentHandler
public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws RepositoryException
- Specified by:
getImportContentHandler
in interfaceWorkspace
- Throws:
RepositoryException
-
importXML
public void importXML(String parentAbsPath, InputStream in, int uuidBehavior) throws IOException, RepositoryException
- Specified by:
importXML
in interfaceWorkspace
- Throws:
IOException
RepositoryException
-
createWorkspace
public void createWorkspace(String name) throws RepositoryException
Description copied from interface:JackrabbitWorkspace
Creates a workspace with the given name.- Specified by:
createWorkspace
in interfaceJackrabbitWorkspace
- Specified by:
createWorkspace
in 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:
createWorkspace
in interfaceWorkspace
- Throws:
RepositoryException
-
deleteWorkspace
public void deleteWorkspace(String name) throws RepositoryException
- Specified by:
deleteWorkspace
in interfaceWorkspace
- Throws:
RepositoryException
-
createWorkspace
public void createWorkspace(String workspaceName, InputSource workspaceTemplate) throws RepositoryException
Description copied from interface:JackrabbitWorkspace
Creates a workspace with the given name and a workspace configuration template.- Specified by:
createWorkspace
in 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:JackrabbitWorkspace
Returns the privilege manager.- Specified by:
getPrivilegeManager
in interfaceJackrabbitWorkspace
- Returns:
- the privilege manager.
- Throws:
RepositoryException
- If an error occurs.- See Also:
JackrabbitWorkspace.getPrivilegeManager()
-
internalGetVersionManager
@NotNull public @NotNull VersionManagerImpl internalGetVersionManager()
-
-