Skip to content

Commit b7cd762

Browse files
committed
7.0.0-build
1 parent b520f19 commit b7cd762

35 files changed

+193
-156
lines changed

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<url>https://github.com/cloudify-cosmo/cloudify-java-rest-client</url>
1010
<properties>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12-
<jersey.version>2.30</jersey.version>
13-
<slf4j.version>1.7.30</slf4j.version>
12+
<jersey.version>3.1.0</jersey.version>
13+
<slf4j.version>2.0.6</slf4j.version>
1414
</properties>
1515
<licenses>
1616
<license>
@@ -39,7 +39,7 @@
3939
<dependency>
4040
<groupId>jakarta.ws.rs</groupId>
4141
<artifactId>jakarta.ws.rs-api</artifactId>
42-
<version>2.1.6</version>
42+
<version>3.1.0</version>
4343
</dependency>
4444
<dependency>
4545
<groupId>javax.json</groupId>
@@ -54,7 +54,7 @@
5454
<dependency>
5555
<groupId>commons-io</groupId>
5656
<artifactId>commons-io</artifactId>
57-
<version>2.6</version>
57+
<version>2.11.0</version>
5858
</dependency>
5959
<dependency>
6060
<groupId>org.slf4j</groupId>
@@ -64,7 +64,7 @@
6464
<dependency>
6565
<groupId>org.apache.commons</groupId>
6666
<artifactId>commons-compress</artifactId>
67-
<version>1.20</version>
67+
<version>1.22</version>
6868
</dependency>
6969
<!--
7070
Test-time dependencies.

src/main/java/co/cloudify/rest/client/AbstractCloudifyClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
import java.util.Map;
44

5-
import javax.ws.rs.client.Client;
6-
import javax.ws.rs.client.Invocation.Builder;
7-
import javax.ws.rs.client.WebTarget;
8-
import javax.ws.rs.core.MediaType;
5+
import jakarta.ws.rs.client.Client;
6+
import jakarta.ws.rs.client.Invocation.Builder;
7+
import jakarta.ws.rs.client.WebTarget;
8+
import jakarta.ws.rs.core.MediaType;
99

1010
import org.apache.commons.lang3.StringUtils;
1111

