Interface SheetRowResources
-
public interface SheetRowResources
This interface provides methods to access row resources that are associated to a sheet object.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 java.util.List<Row>
addRows(long sheetId, java.util.List<Row> rows)
Insert rows to a sheet.java.util.List<Row>
addRows(long sheetId, java.util.List<Row> rows, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes)
Insert rows to a sheet.PartialRowUpdateResult
addRowsAllowPartialSuccess(long sheetId, java.util.List<Row> rows)
Insert rows to a sheet, allowing partial success.PartialRowUpdateResult
addRowsAllowPartialSuccess(long sheetId, java.util.List<Row> rows, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes)
Insert rows to a sheet, allowing partial success.RowAttachmentResources
attachmentResources()
Creates an object of RowAttachmentResources.RowColumnResources
cellResources()
Creates an object of RowColumnResources.CopyOrMoveRowResult
copyRows(java.lang.Long sheetId, java.util.EnumSet<RowCopyInclusion> includes, java.lang.Boolean ignoreRowsNotFound, CopyOrMoveRowDirective copyParameters)
Copies Row(s) from the Sheet specified in the URL to (the bottom of) another sheet.void
deleteRow(long sheetId, long rowId)
Deprecated, for removal: This API element is subject to removal in a future version.as of API 2.0.2 release, replaced bydeleteRows(long, Set, boolean)
java.util.List<java.lang.Long>
deleteRows(long sheetId, java.util.Set<java.lang.Long> rowIds, boolean ignoreRowsNotFound)
Deletes one or more row(s) from the Sheet specified in the URL.RowDiscussionResources
discussionResources()
Creates an object of RowDiscussionResources.Row
getRow(long sheetId, long rowId, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes)
Get a row.CopyOrMoveRowResult
moveRows(java.lang.Long sheetId, java.util.EnumSet<RowMoveInclusion> includes, java.lang.Boolean ignoreRowsNotFound, CopyOrMoveRowDirective moveParameters)
Moves Row(s) from the Sheet specified in the URL to (the bottom of) another sheet.void
sendRow(long sheetId, long rowId, RowEmail email)
Deprecated, for removal: This API element is subject to removal in a future version.as of API V2.0.2, replaced bysendRows(long, MultiRowEmail)
void
sendRows(long sheetId, MultiRowEmail email)
Send a row via email to the designated recipients.Row
updateCell(long sheetId, int rowIdx, int colIdx, java.lang.String newValue)
Helper method: Update a single with a string valueRow
updateCell(long sheetId, Cell cell)
Helper method: Update a single cellRow
updateCell(Sheet sheet, int rowIdx, int colIdx, java.lang.String newValue)
Helper method: Update a single with a string valuejava.util.List<Row>
updateRows(long sheetId, java.util.List<Row> rows)
Update rows.java.util.List<Row>
updateRows(long sheetId, java.util.List<Row> rows, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes)
Update rows.PartialRowUpdateResult
updateRowsAllowPartialSuccess(long sheetId, java.util.List<Row> rows)
Update rows, but allow partial success.PartialRowUpdateResult
updateRowsAllowPartialSuccess(long sheetId, java.util.List<Row> rows, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes)
Update rows, but allow partial success.
-
-
-
Method Detail
-
addRows
java.util.List<Row> addRows(long sheetId, java.util.List<Row> rows) throws SmartsheetException
Insert rows to a sheet.
It mirrors to the following Smartsheet REST API method: POST /sheets/{id}/rows
- Parameters:
sheetId
- the sheet idrows
- the list of rows to create- Returns:
- the list of created rows
- 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
-
addRows
java.util.List<Row> addRows(long sheetId, java.util.List<Row> rows, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes) throws SmartsheetException
Insert rows to a sheet.
It mirrors to the following Smartsheet REST API method: POST /sheets/{id}/rows
- Parameters:
sheetId
- the sheet idrows
- the list of rows to createincludes
- optional objects to includeexcludes
- optional objects to exclude- Returns:
- the list of created rows
- 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
-
addRowsAllowPartialSuccess
PartialRowUpdateResult addRowsAllowPartialSuccess(long sheetId, java.util.List<Row> rows) throws SmartsheetException
Insert rows to a sheet, allowing partial success. If a row cannot be inserted, it will fail, while the others may succeed..
It mirrors to the following Smartsheet REST API method: POST /sheets/{id}/rows
- Parameters:
sheetId
- the sheet idrows
- the list of rows to create- Returns:
- the list of created rows
- 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
-
addRowsAllowPartialSuccess
PartialRowUpdateResult addRowsAllowPartialSuccess(long sheetId, java.util.List<Row> rows, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes) throws SmartsheetException
Insert rows to a sheet, allowing partial success. If a row cannot be inserted, it will fail, while the others may succeed..
It mirrors to the following Smartsheet REST API method: POST /sheets/{id}/rows
- Parameters:
sheetId
- the sheet idrows
- the list of rows to createincludes
- optional objects to includeexcludes
- optional objects to exclude- Returns:
- the list of created rows
- 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
-
getRow
Row getRow(long sheetId, long rowId, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes) throws SmartsheetException
Get a row.
It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}
- Parameters:
sheetId
- the id of the sheetrowId
- the id of the rowincludes
- optional objects to includeexcludes
- optional objects to exclude- Returns:
- the created row (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
-
deleteRow
@Deprecated(since="2.0.2", forRemoval=true) void deleteRow(long sheetId, long rowId) throws SmartsheetException
Deprecated, for removal: This API element is subject to removal in a future version.as of API 2.0.2 release, replaced bydeleteRows(long, Set, boolean)
Delete a row.
It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/rows/{rowId}
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:
sheetId
- the sheet idrowId
- the row id- Throws:
SmartsheetException
- the smartsheet exception
-
sendRow
@Deprecated(since="2.0.2", forRemoval=true) void sendRow(long sheetId, long rowId, RowEmail email) throws SmartsheetException
Deprecated, for removal: This API element is subject to removal in a future version.as of API V2.0.2, replaced bysendRows(long, MultiRowEmail)
Send a row via email to the designated recipients.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/emails
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 id of the sheetrowId
- the id of the rowemail
- the row email- Throws:
SmartsheetException
- the smartsheet exception
-
sendRows
void sendRows(long sheetId, MultiRowEmail email) throws SmartsheetException
Send a row via email to the designated recipients.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/emails
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 id of the sheetemail
- the multi row email- Throws:
SmartsheetException
- the smartsheet exception
-
deleteRows
java.util.List<java.lang.Long> deleteRows(long sheetId, java.util.Set<java.lang.Long> rowIds, boolean ignoreRowsNotFound) throws SmartsheetException
Deletes one or more row(s) from the Sheet specified in the URL.
It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/rows/{rowId}
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:
sheetId
- the sheet idrowIds
- the row idsignoreRowsNotFound
- boolean for ignoring row ids not found- Returns:
- a list of deleted rows
- Throws:
SmartsheetException
- the smartsheet exception
-
updateRows
java.util.List<Row> updateRows(long sheetId, java.util.List<Row> rows) throws SmartsheetException
Update rows.
It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows
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 id of the sheetrows
- the list of rows- Returns:
- a list of rows
- Throws:
SmartsheetException
- the smartsheet exception
-
updateRows
java.util.List<Row> updateRows(long sheetId, java.util.List<Row> rows, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes) throws SmartsheetException
Update rows.
It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows
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 id of the sheetrows
- the list of rowsincludes
- optional objects to includeexcludes
- optional objects to exclude- Returns:
- a list of rows
- Throws:
SmartsheetException
- the smartsheet exception
-
updateCell
Row updateCell(long sheetId, Cell cell) throws SmartsheetException
Helper method: Update a single cell
- Parameters:
sheetId
- the sheet ID the cell should be written tocell
- the cell object to be written. Must include a rowId and columnId- Returns:
- The returned Row object from the api
- Throws:
SmartsheetException
- the smartsheet exception
-
updateCell
Row updateCell(long sheetId, int rowIdx, int colIdx, java.lang.String newValue) throws SmartsheetException
Helper method: Update a single with a string value
NOTE: This method internally fetches the sheet. To avoid this step, fetch the sheet in advance and use the method by the same name
- Parameters:
sheetId
- the sheet ID the cell should be written torowIdx
- the row index of the cell (base 1 indexed)colIdx
- the column index of the cell (base 1 indexed)newValue
- the new value of the cell- Returns:
- The returned Row object from the api
- Throws:
SmartsheetException
- the smartsheet exception
-
updateCell
Row updateCell(Sheet sheet, int rowIdx, int colIdx, java.lang.String newValue) throws SmartsheetException
Helper method: Update a single with a string value
- Parameters:
sheet
- The sheet to update the cell in. Must include rowId and cell informationrowIdx
- The row index of the cell (base 1 indexed)colIdx
- The column index of the cell (base 1 indexed)newValue
- The new value of the cell- Returns:
- The returned Row object from the api
- Throws:
SmartsheetException
- the smartsheet exception
-
updateRowsAllowPartialSuccess
PartialRowUpdateResult updateRowsAllowPartialSuccess(long sheetId, java.util.List<Row> rows) throws SmartsheetException
Update rows, but allow partial success. The PartialRowUpdateResult will contain the successful rows and those that failed, with specific messages for each.
It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows
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 id of the sheetrows
- the list of rows- Returns:
- a list of rows
- Throws:
SmartsheetException
- the smartsheet exception
-
updateRowsAllowPartialSuccess
PartialRowUpdateResult updateRowsAllowPartialSuccess(long sheetId, java.util.List<Row> rows, java.util.EnumSet<RowInclusion> includes, java.util.EnumSet<ObjectExclusion> excludes) throws SmartsheetException
Update rows, but allow partial success. The PartialRowUpdateResult will contain the successful rows and those that failed, with specific messages for each.
It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows
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 id of the sheetrows
- the list of rowsincludes
- optional objects to includeexcludes
- optional objects to exclude- Returns:
- a list of rows
- Throws:
SmartsheetException
- the smartsheet exception
-
moveRows
CopyOrMoveRowResult moveRows(java.lang.Long sheetId, java.util.EnumSet<RowMoveInclusion> includes, java.lang.Boolean ignoreRowsNotFound, CopyOrMoveRowDirective moveParameters) throws SmartsheetException
Moves Row(s) from the Sheet specified in the URL to (the bottom of) another sheet.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/move
Exceptions: IllegalArgumentException : if any argument is null, or path is 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) 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 to moveincludes
- the parameters to includeignoreRowsNotFound
- optional,specifying row Ids that do not exist within the source sheetmoveParameters
- CopyOrMoveRowDirective object- Returns:
- the result object
- Throws:
SmartsheetException
- the smartsheet exception
-
copyRows
CopyOrMoveRowResult copyRows(java.lang.Long sheetId, java.util.EnumSet<RowCopyInclusion> includes, java.lang.Boolean ignoreRowsNotFound, CopyOrMoveRowDirective copyParameters) throws SmartsheetException
Copies Row(s) from the Sheet specified in the URL to (the bottom of) another sheet.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/move
Exceptions: IllegalArgumentException : if any argument is null, or path is 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) 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 to moveincludes
- the parameters to includeignoreRowsNotFound
- optional,specifying row Ids that do not exist within the source sheetcopyParameters
- CopyOrMoveRowDirective object- Returns:
- the result object
- Throws:
SmartsheetException
- the smartsheet exception
-
attachmentResources
RowAttachmentResources attachmentResources()
Creates an object of RowAttachmentResources.
- Returns:
- the created RowAttachmentResources object
-
discussionResources
RowDiscussionResources discussionResources()
Creates an object of RowDiscussionResources.
- Returns:
- the created RowDiscussionResources object
-
cellResources
RowColumnResources cellResources()
Creates an object of RowColumnResources.
- Returns:
- the created RowColumnResources object
-
-