Skip to content

Commit 51e4261

Browse files
Merge pull request #68 from contentstack/plugins
#67 error handling infinite loop issue
2 parents 4f4bcf0 + 8415115 commit 51e4261

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1761
-1072
lines changed

.github/workflows/maven-publish.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish package to the Maven Central Repository
2+
on:
3+
release:
4+
types: [ created ]
5+
jobs:
6+
publish-maven:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Set up Maven Central Repository
11+
uses: actions/setup-java@v3
12+
with:
13+
java-version: '8'
14+
distribution: 'adopt'
15+
server-id: shaileshmishra
16+
server-username: MAVEN_USERNAME
17+
server-password: MAVEN_PASSWORD
18+
gpg-passphrase: GPG_PASSPHRASE
19+
- name: Publish package
20+
run: mvn --batch-mode deploy
21+
env:
22+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
23+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
24+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
25+
publish-github:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v3
29+
- name: Set up Java for publishing to GitHub Packages
30+
uses: actions/setup-java@v3
31+
with:
32+
java-version: '8'
33+
distribution: 'adopt'
34+
server-id: github
35+
- name: Publish to GitHub Packages
36+
run: mvn --batch-mode deploy
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

AUTHORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Authors
2+
23
- [ishaileshmishra]([email protected])
34
- [shaileshmishra]([email protected])
45

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
11
# CHANGELOG
22

3+
## v1.11.0
4+
5+
### Date: 09-FEB-2023
6+
7+
- Addition of Plugin Support,
8+
- #67 error handling infinite loop issue
9+
- Breaking change: Enums PublishType changed from snake-case to ALL_CAPS
10+
- Basic Improvements
11+
12+
## v1.10.2
13+
14+
### Date: 22-Oct-2022
15+
16+
- LivePreview internal function implementation updated
17+
- Jsoup dependency updated
18+
- Json version updated
19+
320
## v1.10.1
421

22+
### Date: 18-June-2022
23+
24+
- Compile Issue With Gradle
25+
526
### Date: 17-Jun-2022
627