1212
/**
1313
* Root class for all Cloudify clients.
14-
*
14+
*
1515
* @author Isaac Shabtay
1616
*/
1717
public class AbstractCloudifyClient {

src/main/java/co/cloudify/rest/client/BlueprintsClient.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
import java.nio.file.attribute.BasicFileAttributes;
1414
import java.util.Collections;
1515

16-
import javax.ws.rs.NotFoundException;
17-
import javax.ws.rs.WebApplicationException;
18-
import javax.ws.rs.client.Client;
19-
import javax.ws.rs.client.Entity;
20-
import javax.ws.rs.client.Invocation.Builder;
21-
import javax.ws.rs.client.WebTarget;
22-
import javax.ws.rs.core.GenericType;
23-
import javax.ws.rs.core.MediaType;
16+
import jakarta.ws.rs.NotFoundException;
17+
import jakarta.ws.rs.WebApplicationException;
18+
import jakarta.ws.rs.client.Client;
19+
import jakarta.ws.rs.client.Entity;
20+
import jakarta.ws.rs.client.Invocation.Builder;
21+
import jakarta.ws.rs.client.WebTarget;
22+
import jakarta.ws.rs.core.GenericType;
23+
import jakarta.ws.rs.core.MediaType;
2424

2525
import co.cloudify.rest.model.Deployment;
2626
import org.apache.commons.compress.archivers.ArchiveEntry;
@@ -36,7 +36,7 @@
3636

3737
/**
3838
* REST client for blueprint-related operations.
39-
*
39+
*
4040
* @author Isaac Shabtay
4141
*/
4242
public class BlueprintsClient extends AbstractCloudifyClient {
@@ -63,9 +63,9 @@ protected Builder getBuilder(final String id) {
6363

6464
/**
6565
* Get a blueprint by ID.
66-
*
66+
*
6767
* @param id ID of blueprint to get
68-
*
68+
*
6969
* @return A {@link Blueprint} instance for that blueprint.
7070
*/
7171
public Blueprint get(final String id) {
@@ -80,13 +80,13 @@ public Blueprint get(final String id) {
8080

8181
/**
8282
* Uploads a blueprint archive.
83-
*
83+
*
8484
* @param id blueprint ID
8585
* @param archive archive file
8686
* @param main main YAML filename
87-
*
87+
*
8888
* @return A {@link Blueprint} instance for the uploaded blueprint.
89-
*
89+
*
9090
* @throws IOException I/O issue encountered while reading archive.
9191
*/
9292
public Blueprint uploadArchive(final String id, final File archive, final String main) throws IOException {
@@ -104,11 +104,11 @@ public Blueprint uploadArchive(final String id, final File archive, final String
104104
* Uploads a blueprint from the URL. This command doesn't download the URL
105105
* contents locally. The specified URL must be accessible from within Cloudify
106106
* Manager.
107-
*
107+
*
108108
* @param id blueprint ID
109109
* @param archiveUrl URL to archive
110110
* @param main main YAML filename
111-
*
111+
*
112112
* @return A {@link Blueprint} instance for the uploaded blueprint
113113
*/
114114
public Blueprint upload(final String id, final URL archiveUrl, final String main) {
@@ -128,13 +128,13 @@ public Blueprint upload(final String id, final URL archiveUrl, final String main
128128

129129
/**
130130
* Uploads a blueprint from a local directory.
131-
*
131+
*
132132
* @param id blueprint ID
133133
* @param rootDirectory root directory of the blueprint
134134
* @param main main YAML filename
135-
*
135+
*
136136
* @return A {@link Blueprint} instance for the uploaded blueprint
137-
*
137+
*
138138
* @throws IOException A problem occured while creating the blueprint archive.
139139
*/
140140
public Blueprint upload(final String id, final File rootDirectory, final String main) throws IOException {
@@ -180,9 +180,9 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO
180180

181181
/**
182182
* Deletes a blueprint.
183-
*
183+
*
184184
* @param id ID of blueprint to delete
185-
*
185+
*
186186
* @return The deleted blueprint.
187187
*/
188188
public Blueprint delete(final String id) {
@@ -204,9 +204,9 @@ public ListResponse<Blueprint> list() {
204204

205205
/**
206206
* Returns a list of all blueprints with ID's containing a string.
207-
*
207+
*
208208
* @param searchString string to search for
209-
*
209+
*
210210
* @return A list of matching blueprints.
211211
*/
212212
public ListResponse<Blueprint> list(final String searchString) {
@@ -215,11 +215,11 @@ public ListResponse<Blueprint> list(final String searchString) {
215215

216216
/**
217217
* Returns a list of all blueprints with ID's containing a string.
218-
*
218+
*
219219
* @param searchString string to search for
220220
* @param sortKey key to sort by
221221
* @param descending <code>true</code> for a descending sorting order
222-
*
222+
*
223223
* @return A list of matching blueprints.
224224
*/
225225
public ListResponse<Blueprint> list(final String searchString, final String sortKey, final boolean descending) {

src/main/java/co/cloudify/rest/client/CloudifyClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package co.cloudify.rest.client;
22

3-
import javax.ws.rs.client.Client;
4-
import javax.ws.rs.client.ClientBuilder;
5-
import javax.ws.rs.client.WebTarget;
3+
import jakarta.ws.rs.client.Client;
4+
import jakarta.ws.rs.client.ClientBuilder;
5+
import jakarta.ws.rs.client.WebTarget;
66

77
import co.cloudify.rest.client.filters.BasicAuthenticator;
88
import co.cloudify.rest.client.filters.TenantFilter;
@@ -17,7 +17,7 @@
1717
* Use {@link #create(String, String, String, boolean, String)} to create a
1818
* {@link CloudifyClient} instance.
1919
* </p>
20-
*
20+
*
2121
* @author Isaac Shabtay
2222
*/
2323
public class CloudifyClient extends AbstractCloudifyClient {

src/main/java/co/cloudify/rest/client/DeploymentsClient.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import java.util.Collections;
44
import java.util.Map;
55

6-
import javax.ws.rs.NotFoundException;
7-
import javax.ws.rs.WebApplicationException;
8-
import javax.ws.rs.client.Client;
9-
import javax.ws.rs.client.Entity;
10-
import javax.ws.rs.client.Invocation.Builder;
11-
import javax.ws.rs.client.WebTarget;
12-
import javax.ws.rs.core.GenericType;
6+
import jakarta.ws.rs.NotFoundException;
7+
import jakarta.ws.rs.WebApplicationException;
8+
import jakarta.ws.rs.client.Client;
9+
import jakarta.ws.rs.client.Entity;
10+
import jakarta.ws.rs.client.Invocation.Builder;
11+
import jakarta.ws.rs.client.WebTarget;
12+
import jakarta.ws.rs.core.GenericType;
1313

1414
import co.cloudify.rest.client.exceptions.CloudifyClientException;
1515
import co.cloudify.rest.client.exceptions.DeploymentNotFoundException;
@@ -22,7 +22,7 @@
2222

2323
/**
2424
* Client for deployment-related operations.
25-
*
25+
*
2626
* @author Isaac Shabtay
2727
*/
2828
public class DeploymentsClient extends AbstractCloudifyClient {
@@ -78,9 +78,9 @@ public ListResponse<Deployment> list(final String blueprintId, final String sear
7878

7979
/**
8080
* Returns a specific deployment.
81-
*
81+
*
8282
* @param id deployment's ID
83-
*
83+
*
8484
* @return A {@link Deployment} instance describing the deployment.
8585
*/
8686
public Deployment get(final String id) {
@@ -95,11 +95,11 @@ public Deployment get(final String id) {
9595

9696
/**
9797
* Creates a deployment.
98-
*
98+
*
9999
* @param id new deployment's ID
100100
* @param blueprint blueprint to associate deployment with
101101
* @param inputs deployment inputs
102-
*
102+
*
103103
* @return A {@link Deployment} instance for the new deployment.
104104
*/
105105
public Deployment create(final String id, final Blueprint blueprint, final Map<String, Object> inputs) {
@@ -108,11 +108,11 @@ public Deployment create(final String id, final Blueprint blueprint, final Map<S
108108

109109
/**
110110
* Creates a deployment. Note: this is an asynchronous operation.
111-
*
111+
*
112112
* @param id new deployment's ID
113113
* @param blueprintId blueprint to associate deployment with
114114
* @param inputs deployment inputs
115-
*
115+
*
116116
* @return A {@link Deployment} instance for the new deployment.
117117
*/
118118
public Deployment create(final String id, final String blueprintId, final Map<String, Object> inputs) {
@@ -152,9 +152,9 @@ public Map<String, Object> getCapabilities(final Deployment deployment) {
152152

153153
/**
154154
* Deletes a deployment. Note: this operation is asynchronous.
155-
*
155+
*
156156
* @param id deployment to delete
157-
*
157+
*
158158
* @return The deleted deployment.
159159
*/
160160
public Deployment delete(final String id) {

src/main/java/co/cloudify/rest/client/EventsClient.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package co.cloudify.rest.client;
22

3-
import javax.ws.rs.WebApplicationException;
4-
import javax.ws.rs.client.Client;
5-
import javax.ws.rs.client.WebTarget;
6-
import javax.ws.rs.core.GenericType;
3+
import jakarta.ws.rs.WebApplicationException;
4+
import jakarta.ws.rs.client.Client;
5+
import jakarta.ws.rs.client.WebTarget;
6+
import jakarta.ws.rs.core.GenericType;
77

88
import co.cloudify.rest.client.exceptions.CloudifyClientException;
99
import co.cloudify.rest.client.params.EventsListParams;
@@ -14,7 +14,7 @@
1414

1515
/**
1616
* Client for events and logs.
17-
*
17+
*
1818
* @author Isaac Shabtay
1919
*/
2020
public class EventsClient extends AbstractCloudifyClient {
@@ -27,12 +27,12 @@ public EventsClient(Client restClient, WebTarget base) {
2727

2828
/**
2929
* Lists events/logs for an execution.
30-
*
30+
*
3131
* @param execution the execution
3232
* @param fromEvent sequential number of the event to start from
3333
* @param batchSize how many events to fetch
3434
* @param includeLogs whether to include logs
35-
*
35+
*
3636
* @return A {@link ListResponse} of {@link Event} instances.
3737
*/
3838
public ListResponse<Event> list(final Execution execution, long fromEvent, long batchSize, boolean includeLogs) {
@@ -41,10 +41,10 @@ public ListResponse<Event> list(final Execution execution, long fromEvent, long
4141

4242
/**
4343
* Lists all events/logs for an execution.
44-
*
44+
*
4545
* @param execution the execution
4646
* @param includeLogs whether to include logs
47-
*
47+
*
4848
* @return A {@link ListResponse} of {@link Event} instances.
4949
*/
5050
public ListResponse<Event> list(final Execution execution, boolean includeLogs) {
@@ -53,10 +53,10 @@ public ListResponse<Event> list(final Execution execution, boolean includeLogs)
5353

5454
/**
5555
* Lists all events/logs for an execution.
56-
*
56+
*
5757
* @param executionId the execution ID
5858
* @param includeLogs whether to include logs
59-
*
59+
*
6060
* @return A {@link ListResponse} of {@link Event} instances.
6161
*/
6262
public ListResponse<Event> list(final String executionId, boolean includeLogs) {
@@ -65,12 +65,12 @@ public ListResponse<Event> list(final String executionId, boolean includeLogs) {
6565

6666
/**
6767
* Lists events and logs for a specific execution.
68-
*
68+
*
6969
* @param executionId the execution ID
7070
* @param fromEvent sequential number of the event to start from
7171
* @param batchSize how many events to fetch
7272
* @param includeLogs whether to include logs
73-
*
73+
*
7474
* @return A {@link ListResponse} of {@link Event} instances.
7575
*/
7676
public ListResponse<Event> list(final String executionId, Long fromEvent, Long batchSize, boolean includeLogs) {

0 commit comments

Comments
 (0)