Compare commits

..
Author SHA1 Message Date
brian.long 79ecdb6e00 Merge branch 'stable' into stable-jersey 2026-04-22 15:18:54 -04:00
brian.long 6e7cdc2336 Merge branch 'develop-jersey' into stable-jersey 2026-04-22 15:18:37 -04:00
brian.long d6e6c8a57e Merge branch 'develop' into stable 2026-04-22 15:17:36 -04:00
brian.long 71c03af6c3 Merge branch 'develop' into develop-jersey 2026-04-22 15:16:58 -04:00
brian.long f3071e8084 bitbucket.org to git.inteligr8.com 2026-04-22 15:16:19 -04:00
brian.long 23cc327884 v3.0.3 pom 2026-04-22 15:14:19 -04:00
brian.long c0c24c3585 Merge branch 'develop' into stable 2026-04-22 15:11:50 -04:00
brian.long ce8981c883 remove duplicative dependencies 2026-04-22 14:49:26 -04:00
brian.long f8273b66ef Merge branch 'develop' into develop-jersey 2026-04-22 14:49:02 -04:00
brian.long b64049d6a2 ossrh-release to central-publish 2026-04-22 14:47:06 -04:00
brian.long ad1b7bceae updated dependencies/plugins 2026-04-22 14:46:58 -04:00
brian.long 76447b9d41 Merge branch 'develop-jersey' into stable-jersey 2025-04-08 14:55:08 -04:00
brian.long fc0bb2e73f Merge branch 'stable' into stable-jersey 2025-04-08 14:55:02 -04:00
brian.long 93875d74ac using ApsProtectedRestJerseyApi 2025-04-08 14:51:28 -04:00
brian.long 4cd82b9afb Merge branch 'stable' into stable-jersey 2024-09-23 16:33:36 -04:00
brian.long a96e5f2a02 Merge branch 'develop-jersey' into stable-jersey 2024-09-23 16:33:17 -04:00
brian.long 889c94af0e added protected API impl 2024-09-23 16:24:44 -04:00
brian.long 24c9484712 Merge branch 'develop' into develop-jersey 2024-09-23 16:23:18 -04:00
brian.long a5d09e2fa8 Merge branch 'develop-jersey' into stable-jersey 2024-08-15 12:40:13 -04:00
brian.long b1c32b5adf v3.x; jersey v3.x 2024-08-15 12:33:49 -04:00
brian.long ef2784696c v2.0.5-jersey pom 2023-06-29 11:52:12 -04:00
brian.long 8f08c1d979 Merge branch 'develop-jersey' into stable-jersey 2023-06-29 11:51:57 -04:00
brian.long 27c43862d7 Merge branch 'develop' into develop-jersey 2023-06-29 11:47:11 -04:00
brian.long fd8c74037d addressing library version conflict 2023-05-30 18:43:42 -04:00
brian.long cd237cc929 v2.0.4-jersey pom 2023-05-30 11:19:40 -04:00
brian.long afbbb0f997 Merge branch 'develop-jersey' into stable-jersey 2023-05-30 11:18:44 -04:00
brian.long a59757ce02 Merge branch 'develop' into develop-jersey 2023-05-30 11:07:00 -04:00
brian.long 8543001da2 upgraded common-rest-client; requiring jersey media; optional jersey hk2 2023-05-30 11:03:32 -04:00
brian.long f2f12e1b1f Merge branch 'develop-jersey' into stable-jersey 2023-05-28 13:21:38 -04:00
brian.long b8381ed006 fixed jersey test compile 2023-05-28 13:21:26 -04:00
brian.long be02e86d7d v2.0.3-jersey pom 2023-05-28 13:17:21 -04:00
brian.long 537d9c773d Merge branch 'develop-jersey' into stable-jersey 2023-05-28 13:16:27 -04:00
brian.long 712058d328 upgraded jersey version 2023-05-28 12:56:05 -04:00
brian.long e9dacca5f7 Merge branch 'develop' into develop-jersey 2023-05-28 12:55:30 -04:00
brian.long 4e9d9f1d49 Merge branch 'develop-jersey' into stable-jersey 2022-10-03 10:38:09 -04:00
brian.long a4df532d70 added Jersey back 2022-10-03 10:32:26 -04:00
11 changed files with 186 additions and 96 deletions
+40 -56
View File
@@ -5,11 +5,11 @@
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>aps-public-rest-client</artifactId>
<version>3.0.2-cxf</version>
<version>3.0.3-jersey</version>
<name>Alfresco Process Services ReST API Client for Java</name>
<description>An APS Client library for building CXF-based REST API clients</description>
<url>https://bitbucket.org/inteligr8/aps-public-rest-client</url>
<description>An APS Client library for building Jersey-based REST API clients</description>
<url>https://git.inteligr8.com/inteligr8/aps-public-rest-client</url>
<licenses>
<license>
@@ -19,9 +19,9 @@
</licenses>
<scm>
<connection>scm:git:https://bitbucket.org/inteligr8/aps-public-rest-client.git</connection>
<developerConnection>scm:git:git@bitbucket.org:inteligr8/aps-public-rest-client.git</developerConnection>
<url>https://bitbucket.org/inteligr8/aps-public-rest-client</url>
<connection>scm:git:https://git.inteligr8.com/inteligr8/aps-public-rest-client.git</connection>
<developerConnection>scm:git:git@git.inteligr8.com:inteligr8/aps-public-rest-client.git</developerConnection>
<url>https://git.inteligr8.com/inteligr8/aps-public-rest-client</url>
</scm>
<organization>
<name>Inteligr8</name>
@@ -41,29 +41,27 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.debuglevel>lines,vars,source</maven.compiler.debuglevel>
<junit.version>5.10.0</junit.version>
<spring.version>6.0.19</spring.version>
<cxf.version>4.0.2</cxf.version>
<spring.version>6.2.18</spring.version>
</properties>
<dependencies>
<dependency>
<groupId>com.inteligr8</groupId>
<artifactId>common-rest-client</artifactId>
<version>3.0.0-cxf</version>
<version>3.0.4-jersey</version>
</dependency>
<dependency>
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>aps-public-rest-api</artifactId>
<version>3.0.5</version>
<version>3.1.0</version>
<scope>provided</scope> <!-- explicitly, bring your own version -->
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<version>5.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -84,29 +82,37 @@
<version>2.20.0</version>
<scope>test</scope>
</dependency>
<!-- Apache CXF libraries -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>${cxf.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.5</version>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.5</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>add-jaxrs-src</id>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>src/main/cxf</source>
<source>src/main/jersey</source>
</sources>
</configuration>
</execution>
@@ -115,40 +121,18 @@
<goals><goal>add-test-source</goal></goals>
<configuration>
<sources>
<source>src/test/cxf</source>
<source>src/test/jersey</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.0</version>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.0</version>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>ossrh-release</id>
<id>central-publish</id>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
@@ -166,7 +150,6 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.2</version>
<executions>
<execution>
<id>javadoc</id>
@@ -190,19 +173,20 @@
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
<!-- for some reason this is required... -->
<executions>
<execution>
<id>ossrh-deploy</id>
<id>deploy</id>
<phase>deploy</phase>
<goals><goal>deploy</goal></goals>
<goals><goal>publish</goal></goals>
</execution>
</executions>
</plugin>
@@ -18,11 +18,11 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.inteligr8.rs.ClientCxfConfiguration;
import com.inteligr8.rs.ClientJerseyConfiguration;
/**
* This class provides a POJO &amp; Spring-based implementation of the
* ClientCxfConfiguration interface. You can use it outside of the Spring
* ClientJerseyConfiguration interface. You can use it outside of the Spring
* context, but you will need the spring-context and spring-beans libraries in
* your non-Spring application.
*
@@ -30,17 +30,17 @@ import com.inteligr8.rs.ClientCxfConfiguration;
*/
@Configuration
@ComponentScan
public class ApsClientCxfConfiguration extends ApsClientConfiguration implements ClientCxfConfiguration {
@Value("${process.service.cxf.defaultBusEnabled:true}")
private boolean defaultBusEnabled;
public class ApsClientJerseyConfiguration extends ApsClientConfiguration implements ClientJerseyConfiguration {
public boolean isDefaultBusEnabled() {
return this.defaultBusEnabled;
@Value("${process.service.jersey.putBodyRequired:true}")
private boolean putBodyRequired;
public boolean isPutBodyRequired() {
return this.putBodyRequired;
}
public void setDefaultBusEnabled(boolean defaultBusEnabled) {
this.defaultBusEnabled = defaultBusEnabled;
public void setPutBodyRequired(boolean putBodyRequired) {
this.putBodyRequired = putBodyRequired;
}
}
@@ -18,25 +18,25 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import com.inteligr8.rs.ClientCxfImpl;
import com.inteligr8.rs.ClientJerseyImpl;
/**
* This class provides a POJO &amp; Spring-based implementation of the Apache
* CXF client. You can use it outside of the Spring context, but you will need
* the spring-context and spring-beans libraries in your non-Spring
* application.
* This class provides a POJO &amp; Spring-based implementation of the Jersey
* client configured for APS. You can use it outside of the Spring context,
* but you will need the spring-context and spring-beans libraries in your
* non-Spring application.
*
* @author brian@inteligr8.com
*/
@Component("aps.client.cxf")
@Component("aps.client.jersey")
@Lazy
public class ApsClientCxfImpl extends ClientCxfImpl {
public class ApsClientJerseyImpl extends ClientJerseyImpl {
/**
* This constructor is for Spring or POJO use
* This constructor is for Spring and POJO use
*/
@Autowired
public ApsClientCxfImpl(ApsClientCxfConfiguration config) {
public ApsClientJerseyImpl(ApsClientJerseyConfiguration config) {
super(config);
}
@@ -19,20 +19,20 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
/**
* This class provides the Apache CXF client to the JAX-RS API for the Activiti
* & APS public ReST APIs and some non-public APS ReST APIs.
* This class provides the Jersey client to the JAX-RS API for the Activiti &
* APS public ReST API and some non-public APS ReST API.
*
* @author brian@inteligr8.com
*/
@Component("aps.protected-api.cxf")
@Component("aps.protected-api.jersey")
@Lazy
public class ApsProtectedRestApiCxfImpl extends ApsProtectedRestApiImpl implements ApsProtectedRestCxfApi {
public class ApsProtectedRestApiJerseyImpl extends ApsProtectedRestApiImpl implements ApsProtectedRestJerseyApi {
/**
* This constructor is for Spring or POJO use
*/
@Autowired
public ApsProtectedRestApiCxfImpl(ApsClientCxfImpl client) {
public ApsProtectedRestApiJerseyImpl(ApsClientJerseyImpl client) {
super(client);
}
@@ -19,20 +19,20 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
/**
* This class provides the Apache CXF client to the JAX-RS API for the APS
* Public ReST API.
* This class provides the Jersey client to the JAX-RS API for the APS Public
* ReST API.
*
* @author brian@inteligr8.com
*/
@Component("aps.api.cxf")
@Component("aps.api.jersey")
@Lazy
public class ApsPublicRestApiCxfImpl extends ApsPublicRestApiImpl implements ApsPublicRestCxfApi {
public class ApsPublicRestApiJerseyImpl extends ApsPublicRestApiImpl implements ApsPublicRestJerseyApi {
/**
* This constructor is for Spring or POJO use
*/
@Autowired
public ApsPublicRestApiCxfImpl(ApsClientCxfImpl client) {
public ApsPublicRestApiJerseyImpl(ApsClientJerseyImpl client) {
super(client);
}
@@ -1 +0,0 @@
org.apache.cxf.jaxrs.client.spec.ClientBuilderImpl
@@ -0,0 +1 @@
org.glassfish.jersey.client.JerseyClientBuilder
@@ -0,0 +1,51 @@
/*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.inteligr8.alfresco.activiti;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import com.inteligr8.alfresco.activiti.model.Tenant;
import com.inteligr8.rs.ClientConfiguration;
@TestPropertySource(locations = {"/local.properties"})
@SpringJUnitConfig(classes = {ApsClientJerseyConfiguration.class, ApsPublicRestApiJerseyImpl.class, ApsClientJerseyImpl.class})
public class ArrayResponseUnitTest extends ConditionalIT {
@Autowired
@Qualifier("aps.api.jersey")
private ApsPublicRestApiImpl api;
@Override
public ClientConfiguration getConfiguration() {
return this.api.getClient().getConfig();
}
@Test
@EnabledIf("hostExists")
public void testTenants() {
List<Tenant> objs = this.api.getAdminApi().getTenants();
Assertions.assertNotNull(objs);
}
}
@@ -18,22 +18,21 @@ import org.junit.jupiter.api.BeforeAll;
import com.inteligr8.rs.ClientConfiguration;
public class ConnectionCxfClientPojoIT extends ConnectionClientIT {
public class ConnectionJerseyClientPojoIT extends ConnectionClientIT {
private static ApsPublicRestApiImpl api;
@BeforeAll
public static void initClient() {
ApsClientCxfConfiguration config = new ApsClientCxfConfiguration();
ApsClientJerseyConfiguration config = new ApsClientJerseyConfiguration();
config.setBaseUrl("http://localhost:8080/activiti-app");
config.setBasicAuthUsername("admin");
config.setBasicAuthPassword("admin");
api = new ApsPublicRestApiCxfImpl(
new ApsClientCxfImpl(config));
api = new ApsPublicRestApiJerseyImpl(
new ApsClientJerseyImpl(config));
}
@Override
public ApsPublicRestApiImpl getApi() {
return api;
}
@@ -21,15 +21,14 @@ import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import com.inteligr8.rs.ClientConfiguration;
@TestPropertySource(locations = {"/local-oauth.properties"})
@SpringJUnitConfig(classes = {ApsClientCxfConfiguration.class, ApsPublicRestApiCxfImpl.class, ApsClientCxfImpl.class})
public class ConnectionCxfClientSpringIT extends ConnectionClientIT {
@TestPropertySource(locations = {"/local.properties"})
@SpringJUnitConfig(classes = {ApsClientJerseyConfiguration.class, ApsPublicRestApiJerseyImpl.class, ApsClientJerseyImpl.class})
public class ConnectionJerseyClientSpringIT extends ConnectionClientIT {
@Autowired
@Qualifier("aps.api.cxf")
@Qualifier("aps.api.jersey")
private ApsPublicRestApiImpl api;
@Override
public ApsPublicRestApiImpl getApi() {
return this.api;
}
@@ -0,0 +1,57 @@
/*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.inteligr8.alfresco.activiti;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import com.inteligr8.alfresco.activiti.model.GroupLight;
import com.inteligr8.activiti.model.ResultList;
import com.inteligr8.alfresco.activiti.model.UserLight;
import com.inteligr8.rs.ClientConfiguration;
@TestPropertySource(locations = {"/local.properties"})
@SpringJUnitConfig(classes = {ApsClientJerseyConfiguration.class, ApsPublicRestApiJerseyImpl.class, ApsClientJerseyImpl.class})
public class ResultListResponseUnitTest extends ConditionalIT {
@Autowired
@Qualifier("aps.api.jersey")
private ApsPublicRestApiImpl api;
@Override
public ClientConfiguration getConfiguration() {
return this.api.getClient().getConfig();
}
@Test
@EnabledIf("hostExists")
public void testGroupMembers() {
List<GroupLight> groups = this.api.getAdminApi().getGroups(1L, false, false);
Assertions.assertFalse(groups.isEmpty());
for (GroupLight group : groups) {
ResultList<UserLight> users = this.api.getAdminApi().getMembers(group.getId(), null, null, null);
Assertions.assertNotNull(users);
}
}
}