Skip to content

Commit 6f350ad

Browse files
feat/CS-37219-azure-eu-and-include-metadata
1 parent caf3396 commit 6f350ad

File tree

4 files changed

+48
-75
lines changed

4 files changed

+48
-75
lines changed

.github/workflows/maven-publish.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
jobs:
66
publish-maven:
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
811
steps:
912
- uses: actions/checkout@v3
1013
- name: Set up Maven Central Repository
@@ -13,9 +16,9 @@ jobs:
1316
java-version: '8'
1417
distribution: 'adopt'
1518
server-id: shaileshmishra
16-
server-username: MAVEN_USERNAME
17-
server-password: MAVEN_PASSWORD
18-
gpg-passphrase: GPG_PASSPHRASE
19+
server-username: ${{ secrets.MAVEN_USERNAME }}
20+
server-password: ${{ secrets.MAVEN_PASSWORD }}
21+
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
1922
- name: Publish package
2023
run: mvn --batch-mode deploy
2124
env:

pom.xml

+1-15
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414

1515
<properties>
16-
<sdk.version.release>1.11.0-SNAPSHOT</sdk.version.release>
1716
<maven.compiler.target>1.8</maven.compiler.target>
1817
<maven.compiler.source>1.8</maven.compiler.source>
1918
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -197,7 +196,7 @@
197196
</executions>
198197
</plugin>
199198
<!--Generate overview.html file-->
200-
<!-- -overview "/Users/shaileshmishra/Documents/workspace/contentstack/javaspace/contentstack-java/src/main/overview.html" -bottom "<b>Copyright © 2012-2022 Contentstack </b><sup>TM</sup>" -->
199+
<!-- -overview "/Users/shaileshmishra/Documents/workspace/contentstack/javaspace/contentstack-java/src/main/overview.html" -bottom "<b>Copyright © 2012-2023 Contentstack </b><sup>TM</sup>" -->
201200
<plugin>
202201
<groupId>org.apache.maven.plugins</groupId>
203202
<artifactId>maven-javadoc-plugin</artifactId>
@@ -224,23 +223,16 @@
224223
</execution>
225224
</executions>
226225
</plugin>
227-
228226
<plugin>
229227
<groupId>org.apache.maven.plugins</groupId>
230228
<artifactId>maven-site-plugin</artifactId>
231229
<version>3.3</version>
232230
</plugin>
233-
234231
<plugin>
235232
<groupId>org.apache.maven.plugins</groupId>
236233
<artifactId>maven-enforcer-plugin</artifactId>
237234
<version>3.0.0-M2</version>
238235
</plugin>
239-
<!--
240-
Signs all of a project's attached artifacts with GnuPG.
241-
You need to have previously configured the default key.
242-
gpg also needs to be on the search path.
243-
-->
244236
<plugin>
245237
<groupId>org.apache.maven.plugins</groupId>
246238
<artifactId>maven-gpg-plugin</artifactId>
@@ -255,12 +247,6 @@
255247
</execution>
256248
</executions>
257249
</plugin>
258-
<!--
259-
Sometimes when you may need to compile a certain project to a different
260-
version than what you are currently using. The javac can accept such command
261-
using -source and -target. The Compiler Plugin can also be configured to
262-
provide these options during compilation
263-
-->
264250
<plugin>
265251
<groupId>org.apache.maven.plugins</groupId>
266252
<artifactId>maven-compiler-plugin</artifactId>

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

