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 c4a942a9..d326775a 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 @@ -20,12 +20,12 @@ 2.2.1 3.4.1 3.0.0 - 3.1.6 + 3.1.8 2.9.0 - 4.11.0 + 5.0.0-alpha.11 0.8.5 - 1.18.28 - 5.9.2 + 1.18.30 + 5.10.0 5.8.0-M1 2.8.8 1.1.1 @@ -33,10 +33,10 @@ 1.5 3.8.1 1.6.13 - 20230227 + 20230618 0.8.7 2.5.3 - 1.2.3 + 1.2.4 @@ -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 @@ -87,19 +87,18 @@ - + ossrh https://oss.sonatype.org/content/repositories/snapshots - + - - - + + 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 @@ -312,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 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, 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";