diff --git a/pom.xml b/pom.xml
index b2c57874..5200555a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,14 +7,16 @@
com.jaspersoft
jrs-rest-java-client
- 8.0.0
+ 8.1.0
REST client for JasperReports server
http://github.com/Jaspersoft/jrs-rest-java-client
UTF-8
- 1.5.5
- 8.0.0
+ 8.1.0
+ 2.0.9
+ 2.36
+ 2.13.3
@@ -25,16 +27,16 @@
- jaspersoft-clients-snapshots
- Jaspersoft clients snapshots
- https://jaspersoft.jfrog.io/jaspersoft/jaspersoft-clients-releases
+ jaspersoft-clients-snapshots
+ Jaspersoft clients snapshots
+ https://jaspersoft.jfrog.io/jaspersoft/jaspersoft-clients-releases
- central
- jaspersoft-releases
- https://jaspersoft.jfrog.io/jaspersoft/jrs-ce-releases
+ central
+ jaspersoft-releases
+ https://jaspersoft.jfrog.io/jaspersoft/jrs-ce-releases
-
+
@@ -46,6 +48,10 @@
jackson-annotations
com.fasterxml.jackson.core
+
+ commons-logging
+ commons-logging
+
@@ -53,47 +59,86 @@
org.glassfish.jersey.core
jersey-client
- 2.22.1
+ ${jersey.version}
org.glassfish.jersey.media
jersey-media-multipart
- 2.22.1
+ ${jersey.version}
- com.sun.jersey
- jersey-json
- 1.19
+ org.glassfish.jersey.media
+ jersey-media-json-jackson
+ ${jersey.version}
org.glassfish.jersey.media
- jersey-media-json-jackson
- 2.22.1
+ jersey-media-json-processing
+ ${jersey.version}
org.glassfish.jersey.media
jersey-media-jaxb
- 2.22.1
+ ${jersey.version}
+
+
+ org.glassfish.jersey.inject
+ jersey-hk2
+ ${jersey.version}
+
+
+
+ org.codehaus.jettison
+ jettison
+ 1.5.0
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.module
+ jackson-module-jaxb-annotations
+ ${jackson.version}
org.testng
testng
- 6.8.7
+ 7.4.0
test
+
+ org.mockito
+ mockito-core
+
+ 3.12.4
+ test
+
org.powermock
- powermock-module-testng
+ powermock-api-mockito2
${powermock.version}
test
org.powermock
- powermock-api-mockito
+ powermock-module-testng
${powermock.version}
test
@@ -103,60 +148,46 @@
${powermock.version}
test
+
+ org.hamcrest
+ hamcrest
+ 2.2
+ test
+
org.easymock
easymock
- 3.2
+ 4.3
test
-
- com.owlike
- genson
- 0.99
-
org.bouncycastle
bcprov-jdk15on
- 1.51
+ 1.70
org.apache.commons
commons-lang3
- 3.0
+ 3.12.0
commons-io
commons-io
- 2.4
-
-
- commons-logging
- commons-logging
- 1.0.4
+ 2.11.0
- org.slf4j
- slf4j-api
- 1.7.12
-
-
- org.slf4j
- slf4j-log4j12
- 1.7.12
-
-
- log4j
- log4j
- 1.2.17
+ org.apache.logging.log4j
+ log4j-slf4j-impl
+ 2.17.2
org.slf4j
jul-to-slf4j
- 1.7.12
+ 1.7.36
@@ -166,16 +197,16 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.1
+ 3.8.1
-
- 1.7
+
+ 1.8
org.codehaus.mojo
cobertura-maven-plugin
- 2.5.2
+ 2.7
xml
256m
@@ -188,7 +219,9 @@
**/com/jaspersoft/jasperserver/jaxrs/client/core/exceptions/**
**/com/jaspersoft/jasperserver/jaxrs/client/core/enums/**
- **/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/adhoc/queryexecution/enums/**
+
+ **/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/adhoc/queryexecution/enums/**
+
@@ -197,7 +230,7 @@
org.eluder.coveralls
coveralls-maven-plugin
- 2.0.0
+ 4.3.0
develop
@@ -207,7 +240,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 2.12
+ 2.22.2
false
false
@@ -241,17 +274,17 @@
org.codehaus.mojo
findbugs-maven-plugin
- 3.0.0
+ 3.0.5
org.apache.maven.plugins
maven-pmd-plugin
- 3.4
+ 3.15.0
org.apache.maven.plugins
maven-checkstyle-plugin
- 2.14
+ 3.1.2
config/sun_checks.xml
@@ -263,34 +296,4 @@
-
-
- borys.kolesnykov
- Borys Kolesnykov
- borys.kolesnikov@gmail.com
-
- architect
- developer
-
- +3
-
-
- Krasnyanskiy
- Alexander Krasnyanskiy
- krasnyanskiy.alex@gmail.com
-
- developer
-
- +3
-
-
- tetiana.iefimenko
- Tetiana Iefiemenko
- efimenkot@gmail.com
-
- developer
-
- +3
-
-
diff --git a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/adhoc/queryexecution/QueryExecutionAdapter.java b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/adhoc/queryexecution/QueryExecutionAdapter.java
index 8ec3cfcc..3b5ff013 100755
--- a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/adhoc/queryexecution/QueryExecutionAdapter.java
+++ b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/adhoc/queryexecution/QueryExecutionAdapter.java
@@ -115,16 +115,6 @@ public OperationResult retrieveData(String executionId) {
return request.get();
}
- /**
- * @deprecated Replaced by {@link QueryExecutionAdapter#delete()}
- */
- @Deprecated
- public OperationResult deleteExecution(String executionId) {
- uri.add(executionId);
- JerseyRequest request = buildRequest(responseClass);
- return request.delete();
- }
-
public OperationResult delete() {
JerseyRequest request = buildRequest(Object.class);
return request.delete();
diff --git a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/attributes/SingleAttributeAdapter.java b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/attributes/SingleAttributeAdapter.java
index 7378770d..597ca212 100644
--- a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/attributes/SingleAttributeAdapter.java
+++ b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/attributes/SingleAttributeAdapter.java
@@ -31,6 +31,7 @@
import com.jaspersoft.jasperserver.jaxrs.client.core.ThreadPoolUtil;
import com.jaspersoft.jasperserver.jaxrs.client.core.exceptions.handling.DefaultErrorHandler;
import com.jaspersoft.jasperserver.jaxrs.client.core.operationresult.OperationResult;
+
import java.util.ArrayList;
/**
diff --git a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/organizations/OrganizationsService.java b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/organizations/OrganizationsService.java
index 6d51118d..5c9879f2 100644
--- a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/organizations/OrganizationsService.java
+++ b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/organizations/OrganizationsService.java
@@ -32,7 +32,7 @@ public OrganizationsService(SessionStorage sessionStorage) {
public SingleOrganizationAdapter organization(ClientTenant organization) {
if (organization != null && ((organization.getAlias() != null && !organization.getAlias().isEmpty())
- ||(organization.getId() != null && !organization.getId().isEmpty()) )) {
+ || (organization.getId() != null && !organization.getId().isEmpty()))) {
return new SingleOrganizationAdapter(sessionStorage, organization);
}
throw new IllegalArgumentException("Organization is not valid.");
@@ -46,12 +46,5 @@ public BatchOrganizationsAdapter allOrganizations() {
return new BatchOrganizationsAdapter(sessionStorage);
}
- /**
- * @deprecated Replaced by {@link OrganizationsService#allOrganizations()}.
- */
-@Deprecated
- public BatchOrganizationsAdapter organizations() {
- return new BatchOrganizationsAdapter(sessionStorage);
- }
}
diff --git a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/organizations/SingleOrganizationAdapter.java b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/organizations/SingleOrganizationAdapter.java
index da43991a..11124998 100644
--- a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/organizations/SingleOrganizationAdapter.java
+++ b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/organizations/SingleOrganizationAdapter.java
@@ -31,6 +31,7 @@
import com.jaspersoft.jasperserver.jaxrs.client.core.UrlUtils;
import com.jaspersoft.jasperserver.jaxrs.client.core.exceptions.handling.DefaultErrorHandler;
import com.jaspersoft.jasperserver.jaxrs.client.core.operationresult.OperationResult;
+
import javax.ws.rs.core.MultivaluedHashMap;
@@ -144,14 +145,4 @@ private JerseyRequest request() {
);
}
- /**
- * @deprecated Replaced by {@link SingleOrganizationAdapter#create()}.
- */
- @Deprecated
- public OperationResult create(ClientTenant clientTenant) {
- JerseyRequest request = request();
- return params.size() != 0
- ? request.addParams(params).post(clientTenant)
- : request.post(clientTenant);
- }
}
\ No newline at end of file
diff --git a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/roles/RolesParameter.java b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/roles/RolesParameter.java
index cd61335a..8100b152 100644
--- a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/roles/RolesParameter.java
+++ b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/roles/RolesParameter.java
@@ -23,21 +23,6 @@
public enum RolesParameter {
- /**
- * max quantity of results
- * @deprecated Use common approach instead.
- */
- @Deprecated
- MAX_RECORDS("maxRecords"),
-
- /**
- * Allows inFolder search roles, may work in conjunction with any
- * other param.
- * @deprecated Use common approach instead.
- */
- @Deprecated
- SEARCH("search"),
-
/**
* If false, returns all roles of users, set by "user" param,
* otherwise returns only roles, which owned by all set users.
diff --git a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/SingleUserRequestAdapter.java b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/SingleUserRequestAdapter.java
index ff2ae5e5..000c5182 100644
--- a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/SingleUserRequestAdapter.java
+++ b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/SingleUserRequestAdapter.java
@@ -9,20 +9,14 @@
import com.jaspersoft.jasperserver.jaxrs.client.core.ThreadPoolUtil;
import com.jaspersoft.jasperserver.jaxrs.client.core.exceptions.handling.DefaultErrorHandler;
import com.jaspersoft.jasperserver.jaxrs.client.core.operationresult.OperationResult;
+
import java.util.ArrayList;
public class SingleUserRequestAdapter extends AbstractAdapter {
- private ArrayList uri = new ArrayList();
+ private ArrayList uri = new ArrayList<>();
private ClientUser user;
- /**
- * The field is used for deprecated methods of the class.
- *
- * @deprecated Replaced by {@link SingleUserRequestAdapter#uri}.
- */
- private String userUriPrefix;
-
public SingleUserRequestAdapter(SessionStorage sessionStorage, ClientUser user) {
super(sessionStorage);
@@ -91,161 +85,8 @@ private JerseyRequest buildRequest() {
uri.add(user.getUsername());
return JerseyRequest.buildRequest(sessionStorage,
ClientUser.class,
- uri.toArray(new String[uri.size()]),
+ uri.toArray(new String[0]),
new DefaultErrorHandler());
}
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#SingleUserRequestAdapter(SessionStorage, ClientUser)}.
- */
- public SingleUserRequestAdapter(SessionStorage sessionStorage, String organizationId, String username) {
- super(sessionStorage);
- if (organizationId != null) {
- uri.add("organizations");
- uri.add(organizationId);
- uri.add("users");
- } else {
- uri.add("users");
- }
- user = new ClientUser();
- user.setUsername(username);
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#SingleUserRequestAdapter(SessionStorage, ClientUser)}.
- */
- public SingleUserRequestAdapter(SessionStorage sessionStorage, String organizationId) {
- super(sessionStorage);
- if (organizationId != null) {
- uri.add("organizations");
- uri.add(organizationId);
- uri.add("users");
- } else {
- uri.add("users");
- }
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#SingleUserRequestAdapter(SessionStorage, ClientUser)}.
- */
- public SingleUserRequestAdapter(String userId, String organizationId, SessionStorage sessionStorage) {
- super(sessionStorage);
- if (organizationId != null && !organizationId.equals("") && userId != null && !userId.equals("")) {
- uri.add("organizations");
- uri.add(organizationId);
- uri.add("users");
- uri.add(userId);
- } else if (organizationId == null && userId != null && !userId.equals("")) {
- uri.add("users");
- uri.add(userId);
- } else {
- throw new IllegalArgumentException("Wrong parameters has been passed!");
- }
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#get()}.
- */
- public OperationResult get(String userId) {
-
- if (!uri.contains("users")) {
- return request().get();
- }
- if (!uri.get(uri.size() - 1).equals(userId)) {
- uri.add(userId);
- }
- return request().get();
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#buildRequest()}.
- */
- private JerseyRequest request() {
- return JerseyRequest.buildRequest(sessionStorage,
- ClientUser.class,
- uri.toArray(new String[uri.size()]),
- new DefaultErrorHandler());
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#asyncGet(Callback)}.
- */
- public RequestExecution asyncGet(final Callback, R> callback, String userId) {
- if (uri.contains("users") && !uri.get(uri.size() - 1).equals(userId)) {
- uri.add(userId);
- }
-
- final JerseyRequest request = request();
- RequestExecution task = new RequestExecution(new Runnable() {
- @Override
- public void run() {
- callback.execute(request.get());
- }
- });
- ThreadPoolUtil.runAsynchronously(task);
- return task;
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#createOrUpdate(ClientUser)}.
- */
- public OperationResult updateOrCreate(ClientUser user) {
- uri.add(user.getUsername());
- if ((!uri.toString().contains("organizations")) && (user.getTenantId() != null)) {
- uri.add(0, "organizations");
- uri.add(1,user.getTenantId());
- }
- return request().put(user);
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#asyncCreateOrUpdate(ClientUser, Callback)}.
- */
- public RequestExecution asyncCreateOrUpdate(final ClientUser user, final Callback, R> callback, final String userId) {
- if (uri.contains("users")) {
- uri.add(userId);
- }
- final JerseyRequest request = request();
- RequestExecution task = new RequestExecution(new Runnable() {
- @Override
- public void run() {
- callback.execute(request.put(user));
- }
- });
- ThreadPoolUtil.runAsynchronously(task);
- return task;
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#delete()}.
- */
- public OperationResult delete(String userId) {
- uri.add(userId);
- return request().delete();
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#delete()}.
- */
- public OperationResult delete(ClientUser user) {
- uri.add(user.getUsername());
- return request().delete();
- }
-
- /**
- * @deprecated Replaced by {@link SingleUserRequestAdapter#asyncDelete(Callback)}.
- */
- public RequestExecution asyncDelete(final Callback, R> callback, String userId) {
- uri.add(userId);
- final JerseyRequest request = request();
- RequestExecution task = new RequestExecution(new Runnable() {
- @Override
- public void run() {
- callback.execute(request.delete());
- }
- });
- ThreadPoolUtil.runAsynchronously(task);
- return task;
- }
-
}
diff --git a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/UsersParameter.java b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/UsersParameter.java
index 88cb19bf..9d898ece 100644
--- a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/UsersParameter.java
+++ b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/UsersParameter.java
@@ -23,21 +23,6 @@
public enum UsersParameter {
- /**
- * max quantity of results
- * @deprecated Use common approach instead.
- */
- @Deprecated
- MAX_RECORDS("maxRecords"),
-
- /**
- * Allows to search roles, may work in conjunction with any
- * other param.
- * @deprecated Use common approach instead.
- */
- @Deprecated
- SEARCH("search"),
-
/**
* If hasAllRequiredRoles is true then users should contain all
* requiredRole specified in query ( think as AND operation)
diff --git a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/UsersService.java b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/UsersService.java
index df63163e..877ae1a3 100644
--- a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/UsersService.java
+++ b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/authority/users/UsersService.java
@@ -68,34 +68,6 @@ public BatchUsersRequestAdapter allUsers() {
return new BatchUsersRequestAdapter(sessionStorage, organizationId);
}
- /**
- * @deprecated Replaced by {@link UsersService#forOrganization(String)} or {@link UsersService#forOrganization(ClientTenant)}.
- */
- public UsersService organization(String organizationId) {
- if ("".equals(organizationId) || "/".equals(organizationId)) {
- throw new IllegalArgumentException("'organizationId' mustn't be an empty string");
- }
- this.organizationId = organizationId;
- return this;
- }
-
- /**
- * @deprecated Replaced by {@link UsersService#user(String)} or {@link UsersService#user(ClientUser)}.
- */
- public SingleUserRequestAdapter username(String username) {
- if ("".equals(username) || "/".equals(username)) {
- throw new IllegalArgumentException("'username' mustn't be an empty string");
- }
- return new SingleUserRequestAdapter(sessionStorage, organizationId, username);
- }
-
- /**
- * @deprecated Replaced by {@link UsersService#user(String)} or {@link UsersService#user(ClientUser)}.
- */
- public SingleUserRequestAdapter user() {
- return new SingleUserRequestAdapter(sessionStorage, organizationId);
- }
-
}
diff --git a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/connections/ConnectionsService.java b/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/connections/ConnectionsService.java
deleted file mode 100644
index 69b76ac4..00000000
--- a/src/main/java/com/jaspersoft/jasperserver/jaxrs/client/apiadapters/connections/ConnectionsService.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.jaspersoft.jasperserver.jaxrs.client.apiadapters.connections;
-
-import com.jaspersoft.jasperserver.jaxrs.client.apiadapters.AbstractAdapter;
-import com.jaspersoft.jasperserver.jaxrs.client.core.SessionStorage;
-
-/**
- *
- *
- *
- * @author tetiana.iefimenko
- * @version $Id$
- * @see
- *
- * @deprecated Replaced by {@link com.jaspersoft.jasperserver.jaxrs.client.apiadapters.context.ContextService}
- */
-public class ConnectionsService extends AbstractAdapter {
-
- public ConnectionsService(SessionStorage sessionStorage) {
- super(sessionStorage);
- }
- public SingleConnectionsAdapter connection(Class connectionClass, String connectionMimeType) {
- return new SingleConnectionsAdapter(sessionStorage, connectionClass, connectionMimeType);
- }
-
- public SingleConnectionsAdapter connection(Class connectionClass, String connectionMimeType, String uuId) {
- return new SingleConnectionsAdapter(sessionStorage, connectionClass, connectionMimeType, uuId);
- }
-
- public SingleConnectionsAdapter