Compare commits

...
Author SHA1 Message Date
brian.long 84ef1e37ec v3.0.2-acs26 pom 2026-04-22 12:15:34 -04:00
brian.long 03302ba9f6 Merge branch 'develop-acs26' into stable-acs26 2026-04-22 12:14:21 -04:00
brian.long 8398cf7a02 acs v26.1.0 2026-04-22 12:13:48 -04:00
brian.long af280928ef Merge branch 'develop-acs23' into develop-acs25 2026-04-22 12:10:23 -04:00
brian.long 27a3d2c447 Merge branch 'develop-acs7' into develop-acs23 2026-04-22 12:10:14 -04:00
brian.long 90f8dca117 ossrh-release to central-publish 2026-04-22 12:09:53 -04:00
brian.long a3752a4c5d update dependencies/plugins 2026-04-22 12:09:48 -04:00
brian.long e62e84b1c2 v3.0.1-acs25 pom 2025-11-15 18:36:27 -05:00
brian.long b3f48b4967 Merge branch 'develop-acs25' into stable-acs25 2025-11-15 18:36:05 -05:00
brian.long ac4c6d1514 Merge branch 'develop-acs23' into develop-acs25 2025-11-15 18:35:44 -05:00
brian.long 613e6f1d71 Merge branch 'develop-acs7' into develop-acs23 2025-11-15 18:34:23 -05:00
brian.long 573b52e5d9 added NodeBodyUpdate properties type fix on codegen 2025-11-15 18:31:58 -05:00
brian.long 35338dcce4 Merge branch 'develop-acs25' into stable-acs25 2025-04-08 15:15:14 -04:00
brian.long d46b65424e api-explorer v25.1.0 2025-04-08 15:14:42 -04:00
brian.long c53b22200f Merge branch 'develop-acs23' into stable-acs23 2024-08-15 10:51:37 -04:00
brian.long 6a646f1adc Merge branch 'develop-acs7' into develop-acs23 2024-08-15 10:50:39 -04:00
brian.long 27f2c2677c v3.x; upgrade to jakarta libs 2024-08-15 10:49:32 -04:00
brian.long 76dc420043 Merge branch 'develop-acs23' into stable-acs23 2024-08-13 12:52:48 -04:00
brian.long 7270ff6c96 ACS v23.x pom 2024-08-13 12:51:06 -04:00
brian.long 9f0f090a9d v2.1.1 pom 2023-08-25 11:52:47 -04:00
brian.long 43ef6a6130 Merge branch 'develop-acs7' into stable-acs7 2023-08-25 11:50:48 -04:00
brian.long 783d93dfe2 Merge branch 'develop-acs62' into develop-acs7 2023-08-25 11:49:04 -04:00
brian.long 14853ca9ca Merge branch 'develop-acs61' into develop-acs62 2023-08-25 11:48:55 -04:00
brian.long 91f215ec1d Merge branch 'develop-acs60' into develop-acs61 2023-08-25 11:48:36 -04:00
brian.long c637298e3b Merge branch 'develop-acs52' into develop-acs60 2023-08-25 11:48:30 -04:00
brian.long 224a40c1eb added multi-value property support 2023-08-25 11:48:05 -04:00
brian.long 90baab3fe5 v2.1.0-acs7 pom 2023-06-16 10:31:44 -04:00
brian.long 78f1153be2 Merge branch 'develop-acs7' into stable-acs7 2023-06-16 10:31:20 -04:00
brian.long 3718b3afb1 added Model API path 2023-06-16 10:16:17 -04:00
brian.long b06c7a5b6e Merge branch 'develop-acs62' into develop-acs7 2023-06-16 10:10:49 -04:00
brian.long 6becd9fbcd moved search codegen to fix sizeInBytes type 2023-06-16 10:10:00 -04:00
brian.long 573804252b Merge branch 'develop-acs61' into develop-acs62 2023-06-16 09:51:20 -04:00
brian.long 151366e787 Merge branch 'develop-acs60' into develop-acs61 2023-06-16 09:49:53 -04:00
brian.long af23be4e64 modified path replacement for ACS v6.x+ 2023-06-16 09:47:40 -04:00
brian.long b420e53a58 Merge branch 'develop-acs52' into develop-acs60 2023-06-16 09:40:32 -04:00
brian.long 4587c4d05a Merge branch 'develop-acs51' into develop-acs52 2023-06-16 09:39:43 -04:00
brian.long 216f8573e5 v2.0.3-acs7 2023-06-08 13:41:16 -04:00
brian.long a21ad7f6cb Merge branch 'develop-acs7' into stable-acs7 2023-06-08 13:40:57 -04:00
brian.long 457bdec3ec updated API to v7.3.0 2023-06-08 13:40:02 -04:00
brian.long 6d21a22a2e v2.0.2-acs7 pom 2023-05-28 12:25:44 -04:00
brian.long b835a9c145 Merge branch 'develop-acs7' into stable-acs7 2023-05-28 12:15:22 -04:00
brian.long afa78f27d5 Merge branch 'develop-acs62' into develop-acs7 2023-05-28 12:13:06 -04:00
brian.long 11f1b54dc2 Merge branch 'develop-acs61' into develop-acs62 2023-05-28 12:12:53 -04:00
brian.long 0f32bb67c0 Merge branch 'develop-acs60' into develop-acs61 2023-05-28 12:12:39 -04:00
brian.long 4563273606 Merge branch 'develop-acs52' into develop-acs60 2023-05-28 12:12:24 -04:00
brian.long 6ad9c87d13 Merge branch 'develop-acs51' into develop-acs52 2023-05-28 12:12:10 -04:00
brian.long 0be66eba2b Merge branch 'develop-acs7' into stable-acs7 2022-10-02 18:45:15 -04:00
brian.long 39bdc3ab0d Merge branch 'develop-acs62' into develop-acs7 2022-10-02 18:45:09 -04:00
brian.long 89515eb147 Merge branch 'develop-acs61' into develop-acs62 2022-10-02 18:44:51 -04:00
brian.long 12b4544f81 Merge branch 'develop-acs60' into develop-acs61 2022-10-02 18:44:37 -04:00
brian.long c800a492d6 Merge branch 'develop-acs52' into develop-acs60 2022-10-02 18:44:23 -04:00
brian.long 8e53e44356 Merge branch 'develop-acs51' into develop-acs52 2022-10-02 18:44:04 -04:00
brian.long 0db79d05bb Merge branch 'develop-acs7' into stable-acs7 2022-10-02 18:41:00 -04:00
brian.long e80401167a added ACS v7.0 changes 2022-10-02 18:40:35 -04:00
brian.long 6ab29b64f3 Merge branch 'develop-acs62' into stable-acs62 2022-10-02 18:34:45 -04:00
brian.long 2d05f7a2a5 not ACS v6.2 changes; just version tag 2022-10-02 18:33:58 -04:00
brian.long c84f11868e Merge branch 'develop-acs61' into stable-acs61 2022-10-02 18:33:03 -04:00
brian.long ca54c5f893 added ACS v6.1 changes 2022-10-02 18:32:28 -04:00
brian.long af33dc3730 Merge branch 'develop-acs60' into stable-acs60 2022-10-02 18:27:55 -04:00
brian.long 1f6838ece7 added ACS v6.0 changes 2022-10-02 18:27:27 -04:00
brian.long 038237e2aa Merge branch 'develop-acs52' into stable-acs52 2022-10-02 18:18:10 -04:00
brian.long 407197d3e9 added ACS v5.2 changes 2022-10-02 18:17:30 -04:00
brian.long 29a13ac7b2 Merge branch 'develop-acs51' into stable-acs51 2022-10-02 18:09:56 -04:00
brian.long 50c6cf6199 v2.0.1 pom 2022-07-05 16:25:33 -04:00
brian.long 2d05a1a7d0 Merge branch 'develop' into stable 2022-07-05 16:23:04 -04:00
brian.long f8967b535e Merge branch 'develop' into stable 2022-05-03 13:17:46 -04:00
brian.long a70dfe2d60 updated commons-rest-api to v1.1.6 2022-04-07 23:46:08 -04:00
brian.long e9adb1bf2f v1.1.8 pom 2022-04-07 23:45:47 -04:00
brian.long 898cb702e9 Merge branch 'develop' into stable 2022-04-07 23:45:14 -04:00
brian.long 8fcaed758d updated commons-rest-api for CXF support 2022-03-08 13:42:48 -05:00
brian.long 920aeb4ec4 v1.1.7 pom 2022-03-08 13:38:24 -05:00
brian.long a015ed5101 Merge branch 'develop' into stable 2022-03-08 13:37:40 -05:00
brian.long 4ddb9aafd4 v1.1.6 pom 2022-03-03 10:17:12 -05:00
brian.long 7b0963617e Merge branch 'develop' into stable 2022-03-03 10:14:57 -05:00
brian.long 52010dc76e v1.1.5 pom 2021-10-27 14:34:58 -04:00
brian.long cac4c90781 Merge branch 'develop' into stable 2021-10-27 14:33:54 -04:00
brian.long 117efaeedd Merge branch 'develop' into stable 2021-09-06 13:37:39 -04:00
brian.long b3275519ff v1.1.3 pom 2021-09-03 13:03:26 -04:00
brian.long 3093d2bdc4 Merge branch 'develop' into stable 2021-09-03 13:02:58 -04:00
brian.long 068aff951e v1.1.2 pom 2021-09-01 14:35:37 -04:00
brian.long 76ac68d0e4 Merge branch 'develop' into stable 2021-08-31 22:06:11 -04:00
brian.long 9e0499b243 Merge branch 'develop' into stable 2021-08-31 13:41:01 -04:00
brian.long eb0ab01355 v1.0.6-v1-acs7 pom 2021-08-28 01:09:20 -04:00
brian.long 105868b5df Merge branch 'develop' into stable 2021-08-28 01:09:03 -04:00
brian.long 0e8d522769 v1.0.5-v2 pom 2021-07-22 15:30:18 -04:00
brian.long 7185dd225e using commons-rest-api v1.0.2 to fix jersey/put 2021-07-22 15:25:07 -04:00
brian.long 1e4f420f47 v1.0.4-v2 2021-07-12 15:17:14 -04:00
brian.long 64330e3ca4 Merge branch 'develop' into stable 2021-07-12 15:15:52 -04:00
brian.long 8e538cfec5 v1.0.3-v2 & common v1.0.1 2021-07-07 11:08:54 -04:00
brian.long d0c1e92bce Merge branch 'develop' into stable 2021-07-07 11:08:15 -04:00
brian.long c879fa41b7 using commons version 2021-06-16 16:06:56 -04:00
brian.long 10b8a4c982 v1.0.2-v2 pom 2021-06-16 16:05:52 -04:00
brian.long 7dd7cc0fd4 Merge branch 'develop' into stable 2021-06-16 16:05:18 -04:00
brian.long e9ea115849 Merge branch 'develop' into stable 2021-06-04 13:32:24 -04:00
brian.long 5741c77a45 v1.0.1-v2 pom 2021-06-04 12:24:29 -04:00
brian.long 3bbda05066 Merge branch 'develop' into stable 2021-06-04 12:23:36 -04:00
brian.long cf1da9b6f1 Merge branch 'develop' into stable 2021-06-03 22:49:54 -04:00
brian.long 1f48c3196f changed version for release 2021-06-03 21:22:20 -04:00
9 changed files with 710 additions and 40 deletions
+155 -33
View File
@@ -5,10 +5,10 @@
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>acs-public-rest-api</artifactId>
<version>2.1-SNAPSHOT-acs51</version>
<version>3.0.2-acs26</version>
<name>Alfresco Content Services ReST API for Java</name>
<description>A library for building ACS v5.1.x JAX-RS REST API clients</description>
<description>A library for building ACS JAX-RS REST API clients</description>
<url>https://bitbucket.org/inteligr8/acs-public-rest-api</url>
<licenses>
@@ -38,44 +38,49 @@
<properties>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.debuglevel>lines,vars,source</maven.compiler.debuglevel>
<swagger.basePackage>com.inteligr8.alfresco.acs</swagger.basePackage>
<alfresco.platform.version>5.1.0</alfresco.platform.version>
<alfresco.platform.version>26.1.0</alfresco.platform.version>
<jersey.version>2.39.1</jersey.version>
<cxf.version>3.5.6</cxf.version>
<jackson.version>2.15.1</jackson.version>
<jersey.version>4.0.2</jersey.version>
<cxf.version>4.1.5</cxf.version>
<jackson.version>2.21.2</jackson.version>
</properties>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.11</version>
<version>1.6.16</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.11</version>
<version>2.2.43</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
<version>2.0.17</version>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
@@ -97,10 +102,42 @@
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.10.0</version>
</plugin>
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.68</version>
</plugin>
<plugin>
<groupId>com.inteligr8</groupId>
<artifactId>regex-maven-plugin</artifactId>
<version>1.0.7</version>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>1.12.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<filesets>
<fileset>
@@ -115,7 +152,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>download-api-explorer</id>
@@ -131,9 +167,11 @@
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.45</version>
<configuration>
<language>jaxrs-cxf-client</language>
<configOptions>
<jakarta>true</jakarta>
</configOptions>
<output>${basedir}</output>
<apiPackage>${swagger.basePackage}.api</apiPackage>
<modelPackage>${swagger.basePackage}.model</modelPackage>
@@ -144,6 +182,17 @@
<generateModelDocumentation>false</generateModelDocumentation>
</configuration>
<executions>
<!-- search before core, as ContentInfo is incorrect in search -->
<execution>
<id>swagger-search-codegen</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-search.yaml</inputSpec>
</configuration>
</execution>
<execution>
<id>swagger-core-codegen</id>
<phase>generate-sources</phase>
@@ -164,12 +213,41 @@
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-workflow.yaml</inputSpec>
</configuration>
</execution>
<execution>
<id>swagger-auth-codegen</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-auth.yaml</inputSpec>
</configuration>
</execution>
<execution>
<id>swagger-discovery-codegen</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-discovery.yaml</inputSpec>
</configuration>
</execution>
<execution>
<id>swagger-model-codegen</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-model.yaml</inputSpec>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.inteligr8</groupId>
<artifactId>regex-maven-plugin</artifactId>
<version>1.0.5</version>
<executions>
<execution>
<id>fix-baseUrl</id>
@@ -191,13 +269,33 @@
<replacement></replacement>
</regex>
<regex>
<pattern>(\* Alfresco Core REST API[^@]*)@Path\("/"\)</pattern>
<pattern>public NodeEntry createNode\(@Multipart.*</pattern>
<previousPattern>/\*\*</previousPattern>
</regex>
<regex>
<pattern>(\*\*Core API\*\*[^@]*)@Path\("/"\)</pattern>
<replacement>$1@Path("/api/-default-/public/alfresco/versions/1")</replacement>
</regex>
<regex>
<pattern>(\* Alfresco Workflow REST API[^@]*)@Path\("/"\)</pattern>
<pattern>(\*\*Workflow API\*\*[^@]*)@Path\("/"\)</pattern>
<replacement>$1@Path("/api/-default-/public/workflow/versions/1")</replacement>
</regex>
<regex>
<pattern>(\*\*Authentication API\*\*[^@]*)@Path\("/"\)</pattern>
<replacement>$1@Path("/api/-default-/public/authentication/versions/1")</replacement>
</regex>
<regex>
<pattern>(\*\*Discovery API\*\*[^@]*)@Path\("/"\)</pattern>
<replacement>$1@Path("/api")</replacement>
</regex>
<regex>
<pattern>(\*\*Search API\*\*[^@]*)@Path\("/"\)</pattern>
<replacement>$1@Path("/api/-default-/public/search/versions/1")</replacement>
</regex>
<regex>
<pattern>(\*\*Model API\*\*[^@]*)@Path\("/"\)</pattern>
<replacement>$1@Path("/api/-default-/public/alfresco/versions/1")</replacement>
</regex>
</regexes>
</configuration>
</execution>
@@ -223,12 +321,37 @@
</regexes>
</configuration>
</execution>
<execution>
<id>fix-NodeBodyUpdateProperties</id>
<phase>generate-sources</phase>
<goals>
<goal>replace-file</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/src/gen/java/com/inteligr8/alfresco/acs/model</directory>
<outputDirectory>${basedir}/src/gen/java/com/inteligr8/alfresco/acs/model</outputDirectory>
</fileset>
</filesets>
<allowMultiLineMatch>true</allowMultiLineMatch>
<regexes>
<regex>
<pattern>Map&lt;String, String&gt; properties</pattern>
<replacement>Map&lt;String, Object&gt; properties</replacement>
</regex>
<regex>
<pattern>Map&lt;String, String&gt; getProperties</pattern>
<replacement>Map&lt;String, Object&gt; getProperties</replacement>
</regex>
</regexes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>1.6.2</version>
<executions>
<execution>
<id>organize-imports</id>
@@ -249,7 +372,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>add-gensrc</id>
@@ -270,7 +392,7 @@
<profiles>
<profile>
<id>ossrh-release</id>
<id>central-publish</id>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
@@ -288,7 +410,6 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.2</version>
<executions>
<execution>
<id>javadoc</id>
@@ -312,19 +433,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>
@@ -14,18 +14,36 @@
*/
package com.inteligr8.alfresco.acs;
import com.inteligr8.alfresco.acs.api.ActionsApi;
import com.inteligr8.alfresco.acs.api.ActivitiesApi;
import com.inteligr8.alfresco.acs.api.AspectsApi;
import com.inteligr8.alfresco.acs.api.AuditApi;
import com.inteligr8.alfresco.acs.api.AuthenticationApi;
import com.inteligr8.alfresco.acs.api.CommentsApi;
import com.inteligr8.alfresco.acs.api.DeploymentsApi;
import com.inteligr8.alfresco.acs.api.DiscoveryApi;
import com.inteligr8.alfresco.acs.api.DownloadsApi;
import com.inteligr8.alfresco.acs.api.FavoritesApi;
import com.inteligr8.alfresco.acs.api.GroupsApi;
import com.inteligr8.alfresco.acs.api.NetworksApi;
import com.inteligr8.alfresco.acs.api.NodesApi;
import com.inteligr8.alfresco.acs.api.PeopleApi;
import com.inteligr8.alfresco.acs.api.PreferencesApi;
import com.inteligr8.alfresco.acs.api.ProbesApi;
import com.inteligr8.alfresco.acs.api.ProcessDefinitionsApi;
import com.inteligr8.alfresco.acs.api.ProcessesApi;
import com.inteligr8.alfresco.acs.api.QueriesApi;
import com.inteligr8.alfresco.acs.api.RatingsApi;
import com.inteligr8.alfresco.acs.api.RenditionsApi;
import com.inteligr8.alfresco.acs.api.SearchApi;
import com.inteligr8.alfresco.acs.api.SharedLinksApi;
import com.inteligr8.alfresco.acs.api.SitesApi;
import com.inteligr8.alfresco.acs.api.TagsApi;
import com.inteligr8.alfresco.acs.api.TasksApi;
import com.inteligr8.alfresco.acs.api.TrashcanApi;
import com.inteligr8.alfresco.acs.api.TypesApi;
import com.inteligr8.alfresco.acs.api.V0Api;
import com.inteligr8.alfresco.acs.api.VersionsApi;
/**
* This interface consolidates the JAX-RS APIs available in the ACS Public
@@ -37,26 +55,66 @@ public interface AcsPublicRestApi {
<T> T getApi(Class<T> apiClass);
default ActionsApi getActionsApi() {
return this.getApi(ActionsApi.class);
}
default ActivitiesApi getActivitiesApi() {
return this.getApi(ActivitiesApi.class);
}
default AspectsApi getAspectsApi() {
return this.getApi(AspectsApi.class);
}
default AuditApi getAuditApi() {
return this.getApi(AuditApi.class);
}
default AuthenticationApi getAuthenticationApi() {
return this.getApi(AuthenticationApi.class);
}
default CommentsApi getCommentsApi() {
return this.getApi(CommentsApi.class);
}
default DeploymentsApi getDeploymentsApi() {
return this.getApi(DeploymentsApi.class);
}
default DeploymentsApi getDeploymentsApi() {
return this.getApi(DeploymentsApi.class);
default DiscoveryApi getDiscoveryApi() {
return this.getApi(DiscoveryApi.class);
}
default DownloadsApi getDownloadsApi() {
return this.getApi(DownloadsApi.class);
}
default FavoritesApi getFavoritesApi() {
return this.getApi(FavoritesApi.class);
}
default GroupsApi getGroupsApi() {
return this.getApi(GroupsApi.class);
}
default NetworksApi getNetworksApi() {
return this.getApi(NetworksApi.class);
}
default NodesApi getNodesApi() {
return this.getApi(NodesApi.class);
}
default PeopleApi getPeopleApi() {
return this.getApi(PeopleApi.class);
}
default PreferencesApi getPreferencesApi() {
return this.getApi(PreferencesApi.class);
}
default ProcessDefinitionsApi getProcessDefinitionApi() {
return this.getApi(ProcessDefinitionsApi.class);
}
@@ -65,10 +123,30 @@ public interface AcsPublicRestApi {
return this.getApi(ProcessesApi.class);
}
default ProbesApi getProbesApi() {
return this.getApi(ProbesApi.class);
}
default QueriesApi getQueriesApi() {
return this.getApi(QueriesApi.class);
}
default RatingsApi getRatingsApi() {
return this.getApi(RatingsApi.class);
}
default RenditionsApi getRenditionsApi() {
return this.getApi(RenditionsApi.class);
}
default SearchApi getSearchApi() {
return this.getApi(SearchApi.class);
}
default SharedLinksApi getSharedLinksApi() {
return this.getApi(SharedLinksApi.class);
}
default SitesApi getSitesApi() {
return this.getApi(SitesApi.class);
}
@@ -81,6 +159,18 @@ public interface AcsPublicRestApi {
return this.getApi(TasksApi.class);
}
default TrashcanApi getTrashcanApi() {
return this.getApi(TrashcanApi.class);
}
default TypesApi getTypesApi() {
return this.getApi(TypesApi.class);
}
default VersionsApi getVersionsApi() {
return this.getApi(VersionsApi.class);
}
default V0Api getV0Api() {
return this.getApi(V0Api.class);
}
@@ -0,0 +1,32 @@
/*
* 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.acs;
import com.inteligr8.alfresco.acs.api.NodesCxfApi;
/**
* This interface appends Apache CXF implementation specific methods to the
* JAX-RS API of the ACS Public ReST API. This is due to a lack of multi-part
* in the JAX-RS specification.
*
* @author brian@inteligr8.com
*/
public interface AcsPublicRestCxfApi extends AcsPublicRestApi {
default NodesCxfApi getNodesExtApi() {
return this.getApi(NodesCxfApi.class);
}
}
@@ -0,0 +1,32 @@
/*
* 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.acs;
import com.inteligr8.alfresco.acs.api.NodesJerseyApi;
/**
* This interface appends Jersey implementation specific methods to the
* JAX-RS API of the ACS Public ReST API. This is due to a lack of multi-part
* in the JAX-RS specification.
*
* @author brian@inteligr8.com
*/
public interface AcsPublicRestJerseyApi extends AcsPublicRestApi {
default NodesJerseyApi getNodesExtApi() {
return this.getApi(NodesJerseyApi.class);
}
}
@@ -0,0 +1,87 @@
/*
* 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.acs.api;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import com.inteligr8.alfresco.acs.model.Error;
import com.inteligr8.alfresco.acs.model.NodeBodyCreateMultipartCxf;
import com.inteligr8.alfresco.acs.model.NodeEntry;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
@Path("/api/-default-/public/alfresco/versions/1")
@Api(value = "/api/-default-/public/alfresco/versions/1", description = "")
public interface NodesCxfApi {
@POST
@Path("/nodes/{nodeId}/children")
@Consumes({ MediaType.MULTIPART_FORM_DATA })
@Produces({ MediaType.APPLICATION_JSON })
@ApiOperation(value = "Create a node", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 201, message = "Successful response", response = NodeEntry.class),
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format or **nodeBodyCreate** is invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 403, message = "Current user does not have permission to create children of **nodeId**"),
@ApiResponse(code = 404, message = "**nodeId** or **renditionId** does not exist "),
@ApiResponse(code = 409, message = "New name clashes with an existing node in the current parent folder"),
@ApiResponse(code = 413, message = "Content exceeds individual file size limit configured for the network or system"),
@ApiResponse(code = 415, message = "Content Type is not supported"),
@ApiResponse(code = 422, message = "Model integrity exception including a file name containing invalid characters"),
@ApiResponse(code = 507, message = "Content exceeds overall storage quota limit configured for the network or system"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public NodeEntry createNode(
@PathParam("nodeId") String nodeId,
NodeBodyCreateMultipartCxf body);
/*
* This better impl doesn't work
*
@POST
@Path("/nodes/{nodeId}/children")
@Consumes({ MediaType.MULTIPART_FORM_DATA })
@Produces({ MediaType.APPLICATION_JSON })
@ApiOperation(value = "Create a node", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 201, message = "Successful response", response = NodeEntry.class),
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format or **nodeBodyCreate** is invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 403, message = "Current user does not have permission to create children of **nodeId**"),
@ApiResponse(code = 404, message = "**nodeId** or **renditionId** does not exist "),
@ApiResponse(code = 409, message = "New name clashes with an existing node in the current parent folder"),
@ApiResponse(code = 413, message = "Content exceeds individual file size limit configured for the network or system"),
@ApiResponse(code = 415, message = "Content Type is not supported"),
@ApiResponse(code = 422, message = "Model integrity exception including a file name containing invalid characters"),
@ApiResponse(code = 507, message = "Content exceeds overall storage quota limit configured for the network or system"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public NodeEntry createNode(
@PathParam("nodeId") String nodeId,
@Multipart("name") String name,
@Multipart("nodeType") String nodeType,
@Multipart("filedata") InputStream fileStream,
@Multipart("filedata") ContentDisposition disposition,
@Multipart(value = "autoRename", required = false) Boolean autoRename,
@Multipart(value = "majorVersion", required = false) Boolean majorVersion,
@Multipart(value = "versioningEnabled", required = false) Boolean versioningEnabled);
*/
}
@@ -0,0 +1,58 @@
/*
* 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.acs.api;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import com.inteligr8.alfresco.acs.model.Error;
import com.inteligr8.alfresco.acs.model.NodeBodyCreateMultipartJersey;
import com.inteligr8.alfresco.acs.model.NodeEntry;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
@Path("/api/-default-/public/alfresco/versions/1")
@Api(value = "/api/-default-/public/alfresco/versions/1", description = "")
public interface NodesJerseyApi {
@POST
@Path("/nodes/{nodeId}/children")
@Consumes({ MediaType.MULTIPART_FORM_DATA })
@Produces({ MediaType.APPLICATION_JSON })
@ApiOperation(value = "Create a node", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 201, message = "Successful response", response = NodeEntry.class),
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format or **nodeBodyCreate** is invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 403, message = "Current user does not have permission to create children of **nodeId**"),
@ApiResponse(code = 404, message = "**nodeId** or **renditionId** does not exist "),
@ApiResponse(code = 409, message = "New name clashes with an existing node in the current parent folder"),
@ApiResponse(code = 413, message = "Content exceeds individual file size limit configured for the network or system"),
@ApiResponse(code = 415, message = "Content Type is not supported"),
@ApiResponse(code = 422, message = "Model integrity exception including a file name containing invalid characters"),
@ApiResponse(code = 507, message = "Content exceeds overall storage quota limit configured for the network or system"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public NodeEntry createNode(
@PathParam("nodeId") String nodeId,
NodeBodyCreateMultipartJersey file);
}
@@ -16,11 +16,11 @@ package com.inteligr8.alfresco.acs.api;
import java.util.List;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import com.inteligr8.alfresco.acs.model.v0.AssociationInfo;
import com.inteligr8.alfresco.acs.model.v0.ClassInfo;
@@ -0,0 +1,126 @@
/*
* 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.acs.model;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.ContentDisposition;
import org.apache.cxf.jaxrs.ext.multipart.MultipartBody;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* A CXF utility implementation of the CXF MultipartBody.
*
* @author brian@inteligr8.com
*/
public class NodeBodyCreateMultipartCxf extends MultipartBody {
private static final Logger logger = LoggerFactory.getLogger(NodeBodyCreateMultipartCxf.class);
private static final ObjectMapper om = new ObjectMapper();
public static NodeBodyCreateMultipartCxf from(
NodeBodyCreate nodeBody, String filename, InputStream istream,
Boolean autoRename, Boolean majorVersion, Boolean versioningEnabled) throws IOException {
List<Attachment> atts = new LinkedList<>();
atts.addAll(toAttachments(nodeBody));
if (autoRename != null)
atts.add(toAttachment("autoRename", String.valueOf(autoRename)));
if (majorVersion != null)
atts.add(toAttachment("majorVersion", String.valueOf(majorVersion)));
if (versioningEnabled != null)
atts.add(toAttachment("versioningEnabled", String.valueOf(versioningEnabled)));
atts.add(toAttachment(filename, istream));
return new NodeBodyCreateMultipartCxf(atts, true);
}
public NodeBodyCreateMultipartCxf(List<Attachment> atts) throws IOException {
super(atts);
}
public NodeBodyCreateMultipartCxf(List<Attachment> atts, boolean outbound) throws IOException {
super(atts, outbound);
}
public NodeBodyCreate getBody() throws IOException {
if (!MediaType.APPLICATION_JSON_TYPE.equals(this.getRootAttachment().getContentType()))
throw new IllegalStateException();
InputStream istream = this.getRootAttachment().getDataHandler().getInputStream();
try {
return om.readValue(istream, NodeBodyCreate.class);
} finally {
istream.close();
}
}
public Attachment getFiledataAttachment() {
return this.getAttachment("filedata");
}
private static List<Attachment> toAttachments(NodeBodyCreate nodeBody) throws IOException {
List<Attachment> atts = new LinkedList<>();
atts.add(toAttachment("name", nodeBody.getName()));
atts.add(toAttachment("nodeType", nodeBody.getNodeType()));
if (nodeBody.getAspectNames() != null && !nodeBody.getAspectNames().isEmpty())
logger.warn("The ACS Public REST API does not support the explicit inclusion of aspects while creating content");
if (nodeBody.getProperties() != null) {
@SuppressWarnings("unchecked")
Map<String, ?> props = (Map<String, ?>)nodeBody.getProperties();
for (Entry<String, ?> prop : props.entrySet()) {
if (prop.getValue() instanceof Collection<?>) {
for (Object value : (Collection<?>)prop.getValue())
if (value != null)
atts.add(toAttachment(prop.getKey(), value.toString()));
} else if (prop.getValue() instanceof Object[]) {
for (Object value : (Object[])prop.getValue())
if (value != null)
atts.add(toAttachment(prop.getKey(), value.toString()));
} else if (prop.getValue() != null) {
// FIXME convert dates as ACS would expect them to be formatted
atts.add(toAttachment(prop.getKey(), prop.getValue().toString()));
}
}
}
return atts;
}
private static Attachment toAttachment(String name, String value) {
return new Attachment(name, new ByteArrayInputStream(value.getBytes()), new ContentDisposition("form-data; name=\"" + name + "\""));
}
private static Attachment toAttachment(String filename, InputStream istream) {
if (filename == null) {
return new Attachment("filedata", istream, new ContentDisposition("form-data; name=\"filedata\""));
} else {
return new Attachment("filedata", istream, new ContentDisposition("form-data; name=\"filedata\"; filename=\"" + filename + "\""));
}
}
}
@@ -0,0 +1,123 @@
/*
* 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.acs.model;
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import jakarta.ws.rs.core.MediaType;
import org.glassfish.jersey.media.multipart.BodyPart;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* A Jersey utility implementation of the Jersey FormDataMultiPart.
*
* @author brian@inteligr8.com
*/
public class NodeBodyCreateMultipartJersey extends FormDataMultiPart {
private static final Logger logger = LoggerFactory.getLogger(NodeBodyCreateMultipartJersey.class);
private static final ObjectMapper om = new ObjectMapper();
public static NodeBodyCreateMultipartJersey from(
NodeBodyCreate nodeBody, String filename, InputStream istream,
Boolean autoRename, Boolean majorVersion, Boolean versioningEnabled) throws IOException, ParseException {
NodeBodyCreateMultipartJersey multipart = new NodeBodyCreateMultipartJersey();
multipart.field("autoRename", String.valueOf(autoRename))
.field("majorVersion", String.valueOf(majorVersion))
.field("versioningEnabled", String.valueOf(versioningEnabled))
.bodyPart(toBodyPart(filename, istream))
.getBodyParts().addAll(toFields(nodeBody));
return multipart;
}
private NodeBodyCreateMultipartJersey() throws IOException {
}
public NodeBodyCreate getBody() throws IOException {
BodyPart bodyPart = this.getField("");
if (bodyPart == null)
throw new IllegalStateException();
if (!MediaType.APPLICATION_JSON_TYPE.equals(bodyPart.getMediaType()))
throw new IllegalStateException();
InputStream istream = bodyPart.getEntityAs(InputStream.class);
try {
return om.readValue(istream, NodeBodyCreate.class);
} finally {
istream.close();
}
}
public FormDataBodyPart getFiledataAttachment() {
return this.getField("filedata");
}
private static List<FormDataBodyPart> toFields(NodeBodyCreate nodeBody) throws IOException {
List<FormDataBodyPart> fields = new LinkedList<>();
fields.add(new FormDataBodyPart("name", nodeBody.getName()));
fields.add(new FormDataBodyPart("nodeType", nodeBody.getNodeType()));
if (nodeBody.getAspectNames() != null && !nodeBody.getAspectNames().isEmpty())
logger.warn("The ACS Public REST API does not support the explicit inclusion of aspects while creating content");
if (nodeBody.getProperties() != null) {
@SuppressWarnings("unchecked")
Map<String, ?> props = (Map<String, ?>)nodeBody.getProperties();
for (Entry<String, ?> prop : props.entrySet()) {
if (prop.getValue() instanceof Collection<?>) {
for (Object value : (Collection<?>)prop.getValue())
if (value != null)
fields.add(new FormDataBodyPart(prop.getKey(), value.toString()));
} else if (prop.getValue() instanceof Object[]) {
for (Object value : (Object[])prop.getValue())
if (value != null)
fields.add(new FormDataBodyPart(prop.getKey(), value.toString()));
} else if (prop.getValue() != null) {
// FIXME convert dates as ACS would expect them to be formatted
fields.add(new FormDataBodyPart(prop.getKey(), prop.getValue().toString()));
}
}
}
return fields;
}
private static BodyPart toBodyPart(String filename, InputStream istream) throws ParseException {
if (filename == null) {
return new FormDataBodyPart()
.contentDisposition(new FormDataContentDisposition("form-data; name=\"filedata\""))
.entity(istream);
} else {
return new FormDataBodyPart()
.contentDisposition(new FormDataContentDisposition("form-data; name=\"filedata\"; filename=\"" + filename + "\""))
.entity(istream);
}
}
}