Skip to content

Commit 38e4a7c

Browse files
package info.java
package info.java to add package info
1 parent babba38 commit 38e4a7c

File tree

16 files changed

+499
-174
lines changed

16 files changed

+499
-174
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
/**
3+
* The top most package to access contentstack instance
4+
*/
15
package com.contentstack.cms;
26

37
import com.contentstack.cms.core.AuthInterceptor;
@@ -29,7 +33,7 @@
2933
* <br>
3034
* <b>Contentstack Java Management SDK</b> interact with the Content Management APIs and allow you to create, update,
3135
* delete, and fetch content from your Contentstack account. They are read-write in nature.
32-
* <b>
36+
* <br>
3337
* You can use them to build your own apps and manage your content from Contentstack.
3438
*/
3539
public class Contentstack {
@@ -420,7 +424,6 @@ public Builder() {
420424
* <br>
421425
* <pre>
422426
* {
423-
* @code
424427
* Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("hostname", 433));
425428
* Contentstack contentstack = new Contentstack.Builder().setProxy(proxy).build();
426429
* }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Useful to access contentstack's core components
3+
*/
4+
package com.contentstack.cms.core;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Useful to access contentstack's models and pojo classes
3+
*/
4+
package com.contentstack.cms.models;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Useful to access contentstack's organizations
3+
*/
4+
package com.contentstack.cms.organization;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* This is topmost package that is used to contains all the sub-packages in itself
3+
* like core, models, organisations, stacks, users and contentstack
4+
*/
5+
package com.contentstack.cms;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ public Call<ResponseBody> single(@NotNull String uid) {
116116
* You can use the same request to update the target branch of an alias. In the “Body” section, you need to provide
117117
* the UID of the new target branch that will be associated with the alias.
118118
*
119+
* @param body
120+
* the request body
119121
* @return Call
120122
* @see <a
121123
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#assign-or-update-an-alias">Update
@@ -134,6 +136,8 @@ public Call<ResponseBody> update(@NotNull JSONObject body) {
134136
* <p>
135137
* When executing the API call, in the “URL Parameters” section, provide the UID of your alias.
136138
*
139+
* @param branchUid
140+
* the branch uid
137141
* @return Call
138142
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#delete-an-alias">Delete a
139143
* branch</a>

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

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -205,27 +205,19 @@ public Call<ResponseBody> subfolder(
205205
* @param requestBody
206206
* Request body for the asset file
207207
* <ul>
208-
* <br>
209208
* <li>asset[upload] (mandatory) Select the input type as 'File'. Then, browse and select the asset file that
210209
* you want to import. Supported file types include JPG, GIF, PNG, XML, WebP, BMP, TIFF, SVG, and PSD</li>
211-
* <br>
212210
* <li>asset[parent_uid] (optional) If needed, assign a parent folder to your asset by passing the UID of the
213211
* parent folder.</li>
214-
* <br>
212+
*
215213
* <li>asset[title] (optional) Enter a title for your uploaded asset.</li>
216-
* <br>
217214
* <li>asset[description] (optional) Enter a description for your uploaded asset.</li>
218-
* <br>
219215
* <li>asset[tags] (optional) Assign a specific tag(s) to your uploaded asset. {@link #addParam(String, Object)}
220216
* The query parameter for the asset to upload</li>
221-
* <br>
222217
* <li>relative_urls(optional) Set this to 'true' to display the relative URL of the asset. Example:false</li>
223-
* <br>
224218
* <li>include_dimension(optional) Set this to 'true' to include the dimensions (height and width) of the image
225219
* in the response.</li>
226-
* <br>
227220
* </ul>
228-
* <br>
229221
* @return Call
230222
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#upload-asset"> Upload
231223
* Asset</a>
@@ -319,7 +311,7 @@ public Call<ResponseBody> generatePermanentUrl(String uid, JSONObject body) {
319311
* @return Call
320312
* @see <a
321313
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#generate-permanent-asset-url">
322-
* Generate Permanent Asset Url
314+
* Generate Permanent Asset Url</a>
323315
* @see #addHeader(String, Object) to add headers
324316
* @see #addParam(String, Object) to add query params
325317
* @since 1.0.0
@@ -333,6 +325,7 @@ public Call<ResponseBody> getPermanentUrl(String uid, String slugUrl) {
333325
*
334326
* @param uid
335327
* the UID of the asset you want to delete asset
328+
* @return Call
336329
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#delete-asset"> Delete
337330
* Asset
338331
* </a>
@@ -350,7 +343,7 @@ public Call<ResponseBody> delete(@NotNull String uid) {
350343
* @return Call
351344
* @see <a
352345
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#get-information-on-rte-assets">
353-
* Get Information On RTE Assets
346+
* Get Information On RTE Assets</a>
354347
* @see #addHeader(String, Object) to add headers
355348
* @see #addParam(String, Object) to add query params
356349
* @since 1.0.0
@@ -381,7 +374,7 @@ public Call<ResponseBody> rteInformation() {
381374
* @return Call
382375
* @see <a
383376
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#get-information-on-rte-assets">
384-
* Get Information On RTE Assets
377+
* Get Information On RTE Assets</a>
385378
* @see #addHeader(String, Object) to add headers
386379
* @since 1.0.0
387380
*/
@@ -416,7 +409,7 @@ public Call<ResponseBody> setVersionName(@NotNull String assetUid, int versionNu
416409
* @return Call
417410
* @see <a
418411
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#get-details-of-all-versions-of-an-asset">
419-
* Get Details of All Versions of an Asset
412+
* Get Details of All Versions of an Asset</a>
420413
* @see #addParam(String, Object) to add Query parameters
421414
* @see #addHeader(String, Object) to add headers
422415
* @since 1.0.0
@@ -438,7 +431,7 @@ public Call<ResponseBody> getVersionNameDetails(@NotNull String assetUid) {
438431
* @return Call
439432
* @see <a
440433
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#delete-version-name-of-asset">
441-
* Delete Version Name Of Asset
434+
* Delete Version Name Of Asset</a>
442435
* @see #addHeader(String, Object) to add headers
443436
* @since 1.0.0
444437
*/
@@ -454,7 +447,7 @@ public Call<ResponseBody> deleteVersionName(@NotNull String assetUid, int versio
454447
* asset uid
455448
* @return Call
456449
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#get-asset-references">
457-
* Get Asset References
450+
* Get Asset References</a>
458451
* @see #addHeader(String, Object) to add headers
459452
* @since 1.0.0
460453
*/
@@ -494,23 +487,23 @@ public Call<ResponseBody> getByType(@NotNull String assetType) {
494487
* and also provide a "Title" and a "Description" for the asset. Another way to provide a "Title" and a
495488
* "Description" for the asset is to pass them as optional form-data parameters, i.e., asset[title] and
496489
* asset[description].
497-
* <p>
498-
* Here's an example of the raw body:
499-
* <p>
490+
* <br>
491+
* <b>Here's an example of the body:</b>
492+
* <br>
500493
* <pre>
501-
* @code { "asset": { "title": "Title", "description": "Description" }, "version": 3 }
494+
* { "asset": { "title": "Title", "description": "Description" }, "version": 3 }
502495
* </pre>
503496
*
504497
* @param assetUid
505498
* The UID of the asset that you want to update details.
506499
* @param requestBody
507-
* JSON Request body
500+
* The request body
508501
* @return Call
509502
* @see #addHeader(String, Object) to add headers
510503
* @see #addParam(String, Object) to add query params
511504
* @since 1.0.0
512505
*/
513-
public Call<ResponseBody> updateDetails(@NotNull String assetUid, @NotNull JSONObject requestBody) {
506+
public Call<ResponseBody> updateDetails(@NotNull String assetUid, JSONObject requestBody) {
514507
return this.service.updateDetails(this.headers, assetUid, this.params, requestBody);
515508
}
516509

@@ -530,7 +523,7 @@ public Call<ResponseBody> updateDetails(@NotNull String assetUid, @NotNull JSONO
530523
* JSON Request body
531524
* @return Call
532525
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#publish-an-asset">
533-
* Publish An Asset
526+
* Publish An Asset</a>
534527
* @see #addHeader(String, Object) to add headers
535528
* @since 1.0.0
536529
*/
@@ -553,7 +546,7 @@ public Call<ResponseBody> publish(@NotNull String assetUid, @NotNull JSONObject
553546
* JSON Request body
554547
* @return Call
555548
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#unpublish-an-asset">
556-
* Unpublish An Asset
549+
* Unpublish An Asset</a>
557550
* @see #addHeader(String, Object) to add headers
558551
* @since 1.0.0
559552
*/
@@ -575,7 +568,7 @@ public Call<ResponseBody> unpublish(
575568
* Example:false
576569
* @return Call
577570
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#unpublish-an-asset">
578-
* Unpublish An Asset
571+
* Unpublish An Asset</a>
579572
* @see #addHeader(String, Object) to add headers
580573
* @see #addParam(String, Object) to add query params
581574
* @since 1.0.0
@@ -597,7 +590,7 @@ public Call<ResponseBody> singleFolder(
597590
* @return Call
598591
* @see <a
599592
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#get-a-single-folder-by-name"> Get
600-
* A Single Folder By Name
593+
* A Single Folder By Name</a>
601594
* @see #addHeader(String, Object) to add headers
602595
* @see #addParam(String, Object) to add query params
603596
* @since 1.0.0
@@ -615,7 +608,7 @@ public Call<ResponseBody> getSingleFolderByName() {
615608
* @return Call
616609
* @see <a
617610
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#get-subfolders-of-a-parent-folder">
618-
* Get subfolders of a parent folder
611+
* Get subfolders of a parent folder</a>
619612
* @see #addHeader(String, Object) to add headers
620613
* @see #addParam(String, Object) to add query params
621614
* @since 1.0.0
@@ -644,7 +637,7 @@ public Call<ResponseBody> getSubfolder() {
644637
* JSONObject request body
645638
* @return Call
646639
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#create-a-folder"> Create
647-
* a folder
640+
* a folder</a>
648641
* @see #addHeader(String, Object) to add headers
649642
* @see #addParam(String, Object) to add query params
650643
* @since 1.0.0
@@ -674,7 +667,7 @@ public Call<ResponseBody> createFolder(@Nullable JSONObject requestBody) {
674667
* JSONObject request body { "asset": { "name": "Demo" } }
675668
* @return Call
676669
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#update-or-move-folder">
677-
* Update ORr Move Folder
670+
* Update ORr Move Folder</a>
678671
* @see #addHeader(String, Object) to add headers
679672
* @see #addParam(String, Object) to add query params
680673
* @since 1.0.0
@@ -692,7 +685,7 @@ public Call<ResponseBody> updateFolder(@NotNull String folderUid, @Nullable JSON
692685
* The UID of the asset folder that you want to delete
693686
* @return Call
694687
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#delete-a-folder">
695-
* Delete A Folder
688+
* Delete A Folder</a>
696689
* @see #addHeader(String, Object) to add headers
697690
* @see #addParam(String, Object) to add query params
698691
* @since 1.0.0

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public Call<ResponseBody> single(@NotNull String uid) {
111111

112112
/**
113113
* The Create a branch request creates a new branch in a particular stack of your organization.
114-
*
114+
* @param body the request body
115115
* @return Call
116116
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#create-a-branch">Create a
117117
* branch</a>
@@ -126,6 +126,8 @@ public Call<ResponseBody> create(@NotNull JSONObject body) {
126126
* The Get assets and folders of a parent folder retrieves details of both assets and asset subfolders within a
127127
* specific parent asset folder.
128128
*
129+
* @param branchUid
130+
* The unique ID of the branch of which you want to retrieve the details.
129131
* @return Call
130132
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#delete-a-branch">Delete a
131133
* branch</a>

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,10 @@ public Call<ResponseBody> single(@NotNull String entryUid) {
148148
* <br>
149149
*
150150
* @param requestBody
151-
* Provide the Json Body to create entry: <pre
152-
* <code>
153-
* { "entry": { "title": "Entry title", "url": "Entry URL", "reference_field_uid": [{ "uid": "the_uid",
154-
* "_content_type_uid": "referred_content_type_uid" }] } }</code>
155-
* </pre>
151+
* Provide the Json Body to create entry: <pre>
152+
* { "entry": { "title": "Entry title", "url": "Entry URL", "reference_field_uid": [{ "uid": "the_uid",
153+
* "_content_type_uid": "referred_content_type_uid" }] } }
154+
* </pre>
156155
* @return Call
157156
* @see <a href="https://www.contentstack.com/docs/developers/apis/content-management-api/#create-an-entry">Create A
158157
* Entry</a>
@@ -171,7 +170,7 @@ public Call<ResponseBody> create(JSONObject requestBody) {
171170
* <br>
172171
* <b>Note:</b> The Update an entry call does not allow you to update the
173172
* workflow stage for an entry. To update the workflow stage for the entry, use the Set Entry Workflow Stage call.
174-
* </p>
173+
* <br>
175174
*
176175
* @param entryUId
177176
* the unique ID of the content type of which you wish to retrieve the details. The uid is generated based

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,7 @@ public Call<ResponseBody> single(@NotNull String environment) {
137137
*
138138
* @param body
139139
* The {@link JSONObject} request body<br>
140-
* <b>Example:</b>
141-
* <pre
142140
* @return Call
143-
* @code{ { "environment": { "name": "development", "servers": [ { "name": "default" } ], "urls": [ { "locale":
144-
* "en-us", "url": "http://example.com/" } ], "deploy_content": true } }}
145-
* </pre>
146141
* @see <a
147142
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#environment-collection">Get all
148143
* environments
@@ -173,7 +168,7 @@ public Call<ResponseBody> create(@NotNull JSONObject body) {
173168
* @return Call
174169
* @see <a
175170
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#update-environment">Update
176-
* Environment
171+
* Environment</a>
177172
* @see #addHeader(String, Object) to add headers to the request
178173
* @since 1.0.0
179174
*/
@@ -193,7 +188,7 @@ public Call<ResponseBody> update(@NotNull String environmentName, @NotNull JSONO
193188
* @return Call
194189
* @see <a
195190
* href="https://www.contentstack.com/docs/developers/apis/content-management-api/#delete-environment">Delete
196-
* Environment
191+
* Environment</a>
197192
* @see #addHeader(String, Object) to add headers to the request
198193
* @since 1.0.0
199194
*/

0 commit comments

Comments
 (0)