removed all acs52+

This commit is contained in:
2022-10-02 18:08:01 -04:00
parent dba2b0cd47
commit dde5d4c3f8
13 changed files with 37 additions and 1307 deletions

View File

@@ -1,247 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>acs-public-rest-api</artifactId>
<version>2.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Alfresco Content Services ReST API for Java</name>
<description>An ACS API library for building REST API clients that support both the CXF and Jersey frameworks</description>
<url>https://bitbucket.org/inteligr8/acs-public-rest-api</url>
<licenses>
<license>
<name>GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007</name>
<url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git:https://bitbucket.org/inteligr8/acs-public-rest-api.git</connection>
<developerConnection>scm:git:git@bitbucket.org:inteligr8/acs-public-rest-api.git</developerConnection>
<url>https://bitbucket.org/inteligr8/acs-public-rest-api</url>
</scm>
<organization>
<name>Inteligr8</name>
<url>https://www.inteligr8.com</url>
</organization>
<developers>
<developer>
<id>brian.long</id>
<name>Brian Long</name>
<email>brian@inteligr8.com</email>
<url>https://twitter.com/brianmlong</url>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<goals>
<goal>clean</goal>
<goal>package</goal>
</goals>
<reportsDirectory>${basedir}/invoker-reports</reportsDirectory>
<pom>pom.xml</pom>
<streamLogs>true</streamLogs>
</configuration>
<executions>
<execution>
<id>acs51</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<properties>
<acs>v51</acs>
</properties>
</configuration>
</execution>
<execution>
<id>acs52</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<properties>
<acs>v52</acs>
</properties>
</configuration>
</execution>
<execution>
<id>acs60</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<properties>
<acs>v60</acs>
</properties>
</configuration>
</execution>
<execution>
<id>acs61</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<properties>
<acs>v61</acs>
</properties>
</configuration>
</execution>
<execution>
<id>acs62</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<properties>
<acs>v62</acs>
</properties>
</configuration>
</execution>
<execution>
<id>acs70</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<properties>
<acs>v70</acs>
</properties>
</configuration>
</execution>
<execution>
<id>acs71</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<properties>
<acs>v71</acs>
</properties>
</configuration>
</execution>
<execution>
<id>acs72</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<properties>
<acs>v72</acs>
</properties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals><goal>attach-artifact</goal></goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar</file>
<classifier>javadoc</classifier>
<type>jar</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-sources.jar</file>
<classifier>sources</classifier>
<type>jar</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-acs51.jar</file>
<classifier>acs51</classifier>
<type>jar</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-acs52.jar</file>
<classifier>acs52</classifier>
<type>jar</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-acs60.jar</file>
<classifier>acs60</classifier>
<type>jar</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-acs61.jar</file>
<classifier>acs61</classifier>
<type>jar</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-acs62.jar</file>
<classifier>acs62</classifier>
<type>jar</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-acs70.jar</file>
<classifier>acs70</classifier>
<type>jar</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-acs71.jar</file>
<classifier>acs71</classifier>
<type>jar</type>
</artifact>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-acs72.jar</file>
<classifier>acs72</classifier>
<type>jar</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<pomFile>pom.xml</pomFile>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>ossrh-release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign</id>
<phase>verify</phase>
<goals><goal>sign</goal></goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

417
pom.xml
View File

