From 5b310afaa6efc9d4961700e3dd38afddf7dbe0a2 Mon Sep 17 00:00:00 2001 From: "Brian M. Long" Date: Mon, 23 Sep 2024 16:19:26 -0400 Subject: [PATCH 1/2] added protected API impl --- pom.xml | 2 +- .../activiti/ApsProtectedRestApiImpl.java | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/inteligr8/alfresco/activiti/ApsProtectedRestApiImpl.java diff --git a/pom.xml b/pom.xml index 7c86977..7a8cb75 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ com.inteligr8.alfresco aps-public-rest-api - 3.0.0 + 3.0-SNAPSHOT provided diff --git a/src/main/java/com/inteligr8/alfresco/activiti/ApsProtectedRestApiImpl.java b/src/main/java/com/inteligr8/alfresco/activiti/ApsProtectedRestApiImpl.java new file mode 100644 index 0000000..959d474 --- /dev/null +++ b/src/main/java/com/inteligr8/alfresco/activiti/ApsProtectedRestApiImpl.java @@ -0,0 +1,41 @@ +/* + * 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 . + */ +package com.inteligr8.alfresco.activiti; + +import com.inteligr8.rs.Client; + +/** + * This class serves as the entrypoint to the JAX-RS API for the APS Public + * ReST API. + * + * @author brian@inteligr8.com + */ +public class ApsProtectedRestApiImpl implements ApsProtectedRestApi { + + private Client client; + + public ApsProtectedRestApiImpl(Client client) { + this.client = client; + } + + public Client getClient() { + return this.client; + } + + public final T getApi(Class apiClass) { + return this.client.getApi(apiClass); + } + +} From 19d879308d95bc21c4d78036ba58b107ec96ebff Mon Sep 17 00:00:00 2001 From: "Brian M. Long" Date: Mon, 23 Sep 2024 16:23:05 -0400 Subject: [PATCH 2/2] added protected API impl --- .../activiti/ApsProtectedRestApiCxfImpl.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/main/cxf/com/inteligr8/alfresco/activiti/ApsProtectedRestApiCxfImpl.java diff --git a/src/main/cxf/com/inteligr8/alfresco/activiti/ApsProtectedRestApiCxfImpl.java b/src/main/cxf/com/inteligr8/alfresco/activiti/ApsProtectedRestApiCxfImpl.java new file mode 100644 index 0000000..c9f097d --- /dev/null +++ b/src/main/cxf/com/inteligr8/alfresco/activiti/ApsProtectedRestApiCxfImpl.java @@ -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 . + */ +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 ApsPublicRestCxfApi { + + /** + * This constructor is for Spring or POJO use + */ + @Autowired + public ApsProtectedRestApiCxfImpl(ApsClientCxfImpl client) { + super(client); + } + +}