Interface ShareResources
-
@Deprecated(since="3.3.0", forRemoval=true) public interface ShareResourcesDeprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useAssetShareResourcesinstead.This interface provides methods to access Share resources.
Thread Safety: Implementation of this interface must be thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voiddeleteShare(long objectId, java.lang.String shareId)Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0.SharegetShare(long objectId, java.lang.String shareId)Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0.PagedResult<Share>listShares(long objectId, PaginationParameters parameters)Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0.PagedResult<Share>listShares(long objectId, PaginationParameters parameters, java.lang.Boolean includeWorkspaceShares)Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0.java.util.List<Share>shareTo(long objectId, java.util.List<Share> shares, java.lang.Boolean sendEmail)Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0.ShareupdateShare(long objectId, Share share)Deprecated, for removal: This API element is subject to removal in a future version.As of release 2.0.
-
-
-
Method Detail
-
listShares
@Deprecated(since="3.3.0", forRemoval=true) PagedResult<Share> listShares(long objectId, PaginationParameters parameters) throws SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please use the other listShares method in this class and pass `includeWorkspaceShares` as `false`List shares of a given object.
It mirrors to the following Smartsheet REST API method:
GET /workspace/{id}/shares
GET /sheet/{id}/shares
- Parameters:
objectId- the object idparameters- the pagination parameters- Returns:
- the list of Share objects (note that an empty list will be returned if there is none).
- 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
-
listShares
@Deprecated(since="3.3.0", forRemoval=true) PagedResult<Share> listShares(long objectId, PaginationParameters parameters, java.lang.Boolean includeWorkspaceShares) throws SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useAssetShareResources.listShares(java.lang.String, java.lang.String, java.lang.String, java.lang.Long, java.lang.String)instead.List shares of a given object.
It mirrors to the following Smartsheet REST API method:
GET /workspace/{id}/shares
GET /sheet/{id}/shares
- Parameters:
objectId- the object idparameters- the pagination parametersincludeWorkspaceShares- include workspace shares in enumeration- Returns:
- the list of Share objects (note that an empty list will be returned if there is none).
- 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
-
getShare
@Deprecated(since="3.3.0", forRemoval=true) Share getShare(long objectId, java.lang.String shareId) throws SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useAssetShareResources.getShare(java.lang.String, java.lang.String, java.lang.String)instead.Get a Share.
It mirrors to the following Smartsheet REST API method:
GET /workspaces/{workspaceId}/shares/{shareId}
GET /sheets/{sheetId}/shares/{shareId}
GET /reports/{reportId}/shares
Exceptions: 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 can not be found 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:
objectId- the ID of the object to shareshareId- the ID of the share- Returns:
- the share (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
- Throws:
SmartsheetException- the smartsheet exception
-
shareTo
@Deprecated(since="3.3.0", forRemoval=true) java.util.List<Share> shareTo(long objectId, java.util.List<Share> shares, java.lang.Boolean sendEmail) throws SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useAssetShareResources.shareTo(java.lang.String, java.lang.String, java.util.List<com.smartsheet.api.models.CreateShareRequest>, java.lang.Boolean)instead.Shares the object with the specified Users and Groups.
It mirrors to the following Smartsheet REST API method:
POST /workspaces/{id}/shares
POST /sheets/{id}/shares
POST /reports/{reportId}/shares
Exceptions: IllegalArgumentException : if multiShare 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) ResourceNotFoundException : if the resource can not be found 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:
objectId- the ID of the object to shareshares- list of share objectssendEmail- whether to send email- Returns:
- the created shares
- Throws:
SmartsheetException- the smartsheet exception
-
updateShare
@Deprecated(since="3.3.0", forRemoval=true) Share updateShare(long objectId, Share share) throws SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useAssetShareResources.updateShare(java.lang.String, java.lang.String, java.lang.String, com.smartsheet.api.models.UpdateShareRequest)instead.Update a share.
It mirrors to the following Smartsheet REST API method:
PUT /workspaces/{workspaceId}/shares/{shareId}
PUT /sheets/{sheetId}/shares/{shareId}
PUT /reports/{reportId}/shares/{shareId}
- Parameters:
objectId- the ID of the object to shareshare- the share- Returns:
- the updated share (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
-
deleteShare
@Deprecated(since="3.3.0", forRemoval=true) void deleteShare(long objectId, java.lang.String shareId) throws SmartsheetExceptionDeprecated, for removal: This API element is subject to removal in a future version.As of release 2.0. Please useAssetShareResources.deleteShare(java.lang.String, java.lang.String, java.lang.String)instead.Delete a share.
It mirrors to the following Smartsheet REST API method:
DELETE /workspaces/{workspaceId}/shares/{shareId}
DELETE /sheets/{sheetId}/shares/{shareId}
DELETE /reports/{reportId}/shares/{shareId}
Exceptions: 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 can not be found 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:
objectId- the ID of the object to shareshareId- the ID of the share to delete- Throws:
SmartsheetException- the smartsheet exception
-
-