Package org.ametys.runtime.workspace
Class WorkspaceManager
java.lang.Object
org.ametys.runtime.workspace.WorkspaceManager
Main entry point for access to workspaces.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Cause of the deactivation of a workspace -
Method Summary
Modifier and TypeMethodDescriptiongetBaseURI
(String workspaceName) Returns the base URI associated with the given workspace, or null if the workspace does not existReturns a String array containing the ids of the plugins embedded in jarsReturn the inactive workspacesstatic WorkspaceManager
Returns the shared instance of theWorkspaceManager
getLocation
(String workspaceName) Returns the workspace filesystem location for the given workspace or null if the workspace is loaded from the classpath.Returns all active workspaces namesReturns 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.
-
Method Details
-
getInstance
Returns the shared instance of theWorkspaceManager
- Returns:
- the shared instance of the
WorkspaceManager
-
getWorkspaceNames
Returns all active workspaces names- Returns:
- all active workspaces names
-
getWorkspaces
Returns active workspaces declarations.- Returns:
- active workspaces declarations.
-
getInactiveWorkspaces
Return the inactive workspaces- Returns:
- All the inactive workspaces
-
getEmbeddedWorskpacesIds
Returns a String array containing the ids of the plugins embedded in jars- Returns:
- a String array containing the ids of the plugins embedded in jars
-
getBaseURI
Returns the base URI associated with the given workspace, or null if the workspace does not exist- Parameters:
workspaceName
- the name of the working workspace- Returns:
- the URI associated with the given workspace
-
getLocation
Returns the workspace filesystem location for the given workspace or null if the workspace is loaded from the classpath.- Parameters:
workspaceName
- the workspace name- Returns:
- the workspace location for the given workspace
-
init
Initialize the WorkspaceManager.
It first looks for META-INF/runtime-workspace files in the classpath, then in the "workspaces" directory of the application.- Parameters:
excludedWorkspace
- the excluded workspaces, as given by the RuntimeConfigcontextPath
- the servlet context path- Throws:
IOException
- if an error occurs while retrieving resources
-