Skip to content

Commit 2951b52

Browse files
🪴 #67 resolved
1 parent 885a6ff commit 2951b52

File tree

8 files changed

+102
-111
lines changed

8 files changed

+102
-111
lines changed

src/main/java/com/contentstack/sdk/Asset.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ public Asset configure(JSONObject jsonObject) {
8787
* <b>Example :</b><br>
8888
*
8989
* <pre class="prettyprint">
90-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
91-
* Asset asset = stack.asset(asset_uid);
92-
* asset.setHeader();
93-
* </pre>
90+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
91+
* Asset asset = stack.asset(asset_uid);
92+
* asset.setHeader();
93+
* </pre>
9494
*/
9595
public void setHeader(@NotNull String headerKey, @NotNull String headerValue) {
9696
headers.put(headerKey, headerValue);
@@ -107,10 +107,10 @@ public void setHeader(@NotNull String headerKey, @NotNull String headerValue) {
107107
* <b>Example :</b><br>
108108
*
109109
* <pre class="prettyprint">
110-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
111-
* Asset asset = stack.asset(asset_uid);
112-
* asset.removeHeader();
113-
* </pre>
110+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
111+
* Asset asset = stack.asset(asset_uid);
112+
* asset.removeHeader();
113+
* </pre>
114114
*/
115115
public void removeHeader(@NotNull String headerKey) {
116116
headers.remove(headerKey);
@@ -419,7 +419,6 @@ public Calendar getDeleteAt() {
419419
* asset.getDeletedBy();
420420
* }
421421
* });
422-
*
423422
* </pre>
424423
*/
425424
public String getDeletedBy() {

src/main/java/com/contentstack/sdk/AssetModel.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ class AssetModel {
2121
/**
2222
* Instantiates a new Asset model.
2323
*
24-
* @param response the response
25-
* @param isArray the is array
24+
* @param response
25+
* the response
26+
* @param isArray
27+
* the is array
2628
*/
2729
public AssetModel(JSONObject response, boolean isArray) {
2830

src/main/java/com/contentstack/sdk/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private static Calendar toCalendar(@NotNull String date) {
109109
*/
110110
public static Calendar parseDate(@NotNull String date, TimeZone timeZone) {
111111
// Use the ISO-8601 format to parse the date string
112-
if (date.isEmpty()){
112+
if (date.isEmpty()) {
113113
return null;
114114
}
115115
Calendar cal = toCalendar(date);

src/main/java/com/contentstack/sdk/ContentType.java

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010

1111
/**
1212
* <a href=
13-
* "https://www.contentstack.com/docs/developers/apis/content-delivery-api/#single-content-type">ContentType</a>
14-
* This call returns information of a specific content type. It returns the
15-
* content type schema, but does not include
16-
* its entries.
13+
* "https://www.contentstack.com/docs/developers/apis/content-delivery-api/#single-content-type">ContentType</a> This
14+
* call returns information of a specific content type. It returns the content type schema, but does not include its
15+
* entries.
1716
*
1817
* @author Shailesh Mishra
1918
* @version 1.0.0
@@ -43,9 +42,9 @@ protected void setStackInstance(Stack stack) {
4342
* Sets header on {@link Stack}.
4443
*
4544
* @param headerKey
46-
* the header key
45+
* the header key
4746
* @param headerValue
48-
* the header value
47+
* the header value
4948
*/
5049
public void setHeader(String headerKey, String headerValue) {
5150
if (!headerKey.isEmpty() && !headerValue.isEmpty()) {
@@ -57,7 +56,7 @@ public void setHeader(String headerKey, String headerValue) {
5756
* Remove header from {@link Stack}
5857
*
5958
* @param headerKey
60-
* the header key
59+
* the header key
6160
*/
6261
public void removeHeader(String headerKey) {
6362
if (!headerKey.isEmpty()) {
@@ -66,15 +65,13 @@ public void removeHeader(String headerKey) {
6665
}
6766

6867
/**
69-
* An entry is the actual piece of content created using one of the defined
70-
* content types.
68+
* An entry is the actual piece of content created using one of the defined content types.
7169
* <p>
72-
* You can now pass the branch header in the API request to fetch or manage
73-
* modules located within specific branches
70+
* You can now pass the branch header in the API request to fetch or manage modules located within specific branches
7471
* of the stack.
7572
*
7673
* @param entryUid
77-
* the entry unique ID of the entry that you want to fetch.
74+
* the entry unique ID of the entry that you want to fetch.
7875
* @return the {@link Entry} entry.
7976
*/
8077
public Entry entry(String entryUid) {
@@ -92,10 +89,8 @@ protected Entry entry() {
9289
}
9390

9491
/**
95-
* Query. The Get all entries request fetches the list of all the entries of a
96-
* particular content type. It returns
97-
* the content of each entry in JSON format. You need to specify the environment
98-
* and locale of which you want to get
92+
* Query. The Get all entries request fetches the list of all the entries of a particular content type. It returns
93+
* the content of each entry in JSON format. You need to specify the environment and locale of which you want to get
9994
* the entries.
10095
*
10196
* <p>
@@ -107,14 +102,10 @@ protected Entry entry() {
107102
* language itself, this parameter would not be applicable.
108103
*
109104
* <p>
110-
* To include the publishing details in the response, make use of the
111-
* include_publish_details=true parameter. This
112-
* will return the publishing details of the entry in every environment along
113-
* with the version number that is
114-
* published in each of the environments. You can add other Queries to extend
115-
* the functionality of this API call.
116-
* Add a query parameter named query and provide your query (in JSON format) as
117-
* the value.
105+
* To include the publishing details in the response, make use of the include_publish_details=true parameter. This
106+
* will return the publishing details of the entry in every environment along with the version number that is
107+
* published in each of the environments. You can add other Queries to extend the functionality of this API call.
108+
* Add a query parameter named query and provide your query (in JSON format) as the value.
118109
*
119110
* @return the {@link Query}
120111
*/
@@ -129,10 +120,11 @@ public Query query() {
129120
* Fetch.
130121
*
131122
* @param params
132-
* the params
123+
* the params
133124
* @param callback
134-
* the callback
135-
* @throws IllegalAccessException illegal access exception
125+
* the callback
126+
* @throws IllegalAccessException
127+
* illegal access exception
136128
*/
137129
public void fetch(@NotNull JSONObject params, final ContentTypesCallback callback) throws IllegalAccessException {
138130
String urlString = "content_types/" + contentTypeUid;
@@ -150,7 +142,7 @@ public void fetch(@NotNull JSONObject params, final ContentTypesCallback callbac
150142
}
151143

152144
private void fetchContentTypes(String urlString, JSONObject params, HashMap<String, Object> headers,
153-
ContentTypesCallback callback) {
145+
ContentTypesCallback callback) {
154146
if (callback != null) {
155147
HashMap<String, Object> urlParams = getUrlParams(params);
156148
new CSBackgroundTask(this, stackInstance, Constants.FETCHCONTENTTYPES, urlString, headers, urlParams,

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ protected Contentstack() throws IllegalAccessException {
3636
* <b>Example</b>
3737
*
3838
* <pre>
39-
* {
40-
* &#64;Code
41-
* Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
42-
* }
39+
* {
40+
* &#64;Code
41+
* Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
42+
* }
4343
*
44-
* </pre>
44+
* </pre>
4545
*/
4646
public static Stack stack(String stackApiKey, String deliveryToken, String environment)
4747
throws IllegalAccessException {

0 commit comments

Comments
 (0)