728
- #57 CompileJava issue in Gradle build ecosystem (contentstack-utils)

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2012 - 2022 Contentstack
3+
Copyright (c) 2012 - 2023 Contentstack
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
[![Contentstack](https://www.contentstack.com/docs/static/images/contentstack.png)](https://www.contentstack.com/)
1+
# [![Contentstack](https://www.contentstack.com/docs/static/images/contentstack.png)](https://www.contentstack.com/)
22

33
## Java SDK for Contentstack
44

55
Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favorite languages. Build your application frontend, and Contentstack will take care of the rest. [Read More](https://www.contentstack.com/).
66

77
Contentstack provides Java SDK to build application on top of Java. Given below is the detailed guide and helpful resources to get started with our Java SDK.
88

9-
109
### Prerequisite
1110

1211
You will need JDK installed on your machine. You can install it from [here](http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html).
@@ -15,13 +14,14 @@ You will need JDK installed on your machine. You can install it from [here](http
1514

1615
To use the Contentstack Java SDK to your existing project, perform the steps given below:
1716

18-
Group id: `com.contentstack.sdk`
17+
Group Id: ```com.contentstack.sdk```
18+
19+
Artifact Id: ```java```
1920

20-
Artifact id: `java`
21+
[LATEST VERSION](https://search.maven.org/artifact/com.contentstack.sdk/java)
2122

22-
[{ version }](https://search.maven.org/artifact/com.contentstack.sdk/java)
23+
#### Maven
2324

24-
1. **Maven**
2525
```java
2626
<dependency>
2727
<groupId>com.contentstack.sdk</groupId>
@@ -30,7 +30,8 @@ Artifact id: `java`
3030
</dependency>
3131
```
3232

33-
2. **Gradle**
33+
#### Gradle
34+
3435
```java
3536
implementation 'com.contentstack.sdk:java:{version}'
3637
```
@@ -59,19 +60,17 @@ Assets refer to all the media files (images, videos, PDFs, audio files, and so o
5960

6061
A publishing environment corresponds to one or more deployment servers or a content delivery destination where the entries need to be published. Learn how to work with [Environments](https://www.contentstack.com/docs/guide/environments).
6162

62-
63-
6463
### Contentstack Java SDK: 5-minute Quickstart
6564

6665
#### Initializing your SDK
6766

6867
To initialize the SDK, specify application API key, access token, and environment name of the stack as shown in the snippet given below:
68+
6969
```java
7070
Stack stack=Contentstack.stack("apiKey","accessToken","environment");
7171
```
72-
To get the API credentials mentioned above, log in to your Contentstack account and then in your top panel navigation, go to Settings &gt; Stack to view the API Key and Access Token.
73-
7472

73+
To get the API credentials mentioned above, log in to your Contentstack account and then in your top panel navigation, go to Settings &gt; Stack to view the API Key and Access Token.
7574

7675
#### Querying content from your stack
7776

@@ -101,7 +100,7 @@ To retrieve multiple entries of a particular content type, use the code snippet
101100
Query query = stack.contentType("content_type_uid").query();
102101
query.find(new QueryResultsCallBack(){
103102
@Override
104-
public void onCompletion(ResponseType responseType, QueryResult queryResult, Error error) {
103+
public void onCompletion(ResponseType responseType, QueryResult queryResult, Error error) {
105104
if(error == null){
106105
//Success block
107106
}else{
@@ -110,7 +109,6 @@ query.find(new QueryResultsCallBack(){
110109
});
111110
```
112111

113-
114112
### Advanced Queries
115113

116114
You can query for content types, entries, assets and more using our Java API Reference.
@@ -121,7 +119,7 @@ You can query for content types, entries, assets and more using our Java API Ref
121119

122120
We have introduced Image Delivery APIs that let you retrieve images and then manipulate and optimize them for your digital properties. It lets you perform a host of other actions such as crop, trim, resize, rotate, overlay, and so on.
123121

124-
For example, if you want to crop an image (with width as 300 and height as 400), you simply need to append query parameters at the end of the image URL, such as, https://images.contentstack.io/v3/assets/download?crop=300,400. There are several more parameters that you can use for your images.
122+
For example, if you want to crop an image (with width as 300 and height as 400), you simply need to append query parameters at the end of the image URL, such as, <https://images.contentstack.io/v3/assets/download?crop=300>,400. There are several more parameters that you can use for your images.
125123

126124
[Read Image Delivery API documentation](https://www.contentstack.com/docs/apis/image-delivery-api/).
127125

pom.xml

+16-14
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,41 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.contentstack.sdk</groupId>
77
<artifactId>java</artifactId>
8-
<version>1.10.1-SNAPSHOT</version>
8+
<version>1.11.0-SNAPSHOT</version>
99
<packaging>jar</packaging>
1010
<name>contentstack-java</name>
1111
<description>Java SDK for Contentstack Content Delivery API</description>
1212
<url>https://github.com/contentstack/contentstack-java/</url>
1313

1414

1515
<properties>
16-
<sdk.version.release>1.10.1-SNAPSHOT</sdk.version.release>
16+
<sdk.version.release>1.11.0-SNAPSHOT</sdk.version.release>
1717
<maven.compiler.target>1.8</maven.compiler.target>
1818
<maven.compiler.source>1.8</maven.compiler.source>
1919
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2020
<surefire-report-plugin.version>2.22.0</surefire-report-plugin.version>
2121
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
22-
<maven-javadoc-plugin.version>3.3.2</maven-javadoc-plugin.version>
23-
<dotenv-source.version>2.2.4</dotenv-source.version>
22+
<maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
23+
<dotenv-source.version>2.3.1</dotenv-source.version>
2424
<rxjava-source.version>3.1.5</rxjava-source.version>
2525
<retrofit-source.version>2.9.0</retrofit-source.version>
2626
<converter-gson-source.version>2.9.0</converter-gson-source.version>
27-
<loggin.version>4.9.3</loggin.version>
27+
<loggin.version>4.10.0</loggin.version>
2828
<jococo-plugin.version>0.8.5</jococo-plugin.version>
2929
<lombok-source.version>1.18.24</lombok-source.version>
30-
<junit-jupiter.version>5.8.2</junit-jupiter.version>
30+
<junit-jupiter.version>5.9.1</junit-jupiter.version>
3131
<junit-jupiter-engine.version>5.8.0-M1</junit-jupiter-engine.version>
32-
<junit-vintage-engine.version>5.8.2</junit-vintage-engine.version>
32+
<junit-vintage-engine.version>5.9.1</junit-vintage-engine.version>
3333
<gson.version>2.8.8</gson.version>
3434
<json-simple-version>1.1.1</json-simple-version>
3535
<maven-site-plugin.version>3.3</maven-site-plugin.version>
3636
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
3737
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
38-
<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
39-
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
40-
<json-version>20220320</json-version>
38+
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
39+
<json-version>20220924</json-version>
4140
<jacoco-maven-plugin-version>0.8.7</jacoco-maven-plugin-version>
4241
<maven-release-plugin-version>2.5.3</maven-release-plugin-version>
43-
<nexus-staging-maven-plugin-version>1.6.7</nexus-staging-maven-plugin-version>
44-
<contentstack-utils-version>1.1.2</contentstack-utils-version>
42+
<contentstack-utils-version>1.2.0</contentstack-utils-version>
4543
</properties>
4644

4745
<parent>
@@ -199,7 +197,8 @@
199197
</execution>
200198
</executions>
201199
</plugin>
202-
200+
<!--Generate overview.html file-->
201+
<!-- -overview "/Users/shaileshmishra/Documents/workspace/contentstack/javaspace/contentstack-java/src/main/overview.html" -bottom "<b>Copyright © 2012-2022 Contentstack </b><sup>TM</sup>" -->
203202
<plugin>
204203
<groupId>org.apache.maven.plugins</groupId>
205204
<artifactId>maven-javadoc-plugin</artifactId>
@@ -211,6 +210,8 @@
211210
<goal>jar</goal>
212211
</goals>
213212
<configuration>
213+
<stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
214+
<show>public</show>
214215
<additionalOptions>-Xdoclint:none</additionalOptions>
215216
<use>false</use>
216217
<use>false</use>
@@ -279,7 +280,7 @@
279280
<plugin>
280281
<groupId>org.sonatype.plugins</groupId>
281282
<artifactId>nexus-staging-maven-plugin</artifactId>
282-
<version>${nexus-staging-maven-plugin-version}</version>
283+
<version>${nexus-staging-maven-plugin.version}</version>
283284
<extensions>true</extensions>
284285
<configuration>
285286
<serverId>ossrh</serverId>
@@ -342,6 +343,7 @@
342343
<exclude>src/main/java/com/contentstack/sdk/FetchResultCallback.class</exclude>
343344
<exclude>src/main/java/com/contentstack/sdk/EntryResultCallBack.class</exclude>
344345
<exclude>src/main/java/com/contentstack/sdk/FetchResultCallback.class</exclude>
346+
<exclude>src/main/java/com/contentstack/sdk/TestLivePreview.class</exclude>
345347
</excludes>
346348
</configuration>
347349
</plugin>

0 commit comments

Comments
 (0)