diff --git a/build.gradle b/build.gradle index cd62be57..2aa02afc 100644 --- a/build.gradle +++ b/build.gradle @@ -56,6 +56,7 @@ ext { mockitoCoreVersion = '5.12.0' mockitoJUnitJupiterVersion = '5.12.0' okHttpVersion = '4.0.0' + resilience4jVersion = "1.7.1" // last version compatible with pre-17 JDKs slf4jSimpleVersion = '1.7.25' slf4jVersion = '1.7.25' } @@ -83,6 +84,7 @@ dependencies { testImplementation "org.mockito:mockito-core:${mockitoCoreVersion}" testImplementation "org.mockito:mockito-junit-jupiter:${mockitoJUnitJupiterVersion}" testImplementation "org.slf4j:slf4j-simple:${slf4jSimpleVersion}" + testImplementation "io.github.resilience4j:resilience4j-retry:${resilience4jVersion}" } // Configuration for our Javadocs @@ -253,7 +255,6 @@ signing { // Checkstyle Configuration checkstyle { toolVersion = "${checkstyleVersion}" - configFile = file('config/checkstyle/checkstyle-custom.xml') } // Override configuration for Checkstyle that runs on our 'src/main' package diff --git a/config/checkstyle/checkstyle-custom.xml b/config/checkstyle/checkstyle.xml similarity index 97% rename from config/checkstyle/checkstyle-custom.xml rename to config/checkstyle/checkstyle.xml index 1df8d395..d48b656c 100644 --- a/config/checkstyle/checkstyle-custom.xml +++ b/config/checkstyle/checkstyle.xml @@ -66,10 +66,10 @@ - + - + @@ -78,7 +78,6 @@ - @@ -104,12 +103,13 @@ - + - + @@ -223,9 +223,9 @@ - - + + @@ -287,7 +287,9 @@ + diff --git a/config/checkstyle/java.header b/config/checkstyle/java.header index 06916dc1..58e9e6c7 100644 --- a/config/checkstyle/java.header +++ b/config/checkstyle/java.header @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/config/checkstyle/checkstyle-suppressions.xml b/config/checkstyle/suppressions.xml similarity index 84% rename from config/checkstyle/checkstyle-suppressions.xml rename to config/checkstyle/suppressions.xml index b61623c4..a77a5a09 100644 --- a/config/checkstyle/checkstyle-suppressions.xml +++ b/config/checkstyle/suppressions.xml @@ -8,19 +8,19 @@ - + - + - + - + - + - + diff --git a/src/main/java/com/smartsheet/api/AccessTokenExpiredException.java b/src/main/java/com/smartsheet/api/AccessTokenExpiredException.java index 869664fc..c683c5cd 100644 --- a/src/main/java/com/smartsheet/api/AccessTokenExpiredException.java +++ b/src/main/java/com/smartsheet/api/AccessTokenExpiredException.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/smartsheet/api/AssociatedAttachmentResources.java b/src/main/java/com/smartsheet/api/AssociatedAttachmentResources.java index d383ec00..52a27353 100644 --- a/src/main/java/com/smartsheet/api/AssociatedAttachmentResources.java +++ b/src/main/java/com/smartsheet/api/AssociatedAttachmentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,8 +36,8 @@ public interface AssociatedAttachmentResources { List listAttachments(long objectId); /** - * @param objectId the id of the object - * @param file the file to attach + * @param objectId the id of the object + * @param file the file to attach * @param contentType the content type of the file * @return the created attachment * @deprecated As of release 2.0. Please use the corresponding method in the [Row/Sheet/etc]AttachmentResources classes @@ -46,10 +46,10 @@ public interface AssociatedAttachmentResources { Attachment attachFile(long objectId, File file, String contentType); /** - * @param objectId the id of the object - * @param inputStream the file to attach - * @param contentType the content type of the file - * @param contentLength the size of the file in bytes. + * @param objectId the id of the object + * @param inputStream the file to attach + * @param contentType the content type of the file + * @param contentLength the size of the file in bytes. * @param attachmentName the name of the file. * @return the created attachment * @deprecated As of release 2.0. Please use the corresponding method in the [Row/Sheet/etc]AttachmentResources classes @@ -58,7 +58,7 @@ public interface AssociatedAttachmentResources { Attachment attachFile(long objectId, InputStream inputStream, String contentType, long contentLength, String attachmentName); /** - * @param objectId the object id + * @param objectId the object id * @param attachment the attachment object * @return the created attachment * @deprecated As of release 2.0. Please use the corresponding method in the [Row/Sheet/etc]AttachmentResources classes diff --git a/src/main/java/com/smartsheet/api/AssociatedDiscussionResources.java b/src/main/java/com/smartsheet/api/AssociatedDiscussionResources.java index 3e313ab2..5ac8f162 100644 --- a/src/main/java/com/smartsheet/api/AssociatedDiscussionResources.java +++ b/src/main/java/com/smartsheet/api/AssociatedDiscussionResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ @Deprecated(since = "2.0.0", forRemoval = true) public interface AssociatedDiscussionResources { /** - * @param objectId the object id (sheet id or row id) + * @param objectId the object id (sheet id or row id) * @param discussion the discussion object * @return the created discussion * @throws SmartsheetException if there is any other error during the operation diff --git a/src/main/java/com/smartsheet/api/AttachmentResources.java b/src/main/java/com/smartsheet/api/AttachmentResources.java index e433d36a..c273fa47 100644 --- a/src/main/java/com/smartsheet/api/AttachmentResources.java +++ b/src/main/java/com/smartsheet/api/AttachmentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ *

This interface provides methods to access Attachment resources by their id.

* *

Thread Safety: Implementation of this interface must be thread safe.

+ * * @deprecated As of release 2.0. Please use {@link AttachmentVersioningResources} instead */ @Deprecated(since = "2.0.0", forRemoval = true) @@ -32,21 +33,21 @@ public interface AttachmentResources { /** * @param attachmentId the id - * @param file the file - * @param contentType the content type + * @param file the file + * @param contentType the content type * @return the attachment (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @deprecated As of release 2.0. Please use {@link AttachmentVersioningResources} instead */ @Deprecated(since = "2.0.0", forRemoval = true) Attachment attachNewVersion(long attachmentId, File file, String contentType); /** - * @param attachmentId the id of the attachment to upload a new version. - * @param inputStream the file to attach - * @param contentType the content type of the file + * @param attachmentId the id of the attachment to upload a new version. + * @param inputStream the file to attach + * @param contentType the content type of the file * @param attachmentName attachment name - * @param contentLength content length + * @param contentLength content length * @return the created attachment * @deprecated As of release 2.0. Please use {@link AttachmentVersioningResources} instead */ diff --git a/src/main/java/com/smartsheet/api/AttachmentVersioningResources.java b/src/main/java/com/smartsheet/api/AttachmentVersioningResources.java index 803f7794..45e252fe 100644 --- a/src/main/java/com/smartsheet/api/AttachmentVersioningResources.java +++ b/src/main/java/com/smartsheet/api/AttachmentVersioningResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,14 +35,14 @@ public interface AttachmentVersioningResources { * *

It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/attachments/{attachmentId}/versions

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param attachentId the attachment id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteAllVersions(long sheetId, long attachentId) throws SmartsheetException; @@ -51,17 +51,17 @@ public interface AttachmentVersioningResources { * *

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

* - * @param sheetId the id + * @param sheetId the id * @param attachmentId the attachment id - * @param parameters the pagination paramaters + * @param parameters the pagination paramaters * @return the attachment (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listAllVersions(long sheetId, long attachmentId, PaginationParameters parameters) throws SmartsheetException; @@ -70,18 +70,18 @@ public interface AttachmentVersioningResources { * *

It mirrors to the following Smartsheet REST API method: POST /attachment/{id}/versions

* - * @param sheetId the id of the sheet + * @param sheetId the id of the sheet * @param attachmentId the id of the attachment to upload a new version. - * @param file the file to attach - * @param contentType the content type of the file + * @param file the file to attach + * @param contentType the content type of the file * @return the created attachment - * @throws FileNotFoundException the file not found exception - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws FileNotFoundException the file not found exception + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Attachment attachNewVersion( long sheetId, diff --git a/src/main/java/com/smartsheet/api/AuthorizationException.java b/src/main/java/com/smartsheet/api/AuthorizationException.java index 2ecd0117..863dec0f 100644 --- a/src/main/java/com/smartsheet/api/AuthorizationException.java +++ b/src/main/java/com/smartsheet/api/AuthorizationException.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/smartsheet/api/ColumnResources.java b/src/main/java/com/smartsheet/api/ColumnResources.java index 05fcdddf..afb76c33 100644 --- a/src/main/java/com/smartsheet/api/ColumnResources.java +++ b/src/main/java/com/smartsheet/api/ColumnResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ *

This interface provides methods to access Column resources.

* *

Thread Safety: Implementation of this interface must be thread safe.

+ * * @deprecated As of release 2.0. Please use {@link SheetCommentResources} instead */ @Deprecated(since = "2.0.0", forRemoval = true) @@ -30,14 +31,14 @@ public interface ColumnResources { /** * @param column the column to update * @return the updated Column (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @deprecated As of release 2.0. Please use {@link SheetCommentResources} instead */ @Deprecated(since = "2.0.0", forRemoval = true) Column updateColumn(Column column); /** - * @param id id of the column + * @param id id of the column * @param sheetId the sheet id * @deprecated As of release 2.0. Please use {@link SheetCommentResources} instead */ diff --git a/src/main/java/com/smartsheet/api/CommentAttachmentResources.java b/src/main/java/com/smartsheet/api/CommentAttachmentResources.java index dfd6f1a2..e5ce1016 100644 --- a/src/main/java/com/smartsheet/api/CommentAttachmentResources.java +++ b/src/main/java/com/smartsheet/api/CommentAttachmentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,16 +37,16 @@ public interface CommentAttachmentResources { * *

It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/comments/{commentId}/attachments * - * @param sheetId the sheet id - * @param commentId the comment id + * @param sheetId the sheet id + * @param commentId the comment id * @param attachment the attachment object * @return the created attachment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Attachment attachUrl(long sheetId, long commentId, Attachment attachment) throws SmartsheetException; @@ -55,29 +55,29 @@ public interface CommentAttachmentResources { * *

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

* - * @param sheetId the id of the sheet - * @param commentId the id of the comment - * @param file the file to attach + * @param sheetId the id of the sheet + * @param commentId the id of the comment + * @param file the file to attach * @param contentType the content type of the file * @return the created attachment - * @throws FileNotFoundException the file not found exception - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws FileNotFoundException the file not found exception + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Attachment attachFile(long sheetId, long commentId, File file, String contentType) throws FileNotFoundException, SmartsheetException; /** *

Attach file for simple upload.

* - * @param sheetId the sheet id - * @param commentId the comment id - * @param inputStream the attachment data inputStream - * @param contentType the content type - * @param contentLength the content length + * @param sheetId the sheet id + * @param commentId the comment id + * @param inputStream the attachment data inputStream + * @param contentType the content type + * @param contentLength the content length * @param attachmentName the name of the attachment * @return the attachment * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/CommentResources.java b/src/main/java/com/smartsheet/api/CommentResources.java index 6b87f690..db85644b 100644 --- a/src/main/java/com/smartsheet/api/CommentResources.java +++ b/src/main/java/com/smartsheet/api/CommentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,17 +24,17 @@ @Deprecated(since = "2.0.0", forRemoval = true) public interface CommentResources { /** - * @param sheetId the id + * @param sheetId the id * @param commentId the commentid * @return the comment (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @deprecated As of release 2.0. Please use {@link SheetCommentResources} instead */ @Deprecated(since = "2.0.0", forRemoval = true) Comment getComment(long sheetId, long commentId); /** - * @param sheetId the id + * @param sheetId the id * @param commentId the commentid * @deprecated As of release 2.0. Please use {@link SheetCommentResources} instead */ diff --git a/src/main/java/com/smartsheet/api/ContactResources.java b/src/main/java/com/smartsheet/api/ContactResources.java index c6910e93..94b5379e 100644 --- a/src/main/java/com/smartsheet/api/ContactResources.java +++ b/src/main/java/com/smartsheet/api/ContactResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/smartsheet/api/DiscussionAttachmentResources.java b/src/main/java/com/smartsheet/api/DiscussionAttachmentResources.java index d0995037..818147e6 100644 --- a/src/main/java/com/smartsheet/api/DiscussionAttachmentResources.java +++ b/src/main/java/com/smartsheet/api/DiscussionAttachmentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,20 +26,20 @@ public interface DiscussionAttachmentResources { *

Get discussion attachment.

* *

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

- * + *

* 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 + * 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 * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param discussionId the discussion id - * @param parameters the pagination parameters + * @param parameters the pagination parameters * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ PagedResult getAttachments(long sheetId, long discussionId, PaginationParameters parameters) throws SmartsheetException; diff --git a/src/main/java/com/smartsheet/api/DiscussionCommentResources.java b/src/main/java/com/smartsheet/api/DiscussionCommentResources.java index 031ba2d9..50b68a21 100644 --- a/src/main/java/com/smartsheet/api/DiscussionCommentResources.java +++ b/src/main/java/com/smartsheet/api/DiscussionCommentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,16 @@ public interface DiscussionCommentResources { * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param discussionId the dicussion id - * @param comment the comment to add + * @param comment the comment to add * @return the created comment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Comment addComment(long sheetId, long discussionId, Comment comment) throws SmartsheetException; @@ -46,19 +46,19 @@ public interface DiscussionCommentResources { * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param discussionId the dicussion id - * @param comment the comment to add - * @param file the file to be attached - * @param contentType the type of file + * @param comment the comment to add + * @param file the file to be attached + * @param contentType the type of file * @return the created comment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation - * @throws IOException is there is any error with file + * @throws SmartsheetException if there is any other error during the operation + * @throws IOException is there is any error with file */ Comment addCommentWithAttachment( long sheetId, @@ -72,16 +72,16 @@ Comment addCommentWithAttachment( *

Update the specified comment

* *

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

- + * * @param sheetId the sheet id * @param comment the new comment object * @return the updated comment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Comment updateComment(long sheetId, Comment comment) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/DiscussionResources.java b/src/main/java/com/smartsheet/api/DiscussionResources.java index 99addaa8..fba148a9 100644 --- a/src/main/java/com/smartsheet/api/DiscussionResources.java +++ b/src/main/java/com/smartsheet/api/DiscussionResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,15 +30,15 @@ public interface DiscussionResources { * *

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

* - * @param id the discussion id + * @param id the discussion id * @param comment the comment to add * @return the created comment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Comment addDiscussionComment(long id, Comment comment) throws SmartsheetException; diff --git a/src/main/java/com/smartsheet/api/EventResources.java b/src/main/java/com/smartsheet/api/EventResources.java index b2357a51..c43c4bbf 100644 --- a/src/main/java/com/smartsheet/api/EventResources.java +++ b/src/main/java/com/smartsheet/api/EventResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,22 +25,22 @@ public interface EventResources { * *

It mirrors to the following Smartsheet REST API method: GET /events

* - * @param since Starting time for events to return. You must pass in a value for either since or - * streamPosition and never both. + * @param since Starting time for events to return. You must pass in a value for either since or + * streamPosition and never both. * @param streamPosition Indicates next set of events to return. Use value of nextStreamPosition returned * from the previous call. You must pass in a value for either since or streamPosition * and never both. - * @param maxCount Maximum number of events to return as response to this call. Must be between - * 1 through 10,000 (inclusive). - * @param numericDates If true, dates are accepted and returned in Unix epoch time (milliseconds since midnight - * on January 1, 1970 in UTC time). Default is false, which means ISO-8601 format + * @param maxCount Maximum number of events to return as response to this call. Must be between + * 1 through 10,000 (inclusive). + * @param numericDates If true, dates are accepted and returned in Unix epoch time (milliseconds since midnight + * on January 1, 1970 in UTC time). Default is false, which means ISO-8601 format * @return A list of all events (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ EventResult listEvents(Object since, String streamPosition, Integer maxCount, Boolean numericDates) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/FavoriteResources.java b/src/main/java/com/smartsheet/api/FavoriteResources.java index 4dec9048..5c0b3401 100644 --- a/src/main/java/com/smartsheet/api/FavoriteResources.java +++ b/src/main/java/com/smartsheet/api/FavoriteResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,15 +29,15 @@ public interface FavoriteResources { *

Adds one or more items to the user’s list of Favorite items.

* *

It mirrors to the following Smartsheet REST API method: POST /favorites

- * + *

* 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) - * 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 + * 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) + * 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 * * @param favorites the list of favorites object limited to the following attributes: * objectId * type * @return a single Favorite object or an array of Favorite objects @@ -49,15 +49,15 @@ public interface FavoriteResources { *

Gets a list of all of the user’s Favorite items.

* *

It mirrors to the following Smartsheet REST API method: GET /favorites

- * + *

* 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) - * 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 + * 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) + * 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 * * @param parameters pagination parameters * @return a single Favorite object or an array of Favorite objects @@ -69,18 +69,18 @@ public interface FavoriteResources { *

Deletes a list of favorites (all of the same type)

* *

It mirrors to the following Smartsheet REST API method: DELETE /favorites

- * + *

* 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) - * 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 + * 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) + * 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 * * @param favoriteType the favorite type - * @param objectIds a single Favorite object ID or an array of Favorite object IDs + * @param objectIds a single Favorite object ID or an array of Favorite object IDs * @throws SmartsheetException the smartsheet exception */ void removeFavorites(FavoriteType favoriteType, Set objectIds) throws SmartsheetException; diff --git a/src/main/java/com/smartsheet/api/FolderResources.java b/src/main/java/com/smartsheet/api/FolderResources.java index 93cc8712..eef9dee3 100644 --- a/src/main/java/com/smartsheet/api/FolderResources.java +++ b/src/main/java/com/smartsheet/api/FolderResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,13 +42,13 @@ public interface FolderResources { * @param folderId the folder id * @param includes the include parameters * @return the folder (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Folder getFolder(long folderId, EnumSet includes) throws SmartsheetException; @@ -57,13 +57,13 @@ public interface FolderResources { * * @param folder the folder to update * @return the updated folder (note that if there is no such folder, this method will throw Resource Not Found - * Exception rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * Exception rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Folder updateFolder(Folder folder) throws SmartsheetException; @@ -73,12 +73,12 @@ public interface FolderResources { *

It mirrors to the following Smartsheet REST API method: DELETE /folder{id}

* * @param folderId the folder id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteFolder(long folderId) throws SmartsheetException; @@ -88,14 +88,14 @@ public interface FolderResources { *

It mirrors to the following Smartsheet REST API method: GET /folder/{id}/folders

* * @param parentFolderId the parent folder id - * @param parameters the parameters for pagination + * @param parameters the parameters for pagination * @return the child folders (note that an empty list will be returned if no child folder is found). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listFolders(long parentFolderId, PaginationParameters parameters) throws SmartsheetException; @@ -105,14 +105,14 @@ public interface FolderResources { *

It mirrors to the following Smartsheet REST API method: POST /folder/{id}/folders

* * @param parentFolderId the parent folder id - * @param folder the folder to create + * @param folder the folder to create * @return the created folder - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Folder createFolder(long parentFolderId, Folder folder) throws SmartsheetException; @@ -120,19 +120,19 @@ public interface FolderResources { *

Creates a copy of the specified Folder.

* *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy

- * + *

* Exceptions: - * IllegalArgumentException : if folder 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 - * - * @param folderId the folder id + * IllegalArgumentException : if folder 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 + * + * @param folderId the folder id * @param containerDestination describes the destination container - * @param includes optional parameters to include - * @param skipRemap optional parameters to exclude + * @param includes optional parameters to include + * @param skipRemap optional parameters to exclude * @return the folder * @throws SmartsheetException the smartsheet exception */ @@ -147,20 +147,20 @@ Folder copyFolder( *

Creates a copy of the specified Folder.

* *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy

- * + *

* Exceptions: - * IllegalArgumentException : if folder 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 - * - * @param folderId the folder id + * IllegalArgumentException : if folder 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 + * + * @param folderId the folder id * @param containerDestination describes the destination container - * @param includes optional parameters to include - * @param skipRemap optional parameters to NOT re-map in the new folder - * @param excludes optional parameters to exclude + * @param includes optional parameters to include + * @param skipRemap optional parameters to NOT re-map in the new folder + * @param excludes optional parameters to exclude * @return the folder * @throws SmartsheetException the smartsheet exception */ @@ -176,16 +176,16 @@ Folder copyFolder( *

Moves the specified Folder to another location.

* *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/move

- * + *

* Exceptions: - * IllegalArgumentException : if folder 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 - * - * @param folderId the folder id + * IllegalArgumentException : if folder 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 + * + * @param folderId the folder id * @param containerDestination describes the destination container * @return the folder * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/GroupMemberResources.java b/src/main/java/com/smartsheet/api/GroupMemberResources.java index 2ec153b1..bb564966 100644 --- a/src/main/java/com/smartsheet/api/GroupMemberResources.java +++ b/src/main/java/com/smartsheet/api/GroupMemberResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,12 +35,12 @@ public interface GroupMemberResources { * @param groupId the ID of the object to add members to. * @param members the list of members to add. Users that are already members will be ignored. * @return the list of newly added members. Users that were added to the group. Pre-existing members are not included in the result. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ List addGroupMembers(long groupId, List members) throws SmartsheetException; @@ -50,13 +50,13 @@ public interface GroupMemberResources { *

It mirrors to the following Smartsheet REST API method: DELETE /group/{id}/member/{userId}

* * @param groupId the ID of the object to remove the member from - * @param userId the ID of the user to remove. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @param userId the ID of the user to remove. + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteGroupMember(long groupId, long userId) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/GroupResources.java b/src/main/java/com/smartsheet/api/GroupResources.java index aed7c474..3636b4dc 100644 --- a/src/main/java/com/smartsheet/api/GroupResources.java +++ b/src/main/java/com/smartsheet/api/GroupResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,13 +34,13 @@ public interface GroupResources { * * @param parameters the paging parameters object * @return A list of all {@link Group}s. Note that the groups do not contain the membership details. You must get each group - * individually for group membership. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * individually for group membership. + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listGroups(PaginationParameters parameters) throws SmartsheetException; @@ -51,13 +51,13 @@ public interface GroupResources { * * @param groupId the {@link Group} id * @return the {@link Group} (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Group getGroup(long groupId) throws SmartsheetException; @@ -68,12 +68,12 @@ public interface GroupResources { * * @param group the {@link Group} to create. Use {@link Group.CreateGroupBuilder} to create this model. * @return the newly created {@link Group} - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Group createGroup(Group group) throws SmartsheetException; @@ -84,12 +84,12 @@ public interface GroupResources { * * @param group the {@link Group} to create. Use {@link Group.CreateGroupBuilder} to create this model. * @return the newly created {@link Group} - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Group updateGroup(Group group) throws SmartsheetException; @@ -99,13 +99,12 @@ public interface GroupResources { *

It mirrors to the following Smartsheet REST API method: DELETE /group/{groupId}

* * @param groupId the id of the {@link Group} to delete. - * - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteGroup(long groupId) throws SmartsheetException; diff --git a/src/main/java/com/smartsheet/api/HomeFolderResources.java b/src/main/java/com/smartsheet/api/HomeFolderResources.java index 9373ef25..1d2d8c50 100644 --- a/src/main/java/com/smartsheet/api/HomeFolderResources.java +++ b/src/main/java/com/smartsheet/api/HomeFolderResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,12 +34,12 @@ public interface HomeFolderResources { * * @param parameters the pagination parameters * @return the list of folders (note that an empty list will be returned if there is none) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listFolders(PaginationParameters parameters) throws SmartsheetException; @@ -50,12 +50,12 @@ public interface HomeFolderResources { * * @param folder the folder to create * @return the folder - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Folder createFolder(Folder folder) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/HomeResources.java b/src/main/java/com/smartsheet/api/HomeResources.java index 4df419c5..49a3b534 100644 --- a/src/main/java/com/smartsheet/api/HomeResources.java +++ b/src/main/java/com/smartsheet/api/HomeResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,13 +37,13 @@ public interface HomeResources { * * @param includes used to specify the optional objects to include. * @return the home resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Home getHome(EnumSet includes) throws SmartsheetException; @@ -54,15 +54,15 @@ public interface HomeResources { *

It mirrors to the following Smartsheet REST API method: GET /home

* * @param includes used to specify the optional objects to include. - * @param excludes used to specify the optional objects to exclude. + * @param excludes used to specify the optional objects to exclude. * @return the home resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Home getHome(EnumSet includes, EnumSet excludes) throws SmartsheetException; diff --git a/src/main/java/com/smartsheet/api/ImageUrlResources.java b/src/main/java/com/smartsheet/api/ImageUrlResources.java index 20f2f648..788b05dd 100644 --- a/src/main/java/com/smartsheet/api/ImageUrlResources.java +++ b/src/main/java/com/smartsheet/api/ImageUrlResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,13 +29,13 @@ public interface ImageUrlResources { * * @param requestUrls array of requested Images and sizes. * @return the ImageUrlMap object (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ ImageUrlMap getImageUrls(List requestUrls) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/InvalidRequestException.java b/src/main/java/com/smartsheet/api/InvalidRequestException.java index 3af5c4de..26401772 100644 --- a/src/main/java/com/smartsheet/api/InvalidRequestException.java +++ b/src/main/java/com/smartsheet/api/InvalidRequestException.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,9 @@ */ public class InvalidRequestException extends SmartsheetRestException { - /** The Constant serialVersionUID. */ + /** + * The Constant serialVersionUID. + */ private static final long serialVersionUID = 1L; /** diff --git a/src/main/java/com/smartsheet/api/PassthroughResources.java b/src/main/java/com/smartsheet/api/PassthroughResources.java index 6bf4e1e2..c18a732d 100644 --- a/src/main/java/com/smartsheet/api/PassthroughResources.java +++ b/src/main/java/com/smartsheet/api/PassthroughResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,47 +28,47 @@ public interface PassthroughResources { /** *

Issue an HTTP GET request.

* - * @param endpoint the API endpoint + * @param endpoint the API endpoint * @param parameters optional list of resource parameters * @return a JSON response string - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ String getRequest(String endpoint, Map parameters) throws SmartsheetException; /** *

Issue an HTTP POST request.

* - * @param endpoint the API endpoint - * @param payload a JSON payload string + * @param endpoint the API endpoint + * @param payload a JSON payload string * @param parameters optional list of resource parameters * @return a JSON response string - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ String postRequest(String endpoint, String payload, Map parameters) throws SmartsheetException; /** *

Issue an HTTP PUT request.

* - * @param endpoint the API endpoint - * @param payload a JSON payload string + * @param endpoint the API endpoint + * @param payload a JSON payload string * @param parameters optional list of resource parameters * @return a JSON response string - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ String putRequest(String endpoint, String payload, Map parameters) throws SmartsheetException; @@ -77,12 +77,12 @@ public interface PassthroughResources { * * @param endpoint the API endpoint * @return a JSON response string - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ String deleteRequest(String endpoint) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/ReportResources.java b/src/main/java/com/smartsheet/api/ReportResources.java index 8baa1274..a74d9636 100644 --- a/src/main/java/com/smartsheet/api/ReportResources.java +++ b/src/main/java/com/smartsheet/api/ReportResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,15 +42,15 @@ public interface ReportResources { * @param reportId the reportId of the report * @param includes used To specify the optional objects to include. * @param pageSize page size parameter for pagination - * @param page page parameter for pagination - * @return the report (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @param page page parameter for pagination + * @return the report (note that if there is no such resource, this method will throw ResourceNotFoundException + * rather than returning null) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Report getReport(long reportId, EnumSet includes, Integer pageSize, Integer page) throws SmartsheetException; @@ -62,16 +62,16 @@ public interface ReportResources { * @param reportId the reportId of the report * @param includes used To specify the optional objects to include. * @param pageSize page size parameter for pagination - * @param page page parameter for pagination - * @param level compatibility level - * @return the report (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @param page page parameter for pagination + * @param level compatibility level + * @return the report (note that if there is no such resource, this method will throw ResourceNotFoundException + * rather than returning null) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Report getReport( long reportId, @@ -87,13 +87,13 @@ Report getReport( *

It mirrors to the following Smartsheet REST API method: POST /reports/{reportId}/emails

* * @param reportId the reportId of the report - * @param email email of designated recipient. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @param email email of designated recipient. + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void sendReport(long reportId, SheetEmail email) throws SmartsheetException; @@ -101,15 +101,15 @@ Report getReport( *

List all reports.

* *

It mirrors to the following Smartsheet REST API method: GET /reports

- * + *

* 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) - * - 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 + * - 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 * - * @param parameters pagination parameters for paging result + * @param parameters pagination parameters for paging result * @param modifiedSince restrict results to sheets modified on or after this date * @return all sheets (note that empty list will be returned if there is none) * @throws SmartsheetException the smartsheet exception @@ -120,13 +120,13 @@ Report getReport( *

List all reports.

* *

It mirrors to the following Smartsheet REST API method: GET /reports

- * + *

* 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) - * - 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 + * - 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 * * @param parameters pagination parameters for paging result * @return all sheets (note that empty list will be returned if there is none) @@ -139,20 +139,20 @@ Report getReport( * *

It mirrors to the following Smartsheet REST API method: GET /reports/{id} with "application/vnd.ms-excel" Accept * HTTP header

- * + *

* Exceptions: - * IllegalArgumentException : if outputStream 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 - * - * @param id the id + * IllegalArgumentException : if outputStream 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 + * + * @param id the id * @param outputStream the OutputStream to which the Excel file will be written * @throws SmartsheetException the smartsheet exception - * */ + */ void getReportAsExcel(long id, OutputStream outputStream) throws SmartsheetException; /** @@ -160,20 +160,20 @@ Report getReport( * *

It mirrors to the following Smartsheet REST API method: GET /reports/{id} with "application/vnd.ms-excel" Accept * HTTP header

- * + *

* Exceptions: - * IllegalArgumentException : if outputStream 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 - * - * @param id the id + * IllegalArgumentException : if outputStream 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 + * + * @param id the id * @param outputStream the OutputStream to which the Excel file will be written * @throws SmartsheetException the smartsheet exception - * */ + */ void getReportAsCsv(long id, OutputStream outputStream) throws SmartsheetException; /** @@ -183,13 +183,13 @@ Report getReport( * * @param id the ID of the report * @return the report publish status (note that if there is no such resource, this method will - * throw ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * throw ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ ReportPublish getPublishStatus(long id) throws SmartsheetException; @@ -199,16 +199,16 @@ Report getReport( * *

It mirrors to the following Smartsheet REST API method: PUT /reports/{id}/publish

* - * @param id the ID of the report + * @param id the ID of the report * @param reportPublish the ReportPublish object * @return the updated ReportPublish (note that if there is no such resource, this method will - * throw ResourceNotFoundException rather than returning null) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * throw ResourceNotFoundException rather than returning null) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ ReportPublish updatePublishStatus(long id, ReportPublish reportPublish) throws SmartsheetException; diff --git a/src/main/java/com/smartsheet/api/ResourceNotFoundException.java b/src/main/java/com/smartsheet/api/ResourceNotFoundException.java index 788fa036..7f36b83a 100644 --- a/src/main/java/com/smartsheet/api/ResourceNotFoundException.java +++ b/src/main/java/com/smartsheet/api/ResourceNotFoundException.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,14 +20,16 @@ /** * This is the exception to indicate a resource can not be found. - * + *

* Basically this exception will be thrown when the Smartsheet REST API responds with "404 NOT FOUND". - * + *

* Thread safety: Exceptions are not thread safe. */ public class ResourceNotFoundException extends SmartsheetRestException { - /** The Constant serialVersionUID. */ + /** + * The Constant serialVersionUID. + */ private static final long serialVersionUID = 1L; /** diff --git a/src/main/java/com/smartsheet/api/RowAttachmentResources.java b/src/main/java/com/smartsheet/api/RowAttachmentResources.java index e9120fdc..0e36df91 100644 --- a/src/main/java/com/smartsheet/api/RowAttachmentResources.java +++ b/src/main/java/com/smartsheet/api/RowAttachmentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,16 +39,16 @@ public interface RowAttachmentResources { * *

It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/attachments * - * @param sheetId the sheet id - * @param rowId the row id + * @param sheetId the sheet id + * @param rowId the row id * @param attachment the attachment object * @return the created attachment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Attachment attachUrl(long sheetId, long rowId, Attachment attachment) throws SmartsheetException; @@ -56,20 +56,20 @@ public interface RowAttachmentResources { *

Get row attachment.

* *

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

- * + *

* 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 + * 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 * - * @param sheetId the sheet id - * @param rowId the row id + * @param sheetId the sheet id + * @param rowId the row id * @param parameters the pagination parameters * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ PagedResult getAttachments(long sheetId, long rowId, PaginationParameters parameters) throws SmartsheetException; @@ -79,29 +79,29 @@ public interface RowAttachmentResources { * *

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

* - * @param sheetId the id of the sheet - * @param rowId the id of the comment - * @param file the file to attach + * @param sheetId the id of the sheet + * @param rowId the id of the comment + * @param file the file to attach * @param contentType the content type of the file * @return the created attachment - * @throws FileNotFoundException the file not found exception - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws FileNotFoundException the file not found exception + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Attachment attachFile(long sheetId, long rowId, File file, String contentType) throws FileNotFoundException, SmartsheetException; /** *

Attach file for simple upload.

* - * @param sheetId the sheet id - * @param rowId the row id - * @param inputStream the attachment data inputStream - * @param contentType the content type - * @param contentLength the content length + * @param sheetId the sheet id + * @param rowId the row id + * @param inputStream the attachment data inputStream + * @param contentType the content type + * @param contentLength the content length * @param attachmentName the name of the attachment * @return the attachment * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/RowColumnResources.java b/src/main/java/com/smartsheet/api/RowColumnResources.java index e28ad04b..24a860c1 100644 --- a/src/main/java/com/smartsheet/api/RowColumnResources.java +++ b/src/main/java/com/smartsheet/api/RowColumnResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,21 +36,21 @@ public interface RowColumnResources { *

Get the cell modification history.

* *

It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/history

- * + *

* 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 + * 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 * - * @param rowId the row id - * @param sheetId the sheet Id - * @param columnId the column id + * @param rowId the row id + * @param sheetId the sheet Id + * @param columnId the column id * @param pagination the pagination parameters * @return the modification history (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ PagedResult getCellHistory( @@ -64,47 +64,47 @@ PagedResult getCellHistory( *

Get the cell modification history.

* *

It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/history

- * + *

* 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 + * 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 * - * @param rowId the row id - * @param sheetId the sheet Id - * @param columnId the column id + * @param rowId the row id + * @param sheetId the sheet Id + * @param columnId the column id * @param pagination the pagination parameters - * @param includes cell history inclusion - * @param level compatbility level + * @param includes cell history inclusion + * @param level compatbility level * @return the modification history (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ PagedResult getCellHistory(long sheetId, long rowId, long columnId, PaginationParameters pagination, - EnumSet includes, Integer level) throws SmartsheetException; + EnumSet includes, Integer level) throws SmartsheetException; /** *

Uploads an image to the specified cell within a sheet.

* *

It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/cellimages

- * + *

* 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 + * 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 * - * @param sheetId the sheet Id - * @param rowId the row id - * @param columnId the column id - * @param file the file path + * @param sheetId the sheet Id + * @param rowId the row id + * @param columnId the column id + * @param file the file path * @param contentType MIME type - * @throws SmartsheetException the smartsheet exception + * @throws SmartsheetException the smartsheet exception * @throws FileNotFoundException image file not found */ void addImageToCell( @@ -119,23 +119,23 @@ void addImageToCell( *

Uploads an image to the specified cell within a sheet.

* *

It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/cellimages

- * + *

* 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 + * 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 * - * @param sheetId the sheet Id - * @param rowId the row id - * @param columnId the column id - * @param file the file path - * @param contentType MIME type + * @param sheetId the sheet Id + * @param rowId the row id + * @param columnId the column id + * @param file the file path + * @param contentType MIME type * @param overrideValidation override column type validation - * @param altText alternate description for the image - * @throws SmartsheetException the smartsheet exception + * @param altText alternate description for the image + * @throws SmartsheetException the smartsheet exception * @throws FileNotFoundException image file not found */ void addImageToCell( @@ -154,25 +154,25 @@ void addImageToCell( * It mirrors the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/cellimages *

* 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 + * 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 * - * @param sheetId the sheet Id - * @param rowId the row id - * @param columnId the column id - * @param file the File object - * @param contentType MIME type + * @param sheetId the sheet Id + * @param rowId the row id + * @param columnId the column id + * @param file the File object + * @param contentType MIME type * @param overrideValidation override column type validation if true - * @param altText alternate description for the image - * @throws SmartsheetException the smartsheet exception + * @param altText alternate description for the image + * @throws SmartsheetException the smartsheet exception * @throws FileNotFoundException image file not found */ void addImageToCell(long sheetId, long rowId, long columnId, File file, String contentType, - boolean overrideValidation, String altText) throws FileNotFoundException, SmartsheetException; + boolean overrideValidation, String altText) throws FileNotFoundException, SmartsheetException; /** * Add an image to a cell. @@ -180,21 +180,21 @@ void addImageToCell(long sheetId, long rowId, long columnId, File file, String c * It mirrors the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/cellimages *

* 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 + * 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 * - * @param sheetId the sheet Id - * @param rowId the row id - * @param columnId the column id - * @param inputStream the input stream of the contents - * @param contentType MIME type - * @param contentLength length of the input stream + * @param sheetId the sheet Id + * @param rowId the row id + * @param columnId the column id + * @param inputStream the input stream of the contents + * @param contentType MIME type + * @param contentLength length of the input stream * @param overrideValidation override column type validation if true - * @param altText alternate description for the image + * @param altText alternate description for the image * @throws SmartsheetException the smartsheet exception */ void addImageToCell( diff --git a/src/main/java/com/smartsheet/api/RowDiscussionResources.java b/src/main/java/com/smartsheet/api/RowDiscussionResources.java index 80ff4355..275e2f39 100644 --- a/src/main/java/com/smartsheet/api/RowDiscussionResources.java +++ b/src/main/java/com/smartsheet/api/RowDiscussionResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,17 +36,17 @@ public interface RowDiscussionResources { *

Create discussion on a row.

* *

It mirrors to the following Smartsheet REST API method: /sheets/{sheetId}/rows/{rowId}/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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row ID + * @param sheetId the sheet ID + * @param rowId the row ID * @param discussion the comment to add, limited to the following required attributes: text * @return the created comment * @throws SmartsheetException the smartsheet exception @@ -57,19 +57,19 @@ public interface RowDiscussionResources { *

Gets a list of all Discussions associated with the specified Row.

* *

It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}/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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row ID + * @param sheetId the sheet ID + * @param rowId the row ID * @param pagination the pagination pagination - * @param includes the optional include parameters + * @param includes the optional include parameters * @return the row discussions * @throws SmartsheetException the smartsheet exception */ @@ -84,23 +84,23 @@ PagedResult listDiscussions( *

Create discussion on a row.

* *

It mirrors to the following Smartsheet REST API method: /sheets/{sheetId}/rows/{rowId}/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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row ID - * @param discussion the comment to add, limited to the following required attributes: text - * @param file the file to be attached + * @param sheetId the sheet ID + * @param rowId the row ID + * @param discussion the comment to add, limited to the following required attributes: text + * @param file the file to be attached * @param contentType the type of file * @return the created discussion * @throws SmartsheetException the smartsheet exception - * @throws IOException is there is an I/O exception + * @throws IOException is there is an I/O exception */ Discussion createDiscussionWithAttachment( long sheetId, diff --git a/src/main/java/com/smartsheet/api/SearchResources.java b/src/main/java/com/smartsheet/api/SearchResources.java index 9d697c1d..a1c9269f 100644 --- a/src/main/java/com/smartsheet/api/SearchResources.java +++ b/src/main/java/com/smartsheet/api/SearchResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,13 +38,13 @@ public interface SearchResources { * * @param query the query text * @return the search result (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SearchResult search(String query) throws SmartsheetException; @@ -53,20 +53,20 @@ public interface SearchResources { * *

It mirrors to the following Smartsheet REST API method: GET /search

* - * @param query the query text - * @param includes enum set of inclusions - * @param location when specified with a value of "personalWorkspace" limits response to only those - * items in the user's Workspace + * @param query the query text + * @param includes enum set of inclusions + * @param location when specified with a value of "personalWorkspace" limits response to only those + * items in the user's Workspace * @param modifiedSince only return items modified since this date - * @param scopes enum set of search filters + * @param scopes enum set of search filters * @return the search result (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SearchResult search( String query, @@ -82,15 +82,15 @@ SearchResult search( *

It mirrors to the following Smartsheet REST API method: GET /search/sheet/{sheetId}

* * @param sheetId the sheet id - * @param query the query text + * @param query the query text * @return the search result (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SearchResult searchSheet(long sheetId, String query) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/ServerInfoResources.java b/src/main/java/com/smartsheet/api/ServerInfoResources.java index bbe1f2e4..1bb74eb1 100644 --- a/src/main/java/com/smartsheet/api/ServerInfoResources.java +++ b/src/main/java/com/smartsheet/api/ServerInfoResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,12 +31,12 @@ public interface ServerInfoResources { *

It mirrors to the following Smartsheet REST API method: GET /serverinfo

* * @return the server information - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ ServerInfo getServerInfo() throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/ServiceUnavailableException.java b/src/main/java/com/smartsheet/api/ServiceUnavailableException.java index 9c1985e6..6e11d44d 100644 --- a/src/main/java/com/smartsheet/api/ServiceUnavailableException.java +++ b/src/main/java/com/smartsheet/api/ServiceUnavailableException.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,9 @@ */ public class ServiceUnavailableException extends SmartsheetRestException { - /** The Constant serialVersionUID. */ + /** + * The Constant serialVersionUID. + */ private static final long serialVersionUID = 1L; /** diff --git a/src/main/java/com/smartsheet/api/ShareResources.java b/src/main/java/com/smartsheet/api/ShareResources.java index 6ce290b1..12b22778 100644 --- a/src/main/java/com/smartsheet/api/ShareResources.java +++ b/src/main/java/com/smartsheet/api/ShareResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,15 +36,15 @@ public interface ShareResources { *

GET /workspace/{id}/shares

*

GET /sheet/{id}/shares

* - * @param objectId the object id + * @param objectId the object id * @param parameters the pagination parameters * @return the list of Share objects (note that an empty list will be returned if there is none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation * @deprecated As of release 2.0. Please use the other listShares method in this class and pass `includeWorkspaceShares` as `false` */ @Deprecated(since = "2.0.0", forRemoval = true) @@ -57,16 +57,16 @@ public interface ShareResources { *

GET /workspace/{id}/shares

*

GET /sheet/{id}/shares

* - * @param objectId the object id - * @param parameters the pagination parameters + * @param objectId the object id + * @param parameters the pagination parameters * @param includeWorkspaceShares include workspace shares in enumeration * @return the list of Share objects (note that an empty list will be returned if there is none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listShares( long objectId, @@ -81,19 +81,19 @@ PagedResult listShares( *

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 + * 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 * * @param objectId the ID of the object to share - * @param shareId the ID of the share + * @param shareId the ID of the share * @return the share (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ Share getShare(long objectId, String shareId) throws SmartsheetException; @@ -105,18 +105,18 @@ PagedResult listShares( *

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 + * 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 * - * @param objectId the ID of the object to share - * @param shares list of share objects + * @param objectId the ID of the object to share + * @param shares list of share objects * @param sendEmail whether to send email * @return the created shares * @throws SmartsheetException the smartsheet exception @@ -132,15 +132,15 @@ PagedResult listShares( *

PUT /reports/{reportId}/shares/{shareId}

* * @param objectId the ID of the object to share - * @param share the share + * @param share the share * @return the updated share (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Share updateShare(long objectId, Share share) throws SmartsheetException; @@ -151,17 +151,17 @@ PagedResult listShares( *

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 + * 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 * * @param objectId the ID of the object to share - * @param shareId the ID of the share to delete + * @param shareId the ID of the share to delete * @throws SmartsheetException the smartsheet exception */ void deleteShare(long objectId, String shareId) throws SmartsheetException; diff --git a/src/main/java/com/smartsheet/api/SheetAttachmentResources.java b/src/main/java/com/smartsheet/api/SheetAttachmentResources.java index 7fc5802b..3105519f 100644 --- a/src/main/java/com/smartsheet/api/SheetAttachmentResources.java +++ b/src/main/java/com/smartsheet/api/SheetAttachmentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,15 +34,15 @@ public interface SheetAttachmentResources { * *

It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/attachments * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param attachment the attachment object * @return the attachment object - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Attachment attachUrl(long sheetId, Attachment attachment) throws SmartsheetException; @@ -50,16 +50,16 @@ public interface SheetAttachmentResources { *

Delete an attachment.

* *

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

- * + *

* 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 - * - * @param sheetId the ID of the sheet + * 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 + * + * @param sheetId the ID of the sheet * @param attachmentId the ID of the attachment * @throws SmartsheetException the smartsheet exception */ @@ -69,19 +69,19 @@ public interface SheetAttachmentResources { *

Get an attachment.

* *

It mirrors to the following Smartsheet REST API method: GET /attachment/{id}

- * + *

* 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 - * - * @param sheetId the sheet id + * 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 + * + * @param sheetId the sheet id * @param attachmentId the attachment id * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ Attachment getAttachment(long sheetId, long attachmentId) throws SmartsheetException; @@ -90,16 +90,16 @@ public interface SheetAttachmentResources { *

Gets a list of all Attachments that are on the Sheet, including Sheet, Row, and Discussion level Attachments.

* *

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

- * + *

* 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 - * - * @param sheetId the ID of the sheet to which the attachments are associated + * 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 + * + * @param sheetId the ID of the sheet to which the attachments are associated * @param parameters the pagination parameters * @return the attachments (note that empty list will be returned if there is none) * @throws SmartsheetException the smartsheet exception @@ -111,27 +111,27 @@ public interface SheetAttachmentResources { * *

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

* - * @param sheetId the id of the sheet - * @param file the file to attach + * @param sheetId the id of the sheet + * @param file the file to attach * @param contentType the content type of the file * @return the created attachment - * @throws FileNotFoundException the file not found exception - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws FileNotFoundException the file not found exception + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Attachment attachFile(long sheetId, File file, String contentType) throws FileNotFoundException, SmartsheetException; /** *

Attach file for simple upload.

* - * @param sheetId the sheet id - * @param inputStream attachment data inputStream - * @param contentType the content type - * @param contentLength the content length + * @param sheetId the sheet id + * @param inputStream attachment data inputStream + * @param contentType the content type + * @param contentLength the content length * @param attachmentName the name of the attachment * @return the attachment * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/SheetAutomationRuleResources.java b/src/main/java/com/smartsheet/api/SheetAutomationRuleResources.java index d7b06142..0b1818bc 100644 --- a/src/main/java/com/smartsheet/api/SheetAutomationRuleResources.java +++ b/src/main/java/com/smartsheet/api/SheetAutomationRuleResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,16 +25,16 @@ public interface SheetAutomationRuleResources { *

Get all automation rules for this sheet

* *

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

- * + *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param pagination the pagination parameters * @return a list of automation rules * @throws SmartsheetException the smartsheet exception @@ -46,16 +46,16 @@ public interface SheetAutomationRuleResources { * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param automationRuleId the automation rule id * @return the automation rule (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ AutomationRule getAutomationRule(long sheetId, long automationRuleId) throws SmartsheetException; @@ -64,16 +64,16 @@ public interface SheetAutomationRuleResources { * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param automationRule the updated automation rule * @return the automation rule (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ AutomationRule updateAutomationRule(long sheetId, AutomationRule automationRule) throws SmartsheetException; @@ -81,16 +81,16 @@ public interface SheetAutomationRuleResources { *

Delete an automation rule.

* *

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

- * + *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param automationRuleId the automation rule ID * @throws SmartsheetException the smartsheet exception */ diff --git a/src/main/java/com/smartsheet/api/SheetColumnResources.java b/src/main/java/com/smartsheet/api/SheetColumnResources.java index e84d4d59..de45e212 100644 --- a/src/main/java/com/smartsheet/api/SheetColumnResources.java +++ b/src/main/java/com/smartsheet/api/SheetColumnResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,16 +36,16 @@ public interface SheetColumnResources { * *

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

* - * @param sheetId the sheet id - * @param includes list of includes + * @param sheetId the sheet id + * @param includes list of includes * @param pagination the object containing the pagination parameters * @return the list of Columns (note that an empty list will be returned if there is none) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listColumns( long sheetId, @@ -58,17 +58,17 @@ PagedResult listColumns( * *

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

* - * @param sheetId the sheet id - * @param includes list of includes + * @param sheetId the sheet id + * @param includes list of includes * @param pagination the object containing the pagination parameters - * @param level compatibility level + * @param level compatibility level * @return the list of Columns (note that an empty list will be returned if there is none) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listColumns( long sheetId, @@ -85,12 +85,12 @@ PagedResult listColumns( * @param sheetId the sheet id * @param columns the list of column object * @return the list of created column - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ List addColumns(long sheetId, List columns) throws SmartsheetException; @@ -99,14 +99,14 @@ PagedResult listColumns( * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param columnId the column id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteColumn(long sheetId, long columnId) throws SmartsheetException; @@ -114,22 +114,22 @@ PagedResult listColumns( *

Update a column.

* *

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

- * + *

* 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) - * 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 + * 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) + * 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 * * @param sheetId the sheetId - * @param column the column to update limited to the following attributes: index (column's new index in the sheet), - * title, sheetId, type, options (optional), symbol (optional), systemColumnType (optional), - * autoNumberFormat (optional) + * @param column the column to update limited to the following attributes: index (column's new index in the sheet), + * title, sheetId, type, options (optional), symbol (optional), systemColumnType (optional), + * autoNumberFormat (optional) * @return the updated sheet (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ Column updateColumn(long sheetId, Column column) throws SmartsheetException; @@ -138,16 +138,16 @@ PagedResult listColumns( *

Gets the Column specified in the URL.

* *

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

- * + *

* 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 + * 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 * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param columnId the column id * @param includes list of includes * @return the column (note that empty list will be returned if there is none) diff --git a/src/main/java/com/smartsheet/api/SheetCommentResources.java b/src/main/java/com/smartsheet/api/SheetCommentResources.java index a1392826..210159af 100644 --- a/src/main/java/com/smartsheet/api/SheetCommentResources.java +++ b/src/main/java/com/smartsheet/api/SheetCommentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,10 +29,10 @@ public interface SheetCommentResources { * *

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

* - * @param sheetId the ID of the sheet + * @param sheetId the ID of the sheet * @param commentId the ID of the comment * @return the comment (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException if there is any other error during the operation */ Comment getComment(long sheetId, long commentId) throws SmartsheetException; @@ -42,7 +42,7 @@ public interface SheetCommentResources { * *

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

* - * @param sheetId the ID of the sheet + * @param sheetId the ID of the sheet * @param commentId the ID of the comment * @throws SmartsheetException if there is any other error during the operation */ diff --git a/src/main/java/com/smartsheet/api/SheetCrossSheetReferenceResources.java b/src/main/java/com/smartsheet/api/SheetCrossSheetReferenceResources.java index 7a0ba9f8..4914decd 100644 --- a/src/main/java/com/smartsheet/api/SheetCrossSheetReferenceResources.java +++ b/src/main/java/com/smartsheet/api/SheetCrossSheetReferenceResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,16 +26,16 @@ public interface SheetCrossSheetReferenceResources { *

Get all cross sheet references for this sheet

* *

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

- * + *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param pagination the pagination parameters * @return a list of cross sheet references * @throws SmartsheetException the smartsheet exception @@ -47,16 +47,16 @@ public interface SheetCrossSheetReferenceResources { * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param crossSheetReferenceId the cross sheet reference id * @return the cross sheet reference (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ CrossSheetReference getCrossSheetReference(long sheetId, long crossSheetReferenceId) throws SmartsheetException; @@ -65,15 +65,15 @@ public interface SheetCrossSheetReferenceResources { * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param crossSheetReference the cross sheet reference to create * @return the created cross sheet reference - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ CrossSheetReference createCrossSheetReference(long sheetId, CrossSheetReference crossSheetReference) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/SheetDiscussionResources.java b/src/main/java/com/smartsheet/api/SheetDiscussionResources.java index 0f4ffa80..d71e3a2d 100644 --- a/src/main/java/com/smartsheet/api/SheetDiscussionResources.java +++ b/src/main/java/com/smartsheet/api/SheetDiscussionResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,15 +32,15 @@ public interface SheetDiscussionResources { * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param discussion the discussion object * @return the created discussion - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Discussion createDiscussion(long sheetId, Discussion discussion) throws SmartsheetException; @@ -49,18 +49,18 @@ public interface SheetDiscussionResources { * *

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

* - * @param sheetId the sheet id - * @param discussion the discussion object - * @param file the file to attach + * @param sheetId the sheet id + * @param discussion the discussion object + * @param file the file to attach * @param contentType the type of file * @return the created discussion - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation - * @throws IOException is there is with file + * @throws SmartsheetException if there is any other error during the operation + * @throws IOException is there is with file */ Discussion createDiscussionWithAttachment( long sheetId, @@ -75,15 +75,15 @@ Discussion createDiscussionWithAttachment( *

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

* * @param discussionId the discussion id - * @param sheetId the sheet id + * @param sheetId the sheet id * @return the discussion (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Discussion getDiscussion(long sheetId, long discussionId) throws SmartsheetException; @@ -91,16 +91,16 @@ Discussion createDiscussionWithAttachment( *

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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param discussionId the discussion ID * @throws SmartsheetException the smartsheet exception */ @@ -110,18 +110,18 @@ Discussion createDiscussionWithAttachment( *

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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param pagination the pagination parameters - * @param includes the optional paramters to include + * @param includes the optional paramters to include * @return a list of discussions * @throws SmartsheetException the smartsheet exception */ diff --git a/src/main/java/com/smartsheet/api/SheetFilterResources.java b/src/main/java/com/smartsheet/api/SheetFilterResources.java index d1414469..021563f3 100644 --- a/src/main/java/com/smartsheet/api/SheetFilterResources.java +++ b/src/main/java/com/smartsheet/api/SheetFilterResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,16 +27,16 @@ public interface SheetFilterResources { * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param filterId the filter id * @return the sheet filter (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SheetFilter getFilter(long sheetId, long filterId) throws SmartsheetException; @@ -44,16 +44,16 @@ public interface SheetFilterResources { *

Delete filter.

* *

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

- * + *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param filterId the filter ID * @throws SmartsheetException the smartsheet exception */ @@ -63,16 +63,16 @@ public interface SheetFilterResources { *

Get all filters

* *

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

- * + *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param pagination the pagination parameters * @return a list of discussions * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/SheetResources.java b/src/main/java/com/smartsheet/api/SheetResources.java index 382c9e87..4b9d3a7f 100644 --- a/src/main/java/com/smartsheet/api/SheetResources.java +++ b/src/main/java/com/smartsheet/api/SheetResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,13 +49,14 @@ public interface SheetResources { * List all sheets. *

* It mirrors to the following Smartsheet REST API method: GET /sheets + * * @return A list of all sheets (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listSheets() throws SmartsheetException; @@ -64,16 +65,16 @@ public interface SheetResources { * *

It mirrors to the following Smartsheet REST API method: GET /sheets

* - * @param includes the source inclusion - * @param pagination the object containing the pagination parameters + * @param includes the source inclusion + * @param pagination the object containing the pagination parameters * @param modifiedSince restrict results to sheets modified on or after this date * @return A list of all sheets (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listSheets( EnumSet includes, @@ -86,15 +87,15 @@ PagedResult listSheets( * *

It mirrors to the following Smartsheet REST API method: GET /sheets

* - * @param includes the source inclusion + * @param includes the source inclusion * @param pagination the object containing the pagination parameters * @return A list of all sheets (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listSheets(EnumSet includes, PaginationParameters pagination) throws SmartsheetException; @@ -105,12 +106,12 @@ PagedResult listSheets( * * @param parameters the object containing the pagination parameters * @return the list of all sheets (note that an empty list will be returned if there are none) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation * @deprecated As of release 2.0. Please use {@link UserResources} instead */ @Deprecated(since = "2.0.0", forRemoval = true) @@ -121,112 +122,112 @@ PagedResult listSheets( * *

It mirrors to the following Smartsheet REST API method: GET /sheet/{id}

* - * @param id the id of the sheet - * @param includes used to specify the optional objects to include. - * @param columnIds the column ids - * @param excludes the exclude parameters - * @param page the page number - * @param pageSize the page size - * @param rowIds the row ids + * @param id the id of the sheet + * @param includes used to specify the optional objects to include. + * @param columnIds the column ids + * @param excludes the exclude parameters + * @param page the page number + * @param pageSize the page size + * @param rowIds the row ids * @param rowNumbers the row numbers * @return the sheet resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet getSheet(long id, - EnumSet includes, - EnumSet excludes, - Set rowIds, - Set rowNumbers, - Set columnIds, - Integer pageSize, - Integer page) throws SmartsheetException; + EnumSet includes, + EnumSet excludes, + Set rowIds, + Set rowNumbers, + Set columnIds, + Integer pageSize, + Integer page) throws SmartsheetException; /** *

Get a sheet.

* *

It mirrors to the following Smartsheet REST API method: GET /sheet/{id}

* - * @param id the id of the sheet - * @param includes used to specify the optional objects to include. - * @param columnIds the column ids - * @param excludes the exclude parameters - * @param page the page number - * @param pageSize the page size - * @param rowIds the row ids - * @param rowNumbers the row numbers + * @param id the id of the sheet + * @param includes used to specify the optional objects to include. + * @param columnIds the column ids + * @param excludes the exclude parameters + * @param page the page number + * @param pageSize the page size + * @param rowIds the row ids + * @param rowNumbers the row numbers * @param ifVersionAfter only fetch Sheet if more recent version available * @return the sheet resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet getSheet(long id, - EnumSet includes, - EnumSet excludes, - Set rowIds, - Set rowNumbers, - Set columnIds, - Integer pageSize, - Integer page, - Integer ifVersionAfter) throws SmartsheetException; + EnumSet includes, + EnumSet excludes, + Set rowIds, + Set rowNumbers, + Set columnIds, + Integer pageSize, + Integer page, + Integer ifVersionAfter) throws SmartsheetException; /** *

Get a sheet.

* *

It mirrors to the following Smartsheet REST API method: GET /sheet/{id}

* - * @param id the id of the sheet - * @param includes used to specify the optional objects to include. - * @param columnIds the column ids - * @param excludes the exclude parameters - * @param page the page number - * @param pageSize the page size - * @param rowIds the row ids - * @param rowNumbers the row numbers + * @param id the id of the sheet + * @param includes used to specify the optional objects to include. + * @param columnIds the column ids + * @param excludes the exclude parameters + * @param page the page number + * @param pageSize the page size + * @param rowIds the row ids + * @param rowNumbers the row numbers * @param ifVersionAfter only fetch Sheet if more recent version available - * @param level compatibility level + * @param level compatibility level * @return the sheet resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet getSheet(long id, - EnumSet includes, - EnumSet excludes, - Set rowIds, - Set rowNumbers, - Set columnIds, - Integer pageSize, - Integer page, - Integer ifVersionAfter, - Integer level) throws SmartsheetException; + EnumSet includes, + EnumSet excludes, + Set rowIds, + Set rowNumbers, + Set columnIds, + Integer pageSize, + Integer page, + Integer ifVersionAfter, + Integer level) throws SmartsheetException; /** *

Get sheet by ID. Load all row and column data

* * @param sheetId id of the sheet to fetch * @return the sheet resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet getSheet(long sheetId) throws SmartsheetException; @@ -235,14 +236,14 @@ Sheet getSheet(long id, * *

It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/vnd.ms-excel" Accept HTTP header

* - * @param id the id of the sheet + * @param id the id of the sheet * @param outputStream the output stream to which the Excel file will be written. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void getSheetAsExcel(long id, OutputStream outputStream) throws SmartsheetException; @@ -251,14 +252,14 @@ Sheet getSheet(long id, * *

It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/vnd.ms-excel" Accept HTTP header

* - * @param id the id of the sheet + * @param id the id of the sheet * @param outputStream the output stream to which the Excel file will be written. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void getSheetAsCSV(long id, OutputStream outputStream) throws SmartsheetException; @@ -267,15 +268,15 @@ Sheet getSheet(long id, * *

It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/pdf" Accept HTTP header

* - * @param id the id of the sheet + * @param id the id of the sheet * @param outputStream the output stream to which the PDF file will be written. - * @param paperSize the paper size - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @param paperSize the paper size + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void getSheetAsPDF(long id, OutputStream outputStream, PaperSize paperSize) throws SmartsheetException; @@ -286,12 +287,12 @@ Sheet getSheet(long id, * * @param sheet the sheet to created * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet createSheet(Sheet sheet) throws SmartsheetException; @@ -300,15 +301,15 @@ Sheet getSheet(long id, * *

It mirrors to the following Smartsheet REST API method: POST /sheets

* - * @param sheet the sheet to create + * @param sheet the sheet to create * @param includes used to specify the optional objects to include. * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet createSheetFromTemplate(Sheet sheet, EnumSet includes) throws SmartsheetException; @@ -317,17 +318,17 @@ Sheet getSheet(long id, * *

It mirrors to the following Smartsheet REST API method: POST /sheets/import

* - * @param file path to the CSV file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * @param file path to the CSV file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet importCsv(String file, String sheetName, Integer headerRowIndex, Integer primaryColumnIndex) throws SmartsheetException; @@ -336,17 +337,17 @@ Sheet getSheet(long id, * *

It mirrors to the following Smartsheet REST API method: POST /sheets/import

* - * @param file path to the XLSX file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * @param file path to the XLSX file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet importXlsx(String file, String sheetName, Integer headerRowIndex, Integer primaryColumnIndex) throws SmartsheetException; @@ -356,14 +357,14 @@ Sheet getSheet(long id, *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets

* * @param folderId the folder id - * @param sheet the sheet to create + * @param sheet the sheet to create * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet createSheetInFolder(long folderId, Sheet sheet) throws SmartsheetException; @@ -373,15 +374,15 @@ Sheet getSheet(long id, *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets

* * @param folderID the folder id - * @param sheet the sheet to create - * @param includes used to specify the optional objects to include. + * @param sheet the sheet to create + * @param includes used to specify the optional objects to include. * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet createSheetInFolderFromTemplate(long folderID, Sheet sheet, EnumSet includes) throws SmartsheetException; @@ -390,18 +391,18 @@ Sheet getSheet(long id, * *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import

* - * @param folderID the folder id - * @param file path to the CSV file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * @param folderID the folder id + * @param file path to the CSV file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet importCsvInFolder( long folderID, @@ -416,18 +417,18 @@ Sheet importCsvInFolder( * *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import

* - * @param folderId the folder id - * @param file path to the XLSX file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * @param folderId the folder id + * @param file path to the XLSX file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet importXlsxInFolder( long folderId, @@ -443,14 +444,14 @@ Sheet importXlsxInFolder( *

It mirrors to the following Smartsheet REST API method: POST /workspace/{workspaceId}/sheets

* * @param workspaceId the workspace id - * @param sheet the sheet to create + * @param sheet the sheet to create * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet createSheetInWorkspace(long workspaceId, Sheet sheet) throws SmartsheetException; @@ -460,15 +461,15 @@ Sheet importXlsxInFolder( *

It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets

* * @param workspaceId the workspace id - * @param sheet the sheet to create - * @param includes used to specify the optional objects to include + * @param sheet the sheet to create + * @param includes used to specify the optional objects to include * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet createSheetInWorkspaceFromTemplate( long workspaceId, @@ -481,18 +482,18 @@ Sheet createSheetInWorkspaceFromTemplate( * *

It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import

* - * @param workspaceId the workspace id - * @param file path to the CSV file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * @param workspaceId the workspace id + * @param file path to the CSV file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet importCsvInWorkspace( long workspaceId, @@ -507,18 +508,18 @@ Sheet importCsvInWorkspace( * *

It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import

* - * @param workspaceId the workspace id - * @param file path to the XLSX file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * @param workspaceId the workspace id + * @param file path to the XLSX file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet importXlsxInWorkspace( long workspaceId, @@ -532,19 +533,18 @@ Sheet importXlsxInWorkspace( *

Delete a sheet.

* *

It mirrors to the following Smartsheet REST API method: DELETE /sheet{id}

- * + *

* Parameters: - id : the ID of the sheet - * + *

* Returns: None * - * * @param id the id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteSheet(long id) throws SmartsheetException; @@ -555,12 +555,12 @@ Sheet importXlsxInWorkspace( * * @param sheet the sheet to update * @return the updated sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet updateSheet(Sheet sheet) throws SmartsheetException; @@ -571,13 +571,13 @@ Sheet importXlsxInWorkspace( * * @param id the id * @return the sheet version (note that if there is no such resource, this method will throw - * ResourceNotFoundException) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ int getSheetVersion(long id) throws SmartsheetException; @@ -586,14 +586,14 @@ Sheet importXlsxInWorkspace( * *

It mirrors to the following Smartsheet REST API method: POST /sheet/{sheetId}/emails

* - * @param id the id + * @param id the id * @param email the email - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void sendSheet(long id, SheetEmail email) throws SmartsheetException; @@ -604,13 +604,13 @@ Sheet importXlsxInWorkspace( * * @param id the id * @return the publish status (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SheetPublish getPublishStatus(long id) throws SmartsheetException; @@ -619,16 +619,16 @@ Sheet importXlsxInWorkspace( * *

It mirrors to the following Smartsheet REST API method: PUT /sheet/{sheetId}/publish

* - * @param id the id + * @param id the id * @param publish the SheetPublish object limited. * @return the update SheetPublish object (note that if there is no such resource, this method will throw a - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SheetPublish updatePublishStatus(long id, SheetPublish publish) throws SmartsheetException; @@ -636,18 +636,18 @@ Sheet importXlsxInWorkspace( *

Creates a copy of the specified sheet.

* *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy

- * + *

* Exceptions: - * IllegalArgumentException : if folder 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 - * - * @param sheetId the sheet id + * IllegalArgumentException : if folder 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 + * + * @param sheetId the sheet id * @param containerDestination describes the destination container - * @param includes optional parameters to include + * @param includes optional parameters to include * @return the sheet * @throws SmartsheetException the smartsheet exception */ @@ -661,39 +661,39 @@ Sheet copySheet( *

Creates a copy of the specified sheet.

* *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy

- * + *

* Exceptions: - * IllegalArgumentException : if folder 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 - * - * @param sheetId the sheet id + * IllegalArgumentException : if folder 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 + * + * @param sheetId the sheet id * @param containerDestination describes the destination container - * @param includes optional parameters to include - * @param excludes optional parameters to exclude + * @param includes optional parameters to include + * @param excludes optional parameters to exclude * @return the sheet * @throws SmartsheetException the smartsheet exception */ Sheet copySheet(long sheetId, ContainerDestination containerDestination, EnumSet includes, - EnumSet excludes) throws SmartsheetException; + EnumSet excludes) throws SmartsheetException; /** *

Moves the specified Sheet to another location.

* *

It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/move

- * + *

* Exceptions: - * IllegalArgumentException : if folder 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 - * - * @param sheetId the folder id + * IllegalArgumentException : if folder 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 + * + * @param sheetId the folder id * @param containerDestination describes the destination container * @return the sheet * @throws SmartsheetException the smartsheet exception @@ -704,17 +704,17 @@ Sheet copySheet(long sheetId, ContainerDestination containerDestination, EnumSet *

Creates an Update Request for the specified Row(s) within the Sheet.

* *

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

- * + *

* 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 + * - 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 * * @param sheetId the sheet id - * @param email the email + * @param email the email * @return the update request object * @throws SmartsheetException the smartsheet exception * @deprecated As of release 2.0. Please use {@link SheetUpdateRequestResources} instead. @@ -727,14 +727,14 @@ Sheet copySheet(long sheetId, ContainerDestination containerDestination, EnumSet * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param sortSpecifier the sort criteria - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet sortSheet(long sheetId, SortSpecifier sortSpecifier) throws SmartsheetException; @@ -743,15 +743,15 @@ Sheet copySheet(long sheetId, ContainerDestination containerDestination, EnumSet * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param sortSpecifier the sort criteria - * @param level compatibility level - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @param level compatibility level + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sheet sortSheet(long sheetId, SortSpecifier sortSpecifier, Integer level) throws SmartsheetException; diff --git a/src/main/java/com/smartsheet/api/SheetRowResources.java b/src/main/java/com/smartsheet/api/SheetRowResources.java index 31201ea9..ff7a088d 100644 --- a/src/main/java/com/smartsheet/api/SheetRowResources.java +++ b/src/main/java/com/smartsheet/api/SheetRowResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ /** * 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. */ public interface SheetRowResources { @@ -46,14 +46,14 @@ public interface SheetRowResources { *

It mirrors to the following Smartsheet REST API method: POST /sheets/{id}/rows

* * @param sheetId the sheet id - * @param rows the list of rows to create + * @param rows the list of rows to create * @return the list of created rows - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ List addRows(long sheetId, List rows) throws SmartsheetException; @@ -62,17 +62,17 @@ public interface SheetRowResources { * *

It mirrors to the following Smartsheet REST API method: POST /sheets/{id}/rows

* - * @param sheetId the sheet id - * @param rows the list of rows to create + * @param sheetId the sheet id + * @param rows the list of rows to create * @param includes optional objects to include * @param excludes optional objects to exclude * @return the list of created rows - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ List addRows( long sheetId, @@ -87,14 +87,14 @@ List addRows( *

It mirrors to the following Smartsheet REST API method: POST /sheets/{id}/rows

* * @param sheetId the sheet id - * @param rows the list of rows to create + * @param rows the list of rows to create * @return the list of created rows - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PartialRowUpdateResult addRowsAllowPartialSuccess(long sheetId, List rows) throws SmartsheetException; @@ -103,17 +103,17 @@ List addRows( * *

It mirrors to the following Smartsheet REST API method: POST /sheets/{id}/rows

* - * @param sheetId the sheet id - * @param rows the list of rows to create + * @param sheetId the sheet id + * @param rows the list of rows to create * @param includes optional objects to include * @param excludes optional objects to exclude * @return the list of created rows - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PartialRowUpdateResult addRowsAllowPartialSuccess( long sheetId, @@ -127,18 +127,18 @@ PartialRowUpdateResult addRowsAllowPartialSuccess( * *

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

* - * @param sheetId the id of the sheet - * @param rowId the id of the row + * @param sheetId the id of the sheet + * @param rowId the id of the row * @param includes optional objects to include * @param excludes optional objects to exclude * @return the created row (note that if there is no such resource, this method will throw ResourceNotFoundException rather - * than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Row getRow(long sheetId, long rowId, EnumSet includes, EnumSet excludes) throws SmartsheetException; @@ -146,17 +146,17 @@ PartialRowUpdateResult addRowsAllowPartialSuccess( *

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 + * 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 * * @param sheetId the sheet id - * @param rowId the row id + * @param rowId the row id * @throws SmartsheetException the smartsheet exception * @deprecated as of API 2.0.2 release, replaced by {@link #deleteRows(long, Set, boolean)} */ @@ -167,18 +167,18 @@ PartialRowUpdateResult addRowsAllowPartialSuccess( *

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 + * 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 * * @param sheetId the id of the sheet - * @param rowId the id of the row - * @param email the row email + * @param rowId the id of the row + * @param email the row email * @throws SmartsheetException the smartsheet exception * @deprecated as of API V2.0.2, replaced by {@link #sendRows(long, MultiRowEmail)} */ @@ -189,17 +189,17 @@ PartialRowUpdateResult addRowsAllowPartialSuccess( *

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 + * 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 * * @param sheetId the id of the sheet - * @param email the multi row email + * @param email the multi row email * @throws SmartsheetException the smartsheet exception */ void sendRows(long sheetId, MultiRowEmail email) throws SmartsheetException; @@ -208,17 +208,17 @@ PartialRowUpdateResult addRowsAllowPartialSuccess( *

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 - * - * @param sheetId the sheet id - * @param rowIds the row ids + * 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 + * + * @param sheetId the sheet id + * @param rowIds the row ids * @param ignoreRowsNotFound boolean for ignoring row ids not found * @return a list of deleted rows * @throws SmartsheetException the smartsheet exception @@ -229,17 +229,17 @@ PartialRowUpdateResult addRowsAllowPartialSuccess( *

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 + * 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 * * @param sheetId the id of the sheet - * @param rows the list of rows + * @param rows the list of rows * @return a list of rows * @throws SmartsheetException the smartsheet exception */ @@ -249,17 +249,17 @@ PartialRowUpdateResult addRowsAllowPartialSuccess( *

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 - * - * @param sheetId the id of the sheet - * @param rows the list of rows + * 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 + * + * @param sheetId the id of the sheet + * @param rows the list of rows * @param includes optional objects to include * @param excludes optional objects to exclude * @return a list of rows @@ -276,7 +276,7 @@ List updateRows( *

Helper method: Update a single cell

* * @param sheetId the sheet ID the cell should be written to - * @param cell the cell object to be written. Must include a rowId and columnId + * @param cell the cell object to be written. Must include a rowId and columnId * @return The returned Row object from the api * @throws SmartsheetException the smartsheet exception */ @@ -287,9 +287,9 @@ List updateRows( *

NOTE: This method internally fetches the sheet. To avoid this step, fetch the sheet in * advance and use the method by the same name

* - * @param sheetId the sheet ID the cell should be written to - * @param rowIdx the row index of the cell (base 1 indexed) - * @param colIdx the column index of the cell (base 1 indexed) + * @param sheetId the sheet ID the cell should be written to + * @param rowIdx the row index of the cell (base 1 indexed) + * @param colIdx the column index of the cell (base 1 indexed) * @param newValue the new value of the cell * @return The returned Row object from the api * @throws SmartsheetException the smartsheet exception @@ -299,9 +299,9 @@ List updateRows( /** *

Helper method: Update a single with a string value

* - * @param sheet The sheet to update the cell in. Must include rowId and cell information - * @param rowIdx The row index of the cell (base 1 indexed) - * @param colIdx The column index of the cell (base 1 indexed) + * @param sheet The sheet to update the cell in. Must include rowId and cell information + * @param rowIdx The row index of the cell (base 1 indexed) + * @param colIdx The column index of the cell (base 1 indexed) * @param newValue The new value of the cell * @return The returned Row object from the api * @throws SmartsheetException the smartsheet exception @@ -313,17 +313,17 @@ List updateRows( * 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 + * 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 * * @param sheetId the id of the sheet - * @param rows the list of rows + * @param rows the list of rows * @return a list of rows * @throws SmartsheetException the smartsheet exception */ @@ -334,17 +334,17 @@ List updateRows( * 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 - * - * @param sheetId the id of the sheet - * @param rows the list of rows + * 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 + * + * @param sheetId the id of the sheet + * @param rows the list of rows * @param includes optional objects to include * @param excludes optional objects to exclude * @return a list of rows @@ -361,19 +361,19 @@ PartialRowUpdateResult updateRowsAllowPartialSuccess( *

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 - * - * @param sheetId the sheet ID to move - * @param includes the parameters to include + * 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 + * + * @param sheetId the sheet ID to move + * @param includes the parameters to include * @param ignoreRowsNotFound optional,specifying row Ids that do not exist within the source sheet - * @param moveParameters CopyOrMoveRowDirective object + * @param moveParameters CopyOrMoveRowDirective object * @return the result object * @throws SmartsheetException the smartsheet exception */ @@ -388,19 +388,19 @@ CopyOrMoveRowResult moveRows( *

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 - * - * @param sheetId the sheet ID to move - * @param includes the parameters to include + * 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 + * + * @param sheetId the sheet ID to move + * @param includes the parameters to include * @param ignoreRowsNotFound optional,specifying row Ids that do not exist within the source sheet - * @param copyParameters CopyOrMoveRowDirective object + * @param copyParameters CopyOrMoveRowDirective object * @return the result object * @throws SmartsheetException the smartsheet exception */ diff --git a/src/main/java/com/smartsheet/api/SheetSummaryResources.java b/src/main/java/com/smartsheet/api/SheetSummaryResources.java index d5329912..4efaa67f 100644 --- a/src/main/java/com/smartsheet/api/SheetSummaryResources.java +++ b/src/main/java/com/smartsheet/api/SheetSummaryResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,56 +39,56 @@ public interface SheetSummaryResources { * *

It mirrors to the following Smartsheet REST API method: GET /sheets/{id}/summary

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param includes optional objects to include * @param excludes optional objects to exclude * @return the sheet summary - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SheetSummary getSheetSummary(long sheetId, EnumSet includes, - EnumSet excludes) throws SmartsheetException; + EnumSet excludes) throws SmartsheetException; /** *

Gets the sheet summary fields

* *

It mirrors to the following Smartsheet REST API method: GET /sheets/{id}/summary/fields

* - * @param sheetId the sheet id - * @param includes optional objects to include - * @param excludes optional objects to exclude + * @param sheetId the sheet id + * @param includes optional objects to include + * @param excludes optional objects to exclude * @param pagination pagination parameters for the response * @return the list of sheet summary fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult getSheetSummaryFields(long sheetId, EnumSet includes, - EnumSet excludes, - PaginationParameters pagination) throws SmartsheetException; + EnumSet excludes, + PaginationParameters pagination) throws SmartsheetException; /** *

Insert fields into a sheet summary.

* *

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

* - * @param sheetId the sheet id - * @param fields list of fields to be added + * @param sheetId the sheet id + * @param fields list of fields to be added * @param renameIfConflict true if the call should rename conflicting field titles * @return the created fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ List addSheetSummaryFields(long sheetId, List fields, Boolean renameIfConflict) throws SmartsheetException; @@ -97,35 +97,35 @@ PagedResult getSheetSummaryFields(long sheetId, EnumSetIt mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/summary/fields

* - * @param sheetId the sheet id - * @param fields list of fields to be added + * @param sheetId the sheet id + * @param fields list of fields to be added * @param renameIfConflict true if the call should rename conflicting field titles * @return a bulk item result containing the created fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ BulkItemResult addSheetSummaryFieldsWithPartialSuccess(long sheetId, List fields, - Boolean renameIfConflict) throws SmartsheetException; + Boolean renameIfConflict) throws SmartsheetException; /** *

Update fields in a sheet summary.

* *

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

* - * @param sheetId the sheet id - * @param fields list of summary fields to be updated + * @param sheetId the sheet id + * @param fields list of summary fields to be updated * @param renameIfConflict true if the call should rename conflicting field titles * @return the updated fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ List updateSheetSummaryFields( long sheetId, @@ -138,35 +138,35 @@ List updateSheetSummaryFields( * *

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

* - * @param sheetId the sheet id - * @param fields list of summary fields to be updated + * @param sheetId the sheet id + * @param fields list of summary fields to be updated * @param renameIfConflict true if the call should rename conflicting field titles * @return a bulk item result containing the updated fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ BulkItemResult updateSheetSummaryFieldsWithPartialSuccess(long sheetId, List fields, - Boolean renameIfConflict) throws SmartsheetException; + Boolean renameIfConflict) throws SmartsheetException; /** *

Delete fields in a sheet summary.

* *

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

* - * @param sheetId the sheet id - * @param fieldIds List of field Ids + * @param sheetId the sheet id + * @param fieldIds List of field Ids * @param ignoreSummaryFieldsNotFound true if the call should ignore fields not found * @return List of field Ids deleted - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ List deleteSheetSummaryFields(long sheetId, Set fieldIds, Boolean ignoreSummaryFieldsNotFound) throws SmartsheetException; @@ -175,39 +175,39 @@ BulkItemResult updateSheetSummaryFieldsWithPartialSuccess(long she * *

It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/summary/fields/{fieldId}/images

* - * @param sheetId the sheet id - * @param fieldId the summary field id - * @param file path to image file to upload + * @param sheetId the sheet id + * @param fieldId the summary field id + * @param file path to image file to upload * @param contentType content-type of the file being uploaded - * @param altText alternate text for the image + * @param altText alternate text for the image * @return Result - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Result addSheetSummaryFieldImage(long sheetId, long fieldId, String file, String contentType, String altText) throws SmartsheetException, FileNotFoundException; /** * Adds an image to the sheet summary field. - * + *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/summary/fields/{fieldId}/images * - * @param sheetId the sheet id - * @param fieldId the summary field id - * @param file File to upload + * @param sheetId the sheet id + * @param fieldId the summary field id + * @param file File to upload * @param contentType content-type of the file being uploaded - * @param altText alternate text for the image + * @param altText alternate text for the image * @return Result - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Result addSheetSummaryFieldImage( long sheetId, @@ -222,19 +222,19 @@ Result addSheetSummaryFieldImage( *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/summary/fields/{fieldId}/images * - * @param sheetId the sheet id - * @param fieldId the summary field id - * @param inputStream File to upload - * @param contentType content-type of the file being uploaded + * @param sheetId the sheet id + * @param fieldId the summary field id + * @param inputStream File to upload + * @param contentType content-type of the file being uploaded * @param contentLength content length - * @param altText alternate text for the image + * @param altText alternate text for the image * @return Result - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Result addSheetSummaryFieldImage( long sheetId, diff --git a/src/main/java/com/smartsheet/api/SheetUpdateRequestResources.java b/src/main/java/com/smartsheet/api/SheetUpdateRequestResources.java index bdc1ed4e..6dedb8a4 100644 --- a/src/main/java/com/smartsheet/api/SheetUpdateRequestResources.java +++ b/src/main/java/com/smartsheet/api/SheetUpdateRequestResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,14 +29,14 @@ public interface SheetUpdateRequestResources { *

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

* * @param sheetId the Id of the sheet - * @param paging the object containing the pagination parameters + * @param paging the object containing the pagination parameters * @return A list of all UpdateRequests (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listUpdateRequests(long sheetId, PaginationParameters paging) throws SmartsheetException; @@ -45,16 +45,16 @@ public interface SheetUpdateRequestResources { * *

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

* - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param updateRequestId the update request Id * @return the update request resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ UpdateRequest getUpdateRequest(long sheetId, long updateRequestId) throws SmartsheetException; @@ -64,15 +64,15 @@ public interface SheetUpdateRequestResources { * *

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

* - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param updateRequest the update request object * @return the update request resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ UpdateRequest createUpdateRequest(long sheetId, UpdateRequest updateRequest) throws SmartsheetException; @@ -81,14 +81,14 @@ public interface SheetUpdateRequestResources { * *

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

* - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param updateRequestId the update request Id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteUpdateRequest(long sheetId, long updateRequestId) throws SmartsheetException; @@ -97,15 +97,15 @@ public interface SheetUpdateRequestResources { * *

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

* - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param updateRequest the update request object * @return the update request resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ UpdateRequest updateUpdateRequest(long sheetId, UpdateRequest updateRequest) throws SmartsheetException; @@ -115,14 +115,14 @@ public interface SheetUpdateRequestResources { *

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/sentupdaterequests

* * @param sheetId the Id of the sheet - * @param paging the object containing the pagination parameters + * @param paging the object containing the pagination parameters * @return A list of all UpdateRequests (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listSentUpdateRequests(long sheetId, PaginationParameters paging) throws SmartsheetException; @@ -131,16 +131,16 @@ public interface SheetUpdateRequestResources { * *

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/sentupdaterequests/{updateRequestId}

* - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param sentUpdateRequestId the sent update request Id * @return the sent update request resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SentUpdateRequest getSentUpdateRequest(long sheetId, long sentUpdateRequestId) throws SmartsheetException; @@ -149,14 +149,14 @@ public interface SheetUpdateRequestResources { * *

It mirrors To the following Smartsheet REST API method: DELETE /sheets/{sheetId}/sentupdaterequests/{sentUpdateRequestId}

* - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param sentUpdateRequestId the sent update request Id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteSentUpdateRequest(long sheetId, long sentUpdateRequestId) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/SightResources.java b/src/main/java/com/smartsheet/api/SightResources.java index 17738946..c8a89a0a 100644 --- a/src/main/java/com/smartsheet/api/SightResources.java +++ b/src/main/java/com/smartsheet/api/SightResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,16 +33,16 @@ public interface SightResources { * *

It mirrors to the following Smartsheet REST API method: GET /sights

* - * @param paging the pagination parameters + * @param paging the pagination parameters * @param modifiedSince include sights modified on or after this date * @return IndexResult object containing an array of Sight objects limited to the following attributes: - * id, name, accessLevel, permalink, createdAt, modifiedAt. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * id, name, accessLevel, permalink, createdAt, modifiedAt. + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listSights(PaginationParameters paging, Date modifiedSince) throws SmartsheetException; @@ -53,12 +53,12 @@ public interface SightResources { * * @param sightId the Id of the Sight * @return the Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sight getSight(long sightId) throws SmartsheetException; @@ -68,14 +68,14 @@ public interface SightResources { *

It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}

* * @param sightId the Id of the Sight - * @param level compatibility level + * @param level compatibility level * @return the Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sight getSight(long sightId, Integer level) throws SmartsheetException; @@ -85,14 +85,14 @@ public interface SightResources { *

It mirrors to the following Smartsheet REST API method: GET /sights/{sightId}

* * @param sightId the Id of the Sight - * @param level compatibility level + * @param level compatibility level * @return the Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sight getSight(long sightId, EnumSet includes, Integer level) throws SmartsheetException; @@ -103,12 +103,12 @@ public interface SightResources { * * @param sight - the Sight to update * @return the updated Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sight updateSight(Sight sight) throws SmartsheetException; @@ -118,12 +118,12 @@ public interface SightResources { *

It mirrors to the following Smartsheet REST API method: DELETE /sights/{sightId}

* * @param sightId the Id of the Sight - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteSight(long sightId) throws SmartsheetException; @@ -132,15 +132,15 @@ public interface SightResources { * *

It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/copy

* - * @param sightId the Id of the Sight + * @param sightId the Id of the Sight * @param destination the destination to copy to * @return the newly created Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sight copySight(long sightId, ContainerDestination destination) throws SmartsheetException; @@ -149,15 +149,15 @@ public interface SightResources { * *

It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/move

* - * @param sightId the Id of the Sight + * @param sightId the Id of the Sight * @param destination the destination to copy to * @return the newly created Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Sight moveSight(long sightId, ContainerDestination destination) throws SmartsheetException; @@ -168,12 +168,12 @@ public interface SightResources { * * @param sightId the Id of the Sight * @return the Sight's publish status. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SightPublish getPublishStatus(long sightId) throws SmartsheetException; @@ -182,15 +182,15 @@ public interface SightResources { * *

It mirrors to the following Smartsheet REST API method: PUT /sights/{sightId}/publish

* - * @param sightId the Id of the Sight + * @param sightId the Id of the Sight * @param sightPublish the SightPublish object containing publish status * @return the Sight's publish status. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ SightPublish setPublishStatus(long sightId, SightPublish sightPublish) throws SmartsheetException; diff --git a/src/main/java/com/smartsheet/api/Smartsheet.java b/src/main/java/com/smartsheet/api/Smartsheet.java index fa3435c6..dd70783a 100644 --- a/src/main/java/com/smartsheet/api/Smartsheet.java +++ b/src/main/java/com/smartsheet/api/Smartsheet.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,12 +26,14 @@ public interface Smartsheet { /** *

Enable request/response tracing in client

+ * * @param levels - what to trace (if anything; null if not tracing at all) */ void setTraces(Trace... levels); /** * enable/disable pretty JSON trace logging + * * @param pretty if the JSON is nicely-formatted or compact */ void setTracePrettyPrint(boolean pretty); diff --git a/src/main/java/com/smartsheet/api/SmartsheetBuilder.java b/src/main/java/com/smartsheet/api/SmartsheetBuilder.java index 8ba907c6..6aab2611 100644 --- a/src/main/java/com/smartsheet/api/SmartsheetBuilder.java +++ b/src/main/java/com/smartsheet/api/SmartsheetBuilder.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -173,7 +173,6 @@ public SmartsheetBuilder setAssumedUser(String assumedUser) { * * @param changeAgent the identifier to include in the webhooks that result from the changes * made using the API - * * @return the smartsheet builder */ public SmartsheetBuilder setChangeAgent(String changeAgent) { diff --git a/src/main/java/com/smartsheet/api/SmartsheetException.java b/src/main/java/com/smartsheet/api/SmartsheetException.java index e16e6b2c..923a3cad 100644 --- a/src/main/java/com/smartsheet/api/SmartsheetException.java +++ b/src/main/java/com/smartsheet/api/SmartsheetException.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,9 @@ */ public class SmartsheetException extends Exception { - /** The Constant serialVersionUID. */ + /** + * The Constant serialVersionUID. + */ private static final long serialVersionUID = 1L; /** @@ -39,7 +41,7 @@ public SmartsheetException(String message) { *

Constructor.

* * @param message the message - * @param cause the cause + * @param cause the cause */ public SmartsheetException(String message, Throwable cause) { super(message, cause); diff --git a/src/main/java/com/smartsheet/api/SmartsheetFactory.java b/src/main/java/com/smartsheet/api/SmartsheetFactory.java index 6623cc73..98aefb30 100644 --- a/src/main/java/com/smartsheet/api/SmartsheetFactory.java +++ b/src/main/java/com/smartsheet/api/SmartsheetFactory.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/smartsheet/api/SmartsheetRestException.java b/src/main/java/com/smartsheet/api/SmartsheetRestException.java index 0ab4351a..a65901f2 100644 --- a/src/main/java/com/smartsheet/api/SmartsheetRestException.java +++ b/src/main/java/com/smartsheet/api/SmartsheetRestException.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,9 @@ */ public class SmartsheetRestException extends SmartsheetException { - /** The Constant serialVersionUID. */ + /** + * The Constant serialVersionUID. + */ private static final long serialVersionUID = 1L; /** *

Represents the error code.

@@ -35,16 +37,16 @@ public class SmartsheetRestException extends SmartsheetException { private final int errorCode; /** - *

Represents the reference ID.

+ *

Represents the reference ID.

* - *

It will be initialized in the constructor and will not change afterwards.

+ *

It will be initialized in the constructor and will not change afterwards.

*/ private final String refId; /** - *

Represents any error detail provided by the API

+ *

Represents any error detail provided by the API

* - *

It will be initialized in the constructor and will not change afterwards.

+ *

It will be initialized in the constructor and will not change afterwards.

*/ private final Object detail; diff --git a/src/main/java/com/smartsheet/api/TemplateResources.java b/src/main/java/com/smartsheet/api/TemplateResources.java index c386263a..39c98a70 100644 --- a/src/main/java/com/smartsheet/api/TemplateResources.java +++ b/src/main/java/com/smartsheet/api/TemplateResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,13 +31,13 @@ public interface TemplateResources { *

List user-created templates.

* *

It mirrors to the following Smartsheet REST API method: GET /templates

- * + *

* 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) - * - 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 + * - 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 * * @param parameters the pagination parameters * @return all templates (note that empty list will be returned if there is none) @@ -49,13 +49,13 @@ public interface TemplateResources { *

List public templates.

* *

It mirrors to the following Smartsheet REST API method: GET /templates/public

- * + *

* 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) - * - 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 + * - 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 * * @param parameters the pagination parameters * @return all templates (note that empty list will be returned if there is none) diff --git a/src/main/java/com/smartsheet/api/TokenResources.java b/src/main/java/com/smartsheet/api/TokenResources.java index 42bf9d6a..8a631804 100644 --- a/src/main/java/com/smartsheet/api/TokenResources.java +++ b/src/main/java/com/smartsheet/api/TokenResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,18 +35,18 @@ public interface TokenResources { * Revoke access token. *

* Exceptions: - * - IllegalArgumentException : if url is null or empty - * - InvalidTokenRequestException : if the token request is invalid - * - InvalidOAuthClientException : if the client information is invalid - * - InvalidOAuthGrantException : if the authorization code or refresh token is invalid or - * expired, the redirect_uri does not match, or the hash value does not match the client secret and/or code - * - UnsupportedOAuthGrantTypeException : if the grant type is invalid - * - OAuthTokenException : if any other error occurred during the operation + * - IllegalArgumentException : if url is null or empty + * - InvalidTokenRequestException : if the token request is invalid + * - InvalidOAuthClientException : if the client information is invalid + * - InvalidOAuthGrantException : if the authorization code or refresh token is invalid or + * expired, the redirect_uri does not match, or the hash value does not match the client secret and/or code + * - UnsupportedOAuthGrantTypeException : if the grant type is invalid + * - OAuthTokenException : if any other error occurred during the operation * - * @throws OAuthTokenException the o auth token exception + * @throws OAuthTokenException the o auth token exception * @throws JSONSerializerException the JSON serializer exception - * @throws HttpClientException the http client exception - * @throws URISyntaxException the URI syntax exception + * @throws HttpClientException the http client exception + * @throws URISyntaxException the URI syntax exception * @throws InvalidRequestException the invalid request exception */ void revokeAccessToken() throws OAuthTokenException, JSONSerializerException, HttpClientException, diff --git a/src/main/java/com/smartsheet/api/Trace.java b/src/main/java/com/smartsheet/api/Trace.java index 1290f21c..694541a8 100644 --- a/src/main/java/com/smartsheet/api/Trace.java +++ b/src/main/java/com/smartsheet/api/Trace.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,6 +49,7 @@ public boolean addReplacements(Set traces) { } }, ; + // this makes it possible to add other (or additional) Traces for specific types public boolean addReplacements(Set traces) { return false; diff --git a/src/main/java/com/smartsheet/api/UserResources.java b/src/main/java/com/smartsheet/api/UserResources.java index 91592572..9c9c912c 100644 --- a/src/main/java/com/smartsheet/api/UserResources.java +++ b/src/main/java/com/smartsheet/api/UserResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,12 +45,12 @@ public interface UserResources { *

It mirrors to the following Smartsheet REST API method: GET /users

* * @return the list of all users - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listUsers() throws SmartsheetException; @@ -59,15 +59,15 @@ public interface UserResources { * *

It mirrors to the following Smartsheet REST API method: GET /users

* - * @param email the list of email addresses + * @param email the list of email addresses * @param pagination object containing pagination query parameters * @return the list of all users - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listUsers(Set email, PaginationParameters pagination) throws SmartsheetException; @@ -76,19 +76,19 @@ public interface UserResources { * *

It mirrors to the following Smartsheet REST API method: GET /users

* - * @param email the list of email addresses - * @param includes elements to include in response + * @param email the list of email addresses + * @param includes elements to include in response * @param pagination object containing pagination query parameters * @return the list of all users - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listUsers(Set email, EnumSet includes, - PaginationParameters pagination) throws SmartsheetException; + PaginationParameters pagination) throws SmartsheetException; /** *

Add a user to the organization, without sending email.

@@ -97,12 +97,12 @@ PagedResult listUsers(Set email, EnumSet includ * * @param user the user object * @return the user - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ User addUser(User user) throws SmartsheetException; @@ -111,15 +111,15 @@ PagedResult listUsers(Set email, EnumSet includ * *

It mirrors to the following Smartsheet REST API method: POST /users

* - * @param user the user + * @param user the user * @param sendEmail the send email flag * @return the user - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ User addUser(User user, boolean sendEmail) throws SmartsheetException; @@ -130,12 +130,12 @@ PagedResult listUsers(Set email, EnumSet includ * * @param userId the user id * @return the current user - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ UserProfile getUser(long userId) throws SmartsheetException; @@ -145,12 +145,12 @@ PagedResult listUsers(Set email, EnumSet includ *

It mirrors to the following Smartsheet REST API method: GET /user/me

* * @return the current user - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ UserProfile getCurrentUser() throws SmartsheetException; @@ -161,12 +161,12 @@ PagedResult listUsers(Set email, EnumSet includ * * @param includes used to specify the optional objects to include. * @return the current user - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ UserProfile getCurrentUser(EnumSet includes) throws SmartsheetException; @@ -177,12 +177,12 @@ PagedResult listUsers(Set email, EnumSet includ * * @param user the user to update * @return the updated user - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ User updateUser(User user) throws SmartsheetException; @@ -191,14 +191,14 @@ PagedResult listUsers(Set email, EnumSet includ * *

It mirrors to the following Smartsheet REST API method: DELETE /user/{id}

* - * @param id the id of the user + * @param id the id of the user * @param parameters the object containing parameters for deleting users - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteUser(long id, DeleteUserParameters parameters) throws SmartsheetException; @@ -207,15 +207,15 @@ PagedResult listUsers(Set email, EnumSet includ * *

It mirrors to the following Smartsheet REST API method: GET /users/sheets

* - * @param pagination the object containing the pagination query parameters + * @param pagination the object containing the pagination query parameters * @param modifiedSince restrict to sheets modified on or after this date * @return the list of all organisation sheets - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listOrgSheets(PaginationParameters pagination, Date modifiedSince) throws SmartsheetException; @@ -226,12 +226,12 @@ PagedResult listUsers(Set email, EnumSet includ * * @param pagination the object containing the pagination query parameters * @return the list of all organisation sheets - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listOrgSheets(PaginationParameters pagination) throws SmartsheetException; @@ -240,15 +240,15 @@ PagedResult listUsers(Set email, EnumSet includ * *

It mirrors to the following Smartsheet REST API method: GET /users/{userId}/alternateemails

* - * @param userId the userID + * @param userId the userID * @param pagination the pagination parameters * @return the list of all user alternate email(s) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listAlternateEmails(long userId, PaginationParameters pagination) throws SmartsheetException; @@ -257,16 +257,16 @@ PagedResult listUsers(Set email, EnumSet includ * *

It mirrors to the following Smartsheet REST API method: GET /users/{userId}/alternateemails/{alternateEmailId}

* - * @param userId the id of the user + * @param userId the id of the user * @param altEmailId the alternate email id for the alternate email to retrieve. * @return the resource. Note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null. + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ AlternateEmail getAlternateEmail(long userId, long altEmailId) throws SmartsheetException; @@ -275,15 +275,15 @@ PagedResult listUsers(Set email, EnumSet includ * *

It mirrors to the following Smartsheet REST API method: POST /users/{userId}/alternateemails

* - * @param userId the id of the user + * @param userId the id of the user * @param altEmails List of alternate email address to add. * @return List of added alternate email(s). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ List addAlternateEmail(long userId, List altEmails) throws SmartsheetException; @@ -292,45 +292,45 @@ PagedResult listUsers(Set email, EnumSet includ * *

It mirrors to the following Smartsheet REST API method: DELETE /users/{userId}/alternateemails/{alternateEmailId}

* - * @param userId the id of the user + * @param userId the id of the user * @param altEmailId the alternate email id for the alternate email to retrieve. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteAlternateEmail(long userId, long altEmailId) throws SmartsheetException; /** *

Promote and alternate email to primary.

* - * @param userId id of the user + * @param userId id of the user * @param altEmailId alternate email id * @return alternateEmail of the primary - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException f there is any other error during the operation + * @throws SmartsheetException f there is any other error during the operation */ AlternateEmail promoteAlternateEmail(long userId, long altEmailId) throws SmartsheetException; /** *

Uploads a profile image for the specified user.

* - * @param userId id of the user - * @param file path to the image file + * @param userId id of the user + * @param file path to the image file * @param fileType content type of the image file * @return user - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException f there is any other error during the operation + * @throws SmartsheetException f there is any other error during the operation */ User addProfileImage(long userId, String file, String fileType) throws SmartsheetException, FileNotFoundException; } diff --git a/src/main/java/com/smartsheet/api/WebhookResources.java b/src/main/java/com/smartsheet/api/WebhookResources.java index 03635e36..fd0ec471 100644 --- a/src/main/java/com/smartsheet/api/WebhookResources.java +++ b/src/main/java/com/smartsheet/api/WebhookResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,12 +31,12 @@ public interface WebhookResources { * * @param paging the object containing the pagination parameters * @return IndexResult object containing an array of Webhook objects. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listWebhooks(PaginationParameters paging) throws SmartsheetException; @@ -47,12 +47,12 @@ public interface WebhookResources { * * @param webhookId the Id of the webhook * @return the webhook resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Webhook getWebhook(long webhookId) throws SmartsheetException; @@ -63,12 +63,12 @@ public interface WebhookResources { * * @param webhook the webhook to be created * @return the webhook resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Webhook createWebhook(Webhook webhook) throws SmartsheetException; @@ -79,12 +79,12 @@ public interface WebhookResources { * * @param webhook the webhook to update * @return the updated webhook resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Webhook updateWebhook(Webhook webhook) throws SmartsheetException; @@ -94,29 +94,29 @@ public interface WebhookResources { *

It mirrors to the following Smartsheet REST API method: DELETE /webhooks/{webhookId}

* * @param webhookId the webhook Id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteWebhook(long webhookId) throws SmartsheetException; /** *

Resets the shared secret for the specified Webhook. For more information about how a shared secret is used, - * see Authenticating Callbacks.

+ * see Authenticating Callbacks.

* *

It mirrors to the following Smartsheet REST API method: POST /webhooks/{webhookId}/resetsharedsecret

* * @param webhookId the webhook Id * @return the Webhook shared secret - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ WebhookSharedSecret resetSharedSecret(long webhookId) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/WorkspaceFolderResources.java b/src/main/java/com/smartsheet/api/WorkspaceFolderResources.java index 48975839..dad9d7c2 100644 --- a/src/main/java/com/smartsheet/api/WorkspaceFolderResources.java +++ b/src/main/java/com/smartsheet/api/WorkspaceFolderResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,14 +33,14 @@ public interface WorkspaceFolderResources { *

It mirrors to the following Smartsheet REST API method: GET /workspace/{id}/folders

* * @param workspaceId the workspace id - * @param parameters the pagination parameters + * @param parameters the pagination parameters * @return the list of folders (note that an empty list will be returned if there are none) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listFolders(long workspaceId, PaginationParameters parameters) throws SmartsheetException; @@ -50,14 +50,14 @@ public interface WorkspaceFolderResources { *

It mirrors to the following Smartsheet REST API method: POST /workspace/{id}/folders

* * @param workspaceId the workspace id - * @param folder the folder to create + * @param folder the folder to create * @return the created folder - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Folder createFolder(long workspaceId, Folder folder) throws SmartsheetException; } diff --git a/src/main/java/com/smartsheet/api/WorkspaceResources.java b/src/main/java/com/smartsheet/api/WorkspaceResources.java index d6ac66e7..1b3bcfef 100644 --- a/src/main/java/com/smartsheet/api/WorkspaceResources.java +++ b/src/main/java/com/smartsheet/api/WorkspaceResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,12 +41,12 @@ public interface WorkspaceResources { * * @param parameters the object containing the pagination parameters * @return the list of workspaces (note that an empty list will be returned if there are none) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ PagedResult listWorkspaces(PaginationParameters parameters) throws SmartsheetException; @@ -55,17 +55,17 @@ public interface WorkspaceResources { * *

It mirrors to the following Smartsheet REST API method: GET /workspace/{id}

* - * @param id the id + * @param id the id * @param includes the include parameters - * @param loadAll the loadAll boolean value + * @param loadAll the loadAll boolean value * @return the workspace (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Workspace getWorkspace(long id, Boolean loadAll, EnumSet includes) throws SmartsheetException; @@ -76,12 +76,12 @@ public interface WorkspaceResources { * * @param workspace the workspace to create * @return the created workspace - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Workspace createWorkspace(Workspace workspace) throws SmartsheetException; @@ -92,13 +92,13 @@ public interface WorkspaceResources { * * @param workspace the workspace to update * @return the updated workspace (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ Workspace updateWorkspace(Workspace workspace) throws SmartsheetException; @@ -108,12 +108,12 @@ public interface WorkspaceResources { *

It mirrors to the following Smartsheet REST API method: DELETE /workspace{id}

* * @param id the id of the workspace - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ void deleteWorkspace(long id) throws SmartsheetException; @@ -121,19 +121,19 @@ public interface WorkspaceResources { *

Creates a copy of the specified workspace.

* *

It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/copy

- * + *

* Exceptions: - * IllegalArgumentException : if folder 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 - * - * @param workspaceId the folder id + * IllegalArgumentException : if folder 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 + * + * @param workspaceId the folder id * @param containerDestination describes the destination container - * @param includes optional parameters to include - * @param skipRemap optional parameters to exclude + * @param includes optional parameters to include + * @param skipRemap optional parameters to exclude * @return the folder * @throws SmartsheetException the smartsheet exception */ @@ -148,27 +148,27 @@ Workspace copyWorkspace( *

Creates a copy of the specified workspace.

* *

It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/copy

- * + *

* Exceptions: - * IllegalArgumentException : if folder 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 - * - * @param workspaceId the folder id + * IllegalArgumentException : if folder 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 + * + * @param workspaceId the folder id * @param containerDestination describes the destination container - * @param includes optional parameters to include - * @param skipRemap optional parameters to NOT re-map in the new folder - * @param excludes optional parameters to exclude + * @param includes optional parameters to include + * @param skipRemap optional parameters to NOT re-map in the new folder + * @param excludes optional parameters to exclude * @return the folder * @throws SmartsheetException the smartsheet exception * @deprecated As of release 2.0. `excludes` param is deprecated. Please use the `copyWorkspace` method with `includes` instead. */ @Deprecated(since = "2.0.0", forRemoval = true) Workspace copyWorkspace(long workspaceId, ContainerDestination containerDestination, EnumSet includes, - EnumSet skipRemap, EnumSet excludes) throws SmartsheetException; + EnumSet skipRemap, EnumSet excludes) throws SmartsheetException; /** *

Return the WorkspaceFolderResources object that provides access to Folder resources associated with Workspace diff --git a/src/main/java/com/smartsheet/api/internal/AbstractAssociatedResources.java b/src/main/java/com/smartsheet/api/internal/AbstractAssociatedResources.java index 664d965b..1dc79f41 100644 --- a/src/main/java/com/smartsheet/api/internal/AbstractAssociatedResources.java +++ b/src/main/java/com/smartsheet/api/internal/AbstractAssociatedResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,13 +20,13 @@ /** * This is the base class of the Smartsheet REST API resources that are associated to other resources. - * + *

* Thread Safety: This class is thread safe because it is immutable and its base class is thread safe. */ public abstract class AbstractAssociatedResources extends AbstractResources { /** * Represents the master resource type (e.g. "sheet", "workspace"). - * + *

* It will be initialized in constructor and will not change afterwards. */ private String masterResourceType; @@ -34,7 +34,7 @@ public abstract class AbstractAssociatedResources extends AbstractResources { /** * Constructor. * - * @param smartsheet the smartsheet + * @param smartsheet the smartsheet * @param masterResourceType the master resource type */ public AbstractAssociatedResources(SmartsheetImpl smartsheet, String masterResourceType) { diff --git a/src/main/java/com/smartsheet/api/internal/AbstractResources.java b/src/main/java/com/smartsheet/api/internal/AbstractResources.java index ae23abbe..f60032cc 100644 --- a/src/main/java/com/smartsheet/api/internal/AbstractResources.java +++ b/src/main/java/com/smartsheet/api/internal/AbstractResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,16 +60,20 @@ /** * This is the base class of the Smartsheet REST API resources. - * + *

* Thread Safety: This class is thread safe because it is immutable and the underlying SmartsheetImpl is thread safe. */ public abstract class AbstractResources { - /** this system property is used to control the number of characters logged from an API response in logs */ + /** + * this system property is used to control the number of characters logged from an API response in logs + */ public static final String PROPERTY_RESPONSE_LOG_CHARS = "Smartsheet.responseLogChars"; private static final Logger log = LoggerFactory.getLogger(AbstractResources.class); - /** The Constant BUFFER_SIZE. */ + /** + * The Constant BUFFER_SIZE. + */ private static final int BUFFER_SIZE = 4098; private static final String JSON_CONTENT_TYPE = "application/json"; @@ -87,16 +91,20 @@ public enum ErrorCode { INTERNAL_SERVER_ERROR(500, InvalidRequestException.class), SERVICE_UNAVAILABLE(503, ServiceUnavailableException.class); - /** The error code. */ + /** + * The error code. + */ int errorCode; - /** The Exception class. */ + /** + * The Exception class. + */ Class exceptionClass; /** * Instantiates a new error code. * - * @param errorCode the error code + * @param errorCode the error code * @param exceptionClass the Exception class */ ErrorCode(int errorCode, Class exceptionClass) { @@ -160,7 +168,7 @@ public SmartsheetRestException getException(com.smartsheet.api.models.Error erro /** * Represents the SmartsheetImpl. - * + *

* It will be initialized in constructor and will not change afterwards. */ protected final SmartsheetImpl smartsheet; @@ -178,22 +186,22 @@ protected AbstractResources(SmartsheetImpl smartsheet) { /** * Get a resource from Smartsheet REST API. - * + *

* Parameters: - path : the relative path of the resource - objectClass : the resource object class - * + *

* Returns: the resource (note that if there is no such resource, this method will throw ResourceNotFoundException * rather than returning null). - * + *

* 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 - * - * @param the generic type - * @param path the relative path of the resource. + * 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 + * + * @param the generic type + * @param path the relative path of the resource. * @param objectClass the object class * @return the resource * @throws SmartsheetException the smartsheet exception @@ -248,20 +256,20 @@ protected T getResource(String path, Class objectClass) throws Smartsheet /** * Create a resource using Smartsheet REST API. - * + *

* 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 - * - * @param the generic type of object to return/deserialize - * @param the generic type of object to serialize - * @param path the relative path of the resource collections + * 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 + * + * @param the generic type of object to return/deserialize + * @param the generic type of object to serialize + * @param path the relative path of the resource collections * @param objectClass the resource object class - * @param object the object to create + * @param object the object to create * @return the created resource * @throws SmartsheetException the smartsheet exception */ @@ -314,19 +322,19 @@ protected T createResource(String path, Class objectClass, S object) t /** * Create a resource using Smartsheet REST API. - * + *

* 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 - * - * @param the generic type - * @param path the relative path of the resource collections + * 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 + * + * @param the generic type + * @param path the relative path of the resource collections * @param objectClass the resource object class - * @param object the object to create + * @param object the object to create * @return the created resource * @throws SmartsheetException the smartsheet exception */ @@ -376,20 +384,20 @@ protected T createResourceWithAttachment( /** * Update a resource using Smartsheet REST API. - * + *

* 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) - * 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 - * - * @param the generic type - * @param path the relative path of the resource + * 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) + * 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 + * + * @param the generic type + * @param path the relative path of the resource * @param objectClass the resource object class - * @param object the object to create + * @param object the object to create * @return the updated resource * @throws SmartsheetException the smartsheet exception */ @@ -428,17 +436,17 @@ protected T updateResource(String path, Class objectClass, T object) thro /** * List resources using Smartsheet REST API. - * + *

* 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 - * - * @param the generic type - * @param path the relative path of the resource collections + * 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 + * + * @param the generic type + * @param path the relative path of the resource collections * @param objectClass the resource object class * @return the resources * @throws SmartsheetException if an error occurred during the operation @@ -470,12 +478,13 @@ protected List listResources(String path, Class objectClass) throws Sm /** * List resources Wrapper (supports paging info) using Smartsheet REST API. - * @throws IllegalArgumentException : if any argument is null, or path is empty string - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * + * @throws IllegalArgumentException : if any argument is null, or path is empty string + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ protected PagedResult listResourcesWithWrapper(String path, Class objectClass) throws SmartsheetException { Util.throwIfNull(path, objectClass); @@ -504,18 +513,18 @@ protected PagedResult listResourcesWithWrapper(String path, Class obje /** * Delete a resource from Smartsheet REST API. - * + *

* 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) - * 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 - * - * @param the generic type - * @param path the relative path of the resource + * 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) + * 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 + * + * @param the generic type + * @param path the relative path of the resource * @param objectClass the resource object class * @throws SmartsheetException the smartsheet exception */ @@ -543,18 +552,18 @@ protected void deleteResource(String path, Class objectClass) throws Smar /** * Delete resources and return a list from Smartsheet REST API. - * + *

* 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) - * 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 - * - * @param the generic type - * @param path the relative path of the resource + * 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) + * 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 + * + * @param the generic type + * @param path the relative path of the resource * @param objectClass the resource object class * @return List of ids deleted * @throws SmartsheetException the smartsheet exception @@ -584,24 +593,24 @@ protected List deleteListResources(String path, Class objectClass) thr /** * Post an object to Smartsheet REST API and receive a list of objects from response. - * + *

* Parameters: - path : the relative path of the resource collections - objectToPost : the object to post - * objectClassToReceive : the resource object class to receive - * + *

* Returns: the object list - * + *

* 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 - * - * @param the generic type - * @param the generic type - * @param path the path - * @param objectToPost the object to post + * 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 + * + * @param the generic type + * @param the generic type + * @param path the path + * @param objectToPost the object to post * @param objectClassToReceive the object class to receive * @return the list * @throws SmartsheetException the smartsheet exception @@ -640,20 +649,20 @@ protected List postAndReceiveList(String path, T objectToPost, Class * Parameters: - path : the relative path of the resource collections - objectToPost : the object to post - - * + *

* Returns: the object - * + *

* 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 - * - * @param path the path + * 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 + * + * @param path the path * @param objectToPost the object to post * @return the result object * @throws SmartsheetException the smartsheet exception @@ -692,18 +701,19 @@ protected CopyOrMoveRowResult postAndReceiveRowObject(String path, CopyOrMoveRow /** * Put an object to Smartsheet REST API and receive a list of objects from response. - * @param the generic type - * @param the generic type - * @param path the relative path of the resource collections - * @param objectToPut the object to put + * + * @param the generic type + * @param the generic type + * @param path the relative path of the resource collections + * @param objectToPut the object to put * @param objectClassToReceive the resource object class to receive * @return the object list - * @throws IllegalArgumentException : if any argument is null, or path is empty string - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null, or path is empty string + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ protected List putAndReceiveList(String path, T objectToPut, Class objectClassToReceive) throws SmartsheetException { @@ -740,6 +750,7 @@ protected List putAndReceiveList(String path, T objectToPut, Class /** * Create an HttpRequest. + * * @param uri the URI * @param method the HttpMethod * @return the http request @@ -802,9 +813,9 @@ public Attachment attachFile(String url, InputStream inputStream, String content /** * Create a multipart upload request. * - * @param url the url - * @param t the object to create - * @param partName the name of the part + * @param url the url + * @param t the object to create + * @param partName the name of the part * @param inputstream the file inputstream * @param contentType the type of the file to be attached * @return the http request @@ -846,8 +857,9 @@ public Attachment attachFile(String url, T t, String partName, InputStream i /** * Handles an error HttpResponse (non-200) returned by Smartsheet REST API. + * * @param response the HttpResponse - * @throws SmartsheetException the smartsheet exception + * @throws SmartsheetException the smartsheet exception * @throws SmartsheetRestException : the exception corresponding to the error */ protected void handleError(HttpResponse response) throws SmartsheetException { @@ -890,15 +902,16 @@ public SmartsheetImpl getSmartsheet() { /** * Get a sheet as a file. - * @param path the path - * @param fileType the output file type + * + * @param path the path + * @param fileType the output file type * @param outputStream the OutputStream to which the file will be written - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public void getResourceAsFile(String path, String fileType, OutputStream outputStream) throws SmartsheetException { @@ -936,10 +949,11 @@ public void getResourceAsFile(String path, String fileType, OutputStream outputS * * @throws IOException if there is trouble reading or writing to the streams. */ + /** * Copy stream. * - * @param input the input + * @param input the input * @param output the output * @throws IOException Signals that an I/O exception has occurred. * @deprecated replace with StreamUtil.copyContentIntoOutputStream() diff --git a/src/main/java/com/smartsheet/api/internal/AssociatedAttachmentResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/AssociatedAttachmentResourcesImpl.java index 53508d2f..8f7e5c5d 100644 --- a/src/main/java/com/smartsheet/api/internal/AssociatedAttachmentResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/AssociatedAttachmentResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/smartsheet/api/internal/AssociatedDiscussionResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/AssociatedDiscussionResourcesImpl.java index 339064d3..948f67bc 100644 --- a/src/main/java/com/smartsheet/api/internal/AssociatedDiscussionResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/AssociatedDiscussionResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/smartsheet/api/internal/AttachmentResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/AttachmentResourcesImpl.java index b1b796ec..a4f03a76 100644 --- a/src/main/java/com/smartsheet/api/internal/AttachmentResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/AttachmentResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ * This is the implementation of the AttachmentResources. *

* Thread Safety: This class is thread safe because it is immutable and its base class is thread safe. + * * @deprecated As of release 2.0. Please use {@link AttachmentVersioningResources} instead */ @Deprecated(since = "2.0.0", forRemoval = true) diff --git a/src/main/java/com/smartsheet/api/internal/AttachmentVersioningResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/AttachmentVersioningResourcesImpl.java index fcfdd702..1d1afad8 100644 --- a/src/main/java/com/smartsheet/api/internal/AttachmentVersioningResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/AttachmentVersioningResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ public class AttachmentVersioningResourcesImpl extends AbstractResources impleme * Constructor. *

* Exceptions: - * IllegalArgumentException : if any argument is null or empty string + * IllegalArgumentException : if any argument is null or empty string * * @param smartsheet the smartsheet */ @@ -56,14 +56,14 @@ public AttachmentVersioningResourcesImpl(SmartsheetImpl smartsheet) { *

* It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/attachments/{attachmentId}/versions * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param attachentId the attachment id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public void deleteAllVersions(long sheetId, long attachentId) throws SmartsheetException { // Note: "attachentId" has a typo in it here, but it'd be a breaking change to rename it since this is public @@ -75,17 +75,17 @@ public void deleteAllVersions(long sheetId, long attachentId) throws SmartsheetE *

* It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/attachments/{attachmentId}/versions * - * @param sheetId the id + * @param sheetId the id * @param attachmentId the attachment id - * @param parameters the pagination paramaters + * @param parameters the pagination paramaters * @return the attachment (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public PagedResult listAllVersions( long sheetId, @@ -102,21 +102,21 @@ public PagedResult listAllVersions( /** * Attach a new version of an attachment. - * + *

* It mirrors to the following Smartsheet REST API method: POST /attachment/{id}/versions * - * @param sheetId the id of the sheet + * @param sheetId the id of the sheet * @param attachmentId the id of the attachment to upload a new version. - * @param file the file to attach - * @param contentType the content type of the file + * @param file the file to attach + * @param contentType the content type of the file * @return the created attachment - * @throws FileNotFoundException the file not found exception - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws FileNotFoundException the file not found exception + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Attachment attachNewVersion( long sheetId, @@ -135,19 +135,19 @@ public Attachment attachNewVersion( *

* It mirrors to the following Smartsheet REST API method: POST /attachment/{id}/versions * - * @param sheetId the id of the sheet - * @param attachmentId the id of the object - * @param inputStream the {@link InputStream} of the file to attach - * @param contentType the content type of the file - * @param contentLength the size of the file in bytes. + * @param sheetId the id of the sheet + * @param attachmentId the id of the object + * @param inputStream the {@link InputStream} of the file to attach + * @param contentType the content type of the file + * @param contentLength the size of the file in bytes. * @param attachmentName the name of the file. * @return the created attachment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ private Attachment attachNewVersion( long sheetId, diff --git a/src/main/java/com/smartsheet/api/internal/ColumnResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/ColumnResourcesImpl.java index bbb849f0..7d67821a 100644 --- a/src/main/java/com/smartsheet/api/internal/ColumnResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/ColumnResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ * This is the implementation of the ColumnResources. *

* Thread Safety: This class is thread safe because it is immutable and its base class is thread safe. + * * @deprecated As of release 2.0. Please use {@link SheetCommentResources} instead */ @Deprecated(since = "2.0.0", forRemoval = true) diff --git a/src/main/java/com/smartsheet/api/internal/CommentAttachmentResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/CommentAttachmentResourcesImpl.java index 737e69f6..2efa9b6a 100644 --- a/src/main/java/com/smartsheet/api/internal/CommentAttachmentResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/CommentAttachmentResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ /** * This is the implementation of the CommentAttachmentResources. - * + *

* Thread Safety: This class is thread safe because it is immutable and its base class is thread safe. */ public class CommentAttachmentResourcesImpl extends AbstractResources implements com.smartsheet.api.CommentAttachmentResources { @@ -42,22 +42,22 @@ public CommentAttachmentResourcesImpl(SmartsheetImpl smartsheet) { /** * Attach a URL to a comment. - * + *

* The URL can be a normal URL (attachmentType "URL"), a Google Drive URL (attachmentType "GOOGLE_DRIVE") or a * Box.com URL (attachmentType "BOX_COM"). - * + *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/comments/{commentId}/attachments * - * @param sheetId the sheet id - * @param commentId the comment id + * @param sheetId the sheet id + * @param commentId the comment id * @param attachment the attachment object * @return the created attachment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Attachment attachUrl(long sheetId, long commentId, Attachment attachment) throws SmartsheetException { return this.createResource("sheets/" + sheetId + "/comments/" + commentId + "/attachments", Attachment.class, attachment); @@ -65,21 +65,21 @@ public Attachment attachUrl(long sheetId, long commentId, Attachment attachment) /** * Attach a file to a comment with simple upload. - * + *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/comments/{commentId}/attachments * - * @param sheetId the id of the sheet - * @param commentId the id of the comment - * @param file the file to attach + * @param sheetId the id of the sheet + * @param commentId the id of the comment + * @param file the file to attach * @param contentType the content type of the file * @return the created attachment - * @throws FileNotFoundException the file not found exception - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws FileNotFoundException the file not found exception + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Attachment attachFile(long sheetId, long commentId, File file, String contentType) throws FileNotFoundException, SmartsheetException { @@ -92,11 +92,11 @@ public Attachment attachFile(long sheetId, long commentId, File file, String con /** * Attach file for simple upload. * - * @param sheetId the sheet id - * @param commentId the comment id - * @param inputStream the attachment data inputStream - * @param contentType the content type - * @param contentLength the content length + * @param sheetId the sheet id + * @param commentId the comment id + * @param inputStream the attachment data inputStream + * @param contentType the content type + * @param contentLength the content length * @param attachmentName the name of the attachment * @return the attachment * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/internal/CommentResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/CommentResourcesImpl.java index 8bc3eb27..ecf835db 100644 --- a/src/main/java/com/smartsheet/api/internal/CommentResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/CommentResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/smartsheet/api/internal/ContactResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/ContactResourcesImpl.java index a2ada220..c28b0a8f 100644 --- a/src/main/java/com/smartsheet/api/internal/ContactResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/ContactResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ public class ContactResourcesImpl extends AbstractResources implements ContactRe /** * Constructor - * + *

* Exceptions: - IllegalArgumentException : if any argument is null * * @param smartsheet the smartsheet diff --git a/src/main/java/com/smartsheet/api/internal/DiscussionAttachmentResources.java b/src/main/java/com/smartsheet/api/internal/DiscussionAttachmentResources.java index 491a5fdf..75d15baf 100644 --- a/src/main/java/com/smartsheet/api/internal/DiscussionAttachmentResources.java +++ b/src/main/java/com/smartsheet/api/internal/DiscussionAttachmentResources.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,18 +46,18 @@ public DiscussionAttachmentResources(SmartsheetImpl smartsheet) { * Attach a file to the object. *

* It mirrors to the following Smartsheet REST API method: - * POST /sheet/{id}/attachments - * POST /row/{id}/attachments - * POST /comment/{id}/attachments + * POST /sheet/{id}/attachments + * POST /row/{id}/attachments + * POST /comment/{id}/attachments *

* Returns: the created attachment *

* Exceptions: - * UnsupportedOperationException : this exception is always thrown since this method is not supported by - * discussion resources. + * UnsupportedOperationException : this exception is always thrown since this method is not supported by + * discussion resources. * - * @param objectId the object id - * @param file the file to attach + * @param objectId the object id + * @param file the file to attach * @param contentType the content type of the file * @return the attachment */ diff --git a/src/main/java/com/smartsheet/api/internal/DiscussionAttachmentResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/DiscussionAttachmentResourcesImpl.java index 386bc691..5f7a7193 100644 --- a/src/main/java/com/smartsheet/api/internal/DiscussionAttachmentResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/DiscussionAttachmentResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,18 +46,18 @@ public DiscussionAttachmentResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/discussions/{discussionId}/attachments *

* 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 + * 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 * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param discussionId the discussion id - * @param parameters the pagination parameters + * @param parameters the pagination parameters * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ public PagedResult getAttachments( diff --git a/src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java index 10c3dd3d..37657c18 100644 --- a/src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,16 +54,17 @@ public DiscussionCommentResourcesImpl(SmartsheetImpl smartsheet) { *

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

- * @param sheetId the sheet id + * + * @param sheetId the sheet id * @param discussionId the discussion id - * @param comment the comment to add + * @param comment the comment to add * @return the created comment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Comment addComment(long sheetId, long discussionId, Comment comment) throws SmartsheetException { return this.createResource(SHEETS_PATH + sheetId + "/discussions/" + discussionId + "/comments", Comment.class, comment); @@ -71,22 +72,22 @@ public Comment addComment(long sheetId, long discussionId, Comment comment) thro /** * Add a comment to a discussion with an attachment. - * + *

* It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param discussionId the dicussion id - * @param comment the comment to add - * @param file the file to be attached - * @param contentType the type of file + * @param comment the comment to add + * @param file the file to be attached + * @param contentType the type of file * @return the created comment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation - * @throws IOException is there is any error with file + * @throws SmartsheetException if there is any other error during the operation + * @throws IOException is there is any error with file */ public Comment addCommentWithAttachment( long sheetId, @@ -113,18 +114,18 @@ private Comment addCommentWithAttachment( /** * Update the specified comment - * + *

* It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/comments/{commentId} - + * * @param sheetId the sheet id * @param comment the new comment object * @return the updated comment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Comment updateComment(long sheetId, Comment comment) throws SmartsheetException { return this.updateResource(SHEETS_PATH + sheetId + "/comments/" + comment.getId(), Comment.class, comment); diff --git a/src/main/java/com/smartsheet/api/internal/DiscussionResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/DiscussionResourcesImpl.java index f5828ef2..a8e73438 100644 --- a/src/main/java/com/smartsheet/api/internal/DiscussionResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/DiscussionResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,14 +59,14 @@ public DiscussionResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments *

* 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 + * 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 * - * @param id the discussion ID + * @param id the discussion ID * @param comment the comment to add, limited to the following required attributes: text * @return the created comment * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/internal/EventResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/EventResourcesImpl.java index 48eb39cc..22c5112e 100644 --- a/src/main/java/com/smartsheet/api/internal/EventResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/EventResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,22 +56,22 @@ public EventResourcesImpl(SmartsheetImpl smartsheet) { * *

It mirrors to the following Smartsheet REST API method: GET /events

* - * @param since Starting time for events to return. You must pass in a value for either since or - * streamPosition and never both. + * @param since Starting time for events to return. You must pass in a value for either since or + * streamPosition and never both. * @param streamPosition Indicates next set of events to return. Use value of nextStreamPosition returned * from the previous call. You must pass in a value for either since or streamPosition * and never both. - * @param maxCount Maximum number of events to return as response to this call. Must be between - * 1 through 10,000 (inclusive). - * @param numericDates If true, dates are accepted and returned in Unix epoch time (milliseconds since midnight - * on January 1, 1970 in UTC time). Default is false, which means ISO-8601 format + * @param maxCount Maximum number of events to return as response to this call. Must be between + * 1 through 10,000 (inclusive). + * @param numericDates If true, dates are accepted and returned in Unix epoch time (milliseconds since midnight + * on January 1, 1970 in UTC time). Default is false, which means ISO-8601 format * @return A list of all events (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public EventResult listEvents(Object since, String streamPosition, Integer maxCount, Boolean numericDates) throws SmartsheetException { diff --git a/src/main/java/com/smartsheet/api/internal/FavoriteResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/FavoriteResourcesImpl.java index 3fa05a83..1e3c793f 100644 --- a/src/main/java/com/smartsheet/api/internal/FavoriteResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/FavoriteResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,16 +53,16 @@ public FavoriteResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: POST /favorites *

* 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) - * 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 + * 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) + * 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 * * @param favorites the list of favorites object limited to the following attributes: * - * objectId * type + * objectId * type * @return a single Favorite object or an array of Favorite objects * @throws SmartsheetException the smartsheet exception */ @@ -76,13 +76,13 @@ public List addFavorites(List favorites) throws SmartsheetEx * It mirrors to the following Smartsheet REST API method: GET /favorites *

* 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) - * 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 + * 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) + * 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 * * @param parameters pagination parameters * @return a single Favorite object or an array of Favorite objects @@ -104,16 +104,16 @@ public PagedResult listFavorites(PaginationParameters parameters) thro * It mirrors to the following Smartsheet REST API method: DELETE /favorites *

* 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) - * 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 + * 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) + * 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 * * @param favoriteType the favorite type - * @param objectIds a single Favorite object or an array of Favorite objects + * @param objectIds a single Favorite object or an array of Favorite objects * @throws SmartsheetException the smartsheet exception */ public void removeFavorites(FavoriteType favoriteType, Set objectIds) throws SmartsheetException { diff --git a/src/main/java/com/smartsheet/api/internal/FolderResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/FolderResourcesImpl.java index 839365a5..3c9af3c8 100644 --- a/src/main/java/com/smartsheet/api/internal/FolderResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/FolderResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,17 +59,17 @@ public FolderResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /folder/{id} *

* 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 + * 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 * * @param folderId the folder id * @param includes the include parameters * @return the folder (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null) + * rather than returning null) * @throws SmartsheetException the smartsheet exception */ public Folder getFolder(long folderId, EnumSet includes) throws SmartsheetException { @@ -87,17 +87,17 @@ public Folder getFolder(long folderId, EnumSet includes) throws * It mirrors to the following Smartsheet REST API method: PUT /folder/{id} *

* Exceptions: - * IllegalArgumentException : if folder 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 + * IllegalArgumentException : if folder 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 * * @param folder the folder to update * @return the updated folder (note that if there is no such folder, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ public Folder updateFolder(Folder folder) throws SmartsheetException { @@ -111,12 +111,12 @@ public Folder updateFolder(Folder folder) throws SmartsheetException { * It mirrors to the following Smartsheet REST API method: DELETE /folder{id} *

* 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 + * 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 * * @param folderId the folder id * @throws SmartsheetException the smartsheet exception @@ -134,15 +134,15 @@ public void deleteFolder(long folderId) throws SmartsheetException { * Parameters: - parentFolderId : the parent folder ID *

* 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 + * 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 * * @param parentFolderId the parent folder id - * @param parameters the parameters for pagination + * @param parameters the parameters for pagination * @return the child folders (note that empty list will be returned if no child folder found) * @throws SmartsheetException the smartsheet exception */ @@ -162,15 +162,15 @@ public PagedResult listFolders(long parentFolderId, PaginationParameters * It mirrors to the following Smartsheet REST API method: POST /folder/{id}/folders *

* Exceptions: - * IllegalArgumentException : if folder 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 + * IllegalArgumentException : if folder 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 * * @param parentFolderId the parent folder id - * @param folder the folder to create + * @param folder the folder to create * @return the folder * @throws SmartsheetException the smartsheet exception */ @@ -185,17 +185,17 @@ public Folder createFolder(long parentFolderId, Folder folder) throws Smartsheet * It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy *

* Exceptions: - * IllegalArgumentException : if folder 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 + * IllegalArgumentException : if folder 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 * - * @param folderId the folder id + * @param folderId the folder id * @param containerDestination describes the destination container - * @param includes optional parameters to include - * @param skipRemap optional parameters to exclude + * @param includes optional parameters to include + * @param skipRemap optional parameters to exclude * @return the folder * @throws SmartsheetException the smartsheet exception */ @@ -214,18 +214,18 @@ public Folder copyFolder( * It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy *

* Exceptions: - * IllegalArgumentException : if folder 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 + * IllegalArgumentException : if folder 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 * - * @param folderId the folder id + * @param folderId the folder id * @param containerDestination describes the destination container - * @param includes optional parameters to include - * @param skipRemap optional parameters to NOT re-map in the new folder - * @param excludes optional parameters to exclude + * @param includes optional parameters to include + * @param skipRemap optional parameters to NOT re-map in the new folder + * @param excludes optional parameters to exclude * @return the folder * @throws SmartsheetException the smartsheet exception */ @@ -250,14 +250,14 @@ public Folder copyFolder(long folderId, ContainerDestination containerDestinatio * It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/move *

* Exceptions: - * IllegalArgumentException : if folder 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 + * IllegalArgumentException : if folder 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 * - * @param folderId the folder id + * @param folderId the folder id * @param containerDestination describes the destination container * @return the folder * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/internal/GroupMemberResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/GroupMemberResourcesImpl.java index ed49f05b..aa5ad40e 100644 --- a/src/main/java/com/smartsheet/api/internal/GroupMemberResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/GroupMemberResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,17 +26,17 @@ /** * This is the implementation of the ShareResources. - * + *

* Thread Safety: This class is thread safe because it is immutable and its base class is thread safe. */ public class GroupMemberResourcesImpl extends AbstractAssociatedResources implements GroupMemberResources { /** * Constructor. - * + *

* Exceptions: - IllegalArgumentException : if any argument is null or empty string * - * @param smartsheet the smartsheet + * @param smartsheet the smartsheet * @param masterResourceType the master resource type (e.g. "sheet", "workspace") */ public GroupMemberResourcesImpl(SmartsheetImpl smartsheet, String masterResourceType) { diff --git a/src/main/java/com/smartsheet/api/internal/GroupResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/GroupResourcesImpl.java index 3f931da1..211de69e 100644 --- a/src/main/java/com/smartsheet/api/internal/GroupResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/GroupResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/smartsheet/api/internal/HomeFolderResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/HomeFolderResourcesImpl.java index 190cfa19..ea54b810 100644 --- a/src/main/java/com/smartsheet/api/internal/HomeFolderResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/HomeFolderResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,12 +46,12 @@ public HomeFolderResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /home/folders *

* 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 + * 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 * * @param parameters the pagination parameters * @return the folders (note that empty list will be returned if there is none) @@ -73,12 +73,12 @@ public PagedResult listFolders(PaginationParameters parameters) throws S * It mirrors to the following Smartsheet REST API method: POST /home/folders *

* Exceptions: - * IllegalArgumentException : if folder 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 + * IllegalArgumentException : if folder 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 * * @param folder the folder to create * @return the created folder diff --git a/src/main/java/com/smartsheet/api/internal/HomeResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/HomeResourcesImpl.java index c8ba701f..662a8011 100644 --- a/src/main/java/com/smartsheet/api/internal/HomeResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/HomeResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,16 +60,16 @@ public HomeResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /home *

* 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 + * 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 * * @param includes used to specify the optional objects to include, currently TEMPLATES is supported. * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ public Home getHome(EnumSet includes) throws SmartsheetException { @@ -83,16 +83,16 @@ public Home getHome(EnumSet includes) throws SmartsheetExceptio * It mirrors to the following Smartsheet REST API method: GET /home *

* 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 + * 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 * * @param includes used to specify the optional objects to include, currently TEMPLATES is supported. * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ public Home getHome(EnumSet includes, EnumSet excludes) throws SmartsheetException { diff --git a/src/main/java/com/smartsheet/api/internal/ImageUrlResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/ImageUrlResourcesImpl.java index b002981b..9f1435e1 100644 --- a/src/main/java/com/smartsheet/api/internal/ImageUrlResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/ImageUrlResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ public class ImageUrlResourcesImpl extends AbstractResources implements ImageUrl /** * Constructor. - * + *

* Exceptions: - IllegalArgumentException : if any argument is null * * @param smartsheet the smartsheet @@ -57,13 +57,13 @@ public ImageUrlResourcesImpl(SmartsheetImpl smartsheet) { * * @param requestUrls array of requested Images and sizes. * @return the ImageUrlMap object (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public ImageUrlMap getImageUrls(List requestUrls) throws SmartsheetException { Util.throwIfNull(requestUrls); diff --git a/src/main/java/com/smartsheet/api/internal/LengthEnforcingInputStream.java b/src/main/java/com/smartsheet/api/internal/LengthEnforcingInputStream.java index 30978292..82882bb6 100644 --- a/src/main/java/com/smartsheet/api/internal/LengthEnforcingInputStream.java +++ b/src/main/java/com/smartsheet/api/internal/LengthEnforcingInputStream.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ * Compare the given expected content length with the actual number of bytes read. * Throws an exception if more bytes are read than the expected length, or if the * stream ends before reading the expected number of bytes. - * + *

* If reset is called the totalBytesRead property is reset to 0. */ public class LengthEnforcingInputStream extends FilterInputStream { diff --git a/src/main/java/com/smartsheet/api/internal/PassthroughResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/PassthroughResourcesImpl.java index c348766c..841bcb22 100644 --- a/src/main/java/com/smartsheet/api/internal/PassthroughResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/PassthroughResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,15 +51,15 @@ public PassthroughResourcesImpl(SmartsheetImpl smartsheet) { /** * Issue an HTTP GET request. * - * @param endpoint the API endpoint + * @param endpoint the API endpoint * @param parameters optional list of resource parameters * @return a JSON response string - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public String getRequest(String endpoint, Map parameters) throws SmartsheetException { return passthroughRequest(HttpMethod.GET, endpoint, null, parameters); @@ -68,16 +68,16 @@ public String getRequest(String endpoint, Map parameters) throws /** * Issue an HTTP POST request. * - * @param endpoint the API endpoint - * @param payload a JSON payload string + * @param endpoint the API endpoint + * @param payload a JSON payload string * @param parameters optional list of resource parameters * @return a JSON response string - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public String postRequest(String endpoint, String payload, Map parameters) throws SmartsheetException { Util.throwIfNull(payload); @@ -87,16 +87,16 @@ public String postRequest(String endpoint, String payload, Map p /** * Issue an HTTP PUT request. * - * @param endpoint the API endpoint - * @param payload a JSON payload string + * @param endpoint the API endpoint + * @param payload a JSON payload string * @param parameters optional list of resource parameters * @return a JSON response string - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public String putRequest(String endpoint, String payload, Map parameters) throws SmartsheetException { Util.throwIfNull(payload); @@ -108,12 +108,12 @@ public String putRequest(String endpoint, String payload, Map pa * * @param endpoint the API endpoint * @return a JSON response string - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public String deleteRequest(String endpoint) throws SmartsheetException { return passthroughRequest(HttpMethod.DELETE, endpoint, null, null); @@ -122,9 +122,9 @@ public String deleteRequest(String endpoint) throws SmartsheetException { /** * Passthrough request * - * @param method HTTP method - * @param endpoint the API endpoint (required) - * @param payload optional JSON payload + * @param method HTTP method + * @param endpoint the API endpoint (required) + * @param payload optional JSON payload * @param parameters optional list of resource parameters * @return the result string */ diff --git a/src/main/java/com/smartsheet/api/internal/ReportResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/ReportResourcesImpl.java index d2d47ce0..1281a4f4 100644 --- a/src/main/java/com/smartsheet/api/internal/ReportResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/ReportResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,19 +75,19 @@ public ReportResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /reports/{id} *

* 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 + * 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 * * @param reportId the folder id * @param includes the optional objects to include in response * @param pageSize Number of rows per page - * @param page page number to return - * @return the report (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null) + * @param page page number to return + * @return the report (note that if there is no such resource, this method will throw ResourceNotFoundException + * rather than returning null) * @throws SmartsheetException the smartsheet exception */ public Report getReport(long reportId, EnumSet includes, Integer pageSize, Integer page) throws SmartsheetException { @@ -100,20 +100,20 @@ public Report getReport(long reportId, EnumSet includes, Intege * It mirrors to the following Smartsheet REST API method: GET /reports/{id} *

* 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 + * 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 * * @param reportId the folder id * @param includes the optional objects to include in response * @param pageSize Number of rows per page - * @param page page number to return - * @param level compatibility level - * @return the report (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null) + * @param page page number to return + * @param level compatibility level + * @return the report (note that if there is no such resource, this method will throw ResourceNotFoundException + * rather than returning null) * @throws SmartsheetException the smartsheet exception */ public Report getReport( @@ -149,15 +149,15 @@ public Report getReport( * It mirrors to the following Smartsheet REST API method: POST /reports/{id}/emails *

* 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 + * 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 * * @param reportId the report id - * @param email the recipient email + * @param email the recipient email * @throws SmartsheetException the smartsheet exception */ public void sendReport(long reportId, SheetEmail email) throws SmartsheetException { @@ -170,11 +170,11 @@ public void sendReport(long reportId, SheetEmail email) throws SmartsheetExcepti * It mirrors to the following Smartsheet REST API method: GET /reports *

* 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) - * - 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 + * - 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 * * @param pagination pagination parameters for paging result * @return all sheets (note that empty list will be returned if there is none) @@ -210,15 +210,15 @@ public PagedResult listReports(PaginationParameters pagination, Date mod * HTTP header *

* Exceptions: - * IllegalArgumentException : if outputStream 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 + * IllegalArgumentException : if outputStream 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 * - * @param id the id + * @param id the id * @param outputStream the OutputStream to which the Excel file will be written * @throws SmartsheetException the smartsheet exception */ @@ -233,15 +233,15 @@ public void getReportAsExcel(long id, OutputStream outputStream) throws Smartshe * HTTP header *

* Exceptions: - * IllegalArgumentException : if outputStream 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 + * IllegalArgumentException : if outputStream 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 * - * @param id the id + * @param id the id * @param outputStream the OutputStream to which the Excel file will be written * @throws SmartsheetException the smartsheet exception */ @@ -255,22 +255,22 @@ public void getReportAsCsv(long id, OutputStream outputStream) throws Smartsheet * It mirrors to the following Smartsheet REST API method: GET /reports/{id}/publish *

* 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 + * 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 * * @param id the ID of the report * @return the report publish status (note that if there is no such resource, this method will - * throw ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * throw ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public ReportPublish getPublishStatus(long id) throws SmartsheetException { return this.getResource(REPORTS_PATH + id + "/publish", ReportPublish.class); @@ -283,23 +283,23 @@ public ReportPublish getPublishStatus(long id) throws SmartsheetException { * It mirrors to the following Smartsheet REST API method: PUT /reports/{id}/publish *

* 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 + * - 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 * - * @param id the ID of the report + * @param id the ID of the report * @param reportPublish the ReportPublish object * @return the updated ReportPublish (note that if there is no such resource, this method will - * throw ResourceNotFoundException rather than returning null) - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * throw ResourceNotFoundException rather than returning null) + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public ReportPublish updatePublishStatus(long id, ReportPublish reportPublish) throws SmartsheetException { return this.updateResource(REPORTS_PATH + id + "/publish", ReportPublish.class, reportPublish); diff --git a/src/main/java/com/smartsheet/api/internal/RowAttachmentResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/RowAttachmentResourcesImpl.java index f95af9d9..390b9aab 100644 --- a/src/main/java/com/smartsheet/api/internal/RowAttachmentResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/RowAttachmentResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,16 +51,16 @@ public RowAttachmentResourcesImpl(SmartsheetImpl smartsheet) { *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/attachments * - * @param sheetId the sheet id - * @param rowId the row id + * @param sheetId the sheet id + * @param rowId the row id * @param attachment the attachment object * @return the created attachment - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Attachment attachUrl(long sheetId, long rowId, Attachment attachment) throws SmartsheetException { return this.createResource(createPath(sheetId, rowId), Attachment.class, attachment); @@ -75,18 +75,18 @@ public Attachment attachUrl(long sheetId, long rowId, Attachment attachment) thr * rather than returning null). *

* 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 + * 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 * - * @param sheetId the sheet id - * @param rowId the row id + * @param sheetId the sheet id + * @param rowId the row id * @param parameters the pagination parameters * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ public PagedResult getAttachments(long sheetId, long rowId, PaginationParameters parameters) throws SmartsheetException { @@ -102,18 +102,18 @@ public PagedResult getAttachments(long sheetId, long rowId, Paginati *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/attachments * - * @param sheetId the id of the sheet - * @param rowId the id of the comment - * @param file the file to attach + * @param sheetId the id of the sheet + * @param rowId the id of the comment + * @param file the file to attach * @param contentType the content type of the file * @return the created attachment - * @throws FileNotFoundException the file not found exception - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws FileNotFoundException the file not found exception + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Attachment attachFile(long sheetId, long rowId, File file, String contentType) throws FileNotFoundException, SmartsheetException { @@ -126,10 +126,10 @@ public Attachment attachFile(long sheetId, long rowId, File file, String content /** * Attach file for simple upload. * - * @param sheetId the sheet id - * @param rowId the row id - * @param contentType the content type - * @param contentLength the content length + * @param sheetId the sheet id + * @param rowId the row id + * @param contentType the content type + * @param contentLength the content length * @param attachmentName the name of the attachment * @return the attachment * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/internal/RowColumnResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/RowColumnResourcesImpl.java index cb03e942..cdfafb1e 100644 --- a/src/main/java/com/smartsheet/api/internal/RowColumnResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/RowColumnResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,19 +69,19 @@ public RowColumnResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/history *

* 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 + * 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 * - * @param rowId the row id - * @param columnId the column id - * @param sheetId the sheet ID + * @param rowId the row id + * @param columnId the column id + * @param sheetId the sheet ID * @param parameters the pagination parameters * @return the modification history (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ public PagedResult getCellHistory( @@ -99,21 +99,21 @@ public PagedResult getCellHistory( * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/history *

* 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 + * 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 * - * @param rowId the row id - * @param columnId the column id - * @param sheetId the sheet ID + * @param rowId the row id + * @param columnId the column id + * @param sheetId the sheet ID * @param pagination the pagination parameters - * @param includes cell history inclusion - * @param level compatibility level + * @param includes cell history inclusion + * @param level compatibility level * @return the modification history (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ public PagedResult getCellHistory(long sheetId, long rowId, long columnId, PaginationParameters pagination, @@ -140,19 +140,19 @@ public PagedResult getCellHistory(long sheetId, long rowId, long co * It mirrors the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/cellimages *

* 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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row id - * @param columnId the column id - * @param file the file path + * @param sheetId the sheet ID + * @param rowId the row id + * @param columnId the column id + * @param file the file path * @param contentType MIME type of the image - * @throws SmartsheetException the smartsheet exception + * @throws SmartsheetException the smartsheet exception * @throws FileNotFoundException image file not found */ public void addImageToCell( @@ -174,21 +174,21 @@ public void addImageToCell( * It mirrors the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/cellimages *

* 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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row id - * @param columnId the column id - * @param file the file path - * @param contentType MIME type of the image + * @param sheetId the sheet ID + * @param rowId the row id + * @param columnId the column id + * @param file the file path + * @param contentType MIME type of the image * @param overrideValidation override column type validation if true - * @param altText alternate description for the image - * @throws SmartsheetException the smartsheet exception + * @param altText alternate description for the image + * @throws SmartsheetException the smartsheet exception * @throws FileNotFoundException image file not found */ public void addImageToCell( @@ -212,21 +212,21 @@ public void addImageToCell( * It mirrors the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/cellimages *

* 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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row id - * @param columnId the column id - * @param file the File object - * @param contentType MIME type + * @param sheetId the sheet ID + * @param rowId the row id + * @param columnId the column id + * @param file the File object + * @param contentType MIME type * @param overrideValidation override column type validation if true - * @param altText alternate description for the image - * @throws SmartsheetException the smartsheet exception + * @param altText alternate description for the image + * @throws SmartsheetException the smartsheet exception * @throws FileNotFoundException image file not found */ public void addImageToCell(long sheetId, long rowId, long columnId, File file, String contentType, @@ -242,21 +242,21 @@ public void addImageToCell(long sheetId, long rowId, long columnId, File file, S * It mirrors the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/cellimages *

* 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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row id - * @param columnId the column id - * @param inputStream the input stream of the contents - * @param contentType MIME type - * @param contentLength length of the input stream + * @param sheetId the sheet ID + * @param rowId the row id + * @param columnId the column id + * @param inputStream the input stream of the contents + * @param contentType MIME type + * @param contentLength length of the input stream * @param overrideValidation override column type validation if true - * @param altText alternate description for the image + * @param altText alternate description for the image * @throws SmartsheetException the smartsheet exception */ public void addImageToCell(long sheetId, long rowId, long columnId, InputStream inputStream, String contentType, diff --git a/src/main/java/com/smartsheet/api/internal/RowDiscussionResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/RowDiscussionResourcesImpl.java index e11f49c0..ae94f9d4 100644 --- a/src/main/java/com/smartsheet/api/internal/RowDiscussionResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/RowDiscussionResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,15 +44,15 @@ public RowDiscussionResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: /sheets/{sheetId}/rows/{rowId}/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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row ID + * @param sheetId the sheet ID + * @param rowId the row ID * @param discussion the comment to add, limited to the following required attributes: text * @return the created comment * @throws SmartsheetException the smartsheet exception @@ -67,21 +67,21 @@ public Discussion createDiscussion(long sheetId, long rowId, Discussion discussi * It mirrors to the following Smartsheet REST API method: /sheets/{sheetId}/rows/{rowId}/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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row ID - * @param discussion the comment to add, limited to the following required attributes: text - * @param file the file to be attached + * @param sheetId the sheet ID + * @param rowId the row ID + * @param discussion the comment to add, limited to the following required attributes: text + * @param file the file to be attached * @param contentType the type of file * @return the created discussion * @throws SmartsheetException the smartsheet exception - * @throws IOException is there is an I/O exception + * @throws IOException is there is an I/O exception */ public Discussion createDiscussionWithAttachment( long sheetId, @@ -110,17 +110,17 @@ public Discussion createDiscussionWithAttachment( * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}/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 + * 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 * - * @param sheetId the sheet ID - * @param rowId the row ID + * @param sheetId the sheet ID + * @param rowId the row ID * @param pagination the pagination pagination - * @param includes the optional include parameters + * @param includes the optional include parameters * @return the row discussions * @throws SmartsheetException the smartsheet exception */ diff --git a/src/main/java/com/smartsheet/api/internal/SearchResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SearchResourcesImpl.java index f970144e..8049335f 100644 --- a/src/main/java/com/smartsheet/api/internal/SearchResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SearchResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,16 +61,16 @@ public SearchResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /search *

* Exceptions: - * IllegalArgumentException : if query is null/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 + * IllegalArgumentException : if query is null/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 * * @param query the query text * @return the search result (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ public SearchResult search(String query) throws SmartsheetException { @@ -82,20 +82,20 @@ public SearchResult search(String query) throws SmartsheetException { *

* It mirrors to the following Smartsheet REST API method: GET /search * - * @param query the query text - * @param includes enum set of inclusions - * @param location when specified with a value of "personalWorkspace" limits response to only those - * items in the user's Workspace + * @param query the query text + * @param includes enum set of inclusions + * @param location when specified with a value of "personalWorkspace" limits response to only those + * items in the user's Workspace * @param modifiedSince only return items modified since this date - * @param scopes enum set of search filters + * @param scopes enum set of search filters * @return the search result (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public SearchResult search(String query, EnumSet includes, SearchLocation location, Date modifiedSince, EnumSet scopes) throws SmartsheetException { @@ -126,18 +126,18 @@ public SearchResult search(String query, EnumSet includes, Sear * It mirrors to the following Smartsheet REST API method: GET /search/sheet/{sheetId} *

* Exceptions: - * IllegalArgumentException : if query is null/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 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 + * IllegalArgumentException : if query is null/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 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 * * @param sheetId the sheet id - * @param query the query + * @param query the query * @return the search result (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ public SearchResult searchSheet(long sheetId, String query) throws SmartsheetException { diff --git a/src/main/java/com/smartsheet/api/internal/ServerInfoResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/ServerInfoResourcesImpl.java index 124e633b..d929a9c2 100644 --- a/src/main/java/com/smartsheet/api/internal/ServerInfoResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/ServerInfoResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,12 +43,12 @@ public ServerInfoResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /serverinfo * * @return the server information - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public ServerInfo getServerInfo() throws SmartsheetException { return this.getResource("serverinfo", ServerInfo.class); diff --git a/src/main/java/com/smartsheet/api/internal/ShareResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/ShareResourcesImpl.java index 2153edd1..1a806374 100644 --- a/src/main/java/com/smartsheet/api/internal/ShareResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/ShareResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,7 +45,7 @@ public class ShareResourcesImpl extends AbstractAssociatedResources implements S *

* Exceptions: - IllegalArgumentException : if any argument is null or empty string * - * @param smartsheet the smartsheet + * @param smartsheet the smartsheet * @param masterResourceType the master resource type (e.g. "sheet", "workspace") */ public ShareResourcesImpl(SmartsheetImpl smartsheet, String masterResourceType) { @@ -56,20 +56,20 @@ public ShareResourcesImpl(SmartsheetImpl smartsheet, String masterResourceType) * List shares of a given object. *

* It mirrors to the following Smartsheet REST API method: - * GET /workspace/{id}/shares - * GET /sheet/{id}/shares - * GET /sights/{id}/shares - * GET /reports/{id}/shares + * GET /workspace/{id}/shares + * GET /sheet/{id}/shares + * GET /sights/{id}/shares + * GET /reports/{id}/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 + * 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 * - * @param objectId the id of the object to share. + * @param objectId the id of the object to share. * @param pagination the pagination parameters * @return the shares (note that empty list will be returned if there is none) * @throws SmartsheetException the smartsheet exception @@ -104,23 +104,23 @@ public PagedResult listShares( * Get a Share. *

* It mirrors to the following Smartsheet REST API method: - * GET /workspaces/{workspaceId}/shares/{shareId} - * GET /sheets/{sheetId}/shares/{shareId} - * GET /sights/{sightId}/shares - * GET /reports/{reportId}/shares + * GET /workspaces/{workspaceId}/shares/{shareId} + * GET /sheets/{sheetId}/shares/{shareId} + * GET /sights/{sightId}/shares + * 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 + * 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 * * @param objectId the ID of the object to share - * @param shareId the ID of the share + * @param shareId the ID of the share * @return the share (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ public Share getShare(long objectId, String shareId) throws SmartsheetException { @@ -131,22 +131,22 @@ public Share getShare(long objectId, String shareId) throws SmartsheetException * 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 /sights/{id}/shares - * POST /reports/{reportId}/shares + * POST /workspaces/{id}/shares + * POST /sheets/{id}/shares + * POST /sights/{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 + * 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 * - * @param objectId the ID of the object to share - * @param shares list of share objects + * @param objectId the ID of the object to share + * @param shares list of share objects * @param sendEmail whether to send email * @return the created shares * @throws SmartsheetException the smartsheet exception @@ -169,15 +169,15 @@ public List shareTo(long objectId, List shares, Boolean sendEmail) *

PUT /reports/{reportId}/shares/{shareId}

* * @param objectId the ID of the object to share - * @param share the share + * @param share the share * @return the updated share (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Share updateShare(long objectId, Share share) throws SmartsheetException { Util.throwIfNull(share); @@ -188,21 +188,21 @@ public Share updateShare(long objectId, Share share) throws SmartsheetException * Delete a share. *

* It mirrors to the following Smartsheet REST API method: - * DELETE /workspaces/{workspaceId}/shares/{shareId} - * DELETE /sheets/{sheetId}/shares/{shareId} - * DELETE /sights/{sheetId}/shares/{shareId} - * DELETE /reports/{reportId}/shares/{shareId} + * DELETE /workspaces/{workspaceId}/shares/{shareId} + * DELETE /sheets/{sheetId}/shares/{shareId} + * DELETE /sights/{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 + * 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 * * @param objectId the ID of the object to share - * @param shareId the ID of the share to delete + * @param shareId the ID of the share to delete * @throws SmartsheetException the smartsheet exception */ public void deleteShare(long objectId, String shareId) throws SmartsheetException { diff --git a/src/main/java/com/smartsheet/api/internal/SheetAttachmentResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetAttachmentResourcesImpl.java index a10dc27f..a7992e82 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetAttachmentResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetAttachmentResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,15 +61,15 @@ public SheetAttachmentResourcesImpl(SmartsheetImpl smartsheet) { *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/attachments * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param attachment the attachment object * @return the attachment object - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Attachment attachUrl(long sheetId, Attachment attachment) throws SmartsheetException { return this.createResource(SHEETS_PATH + sheetId + ATTACHMENTS_PATH, Attachment.class, attachment); @@ -81,14 +81,14 @@ public Attachment attachUrl(long sheetId, Attachment attachment) throws Smartshe * It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/attachments/{attachmentId} *

* 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 + * 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 * - * @param sheetId the ID of the sheet + * @param sheetId the ID of the sheet * @param attachmentId the ID of the attachment * @throws SmartsheetException the smartsheet exception */ @@ -105,17 +105,17 @@ public void deleteAttachment(long sheetId, long attachmentId) throws SmartsheetE * rather than returning null). *

* 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 + * 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 * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param attachmentId the attachment id * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). + * rather than returning null). * @throws SmartsheetException the smartsheet exception */ public Attachment getAttachment(long sheetId, long attachmentId) throws SmartsheetException { @@ -128,14 +128,14 @@ public Attachment getAttachment(long sheetId, long attachmentId) throws Smartshe * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/attachments *

* 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 + * 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 * - * @param sheetId the ID of the sheet to which the attachments are associated + * @param sheetId the ID of the sheet to which the attachments are associated * @param parameters the pagination parameters * @return the attachments (note that empty list will be returned if there is none) * @throws SmartsheetException the smartsheet exception @@ -154,17 +154,17 @@ public PagedResult listAttachments(long sheetId, PaginationParameter *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/attachments * - * @param sheetId the id of the sheet - * @param file the file to attach + * @param sheetId the id of the sheet + * @param file the file to attach * @param contentType the content type of the file * @return the created attachment - * @throws FileNotFoundException the file not found exception - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws FileNotFoundException the file not found exception + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Attachment attachFile(long sheetId, File file, String contentType) throws FileNotFoundException, SmartsheetException { @@ -177,10 +177,10 @@ public Attachment attachFile(long sheetId, File file, String contentType) throws /** * Attach file for simple upload. * - * @param sheetId the sheet id - * @param inputStream attachment data inputStream - * @param contentType the content type - * @param contentLength the content length + * @param sheetId the sheet id + * @param inputStream attachment data inputStream + * @param contentType the content type + * @param contentLength the content length * @param attachmentName the name of the attachment * @return the attachment * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/internal/SheetAutomationRuleResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetAutomationRuleResourcesImpl.java index 23d9421e..f3b4563d 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetAutomationRuleResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetAutomationRuleResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,14 +50,14 @@ public SheetAutomationRuleResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/automationrules *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param pagination the pagination pagination * @return all the automation rules * @throws SmartsheetException the smartsheet exception @@ -80,14 +80,14 @@ public PagedResult listAutomationRules(long sheetId, PaginationP * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/automationrules/{automationRuleId} *

* 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 + * 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 * - * @param sheetId the sheetId + * @param sheetId the sheetId * @param automationRuleId the automation rule ID * @return the automation rule * @throws SmartsheetException the smartsheet exception @@ -102,18 +102,18 @@ public AutomationRule getAutomationRule(long sheetId, long automationRuleId) thr * It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/automationrules/{automationRuleId} *

* 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) - * 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 + * 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) + * 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 * - * @param sheetId the sheetId + * @param sheetId the sheetId * @param automationRule the automation rule to update * @return the updated automation rule (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ public AutomationRule updateAutomationRule(long sheetId, AutomationRule automationRule) throws SmartsheetException { @@ -128,14 +128,14 @@ public AutomationRule updateAutomationRule(long sheetId, AutomationRule automati * It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/automationrules/{automationRuleId} *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param automationRuleId the automation rule ID * @throws SmartsheetException the smartsheet exception */ diff --git a/src/main/java/com/smartsheet/api/internal/SheetColumnResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetColumnResourcesImpl.java index ff554634..703c79c1 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetColumnResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetColumnResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,15 +61,15 @@ public SheetColumnResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/columns *

* 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 + * 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 * - * @param sheetId the sheet id - * @param includes list of includes + * @param sheetId the sheet id + * @param includes list of includes * @param pagination the object containing the pagination parameters * @return the columns (note that empty list will be returned if there is none) * @throws SmartsheetException the smartsheet exception @@ -88,17 +88,17 @@ public PagedResult listColumns( * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/columns *

* 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 + * 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 * - * @param sheetId the sheet id - * @param includes list of includes + * @param sheetId the sheet id + * @param includes list of includes * @param pagination the object containing the pagination parameters - * @param level compatibility level + * @param level compatibility level * @return the columns (note that empty list will be returned if there is none) * @throws SmartsheetException the smartsheet exception */ @@ -128,18 +128,18 @@ public PagedResult listColumns( * It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/columns *

* 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) - * 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 + * 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) + * 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 * * @param sheetId the sheet id * @param columns the list of columns object limited to the following attributes: * - * title * type * symbol (optional) * options (optional) - array of options * index (zero-based) * systemColumnType - * (optional) * autoNumberFormat (optional) + * title * type * symbol (optional) * options (optional) - array of options * index (zero-based) * systemColumnType + * (optional) * autoNumberFormat (optional) * @return the list of created columns * @throws SmartsheetException the smartsheet exception */ @@ -152,15 +152,14 @@ public List addColumns(long sheetId, List columns) throws Smarts *

* It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/columns/{columnId} * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param columnId the column id - * - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public void deleteColumn(long sheetId, long columnId) throws SmartsheetException { this.deleteResource(SHEETS_PATH + sheetId + "/" + COLUMNS + "/" + columnId, Column.class); @@ -172,20 +171,20 @@ public void deleteColumn(long sheetId, long columnId) throws SmartsheetException * It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/columns/{columnId} *

* 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) - * 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 + * 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) + * 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 * * @param sheetId the sheetId - * @param column the column to update limited to the following attributes: index (column's new index in the sheet), - * title, sheetId, type, options (optional), symbol (optional), systemColumnType (optional), - * autoNumberFormat (optional) + * @param column the column to update limited to the following attributes: index (column's new index in the sheet), + * title, sheetId, type, options (optional), symbol (optional), systemColumnType (optional), + * autoNumberFormat (optional) * @return the updated sheet (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). + * ResourceNotFoundException rather than returning null). * @throws SmartsheetException the smartsheet exception */ public Column updateColumn(long sheetId, Column column) throws SmartsheetException { @@ -199,14 +198,14 @@ public Column updateColumn(long sheetId, Column column) throws SmartsheetExcepti * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/columns/{columnId} *

* 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 + * 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 * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param columnId the column id * @param includes list of includes * @return the column (note that empty list will be returned if there is none) diff --git a/src/main/java/com/smartsheet/api/internal/SheetCommentResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetCommentResourcesImpl.java index 9f54fcf8..28157496 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetCommentResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetCommentResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,17 +47,17 @@ public SheetCommentResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /comment/{id} *

* 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 + * 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 * - * @param sheetId the ID of the sheet + * @param sheetId the ID of the sheet * @param commentId the ID of the comment * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null) + * rather than returning null) * @throws SmartsheetException the smartsheet exception */ public Comment getComment(long sheetId, long commentId) throws SmartsheetException { @@ -70,14 +70,14 @@ public Comment getComment(long sheetId, long commentId) throws SmartsheetExcepti * It mirrors to the following Smartsheet REST API method: DELETE /comment{id} *

* 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 + * 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 * - * @param sheetId the ID of the sheet + * @param sheetId the ID of the sheet * @param commentId the ID of the comment * @throws SmartsheetException the smartsheet exception */ diff --git a/src/main/java/com/smartsheet/api/internal/SheetCrossSheetReferenceResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetCrossSheetReferenceResourcesImpl.java index a363fe7a..b5b473e8 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetCrossSheetReferenceResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetCrossSheetReferenceResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,16 +48,16 @@ public SheetCrossSheetReferenceResourcesImpl(SmartsheetImpl smartsheet) { *

Get all cross sheet references for this sheet

* *

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

- * + *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param pagination the pagination parameters * @return a list of cross sheet references * @throws SmartsheetException the smartsheet exception @@ -82,16 +82,16 @@ public PagedResult listCrossSheetReferences( * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param crossSheetReferenceId the cross sheet reference id * @return the cross sheet reference (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public CrossSheetReference getCrossSheetReference(long sheetId, long crossSheetReferenceId) throws SmartsheetException { return this.getResource(SHEETS_PATH + sheetId + "/crosssheetreferences/" + crossSheetReferenceId, CrossSheetReference.class); @@ -102,15 +102,15 @@ public CrossSheetReference getCrossSheetReference(long sheetId, long crossSheetR * *

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

* - * @param sheetId the sheet id + * @param sheetId the sheet id * @param crossSheetReference the cross sheet reference to create * @return the created cross sheet reference - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public CrossSheetReference createCrossSheetReference(long sheetId, CrossSheetReference crossSheetReference) throws SmartsheetException { return this.createResource(SHEETS_PATH + sheetId + "/crosssheetreferences", CrossSheetReference.class, crossSheetReference); diff --git a/src/main/java/com/smartsheet/api/internal/SheetDiscussionResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetDiscussionResourcesImpl.java index 938ea1c4..340026c8 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetDiscussionResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetDiscussionResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ public class SheetDiscussionResourcesImpl extends AbstractResources implements S * Constructor. *

* Exceptions: - * IllegalArgumentException : if any argument is null or empty string + * IllegalArgumentException : if any argument is null or empty string * * @param smartsheet the smartsheet */ @@ -65,15 +65,15 @@ public SheetDiscussionResourcesImpl(SmartsheetImpl smartsheet) { *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param discussion the discussion object * @return the created discussion - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Discussion createDiscussion(long sheetId, Discussion discussion) throws SmartsheetException { Util.throwIfNull(sheetId, discussion); @@ -86,18 +86,18 @@ public Discussion createDiscussion(long sheetId, Discussion discussion) throws S *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions * - * @param sheetId the sheet id - * @param discussion the discussion object - * @param file the file to attach + * @param sheetId the sheet id + * @param discussion the discussion object + * @param file the file to attach * @param contentType the type of file * @return the created discussion - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation - * @throws IOException is there is with file + * @throws SmartsheetException if there is any other error during the operation + * @throws IOException is there is with file */ public Discussion createDiscussionWithAttachment( long sheetId, @@ -139,14 +139,14 @@ private Discussion createDiscussionWithAttachment( * rather than returning null). *

* 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 + * 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 * - * @param sheetId the sheetId + * @param sheetId the sheetId * @param discussionId the discussionId * @return the discussion * @throws SmartsheetException the smartsheet exception @@ -161,14 +161,14 @@ public Discussion getDiscussion(long sheetId, long discussionId) throws Smartshe * 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param discussionId the discussion ID * @throws SmartsheetException the smartsheet exception */ @@ -182,16 +182,16 @@ public void deleteDiscussion(long sheetId, long discussionId) throws SmartsheetE * 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param pagination the pagination pagination - * @param includes the optional include parameters + * @param includes the optional include parameters * @return all the discussions * @throws SmartsheetException the smartsheet exception */ diff --git a/src/main/java/com/smartsheet/api/internal/SheetFilterResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetFilterResourcesImpl.java index e4645d1b..b9016132 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetFilterResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetFilterResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ public class SheetFilterResourcesImpl extends AbstractResources implements Sheet * Constructor. *

* Exceptions: - * IllegalArgumentException : if any argument is null or empty string + * IllegalArgumentException : if any argument is null or empty string * * @param smartsheet the smartsheet */ @@ -52,14 +52,14 @@ public SheetFilterResourcesImpl(SmartsheetImpl smartsheet) { * rather than returning null). *

* 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 + * 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 * - * @param sheetId the sheetId + * @param sheetId the sheetId * @param filterId the filter ID * @return the filter * @throws SmartsheetException the smartsheet exception @@ -74,14 +74,14 @@ public SheetFilter getFilter(long sheetId, long filterId) throws SmartsheetExcep * It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/filters/{filterId} *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param filterId the filter ID * @throws SmartsheetException the smartsheet exception */ @@ -95,14 +95,14 @@ public void deleteFilter(long sheetId, long filterId) throws SmartsheetException * It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/filters *

* 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 + * 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 * - * @param sheetId the sheet ID + * @param sheetId the sheet ID * @param pagination the pagination pagination * @return all the filters * @throws SmartsheetException the smartsheet exception diff --git a/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java index 5bbc0921..39a693a8 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,7 +80,9 @@ */ public class SheetResourcesImpl extends AbstractResources implements SheetResources { - /** The Constant BUFFER_SIZE. */ + /** + * The Constant BUFFER_SIZE. + */ private static final int BUFFER_SIZE = 4098; private static final String SHEETS = "sheets"; @@ -166,6 +168,7 @@ public class SheetResourcesImpl extends AbstractResources implements SheetResour /** * Constructor. + * * @param smartsheet the smartsheet * @throws IllegalArgumentException : if any argument is null */ @@ -188,13 +191,14 @@ public SheetResourcesImpl(SmartsheetImpl smartsheet) { * List all sheets. *

* It mirrors to the following Smartsheet REST API method: GET /sheets + * * @return A list of all sheets (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public PagedResult listSheets() throws SmartsheetException { return this.listSheets(null, null, null); @@ -204,15 +208,16 @@ public PagedResult listSheets() throws SmartsheetException { * List all sheets. *

* It mirrors to the following Smartsheet REST API method: GET /sheets - * @param includes the source inclusion + * + * @param includes the source inclusion * @param pagination the object containing the pagination parameters * @return A list of all sheets (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public PagedResult listSheets(EnumSet includes, PaginationParameters pagination) throws SmartsheetException { return this.listSheets(includes, pagination, null); @@ -246,13 +251,14 @@ public PagedResult listSheets( * List all sheets in the organization. *

* It mirrors to the following Smartsheet REST API method: GET /users/sheets + * * @param parameters the object containing the pagination parameters * @return all sheets (note that empty list will be returned if there is none) - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation * @deprecated As of release 2.0. Please use {@link UserResources} instead */ @Deprecated(since = "2.0.0", forRemoval = true) @@ -269,22 +275,23 @@ public PagedResult listOrganizationSheets(PaginationParameters parameters * Get a sheet. *

* It mirrors to the following Smartsheet REST API method: GET /sheet/{id} - * @param id the id - * @param includes used to specify the optional objects to include, currently DISCUSSIONS and ATTACHMENTS are supported. - * @param columnIds the column ids - * @param excludes the exclude parameters - * @param page the page number - * @param pageSize the page size - * @param rowIds the row ids + * + * @param id the id + * @param includes used to specify the optional objects to include, currently DISCUSSIONS and ATTACHMENTS are supported. + * @param columnIds the column ids + * @param excludes the exclude parameters + * @param page the page number + * @param pageSize the page size + * @param rowIds the row ids * @param rowNumbers the row numbers * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * rather than returning null). + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet getSheet( long id, @@ -303,23 +310,24 @@ public Sheet getSheet( * Get a sheet. *

* It mirrors to the following Smartsheet REST API method: GET /sheet/{id} - * @param id the id - * @param includes used to specify the optional objects to include, currently DISCUSSIONS and ATTACHMENTS are supported. - * @param columnIds the column ids - * @param excludes the exclude parameters - * @param page the page number - * @param pageSize the page size - * @param rowIds the row ids - * @param rowNumbers the row numbers + * + * @param id the id + * @param includes used to specify the optional objects to include, currently DISCUSSIONS and ATTACHMENTS are supported. + * @param columnIds the column ids + * @param excludes the exclude parameters + * @param page the page number + * @param pageSize the page size + * @param rowIds the row ids + * @param rowNumbers the row numbers * @param ifVersionAfter only fetch Sheet if more recent version available * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * rather than returning null). - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * rather than returning null). + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet getSheet( long id, @@ -339,24 +347,25 @@ public Sheet getSheet( * Get a sheet. *

* It mirrors to the following Smartsheet REST API method: GET /sheet/{id} - * @param id the id of the sheet - * @param includes used to specify the optional objects to include. - * @param columnIds the column ids - * @param excludes the exclude parameters - * @param page the page number - * @param pageSize the page size - * @param rowIds the row ids - * @param rowNumbers the row numbers + * + * @param id the id of the sheet + * @param includes used to specify the optional objects to include. + * @param columnIds the column ids + * @param excludes the exclude parameters + * @param page the page number + * @param pageSize the page size + * @param rowIds the row ids + * @param rowNumbers the row numbers * @param ifVersionAfter only fetch Sheet if more recent version available - * @param level compatibility level + * @param level compatibility level * @return the sheet resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sheet getSheet( long id, @@ -397,13 +406,13 @@ public Sheet getSheet( * * @param sheetId id of the sheet to fetch * @return the sheet resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sheet getSheet(long sheetId) throws SmartsheetException { return getSheet(sheetId, null, null, null, null, null, null, null, null, null); @@ -414,15 +423,16 @@ public Sheet getSheet(long sheetId) throws SmartsheetException { *

* It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/vnd.ms-excel" Accept * HTTP header - * @param id the id + * + * @param id the id * @param outputStream the OutputStream to which the Excel file will be written - * @throws IllegalArgumentException : if outputStream is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @throws IllegalArgumentException : if outputStream is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public void getSheetAsExcel(long id, OutputStream outputStream) throws SmartsheetException { getSheetAsFile(id, null, outputStream, "application/vnd.ms-excel"); @@ -433,16 +443,17 @@ public void getSheetAsExcel(long id, OutputStream outputStream) throws Smartshee *

* It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/pdf" Accept HTTP * header - * @param id the id + * + * @param id the id * @param outputStream the output stream to which the PDF file will be written. - * @param paperSize the optional paper size - * @throws IllegalArgumentException : if outputStream is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @param paperSize the optional paper size + * @throws IllegalArgumentException : if outputStream is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public void getSheetAsPDF(long id, OutputStream outputStream, PaperSize paperSize) throws SmartsheetException { getSheetAsFile(id, paperSize, outputStream, "application/pdf"); @@ -452,16 +463,17 @@ public void getSheetAsPDF(long id, OutputStream outputStream, PaperSize paperSiz * Create a sheet in default "Sheets" collection. *

* It mirrors to the following Smartsheet REST API method: POST /sheets + * * @param sheet the sheet to create, limited to the following required attributes: * name (string) * - * columns (array of Column objects, limited to the following attributes) - title - primary - type - symbol - - * options + * columns (array of Column objects, limited to the following attributes) - title - primary - type - symbol - + * options * @return the created sheet - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet createSheet(Sheet sheet) throws SmartsheetException { return this.createResource(SHEETS, Sheet.class, sheet); @@ -471,16 +483,17 @@ public Sheet createSheet(Sheet sheet) throws SmartsheetException { * Create a sheet (from existing sheet or template) in default "Sheets" collection. *

* It mirrors to the following Smartsheet REST API method: POST /sheets - * @param sheet the sheet to create, limited to the following required attributes: * name (string) * fromId - * (number): ID of the Sheet or Template from which to create the sheet. + * + * @param sheet the sheet to create, limited to the following required attributes: * name (string) * fromId + * (number): ID of the Sheet or Template from which to create the sheet. * @param includes used to specify the optional objects to include, currently DATA, DISCUSSIONS and ATTACHMENTS are supported. * @return the sheet - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet createSheetFromTemplate(Sheet sheet, EnumSet includes) throws SmartsheetException { Map parameters = new HashMap<>(); @@ -494,17 +507,18 @@ public Sheet createSheetFromTemplate(Sheet sheet, EnumSet * It mirrors to the following Smartsheet REST API method: POST /sheets/import - * @param file path to the CSV file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * + * @param file path to the CSV file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sheet importCsv(String file, String sheetName, Integer headerRowIndex, Integer primaryColumnIndex) throws SmartsheetException { return importFile("sheets/import", file, TEXT_CSV, sheetName, headerRowIndex, primaryColumnIndex); @@ -514,17 +528,18 @@ public Sheet importCsv(String file, String sheetName, Integer headerRowIndex, In * Imports a sheet. *

* It mirrors to the following Smartsheet REST API method: POST /sheets/import - * @param file path to the XLSX file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * + * @param file path to the XLSX file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sheet importXlsx(String file, String sheetName, Integer headerRowIndex, Integer primaryColumnIndex) throws SmartsheetException { return importFile("sheets/import", file, XLSX_CONTENT_TYPE, @@ -535,17 +550,18 @@ public Sheet importXlsx(String file, String sheetName, Integer headerRowIndex, I * Create a sheet in given folder. *

* It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets + * * @param folderId the folder id - * @param sheet the sheet to create, limited to the following required - * attributes: * name (string) * columns (array of Column objects, limited to the following attributes) - title - - * primary - type - symbol - options + * @param sheet the sheet to create, limited to the following required + * attributes: * name (string) * columns (array of Column objects, limited to the following attributes) - title - + * primary - type - symbol - options * @return the created sheet - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet createSheetInFolder(long folderId, Sheet sheet) throws SmartsheetException { @@ -556,18 +572,19 @@ public Sheet createSheetInFolder(long folderId, Sheet sheet) throws SmartsheetEx * Create a sheet in given folder. *

* It mirrors to the following Smartsheet REST API method: POST /folder/{folderId}/sheets + * * @param folderId the folder id - * @param sheet the sheet + * @param sheet the sheet * @param includes the includes * @return the sheet to create, limited to the following required - * attributes: * name (string) * columns (array of Column objects, limited to the following attributes) - title - - * primary - type - symbol - options - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * attributes: * name (string) * columns (array of Column objects, limited to the following attributes) - title - + * primary - type - symbol - options + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet createSheetInFolderFromTemplate( long folderId, @@ -585,18 +602,19 @@ public Sheet createSheetInFolderFromTemplate( * Imports a sheet in given folder. *

* It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import - * @param folderId the folder id - * @param file path to the CSV file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * + * @param folderId the folder id + * @param file path to the CSV file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sheet importCsvInFolder( long folderId, @@ -619,18 +637,19 @@ public Sheet importCsvInFolder( * Imports a sheet in given folder. *

* It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/sheets/import - * @param folderId the folder id - * @param file path to the XLSX file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * + * @param folderId the folder id + * @param file path to the XLSX file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sheet importXlsxInFolder( long folderId, @@ -653,16 +672,17 @@ public Sheet importXlsxInFolder( * Create a sheet in given workspace. *

* It mirrors to the following Smartsheet REST API method: POST /workspace/{workspaceId}/sheets + * * @param workspaceId the workspace id - * @param sheet the sheet to create, limited to the following required attributes: * name (string) * columns - * (array of Column objects, limited to the following attributes) - title - primary - type - symbol - options + * @param sheet the sheet to create, limited to the following required attributes: * name (string) * columns + * (array of Column objects, limited to the following attributes) - title - primary - type - symbol - options * @return the created sheet - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet createSheetInWorkspace(long workspaceId, Sheet sheet) throws SmartsheetException { return this.createResource(WORKSPACES + "/" + workspaceId + "/" + SHEETS, Sheet.class, sheet); @@ -672,18 +692,23 @@ public Sheet createSheetInWorkspace(long workspaceId, Sheet sheet) throws Smarts * Create a sheet (from existing sheet or template) in given workspace. *

* It mirrors to the following Smartsheet REST API method: POST /workspace/{workspaceId}/sheets + * * @param workspaceId the workspace id - * @param sheet the sheet to create, limited to the following required - * attributes: * name (string) * fromId (number): ID of the Sheet or Template from which to create the sheet. - - * includes : used to specify the optional objects to include, currently DATA, DISCUSSIONS and ATTACHMENTS are supported. - * @param includes the includes + * @param sheet the sheet to create, limited to the following required attributes: + *

    + *
  • name (string)
  • + *
  • fromId (number): ID of the Sheet or Template from which to create the sheet.
  • + *
  • includes : used to specify the optional objects to include; + * currently DATA, DISCUSSIONS and ATTACHMENTS are supported.
  • + *
+ * @param includes the includes * @return the created sheet - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet createSheetInWorkspaceFromTemplate(long workspaceId, Sheet sheet, EnumSet includes) throws SmartsheetException { @@ -698,18 +723,19 @@ public Sheet createSheetInWorkspaceFromTemplate(long workspaceId, Sheet sheet, E * Imports a sheet in given workspace. *

* It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import - * @param workspaceId the workspace id - * @param file path to the CSV file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * + * @param workspaceId the workspace id + * @param file path to the CSV file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sheet importCsvInWorkspace( long workspaceId, @@ -732,18 +758,19 @@ public Sheet importCsvInWorkspace( * Imports a sheet in given workspace. *

* It mirrors to the following Smartsheet REST API method: POST /workspaces/{workspaceId}/sheets/import - * @param workspaceId the workspace id - * @param file path to the XLSX file - * @param sheetName destination sheet name - * @param headerRowIndex index (0 based) of row to be used for column names + * + * @param workspaceId the workspace id + * @param file path to the XLSX file + * @param sheetName destination sheet name + * @param headerRowIndex index (0 based) of row to be used for column names * @param primaryColumnIndex index (0 based) of primary column * @return the created sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sheet importXlsxInWorkspace( long workspaceId, @@ -766,13 +793,14 @@ public Sheet importXlsxInWorkspace( * Delete a sheet. *

* It mirrors to the following Smartsheet REST API method: DELETE /sheet{id} + * * @param id the ID of the sheet - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public void deleteSheet(long id) throws SmartsheetException { this.deleteResource(SHEETS + "/" + id, Sheet.class); @@ -782,14 +810,15 @@ public void deleteSheet(long id) throws SmartsheetException { * Update a sheet. *

* It mirrors to the following Smartsheet REST API method: PUT /sheet/{id} + * * @param sheet the sheet to update * @return the updated sheet - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sheet updateSheet(Sheet sheet) throws SmartsheetException { return this.updateResource(SHEETS + "/" + sheet.getId(), Sheet.class, sheet); @@ -799,15 +828,16 @@ public Sheet updateSheet(Sheet sheet) throws SmartsheetException { * Get a sheet version. *

* It mirrors to the following Smartsheet REST API method: GET /sheet/{id}/version + * * @param id the id * @return the sheet version (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * ResourceNotFoundException rather than returning null). + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public int getSheetVersion(long id) throws SmartsheetException { return this.getResource(SHEETS + "/" + id + "/version", Sheet.class).getVersion(); @@ -817,14 +847,15 @@ public int getSheetVersion(long id) throws SmartsheetException { * Send a sheet as a PDF attachment via email to the designated recipients. *

* It mirrors to the following Smartsheet REST API method: POST /sheet/{sheetId}/emails - * @param id the id + * + * @param id the id * @param email the email - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public void sendSheet(long id, SheetEmail email) throws SmartsheetException { this.createResource(SHEETS + "/" + id + "/emails", SheetEmail.class, email); @@ -834,14 +865,15 @@ public void sendSheet(long id, SheetEmail email) throws SmartsheetException { * Get a sheet as an Excel file. *

* It mirrors to the following Smartsheet REST API method: GET /sheet/{id} with "application/vnd.ms-excel" Accept HTTP header - * @param id the id of the sheet + * + * @param id the id of the sheet * @param outputStream the output stream to which the Excel file will be written. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public void getSheetAsCSV(long id, OutputStream outputStream) throws SmartsheetException { getSheetAsFile(id, null, outputStream, TEXT_CSV); @@ -851,15 +883,16 @@ public void getSheetAsCSV(long id, OutputStream outputStream) throws SmartsheetE * Get the status of the Publish settings of the sheet, including the URLs of any enabled publishings. *

* It mirrors to the following Smartsheet REST API method: GET /sheet/{sheetId}/publish + * * @param id the id * @return the resource (note that if there is no such resource, this method will throw ResourceNotFoundException - * * rather than returning null). - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * * rather than returning null). + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public SheetPublish getPublishStatus(long id) throws SmartsheetException { return this.getResource(SHEETS + "/" + id + "/publish", SheetPublish.class); @@ -869,18 +902,19 @@ public SheetPublish getPublishStatus(long id) throws SmartsheetException { * Sets the publish status of a sheet and returns the new status, including the URLs of any enabled publishings. *

* It mirrors to the following Smartsheet REST API method: PUT /sheet/{sheetId}/publish - * @param id the id + * + * @param id the id * @param publish the SheetPublish object limited to the following attributes * - * readOnlyLiteEnabled * readOnlyFullEnabled * readWriteEnabled * icalEnabled + * readOnlyLiteEnabled * readOnlyFullEnabled * readWriteEnabled * icalEnabled * @return the updated SheetPublish (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public SheetPublish updatePublishStatus(long id, SheetPublish publish) throws SmartsheetException { return this.updateResource(SHEETS + "/" + id + "/publish", SheetPublish.class, publish); @@ -890,16 +924,17 @@ public SheetPublish updatePublishStatus(long id, SheetPublish publish) throws Sm * Creates a copy of the specified sheet. *

* It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy - * @param sheetId the sheet id + * + * @param sheetId the sheet id * @param containerDestination describes the destination container - * @param includes optional parameters to include + * @param includes optional parameters to include * @return the sheet - * @throws IllegalArgumentException : if folder is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if folder is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet copySheet( long sheetId, @@ -913,17 +948,18 @@ public Sheet copySheet( * Creates a copy of the specified sheet. *

* It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/copy - * @param sheetId the sheet id + * + * @param sheetId the sheet id * @param containerDestination describes the destination container - * @param includes optional parameters to include - * @param excludes optional parameters to exclude + * @param includes optional parameters to include + * @param excludes optional parameters to exclude * @return the sheet - * @throws IllegalArgumentException : if folder is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if folder is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet copySheet( long sheetId, @@ -947,15 +983,16 @@ public Sheet copySheet( * Moves the specified Sheet to another location. *

* It mirrors to the following Smartsheet REST API method: POST /folders/{folderId}/move - * @param sheetId the folder id + * + * @param sheetId the folder id * @param containerDestination describes the destination container * @return the sheet - * @throws IllegalArgumentException : if folder is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if folder is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet moveSheet(long sheetId, ContainerDestination containerDestination) throws SmartsheetException { @@ -967,15 +1004,16 @@ public Sheet moveSheet(long sheetId, ContainerDestination containerDestination) * Creates an Update Request for the specified Row(s) within the Sheet. *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/updaterequests + * * @param sheetId the sheet id - * @param email the email + * @param email the email * @return the update request object - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public UpdateRequest createUpdateRequest(long sheetId, MultiRowEmail email) throws SmartsheetException { return this.createResource(SHEETS + "/" + sheetId + "/updaterequests", UpdateRequest.class, email); @@ -985,15 +1023,16 @@ public UpdateRequest createUpdateRequest(long sheetId, MultiRowEmail email) thro * Sort a sheet according to the sort criteria. *

* It mirrors to the following Smartsheet REST API method: POST /sheet/{sheetId}/sort - * @param sheetId the sheet id + * + * @param sheetId the sheet id * @param sortSpecifier the sort criteria * @return the update request object - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet sortSheet(long sheetId, SortSpecifier sortSpecifier) throws SmartsheetException { return this.sortSheet(sheetId, sortSpecifier, null); @@ -1003,17 +1042,18 @@ public Sheet sortSheet(long sheetId, SortSpecifier sortSpecifier) throws Smartsh * Sort a sheet according to the sort criteria. *

* It mirrors to the following Smartsheet REST API method: POST /sheet/{sheetId}/sort - * @param sheetId the sheet id + * + * @param sheetId the sheet id * @param sortSpecifier the sort criteria - * @param level compatibility level + * @param level compatibility level * @return the update request object - * @throws SmartsheetException the smartsheet exception - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws SmartsheetException the smartsheet exception + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Sheet sortSheet(long sheetId, SortSpecifier sortSpecifier, Integer level) throws SmartsheetException { Util.throwIfNull(sortSpecifier); @@ -1165,19 +1205,20 @@ public SheetSummaryResources summaryResources() { /** * Internal function used by all the import routines - * @param path endpoint for import - * @param file full path to file - * @param contentType content type of the file being imported (either CSV or XLSX) - * @param sheetName sheetName from caller (can be null) - * @param headerRowIndex headerRowIndex from caller (can be null) + * + * @param path endpoint for import + * @param file full path to file + * @param contentType content type of the file being imported (either CSV or XLSX) + * @param sheetName sheetName from caller (can be null) + * @param headerRowIndex headerRowIndex from caller (can be null) * @param primaryColumnIndex primaryColumnIndex from caller (can be null) * @return the new imported sheet - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ private Sheet importFile(String path, String file, String contentType, String sheetName, Integer headerRowIndex, Integer primaryColumnIndex) throws SmartsheetException { @@ -1231,16 +1272,17 @@ private Sheet importFile(String path, String file, String contentType, String sh /** * Get a sheet as a file. *

- * @param id the id - * @param paperSize the paper size + * + * @param id the id + * @param paperSize the paper size * @param outputStream the OutputStream to which the Excel file will be written - * @param contentType the content type - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @param contentType the content type + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ private void getSheetAsFile(long id, PaperSize paperSize, OutputStream outputStream, String contentType) throws SmartsheetException { @@ -1275,7 +1317,7 @@ private void getSheetAsFile(long id, PaperSize paperSize, OutputStream outputStr /** * Copy stream. * - * @param input the input + * @param input the input * @param output the output * @throws IOException Signals that an I/O exception has occurred. * @deprecated replace with StreamUtil.copyContentIntoOutputStream() diff --git a/src/main/java/com/smartsheet/api/internal/SheetRowResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetRowResourcesImpl.java index 9dad3623..0b098876 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetRowResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetRowResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,6 +75,7 @@ public class SheetRowResourcesImpl extends AbstractResources implements SheetRow /** * Constructor. + * * @param smartsheet the SmartsheetImpl * @throws IllegalArgumentException : if any argument is null */ @@ -89,16 +90,17 @@ public SheetRowResourcesImpl(SmartsheetImpl smartsheet) { * Insert rows to a sheet. *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows + * * @param sheetId the sheet id - * @param rows the list of rows to create + * @param rows the list of rows to create * @return the created rows - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public List addRows(long sheetId, List rows) throws SmartsheetException { return this.addRows(sheetId, rows, null, null); @@ -108,18 +110,19 @@ public List addRows(long sheetId, List rows) throws SmartsheetExceptio * Insert rows to a sheet. *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows - * @param sheetId the sheet id - * @param rows the list of rows to create + * + * @param sheetId the sheet id + * @param rows the list of rows to create * @param includes optional objects to include * @param excludes optional objects to exclude * @return the created rows - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public List addRows( long sheetId, @@ -142,15 +145,16 @@ public List addRows( * 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 + * * @param sheetId the sheet id - * @param rows the list of rows to create + * @param rows the list of rows to create * @return the list of created rows - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ @Override public PartialRowUpdateResult addRowsAllowPartialSuccess(long sheetId, List rows) throws SmartsheetException { @@ -161,17 +165,18 @@ public PartialRowUpdateResult addRowsAllowPartialSuccess(long sheetId, List * 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 - * @param sheetId the sheet id - * @param rows the list of rows to create + * + * @param sheetId the sheet id + * @param rows the list of rows to create * @param includes optional objects to include * @param excludes optional objects to exclude * @return the list of created rows - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ @Override public PartialRowUpdateResult addRowsAllowPartialSuccess( @@ -187,18 +192,19 @@ public PartialRowUpdateResult addRowsAllowPartialSuccess( * Get a row. *

* It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId} - * @param sheetId the id of the sheet - * @param rowId the id of the row + * + * @param sheetId the id of the sheet + * @param rowId the id of the row * @param includes optional objects to include * @param excludes optional objects to exclude * @return the row (note that if there is no such resource, this method will throw ResourceNotFoundException rather - * than returning null). - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * than returning null). + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public Row getRow( long sheetId, @@ -221,14 +227,15 @@ public Row getRow( * Delete a row. *

* It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/rows/{rowId} + * * @param sheetId the sheet id - * @param rowId the ID of the row - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @param rowId the ID of the row + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation * @deprecated as of API 2.0.2 release, replaced by {@link #deleteRows(long, Set, boolean)} */ @Deprecated(since = "2.0.2", forRemoval = true) @@ -240,16 +247,17 @@ public void deleteRow(long sheetId, long rowId) 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} - * @param sheetId the sheet id - * @param rowIds the row ids + * + * @param sheetId the sheet id + * @param rowIds the row ids * @param ignoreRowsNotFound boolean for ignoring row ids not found * @return a list of deleted rows - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public List deleteRows(long sheetId, Set rowIds, boolean ignoreRowsNotFound) throws SmartsheetException { Util.throwIfNull(rowIds); @@ -267,15 +275,16 @@ public List deleteRows(long sheetId, Set rowIds, boolean ignoreRowsN * Send a row via email to the designated recipients. *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/emails + * * @param sheetId the id of the sheet - * @param rowId the id of the row - * @param email the row email - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @param rowId the id of the row + * @param email the row email + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation * @deprecated as of API V2.0.2, replaced by {@link #sendRows(long, MultiRowEmail)} */ @Deprecated(since = "2.0.2", forRemoval = true) @@ -287,14 +296,15 @@ public void sendRow(long sheetId, long rowId, RowEmail email) throws SmartsheetE * Send a row via email to the designated recipients. *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/emails + * * @param sheetId the id of the sheet - * @param email the multi row email - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @param email the multi row email + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public void sendRows(long sheetId, MultiRowEmail email) throws SmartsheetException { this.createResource(SHEETS_PATH + sheetId + "/rows/emails", MultiRowEmail.class, email); @@ -304,15 +314,16 @@ public void sendRows(long sheetId, MultiRowEmail email) throws SmartsheetExcepti * Update rows. *

* It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows + * * @param sheetId the id of the sheet - * @param rows the list of rows + * @param rows the list of rows * @return a list of rows - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public List updateRows(long sheetId, List rows) throws SmartsheetException { return this.updateRows(sheetId, rows, null, null); @@ -322,17 +333,18 @@ public List updateRows(long sheetId, List rows) throws SmartsheetExcep * Update rows. *

* It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows - * @param sheetId the id of the sheet - * @param rows the list of rows + * + * @param sheetId the id of the sheet + * @param rows the list of rows * @param includes optional objects to include * @param excludes optional objects to exclude * @return a list of rows - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public List updateRows( long sheetId, @@ -355,7 +367,7 @@ public List updateRows( *

Helper method: Update a single cell

* * @param sheetId the sheet ID the cell should be written to - * @param cell the cell object to be written. Must include a rowId and columnId + * @param cell the cell object to be written. Must include a rowId and columnId * @return The returned Row object from the api * @throws SmartsheetException the smartsheet exception */ @@ -377,9 +389,9 @@ public Row updateCell(long sheetId, Cell cell) throws SmartsheetException { *

NOTE: This method internally fetches the sheet. To avoid this step, fetch the sheet in * advance and use the method by the same name

* - * @param sheetId the sheet ID the cell should be written to - * @param rowIdx the row index of the cell (base 1 indexed) - * @param colIdx the column index of the cell (base 1 indexed) + * @param sheetId the sheet ID the cell should be written to + * @param rowIdx the row index of the cell (base 1 indexed) + * @param colIdx the column index of the cell (base 1 indexed) * @param newValue the new value of the cell * @return The returned Row object from the api * @throws SmartsheetException the smartsheet exception @@ -392,9 +404,9 @@ public Row updateCell(long sheetId, int rowIdx, int colIdx, String newValue) thr /** *

Helper method: Update a single with a string value

* - * @param sheet The sheet to update the cell in. Must include rowId and cell information - * @param rowIdx The row index of the cell (base 1 indexed) - * @param colIdx The column index of the cell (base 1 indexed) + * @param sheet The sheet to update the cell in. Must include rowId and cell information + * @param rowIdx The row index of the cell (base 1 indexed) + * @param colIdx The column index of the cell (base 1 indexed) * @param newValue The new value of the cell * @return The returned Row object from the api * @throws SmartsheetException the smartsheet exception @@ -422,15 +434,16 @@ public Row updateCell(Sheet sheet, int rowIdx, int colIdx, String newValue) thro * rows and those that failed, with specific messages for each. *

* It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows + * * @param sheetId the id of the sheet - * @param rows the list of rows + * @param rows the list of rows * @return a list of rows - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ @Override public PartialRowUpdateResult updateRowsAllowPartialSuccess(long sheetId, List rows) throws SmartsheetException { @@ -442,17 +455,18 @@ public PartialRowUpdateResult updateRowsAllowPartialSuccess(long sheetId, List * It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows - * @param sheetId the id of the sheet - * @param rows the list of rows + * + * @param sheetId the id of the sheet + * @param rows the list of rows * @param includes optional objects to include * @param excludes optional objects to exclude * @return a list of rows - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ @Override public PartialRowUpdateResult updateRowsAllowPartialSuccess( @@ -535,17 +549,18 @@ private PartialRowUpdateResult doPartialRowOperation( * 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 - * @param sheetId the sheet ID to move - * @param includes the parameters to include + * + * @param sheetId the sheet ID to move + * @param includes the parameters to include * @param ignoreRowsNotFound optional,specifying row Ids that do not exist within the source sheet - * @param moveParameters CopyOrMoveRowDirective object + * @param moveParameters CopyOrMoveRowDirective object * @return the result object - * @throws IllegalArgumentException : if any argument is null, or path is empty string - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null, or path is empty string + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public CopyOrMoveRowResult moveRows( Long sheetId, @@ -569,17 +584,18 @@ public CopyOrMoveRowResult moveRows( * 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/copy - * @param sheetId the sheet ID to move - * @param includes the parameters to include + * + * @param sheetId the sheet ID to move + * @param includes the parameters to include * @param ignoreRowsNotFound optional,specifying row Ids that do not exist within the source sheet - * @param copyParameters CopyOrMoveRowDirective object + * @param copyParameters CopyOrMoveRowDirective object * @return the result object - * @throws IllegalArgumentException : if any argument is null, or path is empty string - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws IllegalArgumentException : if any argument is null, or path is empty string + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation */ public CopyOrMoveRowResult copyRows( Long sheetId, @@ -600,22 +616,23 @@ public CopyOrMoveRowResult copyRows( } /** - /** + * /** * Update the values of the Cells in a Row. *

* It mirrors to the following Smartsheet REST API method: PUT /row/{id}/cells + * * @param rowId the row id * @param cells the cells to update (Cells must have the following attributes set: * - * columnId * value * strict (optional) + * columnId * value * strict (optional) * @return the updated cells (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException : if any argument is null - * @throws InvalidRequestException : if there is any problem with the REST API request - * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) - * @throws ResourceNotFoundException : if the resource can not be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException : if any argument is null + * @throws InvalidRequestException : if there is any problem with the REST API request + * @throws AuthorizationException : if there is any problem with the REST API authorization(access token) + * @throws ResourceNotFoundException : if the resource can not be found * @throws ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation - * @throws SmartsheetException : if there is any other error occurred during the operation + * @throws SmartsheetRestException : if there is any other REST API related error occurred during the operation + * @throws SmartsheetException : if there is any other error occurred during the operation * @deprecated replaced by {@link #updateRows(long, List)} */ @Deprecated(since = "2.0.0", forRemoval = true) diff --git a/src/main/java/com/smartsheet/api/internal/SheetSummaryResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetSummaryResourcesImpl.java index 128fcde3..78ddf37d 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetSummaryResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetSummaryResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,16 +75,16 @@ public SheetSummaryResourcesImpl(SmartsheetImpl smartsheet) { *

* It mirrors to the following Smartsheet REST API method: GET /sheets/{id}/summary * - * @param sheetId the sheet id + * @param sheetId the sheet id * @param includes optional objects to include * @param excludes optional objects to exclude * @return the sheet summary - * @throws IllegalArgumentException if any argument is null or empty string - * @throws com.smartsheet.api.InvalidRequestException if there is any problem with the REST API request - * @throws com.smartsheet.api.AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws com.smartsheet.api.ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws com.smartsheet.api.InvalidRequestException if there is any problem with the REST API request + * @throws com.smartsheet.api.AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws com.smartsheet.api.ResourceNotFoundException if the resource cannot be found * @throws com.smartsheet.api.ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation **/ @Override public SheetSummary getSheetSummary( @@ -111,17 +111,17 @@ public SheetSummary getSheetSummary( *

* It mirrors to the following Smartsheet REST API method: GET /sheets/{id}/summary/fields * - * @param sheetId the sheet id - * @param includes optional objects to include - * @param excludes optional objects to exclude + * @param sheetId the sheet id + * @param includes optional objects to include + * @param excludes optional objects to exclude * @param pagination pagination parameters for the response * @return the list of sheet summary fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public PagedResult getSheetSummaryFields(long sheetId, EnumSet includes, EnumSet excludes, @@ -144,16 +144,16 @@ public PagedResult getSheetSummaryFields(long sheetId, EnumSet * It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/summary/fields * - * @param sheetId the sheet id - * @param fields a list of summary fields to add + * @param sheetId the sheet id + * @param fields a list of summary fields to add * @param renameIfConflict true if the call should rename conflicting field titles * @return the list of created fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public List addSheetSummaryFields( long sheetId, @@ -174,16 +174,16 @@ public List addSheetSummaryFields( *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/summary/fields * - * @param sheetId the sheet id - * @param fields the list of summary fields to add + * @param sheetId the sheet id + * @param fields the list of summary fields to add * @param renameIfConflict true if the call should rename conflicting field titles * @return a bulk item result containing the created fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public BulkItemResult addSheetSummaryFieldsWithPartialSuccess(long sheetId, List fields, Boolean renameIfConflict) throws SmartsheetException { @@ -195,16 +195,16 @@ public BulkItemResult addSheetSummaryFieldsWithPartialSuccess(long *

* It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/summary/fields * - * @param sheetId the sheet id - * @param fields a list of summary fields to update + * @param sheetId the sheet id + * @param fields a list of summary fields to update * @param renameIfConflict true if the call should rename conflicting field titles * @return the updated fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public List updateSheetSummaryFields( long sheetId, @@ -225,16 +225,16 @@ public List updateSheetSummaryFields( *

* It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/summary/fields * - * @param sheetId the sheet id - * @param fields a list of summary fields to update + * @param sheetId the sheet id + * @param fields a list of summary fields to update * @param renameIfConflict true if the call should rename conflicting field titles * @return a bulk item result containing the updated fields - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public BulkItemResult updateSheetSummaryFieldsWithPartialSuccess(long sheetId, List fields, Boolean renameIfConflict) throws SmartsheetException { @@ -246,16 +246,16 @@ public BulkItemResult updateSheetSummaryFieldsWithPartialSuccess(l *

* It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/summary/fields * - * @param sheetId the sheet id - * @param fieldIds List of field Ids + * @param sheetId the sheet id + * @param fieldIds List of field Ids * @param ignoreSummaryFieldsNotFound true if the call should ignore fields not found * @return List of field Ids deleted - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public List deleteSheetSummaryFields( long sheetId, @@ -277,18 +277,18 @@ public List deleteSheetSummaryFields( *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/summary/fields/{fieldId}/images * - * @param sheetId the sheet id - * @param fieldId the summary field id - * @param file path to image file to upload + * @param sheetId the sheet id + * @param fieldId the summary field id + * @param file path to image file to upload * @param contentType content-type of the file being uploaded - * @param altText alternate text for the image + * @param altText alternate text for the image * @return Result - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Result addSheetSummaryFieldImage( long sheetId, @@ -314,18 +314,18 @@ public Result addSheetSummaryFieldImage( *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/summary/fields/{fieldId}/images * - * @param sheetId the sheet id - * @param fieldId the summary field id - * @param file File to upload + * @param sheetId the sheet id + * @param fieldId the summary field id + * @param file File to upload * @param contentType content-type of the file being uploaded - * @param altText alternate text for the image + * @param altText alternate text for the image * @return Result - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Result addSheetSummaryFieldImage( long sheetId, @@ -350,19 +350,19 @@ public Result addSheetSummaryFieldImage( *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/summary/fields/{fieldId}/images * - * @param sheetId the sheet id - * @param fieldId the summary field id - * @param inputStream File to upload - * @param contentType content-type of the file being uploaded + * @param sheetId the sheet id + * @param fieldId the summary field id + * @param inputStream File to upload + * @param contentType content-type of the file being uploaded * @param contentLength content length - * @param altText alternate text for the image + * @param altText alternate text for the image * @return Result - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Result addSheetSummaryFieldImage( long sheetId, diff --git a/src/main/java/com/smartsheet/api/internal/SheetUpdateRequestResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SheetUpdateRequestResourcesImpl.java index 115645f2..d38a0fa9 100644 --- a/src/main/java/com/smartsheet/api/internal/SheetUpdateRequestResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SheetUpdateRequestResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,12 +53,12 @@ public SheetUpdateRequestResourcesImpl(SmartsheetImpl smartsheet) { * * @param paging the object containing the pagination parameters * @return A list of all UpdateRequests (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public PagedResult listUpdateRequests(long sheetId, PaginationParameters paging) throws SmartsheetException { String path = SHEETS_PATH + sheetId + "/" + UPDATE_REQUESTS; @@ -77,16 +77,16 @@ public PagedResult listUpdateRequests(long sheetId, PaginationPar *

* It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/updaterequests/{updateRequestId} * - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param updateRequestId the update request Id * @return the update request resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public UpdateRequest getUpdateRequest(long sheetId, long updateRequestId) throws SmartsheetException { String path = SHEETS_PATH + sheetId + "/" + UPDATE_REQUESTS + "/" + updateRequestId; @@ -99,15 +99,15 @@ public UpdateRequest getUpdateRequest(long sheetId, long updateRequestId) throws *

* It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/updaterequests * - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param updateRequest the update request object * @return the update request resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public UpdateRequest createUpdateRequest(long sheetId, UpdateRequest updateRequest) throws SmartsheetException { String path = SHEETS_PATH + sheetId + "/" + UPDATE_REQUESTS; @@ -119,14 +119,14 @@ public UpdateRequest createUpdateRequest(long sheetId, UpdateRequest updateReque *

* It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/updaterequests/{updateRequestId} * - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param updateRequestId the update request Id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public void deleteUpdateRequest(long sheetId, long updateRequestId) throws SmartsheetException { String path = SHEETS_PATH + sheetId + "/" + UPDATE_REQUESTS + "/" + updateRequestId; @@ -138,15 +138,15 @@ public void deleteUpdateRequest(long sheetId, long updateRequestId) throws Smart *

* It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/updaterequests/{updateRequestId} * - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param updateRequest the update request object * @return the update request resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public UpdateRequest updateUpdateRequest(long sheetId, UpdateRequest updateRequest) throws SmartsheetException { String path = SHEETS_PATH + sheetId + "/" + UPDATE_REQUESTS + "/" + updateRequest.getId(); @@ -159,14 +159,14 @@ public UpdateRequest updateUpdateRequest(long sheetId, UpdateRequest updateReque * It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/sentupdaterequests * * @param sheetId the Id of the sheet - * @param paging the object containing the pagination parameters + * @param paging the object containing the pagination parameters * @return A list of all UpdateRequests (note that an empty list will be returned if there are none). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public PagedResult listSentUpdateRequests(long sheetId, PaginationParameters paging) throws SmartsheetException { String path = SHEETS_PATH + sheetId + "/sentupdaterequests"; @@ -185,16 +185,16 @@ public PagedResult listSentUpdateRequests(long sheetId, Pagin *

* It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/sentupdaterequests/{updateRequestId} * - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param sentUpdateRequestId the sent update request Id * @return the sent update request resource (note that if there is no such resource, this method will throw - * ResourceNotFoundException rather than returning null). - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * ResourceNotFoundException rather than returning null). + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public SentUpdateRequest getSentUpdateRequest(long sheetId, long sentUpdateRequestId) throws SmartsheetException { String path = SHEETS_PATH + sheetId + "/sentupdaterequests/" + sentUpdateRequestId; @@ -206,14 +206,14 @@ public SentUpdateRequest getSentUpdateRequest(long sheetId, long sentUpdateReque *

* It mirrors To the following Smartsheet REST API method: DELETE /sheets/{sheetId}/sentupdaterequests/{sentUpdateRequestId} * - * @param sheetId the Id of the sheet + * @param sheetId the Id of the sheet * @param sentUpdateRequestId the sent update request Id - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public void deleteSentUpdateRequest(long sheetId, long sentUpdateRequestId) throws SmartsheetException { String path = SHEETS_PATH + sheetId + "/sentupdaterequests/" + sentUpdateRequestId; diff --git a/src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java index 3f40fb4e..08580101 100644 --- a/src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,13 +62,13 @@ public SightResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /sights * * @return IndexResult object containing an array of Sight objects limited to the following attributes: - * id, name, accessLevel, permalink, createdAt, modifiedAt. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * id, name, accessLevel, permalink, createdAt, modifiedAt. + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public PagedResult listSights(PaginationParameters paging, Date modifiedSince) throws SmartsheetException { String path = SIGHTS; @@ -92,12 +92,12 @@ public PagedResult listSights(PaginationParameters paging, Date modifiedS * * @param sightId the id of the Sight * @return the Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sight getSight(long sightId) throws SmartsheetException { return this.getSight(sightId, null, null); @@ -109,14 +109,14 @@ public Sight getSight(long sightId) throws SmartsheetException { * It mirrors to the following Smartsheet REST API method: GET /sights/{sightId} * * @param sightId the id of the Sight - * @param level compatibility level + * @param level compatibility level * @return the Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sight getSight(long sightId, Integer level) throws SmartsheetException { return this.getSight(sightId, null, level); @@ -127,16 +127,16 @@ public Sight getSight(long sightId, Integer level) throws SmartsheetException { *

* It mirrors to the following Smartsheet REST API method: GET /sights/{sightId} * - * @param sightId the id of the Sight - * @param level compatibility level + * @param sightId the id of the Sight + * @param level compatibility level * @param includes optional parameters to include * @return the Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sight getSight(long sightId, EnumSet includes, Integer level) throws SmartsheetException { String path = SIGHTS + "/" + sightId; @@ -156,12 +156,12 @@ public Sight getSight(long sightId, EnumSet includes, Integer le * * @param sight - the Sight to update * @return the updated Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sight updateSight(Sight sight) throws SmartsheetException { Util.throwIfNull(sight); @@ -174,13 +174,12 @@ public Sight updateSight(Sight sight) throws SmartsheetException { * It mirrors to the following Smartsheet REST API method: DELETE /sights/{sightId} * * @param sightId the id of the Sight - * - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public void deleteSight(long sightId) throws SmartsheetException { this.deleteResource(SIGHTS + "/" + sightId, Sight.class); @@ -191,15 +190,15 @@ public void deleteSight(long sightId) throws SmartsheetException { *

* It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/copy * - * @param sightId the id of the Sight + * @param sightId the id of the Sight * @param destination the destination to copy to * @return the newly created Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sight copySight(long sightId, ContainerDestination destination) throws SmartsheetException { return this.createResource(SIGHTS + "/" + sightId + "/copy", Sight.class, destination); @@ -210,15 +209,15 @@ public Sight copySight(long sightId, ContainerDestination destination) throws Sm *

* It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/move * - * @param sightId the id of the Sight + * @param sightId the id of the Sight * @param destination the destination to copy to * @return the newly created Sight resource. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public Sight moveSight(long sightId, ContainerDestination destination) throws SmartsheetException { return this.createResource(SIGHTS + "/" + sightId + "/move", Sight.class, destination); @@ -231,12 +230,12 @@ public Sight moveSight(long sightId, ContainerDestination destination) throws Sm * * @param sightId the id of the Sight * @return the Sight's publish status. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public SightPublish getPublishStatus(long sightId) throws SmartsheetException { return this.getResource(SIGHTS + "/" + sightId + "/publish", SightPublish.class); @@ -247,15 +246,15 @@ public SightPublish getPublishStatus(long sightId) throws SmartsheetException { *

* It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/publish * - * @param sightId the id of the Sight + * @param sightId the id of the Sight * @param sightPublish the SightPublish object containing publish status * @return the Sight's publish status. - * @throws IllegalArgumentException if any argument is null or empty string - * @throws InvalidRequestException if there is any problem with the REST API request - * @throws AuthorizationException if there is any problem with the REST API authorization (access token) - * @throws ResourceNotFoundException if the resource cannot be found + * @throws IllegalArgumentException if any argument is null or empty string + * @throws InvalidRequestException if there is any problem with the REST API request + * @throws AuthorizationException if there is any problem with the REST API authorization (access token) + * @throws ResourceNotFoundException if the resource cannot be found * @throws ServiceUnavailableException if the REST API service is not available (possibly due to rate limiting) - * @throws SmartsheetException if there is any other error during the operation + * @throws SmartsheetException if there is any other error during the operation */ public SightPublish setPublishStatus(long sightId, SightPublish sightPublish) throws SmartsheetException { Util.throwIfNull(sightPublish); diff --git a/src/main/java/com/smartsheet/api/internal/SmartsheetImpl.java b/src/main/java/com/smartsheet/api/internal/SmartsheetImpl.java index cfb3a522..62081da9 100644 --- a/src/main/java/com/smartsheet/api/internal/SmartsheetImpl.java +++ b/src/main/java/com/smartsheet/api/internal/SmartsheetImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/smartsheet/api/internal/TemplateResourcesImpl.java b/src/main/java/com/smartsheet/api/internal/TemplateResourcesImpl.java index 262811b0..575a6857 100644 --- a/src/main/java/com/smartsheet/api/internal/TemplateResourcesImpl.java +++ b/src/main/java/com/smartsheet/api/internal/TemplateResourcesImpl.java @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Smartsheet + * Copyright (C) 2024 Smartsheet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,11 +46,11 @@ public TemplateResourcesImpl(SmartsheetImpl smartsheet) { * It mirrors to the following Smartsheet REST API method: GET /templates *

* 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) - * - 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 + * - 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 * * @param parameters the pagination parameters * @return all templates (note that empty list will be returned if there is none) @@ -72,11 +72,11 @@ public PagedResult