Skip to content

Commit 734c29a

Browse files
Taxonomy and Terms
keep Alive Duration Snyk issue
1 parent 82dd69b commit 734c29a

File tree

11 files changed

+97
-124
lines changed

11 files changed

+97
-124
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@
8888
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
8989
<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
9090
<dotenv-source.version>5.2.2</dotenv-source.version>
91-
<rxjava-source.version>3.1.7</rxjava-source.version>
91+
<rxjava-source.version>3.1.8</rxjava-source.version>
9292
<retrofit-source.version>2.9.0</retrofit-source.version>
9393
<converter-gson-version>2.9.0</converter-gson-version>
9494
<logging.version>5.0.0-alpha.11</logging.version>
9595
<jococo-plugin.version>0.8.7</jococo-plugin.version>
96-
<lombok-source.version>1.18.28</lombok-source.version>
96+
<lombok-source.version>1.18.30</lombok-source.version>
9797
<junit-jupiter.version>5.10.0</junit-jupiter.version>
9898
<junit-jupiter-engine.version>5.8.0-M1</junit-jupiter-engine.version>
9999
<gson.version>2.10.1</gson.version>
@@ -168,7 +168,7 @@
168168
<dependency>
169169
<groupId>org.mockito</groupId>
170170
<artifactId>mockito-core</artifactId>
171-
<version>5.5.0</version>
171+
<version>5.6.0</version>
172172
<scope>test</scope>
173173
</dependency>
174174
<dependency>

src/main/java/com/contentstack/cms/BaseImplementation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.util.HashMap;
66