@@ -5,10 +5,10 @@
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>acs-public-rest-api</artifactId>
<version>2.1-SNAPSHOT</version>
<version>2.1-SNAPSHOT-acs51</version>
<name>Alfresco Content Services ReST API for Java</name>
<description>An ACS API library for building REST API clients that support both the CXF and Jersey frameworks</description>
<description>A library for building ACS v5.1.x JAX-RS REST API clients</description>
<url>https://bitbucket.org/inteligr8/acs-public-rest-api</url>
<licenses>
@@ -44,11 +44,7 @@
<swagger.basePackage>com.inteligr8.alfresco.acs</swagger.basePackage>
<!-- Defaults overridden automatically when appropriate -->
<api.search.disabled>false</api.search.disabled>
<api.auth.disabled>false</api.auth.disabled>
<api.discovery.disabled>false</api.discovery.disabled>
<api.model.disabled>false</api.model.disabled>
<alfresco.platform.version>5.1.0</alfresco.platform.version>
<jersey.version>2.35</jersey.version>
<cxf.version>3.4.7</cxf.version>
@@ -148,50 +144,6 @@
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-core.yaml</inputSpec>
</configuration>
</execution>
<execution>
<id>swagger-search-codegen</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<skip>${api.search.disabled}</skip>
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-search.yaml</inputSpec>
</configuration>
</execution>
<execution>
<id>swagger-auth-codegen</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<skip>${api.auth.disabled}</skip>
<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>
<skip>${api.discovery.disabled}</skip>
<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>
<skip>${api.model.disabled}</skip>
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-model.yaml</inputSpec>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
@@ -305,360 +257,63 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classifier>${acs.platform.tag}</classifier>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>source</id>
<phase>package</phase>
<goals><goal>jar-no-fork</goal></goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.2</version>
<executions>
<execution>
<id>javadoc</id>
<phase>package</phase>
<goals><goal>jar</goal></goals>
<configuration>
<show>public</show>
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>acs51</id>
<activation>
<property>
<name>acs</name>
<value>v51</value>
</property>
</activation>
<properties>
<alfresco.platform.version>5.1.0</alfresco.platform.version>
<acs.platform.tag>acs51</acs.platform.tag>
<api.search.disabled>true</api.search.disabled>
<api.auth.disabled>true</api.auth.disabled>
<api.discovery.disabled>true</api.discovery.disabled>
<api.model.disabled>true</api.model.disabled>
</properties>
</profile>
<profile>
<id>acs52</id>
<activation>
<property>
<name>acs</name>
<value>v52</value>
</property>
</activation>
<properties>
<alfresco.platform.version>5.2.0</alfresco.platform.version>
<acs.platform.tag>acs52</acs.platform.tag>
<api.model.disabled>true</api.model.disabled>
</properties>
<id>ossrh-release</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>add-acs70+-src</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
</goals>
<id>source</id>
<phase>package</phase>
<goals><goal>jar-no-fork</goal></goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.2</version>
<executions>
<execution>
<id>javadoc</id>
<phase>package</phase>
<goals><goal>jar</goal></goals>
<configuration>
<sources>
<source>src/acs52+/java</source>
</sources>
<show>public</show>
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>acs60</id>
<activation>
<property>
<name>acs</name>
<value>v60</value>
</property>
</activation>
<properties>
<alfresco.platform.version>6.0.0-ea</alfresco.platform.version>
<acs.platform.tag>acs60</acs.platform.tag>
<api.model.disabled>true</api.model.disabled>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>add-acs70+-src</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/acs52+/java</source>
<source>src/acs60+/java</source>
</sources>
</configuration>
<id>sign</id>
<phase>verify</phase>
<goals><goal>sign</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>acs61</id>
<activation>
<property>
<name>acs</name>
<value>v61</value>
</property>
</activation>
<properties>
<alfresco.platform.version>6.1.0</alfresco.platform.version>
<acs.platform.tag>acs61</acs.platform.tag>
<api.model.disabled>true</api.model.disabled>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
<executions>
<execution>
<id>add-acs70+-src</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/acs52+/java</source>
<source>src/acs60+/java</source>
<source>src/acs61+/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>acs62</id>
<activation>
<property>
<name>acs</name>
<value>v62</value>
</property>
</activation>
<properties>
<alfresco.platform.version>6.2.0</alfresco.platform.version>
<acs.platform.tag>acs62</acs.platform.tag>
<api.model.disabled>true</api.model.disabled>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>add-acs70+-src</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/acs52+/java</source>
<source>src/acs60+/java</source>
<source>src/acs61+/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>acs70</id>
<activation>
<property>
<name>acs</name>
<value>v70</value>
</property>
</activation>
<properties>
<alfresco.platform.version>7.0.0</alfresco.platform.version>
<acs.platform.tag>acs70</acs.platform.tag>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>add-acs70+-src</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/acs52+/java</source>
<source>src/acs60+/java</source>
<source>src/acs61+/java</source>
<source>src/acs70+/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>acs71</id>
<activation>
<property>
<name>acs</name>
<value>v71</value>
</property>
</activation>
<properties>
<alfresco.platform.version>7.1.0</alfresco.platform.version>
<acs.platform.tag>acs71</acs.platform.tag>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>add-acs70+-src</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/acs52+/java</source>
<source>src/acs60+/java</source>
<source>src/acs61+/java</source>
<source>src/acs70+/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>acs72</id>
<activation>
<property>
<name>acs</name>
<value>v72</value>
</property>
</activation>
<properties>
<alfresco.platform.version>7.2.0</alfresco.platform.version>
<acs.platform.tag>acs72</acs.platform.tag>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>add-acs70+-src</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/acs52+/java</source>
<source>src/acs60+/java</source>
<source>src/acs61+/java</source>
<source>src/acs70+/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>acsDefault</id>
<activation>
<property>
<name>!acs</name>
</property>
</activation>
<properties>
<alfresco.platform.version>7.2.0</alfresco.platform.version>
<acs.platform.tag>acs72</acs.platform.tag>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>add-acs70+-src</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/acs52+/java</source>
<source>src/acs60+/java</source>
<source>src/acs61+/java</source>
<source>src/acs70+/java</source>
</sources>
</configuration>
<id>ossrh-deploy</id>
<phase>deploy</phase>
<goals><goal>deploy</goal></goals>
</execution>
</executions>
</plugin>

