Compare commits

...

37 Commits

Author SHA1 Message Date
449c352aa5 Merge branch 'develop-cxf' into stable-cxf 2025-04-08 14:59:21 -04:00
0ed36d0faf using ApsProtectedRestCxfApi 2025-04-08 14:58:49 -04:00
7f89bdae81 Merge branch 'stable' into stable-cxf 2025-04-08 14:57:38 -04:00
7d79448d6b v3.0.2 pom 2025-04-08 14:53:20 -04:00
215225537d aps-public-rest-api v3.0.5 for build support 2025-04-08 14:52:14 -04:00
c035e9bec2 Merge branch 'stable' into stable-cxf 2024-09-23 16:31:02 -04:00
24608d99c8 Merge branch 'develop-cxf' into stable-cxf 2024-09-23 16:29:38 -04:00
abec1452cf v3.0.1 pom 2024-09-23 16:26:08 -04:00
80cc21d013 Merge branch 'develop' into stable 2024-09-23 16:25:23 -04:00
19d879308d added protected API impl 2024-09-23 16:23:05 -04:00
1bb80dd0e3 Merge branch 'develop' into develop-cxf 2024-09-23 16:19:57 -04:00
eacbcaae30 Merge branch 'develop-cxf' into stable-cxf 2024-08-15 12:38:18 -04:00
28b3c5d10f Merge branch 'develop' into stable 2024-08-15 12:35:46 -04:00
5a509eeb82 v3.x; cxf v4.x 2024-08-15 12:32:20 -04:00
cf7f30328d v2.0.5-cxf 2023-06-29 11:54:22 -04:00
af43f12d72 Merge branch 'develop-cxf' into stable-cxf 2023-06-29 11:54:04 -04:00
5cce720728 v2.0.5 pom 2023-06-29 11:48:50 -04:00
097bb909be Merge branch 'develop' into stable 2023-06-29 11:48:32 -04:00
49a3255e4d Merge branch 'develop' into develop-cxf 2023-06-29 11:46:36 -04:00
d8a365eb37 v2.0.4-cxf 2023-05-30 11:23:49 -04:00
d8aa8253c4 Merge branch 'develop-cxf' into stable-cxf 2023-05-30 11:22:23 -04:00
5ab46e19ac Merge branch 'develop' into develop-cxf 2023-05-30 11:22:05 -04:00
9b565aa0db v2.0.4 pom 2023-05-30 11:07:39 -04:00
d4cd9ec777 Merge branch 'develop' into stable 2023-05-30 11:07:20 -04:00
fd129b992c v2.0.3-cxf pom 2023-05-28 13:09:54 -04:00
c67a869fee v2.0.3-cxf pom 2023-05-28 13:07:58 -04:00
06de852f2a Merge branch 'develop-cxf' into stable-cxf 2023-05-28 13:07:26 -04:00
7cdbfcb62b v2.0.3 pom 2023-05-28 13:02:01 -04:00
a13e2c7125 Merge branch 'develop' into stable 2023-05-28 13:01:15 -04:00
733310cf3e upgraded CXF version 2023-05-28 12:58:07 -04:00
1618d9956d Merge branch 'develop' into develop-cxf 2023-05-28 12:57:48 -04:00
c48c9531bf Merge branch 'develop-cxf' into stable-cxf 2022-10-03 10:34:12 -04:00
e3c26240c9 Merge branch 'develop' into stable 2022-10-03 10:26:26 -04:00
ade7e9b5a0 added CXF back 2022-10-03 10:25:10 -04:00
7f0b0562bd v2.0.1 pom 2022-05-03 17:14:10 -04:00
eb8e751ca6 Merge branch 'develop' into stable 2022-05-03 17:13:37 -04:00
e59a6fabb0 v2.0.0 pom 2022-05-02 23:48:16 +01:00
8 changed files with 294 additions and 4 deletions

42
pom.xml
View File

