Interface SharedWorkspaceService


public interface SharedWorkspaceService
Manages shared folder workspace links and retrieves metadata entries that describe the state of each link.
  • Method Summary

    Modifier and Type
    Method
    Description
    createLink(String sharedFolderId, String userId)
    Once a shared folder is created in the repository, access to the corresponding shared workspace folder can be made available to members of the context where the shared folder lives.
    void
    deleteLink(String sharedFolderId, String userId)
    Remove access to the repository shared folder for the specified user.
    Get the shared workspace entries for the specified repository shared folder.
  • Method Details

    • createLink

      Once a shared folder is created in the repository, access to the corresponding shared workspace folder can be made available to members of the context where the shared folder lives. This is done by creating a link for the user to the shared folder.

      If creating a link for a user different than the current user, the privilege ScopedPrivileges.PRIVILEGE_MANAGE_SHARED_FOLDERS is required at the parent context.

      Parameters:
      sharedFolderId - The unique identifier of the repository shared folder.
      userId - The user to provide access to the repository shared folder's corresponding shared workspace folder.
      Returns:
      The updated shared workspace entry.
      Throws:
      WorkspaceItemNotFoundException - Thrown when the specified shared folder identifier is not found.
      WorkspaceItemExistsException - Thrown when the link to the shared workspace folder already exists.
    • deleteLink

      void deleteLink(String sharedFolderId, String userId) throws SharedWorkspaceLinkNotFoundException
      Remove access to the repository shared folder for the specified user.
      Parameters:
      sharedFolderId - The unique identifier of the repository shared folder.
      userId - The user whose access to remove from the shared folder.
      Throws:
      SharedWorkspaceLinkNotFoundException - Thrown when no link was found to the shared folder for the specified user.
    • getSharedWorkspaceEntries

      Set<SharedWorkspaceEntry> getSharedWorkspaceEntries(String sharedFolderId)
      Get the shared workspace entries for the specified repository shared folder. Each entry includes a context member and whether or not that user has access to the corresponding shared workspace folder.
      Parameters:
      sharedFolderId - The unique identifier of the repository shared folder.
      Returns:
      A set of shared workspace entries.