public final class WorkspaceManager extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | WorkspaceManager.InactivityCauseCause of the deactivation of a workspace | 
| Modifier and Type | Field and Description | 
|---|---|
| private static WorkspaceManager | __manager | 
| private static String | __WORKSPACE_FILENAME | 
| private Map<String,WorkspaceManager.InactivityCause> | _inactiveWorkspaces | 
| private Logger | _logger | 
| private Map<String,Workspace> | _workspaces | 
| Modifier | Constructor and Description | 
|---|---|
| private  | WorkspaceManager() | 
| Modifier and Type | Method and Description | 
|---|---|
| private Configuration | _getConfigurationFromStream(String workspaceName,
                           InputStream is,
                           String path) | 
| private void | _initFileWorkspaces(File workspaceFile,
                   String workspaceName,
                   Collection<String> excludedWorkspace) | 
| private void | _initResourceWorkspace(Collection<String> excludedWorkspace,
                      URL workspaceResource) | 
| String | getBaseURI(String workspaceName)Returns the base URI associated with the given workspace, or null if the workspace does not exist | 
| Set<String> | getEmbeddedWorskpacesIds()Returns a String array containing the ids of the plugins embedded in jars | 
| Map<String,WorkspaceManager.InactivityCause> | getInactiveWorkspaces()Return the inactive workspaces | 
| static WorkspaceManager | getInstance()Returns the shared instance of the  WorkspaceManager | 
| File | getLocation(String workspaceName)Returns the workspace filesystem location for the given workspace or null if the workspace is loaded from the classpath. | 
| Set<String> | getWorkspaceNames()Returns all active workspaces names | 
| Map<String,Workspace> | getWorkspaces()Returns active workspaces declarations. | 
| void | init(Collection<String> excludedWorkspace,
    String contextPath)Initialize the WorkspaceManager. It first looks for META-INF/runtime-workspace files in the classpath, then in the "workspaces" directory of the application. | 
private static WorkspaceManager __manager
private static final String __WORKSPACE_FILENAME
private Map<String,Workspace> _workspaces
private Map<String,WorkspaceManager.InactivityCause> _inactiveWorkspaces
private WorkspaceManager()
public static WorkspaceManager getInstance()
WorkspaceManagerWorkspaceManagerpublic Set<String> getWorkspaceNames()
public Map<String,Workspace> getWorkspaces()
public Map<String,WorkspaceManager.InactivityCause> getInactiveWorkspaces()
public Set<String> getEmbeddedWorskpacesIds()
public String getBaseURI(String workspaceName)
workspaceName - the name of the working workspacepublic File getLocation(String workspaceName)
workspaceName - the workspace namepublic void init(Collection<String> excludedWorkspace, String contextPath) throws IOException
excludedWorkspace - the excluded workspaces, as given by the RuntimeConfigcontextPath - the servlet context pathIOException - if an error occurs while retrieving resourcesprivate void _initResourceWorkspace(Collection<String> excludedWorkspace, URL workspaceResource) throws IOException
IOExceptionprivate void _initFileWorkspaces(File workspaceFile, String workspaceName, Collection<String> excludedWorkspace) throws IOException
IOExceptionprivate Configuration _getConfigurationFromStream(String workspaceName, InputStream is, String path)