Interface SheetDiscussionResources


  • public interface SheetDiscussionResources
    • Method Detail

      • createDiscussion

        Discussion createDiscussion​(long sheetId,
                                    Discussion discussion)
                             throws SmartsheetException

        Create a discussion on a sheet.

        It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions

        Parameters:
        sheetId - the sheet id
        discussion - the discussion object
        Returns:
        the created discussion
        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
      • createDiscussionWithAttachment

        Discussion createDiscussionWithAttachment​(long sheetId,
                                                  Discussion discussion,
                                                  java.io.File file,
                                                  java.lang.String contentType)
                                           throws SmartsheetException,
                                                  java.io.IOException

        Create a discussion with attachments on a sheet.

        It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions

        Parameters:
        sheetId - the sheet id
        discussion - the discussion object
        file - the file to attach
        contentType - the type of file
        Returns:
        the created discussion
        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 with file
      • getDiscussion

        Discussion getDiscussion​(long sheetId,
                                 long discussionId)
                          throws SmartsheetException

        Get a discussion.

        It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/discussions/{discussionId}

        Parameters:
        discussionId - the discussion id
        sheetId - the sheet id
        Returns:
        the discussion (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
        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
      • deleteDiscussion

        void deleteDiscussion​(long sheetId,
                              long discussionId)
                       throws SmartsheetException

        Delete discussion.

        It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/discussions/{discussionId}

        Exceptions: IllegalArgumentException : if any argument is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation

        Parameters:
        sheetId - the sheet ID
        discussionId - the discussion ID
        Throws:
        SmartsheetException - the smartsheet exception
      • listDiscussions

        PagedResult<Discussion> listDiscussions​(long sheetId,
                                                PaginationParameters pagination,
                                                java.util.EnumSet<DiscussionInclusion> includes)
                                         throws SmartsheetException

        Get all discussions

        It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/discussions

        Exceptions: IllegalArgumentException : if any argument is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operation

        Parameters:
        sheetId - the sheet ID
        pagination - the pagination parameters
        includes - the optional paramters to include
        Returns:
        a list of discussions
        Throws:
        SmartsheetException - the smartsheet exception
      • commentResources

        DiscussionCommentResources commentResources()
                                             throws SmartsheetException

        Creates an object of DiscussionCommentResources for access to discussion comments through SheetDiscussionResources.

        Returns:
        the created DiscussionCommentResources object
        Throws:
        SmartsheetException - if there is any other error during the operation
      • attachmentResources

        DiscussionAttachmentResources attachmentResources()
                                                   throws SmartsheetException

        Creates an object of DiscussionAttachmentResources for access to discussion attachments through SheetDiscussionResources.

        Returns:
        the created DiscussionAttachmentResources object
        Throws:
        SmartsheetException - if there is any other error during the operation