Interface GroupMemberResources


  • public interface GroupMemberResources

    This interface provides methods to access Share resources.

    Thread Safety: Implementation of this interface must be thread safe.

    • Method Detail

      • addGroupMembers

        java.util.List<GroupMember> addGroupMembers​(long groupId,
                                                    java.util.List<GroupMember> members)
                                             throws SmartsheetException

        Add members to a group.

        It mirrors to the following Smartsheet REST API method: POST /group/{id}/members

        Parameters:
        groupId - the ID of the object to add members to.
        members - the list of members to add. Users that are already members will be ignored.
        Returns:
        the list of newly added members. Users that were added to the group. Pre-existing members are not included in the result.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation
      • deleteGroupMember

        void deleteGroupMember​(long groupId,
                               long userId)
                        throws SmartsheetException

        Remove a member from a group.

        It mirrors to the following Smartsheet REST API method: DELETE /group/{id}/member/{userId}

        Parameters:
        groupId - the ID of the object to remove the member from
        userId - the ID of the user to remove.
        Throws:
        java.lang.IllegalArgumentException - if any argument is null or empty string
        InvalidRequestException - if there is any problem with the REST API request
        AuthorizationException - if there is any problem with the REST API authorization (access token)
        ResourceNotFoundException - if the resource cannot be found
        ServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)
        SmartsheetException - if there is any other error during the operation