Compare commits
7 Commits
v2.0.2-acs
...
develop-ac
Author | SHA1 | Date | |
---|---|---|---|
c637298e3b | |||
224a40c1eb | |||
af23be4e64 | |||
b420e53a58 | |||
4587c4d05a | |||
a11aced4e3 | |||
27fb71e636 |
11
.gitignore
vendored
11
.gitignore
vendored
@@ -1,10 +1,6 @@
|
||||
# Maven
|
||||
pom.xml.versionsBackup
|
||||
target
|
||||
|
||||
# Maven Invoker
|
||||
build.log
|
||||
invoker-reports
|
||||
pom.xml.versionsBackup
|
||||
|
||||
# Eclipse
|
||||
.project
|
||||
@@ -13,8 +9,9 @@ invoker-reports
|
||||
|
||||
# Visual Studio Code
|
||||
.factorypath
|
||||
.vscode
|
||||
|
||||
# Swagger Codegen
|
||||
src/gen
|
||||
.swagger-codegen
|
||||
.swagger-codegen-ignore
|
||||
.swagger*
|
||||
|
||||
|
65
pom.xml
65
pom.xml
@@ -54,14 +54,23 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-jaxrs</artifactId>
|
||||
<version>1.6.2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.ws.rs</groupId>
|
||||
<artifactId>jsr311-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.6.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>2.2.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>2.0.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.ws.rs</groupId>
|
||||
@@ -120,9 +129,9 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>io.swagger</groupId>
|
||||
<groupId>io.swagger.codegen.v3</groupId>
|
||||
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
||||
<version>2.4.21</version>
|
||||
<version>3.0.45</version>
|
||||
<configuration>
|
||||
<language>jaxrs-cxf-client</language>
|
||||
<output>${basedir}</output>
|
||||
@@ -145,6 +154,16 @@
|
||||
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-core.yaml</inputSpec>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>swagger-workflow-codegen</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<inputSpec>${project.build.directory}/dependency/definitions/alfresco-workflow.yaml</inputSpec>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>swagger-search-codegen</id>
|
||||
<phase>generate-sources</phase>
|
||||
@@ -180,7 +199,7 @@
|
||||
<plugin>
|
||||
<groupId>com.inteligr8</groupId>
|
||||
<artifactId>regex-maven-plugin</artifactId>
|
||||
<version>1.0.4</version>
|
||||
<version>1.0.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>fix-baseUrl</id>
|
||||
@@ -202,24 +221,28 @@
|
||||
<replacement></replacement>
|
||||
</regex>
|
||||
<regex>
|
||||
<pattern>(\*\*Core API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
||||
<replacement>$1@Path("/api/-default-/public/alfresco/versions/1")$2@Api(value = "/api/-default-/public/alfresco/versions/1"</replacement>
|
||||
<pattern>public NodeEntry createNode\(@Multipart.*</pattern>
|
||||
<previousPattern>/\*\*</previousPattern>
|
||||
</regex>
|
||||
<regex>
|
||||
<pattern>(\*\*Search API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
||||
<replacement>$1@Path("/api/-default-/public/search/versions/1")$2@Api(value = "/api/-default-/public/search/versions/1"</replacement>
|
||||
<pattern>(\*\*Core API\*\*[^@]*)@Path\("/"\)</pattern>
|
||||
<replacement>$1@Path("/api/-default-/public/alfresco/versions/1")</replacement>
|
||||
</regex>
|
||||
<regex>
|
||||
<pattern>(\*\*Model API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
||||
<replacement>$1@Path("/api/-default-/public/alfresco/versions/1")$2@Api(value = "/api/-default-/public/alfresco/versions/1"</replacement>
|
||||
<pattern>(\*\*Workflow API\*\*[^@]*)@Path\("/"\)</pattern>
|
||||
<replacement>$1@Path("/api/-default-/public/workflow/versions/1")</replacement>
|
||||
</regex>
|
||||
<regex>
|
||||
<pattern>(\*\*Authentication API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
||||
<replacement>$1@Path("/api/-default-/public/authentication/versions/1")$2@Api(value = "/api/-default-/public/authentication/versions/1"</replacement>
|
||||
<pattern>(\*\*Authentication API\*\*[^@]*)@Path\("/"\)</pattern>
|
||||
<replacement>$1@Path("/api/-default-/public/authentication/versions/1")</replacement>
|
||||
</regex>
|
||||
<regex>
|
||||
<pattern>(\*\*Discovery API\*\*[^@]*)@Path\("/"\)([^@]*)@Api\(value = "/"</pattern>
|
||||
<replacement>$1@Path("/api")$2@Api(value = "/api"</replacement>
|
||||
<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>
|
||||
</regexes>
|
||||
</configuration>
|
||||
|
@@ -18,6 +18,7 @@ import com.inteligr8.alfresco.acs.api.ActivitiesApi;
|
||||
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;
|
||||
@@ -26,6 +27,8 @@ 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.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;
|
||||
@@ -33,6 +36,7 @@ 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.V0Api;
|
||||
import com.inteligr8.alfresco.acs.api.VersionsApi;
|
||||
@@ -62,6 +66,10 @@ public interface AcsPublicRestApi {
|
||||
default CommentsApi getCommentsApi() {
|
||||
return this.getApi(CommentsApi.class);
|
||||
}
|
||||
|
||||
default DeploymentsApi getDeploymentsApi() {
|
||||
return this.getApi(DeploymentsApi.class);
|
||||
}
|
||||
|
||||
default DiscoveryApi getDiscoveryApi() {
|
||||
return this.getApi(DiscoveryApi.class);
|
||||
@@ -90,10 +98,18 @@ public interface AcsPublicRestApi {
|
||||
default PeopleApi getPeopleApi() {
|
||||
return this.getApi(PeopleApi.class);
|
||||
}
|
||||
|
||||
default PreferencesApi getPreferencesApi() {
|
||||
return this.getApi(PreferencesApi.class);
|
||||
}
|
||||
|
||||
default PreferencesApi getPreferencesApi() {
|
||||
return this.getApi(PreferencesApi.class);
|
||||
}
|
||||
|
||||
default ProcessDefinitionsApi getProcessDefinitionApi() {
|
||||
return this.getApi(ProcessDefinitionsApi.class);
|
||||
}
|
||||
|
||||
default ProcessesApi getProcessesApi() {
|
||||
return this.getApi(ProcessesApi.class);
|
||||
}
|
||||
|
||||
default QueriesApi getQueriesApi() {
|
||||
return this.getApi(QueriesApi.class);
|
||||
@@ -122,6 +138,10 @@ public interface AcsPublicRestApi {
|
||||
default TagsApi getTagsApi() {
|
||||
return this.getApi(TagsApi.class);
|
||||
}
|
||||
|
||||
default TasksApi getTasksApi() {
|
||||
return this.getApi(TasksApi.class);
|
||||
}
|
||||
|
||||
default TrashcanApi getTrashcanApi() {
|
||||
return this.getApi(TrashcanApi.class);
|
||||
|
@@ -17,6 +17,7 @@ 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;
|
||||
@@ -90,9 +91,18 @@ public class NodeBodyCreateMultipartCxf extends MultipartBody {
|
||||
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();
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, ?> props = (Map<String, ?>)nodeBody.getProperties();
|
||||
for (Entry<String, ?> prop : props.entrySet()) {
|
||||
if (prop.getValue() != null) {
|
||||
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()));
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@ 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;
|
||||
@@ -86,12 +87,21 @@ public class NodeBodyCreateMultipartJersey extends FormDataMultiPart {
|
||||
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();
|
||||
@SuppressWarnings("unchecked")
|
||||
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()));
|
||||
}
|
||||
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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user