org.apache.jackrabbit.core
Class WorkspaceManager

java.lang.Object
  extended by org.apache.jackrabbit.core.WorkspaceManager

public class WorkspaceManager
extends Object

Utility class that decouples SessionImpl from the internal workspace handling details of RepositoryImpl.


Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 workspace
configTemplate - 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
Throws:
NoSuchWorkspaceException
RepositoryException

getObservationDispatcher

public ObservationDispatcher getObservationDispatcher(String workspaceName)
                                               throws NoSuchWorkspaceException,
                                                      RepositoryException
Throws:
NoSuchWorkspaceException
RepositoryException

createSession

public SessionImpl createSession(Subject subject,
                                 String workspaceName)
                          throws RepositoryException
Throws:
RepositoryException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.