From ecac3364d2552f1f282d42c6c9097204d9b983be Mon Sep 17 00:00:00 2001 From: Sujay Garlanka Date: Thu, 12 Nov 2020 12:54:59 -0500 Subject: [PATCH 1/3] Add parameter --- .../java/com/box/sdk/BoxSearchParameters.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/main/java/com/box/sdk/BoxSearchParameters.java b/src/main/java/com/box/sdk/BoxSearchParameters.java index e3e0a1da8..764c5c116 100644 --- a/src/main/java/com/box/sdk/BoxSearchParameters.java +++ b/src/main/java/com/box/sdk/BoxSearchParameters.java @@ -28,6 +28,7 @@ public class BoxSearchParameters { private BoxMetadataFilter metadataFilter; private String sort; private String direction; + private Boolean includeRecentSharedLinks; /** * Creates a Box Search Parameters Objects without query set, specific for Metadata Only Searches. */ @@ -60,6 +61,7 @@ public boolean clearParameters() { this.metadataFilter = null; this.sort = null; this.direction = null; + this.includeRecentSharedLinks = null; return true; } /** @@ -277,6 +279,23 @@ public String getDirection() { return this.direction; } + /** + * Set the include recent shared links field to determine whether to include items accessible only via shared link + * in the Box Search results. + * @param includeRecentSharedLinks Whether to include items accessible only via shared link in the response. + */ + public void setIncludeRecentSharedLinks(Boolean includeRecentSharedLinks) { + this.includeRecentSharedLinks = includeRecentSharedLinks; + } + + /** + * Retrieves the include recent shared links field. + * @return The include recent shared links field. + */ + public Boolean getIncludeRecentSharedLinks() { + return this.includeRecentSharedLinks; + } + /** * Checks String to see if the parameter is null. * @param paramValue Object that will be checked if null. @@ -399,6 +418,11 @@ public QueryStringBuilder getQueryParameters() { if (!this.isNullOrEmpty(this.direction)) { builder.appendParam("direction", this.direction); } + + //Include Recent Shared Links + if (!this.isNullOrEmpty(this.includeRecentSharedLinks)) { + builder.appendParam("include_recent_shared_links", this.includeRecentSharedLinks.toString()); + } return builder; } } From 57fd3deee4b1d15f8c4004f90b1ee01c71681a5d Mon Sep 17 00:00:00 2001 From: Sujay Garlanka Date: Thu, 12 Nov 2020 12:56:40 -0500 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ed1fdca5..2e4889a72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Next Release + +__New Features and Enhancements:__ + +- Add support for search param to get shared link items ([#855](https://github.com/box/box-java-sdk/pull/855)) + ## 2.51.0 [2020-10-29] __New Features and Enhancements:__ From a4eb16254971aeeb6e9ffa35e60e070f395a7775 Mon Sep 17 00:00:00 2001 From: Sujay Garlanka Date: Fri, 13 Nov 2020 17:06:03 -0500 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c943ee26..30d7db701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,4 @@ # Changelog -## 2.51.1 [2020-11-12] - -__Bug Fixes:__ - -- Fix for cross-enterprise collaborator calls to updateMetadata on files ## Next Release @@ -11,6 +6,12 @@ __New Features and Enhancements:__ - Add support for search param to get shared link items ([#855](https://github.com/box/box-java-sdk/pull/855)) +## 2.51.1 [2020-11-12] + +__Bug Fixes:__ + +- Fix for cross-enterprise collaborator calls to updateMetadata on files + ## 2.51.0 [2020-10-29] __New Features and Enhancements:__