@ -5,10 +5,10 @@
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>aps-public-rest-client</artifactId>
<version>3.0-SNAPSHOT</version>
<version>3.0.2-cxf</version>
<name>Alfresco Process Services ReST API Client for Java</name>
<description>An APS Client library for building REST API clients that support either the CXF and Jersey frameworks</description>
<description>An APS Client library for building CXF-based REST API clients</description>
<url>https://bitbucket.org/inteligr8/aps-public-rest-client</url>
<licenses>
@ -45,18 +45,19 @@
<junit.version>5.10.0</junit.version>
<spring.version>6.0.19</spring.version>
<cxf.version>4.0.2</cxf.version>
</properties>
<dependencies>
<dependency>
<groupId>com.inteligr8</groupId>
<artifactId>common-rest-client</artifactId>
<version>3.0.0</version>
<version>3.0.0-cxf</version>
</dependency>
<dependency>
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>aps-public-rest-api</artifactId>
<version>3.0-SNAPSHOT</version>
<version>3.0.5</version>
<scope>provided</scope> <!-- explicitly, bring your own version -->
</dependency>
<dependency>
@ -83,10 +84,43 @@
<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>
<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>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-src</id>
<goals><goal>add-test-source</goal></goals>
<configuration>
<sources>
<source>src/test/cxf</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.0</version>

View File

@ -0,0 +1,46 @@
/*
* 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 org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.inteligr8.rs.ClientCxfConfiguration;
/**
* This class provides a POJO &amp; Spring-based implementation of the
* 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.
*
* @author brian@inteligr8.com
*/
@Configuration
@ComponentScan
public class ApsClientCxfConfiguration extends ApsClientConfiguration implements ClientCxfConfiguration {
@Value("${process.service.cxf.defaultBusEnabled:true}")
private boolean defaultBusEnabled;
public boolean isDefaultBusEnabled() {
return this.defaultBusEnabled;
}
public void setDefaultBusEnabled(boolean defaultBusEnabled) {
this.defaultBusEnabled = defaultBusEnabled;
}
}

View File

@ -0,0 +1,43 @@
/*
* 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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import com.inteligr8.rs.ClientCxfImpl;
/**
* 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.cxf")
@Lazy
public class ApsClientCxfImpl extends ClientCxfImpl {
/**
* This constructor is for Spring or POJO use
*/
@Autowired
public ApsClientCxfImpl(ApsClientCxfConfiguration config) {
super(config);
}
}

View File

@ -0,0 +1,39 @@
/*
* 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 org.springframework.beans.factory.annotation.Autowired;
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.
*
* @author brian@inteligr8.com
*/
@Component("aps.protected-api.cxf")
@Lazy
public class ApsProtectedRestApiCxfImpl extends ApsProtectedRestApiImpl implements ApsProtectedRestCxfApi {
/**
* This constructor is for Spring or POJO use
*/
@Autowired
public ApsProtectedRestApiCxfImpl(ApsClientCxfImpl client) {
super(client);
}
}

View File

@ -0,0 +1,39 @@
/*
* 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 org.springframework.beans.factory.annotation.Autowired;
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.
*
* @author brian@inteligr8.com
*/
@Component("aps.api.cxf")
@Lazy
public class ApsPublicRestApiCxfImpl extends ApsPublicRestApiImpl implements ApsPublicRestCxfApi {
/**
* This constructor is for Spring or POJO use
*/
@Autowired
public ApsPublicRestApiCxfImpl(ApsClientCxfImpl client) {
super(client);
}
}

View File

@ -0,0 +1 @@
org.apache.cxf.jaxrs.client.spec.ClientBuilderImpl

View File

@ -0,0 +1,46 @@
/*
* 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 org.junit.jupiter.api.BeforeAll;
import com.inteligr8.rs.ClientConfiguration;
public class ConnectionCxfClientPojoIT extends ConnectionClientIT {
private static ApsPublicRestApiImpl api;
@BeforeAll
public static void initClient() {
ApsClientCxfConfiguration config = new ApsClientCxfConfiguration();
config.setBaseUrl("http://localhost:8080/activiti-app");
config.setBasicAuthUsername("admin");
config.setBasicAuthPassword("admin");
api = new ApsPublicRestApiCxfImpl(
new ApsClientCxfImpl(config));
}
@Override
public ApsPublicRestApiImpl getApi() {
return api;
}
@Override
public ClientConfiguration getConfiguration() {
return api.getClient().getConfig();
}
}

View File

@ -0,0 +1,42 @@
/*
* 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 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.rs.ClientConfiguration;
@TestPropertySource(locations = {"/local-oauth.properties"})
@SpringJUnitConfig(classes = {ApsClientCxfConfiguration.class, ApsPublicRestApiCxfImpl.class, ApsClientCxfImpl.class})
public class ConnectionCxfClientSpringIT extends ConnectionClientIT {
@Autowired
@Qualifier("aps.api.cxf")
private ApsPublicRestApiImpl api;
@Override
public ApsPublicRestApiImpl getApi() {
return this.api;
}
@Override
public ClientConfiguration getConfiguration() {
return this.api.getClient().getConfig();
}
}