Compare commits
23 Commits
v1.1.2
...
develop-ap
Author | SHA1 | Date | |
---|---|---|---|
9f6d6661e2 | |||
a3cef80cb3 | |||
9d031414d3 | |||
38b95c3425 | |||
7048e42ca1 | |||
41351f7d34 | |||
8697d67b39 | |||
ffbad94822 | |||
f93e201329 | |||
ef89e478cb | |||
c38b82f75b | |||
ed9fe6dfc5 | |||
a14564c87f | |||
06c8bf5f2f | |||
0365425e4f | |||
14c91eb237 | |||
2e7f1f771e | |||
359cb7a97d | |||
da7cbdc30e | |||
ca083dbc42 | |||
9f4c18d379 | |||
709c230423 | |||
3f344b3864 |
254
pom.xml
254
pom.xml
@@ -2,122 +2,75 @@
|
||||
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>aps-public-rest-api</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
<name>Alfresco Process Services ReST API Client for Java</name>
|
||||
<version>2.0-SNAPSHOT-aps1</version>
|
||||
|
||||
<name>Alfresco Process Services ReST API for Java</name>
|
||||
<description>An APS API library for APS v1.x REST API clients</description>
|
||||
<url>https://bitbucket.org/inteligr8/aps-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/aps-public-rest-api.git</connection>
|
||||
<developerConnection>scm:git:git@bitbucket.org:inteligr8/aps-public-rest-api.git</developerConnection>
|
||||
<url>https://bitbucket.org/inteligr8/aps-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>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<maven.compiler.debuglevel>lines,vars,source</maven.compiler.debuglevel>
|
||||
|
||||
<!-- If you want to build for your specific version, point to your own
|
||||
installation -->
|
||||
<aps.baseUrl>https://activiti.alfresco.com</aps.baseUrl>
|
||||
|
||||
<junit.version>5.7.2</junit.version>
|
||||
<spring.version>5.2.14.RELEASE</spring.version>
|
||||
<jersey.version>2.34</jersey.version>
|
||||
<cxf.version>3.3.2</cxf.version>
|
||||
<jersey.version>2.35</jersey.version>
|
||||
<cxf.version>3.4.7</cxf.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.inteligr8</groupId>
|
||||
<artifactId>common-rest-api</artifactId>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
<groupId>jakarta.ws.rs</groupId>
|
||||
<artifactId>jakarta.ws.rs-api</artifactId>
|
||||
<version>2.1.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.ext</groupId>
|
||||
<artifactId>jersey-proxy-client</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
<scope>provided</scope>
|
||||
<groupId>com.fasterxml.jackson.module</groupId>
|
||||
<artifactId>jackson-module-jaxb-annotations</artifactId>
|
||||
<version>2.12.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-rs-client</artifactId>
|
||||
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.core</groupId>
|
||||
<artifactId>jersey-client</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.inject</groupId>
|
||||
<artifactId>jersey-hk2</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.media</groupId>
|
||||
<artifactId>jersey-media-json-jackson</artifactId>
|
||||
<artifactId>jersey-media-multipart</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.9</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>javadoc</id>
|
||||
<phase>package</phase>
|
||||
<goals><goal>jar</goal></goals>
|
||||
<configuration>
|
||||
<show>public</show>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<!-- Implement when descriptor is available -->
|
||||
<profile>
|
||||
@@ -128,6 +81,7 @@
|
||||
<id>raml-codegen</id>
|
||||
<properties>
|
||||
<aps.ramlUrl>${aps.baseUrl}/activiti-app/raml/activiti.raml</aps.ramlUrl>
|
||||
<basePackage>com.inteligr8.alfresco.activiti</basePackage>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
@@ -137,31 +91,13 @@
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>src/main/java</directory>
|
||||
<directory>src/gen/java</directory>
|
||||
<includes>
|
||||
<include>com/inteligr8/alfresco/activiti/raml/**/*</include>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>delete-extras</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals><goal>clean</goal></goals>
|
||||
<configuration>
|
||||
<excludeDefaultDirectories>true</excludeDefaultDirectories>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${project.build.directory}/ramlgen/java</directory>
|
||||
<includes>
|
||||
<include>com/inteligr8/alfresco/activiti/raml/**/*__*.java</include>
|
||||
</includes>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.googlecode.maven-download-plugin</groupId>
|
||||
@@ -241,22 +177,23 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.mule.raml.codegen</groupId>
|
||||
<artifactId>raml-client-generator-maven-plugin</artifactId>
|
||||
<version>0.11</version>
|
||||
<groupId>org.raml.jaxrs</groupId>
|
||||
<artifactId>raml-to-jaxrs-maven-plugin</artifactId>
|
||||
<version>3.0.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>raml-aps-codegen</id>
|
||||
<id>raml-codegen</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>generate-client</goal>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<basePackage>com.inteligr8.alfresco.activiti.raml</basePackage>
|
||||
<resourcePackage>${basePackage}.resource</resourcePackage>
|
||||
<modelPackage>${basePackage}.model</modelPackage>
|
||||
<supportPackage>${basePackage}.support</supportPackage>
|
||||
<generateTypesWith>jackson</generateTypesWith>
|
||||
<ramlFile>${project.build.directory}/regexed/activiti.raml</ramlFile>
|
||||
<includeAdditionalProperties>false</includeAdditionalProperties>
|
||||
<outputDir>${project.build.directory}/ramlgen/java</outputDir>
|
||||
<outputVersion>v2</outputVersion>
|
||||
<outputDirectory>${basedir}/src/gen/java</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
@@ -264,6 +201,68 @@
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ossrh-release</id>
|
||||
<properties>
|
||||
<maven.deploy.skip>true</maven.deploy.skip>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
<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>
|
||||
<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>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>ossrh-deploy</id>
|
||||
<phase>deploy</phase>
|
||||
<goals><goal>deploy</goal></goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<pluginRepositories>
|
||||
@@ -271,20 +270,5 @@
|
||||
<id>mulesoft-releases</id>
|
||||
<url>https://repository.mulesoft.org/releases</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>inteligr8-public</id>
|
||||
<url>https://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>inteligr8-releases</id>
|
||||
<url>https://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>inteligr8-snapshots</id>
|
||||
<url>https://repos.inteligr8.com/nexus/repository/inteligr8-snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
|
@@ -1,165 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.inteligr8.rs.ClientCxfConfiguration;
|
||||
import com.inteligr8.rs.ClientJerseyConfiguration;
|
||||
|
||||
/**
|
||||
* This class provides a POJO & Spring-based implementation of the
|
||||
* ClientConfiguration interface. You can use it outside of the Spring
|
||||
* context, but you will need the spring-context and spring-beans libraries in
|
||||
* your non-Spring application.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
public class ApsClientConfiguration implements ClientCxfConfiguration, ClientJerseyConfiguration {
|
||||
|
||||
@Value("${process.service.baseUrl:http://localhost:8080/activiti-app}")
|
||||
private String baseUrl;
|
||||
|
||||
@Value("${process.service.security.basicAuth.username:admin@app.activiti.com}")
|
||||
private String basicAuthUsername;
|
||||
|
||||
@Value("${process.service.security.basicAuth.password:admin}")
|
||||
private String basicAuthPassword;
|
||||
|
||||
@Value("${process.service.security.bearerToken:#{null}}")
|
||||
private String bearerToken;
|
||||
|
||||
@Value("${process.service.security.oauth.tokenUrl:#{null}}")
|
||||
private String oAuthTokenUrl;
|
||||
|
||||
@Value("${process.service.security.oauth.clientId:#{null}}")
|
||||
private String oAuthClientId;
|
||||
|
||||
@Value("${process.service.security.oauth.clientSecret:#{null}}")
|
||||
private String oAuthClientSecret;
|
||||
|
||||
@Value("${process.service.security.oauth.authCode:#{null}}")
|
||||
private String oAuthAuthCode;
|
||||
|
||||
@Value("${process.service.security.oauth.authRedirectUri:#{null}}")
|
||||
private String oAuthAuthRedirectUri;
|
||||
|
||||
@Value("${process.service.security.oauth.grantUsername:#{null}}")
|
||||
private String oAuthUsername;
|
||||
|
||||
@Value("${process.service.security.oauth.grantPassword:#{null}}")
|
||||
private String oAuthPassword;
|
||||
|
||||
@Value("${process.service.cxf.defaultBusEnabled:true}")
|
||||
private boolean defaultBusEnabled;
|
||||
|
||||
@Value("${process.service.jersey.putBodyRequired:true}")
|
||||
private boolean putBodyRequired;
|
||||
|
||||
public String getBaseUrl() {
|
||||
return this.baseUrl;
|
||||
}
|
||||
|
||||
public void setBaseUrl(String baseUrl) {
|
||||
this.baseUrl = baseUrl;
|
||||
}
|
||||
|
||||
public String getBasicAuthUsername() {
|
||||
return this.basicAuthUsername;
|
||||
}
|
||||
|
||||
public void setBasicAuthUsername(String basicAuthUsername) {
|
||||
this.basicAuthUsername = basicAuthUsername;
|
||||
}
|
||||
|
||||
public String getBasicAuthPassword() {
|
||||
return this.basicAuthPassword;
|
||||
}
|
||||
|
||||
public void setBasicAuthPassword(String basicAuthPassword) {
|
||||
this.basicAuthPassword = basicAuthPassword;
|
||||
}
|
||||
|
||||
public String getBearerToken() {
|
||||
return this.bearerToken;
|
||||
}
|
||||
|
||||
public void setBearerToken(String bearerToken) {
|
||||
this.bearerToken = bearerToken;
|
||||
}
|
||||
|
||||
public String getOAuthTokenUrl() {
|
||||
return this.oAuthTokenUrl;
|
||||
}
|
||||
|
||||
public void setOAuthTokenUrl(String oAuthTokenUrl) {
|
||||
this.oAuthTokenUrl = oAuthTokenUrl;
|
||||
}
|
||||
|
||||
public String getOAuthClientId() {
|
||||
return this.oAuthClientId;
|
||||
}
|
||||
|
||||
public void setOAuthClientId(String oAuthClientId) {
|
||||
this.oAuthClientId = oAuthClientId;
|
||||
}
|
||||
|
||||
public String getOAuthClientSecret() {
|
||||
return this.oAuthClientSecret;
|
||||
}
|
||||
|
||||
public void setOAuthClientSecret(String oAuthClientSecret) {
|
||||
this.oAuthClientSecret = oAuthClientSecret;
|
||||
}
|
||||
|
||||
public String getOAuthAuthCode() {
|
||||
return this.oAuthAuthCode;
|
||||
}
|
||||
|
||||
public void setOAuthAuthCode(String oAuthAuthCode) {
|
||||
this.oAuthAuthCode = oAuthAuthCode;
|
||||
}
|
||||
|
||||
public String getOAuthAuthRedirectUri() {
|
||||
return this.oAuthAuthRedirectUri;
|
||||
}
|
||||
|
||||
public void setOAuthAuthRedirectUri(String oAuthAuthRedirectUri) {
|
||||
this.oAuthAuthRedirectUri = oAuthAuthRedirectUri;
|
||||
}
|
||||
|
||||
public String getOAuthUsername() {
|
||||
return this.oAuthUsername;
|
||||
}
|
||||
|
||||
public void setOAuthUsername(String oAuthUsername) {
|
||||
this.oAuthUsername = oAuthUsername;
|
||||
}
|
||||
|
||||
public String getOAuthPassword() {
|
||||
return this.oAuthPassword;
|
||||
}
|
||||
|
||||
public void setOAuthPassword(String oAuthPassword) {
|
||||
this.oAuthPassword = oAuthPassword;
|
||||
}
|
||||
|
||||
public boolean isDefaultBusEnabled() {
|
||||
return this.defaultBusEnabled;
|
||||
}
|
||||
|
||||
public void setDefaultBusEnabled(boolean defaultBusEnabled) {
|
||||
this.defaultBusEnabled = defaultBusEnabled;
|
||||
}
|
||||
|
||||
public boolean isPutBodyRequired() {
|
||||
return this.putBodyRequired;
|
||||
}
|
||||
|
||||
public void setPutBodyRequired(boolean putBodyRequired) {
|
||||
this.putBodyRequired = putBodyRequired;
|
||||
}
|
||||
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.inteligr8.rs.ClientCxfConfiguration;
|
||||
import com.inteligr8.rs.ClientCxfImpl;
|
||||
|
||||
/**
|
||||
* This class provides a POJO & Spring-based implementation of the Apache
|
||||
* CXF client. You can use it outside of the Spring context, but you will need
|
||||
* the spring-context and spring-beans libraries in your non-Spring
|
||||
* application.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
*/
|
||||
@Component("aps.client.cxf")
|
||||
@Lazy
|
||||
public class ApsClientCxfImpl extends ClientCxfImpl {
|
||||
|
||||
@Autowired
|
||||
private ApsClientConfiguration config;
|
||||
|
||||
/**
|
||||
* This constructor is for Spring use
|
||||
*/
|
||||
ApsClientCxfImpl() {
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is for POJO use
|
||||
*/
|
||||
public ApsClientCxfImpl(ApsClientConfiguration config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClientCxfConfiguration getConfig() {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.inteligr8.rs.ClientJerseyConfiguration;
|
||||
import com.inteligr8.rs.ClientJerseyImpl;
|
||||
|
||||
/**
|
||||
* This class provides a POJO & Spring-based implementation of the Apache
|
||||
* CXF client. You can use it outside of the Spring context, but you will need
|
||||
* the spring-context and spring-beans libraries in your non-Spring
|
||||
* application.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
*/
|
||||
@Component("aps.client.jersey")
|
||||
@Lazy
|
||||
public class ApsClientJerseyImpl extends ClientJerseyImpl {
|
||||
|
||||
@Autowired
|
||||
private ApsClientConfiguration config;
|
||||
|
||||
/**
|
||||
* This constructor is for Spring use
|
||||
*/
|
||||
ApsClientJerseyImpl() {
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is for POJO use
|
||||
*/
|
||||
public ApsClientJerseyImpl(ApsClientConfiguration config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClientJerseyConfiguration getConfig() {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
}
|
@@ -1,72 +1,77 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.api.AdminApi;
|
||||
import com.inteligr8.alfresco.activiti.api.AppDefinitionsApi;
|
||||
import com.inteligr8.alfresco.activiti.api.AppVersionApi;
|
||||
import com.inteligr8.alfresco.activiti.api.HistoricProcessInstancesApi;
|
||||
import com.inteligr8.alfresco.activiti.api.ModelsApi;
|
||||
import com.inteligr8.alfresco.activiti.api.ProcessInstancesApi;
|
||||
import com.inteligr8.alfresco.activiti.api.ProfileApi;
|
||||
import com.inteligr8.alfresco.activiti.api.ShareApi;
|
||||
import com.inteligr8.alfresco.activiti.api.TasksApi;
|
||||
import com.inteligr8.rs.AuthorizationFilter;
|
||||
import com.inteligr8.rs.Client;
|
||||
import com.inteligr8.rs.ClientConfiguration;
|
||||
|
||||
/**
|
||||
* This class serves as the base implementation for the JAX-RS API for the APS
|
||||
* Public ReST API.
|
||||
* This interface consolidates the JAX-RS APIs available in the APS Public
|
||||
* ReST API.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
*/
|
||||
public abstract class ApsPublicRestApi {
|
||||
public interface ApsPublicRestApi {
|
||||
|
||||
abstract ClientConfiguration getConfig();
|
||||
<T> T getApi(Class<T> apiClass);
|
||||
|
||||
abstract Client getClient();
|
||||
|
||||
protected final <T> T getApi(Class<T> apiClass) {
|
||||
return this.getApi(null, apiClass);
|
||||
}
|
||||
|
||||
protected <T> T getApi(AuthorizationFilter authFilter, Class<T> apiClass) {
|
||||
return this.getClient().getApi(authFilter, apiClass);
|
||||
}
|
||||
|
||||
public AdminApi getAdminApi() {
|
||||
default AdminApi getAdminApi() {
|
||||
return this.getApi(AdminApi.class);
|
||||
}
|
||||
|
||||
public AdminApi getAdminApi(AuthorizationFilter authFilter) {
|
||||
return this.getApi(authFilter, AdminApi.class);
|
||||
default AppDefinitionsApi getAppDefinitionsApi() {
|
||||
return this.getApi(AppDefinitionsApi.class);
|
||||
}
|
||||
|
||||
public AppVersionApi getAppVersionApi() {
|
||||
default AppVersionApi getAppVersionApi() {
|
||||
return this.getApi(AppVersionApi.class);
|
||||
}
|
||||
|
||||
public AppVersionApi getAppVersionApi(AuthorizationFilter authFilter) {
|
||||
return this.getApi(authFilter, AppVersionApi.class);
|
||||
default HistoricProcessInstancesApi getHistoricProcessInstancesApi() {
|
||||
return this.getApi(HistoricProcessInstancesApi.class);
|
||||
}
|
||||
|
||||
default ModelsApi getModelsApi() {
|
||||
return this.getApi(ModelsApi.class);
|
||||
}
|
||||
|
||||
public ProcessInstancesApi getProcessInstancesApi() {
|
||||
default ProcessInstancesApi getProcessInstancesApi() {
|
||||
return this.getApi(ProcessInstancesApi.class);
|
||||
}
|
||||
|
||||
public ProcessInstancesApi getProcessInstancesApi(AuthorizationFilter authFilter) {
|
||||
return this.getApi(authFilter, ProcessInstancesApi.class);
|
||||
}
|
||||
|
||||
public ProfileApi getProfileApi() {
|
||||
default ProfileApi getProfileApi() {
|
||||
return this.getApi(ProfileApi.class);
|
||||
}
|
||||
|
||||
public ProfileApi getProfileApi(AuthorizationFilter authFilter) {
|
||||
return this.getApi(authFilter, ProfileApi.class);
|
||||
}
|
||||
|
||||
public TasksApi getTasksApi() {
|
||||
default TasksApi getTasksApi() {
|
||||
return this.getApi(TasksApi.class);
|
||||
}
|
||||
|
||||
public TasksApi getTasksApi(AuthorizationFilter authFilter) {
|
||||
return this.getApi(authFilter, TasksApi.class);
|
||||
|
||||
/**
|
||||
* The following are not part of the official open source or enterprise APIs
|
||||
*/
|
||||
default ShareApi getShareApi() {
|
||||
return this.getApi(ShareApi.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,46 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.inteligr8.rs.Client;
|
||||
import com.inteligr8.rs.ClientConfiguration;
|
||||
|
||||
/**
|
||||
* This class provides the Apache CXF client to the JAX-RS API for the APS
|
||||
* Public ReST API.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
*/
|
||||
@Component("aps.api.cxf")
|
||||
@Lazy
|
||||
public class ApsPublicRestApiCxfImpl extends ApsPublicRestApi {
|
||||
|
||||
@Autowired
|
||||
private ApsClientCxfImpl client;
|
||||
|
||||
/**
|
||||
* This constructor is for Spring use
|
||||
*/
|
||||
ApsPublicRestApiCxfImpl() {
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is for POJO use
|
||||
*/
|
||||
public ApsPublicRestApiCxfImpl(ApsClientCxfImpl client) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
@Override
|
||||
ClientConfiguration getConfig() {
|
||||
return this.client.getConfig();
|
||||
}
|
||||
|
||||
@Override
|
||||
Client getClient() {
|
||||
return this.client;
|
||||
}
|
||||
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.inteligr8.rs.Client;
|
||||
import com.inteligr8.rs.ClientConfiguration;
|
||||
|
||||
/**
|
||||
* This class provides the Jersey client to the JAX-RS API for the APS Public
|
||||
* ReST API.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
*/
|
||||
@Component("aps.api.jersey")
|
||||
@Lazy
|
||||
public class ApsPublicRestApiJerseyImpl extends ApsPublicRestApi {
|
||||
|
||||
@Autowired
|
||||
private ApsClientJerseyImpl client;
|
||||
|
||||
/**
|
||||
* This constructor is for Spring use
|
||||
*/
|
||||
ApsPublicRestApiJerseyImpl() {
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is for POJO use
|
||||
*/
|
||||
public ApsPublicRestApiJerseyImpl(ApsClientJerseyImpl client) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
@Override
|
||||
ClientConfiguration getConfig() {
|
||||
return this.client.getConfig();
|
||||
}
|
||||
|
||||
@Override
|
||||
Client getClient() {
|
||||
return this.client;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.api.AppDefinitionsCxfApi;
|
||||
|
||||
/**
|
||||
* This interface appends Apache CXF implementation specific methods to the
|
||||
* JAX-RS API of the APS Public ReST API. This is due to a lack of multi-part
|
||||
* in the JAX-RS specification.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
*/
|
||||
public interface ApsPublicRestCxfApi extends ApsPublicRestApi {
|
||||
|
||||
default AppDefinitionsCxfApi getAppDefinitionsCxfApi() {
|
||||
return this.getApi(AppDefinitionsCxfApi.class);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.api.AppDefinitionsJerseyApi;
|
||||
|
||||
/**
|
||||
* This interface appends Jersey implementation specific methods to the JAX-RS
|
||||
* API of the APS Public ReST API. This is due to a lack of multi-part in the
|
||||
* JAX-RS specification.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
*/
|
||||
public interface ApsPublicRestJerseyApi extends ApsPublicRestApi {
|
||||
|
||||
default AppDefinitionsJerseyApi getAppDefinitionsJerseyApi() {
|
||||
return this.getApi(AppDefinitionsJerseyApi.class);
|
||||
}
|
||||
|
||||
}
|
@@ -1,22 +1,96 @@
|
||||
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.model.Group;
|
||||
import com.inteligr8.alfresco.activiti.model.GroupLight;
|
||||
import com.inteligr8.alfresco.activiti.model.ResultList;
|
||||
import com.inteligr8.alfresco.activiti.model.Tenant;
|
||||
import com.inteligr8.alfresco.activiti.model.UserLight;
|
||||
|
||||
@Path("/api/enterprise/admin")
|
||||
public interface AdminApi {
|
||||
|
||||
@GET
|
||||
@Path("/tenants")
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/json" })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public List<Tenant> getTenants();
|
||||
|
||||
@GET
|
||||
@Path("/groups")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public List<GroupLight> getGroups(
|
||||
@QueryParam("tenantId") Long tenantId,
|
||||
@QueryParam("functional") Boolean functional,
|
||||
@QueryParam("summary") Boolean summary);
|
||||
|
||||
@POST
|
||||
@Path("/groups")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public GroupLight createGroup(
|
||||
Group group);
|
||||
|
||||
@GET
|
||||
@Path("/groups/{groupId}")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public Group getGroup(
|
||||
@PathParam("groupId") long groupId,
|
||||
@QueryParam("includeAllUsers") Boolean includeAllUsers,
|
||||
@QueryParam("summary") Boolean summary);
|
||||
|
||||
@GET
|
||||
@Path("/groups/${groupId}/related-groups")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public List<GroupLight> getRelatedGroups(
|
||||
@PathParam("groupId") long groupId);
|
||||
|
||||
@POST
|
||||
@Path("/groups/${groupId}/related-groups/${relatedGroupId}")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public void addRelatedGroup(
|
||||
@PathParam("groupId") long groupId,
|
||||
@PathParam("relatedGroupId") long relatedGroupId,
|
||||
@PathParam("type") String type);
|
||||
|
||||
@DELETE
|
||||
@Path("/groups/${groupId}/related-groups/${relatedGroupId}")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public void deleteRelatedGroup(
|
||||
@PathParam("groupId") long groupId,
|
||||
@PathParam("relatedGroupId") long relatedGroupId);
|
||||
|
||||
@GET
|
||||
@Path("groups/{groupId}/users")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
ResultList<UserLight> getMembers(
|
||||
@PathParam("groupId") long groupId,
|
||||
@QueryParam("filter") String filter,
|
||||
@QueryParam("page") Integer page,
|
||||
@QueryParam("pageSize") Integer pageSize);
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.DELETE;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.PUT;
|
||||
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.activiti.model.AppDefinitionPublishRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionSaveRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionUpdateResultRepresentation;
|
||||
|
||||
@Path("/api/enterprise/app-definitions")
|
||||
public interface AppDefinitionsApi {
|
||||
|
||||
@GET
|
||||
@Path("{modelId}")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionRepresentation get(
|
||||
@PathParam("modelId") Long appId);
|
||||
|
||||
@PUT
|
||||
@Path("{modelId}")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionUpdateResultRepresentation update(
|
||||
@PathParam("modelId") Long appId,
|
||||
AppDefinitionSaveRepresentation updatedModel);
|
||||
|
||||
@DELETE
|
||||
@Path("{appDefinitionId}")
|
||||
void delete(
|
||||
@PathParam("appDefinitionId") Long appId);
|
||||
|
||||
@GET
|
||||
@Path("{modelId}/export")
|
||||
@Produces({ MediaType.APPLICATION_JSON, "application/zip" })
|
||||
File export(
|
||||
@PathParam("modelId") Long appId);
|
||||
|
||||
@POST
|
||||
@Path("{modelId}/publish")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionUpdateResultRepresentation publish(
|
||||
@PathParam("modelId") Long appId,
|
||||
AppDefinitionPublishRepresentation publishModel);
|
||||
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.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.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionUpdateResultRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.FileMultipartCxf;
|
||||
|
||||
@Path("/api/enterprise/app-definitions")
|
||||
public interface AppDefinitionsCxfApi {
|
||||
|
||||
@POST
|
||||
@Path("import")
|
||||
@Consumes({ MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionRepresentation import_(
|
||||
FileMultipartCxf body,
|
||||
@QueryParam("renewIdmEntries") Boolean renewIdmEntries);
|
||||
|
||||
@POST
|
||||
@Path("{modelId}/import")
|
||||
@Consumes({ MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionRepresentation import_(
|
||||
@PathParam("modelId") Long appId,
|
||||
FileMultipartCxf body,
|
||||
@QueryParam("renewIdmEntries") Boolean renewIdmEntries);
|
||||
|
||||
@POST
|
||||
@Path("publish-app")
|
||||
@Consumes({ MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionUpdateResultRepresentation publishApp(
|
||||
FileMultipartCxf body);
|
||||
|
||||
@POST
|
||||
@Path("{modelId}/publish-app")
|
||||
@Consumes({ MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionUpdateResultRepresentation publishApp(
|
||||
@PathParam("modelId") Long appId,
|
||||
FileMultipartCxf body);
|
||||
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.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.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.AppDefinitionUpdateResultRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.FileMultipartJersey;
|
||||
|
||||
@Path("/api/enterprise/app-definitions")
|
||||
public interface AppDefinitionsJerseyApi {
|
||||
|
||||
@POST
|
||||
@Path("import")
|
||||
@Consumes({ MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionRepresentation importApp(
|
||||
FileMultipartJersey file,
|
||||
@QueryParam("renewIdmEntries") Boolean renewIdmEntries);
|
||||
|
||||
@POST
|
||||
@Path("{modelId}/import")
|
||||
@Consumes({ MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionRepresentation importApp(
|
||||
@PathParam("modelId") Long appId,
|
||||
FileMultipartJersey file,
|
||||
@QueryParam("renewIdmEntries") Boolean renewIdmEntries);
|
||||
|
||||
@POST
|
||||
@Path("publish-app")
|
||||
@Consumes({ MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionUpdateResultRepresentation publishApp(
|
||||
FileMultipartJersey file);
|
||||
|
||||
@POST
|
||||
@Path("{modelId}/publish-app")
|
||||
@Consumes({ MediaType.MULTIPART_FORM_DATA })
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
AppDefinitionUpdateResultRepresentation publishApp(
|
||||
@PathParam("modelId") Long appId,
|
||||
FileMultipartJersey file);
|
||||
|
||||
}
|
@@ -1,4 +1,17 @@
|
||||
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
|
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
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 com.inteligr8.alfresco.activiti.model.GroupLight;
|
||||
import com.inteligr8.alfresco.activiti.model.ResultList;
|
||||
import com.inteligr8.alfresco.activiti.model.UserLight;
|
||||
|
||||
@Path("/api/enterprise/groups")
|
||||
public interface GroupsApi {
|
||||
|
||||
@GET
|
||||
@Produces({ "application/json" })
|
||||
ResultList<GroupLight> query(
|
||||
@QueryParam("filter") String filter,
|
||||
@QueryParam("groupId") Long groupId,
|
||||
@QueryParam("externalId") String externalId,
|
||||
@QueryParam("externalIdCaseInsensitive") String externalIdCaseInsensitve,
|
||||
@QueryParam("tenantId") Long tenantId);
|
||||
|
||||
@GET
|
||||
@Path("{groupId}/users")
|
||||
@Produces({ "application/json" })
|
||||
ResultList<UserLight> queryMembers(
|
||||
@PathParam("groupId") long groupId);
|
||||
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.model.HistoricProcessInstanceQueryRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.ProcessInstance;
|
||||
import com.inteligr8.alfresco.activiti.model.ResultListDataRepresentation;
|
||||
|
||||
@Path("/api/enterprise/historic-process-instances")
|
||||
public interface HistoricProcessInstancesApi {
|
||||
|
||||
@POST
|
||||
@Path("query")
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/json" })
|
||||
ResultListDataRepresentation<ProcessInstance> query(HistoricProcessInstanceQueryRepresentation request);
|
||||
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.model.ResultListDataRepresentation;
|
||||
|
||||
@Path("/api/enterprise/models")
|
||||
public interface ModelsApi {
|
||||
|
||||
enum ModelType {
|
||||
Process(0),
|
||||
Form(2),
|
||||
App(3);
|
||||
|
||||
private int id;
|
||||
private ModelType(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@Produces({ "application/json" })
|
||||
public ResultListDataRepresentation get(
|
||||
@QueryParam("filter") String filter,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("modelType") Integer modelType,
|
||||
@QueryParam("referenceId") Long referenceId);
|
||||
|
||||
}
|
@@ -1,4 +1,17 @@
|
||||
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import java.util.List;
|
||||
@@ -14,6 +27,8 @@ import javax.ws.rs.Produces;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.model.CreateProcessInstance;
|
||||
import com.inteligr8.alfresco.activiti.model.ProcessInstance;
|
||||
import com.inteligr8.alfresco.activiti.model.ProcessInstanceQueryRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.ResultListDataRepresentation;
|
||||
import com.inteligr8.alfresco.activiti.model.Variable;
|
||||
|
||||
@Path("/api/enterprise/process-instances")
|
||||
@@ -24,6 +39,12 @@ public interface ProcessInstancesApi {
|
||||
@Produces({ "application/json" })
|
||||
ProcessInstance create(CreateProcessInstance processInstance);
|
||||
|
||||
@POST
|
||||
@Path("query")
|
||||
@Consumes({ "application/json" })
|
||||
@Produces({ "application/json" })
|
||||
ResultListDataRepresentation<ProcessInstance> query(ProcessInstanceQueryRepresentation request);
|
||||
|
||||
@GET
|
||||
@Path("{processInstanceId}")
|
||||
@Produces({ "application/json" })
|
||||
|
@@ -1,4 +1,17 @@
|
||||
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
|
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.PUT;
|
||||
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.activiti.model.ResultList;
|
||||
import com.inteligr8.alfresco.activiti.model.ShareInfoRequest;
|
||||
import com.inteligr8.alfresco.activiti.model.SharePermission;
|
||||
|
||||
/**
|
||||
* This is an undocumented API.
|
||||
*
|
||||
* @author brian@inteligr8.com
|
||||
*/
|
||||
@Path("/app/rest/models")
|
||||
public interface ShareApi {
|
||||
|
||||
@GET
|
||||
@Path("/{modelId}/share-info")
|
||||
@Produces({ MediaType.APPLICATION_JSON })
|
||||
public ResultList<SharePermission> getShareInfo(
|
||||
@PathParam("modelId") String modelId);
|
||||
|
||||
@PUT
|
||||
@Path("/{modelId}/share-info")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
public void setShareInfo(
|
||||
@PathParam("modelId") String modelId,
|
||||
ShareInfoRequest request);
|
||||
|
||||
}
|
@@ -1,4 +1,17 @@
|
||||
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import java.util.List;
|
||||
|
@@ -0,0 +1,205 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
|
||||
/**
|
||||
* AppDefinitionRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"defaultAppId",
|
||||
"deploymentId",
|
||||
"description",
|
||||
"icon",
|
||||
"id",
|
||||
"modelId",
|
||||
"name",
|
||||
"tenantId",
|
||||
"theme"
|
||||
})
|
||||
public class AppDefinition {
|
||||
|
||||
@JsonProperty("defaultAppId")
|
||||
private String defaultAppId;
|
||||
@JsonProperty("deploymentId")
|
||||
private String deploymentId;
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
@JsonProperty("icon")
|
||||
private String icon;
|
||||
@JsonProperty("id")
|
||||
private Integer id;
|
||||
@JsonProperty("modelId")
|
||||
private Integer modelId;
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
@JsonProperty("tenantId")
|
||||
private Integer tenantId;
|
||||
@JsonProperty("theme")
|
||||
private String theme;
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
@JsonProperty("defaultAppId")
|
||||
public String getDefaultAppId() {
|
||||
return defaultAppId;
|
||||
}
|
||||
|
||||
@JsonProperty("defaultAppId")
|
||||
public void setDefaultAppId(String defaultAppId) {
|
||||
this.defaultAppId = defaultAppId;
|
||||
}
|
||||
|
||||
public AppDefinition withDefaultAppId(String defaultAppId) {
|
||||
this.defaultAppId = defaultAppId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("deploymentId")
|
||||
public String getDeploymentId() {
|
||||
return deploymentId;
|
||||
}
|
||||
|
||||
@JsonProperty("deploymentId")
|
||||
public void setDeploymentId(String deploymentId) {
|
||||
this.deploymentId = deploymentId;
|
||||
}
|
||||
|
||||
public AppDefinition withDeploymentId(String deploymentId) {
|
||||
this.deploymentId = deploymentId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("description")
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@JsonProperty("description")
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public AppDefinition withDescription(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("icon")
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@JsonProperty("icon")
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public AppDefinition withIcon(String icon) {
|
||||
this.icon = icon;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("id")
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@JsonProperty("id")
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public AppDefinition withId(Integer id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("modelId")
|
||||
public Integer getModelId() {
|
||||
return modelId;
|
||||
}
|
||||
|
||||
@JsonProperty("modelId")
|
||||
public void setModelId(Integer modelId) {
|
||||
this.modelId = modelId;
|
||||
}
|
||||
|
||||
public AppDefinition withModelId(Integer modelId) {
|
||||
this.modelId = modelId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public AppDefinition withName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("tenantId")
|
||||
public Integer getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
@JsonProperty("tenantId")
|
||||
public void setTenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public AppDefinition withTenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("theme")
|
||||
public String getTheme() {
|
||||
return theme;
|
||||
}
|
||||
|
||||
@JsonProperty("theme")
|
||||
public void setTheme(String theme) {
|
||||
this.theme = theme;
|
||||
}
|
||||
|
||||
public AppDefinition withTheme(String theme) {
|
||||
this.theme = theme;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public AppDefinition withAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
|
||||
/**
|
||||
* AppDefinitionPublishRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"comment",
|
||||
"force"
|
||||
})
|
||||
public class AppDefinitionPublishRepresentation {
|
||||
|
||||
@JsonProperty("comment")
|
||||
private String comment;
|
||||
@JsonProperty("force")
|
||||
private Boolean force;
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
@JsonProperty("comment")
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
@JsonProperty("comment")
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public AppDefinitionPublishRepresentation withComment(String comment) {
|
||||
this.comment = comment;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("force")
|
||||
public Boolean getForce() {
|
||||
return force;
|
||||
}
|
||||
|
||||
@JsonProperty("force")
|
||||
public void setForce(Boolean force) {
|
||||
this.force = force;
|
||||
}
|
||||
|
||||
public AppDefinitionPublishRepresentation withForce(Boolean force) {
|
||||
this.force = force;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public AppDefinitionPublishRepresentation withAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,205 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
|
||||
/**
|
||||
* AppDefinitionRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"defaultAppId",
|
||||
"deploymentId",
|
||||
"description",
|
||||
"icon",
|
||||
"id",
|
||||
"modelId",
|
||||
"name",
|
||||
"tenantId",
|
||||
"theme"
|
||||
})
|
||||
public class AppDefinitionRepresentation {
|
||||
|
||||
@JsonProperty("defaultAppId")
|
||||
private String defaultAppId;
|
||||
@JsonProperty("deploymentId")
|
||||
private String deploymentId;
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
@JsonProperty("icon")
|
||||
private String icon;
|
||||
@JsonProperty("id")
|
||||
private Integer id;
|
||||
@JsonProperty("modelId")
|
||||
private Integer modelId;
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
@JsonProperty("tenantId")
|
||||
private Integer tenantId;
|
||||
@JsonProperty("theme")
|
||||
private String theme;
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
@JsonProperty("defaultAppId")
|
||||
public String getDefaultAppId() {
|
||||
return defaultAppId;
|
||||
}
|
||||
|
||||
@JsonProperty("defaultAppId")
|
||||
public void setDefaultAppId(String defaultAppId) {
|
||||
this.defaultAppId = defaultAppId;
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withDefaultAppId(String defaultAppId) {
|
||||
this.defaultAppId = defaultAppId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("deploymentId")
|
||||
public String getDeploymentId() {
|
||||
return deploymentId;
|
||||
}
|
||||
|
||||
@JsonProperty("deploymentId")
|
||||
public void setDeploymentId(String deploymentId) {
|
||||
this.deploymentId = deploymentId;
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withDeploymentId(String deploymentId) {
|
||||
this.deploymentId = deploymentId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("description")
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@JsonProperty("description")
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withDescription(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("icon")
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@JsonProperty("icon")
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withIcon(String icon) {
|
||||
this.icon = icon;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("id")
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@JsonProperty("id")
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withId(Integer id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("modelId")
|
||||
public Integer getModelId() {
|
||||
return modelId;
|
||||
}
|
||||
|
||||
@JsonProperty("modelId")
|
||||
public void setModelId(Integer modelId) {
|
||||
this.modelId = modelId;
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withModelId(Integer modelId) {
|
||||
this.modelId = modelId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("tenantId")
|
||||
public Integer getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
@JsonProperty("tenantId")
|
||||
public void setTenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withTenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("theme")
|
||||
public String getTheme() {
|
||||
return theme;
|
||||
}
|
||||
|
||||
@JsonProperty("theme")
|
||||
public void setTheme(String theme) {
|
||||
this.theme = theme;
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withTheme(String theme) {
|
||||
this.theme = theme;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public AppDefinitionRepresentation withAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,115 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
|
||||
/**
|
||||
* AppDefinitionSaveRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"appDefinition",
|
||||
"force",
|
||||
"publish"
|
||||
})
|
||||
public class AppDefinitionSaveRepresentation {
|
||||
|
||||
/**
|
||||
* AppDefinitionRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonProperty("appDefinition")
|
||||
private AppDefinition appDefinition;
|
||||
@JsonProperty("force")
|
||||
private Boolean force;
|
||||
@JsonProperty("publish")
|
||||
private Boolean publish;
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
/**
|
||||
* AppDefinitionRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonProperty("appDefinition")
|
||||
public AppDefinition getAppDefinition() {
|
||||
return appDefinition;
|
||||
}
|
||||
|
||||
/**
|
||||
* AppDefinitionRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonProperty("appDefinition")
|
||||
public void setAppDefinition(AppDefinition appDefinition) {
|
||||
this.appDefinition = appDefinition;
|
||||
}
|
||||
|
||||
public AppDefinitionSaveRepresentation withAppDefinition(AppDefinition appDefinition) {
|
||||
this.appDefinition = appDefinition;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("force")
|
||||
public Boolean getForce() {
|
||||
return force;
|
||||
}
|
||||
|
||||
@JsonProperty("force")
|
||||
public void setForce(Boolean force) {
|
||||
this.force = force;
|
||||
}
|
||||
|
||||
public AppDefinitionSaveRepresentation withForce(Boolean force) {
|
||||
this.force = force;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("publish")
|
||||
public Boolean getPublish() {
|
||||
return publish;
|
||||
}
|
||||
|
||||
@JsonProperty("publish")
|
||||
public void setPublish(Boolean publish) {
|
||||
this.publish = publish;
|
||||
}
|
||||
|
||||
public AppDefinitionSaveRepresentation withPublish(Boolean publish) {
|
||||
this.publish = publish;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public AppDefinitionSaveRepresentation withAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,187 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
|
||||
/**
|
||||
* AppDefinitionUpdateResultRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"appDefinition",
|
||||
"customData",
|
||||
"error",
|
||||
"errorDescription",
|
||||
"errorType",
|
||||
"message",
|
||||
"messageKey"
|
||||
})
|
||||
public class AppDefinitionUpdateResultRepresentation {
|
||||
|
||||
/**
|
||||
* AppDefinitionRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonProperty("appDefinition")
|
||||
private AppDefinition appDefinition;
|
||||
@JsonProperty("customData")
|
||||
private CustomData customData;
|
||||
@JsonProperty("error")
|
||||
private Boolean error;
|
||||
@JsonProperty("errorDescription")
|
||||
private String errorDescription;
|
||||
@JsonProperty("errorType")
|
||||
private Integer errorType;
|
||||
@JsonProperty("message")
|
||||
private String message;
|
||||
@JsonProperty("messageKey")
|
||||
private String messageKey;
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
/**
|
||||
* AppDefinitionRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonProperty("appDefinition")
|
||||
public AppDefinition getAppDefinition() {
|
||||
return appDefinition;
|
||||
}
|
||||
|
||||
/**
|
||||
* AppDefinitionRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonProperty("appDefinition")
|
||||
public void setAppDefinition(AppDefinition appDefinition) {
|
||||
this.appDefinition = appDefinition;
|
||||
}
|
||||
|
||||
public AppDefinitionUpdateResultRepresentation withAppDefinition(AppDefinition appDefinition) {
|
||||
this.appDefinition = appDefinition;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("customData")
|
||||
public CustomData getCustomData() {
|
||||
return customData;
|
||||
}
|
||||
|
||||
@JsonProperty("customData")
|
||||
public void setCustomData(CustomData customData) {
|
||||
this.customData = customData;
|
||||
}
|
||||
|
||||
public AppDefinitionUpdateResultRepresentation withCustomData(CustomData customData) {
|
||||
this.customData = customData;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("error")
|
||||
public Boolean getError() {
|
||||
return error;
|
||||
}
|
||||
|
||||
@JsonProperty("error")
|
||||
public void setError(Boolean error) {
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public AppDefinitionUpdateResultRepresentation withError(Boolean error) {
|
||||
this.error = error;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("errorDescription")
|
||||
public String getErrorDescription() {
|
||||
return errorDescription;
|
||||
}
|
||||
|
||||
@JsonProperty("errorDescription")
|
||||
public void setErrorDescription(String errorDescription) {
|
||||
this.errorDescription = errorDescription;
|
||||
}
|
||||
|
||||
public AppDefinitionUpdateResultRepresentation withErrorDescription(String errorDescription) {
|
||||
this.errorDescription = errorDescription;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("errorType")
|
||||
public Integer getErrorType() {
|
||||
return errorType;
|
||||
}
|
||||
|
||||
@JsonProperty("errorType")
|
||||
public void setErrorType(Integer errorType) {
|
||||
this.errorType = errorType;
|
||||
}
|
||||
|
||||
public AppDefinitionUpdateResultRepresentation withErrorType(Integer errorType) {
|
||||
this.errorType = errorType;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("message")
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@JsonProperty("message")
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public AppDefinitionUpdateResultRepresentation withMessage(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("messageKey")
|
||||
public String getMessageKey() {
|
||||
return messageKey;
|
||||
}
|
||||
|
||||
@JsonProperty("messageKey")
|
||||
public void setMessageKey(String messageKey) {
|
||||
this.messageKey = messageKey;
|
||||
}
|
||||
|
||||
public AppDefinitionUpdateResultRepresentation withMessageKey(String messageKey) {
|
||||
this.messageKey = messageKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public AppDefinitionUpdateResultRepresentation withAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
|
||||
})
|
||||
public class CustomData {
|
||||
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public CustomData withAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
|
||||
})
|
||||
public class Datum {
|
||||
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public Datum withAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.ContentDisposition;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.MultipartBody;
|
||||
|
||||
public class FileMultipartCxf extends MultipartBody {
|
||||
|
||||
public static FileMultipartCxf from(String filename, InputStream istream) throws IOException {
|
||||
return new FileMultipartCxf(Arrays.asList(toAttachment(filename, istream)));
|
||||
}
|
||||
|
||||
public FileMultipartCxf(List<Attachment> atts) throws IOException {
|
||||
super(atts);
|
||||
}
|
||||
|
||||
public FileMultipartCxf(List<Attachment> atts, boolean outbound) {
|
||||
super(atts, outbound);
|
||||
}
|
||||
|
||||
public Attachment getFileAttachment() {
|
||||
return this.getAttachment("file");
|
||||
}
|
||||
|
||||
private static Attachment toAttachment(String filename, InputStream istream) {
|
||||
if (filename == null) {
|
||||
return new Attachment("file", istream, new ContentDisposition("form-data; name=\"file\""));
|
||||
} else {
|
||||
return new Attachment("file", istream, new ContentDisposition("form-data; name=\"file\"; filename=\"" + filename + "\""));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.text.ParseException;
|
||||
|
||||
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;
|
||||
|
||||
public class FileMultipartJersey extends FormDataMultiPart {
|
||||
|
||||
public static FileMultipartJersey from(String filename, InputStream istream) throws ParseException {
|
||||
FileMultipartJersey multipart = new FileMultipartJersey();
|
||||
multipart.bodyPart(toBodyPart(filename, istream));
|
||||
return multipart;
|
||||
}
|
||||
|
||||
private FileMultipartJersey() {
|
||||
}
|
||||
|
||||
public FormDataBodyPart getFileAttachment() {
|
||||
return this.getField("file");
|
||||
}
|
||||
|
||||
private static BodyPart toBodyPart(String filename, InputStream istream) throws ParseException {
|
||||
if (filename == null) {
|
||||
return new FormDataBodyPart()
|
||||
.contentDisposition(new FormDataContentDisposition("form-data; name=\"file\""))
|
||||
.entity(istream);
|
||||
} else {
|
||||
return new FormDataBodyPart()
|
||||
.contentDisposition(new FormDataContentDisposition("form-data; name=\"file\"; filename=\"" + filename + "\""))
|
||||
.entity(istream);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,4 +1,3 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -31,7 +30,7 @@ public class Group {
|
||||
@JsonProperty("externalId")
|
||||
private String externalId;
|
||||
@JsonProperty("groups")
|
||||
private List<Group> groups = new ArrayList<Group>();
|
||||
private List<GroupLight> groups = new ArrayList<GroupLight>();
|
||||
@JsonProperty("id")
|
||||
private Long id;
|
||||
@JsonProperty("lastSyncTimeStamp")
|
||||
@@ -85,15 +84,15 @@ public class Group {
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<Group> getGroups() {
|
||||
public List<GroupLight> getGroups() {
|
||||
return groups;
|
||||
}
|
||||
|
||||
public void setGroups(List<Group> groups) {
|
||||
public void setGroups(List<GroupLight> groups) {
|
||||
this.groups = groups;
|
||||
}
|
||||
|
||||
public Group withGroups(List<Group> groups) {
|
||||
public Group withGroups(List<GroupLight> groups) {
|
||||
this.groups = groups;
|
||||
return this;
|
||||
}
|
||||
@@ -229,3 +228,7 @@ public class Group {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,94 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class GroupLight {
|
||||
|
||||
@JsonProperty("id")
|
||||
private Long id;
|
||||
@JsonProperty("externalId")
|
||||
private String externalId;
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
@JsonProperty("parentGroupId")
|
||||
private Long parentGroupId;
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* No args constructor for use in serialization
|
||||
*/
|
||||
public GroupLight() {
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public GroupLight withId(Long id) {
|
||||
this.setId(id);
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getExternalId() {
|
||||
return externalId;
|
||||
}
|
||||
|
||||
public void setExternalId(String externalId) {
|
||||
this.externalId = externalId;
|
||||
}
|
||||
|
||||
public GroupLight withExternalId(String externalId) {
|
||||
this.setExternalId(externalId);
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public GroupLight withName(String name) {
|
||||
this.setName(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getParentGroupId() {
|
||||
return parentGroupId;
|
||||
}
|
||||
|
||||
public void setParentGroupId(Long parentGroupId) {
|
||||
this.parentGroupId = parentGroupId;
|
||||
}
|
||||
|
||||
public GroupLight withParentGroupId(Long parentGroupId) {
|
||||
this.setParentGroupId(parentGroupId);
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public GroupLight withStatus(String status) {
|
||||
this.setStatus(status);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,397 @@
|
||||
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"excludeSubprocesses",
|
||||
"finished",
|
||||
"finishedAfter",
|
||||
"finishedBefore",
|
||||
"includeProcessVariables",
|
||||
"involvedUser",
|
||||
"order",
|
||||
"processBusinessKey",
|
||||
"processDefinitionId",
|
||||
"processDefinitionKey",
|
||||
"processInstanceId",
|
||||
"processInstanceIds",
|
||||
"size",
|
||||
"sort",
|
||||
"start",
|
||||
"startedAfter",
|
||||
"startedBefore",
|
||||
"startedBy",
|
||||
"superProcessInstanceId",
|
||||
"tenantId",
|
||||
"tenantIdLike",
|
||||
"variables",
|
||||
"withoutTenantId"
|
||||
})
|
||||
public class HistoricProcessInstanceQueryRepresentation {
|
||||
|
||||
@JsonProperty("excludeSubprocesses")
|
||||
private Boolean excludeSubprocesses;
|
||||
@JsonProperty("finished")
|
||||
private Boolean finished;
|
||||
@JsonProperty("finishedAfter")
|
||||
private OffsetDateTime finishedAfter;
|
||||
@JsonProperty("finishedBefore")
|
||||
private OffsetDateTime finishedBefore;
|
||||
@JsonProperty("includeProcessVariables")
|
||||
private Boolean includeProcessVariables;
|
||||
@JsonProperty("involvedUser")
|
||||
private String involvedUser;
|
||||
@JsonProperty("order")
|
||||
private String order;
|
||||
@JsonProperty("processBusinessKey")
|
||||
private String processBusinessKey;
|
||||
@JsonProperty("processDefinitionId")
|
||||
private String processDefinitionId;
|
||||
@JsonProperty("processDefinitionKey")
|
||||
private String processDefinitionKey;
|
||||
@JsonProperty("processInstanceId")
|
||||
private String processInstanceId;
|
||||
@JsonProperty("processInstanceIds")
|
||||
private List<String> processInstanceIds;
|
||||
@JsonProperty("size")
|
||||
private Integer size;
|
||||
@JsonProperty("sort")
|
||||
private String sort;
|
||||
@JsonProperty("start")
|
||||
private Integer start;
|
||||
@JsonProperty("startedAfter")
|
||||
private OffsetDateTime startedAfter;
|
||||
@JsonProperty("startedBefore")
|
||||
private OffsetDateTime startedBefore;
|
||||
@JsonProperty("startedBy")
|
||||
private String startedBy;
|
||||
@JsonProperty("superProcessInstanceId")
|
||||
private String superProcessInstanceId;
|
||||
@JsonProperty("tenantId")
|
||||
private String tenantId;
|
||||
@JsonProperty("tenantIdLike")
|
||||
private String tenantIdLike;
|
||||
@JsonProperty("variables")
|
||||
private List<QueryVariable> variables;
|
||||
@JsonProperty("withoutTenantId")
|
||||
private Boolean withoutTenantId;
|
||||
|
||||
/**
|
||||
* No args constructor for use in serialization
|
||||
*/
|
||||
public HistoricProcessInstanceQueryRepresentation() {
|
||||
}
|
||||
|
||||
public Boolean isExcludeSubprocesses() {
|
||||
return excludeSubprocesses;
|
||||
}
|
||||
|
||||
public void setExcludeSubprocesses(Boolean excludeSubprocesses) {
|
||||
this.excludeSubprocesses = excludeSubprocesses;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withExcludeSubprocesses(Boolean excludeSubprocesses) {
|
||||
this.excludeSubprocesses = excludeSubprocesses;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
public void setFinished(Boolean finished) {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withFinished(Boolean finished) {
|
||||
this.finished = finished;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getFinishedAfter() {
|
||||
return finishedAfter;
|
||||
}
|
||||
|
||||
public void setFinishedAfter(OffsetDateTime finishedAfter) {
|
||||
this.finishedAfter = finishedAfter;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withFinishedAfter(OffsetDateTime finishedAfter) {
|
||||
this.finishedAfter = finishedAfter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getFinishedBefore() {
|
||||
return finishedBefore;
|
||||
}
|
||||
|
||||
public void setFinishedBefore(OffsetDateTime finishedBefore) {
|
||||
this.finishedBefore = finishedBefore;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withFinishedBefore(OffsetDateTime finishedBefore) {
|
||||
this.finishedBefore = finishedBefore;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isIncludeProcessVariables() {
|
||||
return includeProcessVariables;
|
||||
}
|
||||
|
||||
public void setIncludeProcessVariables(Boolean includeProcessVariables) {
|
||||
this.includeProcessVariables = includeProcessVariables;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withIncludeProcessVariables(Boolean includeProcessVariables) {
|
||||
this.includeProcessVariables = includeProcessVariables;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getInvolvedUser() {
|
||||
return involvedUser;
|
||||
}
|
||||
|
||||
public void setInvolvedUser(String involvedUser) {
|
||||
this.involvedUser = involvedUser;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withInvolvedUser(String involvedUser) {
|
||||
this.involvedUser = involvedUser;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(String order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withOrder(String order) {
|
||||
this.order = order;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessBusinessKey() {
|
||||
return processBusinessKey;
|
||||
}
|
||||
|
||||
public void setProcessBusinessKey(String processBusinessKey) {
|
||||
this.processBusinessKey = processBusinessKey;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withProcessBusinessKey(String processBusinessKey) {
|
||||
this.processBusinessKey = processBusinessKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionId() {
|
||||
return processDefinitionId;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionKey() {
|
||||
return processDefinitionKey;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionKey(String processDefinitionKey) {
|
||||
this.processDefinitionKey = processDefinitionKey;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withProcessDefinitionKey(String processDefinitionKey) {
|
||||
this.processDefinitionKey = processDefinitionKey;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessInstanceId() {
|
||||
return processInstanceId;
|
||||
}
|
||||
|
||||
public void setProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getProcessInstanceIds() {
|
||||
return processInstanceIds;
|
||||
}
|
||||
|
||||
public void setProcessInstanceIds(List<String> processInstanceIds) {
|
||||
this.processInstanceIds = processInstanceIds;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withProcessInstanceIds(List<String> processInstanceIds) {
|
||||
this.processInstanceIds = processInstanceIds;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(Integer size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withSize(Integer size) {
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withSort(String sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getStart() {
|
||||
return start;
|
||||
}
|
||||
|
||||
public void setStart(Integer start) {
|
||||
this.start = start;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withStart(Integer start) {
|
||||
this.start = start;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getStartedAfter() {
|
||||
return startedAfter;
|
||||
}
|
||||
|
||||
public void setStartedAfter(OffsetDateTime startedAfter) {
|
||||
this.startedAfter = startedAfter;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withStartedAfter(OffsetDateTime startedAfter) {
|
||||
this.startedAfter = startedAfter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public OffsetDateTime getStartedBefore() {
|
||||
return startedBefore;
|
||||
}
|
||||
|
||||
public void setStartedBefore(OffsetDateTime startedBefore) {
|
||||
this.startedBefore = startedBefore;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withStartedBefore(OffsetDateTime startedBefore) {
|
||||
this.startedBefore = startedBefore;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getStartedBy() {
|
||||
return startedBy;
|
||||
}
|
||||
|
||||
public void setStartedBy(String startedBy) {
|
||||
this.startedBy = startedBy;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withStartedBy(String startedBy) {
|
||||
this.startedBy = startedBy;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSuperProcessInstanceId() {
|
||||
return superProcessInstanceId;
|
||||
}
|
||||
|
||||
public void setSuperProcessInstanceId(String superProcessInstanceId) {
|
||||
this.superProcessInstanceId = superProcessInstanceId;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withSuperProcessInstanceId(String superProcessInstanceId) {
|
||||
this.superProcessInstanceId = superProcessInstanceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
public void setTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withTenantId(String tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTenantIdLike() {
|
||||
return tenantIdLike;
|
||||
}
|
||||
|
||||
public void setTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withTenantIdLike(String tenantIdLike) {
|
||||
this.tenantIdLike = tenantIdLike;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<QueryVariable> getVariables() {
|
||||
if (variables == null)
|
||||
variables = new LinkedList<>();
|
||||
return variables;
|
||||
}
|
||||
|
||||
public void setVariables(List<QueryVariable> variables) {
|
||||
this.variables = variables;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withVariables(List<QueryVariable> variables) {
|
||||
this.variables = variables;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Boolean isWithoutTenantId() {
|
||||
return withoutTenantId;
|
||||
}
|
||||
|
||||
public void setWithoutTenantId(Boolean withoutTenantId) {
|
||||
this.withoutTenantId = withoutTenantId;
|
||||
}
|
||||
|
||||
public HistoricProcessInstanceQueryRepresentation withWithoutTenantId(Boolean withoutTenantId) {
|
||||
this.withoutTenantId = withoutTenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,349 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
|
||||
/**
|
||||
* ModelRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"comment",
|
||||
"createdBy",
|
||||
"createdByFullName",
|
||||
"description",
|
||||
"favorite",
|
||||
"id",
|
||||
"lastUpdated",
|
||||
"lastUpdatedBy",
|
||||
"lastUpdatedByFullName",
|
||||
"latestVersion",
|
||||
"modelType",
|
||||
"name",
|
||||
"permission",
|
||||
"referenceId",
|
||||
"stencilSet",
|
||||
"tenantId",
|
||||
"version"
|
||||
})
|
||||
public class ModelRepresentation {
|
||||
|
||||
@JsonProperty("comment")
|
||||
private String comment;
|
||||
@JsonProperty("createdBy")
|
||||
private Integer createdBy;
|
||||
@JsonProperty("createdByFullName")
|
||||
private String createdByFullName;
|
||||
@JsonProperty("description")
|
||||
private String description;
|
||||
@JsonProperty("favorite")
|
||||
private Boolean favorite;
|
||||
@JsonProperty("id")
|
||||
private Integer id;
|
||||
@JsonProperty("lastUpdated")
|
||||
private String lastUpdated;
|
||||
@JsonProperty("lastUpdatedBy")
|
||||
private Integer lastUpdatedBy;
|
||||
@JsonProperty("lastUpdatedByFullName")
|
||||
private String lastUpdatedByFullName;
|
||||
@JsonProperty("latestVersion")
|
||||
private Boolean latestVersion;
|
||||
@JsonProperty("modelType")
|
||||
private Integer modelType;
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
@JsonProperty("permission")
|
||||
private String permission;
|
||||
@JsonProperty("referenceId")
|
||||
private Integer referenceId;
|
||||
@JsonProperty("stencilSet")
|
||||
private Integer stencilSet;
|
||||
@JsonProperty("tenantId")
|
||||
private Integer tenantId;
|
||||
@JsonProperty("version")
|
||||
private Integer version;
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
@JsonProperty("comment")
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
@JsonProperty("comment")
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public ModelRepresentation withComment(String comment) {
|
||||
this.comment = comment;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("createdBy")
|
||||
public Integer getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
@JsonProperty("createdBy")
|
||||
public void setCreatedBy(Integer createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public ModelRepresentation withCreatedBy(Integer createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("createdByFullName")
|
||||
public String getCreatedByFullName() {
|
||||
return createdByFullName;
|
||||
}
|
||||
|
||||
@JsonProperty("createdByFullName")
|
||||
public void setCreatedByFullName(String createdByFullName) {
|
||||
this.createdByFullName = createdByFullName;
|
||||
}
|
||||
|
||||
public ModelRepresentation withCreatedByFullName(String createdByFullName) {
|
||||
this.createdByFullName = createdByFullName;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("description")
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@JsonProperty("description")
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public ModelRepresentation withDescription(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("favorite")
|
||||
public Boolean getFavorite() {
|
||||
return favorite;
|
||||
}
|
||||
|
||||
@JsonProperty("favorite")
|
||||
public void setFavorite(Boolean favorite) {
|
||||
this.favorite = favorite;
|
||||
}
|
||||
|
||||
public ModelRepresentation withFavorite(Boolean favorite) {
|
||||
this.favorite = favorite;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("id")
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@JsonProperty("id")
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public ModelRepresentation withId(Integer id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdated")
|
||||
public String getLastUpdated() {
|
||||
return lastUpdated;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdated")
|
||||
public void setLastUpdated(String lastUpdated) {
|
||||
this.lastUpdated = lastUpdated;
|
||||
}
|
||||
|
||||
public ModelRepresentation withLastUpdated(String lastUpdated) {
|
||||
this.lastUpdated = lastUpdated;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdatedBy")
|
||||
public Integer getLastUpdatedBy() {
|
||||
return lastUpdatedBy;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdatedBy")
|
||||
public void setLastUpdatedBy(Integer lastUpdatedBy) {
|
||||
this.lastUpdatedBy = lastUpdatedBy;
|
||||
}
|
||||
|
||||
public ModelRepresentation withLastUpdatedBy(Integer lastUpdatedBy) {
|
||||
this.lastUpdatedBy = lastUpdatedBy;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdatedByFullName")
|
||||
public String getLastUpdatedByFullName() {
|
||||
return lastUpdatedByFullName;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdatedByFullName")
|
||||
public void setLastUpdatedByFullName(String lastUpdatedByFullName) {
|
||||
this.lastUpdatedByFullName = lastUpdatedByFullName;
|
||||
}
|
||||
|
||||
public ModelRepresentation withLastUpdatedByFullName(String lastUpdatedByFullName) {
|
||||
this.lastUpdatedByFullName = lastUpdatedByFullName;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("latestVersion")
|
||||
public Boolean getLatestVersion() {
|
||||
return latestVersion;
|
||||
}
|
||||
|
||||
@JsonProperty("latestVersion")
|
||||
public void setLatestVersion(Boolean latestVersion) {
|
||||
this.latestVersion = latestVersion;
|
||||
}
|
||||
|
||||
public ModelRepresentation withLatestVersion(Boolean latestVersion) {
|
||||
this.latestVersion = latestVersion;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("modelType")
|
||||
public Integer getModelType() {
|
||||
return modelType;
|
||||
}
|
||||
|
||||
@JsonProperty("modelType")
|
||||
public void setModelType(Integer modelType) {
|
||||
this.modelType = modelType;
|
||||
}
|
||||
|
||||
public ModelRepresentation withModelType(Integer modelType) {
|
||||
this.modelType = modelType;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@JsonProperty("name")
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ModelRepresentation withName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("permission")
|
||||
public String getPermission() {
|
||||
return permission;
|
||||
}
|
||||
|
||||
@JsonProperty("permission")
|
||||
public void setPermission(String permission) {
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
public ModelRepresentation withPermission(String permission) {
|
||||
this.permission = permission;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("referenceId")
|
||||
public Integer getReferenceId() {
|
||||
return referenceId;
|
||||
}
|
||||
|
||||
@JsonProperty("referenceId")
|
||||
public void setReferenceId(Integer referenceId) {
|
||||
this.referenceId = referenceId;
|
||||
}
|
||||
|
||||
public ModelRepresentation withReferenceId(Integer referenceId) {
|
||||
this.referenceId = referenceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("stencilSet")
|
||||
public Integer getStencilSet() {
|
||||
return stencilSet;
|
||||
}
|
||||
|
||||
@JsonProperty("stencilSet")
|
||||
public void setStencilSet(Integer stencilSet) {
|
||||
this.stencilSet = stencilSet;
|
||||
}
|
||||
|
||||
public ModelRepresentation withStencilSet(Integer stencilSet) {
|
||||
this.stencilSet = stencilSet;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("tenantId")
|
||||
public Integer getTenantId() {
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
@JsonProperty("tenantId")
|
||||
public void setTenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public ModelRepresentation withTenantId(Integer tenantId) {
|
||||
this.tenantId = tenantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("version")
|
||||
public Integer getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
@JsonProperty("version")
|
||||
public void setVersion(Integer version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public ModelRepresentation withVersion(Integer version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public ModelRepresentation withAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Permission extends PermissionLight {
|
||||
|
||||
@JsonProperty
|
||||
private UserLight person;
|
||||
@JsonProperty
|
||||
private GroupLight group;
|
||||
|
||||
public UserLight getPerson() {
|
||||
return person;
|
||||
}
|
||||
|
||||
public void setPerson(UserLight person) {
|
||||
this.person = person;
|
||||
}
|
||||
|
||||
public GroupLight getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
public void setGroup(GroupLight group) {
|
||||
this.group = group;
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public enum PermissionLevel {
|
||||
|
||||
@JsonProperty("write")
|
||||
Write,
|
||||
|
||||
@JsonProperty("read")
|
||||
Read
|
||||
|
||||
}
|
@@ -0,0 +1,73 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class PermissionLight {
|
||||
|
||||
@JsonProperty
|
||||
private String id;
|
||||
@JsonProperty
|
||||
private PermissionLevel permission;
|
||||
@JsonProperty
|
||||
private Long personId;
|
||||
@JsonProperty
|
||||
private Long groupId;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public PermissionLight withId(String id) {
|
||||
this.setId(id);
|
||||
return this;
|
||||
}
|
||||
|
||||
public PermissionLevel getPermission() {
|
||||
return permission;
|
||||
}
|
||||
|
||||
public void setPermission(PermissionLevel permission) {
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
public PermissionLight withPermission(PermissionLevel permission) {
|
||||
this.setPermission(permission);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getPersonId() {
|
||||
return personId;
|
||||
}
|
||||
|
||||
public void setPersonId(Long personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public PermissionLight withPersonId(Long personId) {
|
||||
this.setPersonId(personId);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Long getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(Long groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public PermissionLight withGroupId(Long groupId) {
|
||||
this.setGroupId(groupId);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -11,26 +11,26 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"businessKey",
|
||||
"ended",
|
||||
"graphicalNotationDefined",
|
||||
"id",
|
||||
"name",
|
||||
"processDefinitionCategory",
|
||||
"processDefinitionDeploymentId",
|
||||
"processDefinitionDescription",
|
||||
"businessKey",
|
||||
"processDefinitionId",
|
||||
"processDefinitionKey",
|
||||
"processDefinitionName",
|
||||
"processDefinitionVersion",
|
||||
"startFormDefined",
|
||||
"started",
|
||||
"startedBy",
|
||||
"suspended",
|
||||
"tenantId",
|
||||
"started",
|
||||
"ended",
|
||||
"startedBy",
|
||||
"processDefinitionName",
|
||||
"processDefinitionDescription",
|
||||
"processDefinitionKey",
|
||||
"processDefinitionCategory",
|
||||
"processDefinitionVersion",
|
||||
"processDefinitionDeploymentId",
|
||||
"graphicalNotationDefined",
|
||||
"startFormDefined",
|
||||
"suspended",
|
||||
"variables"
|
||||
})
|
||||
public class ProcessInstance {
|
||||
public class ProcessInstance extends Datum {
|
||||
|
||||
@JsonProperty("businessKey")
|
||||
private String businessKey;
|
||||
|
@@ -0,0 +1,154 @@
|
||||
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"appDefinitionId",
|
||||
"page",
|
||||
"processDefinitionId",
|
||||
"processInstanceId",
|
||||
"size",
|
||||
"sort",
|
||||
"start",
|
||||
"state"
|
||||
})
|
||||
public class ProcessInstanceQueryRepresentation {
|
||||
|
||||
public enum Sort {
|
||||
@JsonProperty("created-asc")
|
||||
CreatedAsc,
|
||||
@JsonProperty("created-desc")
|
||||
CreatedDesc,
|
||||
@JsonProperty("ended-asc")
|
||||
EndedAsc,
|
||||
@JsonProperty("ended-desc")
|
||||
EndedDesc,
|
||||
}
|
||||
|
||||
public enum State {
|
||||
@JsonProperty("all")
|
||||
All,
|
||||
@JsonProperty("completed")
|
||||
Completed,
|
||||
@JsonProperty("running")
|
||||
Running
|
||||
}
|
||||
|
||||
@JsonProperty("appDefinitionId")
|
||||
private Long appDefinitionId;
|
||||
@JsonProperty("processDefinitionId")
|
||||
private String processDefinitionId;
|
||||
@JsonProperty("processInstanceId")
|
||||
private String processInstanceId;
|
||||
@JsonProperty("size")
|
||||
private Integer size;
|
||||
@JsonProperty("sort")
|
||||
private Sort sort;
|
||||
@JsonProperty("start")
|
||||
private Integer start;
|
||||
@JsonProperty("state")
|
||||
private State state;
|
||||
|
||||
/**
|
||||
* No args constructor for use in serialization
|
||||
*/
|
||||
public ProcessInstanceQueryRepresentation() {
|
||||
}
|
||||
|
||||
public Long getAppDefinitionId() {
|
||||
return appDefinitionId;
|
||||
}
|
||||
|
||||
public void setAppDefinitionId(Long appDefinitionId) {
|
||||
this.appDefinitionId = appDefinitionId;
|
||||
}
|
||||
|
||||
public ProcessInstanceQueryRepresentation withAppDefinitionId(Long appDefinitionId) {
|
||||
this.appDefinitionId = appDefinitionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionId() {
|
||||
return processDefinitionId;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
}
|
||||
|
||||
public ProcessInstanceQueryRepresentation withProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getProcessInstanceId() {
|
||||
return processInstanceId;
|
||||
}
|
||||
|
||||
public void setProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
public ProcessInstanceQueryRepresentation withProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(Integer size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public ProcessInstanceQueryRepresentation withSize(Integer size) {
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Sort getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Sort sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public ProcessInstanceQueryRepresentation withSort(Sort sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getStart() {
|
||||
return start;
|
||||
}
|
||||
|
||||
public void setStart(Integer start) {
|
||||
this.start = start;
|
||||
}
|
||||
|
||||
public ProcessInstanceQueryRepresentation withStart(Integer start) {
|
||||
this.start = start;
|
||||
return this;
|
||||
}
|
||||
|
||||
public State getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(State state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public ProcessInstanceQueryRepresentation withState(State state) {
|
||||
this.state = state;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,90 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"name",
|
||||
"operation",
|
||||
"type",
|
||||
"value"
|
||||
})
|
||||
public class QueryVariable {
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
@JsonProperty("operation")
|
||||
private String operation;
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
@JsonProperty("value")
|
||||
private Object value;
|
||||
|
||||
/**
|
||||
* No args constructor for use in serialization
|
||||
*/
|
||||
public QueryVariable() {
|
||||
}
|
||||
|
||||
public QueryVariable(String name, String operation, String type, Object value) {
|
||||
this.name = name;
|
||||
this.operation = operation;
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public QueryVariable withName(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String operation) {
|
||||
this.operation = operation;
|
||||
}
|
||||
|
||||
public QueryVariable withOperation(String operation) {
|
||||
this.operation = operation;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public QueryVariable withType(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Object value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public QueryVariable withValue(Object value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class ResultList<T> {
|
||||
|
||||
@JsonProperty("size")
|
||||
private Integer size;
|
||||
@JsonProperty("total")
|
||||
private Integer total;
|
||||
@JsonProperty("start")
|
||||
private Integer start;
|
||||
@JsonProperty("data")
|
||||
private List<T> data = new LinkedList<T>();
|
||||
|
||||
public Integer getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(Integer size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public Integer getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(Integer total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public Integer getStart() {
|
||||
return start;
|
||||
}
|
||||
|
||||
public void setStart(Integer start) {
|
||||
this.start = start;
|
||||
}
|
||||
|
||||
public List<T> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<T> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,117 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
|
||||
/**
|
||||
* ResultListDataRepresentation
|
||||
* <p>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonPropertyOrder({
|
||||
"data",
|
||||
"size",
|
||||
"start",
|
||||
"total"
|
||||
})
|
||||
public class ResultListDataRepresentation<T extends Datum> {
|
||||
|
||||
@JsonProperty("data")
|
||||
private List<T> data = new ArrayList<>();
|
||||
@JsonProperty("size")
|
||||
private Integer size;
|
||||
@JsonProperty("start")
|
||||
private Integer start;
|
||||
@JsonProperty("total")
|
||||
private Integer total;
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
|
||||
|
||||
@JsonProperty("data")
|
||||
public List<T> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
@JsonProperty("data")
|
||||
public void setData(List<T> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public ResultListDataRepresentation<T> withData(List<T> data) {
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("size")
|
||||
public Integer getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
@JsonProperty("size")
|
||||
public void setSize(Integer size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public ResultListDataRepresentation<T> withSize(Integer size) {
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("start")
|
||||
public Integer getStart() {
|
||||
return start;
|
||||
}
|
||||
|
||||
@JsonProperty("start")
|
||||
public void setStart(Integer start) {
|
||||
this.start = start;
|
||||
}
|
||||
|
||||
public ResultListDataRepresentation<T> withStart(Integer start) {
|
||||
this.start = start;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonProperty("total")
|
||||
public Integer getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
@JsonProperty("total")
|
||||
public void setTotal(Integer total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public ResultListDataRepresentation<T> withTotal(Integer total) {
|
||||
this.total = total;
|
||||
return this;
|
||||
}
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public ResultListDataRepresentation<T> withAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class ShareInfoRequest {
|
||||
|
||||
@JsonProperty
|
||||
private List<PermissionLight> added = new LinkedList<>();
|
||||
@JsonProperty
|
||||
private List<PermissionLight> removed = new LinkedList<>();
|
||||
@JsonProperty
|
||||
private List<PermissionLight> updated = new LinkedList<>();
|
||||
|
||||
|
||||
|
||||
public List<PermissionLight> getAdded() {
|
||||
return added;
|
||||
}
|
||||
|
||||
public void setAdded(List<PermissionLight> added) {
|
||||
this.added = added;
|
||||
}
|
||||
|
||||
public List<PermissionLight> getRemoved() {
|
||||
return removed;
|
||||
}
|
||||
|
||||
public void setRemoved(List<PermissionLight> removed) {
|
||||
this.removed = removed;
|
||||
}
|
||||
|
||||
public List<PermissionLight> getUpdated() {
|
||||
return updated;
|
||||
}
|
||||
|
||||
public void setUpdated(List<PermissionLight> updated) {
|
||||
this.updated = updated;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class SharePermission extends Permission {
|
||||
|
||||
@JsonProperty
|
||||
private OffsetDateTime shareDate;
|
||||
@JsonProperty
|
||||
private Long sharedBy;
|
||||
|
||||
public OffsetDateTime getShareDate() {
|
||||
return shareDate;
|
||||
}
|
||||
|
||||
public void setShareDate(OffsetDateTime shareDate) {
|
||||
this.shareDate = shareDate;
|
||||
}
|
||||
|
||||
public Long getSharedBy() {
|
||||
return sharedBy;
|
||||
}
|
||||
|
||||
public void setSharedBy(Long sharedBy) {
|
||||
this.sharedBy = sharedBy;
|
||||
}
|
||||
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.model.Tenant;
|
||||
import com.inteligr8.rs.ClientConfiguration;
|
||||
|
||||
@TestPropertySource(locations = {"/local.properties"})
|
||||
@SpringJUnitConfig(classes = {ApsClientConfiguration.class, ApsPublicRestApiJerseyImpl.class, ApsClientJerseyImpl.class})
|
||||
public class ArrayResponseUnitTest extends ConditionalIT {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("aps.api.jersey")
|
||||
private ApsPublicRestApi client;
|
||||
|
||||
@Override
|
||||
public ClientConfiguration getConfiguration() {
|
||||
return this.client.getConfig();
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledIf("hostExists")
|
||||
public void testTenants() {
|
||||
List<Tenant> objs = this.client.getAdminApi().getTenants();
|
||||
|
||||
Assertions.assertNotNull(objs);
|
||||
}
|
||||
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpUriRequest;
|
||||
import org.apache.http.client.methods.RequestBuilder;
|
||||
import org.apache.http.impl.client.DefaultRedirectStrategy;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
|
||||
import com.inteligr8.rs.ClientConfiguration;
|
||||
|
||||
public abstract class ConditionalIT {
|
||||
|
||||
public abstract ClientConfiguration getConfiguration();
|
||||
|
||||
public boolean hostExists() {
|
||||
String uri = this.getConfiguration().getBaseUrl();
|
||||
|
||||
HttpUriRequest request = RequestBuilder.get()
|
||||
.setUri(uri)
|
||||
.build();
|
||||
|
||||
HttpClient client = HttpClientBuilder.create()
|
||||
.setRedirectStrategy(DefaultRedirectStrategy.INSTANCE)
|
||||
.build();
|
||||
|
||||
try {
|
||||
HttpResponse response = client.execute(request);
|
||||
return response.getStatusLine().getStatusCode() < 300;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,54 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.EnabledIf;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.model.AppVersion;
|
||||
import com.inteligr8.alfresco.activiti.model.CreateProcessInstance;
|
||||
import com.inteligr8.alfresco.activiti.model.ProcessInstance;
|
||||
import com.inteligr8.alfresco.activiti.model.User;
|
||||
import com.inteligr8.alfresco.activiti.model.Variable;
|
||||
|
||||
public abstract class ConnectionClientIT extends ConditionalIT {
|
||||
|
||||
public abstract ApsPublicRestApi getClient();
|
||||
|
||||
@Test
|
||||
@EnabledIf("hostExists")
|
||||
public void testAppVersion() {
|
||||
AppVersion obj = this.getClient().getAppVersionApi().get();
|
||||
|
||||
Assertions.assertNotNull(obj);
|
||||
Assertions.assertEquals("1", obj.getMajorVersion());
|
||||
Assertions.assertEquals("bpmSuite", obj.getType());
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledIf("hostExists")
|
||||
public void testProfile() {
|
||||
User obj = this.getClient().getProfileApi().get();
|
||||
|
||||
Assertions.assertNotNull(obj);
|
||||
Assertions.assertEquals("admin@app.activiti.com", obj.getEmail());
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledIf("hostExists")
|
||||
public void testStartProcess() {
|
||||
CreateProcessInstance request = new CreateProcessInstance();
|
||||
request.setProcessDefinitionKey("qcDocument");
|
||||
request.setVariables(Arrays.asList(new Variable("acsNodeId", null, null, UUID.randomUUID().toString())));
|
||||
|
||||
ProcessInstance response = this.getClient().getProcessInstancesApi().create(request);
|
||||
|
||||
Assertions.assertNotNull(response);
|
||||
Assertions.assertNotNull(response.getId());
|
||||
Assertions.assertNotNull(response.getId().length() > 0);
|
||||
Assertions.assertEquals("qcDocument", response.getProcessDefinitionKey());
|
||||
}
|
||||
|
||||
}
|
@@ -1,28 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
|
||||
import com.inteligr8.rs.ClientConfiguration;
|
||||
|
||||
@TestPropertySource(locations = {"/local.properties"})
|
||||
@SpringJUnitConfig(classes = {ApsClientConfiguration.class, ApsPublicRestApiCxfImpl.class, ApsClientCxfImpl.class})
|
||||
public class ConnectionCxfClientIT extends ConnectionClientIT {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("aps.api.cxf")
|
||||
private ApsPublicRestApi client;
|
||||
|
||||
@Override
|
||||
public ApsPublicRestApi getClient() {
|
||||
return this.client;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientConfiguration getConfiguration() {
|
||||
return this.client.getConfig();
|
||||
}
|
||||
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
package com.inteligr8.alfresco.activiti;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
|
||||
import com.inteligr8.rs.ClientConfiguration;
|
||||
|
||||
@TestPropertySource(locations = {"/local.properties"})
|
||||
@SpringJUnitConfig(classes = {ApsClientConfiguration.class, ApsPublicRestApiCxfImpl.class, ApsClientJerseyImpl.class})
|
||||
public class ConnectionJerseyClientIT extends ConnectionClientIT {
|
||||
|
||||
@Autowired
|
||||
@Qualifier("aps.api.jersey")
|
||||
private ApsPublicRestApi client;
|
||||
|
||||
public ApsPublicRestApi getClient() {
|
||||
return this.client;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientConfiguration getConfiguration() {
|
||||
return this.client.getConfig();
|
||||
}
|
||||
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
process.service.baseUrl=http://localhost:8080/activiti-app
|
||||
process.service.security.oauth.tokenUrl=http://auth.example.org:8080/auth/realms/alfresco/protocol/openid-connect/token
|
||||
process.service.security.oauth.clientId=alfresco
|
||||
process.service.security.oauth.grantUsername=admin
|
||||
process.service.security.oauth.grantPassword=admin
|
@@ -1,3 +0,0 @@
|
||||
process.service.baseUrl=http://localhost:8080/activiti-app
|
||||
process.service.security.basicAuth.username=admin@app.activiti.com
|
||||
process.service.security.basicAuth.password=admin
|
Reference in New Issue
Block a user