Package org.apache.jackrabbit.core
Class WorkspaceManager
- java.lang.Object
-
- org.apache.jackrabbit.core.WorkspaceManager
-
public class WorkspaceManager extends Object
Utility class that decouplesSessionImpl
from the internal workspace handling details ofRepositoryImpl
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionImpl
createSession(Subject subject, String workspaceName)
void
createWorkspace(String workspaceName)
Creates a workspace with the given name.void
createWorkspace(String workspaceName, InputSource configTemplate)
Creates a workspace with the given name and a workspace configuration template.String
getDefaultWorkspaceName()
Returns the name of the default workspace.ObservationDispatcher
getObservationDispatcher(String workspaceName)
String[]
getWorkspaceNames()
Returns the names of all the available workspaces.SharedItemStateManager
getWorkspaceStateManager(String workspaceName)
-
-
-
Method Detail
-
getDefaultWorkspaceName
public String getDefaultWorkspaceName()
Returns the name of the default workspace.- Returns:
- default workspace name
-
getWorkspaceNames
public String[] getWorkspaceNames()
Returns the names of all the available workspaces.- Returns:
- workspace names
-
createWorkspace
public void createWorkspace(String workspaceName) throws RepositoryException
Creates a workspace with the given name.- Parameters:
workspaceName
- name of the new workspace- Throws:
RepositoryException
- if a workspace with the given name already exists or if another error occurs
-
createWorkspace
public void createWorkspace(String workspaceName, InputSource configTemplate) throws RepositoryException
Creates a workspace with the given name and a workspace configuration template.- Parameters:
workspaceName
- name of the new workspaceconfigTemplate
- the configuration template of the new workspace- Throws:
RepositoryException
- if a workspace with the given name already exists or if another error occurs
-
getWorkspaceStateManager
public SharedItemStateManager getWorkspaceStateManager(String workspaceName) throws NoSuchWorkspaceException, RepositoryException
-
getObservationDispatcher
public ObservationDispatcher getObservationDispatcher(String workspaceName) throws NoSuchWorkspaceException, RepositoryException
-
createSession
public SessionImpl createSession(Subject subject, String workspaceName) throws RepositoryException
- Throws:
RepositoryException
-
-