diff --git a/changelog.md b/changelog.md
index 42a19a6b..2004b85f 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,10 @@
# Changelog
+## v1.3.3
+-Fix:
+ - Constructor in Java class files now include missing headers
+### Apr 09, 2024
+
## v1.3.2
### March 28, 2024
diff --git a/pom.xml b/pom.xml
index 8730036f..d61421dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
cms
jar
contentstack-management-java
- 1.3.2
+ 1.3.3
Contentstack Java Management SDK for Content Management API, Contentstack is a headless CMS with an
API-first approach
diff --git a/src/main/java/com/contentstack/cms/stack/Alias.java b/src/main/java/com/contentstack/cms/stack/Alias.java
index 1da9ca72..b939b4ac 100644
--- a/src/main/java/com/contentstack/cms/stack/Alias.java
+++ b/src/main/java/com/contentstack/cms/stack/Alias.java
@@ -35,8 +35,9 @@ public class Alias implements BaseImplementation {
// also creates an
// instance of the `AliasService` interface using the provided `Retrofit`
// instance.
- protected Alias(Retrofit instance) {
+ protected Alias(Retrofit instance,Map headers) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.headers.put("Content-Type", "application/json");
params = new HashMap<>();
this.service = instance.create(AliasService.class);
@@ -45,8 +46,9 @@ protected Alias(Retrofit instance) {
// The `protected Alias(Retrofit instance, String aliasUid)` constructor is used
// to create an
// instance of the `Alias` class with a specific alias UID.
- protected Alias(Retrofit instance, String aliasUid) {
+ protected Alias(Retrofit instance,Map headers, String aliasUid) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.headers.put("Content-Type", "application/json");
params = new HashMap<>();
this.uid = aliasUid;
diff --git a/src/main/java/com/contentstack/cms/stack/Asset.java b/src/main/java/com/contentstack/cms/stack/Asset.java
index 7c42e134..122d43db 100644
--- a/src/main/java/com/contentstack/cms/stack/Asset.java
+++ b/src/main/java/com/contentstack/cms/stack/Asset.java
@@ -117,7 +117,7 @@ protected void clearParams() {
* @return Folder
*/
public Folder folder() {
- return new Folder(this.instance);
+ return new Folder(this.instance,this.headers);
}
/**
@@ -127,7 +127,7 @@ public Folder folder() {
* @return Folder
*/
public Folder folder(@NotNull String folderUid) {
- return new Folder(this.instance, folderUid);
+ return new Folder(this.instance,this.headers, folderUid);
}
/**
diff --git a/src/main/java/com/contentstack/cms/stack/AuditLog.java b/src/main/java/com/contentstack/cms/stack/AuditLog.java
index 6e7b30d2..83df9bcd 100644
--- a/src/main/java/com/contentstack/cms/stack/AuditLog.java
+++ b/src/main/java/com/contentstack/cms/stack/AuditLog.java
@@ -7,6 +7,7 @@
import retrofit2.Retrofit;
import java.util.HashMap;
+import java.util.Map;
import java.util.Objects;
/**
@@ -37,14 +38,16 @@ public class AuditLog implements BaseImplementation {
protected HashMap params;
private String logItemUid;
- protected AuditLog(Retrofit retrofit) {
+ protected AuditLog(Retrofit retrofit,Map headers) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.service = retrofit.create(AuditLogService.class);
}
- protected AuditLog(Retrofit retrofit, String uid) {
+ protected AuditLog(Retrofit retrofit,Map headers, String uid) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.logItemUid = uid;
this.service = retrofit.create(AuditLogService.class);
diff --git a/src/main/java/com/contentstack/cms/stack/Branch.java b/src/main/java/com/contentstack/cms/stack/Branch.java
index e67987c4..e10d6bee 100644
--- a/src/main/java/com/contentstack/cms/stack/Branch.java
+++ b/src/main/java/com/contentstack/cms/stack/Branch.java
@@ -34,15 +34,17 @@ public class Branch implements BaseImplementation {
private Retrofit instance;
private String baseBranchId;
- protected Branch(Retrofit instance) {
+ protected Branch(Retrofit instance,Map headers) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.headers.put("Content-Type", "application/json");
this.params = new HashMap<>();
this.service = instance.create(BranchService.class);
}
- protected Branch(Retrofit instance, String uid) {
+ protected Branch(Retrofit instance,Map headers, String uid) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.headers.put("Content-Type", "application/json");
this.baseBranchId = uid;
this.params = new HashMap<>();
diff --git a/src/main/java/com/contentstack/cms/stack/BulkOperation.java b/src/main/java/com/contentstack/cms/stack/BulkOperation.java
index 506420a3..8b40ab9f 100644
--- a/src/main/java/com/contentstack/cms/stack/BulkOperation.java
+++ b/src/main/java/com/contentstack/cms/stack/BulkOperation.java
@@ -8,6 +8,7 @@
import retrofit2.Retrofit;
import java.util.HashMap;
+import java.util.Map;
/**
* You can perform bulk operations such as Publish, Unpublished, and Delete on
@@ -48,8 +49,9 @@ public class BulkOperation implements BaseImplementation {
*
* @param retrofit the retrofit
*/
- protected BulkOperation(Retrofit retrofit) {
+ protected BulkOperation(Retrofit retrofit,Map headers) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.retrofit = retrofit;
this.service = this.retrofit.create(BulkOperationService.class);
diff --git a/src/main/java/com/contentstack/cms/stack/DeliveryToken.java b/src/main/java/com/contentstack/cms/stack/DeliveryToken.java
index 1cb30e93..8c113fdf 100644
--- a/src/main/java/com/contentstack/cms/stack/DeliveryToken.java
+++ b/src/main/java/com/contentstack/cms/stack/DeliveryToken.java
@@ -7,6 +7,7 @@
import retrofit2.Call;
import java.util.HashMap;
+import java.util.Map;
import java.util.Objects;
/**
@@ -31,14 +32,16 @@ public class DeliveryToken implements BaseImplementation {
private String tokenUid;
String ERROR = "Token UID Can Not Be Null OR Empty";
- protected DeliveryToken(TokenService service) {
+ protected DeliveryToken(TokenService service, Map headers) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.service = service;
}
- protected DeliveryToken(TokenService service, @NotNull String tokenUid) {
+ protected DeliveryToken(TokenService service, Map headers, @NotNull String tokenUid) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.tokenUid = tokenUid;
this.service = service;
diff --git a/src/main/java/com/contentstack/cms/stack/Environment.java b/src/main/java/com/contentstack/cms/stack/Environment.java
index fdbfde50..e2e76c0c 100644
--- a/src/main/java/com/contentstack/cms/stack/Environment.java
+++ b/src/main/java/com/contentstack/cms/stack/Environment.java
@@ -27,15 +27,17 @@ public class Environment implements BaseImplementation {
protected final EnvironmentService service;
protected String environment;
- protected Environment(Retrofit instance) {
+ protected Environment(Retrofit instance, Map headers) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.service = instance.create(EnvironmentService.class);
}
- protected Environment(Retrofit instance, String environment) {
+ protected Environment(Retrofit instance, Map headers, String environment) {
this.environment = environment;
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.service = instance.create(EnvironmentService.class);
}
diff --git a/src/main/java/com/contentstack/cms/stack/Extensions.java b/src/main/java/com/contentstack/cms/stack/Extensions.java
index 75bd8ea0..063399ad 100644
--- a/src/main/java/com/contentstack/cms/stack/Extensions.java
+++ b/src/main/java/com/contentstack/cms/stack/Extensions.java
@@ -36,14 +36,16 @@ public class Extensions implements BaseImplementation {
protected HashMap params;
protected String customFieldUid;
- protected Extensions(Retrofit retrofit) {
+ protected Extensions(Retrofit retrofit,Map headers) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.service = retrofit.create(ExtensionsService.class);
}
- protected Extensions(Retrofit retrofit, String fieldUid) {
+ protected Extensions(Retrofit retrofit,Map headers, String fieldUid) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.customFieldUid = fieldUid;
this.service = retrofit.create(ExtensionsService.class);
diff --git a/src/main/java/com/contentstack/cms/stack/Folder.java b/src/main/java/com/contentstack/cms/stack/Folder.java
index b8211427..a249b598 100644
--- a/src/main/java/com/contentstack/cms/stack/Folder.java
+++ b/src/main/java/com/contentstack/cms/stack/Folder.java
@@ -18,14 +18,16 @@ public class Folder implements BaseImplementation {
protected final AssetService service;
private String folderUid;
- protected Folder(Retrofit instance) {
+ protected Folder(Retrofit instance,Map headers) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
params = new HashMap<>();
this.service = instance.create(AssetService.class);
}
- protected Folder(Retrofit instance, String folderUid) {
+ protected Folder(Retrofit instance,Map headers, String folderUid) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
params = new HashMap<>();
this.folderUid = folderUid;
this.service = instance.create(AssetService.class);
diff --git a/src/main/java/com/contentstack/cms/stack/GlobalField.java b/src/main/java/com/contentstack/cms/stack/GlobalField.java
index 98df66b5..c35c5688 100644
--- a/src/main/java/com/contentstack/cms/stack/GlobalField.java
+++ b/src/main/java/com/contentstack/cms/stack/GlobalField.java
@@ -8,6 +8,7 @@
import retrofit2.Retrofit;
import java.util.HashMap;
+import java.util.Map;
/**
* A Global field is a reusable field (or group of fields) that you can define
@@ -37,14 +38,16 @@ public class GlobalField implements BaseImplementation {
protected HashMap params;
protected String globalFiledUid;
- protected GlobalField(Retrofit retrofit) {
+ protected GlobalField(Retrofit retrofit,Map headers) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.service = retrofit.create(GlobalFieldService.class);
}
- protected GlobalField(Retrofit retrofit, String uid) {
+ protected GlobalField(Retrofit retrofit,Map headers, String uid) {
this.headers = new HashMap<>();
+ this.headers.putAll(headers);
this.params = new HashMap<>();
this.globalFiledUid = uid;
this.service = retrofit.create(GlobalFieldService.class);
diff --git a/src/main/java/com/contentstack/cms/stack/Label.java b/src/main/java/com/contentstack/cms/stack/Label.java
index fb41369f..bc5be506 100644
--- a/src/main/java/com/contentstack/cms/stack/Label.java
+++ b/src/main/java/com/contentstack/cms/stack/Label.java
@@ -8,6 +8,7 @@
import retrofit2.Retrofit;
import java.util.HashMap;
+import java.util.Map;
/**
* Labels allow you to group a collection of content within a stack. Using
@@ -32,15 +33,17 @@ public class Label implements BaseImplementation