Interface SharedWorkspaceService


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      SharedWorkspaceEntry createLink​(java.lang.String sharedFolderId, java.lang.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​(java.lang.String sharedFolderId, java.lang.String userId)
      Remove access to the repository shared folder for the specified user.
      java.util.Set<SharedWorkspaceEntry> getSharedWorkspaceEntries​(java.lang.String sharedFolderId)
      Get the shared workspace entries for the specified repository shared folder.
    • Method Detail

      • createLink

        SharedWorkspaceEntry createLink​(java.lang.String sharedFolderId,
                                        java.lang.String userId)
                                 throws WorkspaceItemNotFoundException,
                                        WorkspaceItemExistsException
        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​(java.lang.String sharedFolderId,
                        java.lang.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

        java.util.Set<SharedWorkspaceEntry> getSharedWorkspaceEntries​(java.lang.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.