View File

@@ -1,127 +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.acs;
import com.inteligr8.alfresco.acs.api.ActivitiesApi;
import com.inteligr8.alfresco.acs.api.AuthenticationApi;
import com.inteligr8.alfresco.acs.api.CommentsApi;
import com.inteligr8.alfresco.acs.api.DiscoveryApi;
import com.inteligr8.alfresco.acs.api.FavoritesApi;
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.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.TrashcanApi;
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
* ReST API.
*
* @author brian@inteligr8.com
*/
public interface Acs52PublicRestApi extends Acs51PublicRestApi {
<T> T getApi(Class<T> apiClass);
default ActivitiesApi getActivitiesApi() {
return this.getApi(ActivitiesApi.class);
}
default AuthenticationApi getAuthenticationApi() {
return this.getApi(AuthenticationApi.class);
}
default CommentsApi getCommentsApi() {
return this.getApi(CommentsApi.class);
}
default DiscoveryApi getDiscoveryApi() {
return this.getApi(DiscoveryApi.class);
}
default FavoritesApi getFavoritesApi() {
return this.getApi(FavoritesApi.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 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);
}
default TagsApi getTagsApi() {
return this.getApi(TagsApi.class);
}
default TrashcanApi getTrashcanApi() {
return this.getApi(TrashcanApi.class);
}
default VersionsApi getVersionsApi() {
return this.getApi(VersionsApi.class);
}
default V0Api getV0Api() {
return this.getApi(V0Api.class);
}
default V0Api getLegacyApi() {
return this.getV0Api();
}
}

View File

@@ -1,32 +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.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 Acs52PublicRestCxfApi extends Acs52PublicRestApi {
default NodesCxfApi getNodesExtApi() {
return this.getApi(NodesCxfApi.class);
}
}

View File

@@ -1,32 +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.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 Acs52PublicRestJerseyApi extends Acs52PublicRestApi {
default NodesJerseyApi getNodesExtApi() {
return this.getApi(NodesJerseyApi.class);
}
}

View File

@@ -1,87 +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.acs.api;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.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);
*/
}

View File

@@ -1,58 +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.acs.api;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.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);
}

View File

@@ -1,116 +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.acs.model;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.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) {
Map<String, ?> props = (Map<String, ?>)nodeBody.getProperties();
for (Entry<String, ?> prop : props.entrySet()) {
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 + "\""));
}
}
}

View File

@@ -1,113 +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.acs.model;
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.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) {
Map<String, ?> props = (Map<String, ?>)nodeBody.getProperties();
for (Entry<String, ?> prop : props.entrySet()) {
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);
}
}
}

View File

@@ -1,41 +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.acs;
import com.inteligr8.alfresco.acs.api.AuditApi;
import com.inteligr8.alfresco.acs.api.DownloadsApi;
import com.inteligr8.alfresco.acs.api.GroupsApi;
/**
* This interface consolidates the JAX-RS APIs available in the ACS Public
* ReST API.
*
* @author brian@inteligr8.com
*/
public interface Acs60PublicRestApi extends Acs52PublicRestApi {
default AuditApi getAuditApi() {
return this.getApi(AuditApi.class);
}
default DownloadsApi getDownloadsApi() {
return this.getApi(DownloadsApi.class);
}
default GroupsApi getGroupsApi() {
return this.getApi(GroupsApi.class);
}
}

View File

@@ -1,36 +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.acs;
import com.inteligr8.alfresco.acs.api.ActionsApi;
import com.inteligr8.alfresco.acs.api.ProbesApi;
/**
* This interface consolidates the JAX-RS APIs available in the ACS Public
* ReST API.
*
* @author brian@inteligr8.com
*/
public interface Acs61PublicRestApi extends Acs60PublicRestApi {
default ActionsApi getActionsApi() {
return this.getApi(ActionsApi.class);
}
default ProbesApi getProbesApi() {
return this.getApi(ProbesApi.class);
}
}

View File

@@ -1,36 +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.acs;
import com.inteligr8.alfresco.acs.api.AspectsApi;
import com.inteligr8.alfresco.acs.api.TypesApi;
/**
* This interface consolidates the JAX-RS APIs available in the ACS Public
* ReST API.
*
* @author brian@inteligr8.com
*/
public interface Acs70PublicRestApi extends Acs61PublicRestApi {
default AspectsApi getAspectsApi() {
return this.getApi(AspectsApi.class);
}
default TypesApi getTypesApi() {
return this.getApi(TypesApi.class);
}
}

View File

@@ -29,7 +29,7 @@ import com.inteligr8.alfresco.acs.api.V0Api;
*
* @author brian@inteligr8.com
*/
public interface Acs51PublicRestApi {
public interface AcsPublicRestApi {
<T> T getApi(Class<T> apiClass);