Interface DiscussionCommentResources


  • public interface DiscussionCommentResources
    • Method Detail

      • addComment

        Comment addComment​(long sheetId,
                           long discussionId,
                           Comment comment)
                    throws SmartsheetException

        Add a comment to a discussion.

        It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments

        Parameters:
        sheetId - the sheet id
        discussionId - the dicussion id
        comment - the comment to add
        Returns:
        the created comment
        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
      • addCommentWithAttachment

        Comment addCommentWithAttachment​(long sheetId,
                                         long discussionId,
                                         Comment comment,
                                         java.io.File file,
                                         java.lang.String contentType)
                                  throws SmartsheetException,
                                         java.io.IOException

        Add a comment to a discussion with an attachment.

        It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments

        Parameters:
        sheetId - the sheet id
        discussionId - the dicussion id
        comment - the comment to add
        file - the file to be attached
        contentType - the type of file
        Returns:
        the created comment
        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
        java.io.IOException - is there is any error with file
      • updateComment

        Comment updateComment​(long sheetId,
                              Comment comment)
                       throws SmartsheetException

        Update the specified comment

        It mirrors to the following Smartsheet REST API method: PUT PUT /sheets/{sheetId}/comments/{commentId}

        Parameters:
        sheetId - the sheet id
        comment - the new comment object
        Returns:
        the updated comment
        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