Package org.apache.jackrabbit.core
Class WorkspaceManager
- java.lang.Object
-
- org.apache.jackrabbit.core.WorkspaceManager
-
public class WorkspaceManager extends Object
Utility class that decouplesSessionImplfrom the internal workspace handling details ofRepositoryImpl.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionImplcreateSession(Subject subject, String workspaceName)voidcreateWorkspace(String workspaceName)Creates a workspace with the given name.voidcreateWorkspace(String workspaceName, InputSource configTemplate)Creates a workspace with the given name and a workspace configuration template.StringgetDefaultWorkspaceName()Returns the name of the default workspace.ObservationDispatchergetObservationDispatcher(String workspaceName)String[]getWorkspaceNames()Returns the names of all the available workspaces.SharedItemStateManagergetWorkspaceStateManager(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
-
-