Class WorkspaceManager

java.lang.Object
org.ametys.runtime.workspace.WorkspaceManager

public final class WorkspaceManager extends Object
Main entry point for access to workspaces.
  • Method Details

    • getInstance

      public static WorkspaceManager getInstance()
      Returns the shared instance of the WorkspaceManager
      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

      public String getBaseURI(String workspaceName)
      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

      public File getLocation(String workspaceName)
      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

      public void init(Collection<String> excludedWorkspace, String contextPath) throws IOException
      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 RuntimeConfig
      contextPath - the servlet context path
      Throws:
      IOException - if an error occurs while retrieving resources