+28-43
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,11 @@ public Asset configure(JSONObject jsonObject) {
8585
* <br>
8686
* <br>
8787
* <b>Example :</b><br>
88-
*
89-
* <pre class="prettyprint">
90-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
91-
* Asset asset = stack.asset(asset_uid);
92-
* asset.setHeader();
93-
* </pre>
88+
* <p>
89+
* <code>
90+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset =
91+
* stack.asset(asset_uid); asset.setHeader();
92+
* </code>
9493
*/
9594
public void setHeader(@NotNull String headerKey, @NotNull String headerValue) {
9695
headers.put(headerKey, headerValue);
@@ -104,13 +103,12 @@ public void setHeader(@NotNull String headerKey, @NotNull String headerValue) {
104103
*
105104
* <br>
106105
* <br>
107-
* <b>Example :</b><br>
108-
*
109-
* <pre class="prettyprint">
110-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
111-
* Asset asset = stack.asset(asset_uid);
112-
* asset.removeHeader();
113-
* </pre>
106+
* <b>Example :</b>
107+
* <p>
108+
* <code>
109+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset =
110+
* stack.asset(asset_uid); asset.removeHeader();
111+
* <code>
114112
*/
115113
public void removeHeader(@NotNull String headerKey) {
116114
headers.remove(headerKey);
@@ -131,17 +129,12 @@ protected void setUid(@NotNull String assetUid) {
131129
* <br>
132130
* <b>Example :</b><br>
133131
*
134-
* <pre class="prettyprint">
135-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
136-
* Asset asset = stack.asset(asset_uid);
137-
* asset.fetch(new FetchResultCallback() {
138-
* &#64;Override
139-
* public void onCompletion(ResponseType responseType, Error error) {
140-
* asset.getAssetUid();
141-
* }
142-
* });
132+
* <code>
133+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset = stack.asset(asset_uid);
134+
* asset.fetch(new FetchResultCallback() { &#64;Override public void onCompletion(ResponseType responseType, Error
135+
* error) { asset.getAssetUid(); } });
143136
*
144-
* </pre>
137+
* </code>
145138
*/
146139
public String getAssetUid() {
147140
return assetUid;
@@ -157,16 +150,10 @@ public String getAssetUid() {
157150
* <b>Example :</b><br>
158151
*
159152
* <pre class="prettyprint">
160-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
161-
* Asset asset = stack.asset(asset_uid);
162-
* asset.fetch(new FetchResultCallback() {
163-
* &#64;Override
164-
* public void onCompletion(ResponseType responseType, Error error) {
165-
* asset.getFileType();
166-
* }
167-
* });
168-
*
169-
* </pre>
153+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset = stack.asset(asset_uid);
154+
* asset.fetch(new FetchResultCallback() { &#64;Override public void onCompletion(ResponseType responseType, Error
155+
* error) { asset.getFileType(); } });
156+
* </pre>
170157
*/
171158
public String getFileType() {
172159
return contentType;
@@ -519,11 +506,10 @@ public Asset includeFallback() {
519506
* <br>
520507
* <b>Example :</b><br>
521508
*
522-
* <pre class="prettyprint">
523-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
524-
* Asset asset = stack.asset(asset_uid);
525-
* asset.includeBranch();
526-
* </pre>
509+
* <code>
510+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset = stack.asset(asset_uid);
511+
* asset.includeBranch();
512+
* </code>
527513
*/
528514
public Asset includeBranch() {
529515
urlQueries.put("include_branch", true);
@@ -539,11 +525,10 @@ public Asset includeBranch() {
539525
* <br>
540526
* <b>Example :</b><br>
541527
*
542-
* <pre class="prettyprint">
543-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
544-
* Asset asset = stack.asset(asset_uid);
545-
* asset.includeMetadata();
546-
* </pre>
528+
* <code>
529+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment"); Asset asset = stack.asset(asset_uid);
530+
* asset.includeMetadata();
531+
* </code>
547532
*/
548533
public Asset includeMetadata() {
549534
urlQueries.put("include_metadata", true);

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

+13-14
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,10 @@ public Stack livePreviewQuery(Map<String, String> query) throws IOException {
160160
* @return the {@link ContentType}
161161
* <p>
162162
* <b>Example</b>
163-
*
164-
* <pre>
165-
* Stack stack = contentstack.Stack("apiKey",
166-
* "deliveryToken", "environment"); ContentType contentType = stack.contentType("contentTypeUid")
167-
* </pre>
163+
* <code>
164+
* Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment"); ContentType contentType =
165+
* stack.contentType("contentTypeUid")
166+
* </code>
168167
*/
169168
public ContentType contentType(String contentTypeUid) {
170169
this.contentType = contentTypeUid;
@@ -208,11 +207,11 @@ protected Asset asset() {
208207
* @return {@link AssetLibrary} asset library
209208
* <p>
210209
* <b>Example</b>
211-
*
212-
* <pre>
213-
* Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
214-
* AssetLibrary assets = stack.assetLibrary();
215-
* </pre>
210+
* <p>
211+
* <code>
212+
* Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment"); AssetLibrary assets =
213+
* stack.assetLibrary();
214+
* </code>
216215
*/
217216
public AssetLibrary assetLibrary() {
218217
AssetLibrary library = new AssetLibrary();
@@ -370,10 +369,10 @@ public void syncPaginationToken(@NotNull String paginationToken, SyncResultCallB
370369
* <br>
371370
* <b>Example :</b><br>
372371
* <pre class="prettyprint">
373-
* Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
374-
* stack.syncToken("syncToken")
375-
* stack.syncToken(sync_token, new SyncResultCallBack() ){ }
376-
* </pre>
372+
* Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
373+
* stack.syncToken("syncToken")
374+
* stack.syncToken(sync_token, new SyncResultCallBack() ){ }
375+
* </pre>
377376
*/
378377
public void syncToken(String syncToken, SyncResultCallBack syncCallBack) {
379378
syncParams = new JSONObject();

0 commit comments

Comments
 (0)