Class WorkspaceManager

    • Method Detail

      • getInstance

        public static WorkspaceManager getInstance()
        Returns the shared instance of the WorkspaceManager
        Returns:
        the shared instance of the WorkspaceManager
      • getWorkspaceNames

        public Set<StringgetWorkspaceNames()
        Returns all active workspaces names
        Returns:
        all active workspaces names
      • getEmbeddedWorskpacesIds

        public Set<StringgetEmbeddedWorskpacesIds()
        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