From d1ee665be6b3d812e7ec95c316556d3b206ec100 Mon Sep 17 00:00:00 2001 From: Shailesh Mishra Date: Fri, 18 Aug 2023 17:07:21 +0530 Subject: [PATCH 1/6] asset docs updated --- src/main/java/com/contentstack/sdk/Asset.java | 181 ++++++++++-------- 1 file changed, 96 insertions(+), 85 deletions(-) diff --git a/src/main/java/com/contentstack/sdk/Asset.java b/src/main/java/com/contentstack/sdk/Asset.java index 9352224b..a03f63a2 100644 --- a/src/main/java/com/contentstack/sdk/Asset.java +++ b/src/main/java/com/contentstack/sdk/Asset.java @@ -14,11 +14,15 @@ import static com.contentstack.sdk.Constants.parseDate; /** - * Assets refer to - * all the media files (images, videos, PDFs, audio files, and so on) uploaded in your Contentstack repository for + * Assets + * refer to + * all the media files (images, videos, PDFs, audio files, and so on) uploaded + * in your Contentstack repository for * future use. These files can be attached and used in multiple entries. *

- * You can now pass the branch header in the API request to fetch or manage modules located within specific branches of + * You can now pass the branch header in the API request to fetch or manage + * modules located within specific branches of * the stack. * * @author Shailesh Mishra @@ -93,16 +97,18 @@ public void setHeader(@NotNull String headerKey, @NotNull String headerValue) { } /** - * Remove header. - * - * @param headerKey the header key - * - *
+ * The function removes a header from a collection of headers based on a given + * key. + * + * @param headerKey The parameter "headerKey" is a String that represents the + * key of the header to + * be removed. *
* Example : *

* - * Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset = + * Stack stack = Contentstack.stack("apiKey", "deliveryToken", + * "environment"); Asset asset = * stack.asset(asset_uid); asset.removeHeader(); * */ @@ -121,11 +127,11 @@ protected void setUid(@NotNull String assetUid) { * * @return the asset uid * - *
- *
- * Example :
+ *
+ *
+ * Example :
* - * + * * Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset = stack.asset(asset_uid); * asset.fetch(new FetchResultCallback() { @Override public void onCompletion(ResponseType responseType, Error * error) { asset.getAssetUid(); } }); @@ -141,15 +147,20 @@ public String getAssetUid() { * * @return the file type * - *
- *
- * Example :
+ *
+ *
+ * Example :
* - *

-     * Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset = stack.asset(asset_uid);
-     * asset.fetch(new FetchResultCallback() { @Override public void onCompletion(ResponseType responseType, Error
-     * error) { asset.getFileType(); } });
-     * 
+ *
+     *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
+     *         Asset asset = stack.asset(asset_uid);
+     *         asset.fetch(new FetchResultCallback() {
+     *             @Override
+     *             public void onCompletion(ResponseType responseType, Error error) {
+     *                 asset.getFileType();
+     *             }
+     *         });
+     *         
*/ public String getFileType() { return contentType; @@ -160,11 +171,11 @@ public String getFileType() { * * @return the file size * - *
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -185,11 +196,11 @@ public String getFileSize() {
      *
      * @return the file name
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -210,11 +221,11 @@ public String getFileName() {
      *
      * @return the url
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -235,11 +246,11 @@ public String getUrl() {
      *
      * @return the json object
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -259,10 +270,10 @@ public JSONObject toJSON() {
      * Gets create at.
      *
      * @return the create at
-     * 
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -283,11 +294,11 @@ public Calendar getCreateAt() {
      *
      * @return the created by
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -308,11 +319,11 @@ public String getCreatedBy() {
      *
      * @return the update at
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -332,11 +343,11 @@ public Calendar getUpdateAt() {
      * Gets updated by.
      *
      * @return the updated by
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -357,11 +368,11 @@ public String getUpdatedBy() {
      *
      * @return the delete at
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -382,11 +393,11 @@ public Calendar getDeleteAt() {
      *
      * @return the deleted by
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -405,11 +416,11 @@ public String getDeletedBy() {
      * Get tags string [ ].
      *
      * @return the string [ ]
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.fetch(new FetchResultCallback() {
@@ -435,11 +446,11 @@ protected Asset setTags(String[] tags) {
      *
      * @return the asset
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.includeDimension();
@@ -457,11 +468,11 @@ public Asset includeDimension() {
      * @param paramValue the param value
      * @return the asset
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.addParam();
@@ -476,11 +487,11 @@ public Asset addParam(@NotNull String paramKey, @NotNull String paramValue) {
      * Include fallback asset.
      *
      * @return the asset
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         Asset asset = stack.asset(asset_uid);
      *         asset.includeFallback();
@@ -496,11 +507,11 @@ public Asset includeFallback() {
      *
      * @return {@link Asset} object, so you can chain this call. 
* - *
- *
- * Example :
+ *
+ *
+ * Example :
* - * + * * Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset = stack.asset(asset_uid); * asset.includeBranch(); * @@ -515,11 +526,11 @@ public Asset includeBranch() { * * @return {@link Asset} object, so you can chain this call.
* - *
- *
- * Example :
+ *
+ *
+ * Example :
* - * + * * Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset = stack.asset(asset_uid); * asset.includeMetadata(); * @@ -540,7 +551,7 @@ public void fetch(FetchResultCallback callback) { } private void fetchFromNetwork(String url, JSONObject urlQueries, LinkedHashMap headers, - FetchResultCallback callback) { + FetchResultCallback callback) { if (callback != null) { HashMap urlParams = getUrlParams(urlQueries); new CSBackgroundTask(this, stackInstance, Constants.FETCHASSETS, url, headers, urlParams, From 495d95ec7d29e2206749804a797e7c5599243a23 Mon Sep 17 00:00:00 2001 From: Shailesh Mishra Date: Fri, 18 Aug 2023 18:49:38 +0530 Subject: [PATCH 2/6] updated pom.xml --- pom.xml | 96 +++++++++++++++++++++++---------------------------------- 1 file changed, 38 insertions(+), 58 deletions(-) diff --git a/pom.xml b/pom.xml index c4a942a9..34fe8a67 100644 --- a/pom.xml +++ b/pom.xml @@ -54,19 +54,19 @@ GitHub Issues - http://github.com/contentstack/contentstack-java/issues + https://github.com/contentstack/contentstack-java/issues MIT - http://www.opensource.org/licenses/mit-license.php + https://www.opensource.org/licenses/mit-license.php - Contentstack. - http://contentstack.com + Contentstack + https://contentstack.com @@ -94,12 +94,11 @@ - - - - - - + + + + + ossrh https://oss.sonatype.org/service/local/staging/deploy/maven2/ @@ -127,7 +126,7 @@ io.github.cdimascio dotenv-java ${dotenv-source.version} - + @@ -185,38 +184,9 @@ + - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} - - - sign-artifacts - verify - - sign - - - - - - - - - - + org.apache.maven.plugins maven-javadoc-plugin @@ -260,14 +230,24 @@ false 1.8 - http://docs.oracle.com/javase/7/docs/api/ - http://docs.oracle.com/javase/7/docs/api/ + https://docs.oracle.com/javase/7/docs/api/ + https://docs.oracle.com/javase/7/docs/api/ none + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + true + + + org.apache.maven.plugins maven-site-plugin @@ -278,20 +258,20 @@ maven-enforcer-plugin 3.0.0-M2 - - - - - - - - - - - - - - + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + org.apache.maven.plugins maven-compiler-plugin From 14162022b00a72164a90d4bba567f1f817144604 Mon Sep 17 00:00:00 2001 From: Shailesh Mishra Date: Fri, 18 Aug 2023 19:56:04 +0530 Subject: [PATCH 3/6] pom.xml updated --- pom.xml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 34fe8a67..f39935d4 100644 --- a/pom.xml +++ b/pom.xml @@ -87,17 +87,17 @@ - + ossrh https://oss.sonatype.org/content/repositories/snapshots - - - - + + + + ossrh @@ -292,9 +292,14 @@ nexus-staging-maven-plugin ${nexus-staging-maven-plugin.version} true + + + + + - github - https://maven.pkg.github.com/contentstack/contentstack-java + ossrh + https://oss.sonatype.org/ true From cbf3432ba4f3386e108e7e6d3109cd5fe05285d9 Mon Sep 17 00:00:00 2001 From: Shailesh Mishra Date: Mon, 18 Sep 2023 20:26:33 +0530 Subject: [PATCH 4/6] pom.xml updated to latest --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index f39935d4..188304c5 100644 --- a/pom.xml +++ b/pom.xml @@ -20,12 +20,12 @@ 2.2.1 3.4.1 3.0.0 - 3.1.6 + 3.1.7 2.9.0 - 4.11.0 + 5.0.0-alpha.11 0.8.5 1.18.28 - 5.9.2 + 5.10.0 5.8.0-M1 2.8.8 1.1.1 @@ -33,7 +33,7 @@ 1.5 3.8.1 1.6.13 - 20230227 + 20230618 0.8.7 2.5.3 1.2.3 From 193c2fed62d5099876403a42a0d63ff7848932ae Mon Sep 17 00:00:00 2001 From: Shailesh Mishra Date: Wed, 27 Sep 2023 23:29:32 +0530 Subject: [PATCH 5/6] Utils SDK Updated to latest version --- CHANGELOG.md | 7 +++++++ pom.xml | 6 +++--- src/main/java/com/contentstack/sdk/Constants.java | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35b14704..137dc5f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## v1.12.3 + +### Date: 28-SEP-2023 + +- Updated Latest version of Utils SDK +- Snyk Issues fixed + ## v1.12.2 ### Date: 08-AUG-2023 diff --git a/pom.xml b/pom.xml index 188304c5..15cb186c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.contentstack.sdk java - 1.12.2 + 1.12.3 jar contentstack-java Java SDK for Contentstack Content Delivery API @@ -24,7 +24,7 @@ 2.9.0 5.0.0-alpha.11 0.8.5 - 1.18.28 + 1.18.30 5.10.0 5.8.0-M1 2.8.8 @@ -36,7 +36,7 @@ 20230618 0.8.7 2.5.3 - 1.2.3 + 1.2.4 diff --git a/src/main/java/com/contentstack/sdk/Constants.java b/src/main/java/com/contentstack/sdk/Constants.java index 5a1c19c7..fcb5fab9 100644 --- a/src/main/java/com/contentstack/sdk/Constants.java +++ b/src/main/java/com/contentstack/sdk/Constants.java @@ -21,7 +21,7 @@ public class Constants { private static final Logger logger = Logger.getLogger(Constants.class.getSimpleName()); - protected static final String SDK_VERSION = "1.12.2"; + protected static final String SDK_VERSION = "1.12.3"; protected static final String ENVIRONMENT = "environment"; protected static final String CONTENT_TYPE_UID = "content_type_uid"; protected static final String ENTRY_UID = "entry_uid"; From 52161c8baf9e9c10e8ba8aa73cb2a403463819f4 Mon Sep 17 00:00:00 2001 From: Shailesh Mishra Date: Tue, 3 Oct 2023 11:11:53 +0530 Subject: [PATCH 6/6] Utils SDK Updated to latest version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 15cb186c..d326775a 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ 2.2.1 3.4.1 3.0.0 - 3.1.7 + 3.1.8 2.9.0 5.0.0-alpha.11 0.8.5