77
/**
8-
* The interface @{@link BaseImplementation}
8+
* The interface BaseImplementation
99
*/
1010
public interface BaseImplementation<T> {
1111

src/main/java/com/contentstack/cms/Contentstack.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,6 @@ public Builder() {
494494
* Contentstack contentstack = new Contentstack.Builder().setProxy(proxy).build();
495495
* <p>
496496
* }
497-
* </pre>
498-
*
499497
* @param proxy the proxy
500498
* @return the Builder instance
501499
*/

src/main/java/com/contentstack/cms/stack/Alias.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@
1818
*
1919
* @author ***REMOVED***
2020
* @version v0.1.0
21-
* @see <a href=
22-
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#aliases">About
23-
* Aliases
24-
* </a>
25-
* @since 2022-10-20
21+
* @see <a href= "https://www.contentstack.com/docs/developers/apis/content-management-api/#aliases">About Aliases </a>
22+
* @since 2022 -10-20
2623
*/
2724
public class Alias implements BaseImplementation<Alias> {
2825

@@ -137,7 +134,6 @@ protected void clearParams() {
137134
/**
138135
* The Get all aliases request returns comprehensive information of all the
139136
* aliases available in a particular stack in your account.
140-
* <p>
141137
*
142138
* @return Call
143139
* @author ***REMOVED***
@@ -179,7 +175,6 @@ public Call<ResponseBody> fetch() {
179175
*
180176
* @param body the request body
181177
* @return Call
182-
* @author ***REMOVED***
183178
* @see <a href=
184179
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#assign-or-update-an-alias">Update
185180
* a
@@ -201,7 +196,6 @@ public Call<ResponseBody> update(@NotNull JSONObject body) {
201196
* of your alias.
202197
*
203198
* @return Call
204-
* @author ***REMOVED***
205199
* @see <a href=
206200
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#delete-an-alias">Delete
207201
* a branch</a>

src/main/java/com/contentstack/cms/stack/GlobalField.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ protected GlobalField clearParams() {
150150
* all
151151
* environments
152152
* </a>
153-
* @see #addHeader(String, Object) to add headers
153+
* @see #addHeader(String, String) to add headers
154154
* @see #addParam(String, Object) to add query parameters
155155
* @since 0.1.0
156156
*/
@@ -179,7 +179,7 @@ public Call<ResponseBody> find() {
179179
* a
180180
* single global field
181181
* </a>
182-
* @see #addHeader(String, Object) to add headers
182+
* @see #addHeader(String, String) to add headers
183183
* @see #addParam(String, Object) to add query parameters
184184
* @since 0.1.0
185185
*/
@@ -212,7 +212,7 @@ public Call<ResponseBody> fetch() {
212212
* field
213213
*
214214
* </a>
215-
* @see #addHeader(String, Object) to add headers
215+
* @see #addHeader(String, String) to add headers
216216
* @since 0.1.0
217217
*/
218218
public Call<ResponseBody> create(@NotNull JSONObject requestBody) {
@@ -241,7 +241,7 @@ public Call<ResponseBody> create(@NotNull JSONObject requestBody) {
241241
* field
242242
*
243243
* </a>
244-
* @see #addHeader(String, Object) to add headers
244+
* @see #addHeader(String, String) to add headers
245245
* @since 0.1.0
246246
*/
247247
public Call<ResponseBody> update(@NotNull JSONObject requestBody) {
@@ -266,7 +266,7 @@ public Call<ResponseBody> update(@NotNull JSONObject requestBody) {
266266
* global
267267
* field
268268
* </a>
269-
* @see #addHeader(String, Object) to add headers
269+
* @see #addHeader(String, String) to add headers
270270
* @since 0.1.0
271271
*/
272272
public Call<ResponseBody> delete() {
@@ -294,7 +294,7 @@ public Call<ResponseBody> delete() {
294294
* field
295295
*
296296
* </a>
297-
* @see #addHeader(String, Object) to add headers
297+
* @see #addHeader(String, String) to add headers
298298
* @since 0.1.0
299299
*/
300300
public Call<ResponseBody> imports(@NotNull JSONObject body) {
@@ -314,7 +314,7 @@ public Call<ResponseBody> imports(@NotNull JSONObject body) {
314314
* field
315315
*
316316
* </a>
317-
* @see #addHeader(String, Object) to add headers
317+
* @see #addHeader(String, String) to add headers
318318
* @since 0.1.0
319319
*/
320320
public Call<ResponseBody> export() {

src/main/java/com/contentstack/cms/stack/PublishQueue.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ protected void clearParams() {
159159
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#get-publish-queue">Get
160160
* publish queue
161161
* </a>
162-
* @see #addHeader(String, Object) to add headers
162+
* @see #addHeader(String, String) to add headers
163163
* @see #addParam(String, Object) to add query parameters
164164
* @since 0.1.0
165165
*/
@@ -182,7 +182,7 @@ public Call<ResponseBody> find() {
182182
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#get-publish-queue-activity">Get
183183
* publish queue activity
184184
* </a>
185-
* @see #addHeader(String, Object) to add headers
185+
* @see #addHeader(String, String) to add headers
186186
* @see #addParam(String, Object) to add query parameters
187187
* @since 0.1.0
188188
*/
@@ -202,7 +202,7 @@ public Call<ResponseBody> fetchActivity() {
202202
* scheduled action
203203
*
204204
* </a>
205-
* @see #addHeader(String, Object) to add headers
205+
* @see #addHeader(String, String) to add headers
206206
* @see #addParam(String, Object) to add query parameters
207207
* @since 0.1.0
208208
*/

src/main/java/com/contentstack/cms/stack/Release.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void validate() {
6666
* @param value The "value" parameter is of type Object, which means it can
6767
* accept any type of
6868
* object as its value.
69-
* @return instance of {@link @Release}
69+
* @return instance of Release
7070
*/
7171
@Override
7272
public Release addParam(@NotNull String key, @NotNull Object value) {
@@ -81,7 +81,7 @@ public Release addParam(@NotNull String key, @NotNull Object value) {
8181
* header.
8282
* @param value The value parameter is a string that represents the value of the
8383
* header.
84-
* @return instance of {@link @Release}
84+
* @return instance of Release
8585
*/
8686
@Override
8787
public Release addHeader(@NotNull String key, @NotNull String value) {
@@ -93,7 +93,7 @@ public Release addHeader(@NotNull String key, @NotNull String value) {
9393
* @param params The "params" parameter is a HashMap that maps String keys to
9494
* Object values. It is
9595
* annotated with @NotNull, indicating that it cannot be null.
96-
* @return instance of {@link @Release}
96+
* @return instance of Release
9797
*/
9898
@Override
9999
public Release addParams(@NotNull HashMap<String, Object> params) {
@@ -106,7 +106,7 @@ public Release addParams(@NotNull HashMap<String, Object> params) {
106106
* is a String
107107
* representing the header name and the value is a String
108108
* representing the header value.
109-
* @return instance of {@link @Release}
109+
* @return instance of Release
110110
*/
111111
@Override
112112
public Release addHeaders(@NotNull HashMap<String, String> headers) {

src/main/java/com/contentstack/cms/stack/Roles.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
/**
1313
* A role is a collection of permissions that will be applicable to all the
1414
* users who are assigned this role.
15-
* <p>
1615
*
1716
* @author ***REMOVED***
1817
* @version v0.1.0

src/main/java/com/contentstack/cms/stack/Taxonomy.java

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,46 @@
1010
import java.util.HashMap;
1111

1212

13+
/**
14+
* The type Taxonomy.
15+
*/
1316
public class Taxonomy implements BaseImplementation<Taxonomy> {
1417

1518
private String taxonomyId;
19+
/**
20+
* The Taxonomy service.
21+
*/
1622
final TaxonomyService taxonomyService;
23+
/**
24+
* The Headers.
25+
*/
1726
protected HashMap<String, Object> headers;
27+
/**
28+
* The Params.
29+
*/
1830
protected HashMap<String, Object> params;
1931

2032

33+
/**
34+
* Instantiates a new Taxonomy.
35+
*
36+
* @param client the client
37+
* @param headers the headers
38+
*/
2139
protected Taxonomy(Retrofit client, HashMap<String, Object> headers) {
2240
this.headers = new HashMap<>();
2341
this.params = new HashMap<>();
2442
this.headers.putAll(headers);
2543
this.taxonomyService = client.create(TaxonomyService.class);
2644
}
2745

46+
/**
47+
* Instantiates a new Taxonomy.
48+
*
49+
* @param client the client
50+
* @param headers the headers
51+
* @param taxonomyId the taxonomy id
52+
*/
2853
protected Taxonomy(Retrofit client, HashMap<String, Object> headers, @NotNull String taxonomyId) {
2954
this.headers = new HashMap<>();
3055
this.params = new HashMap<>();
@@ -122,15 +147,9 @@ public Taxonomy addParams(@NotNull HashMap<String, Object> params) {
122147
* </li>
123148
* </ul>
124149
*
125-
* @return the call
126-
*
127-
* <p></p>
128-
* <b>Example</b>
129-
* <pre>
130-
* {@code
150+
* @return the call <p></p> <b>Example</b> <pre> {@code
131151
* Response<ResponseBody> response = taxonomy.find().execute();
132-
* }
133-
* </pre>
152+
* } </pre>
134153
*/
135154
public Call<ResponseBody> find() {
136155
return this.taxonomyService.find(this.headers, this.params);
@@ -153,14 +172,9 @@ public Call<ResponseBody> find() {
153172
* </ul>
154173
*
155174
* @param taxonomyId the taxonomy id
156-
* @return the call
157-
* <p></p>
158-
* <b>Example</b>
159-
* <pre>
160-
* {@code
175+
* @return the call <p></p> <b>Example</b> <pre> {@code
161176
* Response<ResponseBody> response = taxonomy.fetch("taxonomyId").execute();
162-
* }
163-
* </pre>
177+
* } </pre>
164178
*/
165179
public Call<ResponseBody> fetch(@NotNull String taxonomyId) {
166180
return this.taxonomyService.fetch(this.headers, taxonomyId, this.params);
@@ -170,16 +184,10 @@ public Call<ResponseBody> fetch(@NotNull String taxonomyId) {
170184
* Create Taxonomy call.
171185
*
172186
* @param body the body
173-
* @return the call
174-
*
175-
* <p></p>
176-
* <b>Example</b>
177-
* <pre>
178-
* {@code
187+
* @return the call <p></p> <b>Example</b> <pre> {@code
179188
* JSONObject body = new JSONObject
180189
* Response<ResponseBody> response = taxonomy.create(body).execute();
181-
* }
182-
* </pre>
190+
* } </pre>
183191
*/
184192
public Call<ResponseBody> create(@NotNull JSONObject body) {
185193
return this.taxonomyService.create(this.headers, body);
@@ -190,20 +198,14 @@ public Call<ResponseBody> create(@NotNull JSONObject body) {
190198
*
191199
* @param taxonomyId - The taxonomy for which we need to update the details
192200
* @param body the body
193-
* @return the call
194-
*
195-
* <p></p>
196-
* <b>Example</b>
197-
* <pre>
198-
* {@code
201+
* @return the call <p></p> <b>Example</b> <pre> {@code
199202
* JSONObject body = new JSONObject();
200203
* JSONObject bodyContent = new JSONObject();
201204
* bodyContent.put("name", "Taxonomy 1");
202205
* bodyContent.put("description", "Description updated for Taxonomy 1);
203206
* body.put("taxonomy", bodyContent);
204207
* Response<ResponseBody> response = taxonomy.update("taxonomyId", body).execute();
205-
* }
206-
* </pre>
208+
* } </pre>
207209
*/
208210
public Call<ResponseBody> update(@NotNull String taxonomyId, @NotNull JSONObject body) {
209211
return this.taxonomyService.update(this.headers, taxonomyId, body);
@@ -213,14 +215,9 @@ public Call<ResponseBody> update(@NotNull String taxonomyId, @NotNull JSONObject
213215
* Delete Taxonomy call.
214216
*
215217
* @param taxonomyId - The taxonomy for which we need to update the details
216-
* @return the call
217-
* <p></p>
218-
* <b>Example</b>
219-
* <pre>
220-
* {@code
218+
* @return the call <p></p> <b>Example</b> <pre> {@code
221219
* Response<ResponseBody> response = taxonomy.delete("taxonomyId").execute();
222-
* }
223-
* </pre>
220+
* } </pre>
224221
*/
225222
public Call<ResponseBody> delete(@NotNull String taxonomyId) {
226223
return this.taxonomyService.delete(this.headers, taxonomyId);
@@ -241,7 +238,7 @@ protected void clearParams() {
241238
* <pre>
242239
* {@code
243240
* Term terms = stack("authtoken").taxonomy("taxonomyId").term();
244-
* }
241+
* }*
245242
* </pre>
246243
*
247244
* @return instance of {@link Terms}

0 commit comments

Comments
 (0)