Compare commits

..
Author SHA1 Message Date
brian.long 76bd458481 Merge branch 'stable' into stable-cxf 2026-04-22 15:20:08 -04:00
brian.long c0022d9f90 Merge branch 'develop-cxf' into stable-cxf 2026-04-22 15:19:50 -04:00
brian.long d7429967c4 Merge branch 'develop' into develop-cxf 2026-04-22 15:17:23 -04:00
brian.long 36d7de4c42 removed duplicative dependencies 2026-04-22 14:51:03 -04:00
brian.long b58f36169b Merge branch 'develop' into develop-cxf 2026-04-22 14:50:31 -04:00
brian.long 449c352aa5 Merge branch 'develop-cxf' into stable-cxf 2025-04-08 14:59:21 -04:00
brian.long 0ed36d0faf using ApsProtectedRestCxfApi 2025-04-08 14:58:49 -04:00
brian.long 7f89bdae81 Merge branch 'stable' into stable-cxf 2025-04-08 14:57:38 -04:00
brian.long c035e9bec2 Merge branch 'stable' into stable-cxf 2024-09-23 16:31:02 -04:00
brian.long 24608d99c8 Merge branch 'develop-cxf' into stable-cxf 2024-09-23 16:29:38 -04:00
brian.long 19d879308d added protected API impl 2024-09-23 16:23:05 -04:00
brian.long 1bb80dd0e3 Merge branch 'develop' into develop-cxf 2024-09-23 16:19:57 -04:00
brian.long eacbcaae30 Merge branch 'develop-cxf' into stable-cxf 2024-08-15 12:38:18 -04:00
brian.long 5a509eeb82 v3.x; cxf v4.x 2024-08-15 12:32:20 -04:00
brian.long cf7f30328d v2.0.5-cxf 2023-06-29 11:54:22 -04:00
brian.long af43f12d72 Merge branch 'develop-cxf' into stable-cxf 2023-06-29 11:54:04 -04:00
brian.long 49a3255e4d Merge branch 'develop' into develop-cxf 2023-06-29 11:46:36 -04:00
brian.long d8a365eb37 v2.0.4-cxf 2023-05-30 11:23:49 -04:00
brian.long d8aa8253c4 Merge branch 'develop-cxf' into stable-cxf 2023-05-30 11:22:23 -04:00
brian.long 5ab46e19ac Merge branch 'develop' into develop-cxf 2023-05-30 11:22:05 -04:00
brian.long fd129b992c v2.0.3-cxf pom 2023-05-28 13:09:54 -04:00
brian.long c67a869fee v2.0.3-cxf pom 2023-05-28 13:07:58 -04:00
brian.long 06de852f2a Merge branch 'develop-cxf' into stable-cxf 2023-05-28 13:07:26 -04:00
brian.long 733310cf3e upgraded CXF version 2023-05-28 12:58:07 -04:00
brian.long 1618d9956d Merge branch 'develop' into develop-cxf 2023-05-28 12:57:48 -04:00
brian.long c48c9531bf Merge branch 'develop-cxf' into stable-cxf 2022-10-03 10:34:12 -04:00
brian.long ade7e9b5a0 added CXF back 2022-10-03 10:25:10 -04:00
11 changed files with 45 additions and 151 deletions
+5 -5
View File
@@ -5,10 +5,10 @@
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>aps-public-rest-client</artifactId>
<version>3.0.3-jersey</version>
<version>3.0.3-cxf</version>
<name>Alfresco Process Services ReST API Client for Java</name>
<description>An APS Client library for building Jersey-based REST API clients</description>
<description>An APS Client library for building CXF-based REST API clients</description>
<url>https://git.inteligr8.com/inteligr8/aps-public-rest-client</url>
<licenses>
@@ -49,7 +49,7 @@
<dependency>
<groupId>com.inteligr8</groupId>
<artifactId>common-rest-client</artifactId>
<version>3.0.4-jersey</version>
<version>3.0.4-cxf</version>
</dependency>
<dependency>
<groupId>com.inteligr8.alfresco</groupId>
@@ -112,7 +112,7 @@
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>src/main/jersey</source>
<source>src/main/cxf</source>
</sources>
</configuration>
</execution>
@@ -121,7 +121,7 @@
<goals><goal>add-test-source</goal></goals>
<configuration>
<sources>
<source>src/test/jersey</source>
<source>src/test/cxf</source>
</sources>
</configuration>
</execution>
@@ -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.ClientJerseyConfiguration;
import com.inteligr8.rs.ClientCxfConfiguration;
/**
* This class provides a POJO &amp; Spring-based implementation of the
* ClientJerseyConfiguration interface. You can use it outside of the Spring
* ClientCxfConfiguration 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.ClientJerseyConfiguration;
*/
@Configuration
@ComponentScan
public class ApsClientJerseyConfiguration extends ApsClientConfiguration implements ClientJerseyConfiguration {
public class ApsClientCxfConfiguration extends ApsClientConfiguration implements ClientCxfConfiguration {
@Value("${process.service.cxf.defaultBusEnabled:true}")
private boolean defaultBusEnabled;
@Value("${process.service.jersey.putBodyRequired:true}")
private boolean putBodyRequired;
public boolean isPutBodyRequired() {
return this.putBodyRequired;
public boolean isDefaultBusEnabled() {
return this.defaultBusEnabled;
}
public void setPutBodyRequired(boolean putBodyRequired) {
this.putBodyRequired = putBodyRequired;
public void setDefaultBusEnabled(boolean defaultBusEnabled) {
this.defaultBusEnabled = defaultBusEnabled;
}
}
@@ -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.ClientJerseyImpl;
import com.inteligr8.rs.ClientCxfImpl;
/**
* 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.
* 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.
*
* @author brian@inteligr8.com
*/
@Component("aps.client.jersey")
@Component("aps.client.cxf")
@Lazy
public class ApsClientJerseyImpl extends ClientJerseyImpl {
public class ApsClientCxfImpl extends ClientCxfImpl {
/**
* This constructor is for Spring and POJO use
* This constructor is for Spring or POJO use
*/
@Autowired
public ApsClientJerseyImpl(ApsClientJerseyConfiguration config) {
public ApsClientCxfImpl(ApsClientCxfConfiguration config) {
super(config);
}
@@ -19,20 +19,20 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
/**
* 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.
* 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.
*
* @author brian@inteligr8.com
*/
@Component("aps.protected-api.jersey")
@Component("aps.protected-api.cxf")
@Lazy
public class ApsProtectedRestApiJerseyImpl extends ApsProtectedRestApiImpl implements ApsProtectedRestJerseyApi {
public class ApsProtectedRestApiCxfImpl extends ApsProtectedRestApiImpl implements ApsProtectedRestCxfApi {
/**
* This constructor is for Spring or POJO use
*/
@Autowired
public ApsProtectedRestApiJerseyImpl(ApsClientJerseyImpl client) {
public ApsProtectedRestApiCxfImpl(ApsClientCxfImpl client) {
super(client);
}
@@ -19,20 +19,20 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
/**
* This class provides the Jersey client to the JAX-RS API for the APS Public
* ReST API.
* This class provides the Apache CXF client to the JAX-RS API for the APS
* Public ReST API.
*
* @author brian@inteligr8.com
*/
@Component("aps.api.jersey")
@Component("aps.api.cxf")
@Lazy
public class ApsPublicRestApiJerseyImpl extends ApsPublicRestApiImpl implements ApsPublicRestJerseyApi {
public class ApsPublicRestApiCxfImpl extends ApsPublicRestApiImpl implements ApsPublicRestCxfApi {
/**
* This constructor is for Spring or POJO use
*/
@Autowired
public ApsPublicRestApiJerseyImpl(ApsClientJerseyImpl client) {
public ApsPublicRestApiCxfImpl(ApsClientCxfImpl client) {
super(client);
}
@@ -0,0 +1 @@
org.apache.cxf.jaxrs.client.spec.ClientBuilderImpl
@@ -18,21 +18,22 @@ import org.junit.jupiter.api.BeforeAll;
import com.inteligr8.rs.ClientConfiguration;
public class ConnectionJerseyClientPojoIT extends ConnectionClientIT {
public class ConnectionCxfClientPojoIT extends ConnectionClientIT {
private static ApsPublicRestApiImpl api;
@BeforeAll
public static void initClient() {
ApsClientJerseyConfiguration config = new ApsClientJerseyConfiguration();
ApsClientCxfConfiguration config = new ApsClientCxfConfiguration();
config.setBaseUrl("http://localhost:8080/activiti-app");
config.setBasicAuthUsername("admin");
config.setBasicAuthPassword("admin");
api = new ApsPublicRestApiJerseyImpl(
new ApsClientJerseyImpl(config));
api = new ApsPublicRestApiCxfImpl(
new ApsClientCxfImpl(config));
}
@Override
public ApsPublicRestApiImpl getApi() {
return api;
}
@@ -21,14 +21,15 @@ import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import com.inteligr8.rs.ClientConfiguration;
@TestPropertySource(locations = {"/local.properties"})
@SpringJUnitConfig(classes = {ApsClientJerseyConfiguration.class, ApsPublicRestApiJerseyImpl.class, ApsClientJerseyImpl.class})
public class ConnectionJerseyClientSpringIT extends ConnectionClientIT {
@TestPropertySource(locations = {"/local-oauth.properties"})
@SpringJUnitConfig(classes = {ApsClientCxfConfiguration.class, ApsPublicRestApiCxfImpl.class, ApsClientCxfImpl.class})
public class ConnectionCxfClientSpringIT extends ConnectionClientIT {
@Autowired
@Qualifier("aps.api.jersey")
@Qualifier("aps.api.cxf")
private ApsPublicRestApiImpl api;
@Override
public ApsPublicRestApiImpl getApi() {
return this.api;
}
@@ -1 +0,0 @@
org.glassfish.jersey.client.JerseyClientBuilder
@@ -1,51 +0,0 @@
/*
* 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);
}
}
@@ -1,57 +0,0 @@
/*
* 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);
}
}
}