Interface SheetDiscussionResources
-
public interface SheetDiscussionResources
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DiscussionAttachmentResourcesattachmentResources()Creates an object of DiscussionAttachmentResources for access to discussion attachments through SheetDiscussionResources.DiscussionCommentResourcescommentResources()Creates an object of DiscussionCommentResources for access to discussion comments through SheetDiscussionResources.DiscussioncreateDiscussion(long sheetId, Discussion discussion)Create a discussion on a sheet.DiscussioncreateDiscussionWithAttachment(long sheetId, Discussion discussion, java.io.File file, java.lang.String contentType)Create a discussion with attachments on a sheet.voiddeleteDiscussion(long sheetId, long discussionId)Delete discussion.DiscussiongetDiscussion(long sheetId, long discussionId)Get a discussion.PagedResult<Discussion>listDiscussions(long sheetId, PaginationParameters pagination, java.util.EnumSet<DiscussionInclusion> includes)Get all discussions
-
-
-
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 iddiscussion- the discussion object- Returns:
- the created discussion
- Throws:
java.lang.IllegalArgumentException- if any argument is null or empty stringInvalidRequestException- if there is any problem with the REST API requestAuthorizationException- if there is any problem with the REST API authorization (access token)ResourceNotFoundException- if the resource cannot be foundServiceUnavailableException- 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 iddiscussion- the discussion objectfile- the file to attachcontentType- the type of file- Returns:
- the created discussion
- Throws:
java.lang.IllegalArgumentException- if any argument is null or empty stringInvalidRequestException- if there is any problem with the REST API requestAuthorizationException- if there is any problem with the REST API authorization (access token)ResourceNotFoundException- if the resource cannot be foundServiceUnavailableException- if the REST API service is not available (possibly due to rate limiting)SmartsheetException- if there is any other error during the operationjava.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 idsheetId- 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 stringInvalidRequestException- if there is any problem with the REST API requestAuthorizationException- if there is any problem with the REST API authorization (access token)ResourceNotFoundException- if the resource cannot be foundServiceUnavailableException- 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 SmartsheetExceptionDelete 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 IDdiscussionId- 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 IDpagination- the pagination parametersincludes- 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
-
-