Compare commits

..

17 Commits

69 changed files with 1147 additions and 2785 deletions

239
pom.xml
View File

@@ -4,28 +4,35 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.inteligr8.alfresco</groupId>
<artifactId>acs-public-rest-api</artifactId>
<version>2.0.1</version>
<name>Alfresco Content Services ReST API for Java</name>
<version>1.1-SNAPSHOT</version>
<name>Alfresco Content Services ReST API Client for Java</name>
<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 -->
<acs.baseUrl>http://localhost:8080/alfresco</acs.baseUrl>
<acs.platform.tag>acs7</acs.platform.tag>
<acs.baseUrl>http://localhost:8080/api-explorer</acs.baseUrl>
<acs.platform.tag>acs6</acs.platform.tag>
<swagger.basePackage>com.inteligr8.alfresco.acs</swagger.basePackage>
<it.directory>src/test/none</it.directory>
<jersey.version>2.35</jersey.version>
<cxf.version>3.4.7</cxf.version>
<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>
<api.model.disabled>false</api.model.disabled>
<api.model.disabled>true</api.model.disabled>
</properties>
<dependencies>
<dependency>
<groupId>com.inteligr8</groupId>
<artifactId>common-rest-api</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
@@ -38,26 +45,64 @@
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<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-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
<optional>true</optional>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-proxy-client</artifactId>
<version>${jersey.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey.version}</version>
<optional>true</optional>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</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>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</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>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.16.0</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -80,6 +125,21 @@
</sources>
</configuration>
</execution>
<execution>
<id>add-services</id>
<phase>process-test-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${it.directory}</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
@@ -88,9 +148,42 @@
<classifier>${acs.platform.tag}</classifier>
</configuration>
</plugin>
<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>
<configuration>
<excludes>
<exclude>**/*Jersey*</exclude>
<exclude>**/*Cxf*</exclude>
</excludes>
</configuration>
</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>
<configuration>
<excludes>
<exclude>**/*Jersey*</exclude>
<exclude>**/*Cxf*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.2</version>
<executions>
<execution>
<id>javadoc</id>
@@ -106,6 +199,96 @@
</build>
<profiles>
<profile>
<id>it-jersey</id>
<properties>
<it.directory>src/test/jersey</it.directory>
</properties>
<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>
<configuration>
<includes>
<include>**/*Jersey*</include>
</includes>
<excludes>
<exclude>**/*IT.java</exclude>
</excludes>
</configuration>
</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>
<configuration>
<includes>
<include>**/*Jersey*IT.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it-cxf</id>
<properties>
<it.directory>src/test/cxf</it.directory>
</properties>
<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>
<configuration>
<includes>
<include>**/*Cxf*</include>
</includes>
<excludes>
<exclude>**/*IT.java</exclude>
</excludes>
</configuration>
</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>
<configuration>
<includes>
<include>**/*Cxf*IT.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Implement when descriptor is available -->
<profile>
<id>swagger-codegen</id>
@@ -358,10 +541,8 @@
<repositories>
<repository>
<id>inteligr8-releases</id>
<id>inteligr8-public</id>
<url>https://repos.inteligr8.com/nexus/repository/inteligr8-public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
</repositories>
@@ -381,5 +562,9 @@
<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>

View File

@@ -1,59 +0,0 @@
package com.inteligr8.alfresco.acs.api;
import com.inteligr8.alfresco.acs.model.AspectEntry;
import com.inteligr8.alfresco.acs.model.AspectPaging;
import com.inteligr8.alfresco.acs.model.Error;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.List;
import javax.ws.rs.*;
/**
* Alfresco Content Services REST API
*
* <p>**Model API** Provides access to the model features of Alfresco Content Services.
*
*/
@Path("/api/-default-/public/alfresco/versions/1")
@Api(value = "/api/-default-/public/alfresco/versions/1", description = "")
public interface AspectsApi {
/**
* Get an aspect
*
* **Note:** This is available in Alfresco 7.0.0 and newer versions. Get information for aspect **aspectId**.
*
*/
@GET
@Path("/aspects/{aspectId}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Get an aspect", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = AspectEntry.class),
@ApiResponse(code = 400, message = "Invalid parameter: unknown aspectId scheme specified "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 404, message = "**aspectId** does not exist "),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public AspectEntry getAspect(@PathParam("aspectId") String aspectId);
/**
* List aspects
*
* **Note:** This is available in Alfresco 7.0.0 and newer versions. Gets a list of aspects from the data dictionary. The System aspects will be ignored by default. &#x60;&#x60;&#x60;JSON { \&quot;list\&quot;: { \&quot;pagination\&quot;: { \&quot;count\&quot;: 0, \&quot;hasMoreItems\&quot;: true, \&quot;totalItems\&quot;: 0, \&quot;skipCount\&quot;: 0, \&quot;maxItems\&quot;: 0 }, \&quot;entries\&quot;: [ { \&quot;entry\&quot;: { \&quot;associations\&quot;: [], \&quot;mandatoryAspects\&quot;: [], \&quot;includedInSupertypeQuery\&quot;: true, \&quot;description\&quot;: \&quot;Titled\&quot;, \&quot;isContainer\&quot;: false, \&quot;model\&quot;: { \&quot;id\&quot;: \&quot;cm:contentmodel\&quot;, \&quot;author\&quot;: \&quot;Alfresco\&quot;, \&quot;description\&quot;: \&quot;Alfresco Content Domain Model\&quot;, \&quot;namespaceUri\&quot;: \&quot;http://www.alfresco.org/model/content/1.0\&quot;, \&quot;namespacePrefix\&quot;: \&quot;cm\&quot; }, \&quot;id\&quot;: \&quot;cm:titled\&quot;, \&quot;title\&quot;: \&quot;Titled\&quot;, \&quot;properties\&quot;: [ { \&quot;id\&quot;: \&quot;cm:title\&quot;, \&quot;title\&quot;: \&quot;Title\&quot;, \&quot;description\&quot;: \&quot;Content Title\&quot;, \&quot;dataType\&quot;: \&quot;d:mltext\&quot;, \&quot;isMultiValued\&quot;: false, \&quot;isMandatory\&quot;: false, \&quot;isMandatoryEnforced\&quot;: false, \&quot;isProtected\&quot;: false }, { ... } ] } }, { \&quot;entry\&quot;: { ... } }, { \&quot;entry\&quot;: { ... } }, ] } } &#x60;&#x60;&#x60;
*
*/
@GET
@Path("/aspects")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "List aspects", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = AspectPaging.class),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public AspectPaging listAspects(@QueryParam("where")String where, @QueryParam("skipCount")@DefaultValue("0") Integer skipCount, @QueryParam("maxItems")@DefaultValue("100") Integer maxItems, @QueryParam("include")List<String> include);
}

View File

@@ -146,7 +146,7 @@ public interface AuditApi {
@ApiResponse(code = 404, message = "**applicationId** does not exist "),
@ApiResponse(code = 501, message = "Audit is disabled for the system"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public AuditEntryPaging listAuditEntriesForAuditApp(@PathParam("auditApplicationId") String auditApplicationId, @QueryParam("skipCount")@DefaultValue("0") Integer skipCount, @QueryParam("omitTotalItems")@DefaultValue("false") Boolean omitTotalItems, @QueryParam("orderBy")List<String> orderBy, @QueryParam("maxItems")@DefaultValue("100") Integer maxItems, @QueryParam("where")String where, @QueryParam("include")List<String> include, @QueryParam("fields")List<String> fields);
public AuditEntryPaging listAuditEntriesForAuditApp(@PathParam("auditApplicationId") String auditApplicationId, @QueryParam("skipCount")@DefaultValue("0") Integer skipCount, @QueryParam("orderBy")List<String> orderBy, @QueryParam("maxItems")@DefaultValue("100") Integer maxItems, @QueryParam("where")String where, @QueryParam("include")List<String> include, @QueryParam("fields")List<String> fields);
/**
* List audit entries for a node

View File

@@ -170,7 +170,7 @@ public interface GroupsApi {
/**
* List groups
*
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Gets a list of groups. You can use the **include** parameter to return additional information. You can use the **where** parameter to filter the returned groups by **isRoot**. For example, the following **where** clause will return just the root groups: &#x60;&#x60;&#x60; (isRoot&#x3D;true) &#x60;&#x60;&#x60; The **where** parameter can also be used to filter by ***zone*** and ***displayName***. They may be combined with isRoot to narrow a result set even further. For example, the following where clause will only return groups belonging to the &#x60;MY.ZONE&#x60; zone. &#x60;&#x60;&#x60; where&#x3D;(zones in (&#39;MY.ZONE&#39;)) &#x60;&#x60;&#x60; This may be combined with the isRoot filter, as shown below: &#x60;&#x60;&#x60; where&#x3D;(isRoot&#x3D;false AND zones in (&#39;MY.ZONE&#39;)) &#x60;&#x60;&#x60; The following where clause will only return groups with displayName &#x60;MY.GROUP.NAME&#x60;. &#x60;&#x60;&#x60; where&#x3D;(displayName in (&#39;MY.GROUP.NAME&#39;)) &#x60;&#x60;&#x60; This may be combined with the isRoot and zones filter, as shown below: &#x60;&#x60;&#x60; where&#x3D;(isRoot&#x3D;false AND displayName in (&#39;MY.GROUP.NAME&#39;)) &#x60;&#x60;&#x60; &#x60;&#x60;&#x60; where&#x3D;(zones in (&#39;MY.ZONE&#39;) AND displayName in (&#39;MY.GROUP.NAME&#39;)) &#x60;&#x60;&#x60; &#x60;&#x60;&#x60; where&#x3D;(isRoot&#x3D;false AND zones in (&#39;MY.ZONE&#39;) AND displayName in (&#39;MY.GROUP.NAME&#39;)) &#x60;&#x60;&#x60; ***Note:*** restrictions include * &#x60;AND&#x60; is the only supported operator when combining &#x60;isRoot&#x60;, &#x60;zones&#x60; and &#x60;displayName&#x60; filters * Only one zone is supported by the filter * Only one displayName is supported by the filter * The quoted zone name and displayName must be placed in parenthesis — a 400 error will result if these are omitted. The default sort order for the returned list is for groups to be sorted by ascending displayName. You can override the default by using the **orderBy** parameter. You can specify one of the following fields in the **orderBy** parameter: * id * displayName
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Gets a list of groups. You can use the **include** parameter to return additional information. You can use the **where** parameter to filter the returned groups by **isRoot**. For example, the following **where** clause will return just the root groups: &#x60;&#x60;&#x60; (isRoot&#x3D;true) &#x60;&#x60;&#x60; The **where** parameter can also be used to filter by ***zone***. This may be combined with isRoot to narrow a result set even further. For example, the following where clause will only return groups belonging to the &#x60;MY.ZONE&#x60; zone. &#x60;&#x60;&#x60; where&#x3D;(zones in (&#39;MY.ZONE&#39;)) &#x60;&#x60;&#x60; This may be combined with the isRoot filter, as shown below: &#x60;&#x60;&#x60; where&#x3D;(isRoot&#x3D;false AND zones in (&#39;MY.ZONE&#39;)) &#x60;&#x60;&#x60; ***Note:*** restrictions include * &#x60;AND&#x60; is the only supported operator when combining &#x60;isRoot&#x60; and &#x60;zones&#x60; filters * Only one zone is supported by the filter * The quoted zone name must be placed in parenthesis — a 400 error will result if these are omitted. The default sort order for the returned list is for groups to be sorted by ascending displayName. You can override the default by using the **orderBy** parameter. You can specify one of the following fields in the **orderBy** parameter: * id * displayName
*
*/
@GET

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -6,8 +6,6 @@ import com.inteligr8.alfresco.acs.model.SiteBodyUpdate;
import com.inteligr8.alfresco.acs.model.SiteContainerEntry;
import com.inteligr8.alfresco.acs.model.SiteContainerPaging;
import com.inteligr8.alfresco.acs.model.SiteEntry;
import com.inteligr8.alfresco.acs.model.SiteGroupEntry;
import com.inteligr8.alfresco.acs.model.SiteGroupPaging;
import com.inteligr8.alfresco.acs.model.SiteMemberEntry;
import com.inteligr8.alfresco.acs.model.SiteMemberPaging;
import com.inteligr8.alfresco.acs.model.SiteMembershipApprovalBody;
@@ -79,27 +77,6 @@ public interface SitesApi {
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public SiteEntry createSite(SiteBodyCreate siteBodyCreate, @QueryParam("skipConfiguration")@DefaultValue("false") Boolean skipConfiguration, @QueryParam("skipAddToFavorites")@DefaultValue("false") Boolean skipAddToFavorites, @QueryParam("fields")List<String> fields);
/**
* Create a site membership for group
*
* **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. Creates a site membership for group **groupId** on site **siteId**. You can set the **role** to one of four types: * SiteConsumer * SiteCollaborator * SiteContributor * SiteManager **Note:** You can create more than one site membership by specifying a list of group in the JSON body like this: &#x60;&#x60;&#x60;JSON [ { \&quot;role\&quot;: \&quot;SiteConsumer\&quot;, \&quot;id\&quot;: \&quot;authorityId\&quot; }, { \&quot;role\&quot;: \&quot;SiteConsumer\&quot;, \&quot;id\&quot;: \&quot;authorityId\&quot; } ] &#x60;&#x60;&#x60; If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: &#x60;&#x60;&#x60;JSON { \&quot;list\&quot;: { \&quot;pagination\&quot;: { \&quot;count\&quot;: 2, \&quot;hasMoreItems\&quot;: false, \&quot;totalItems\&quot;: 2, \&quot;skipCount\&quot;: 0, \&quot;maxItems\&quot;: 100 }, \&quot;entries\&quot;: [ { \&quot;entry\&quot;: { ... } }, { \&quot;entry\&quot;: { ... } } ] } } &#x60;&#x60;&#x60;
*
*/
@POST
@Path("/sites/{siteId}/group-members")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Create a site membership for group", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 201, message = "Successful response", response = SiteGroupEntry.class),
@ApiResponse(code = 400, message = "Invalid parameter: value of **role** or **id** is invalid or **siteMembershipBodyCreate** invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 403, message = "User does not have permission to invite a Group"),
@ApiResponse(code = 404, message = "**siteId** or **groupId** does not exist "),
@ApiResponse(code = 409, message = "Group with this **id** is already a member"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public SiteGroupEntry createSiteGroupMembership(@PathParam("siteId") String siteId, SiteMembershipBodyCreate siteMembershipBodyCreate, @QueryParam("fields")List<String> fields);
/**
* Create a site membership
*
@@ -159,25 +136,6 @@ public interface SitesApi {
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public void deleteSite(@PathParam("siteId") String siteId, @QueryParam("permanent")@DefaultValue("false") Boolean permanent);
/**
* Delete a group membership for site
*
* **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. Deletes group **groupId** as a member of site **siteId**.
*
*/
@DELETE
@Path("/sites/{siteId}/group-members/{groupId}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Delete a group membership for site", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 204, message = "Successful response"),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 404, message = "**siteId** or **groupId** does not exist "),
@ApiResponse(code = 422, message = "Integrity exception (eg. last site member must be a site manager) or not allowed to delete groupId"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public void deleteSiteGroupMembership(@PathParam("siteId") String siteId, @PathParam("groupId") String groupId);
/**
* Delete a site membership
*
@@ -269,24 +227,6 @@ public interface SitesApi {
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public SiteContainerEntry getSiteContainer(@PathParam("siteId") String siteId, @PathParam("containerId") String containerId, @QueryParam("fields")List<String> fields);
/**
* Get information about site membership of group
*
* **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. Gets site membership information for group **groupId** on site **siteId**.
*
*/
@GET
@Path("/sites/{siteId}/group-members/{groupId}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Get information about site membership of group", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = SiteGroupEntry.class),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 404, message = "**siteId** or **groupId** does not exist "),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public SiteGroupEntry getSiteGroupMembership(@PathParam("siteId") String siteId, @PathParam("groupId") String groupId, @QueryParam("fields")List<String> fields);
/**
* Get a site membership
*
@@ -378,25 +318,6 @@ public interface SitesApi {
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public SiteContainerPaging listSiteContainers(@PathParam("siteId") String siteId, @QueryParam("skipCount")@DefaultValue("0") Integer skipCount, @QueryParam("maxItems")@DefaultValue("100") Integer maxItems, @QueryParam("fields")List<String> fields);
/**
* List group membership for site
*
* **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. Gets a list of group membership for site **siteId**.
*
*/
@GET
@Path("/sites/{siteId}/group-members")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "List group membership for site", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = SiteGroupPaging.class),
@ApiResponse(code = 400, message = "Invalid parameter: value of **maxItems** or **skipCount** is invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 404, message = "**siteId** does not exist "),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public SiteGroupPaging listSiteGroups(@PathParam("siteId") String siteId, @QueryParam("skipCount")@DefaultValue("0") Integer skipCount, @QueryParam("maxItems")@DefaultValue("100") Integer maxItems, @QueryParam("fields")List<String> fields);
/**
* List site membership requests
*
@@ -433,7 +354,7 @@ public interface SitesApi {
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 404, message = "**siteId** does not exist "),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public SiteMemberPaging listSiteMemberships(@PathParam("siteId") String siteId, @QueryParam("skipCount")@DefaultValue("0") Integer skipCount, @QueryParam("maxItems")@DefaultValue("100") Integer maxItems, @QueryParam("fields")List<String> fields, @QueryParam("where")String where);
public SiteMemberPaging listSiteMemberships(@PathParam("siteId") String siteId, @QueryParam("skipCount")@DefaultValue("0") Integer skipCount, @QueryParam("maxItems")@DefaultValue("100") Integer maxItems, @QueryParam("fields")List<String> fields);
/**
* List site memberships
@@ -513,26 +434,6 @@ public interface SitesApi {
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public SiteEntry updateSite(@PathParam("siteId") String siteId, SiteBodyUpdate siteBodyUpdate, @QueryParam("fields")List<String> fields);
/**
* Update site membership of group
*
* **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. Update the membership of person **groupId** in site **siteId**. You can set the **role** to one of four types: * SiteConsumer * SiteCollaborator * SiteContributor * SiteManager
*
*/
@PUT
@Path("/sites/{siteId}/group-members/{groupId}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Update site membership of group", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = SiteGroupEntry.class),
@ApiResponse(code = 400, message = "Invalid parameter: **role** does not exist or **siteMembershipBodyUpdate** invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 404, message = "**siteId** or **groupId** does not exist "),
@ApiResponse(code = 422, message = "Integrity exception (eg. last site member must be a site manager) or not allowed to update group"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public SiteGroupEntry updateSiteGroupMembership(@PathParam("siteId") String siteId, @PathParam("groupId") String groupId, SiteMembershipBodyUpdate siteMembershipBodyUpdate, @QueryParam("fields")List<String> fields);
/**
* Update a site membership
*

View File

@@ -1,59 +0,0 @@
package com.inteligr8.alfresco.acs.api;
import com.inteligr8.alfresco.acs.model.Error;
import com.inteligr8.alfresco.acs.model.TypeEntry;
import com.inteligr8.alfresco.acs.model.TypePaging;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.List;
import javax.ws.rs.*;
/**
* Alfresco Content Services REST API
*
* <p>**Model API** Provides access to the model features of Alfresco Content Services.
*
*/
@Path("/api/-default-/public/alfresco/versions/1")
@Api(value = "/api/-default-/public/alfresco/versions/1", description = "")
public interface TypesApi {
/**
* Get a type
*
* **Note:** This is available in Alfresco 7.0.0 and newer versions. Get information for type **typeId**.
*
*/
@GET
@Path("/types/{typeId}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Get a type", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = TypeEntry.class),
@ApiResponse(code = 400, message = "Invalid parameter: unknown typeId scheme specified "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 404, message = "**typeId** does not exist "),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public TypeEntry getType(@PathParam("typeId") String typeId);
/**
* List types
*
* **Note:** This is available in Alfresco 7.0.0 and newer versions. Gets a list of types from the data dictionary. The System types will be ignored by default. &#x60;&#x60;&#x60;JSON { \&quot;list\&quot;: { \&quot;pagination\&quot;: { \&quot;count\&quot;: 0, \&quot;hasMoreItems\&quot;: true, \&quot;totalItems\&quot;: 0, \&quot;skipCount\&quot;: 0, \&quot;maxItems\&quot;: 0 }, \&quot;entries\&quot;: [ { \&quot;entry\&quot;: { \&quot;associations\&quot;: [], \&quot;isArchive\&quot;: true, \&quot;mandatoryAspects\&quot;: [ \&quot;cm:auditable\&quot;, \&quot;sys:referenceable\&quot;, \&quot;sys:localized\&quot; ], \&quot;includedInSupertypeQuery\&quot;: true, \&quot;description\&quot;: \&quot;Base Content Object\&quot;, \&quot;isContainer\&quot;: false, \&quot;model\&quot;: { \&quot;id\&quot;: \&quot;cm:contentmodel\&quot;, \&quot;author\&quot;: \&quot;Alfresco\&quot;, \&quot;description\&quot;: \&quot;Alfresco Content Domain Model\&quot;, \&quot;namespaceUri\&quot;: \&quot;http://www.alfresco.org/model/content/1.0\&quot;, \&quot;namespacePrefix\&quot;: \&quot;cm\&quot; }, \&quot;id\&quot;: \&quot;cm:content\&quot;, \&quot;title\&quot;: \&quot;Content\&quot;, \&quot;parentId\&quot;: \&quot;cm:cmobject\&quot; \&quot;properties\&quot;: [ { \&quot;id\&quot;: \&quot;cm:name\&quot;, \&quot;title\&quot;: \&quot;Name\&quot;, \&quot;description\&quot;: \&quot;Name\&quot;, \&quot;dataType\&quot;: \&quot;d:text\&quot;, \&quot;isMultiValued\&quot;: false, \&quot;isMandatory\&quot;: true, \&quot;isMandatoryEnforced\&quot;: true \&quot;isProtected\&quot;: false ... }, { ... } ] } }, { \&quot;entry\&quot;: { ... } }, { \&quot;entry\&quot;: { ... } }, ] } } &#x60;&#x60;&#x60;
*
*/
@GET
@Path("/types")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "List types", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = TypePaging.class),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public TypePaging listTypes(@QueryParam("where")String where, @QueryParam("skipCount")@DefaultValue("0") Integer skipCount, @QueryParam("maxItems")@DefaultValue("100") Integer maxItems, @QueryParam("include")List<String> include);
}

View File

@@ -1,9 +1,6 @@
package com.inteligr8.alfresco.acs.api;
import com.inteligr8.alfresco.acs.model.Error;
import com.inteligr8.alfresco.acs.model.RenditionBodyCreate;
import com.inteligr8.alfresco.acs.model.RenditionEntry;
import com.inteligr8.alfresco.acs.model.RenditionPaging;
import com.inteligr8.alfresco.acs.model.RevertBody;
import com.inteligr8.alfresco.acs.model.VersionEntry;
import com.inteligr8.alfresco.acs.model.VersionPaging;
@@ -26,28 +23,6 @@ import javax.ws.rs.*;
@Api(value = "/api/-default-/public/alfresco/versions/1", description = "")
public interface VersionsApi {
/**
* Create rendition for a file version
*
* **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. An asynchronous request to create a rendition for version of file **nodeId** and **versionId**. The version rendition is specified by name **id** in the request body: &#x60;&#x60;&#x60;JSON { \&quot;id\&quot;:\&quot;doclib\&quot; } &#x60;&#x60;&#x60; Multiple names may be specified as a comma separated list or using a list format: &#x60;&#x60;&#x60;JSON [ { \&quot;id\&quot;: \&quot;doclib\&quot; }, { \&quot;id\&quot;: \&quot;avatar\&quot; } ] &#x60;&#x60;&#x60;
*
*/
@POST
@Path("/nodes/{nodeId}/versions/{versionId}/renditions")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Create rendition for a file version", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 202, message = "Request accepted"),
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format, or is not a file, or **versionId** is invalid, or **renditionBodyCreate** is invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 403, message = "Current user does not have permission for **nodeId**"),
@ApiResponse(code = 404, message = "**nodeId** or **versionId** or **renditionId** does not exist "),
@ApiResponse(code = 409, message = "All requested renditions already exist"),
@ApiResponse(code = 501, message = "Renditions/thumbnails are disabled for the system"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public void createVersionRendition(@PathParam("nodeId") String nodeId, @PathParam("versionId") String versionId, RenditionBodyCreate renditionBodyCreate);
/**
* Delete a version
*
@@ -112,49 +87,6 @@ public interface VersionsApi {
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public File getVersionContent(@PathParam("nodeId") String nodeId, @PathParam("versionId") String versionId, @QueryParam("attachment")@DefaultValue("true") Boolean attachment, @HeaderParam("If-Modified-Since") Date ifModifiedSince, @HeaderParam("Range") String range);
/**
* Get rendition information for a file version
*
* **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. Gets the rendition information for **renditionId** of version of file **nodeId** and **versionId**.
*
*/
@GET
@Path("/nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Get rendition information for a file version", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = RenditionEntry.class),
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format, or is not a file, or **versionId** is invalid, or **renditionId** is invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 403, message = "Current user does not have permission for **nodeId**"),
@ApiResponse(code = 404, message = "**nodeId** or **versionId** or **renditionId** does not exist "),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public RenditionEntry getVersionRendition(@PathParam("nodeId") String nodeId, @PathParam("versionId") String versionId, @PathParam("renditionId") String renditionId);
/**
* Get rendition content for a file version
*
* **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. Gets the rendition content for **renditionId** of version of file **nodeId** and **versionId**.
*
*/
@GET
@Path("/nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content")
@Consumes({ "application/json" })
@Produces({ "application/octet-stream" })
@ApiOperation(value = "Get rendition content for a file version", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = File.class),
@ApiResponse(code = 206, message = "Partial Content"),
@ApiResponse(code = 304, message = "Content has not been modified since the date provided in the If-Modified-Since header"),
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format, or is not a file, or **versionId** is invalid, or **renditionId** is invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 403, message = "Current user does not have permission for **nodeId**"),
@ApiResponse(code = 404, message = "**nodeId** or **versionId** or **renditionId** does not exist "),
@ApiResponse(code = 416, message = "Range Not Satisfiable"),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public File getVersionRenditionContent(@PathParam("nodeId") String nodeId, @PathParam("versionId") String versionId, @PathParam("renditionId") String renditionId, @QueryParam("attachment")@DefaultValue("true") Boolean attachment, @HeaderParam("If-Modified-Since") Date ifModifiedSince, @HeaderParam("Range") String range, @QueryParam("placeholder")@DefaultValue("false") Boolean placeholder);
/**
* List version history
*
@@ -175,26 +107,6 @@ public interface VersionsApi {
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public VersionPaging listVersionHistory(@PathParam("nodeId") String nodeId, @QueryParam("include")List<String> include, @QueryParam("fields")List<String> fields, @QueryParam("skipCount")@DefaultValue("0") Integer skipCount, @QueryParam("maxItems")@DefaultValue("100") Integer maxItems);
/**
* List renditions for a file version
*
* **Note:** this endpoint is available in Alfresco 7.0.0 and newer versions. Gets a list of the rendition information for each rendition of the version of file **nodeId** and **versionId**, including the rendition id. Each rendition returned has a **status**: CREATED means it is available to view or download, NOT_CREATED means the rendition can be requested. You can use the **where** parameter to filter the returned renditions by **status**. For example, the following **where** clause will return just the CREATED renditions: &#x60;&#x60;&#x60; (status&#x3D;&#39;CREATED&#39;) &#x60;&#x60;&#x60;
*
*/
@GET
@Path("/nodes/{nodeId}/versions/{versionId}/renditions")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "List renditions for a file version", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful response", response = RenditionPaging.class),
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format, or is not a file, or **versionId** is invalid, or **where** is invalid "),
@ApiResponse(code = 401, message = "Authentication failed"),
@ApiResponse(code = 403, message = "Current user does not have permission for **nodeId**"),
@ApiResponse(code = 404, message = "**nodeId** or **versionId** does not exist "),
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
public RenditionPaging listVersionRenditions(@PathParam("nodeId") String nodeId, @PathParam("versionId") String versionId, @QueryParam("where")String where);
/**
* Revert a version
*

View File

@@ -1,287 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class AbstractClass {
@ApiModelProperty(required = true, value = "")
private String id = null;
@ApiModelProperty(required = true, value = "")
private String title = null;
@ApiModelProperty(value = "")
private String description = null;
@ApiModelProperty(value = "")
private String parentId = null;
@ApiModelProperty(value = "")
private List<Property> properties = null;
@ApiModelProperty(value = "")
private Boolean isContainer = null;
@ApiModelProperty(value = "")
private Boolean isArchive = null;
@ApiModelProperty(value = "")
private Boolean includedInSupertypeQuery = null;
@ApiModelProperty(value = "")
private List<String> mandatoryAspects = null;
@ApiModelProperty(value = "")
private List<AbstractClassAssociation> associations = null;
@ApiModelProperty(value = "")
private Model model = null;
/**
* Get id
* @return id
**/
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public AbstractClass id(String id) {
this.id = id;
return this;
}
/**
* Get title
* @return title
**/
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public AbstractClass title(String title) {
this.title = title;
return this;
}
/**
* Get description
* @return description
**/
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public AbstractClass description(String description) {
this.description = description;
return this;
}
/**
* Get parentId
* @return parentId
**/
@JsonProperty("parentId")
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public AbstractClass parentId(String parentId) {
this.parentId = parentId;
return this;
}
/**
* Get properties
* @return properties
**/
@JsonProperty("properties")
public List<Property> getProperties() {
return properties;
}
public void setProperties(List<Property> properties) {
this.properties = properties;
}
public AbstractClass properties(List<Property> properties) {
this.properties = properties;
return this;
}
public AbstractClass addPropertiesItem(Property propertiesItem) {
this.properties.add(propertiesItem);
return this;
}
/**
* Get isContainer
* @return isContainer
**/
@JsonProperty("isContainer")
public Boolean isIsContainer() {
return isContainer;
}
public void setIsContainer(Boolean isContainer) {
this.isContainer = isContainer;
}
public AbstractClass isContainer(Boolean isContainer) {
this.isContainer = isContainer;
return this;
}
/**
* Get isArchive
* @return isArchive
**/
@JsonProperty("isArchive")
public Boolean isIsArchive() {
return isArchive;
}
public void setIsArchive(Boolean isArchive) {
this.isArchive = isArchive;
}
public AbstractClass isArchive(Boolean isArchive) {
this.isArchive = isArchive;
return this;
}
/**
* Get includedInSupertypeQuery
* @return includedInSupertypeQuery
**/
@JsonProperty("includedInSupertypeQuery")
public Boolean isIncludedInSupertypeQuery() {
return includedInSupertypeQuery;
}
public void setIncludedInSupertypeQuery(Boolean includedInSupertypeQuery) {
this.includedInSupertypeQuery = includedInSupertypeQuery;
}
public AbstractClass includedInSupertypeQuery(Boolean includedInSupertypeQuery) {
this.includedInSupertypeQuery = includedInSupertypeQuery;
return this;
}
/**
* Get mandatoryAspects
* @return mandatoryAspects
**/
@JsonProperty("mandatoryAspects")
public List<String> getMandatoryAspects() {
return mandatoryAspects;
}
public void setMandatoryAspects(List<String> mandatoryAspects) {
this.mandatoryAspects = mandatoryAspects;
}
public AbstractClass mandatoryAspects(List<String> mandatoryAspects) {
this.mandatoryAspects = mandatoryAspects;
return this;
}
public AbstractClass addMandatoryAspectsItem(String mandatoryAspectsItem) {
this.mandatoryAspects.add(mandatoryAspectsItem);
return this;
}
/**
* Get associations
* @return associations
**/
@JsonProperty("associations")
public List<AbstractClassAssociation> getAssociations() {
return associations;
}
public void setAssociations(List<AbstractClassAssociation> associations) {
this.associations = associations;
}
public AbstractClass associations(List<AbstractClassAssociation> associations) {
this.associations = associations;
return this;
}
public AbstractClass addAssociationsItem(AbstractClassAssociation associationsItem) {
this.associations.add(associationsItem);
return this;
}
/**
* Get model
* @return model
**/
@JsonProperty("model")
public Model getModel() {
return model;
}
public void setModel(Model model) {
this.model = model;
}
public AbstractClass model(Model model) {
this.model = model;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AbstractClass {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" isContainer: ").append(toIndentedString(isContainer)).append("\n");
sb.append(" isArchive: ").append(toIndentedString(isArchive)).append("\n");
sb.append(" includedInSupertypeQuery: ").append(toIndentedString(includedInSupertypeQuery)).append("\n");
sb.append(" mandatoryAspects: ").append(toIndentedString(mandatoryAspects)).append("\n");
sb.append(" associations: ").append(toIndentedString(associations)).append("\n");
sb.append(" model: ").append(toIndentedString(model)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,183 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class AbstractClassAssociation {
@ApiModelProperty(required = true, value = "")
private String id = null;
@ApiModelProperty(value = "")
private String title = null;
@ApiModelProperty(value = "")
private String description = null;
@ApiModelProperty(value = "")
private Boolean isChild = null;
@ApiModelProperty(value = "")
private Boolean isProtected = null;
@ApiModelProperty(value = "")
private AbstractClassAssociationSource source = null;
@ApiModelProperty(value = "")
private AbstractClassAssociationSource target = null;
/**
* Get id
* @return id
**/
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public AbstractClassAssociation id(String id) {
this.id = id;
return this;
}
/**
* Get title
* @return title
**/
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public AbstractClassAssociation title(String title) {
this.title = title;
return this;
}
/**
* Get description
* @return description
**/
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public AbstractClassAssociation description(String description) {
this.description = description;
return this;
}
/**
* Get isChild
* @return isChild
**/
@JsonProperty("isChild")
public Boolean isIsChild() {
return isChild;
}
public void setIsChild(Boolean isChild) {
this.isChild = isChild;
}
public AbstractClassAssociation isChild(Boolean isChild) {
this.isChild = isChild;
return this;
}
/**
* Get isProtected
* @return isProtected
**/
@JsonProperty("isProtected")
public Boolean isIsProtected() {
return isProtected;
}
public void setIsProtected(Boolean isProtected) {
this.isProtected = isProtected;
}
public AbstractClassAssociation isProtected(Boolean isProtected) {
this.isProtected = isProtected;
return this;
}
/**
* Get source
* @return source
**/
@JsonProperty("source")
public AbstractClassAssociationSource getSource() {
return source;
}
public void setSource(AbstractClassAssociationSource source) {
this.source = source;
}
public AbstractClassAssociation source(AbstractClassAssociationSource source) {
this.source = source;
return this;
}
/**
* Get target
* @return target
**/
@JsonProperty("target")
public AbstractClassAssociationSource getTarget() {
return target;
}
public void setTarget(AbstractClassAssociationSource target) {
this.target = target;
}
public AbstractClassAssociation target(AbstractClassAssociationSource target) {
this.target = target;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AbstractClassAssociation {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" isChild: ").append(toIndentedString(isChild)).append("\n");
sb.append(" isProtected: ").append(toIndentedString(isProtected)).append("\n");
sb.append(" source: ").append(toIndentedString(source)).append("\n");
sb.append(" target: ").append(toIndentedString(target)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,139 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class AbstractClassAssociationSource {
@ApiModelProperty(value = "")
private String role = null;
@ApiModelProperty(value = "")
private String cls = null;
@ApiModelProperty(value = "")
private Boolean isMandatory = null;
@ApiModelProperty(value = "")
private Boolean isMany = null;
@ApiModelProperty(value = "")
private Boolean isMandatoryEnforced = null;
/**
* Get role
* @return role
**/
@JsonProperty("role")
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public AbstractClassAssociationSource role(String role) {
this.role = role;
return this;
}
/**
* Get cls
* @return cls
**/
@JsonProperty("cls")
public String getCls() {
return cls;
}
public void setCls(String cls) {
this.cls = cls;
}
public AbstractClassAssociationSource cls(String cls) {
this.cls = cls;
return this;
}
/**
* Get isMandatory
* @return isMandatory
**/
@JsonProperty("isMandatory")
public Boolean isIsMandatory() {
return isMandatory;
}
public void setIsMandatory(Boolean isMandatory) {
this.isMandatory = isMandatory;
}
public AbstractClassAssociationSource isMandatory(Boolean isMandatory) {
this.isMandatory = isMandatory;
return this;
}
/**
* Get isMany
* @return isMany
**/
@JsonProperty("isMany")
public Boolean isIsMany() {
return isMany;
}
public void setIsMany(Boolean isMany) {
this.isMany = isMany;
}
public AbstractClassAssociationSource isMany(Boolean isMany) {
this.isMany = isMany;
return this;
}
/**
* Get isMandatoryEnforced
* @return isMandatoryEnforced
**/
@JsonProperty("isMandatoryEnforced")
public Boolean isIsMandatoryEnforced() {
return isMandatoryEnforced;
}
public void setIsMandatoryEnforced(Boolean isMandatoryEnforced) {
this.isMandatoryEnforced = isMandatoryEnforced;
}
public AbstractClassAssociationSource isMandatoryEnforced(Boolean isMandatoryEnforced) {
this.isMandatoryEnforced = isMandatoryEnforced;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AbstractClassAssociationSource {\n");
sb.append(" role: ").append(toIndentedString(role)).append("\n");
sb.append(" cls: ").append(toIndentedString(cls)).append("\n");
sb.append(" isMandatory: ").append(toIndentedString(isMandatory)).append("\n");
sb.append(" isMany: ").append(toIndentedString(isMany)).append("\n");
sb.append(" isMandatoryEnforced: ").append(toIndentedString(isMandatoryEnforced)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.Map;
/**
* Activities describe any past activity in a site, for example creating an item of content, commenting on a node, liking an item of content.
@@ -46,7 +45,7 @@ public class Activity {
/**
* An object summarizing the activity
**/
private Map<String, String> activitySummary = null;
private Object activitySummary = null;
@ApiModelProperty(required = true, value = "The type of the activity posted")
/**
@@ -148,24 +147,19 @@ public class Activity {
* @return activitySummary
**/
@JsonProperty("activitySummary")
public Map<String, String> getActivitySummary() {
public Object getActivitySummary() {
return activitySummary;
}
public void setActivitySummary(Map<String, String> activitySummary) {
public void setActivitySummary(Object activitySummary) {
this.activitySummary = activitySummary;
}
public Activity activitySummary(Map<String, String> activitySummary) {
public Activity activitySummary(Object activitySummary) {
this.activitySummary = activitySummary;
return this;
}
public Activity putActivitySummaryItem(String key, String activitySummaryItem) {
this.activitySummary.put(key, activitySummaryItem);
return this;
}
/**
* The type of the activity posted
* @return activityType

View File

@@ -1,26 +0,0 @@
package com.inteligr8.alfresco.acs.model;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class Aspect {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Aspect {\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,51 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class AspectEntry {
@ApiModelProperty(required = true, value = "")
private Aspect entry = null;
/**
* Get entry
* @return entry
**/
@JsonProperty("entry")
public Aspect getEntry() {
return entry;
}
public void setEntry(Aspect entry) {
this.entry = entry;
}
public AspectEntry entry(Aspect entry) {
this.entry = entry;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AspectEntry {\n");
sb.append(" entry: ").append(toIndentedString(entry)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,51 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class AspectPaging {
@ApiModelProperty(value = "")
private AspectPagingList _list = null;
/**
* Get _list
* @return _list
**/
@JsonProperty("list")
public AspectPagingList getList() {
return _list;
}
public void setList(AspectPagingList _list) {
this._list = _list;
}
public AspectPaging _list(AspectPagingList _list) {
this._list = _list;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AspectPaging {\n");
sb.append(" _list: ").append(toIndentedString(_list)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,79 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class AspectPagingList {
@ApiModelProperty(value = "")
private Pagination pagination = null;
@ApiModelProperty(value = "")
private List<AspectEntry> entries = null;
/**
* Get pagination
* @return pagination
**/
@JsonProperty("pagination")
public Pagination getPagination() {
return pagination;
}
public void setPagination(Pagination pagination) {
this.pagination = pagination;
}
public AspectPagingList pagination(Pagination pagination) {
this.pagination = pagination;
return this;
}
/**
* Get entries
* @return entries
**/
@JsonProperty("entries")
public List<AspectEntry> getEntries() {
return entries;
}
public void setEntries(List<AspectEntry> entries) {
this.entries = entries;
}
public AspectPagingList entries(List<AspectEntry> entries) {
this.entries = entries;
return this;
}
public AspectPagingList addEntriesItem(AspectEntry entriesItem) {
this.entries.add(entriesItem);
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AspectPagingList {\n");
sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n");
sb.append(" entries: ").append(toIndentedString(entries)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,95 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class Capabilities {
@ApiModelProperty(value = "")
private Boolean isAdmin = null;
@ApiModelProperty(value = "")
private Boolean isGuest = null;
@ApiModelProperty(value = "")
private Boolean isMutable = null;
/**
* Get isAdmin
* @return isAdmin
**/
@JsonProperty("isAdmin")
public Boolean isIsAdmin() {
return isAdmin;
}
public void setIsAdmin(Boolean isAdmin) {
this.isAdmin = isAdmin;
}
public Capabilities isAdmin(Boolean isAdmin) {
this.isAdmin = isAdmin;
return this;
}
/**
* Get isGuest
* @return isGuest
**/
@JsonProperty("isGuest")
public Boolean isIsGuest() {
return isGuest;
}
public void setIsGuest(Boolean isGuest) {
this.isGuest = isGuest;
}
public Capabilities isGuest(Boolean isGuest) {
this.isGuest = isGuest;
return this;
}
/**
* Get isMutable
* @return isMutable
**/
@JsonProperty("isMutable")
public Boolean isIsMutable() {
return isMutable;
}
public void setIsMutable(Boolean isMutable) {
this.isMutable = isMutable;
}
public Capabilities isMutable(Boolean isMutable) {
this.isMutable = isMutable;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Capabilities {\n");
sb.append(" isAdmin: ").append(toIndentedString(isAdmin)).append("\n");
sb.append(" isGuest: ").append(toIndentedString(isGuest)).append("\n");
sb.append(" isMutable: ").append(toIndentedString(isMutable)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,154 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.Map;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class Constraint {
@ApiModelProperty(required = true, value = "")
private String id = null;
@ApiModelProperty(value = "the type of the constraint")
/**
* the type of the constraint
**/
private String type = null;
@ApiModelProperty(value = "the human-readable constraint title")
/**
* the human-readable constraint title
**/
private String title = null;
@ApiModelProperty(value = "the human-readable constraint description")
/**
* the human-readable constraint description
**/
private String description = null;
@ApiModelProperty(value = "")
private Map<String, Object> parameters = null;
/**
* Get id
* @return id
**/
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Constraint id(String id) {
this.id = id;
return this;
}
/**
* the type of the constraint
* @return type
**/
@JsonProperty("type")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Constraint type(String type) {
this.type = type;
return this;
}
/**
* the human-readable constraint title
* @return title
**/
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Constraint title(String title) {
this.title = title;
return this;
}
/**
* the human-readable constraint description
* @return description
**/
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Constraint description(String description) {
this.description = description;
return this;
}
/**
* Get parameters
* @return parameters
**/
@JsonProperty("parameters")
public Map<String, Object> getParameters() {
return parameters;
}
public void setParameters(Map<String, Object> parameters) {
this.parameters = parameters;
}
public Constraint parameters(Map<String, Object> parameters) {
this.parameters = parameters;
return this;
}
public Constraint putParametersItem(String key, Object parametersItem) {
this.parameters.put(key, parametersItem);
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Constraint {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,60 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class Definition {
@ApiModelProperty(value = "List of property definitions effective for this node as the result of combining the type with all aspects.")
/**
* List of property definitions effective for this node as the result of combining the type with all aspects.
**/
private List<Property> properties = null;
/**
* List of property definitions effective for this node as the result of combining the type with all aspects.
* @return properties
**/
@JsonProperty("properties")
public List<Property> getProperties() {
return properties;
}
public void setProperties(List<Property> properties) {
this.properties = properties;
}
public Definition properties(List<Property> properties) {
this.properties = properties;
return this;
}
public Definition addPropertiesItem(Property propertiesItem) {
this.properties.add(propertiesItem);
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Definition {\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,78 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class DirectAccessUrlBodyCreate {
@ApiModelProperty(value = "")
private Date expiresAt = null;
@ApiModelProperty(value = "The length of time in seconds that the url is valid for. ")
/**
* The length of time in seconds that the url is valid for.
**/
private Integer validFor = null;
/**
* Get expiresAt
* @return expiresAt
**/
@JsonProperty("expiresAt")
public Date getExpiresAt() {
return expiresAt;
}
public void setExpiresAt(Date expiresAt) {
this.expiresAt = expiresAt;
}
public DirectAccessUrlBodyCreate expiresAt(Date expiresAt) {
this.expiresAt = expiresAt;
return this;
}
/**
* The length of time in seconds that the url is valid for.
* minimum: 1
* @return validFor
**/
@JsonProperty("validFor")
public Integer getValidFor() {
return validFor;
}
public void setValidFor(Integer validFor) {
this.validFor = validFor;
}
public DirectAccessUrlBodyCreate validFor(Integer validFor) {
this.validFor = validFor;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DirectAccessUrlBodyCreate {\n");
sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n");
sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,139 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class Model {
@ApiModelProperty(required = true, value = "")
private String id = null;
@ApiModelProperty(value = "")
private String author = null;
@ApiModelProperty(value = "")
private String description = null;
@ApiModelProperty(value = "")
private String namespaceUri = null;
@ApiModelProperty(value = "")
private String namespacePrefix = null;
/**
* Get id
* @return id
**/
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Model id(String id) {
this.id = id;
return this;
}
/**
* Get author
* @return author
**/
@JsonProperty("author")
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public Model author(String author) {
this.author = author;
return this;
}
/**
* Get description
* @return description
**/
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Model description(String description) {
this.description = description;
return this;
}
/**
* Get namespaceUri
* @return namespaceUri
**/
@JsonProperty("namespaceUri")
public String getNamespaceUri() {
return namespaceUri;
}
public void setNamespaceUri(String namespaceUri) {
this.namespaceUri = namespaceUri;
}
public Model namespaceUri(String namespaceUri) {
this.namespaceUri = namespaceUri;
return this;
}
/**
* Get namespacePrefix
* @return namespacePrefix
**/
@JsonProperty("namespacePrefix")
public String getNamespacePrefix() {
return namespacePrefix;
}
public void setNamespacePrefix(String namespacePrefix) {
this.namespacePrefix = namespacePrefix;
}
public Model namespacePrefix(String namespacePrefix) {
this.namespacePrefix = namespacePrefix;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Model {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" author: ").append(toIndentedString(author)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" namespaceUri: ").append(toIndentedString(namespaceUri)).append("\n");
sb.append(" namespacePrefix: ").append(toIndentedString(namespacePrefix)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -25,9 +25,6 @@ public class NodeBodyCreate {
@ApiModelProperty(value = "")
private PermissionsBody permissions = null;
@ApiModelProperty(value = "")
private Definition definition = null;
@ApiModelProperty(value = "")
private String relativePath = null;
@@ -134,24 +131,6 @@ public class NodeBodyCreate {
return this;
}
/**
* Get definition
* @return definition
**/
@JsonProperty("definition")
public Definition getDefinition() {
return definition;
}
public void setDefinition(Definition definition) {
this.definition = definition;
}
public NodeBodyCreate definition(Definition definition) {
this.definition = definition;
return this;
}
/**
* Get relativePath
* @return relativePath
@@ -245,7 +224,6 @@ public class NodeBodyCreate {
sb.append(" aspectNames: ").append(toIndentedString(aspectNames)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n");
sb.append(" definition: ").append(toIndentedString(definition)).append("\n");
sb.append(" relativePath: ").append(toIndentedString(relativePath)).append("\n");
sb.append(" association: ").append(toIndentedString(association)).append("\n");
sb.append(" secondaryChildren: ").append(toIndentedString(secondaryChildren)).append("\n");

View File

@@ -3,7 +3,6 @@ package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Map;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class NodeBodyUpdate {
@@ -21,7 +20,7 @@ public class NodeBodyUpdate {
private List<String> aspectNames = null;
@ApiModelProperty(value = "")
private Map<String, String> properties = null;
private Object properties = null;
@ApiModelProperty(value = "")
private PermissionsBody permissions = null;
@@ -89,24 +88,19 @@ public class NodeBodyUpdate {
* @return properties
**/
@JsonProperty("properties")
public Map<String, String> getProperties() {
public Object getProperties() {
return properties;
}
public void setProperties(Map<String, String> properties) {
public void setProperties(Object properties) {
this.properties = properties;
}
public NodeBodyUpdate properties(Map<String, String> properties) {
public NodeBodyUpdate properties(Object properties) {
this.properties = properties;
return this;
}
public NodeBodyUpdate putPropertiesItem(String key, String propertiesItem) {
this.properties.put(key, propertiesItem);
return this;
}
/**
* Get permissions
* @return permissions

View File

@@ -6,13 +6,13 @@ import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class Pagination {
@ApiModelProperty(value = "The number of objects in the entries array. ")
@ApiModelProperty(required = true, value = "The number of objects in the entries array. ")
/**
* The number of objects in the entries array.
**/
private Long count = null;
@ApiModelProperty(value = "A boolean value which is **true** if there are more entities in the collection beyond those in this response. A true value means a request with a larger value for the **skipCount** or the **maxItems** parameter will return more entities. ")
@ApiModelProperty(required = true, value = "A boolean value which is **true** if there are more entities in the collection beyond those in this response. A true value means a request with a larger value for the **skipCount** or the **maxItems** parameter will return more entities. ")
/**
* A boolean value which is **true** if there are more entities in the collection beyond those in this response. A true value means a request with a larger value for the **skipCount** or the **maxItems** parameter will return more entities.
**/
@@ -24,15 +24,15 @@ public class Pagination {
**/
private Long totalItems = null;
@ApiModelProperty(value = "An integer describing how many entities exist in the collection before those included in this list. If there was no **skipCount** parameter then the default value is 0. ")
@ApiModelProperty(required = true, value = "An integer describing how many entities exist in the collection before those included in this list. ")
/**
* An integer describing how many entities exist in the collection before those included in this list. If there was no **skipCount** parameter then the default value is 0.
* An integer describing how many entities exist in the collection before those included in this list.
**/
private Long skipCount = null;
@ApiModelProperty(value = "The value of the **maxItems** parameter used to generate this list. If there was no **maxItems** parameter then the default value is 100. ")
@ApiModelProperty(required = true, value = "The value of the **maxItems** parameter used to generate this list, or if there was no **maxItems** parameter the default value is 100 ")
/**
* The value of the **maxItems** parameter used to generate this list. If there was no **maxItems** parameter then the default value is 100.
* The value of the **maxItems** parameter used to generate this list, or if there was no **maxItems** parameter the default value is 100
**/
private Long maxItems = null;
/**
@@ -90,7 +90,7 @@ public class Pagination {
}
/**
* An integer describing how many entities exist in the collection before those included in this list. If there was no **skipCount** parameter then the default value is 0.
* An integer describing how many entities exist in the collection before those included in this list.
* @return skipCount
**/
@JsonProperty("skipCount")
@@ -108,7 +108,7 @@ public class Pagination {
}
/**
* The value of the **maxItems** parameter used to generate this list. If there was no **maxItems** parameter then the default value is 100.
* The value of the **maxItems** parameter used to generate this list, or if there was no **maxItems** parameter the default value is 100
* @return maxItems
**/
@JsonProperty("maxItems")

View File

@@ -72,7 +72,7 @@ public class Person {
private Object properties = null;
@ApiModelProperty(value = "")
private Capabilities capabilities = null;
private Object capabilities = null;
/**
* Get id
* @return id
@@ -461,15 +461,15 @@ public class Person {
* @return capabilities
**/
@JsonProperty("capabilities")
public Capabilities getCapabilities() {
public Object getCapabilities() {
return capabilities;
}
public void setCapabilities(Capabilities capabilities) {
public void setCapabilities(Object capabilities) {
this.capabilities = capabilities;
}
public Person capabilities(Capabilities capabilities) {
public Person capabilities(Object capabilities) {
this.capabilities = capabilities;
return this;
}

View File

@@ -1,282 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class Property {
@ApiModelProperty(required = true, value = "")
private String id = null;
@ApiModelProperty(value = "the human-readable title")
/**
* the human-readable title
**/
private String title = null;
@ApiModelProperty(value = "the human-readable description")
/**
* the human-readable description
**/
private String description = null;
@ApiModelProperty(value = "the default value")
/**
* the default value
**/
private String defaultValue = null;
@ApiModelProperty(value = "the name of the property type (e.g. d:text)")
/**
* the name of the property type (e.g. d:text)
**/
private String dataType = null;
@ApiModelProperty(value = "define if the property is multi-valued")
/**
* define if the property is multi-valued
**/
private Boolean isMultiValued = null;
@ApiModelProperty(value = "define if the property is mandatory")
/**
* define if the property is mandatory
**/
private Boolean isMandatory = null;
@ApiModelProperty(value = "define if the presence of mandatory properties is enforced")
/**
* define if the presence of mandatory properties is enforced
**/
private Boolean isMandatoryEnforced = null;
@ApiModelProperty(value = "define if the property is system maintained")
/**
* define if the property is system maintained
**/
private Boolean isProtected = null;
@ApiModelProperty(value = "list of constraints defined for the property")
/**
* list of constraints defined for the property
**/
private List<Constraint> constraints = null;
/**
* Get id
* @return id
**/
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Property id(String id) {
this.id = id;
return this;
}
/**
* the human-readable title
* @return title
**/
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Property title(String title) {
this.title = title;
return this;
}
/**
* the human-readable description
* @return description
**/
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Property description(String description) {
this.description = description;
return this;
}
/**
* the default value
* @return defaultValue
**/
@JsonProperty("defaultValue")
public String getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
public Property defaultValue(String defaultValue) {
this.defaultValue = defaultValue;
return this;
}
/**
* the name of the property type (e.g. d:text)
* @return dataType
**/
@JsonProperty("dataType")
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public Property dataType(String dataType) {
this.dataType = dataType;
return this;
}
/**
* define if the property is multi-valued
* @return isMultiValued
**/
@JsonProperty("isMultiValued")
public Boolean isIsMultiValued() {
return isMultiValued;
}
public void setIsMultiValued(Boolean isMultiValued) {
this.isMultiValued = isMultiValued;
}
public Property isMultiValued(Boolean isMultiValued) {
this.isMultiValued = isMultiValued;
return this;
}
/**
* define if the property is mandatory
* @return isMandatory
**/
@JsonProperty("isMandatory")
public Boolean isIsMandatory() {
return isMandatory;
}
public void setIsMandatory(Boolean isMandatory) {
this.isMandatory = isMandatory;
}
public Property isMandatory(Boolean isMandatory) {
this.isMandatory = isMandatory;
return this;
}
/**
* define if the presence of mandatory properties is enforced
* @return isMandatoryEnforced
**/
@JsonProperty("isMandatoryEnforced")
public Boolean isIsMandatoryEnforced() {
return isMandatoryEnforced;
}
public void setIsMandatoryEnforced(Boolean isMandatoryEnforced) {
this.isMandatoryEnforced = isMandatoryEnforced;
}
public Property isMandatoryEnforced(Boolean isMandatoryEnforced) {
this.isMandatoryEnforced = isMandatoryEnforced;
return this;
}
/**
* define if the property is system maintained
* @return isProtected
**/
@JsonProperty("isProtected")
public Boolean isIsProtected() {
return isProtected;
}
public void setIsProtected(Boolean isProtected) {
this.isProtected = isProtected;
}
public Property isProtected(Boolean isProtected) {
this.isProtected = isProtected;
return this;
}
/**
* list of constraints defined for the property
* @return constraints
**/
@JsonProperty("constraints")
public List<Constraint> getConstraints() {
return constraints;
}
public void setConstraints(List<Constraint> constraints) {
this.constraints = constraints;
}
public Property constraints(List<Constraint> constraints) {
this.constraints = constraints;
return this;
}
public Property addConstraintsItem(Constraint constraintsItem) {
this.constraints.add(constraintsItem);
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Property {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).append("\n");
sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n");
sb.append(" isMultiValued: ").append(toIndentedString(isMultiValued)).append("\n");
sb.append(" isMandatory: ").append(toIndentedString(isMandatory)).append("\n");
sb.append(" isMandatoryEnforced: ").append(toIndentedString(isMandatoryEnforced)).append("\n");
sb.append(" isProtected: ").append(toIndentedString(isProtected)).append("\n");
sb.append(" constraints: ").append(toIndentedString(constraints)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -64,9 +64,6 @@ public class SharedLink {
@ApiModelProperty(value = "")
private List<String> aspectNames = null;
@ApiModelProperty(value = "")
private PathInfo path = null;
/**
* Get id
* @return id
@@ -352,24 +349,6 @@ public class SharedLink {
return this;
}
/**
* Get path
* @return path
**/
@JsonProperty("path")
public PathInfo getPath() {
return path;
}
public void setPath(PathInfo path) {
this.path = path;
}
public SharedLink path(PathInfo path) {
this.path = path;
return this;
}
@Override
public String toString() {
@@ -391,7 +370,6 @@ public class SharedLink {
sb.append(" isFavorite: ").append(toIndentedString(isFavorite)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" aspectNames: ").append(toIndentedString(aspectNames)).append("\n");
sb.append(" path: ").append(toIndentedString(path)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -1,134 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class SiteGroup {
@ApiModelProperty(required = true, value = "")
private String id = null;
@ApiModelProperty(required = true, value = "")
private GroupMember group = null;
@XmlType(name="RoleEnum")
@XmlEnum(String.class)
public enum RoleEnum {
@XmlEnumValue("SiteConsumer") SITECONSUMER(String.valueOf("SiteConsumer")), @XmlEnumValue("SiteCollaborator") SITECOLLABORATOR(String.valueOf("SiteCollaborator")), @XmlEnumValue("SiteContributor") SITECONTRIBUTOR(String.valueOf("SiteContributor")), @XmlEnumValue("SiteManager") SITEMANAGER(String.valueOf("SiteManager"));
private String value;
RoleEnum (String v) {
value = v;
}
public String value() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static RoleEnum fromValue(String v) {
for (RoleEnum b : RoleEnum.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
}
}
return null;
}
}
@ApiModelProperty(required = true, value = "")
private RoleEnum role = null;
/**
* Get id
* @return id
**/
@JsonProperty("id")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public SiteGroup id(String id) {
this.id = id;
return this;
}
/**
* Get group
* @return group
**/
@JsonProperty("group")
public GroupMember getGroup() {
return group;
}
public void setGroup(GroupMember group) {
this.group = group;
}
public SiteGroup group(GroupMember group) {
this.group = group;
return this;
}
/**
* Get role
* @return role
**/
@JsonProperty("role")
public String getRole() {
if (role == null) {
return null;
}
return role.value();
}
public void setRole(RoleEnum role) {
this.role = role;
}
public SiteGroup role(RoleEnum role) {
this.role = role;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SiteGroup {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" group: ").append(toIndentedString(group)).append("\n");
sb.append(" role: ").append(toIndentedString(role)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,51 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class SiteGroupEntry {
@ApiModelProperty(required = true, value = "")
private SiteGroup entry = null;
/**
* Get entry
* @return entry
**/
@JsonProperty("entry")
public SiteGroup getEntry() {
return entry;
}
public void setEntry(SiteGroup entry) {
this.entry = entry;
}
public SiteGroupEntry entry(SiteGroup entry) {
this.entry = entry;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SiteGroupEntry {\n");
sb.append(" entry: ").append(toIndentedString(entry)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,51 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class SiteGroupPaging {
@ApiModelProperty(required = true, value = "")
private SiteGroupPagingList _list = null;
/**
* Get _list
* @return _list
**/
@JsonProperty("list")
public SiteGroupPagingList getList() {
return _list;
}
public void setList(SiteGroupPagingList _list) {
this._list = _list;
}
public SiteGroupPaging _list(SiteGroupPagingList _list) {
this._list = _list;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SiteGroupPaging {\n");
sb.append(" _list: ").append(toIndentedString(_list)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,80 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class SiteGroupPagingList {
@ApiModelProperty(required = true, value = "")
private Pagination pagination = null;
@ApiModelProperty(required = true, value = "")
private List<SiteGroupEntry> entries = new ArrayList<SiteGroupEntry>();
/**
* Get pagination
* @return pagination
**/
@JsonProperty("pagination")
public Pagination getPagination() {
return pagination;
}
public void setPagination(Pagination pagination) {
this.pagination = pagination;
}
public SiteGroupPagingList pagination(Pagination pagination) {
this.pagination = pagination;
return this;
}
/**
* Get entries
* @return entries
**/
@JsonProperty("entries")
public List<SiteGroupEntry> getEntries() {
return entries;
}
public void setEntries(List<SiteGroupEntry> entries) {
this.entries = entries;
}
public SiteGroupPagingList entries(List<SiteGroupEntry> entries) {
this.entries = entries;
return this;
}
public SiteGroupPagingList addEntriesItem(SiteGroupEntry entriesItem) {
this.entries.add(entriesItem);
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SiteGroupPagingList {\n");
sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n");
sb.append(" entries: ").append(toIndentedString(entries)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -50,9 +50,6 @@ public enum RoleEnum {
@ApiModelProperty(required = true, value = "")
private RoleEnum role = null;
@ApiModelProperty(value = "")
private Boolean isMemberOfGroup = null;
/**
* Get id
* @return id
@@ -110,24 +107,6 @@ public enum RoleEnum {
return this;
}
/**
* Get isMemberOfGroup
* @return isMemberOfGroup
**/
@JsonProperty("isMemberOfGroup")
public Boolean isIsMemberOfGroup() {
return isMemberOfGroup;
}
public void setIsMemberOfGroup(Boolean isMemberOfGroup) {
this.isMemberOfGroup = isMemberOfGroup;
}
public SiteMember isMemberOfGroup(Boolean isMemberOfGroup) {
this.isMemberOfGroup = isMemberOfGroup;
return this;
}
@Override
public String toString() {
@@ -137,7 +116,6 @@ public enum RoleEnum {
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" person: ").append(toIndentedString(person)).append("\n");
sb.append(" role: ").append(toIndentedString(role)).append("\n");
sb.append(" isMemberOfGroup: ").append(toIndentedString(isMemberOfGroup)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -14,12 +14,6 @@ public class SiteMembershipRequestBodyCreate {
@ApiModelProperty(value = "")
private String title = null;
@ApiModelProperty(value = "Optional client name used when sending an email to the end user, defaults to \"share\" if not provided. **Note:** The client must be registered before this API can send an email. **Note:** This is available in Alfresco 7.0.0 and newer versions. ")
/**
* Optional client name used when sending an email to the end user, defaults to \"share\" if not provided. **Note:** The client must be registered before this API can send an email. **Note:** This is available in Alfresco 7.0.0 and newer versions.
**/
private String client = null;
/**
* Get message
* @return message
@@ -74,24 +68,6 @@ public class SiteMembershipRequestBodyCreate {
return this;
}
/**
* Optional client name used when sending an email to the end user, defaults to \&quot;share\&quot; if not provided. **Note:** The client must be registered before this API can send an email. **Note:** This is available in Alfresco 7.0.0 and newer versions.
* @return client
**/
@JsonProperty("client")
public String getClient() {
return client;
}
public void setClient(String client) {
this.client = client;
}
public SiteMembershipRequestBodyCreate client(String client) {
this.client = client;
return this;
}
@Override
public String toString() {
@@ -101,7 +77,6 @@ public class SiteMembershipRequestBodyCreate {
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" client: ").append(toIndentedString(client)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -2,7 +2,6 @@ package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class Tag {
@@ -12,9 +11,6 @@ public class Tag {
@ApiModelProperty(required = true, value = "")
private String tag = null;
@ApiModelProperty(value = "")
private BigDecimal count = null;
/**
* Get id
* @return id
@@ -51,24 +47,6 @@ public class Tag {
return this;
}
/**
* Get count
* @return count
**/
@JsonProperty("count")
public BigDecimal getCount() {
return count;
}
public void setCount(BigDecimal count) {
this.count = count;
}
public Tag count(BigDecimal count) {
this.count = count;
return this;
}
@Override
public String toString() {
@@ -77,7 +55,6 @@ public class Tag {
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" tag: ").append(toIndentedString(tag)).append("\n");
sb.append(" count: ").append(toIndentedString(count)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -1,26 +0,0 @@
package com.inteligr8.alfresco.acs.model;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class Type {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Type {\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,51 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class TypeEntry {
@ApiModelProperty(required = true, value = "")
private Type entry = null;
/**
* Get entry
* @return entry
**/
@JsonProperty("entry")
public Type getEntry() {
return entry;
}
public void setEntry(Type entry) {
this.entry = entry;
}
public TypeEntry entry(Type entry) {
this.entry = entry;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TypeEntry {\n");
sb.append(" entry: ").append(toIndentedString(entry)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,51 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class TypePaging {
@ApiModelProperty(value = "")
private TypePagingList _list = null;
/**
* Get _list
* @return _list
**/
@JsonProperty("list")
public TypePagingList getList() {
return _list;
}
public void setList(TypePagingList _list) {
this._list = _list;
}
public TypePaging _list(TypePagingList _list) {
this._list = _list;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TypePaging {\n");
sb.append(" _list: ").append(toIndentedString(_list)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,79 +0,0 @@
package com.inteligr8.alfresco.acs.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
public class TypePagingList {
@ApiModelProperty(value = "")
private Pagination pagination = null;
@ApiModelProperty(value = "")
private List<TypeEntry> entries = null;
/**
* Get pagination
* @return pagination
**/
@JsonProperty("pagination")
public Pagination getPagination() {
return pagination;
}
public void setPagination(Pagination pagination) {
this.pagination = pagination;
}
public TypePagingList pagination(Pagination pagination) {
this.pagination = pagination;
return this;
}
/**
* Get entries
* @return entries
**/
@JsonProperty("entries")
public List<TypeEntry> getEntries() {
return entries;
}
public void setEntries(List<TypeEntry> entries) {
this.entries = entries;
}
public TypePagingList entries(List<TypeEntry> entries) {
this.entries = entries;
return this;
}
public TypePagingList addEntriesItem(TypeEntry entriesItem) {
this.entries.add(entriesItem);
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TypePagingList {\n");
sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n");
sb.append(" entries: ").append(toIndentedString(entries)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,165 @@
package com.inteligr8.alfresco.acs;
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 &amp; 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 AcsClientConfiguration implements ClientCxfConfiguration, ClientJerseyConfiguration {
@Value("${content.service.baseUrl:http://localhost:8080/alfresco}")
private String baseUrl;
@Value("${content.service.security.basicAuth.username:admin}")
private String basicAuthUsername;
@Value("${content.service.security.basicAuth.password:admin}")
private String basicAuthPassword;
@Value("${content.service.security.bearerToken:#{null}}")
private String bearerToken;
@Value("${content.service.security.oauth.tokenUrl:#{null}}")
private String oAuthTokenUrl;
@Value("${content.service.security.oauth.clientId:#{null}}")
private String oAuthClientId;
@Value("${content.service.security.oauth.clientSecret:#{null}}")
private String oAuthClientSecret;
@Value("${content.service.security.oauth.authCode:#{null}}")
private String oAuthAuthCode;
@Value("${content.service.security.oauth.authRedirectUri:#{null}}")
private String oAuthAuthRedirectUri;
@Value("${content.service.security.oauth.grantUsername:#{null}}")
private String oAuthUsername;
@Value("${content.service.security.oauth.grantPassword:#{null}}")
private String oAuthPassword;
@Value("${content.service.cxf.defaultBusEnabled:true}")
private boolean defaultBusEnabled;
@Value("${content.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;
}
}

View File

@@ -0,0 +1,44 @@
package com.inteligr8.alfresco.acs;
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 &amp; 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("acs.client.cxf")
@Lazy
public class AcsClientCxfImpl extends ClientCxfImpl {
@Autowired
private AcsClientConfiguration config;
/**
* This constructor is for Spring use.
*/
protected AcsClientCxfImpl() {
}
/**
* This constructor is for POJO use.
* @param config
*/
public AcsClientCxfImpl(AcsClientConfiguration config) {
this.config = config;
}
@Override
protected ClientCxfConfiguration getConfig() {
return this.config;
}
}

View File

@@ -0,0 +1,44 @@
package com.inteligr8.alfresco.acs;
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 &amp; 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("acs.client.jersey")
@Lazy
public class AcsClientJerseyImpl extends ClientJerseyImpl {
@Autowired
private AcsClientConfiguration config;
/**
* This constructor is for Spring use.
*/
protected AcsClientJerseyImpl() {
}
/**
* This constructor is for POJO use.
* @param config
*/
public AcsClientJerseyImpl(AcsClientConfiguration config) {
this.config = config;
}
@Override
protected ClientJerseyConfiguration getConfig() {
return this.config;
}
}

View File

@@ -2,7 +2,6 @@ package com.inteligr8.alfresco.acs;
import com.inteligr8.alfresco.acs.api.ActionsApi;
import com.inteligr8.alfresco.acs.api.ActivitiesApi;
import com.inteligr8.alfresco.acs.api.AspectsApi;
import com.inteligr8.alfresco.acs.api.AuditApi;
import com.inteligr8.alfresco.acs.api.AuthenticationApi;
import com.inteligr8.alfresco.acs.api.CommentsApi;
@@ -23,126 +22,222 @@ import com.inteligr8.alfresco.acs.api.SharedLinksApi;
import com.inteligr8.alfresco.acs.api.SitesApi;
import com.inteligr8.alfresco.acs.api.TagsApi;
import com.inteligr8.alfresco.acs.api.TrashcanApi;
import com.inteligr8.alfresco.acs.api.TypesApi;
import com.inteligr8.alfresco.acs.api.V0Api;
import com.inteligr8.alfresco.acs.api.VersionsApi;
import com.inteligr8.rs.AuthorizationFilter;
import com.inteligr8.rs.Client;
import com.inteligr8.rs.ClientConfiguration;
/**
* This interface consolidates the JAX-RS APIs available in the ACS Public
* ReST API.
* This class serves as the base implementation for the JAX-RS API for the ACS
* Public ReST API.
*
* @author brian@inteligr8.com
*/
public interface AcsPublicRestApi {
public abstract class AcsPublicRestApi {
<T> T getApi(Class<T> apiClass);
abstract ClientConfiguration getConfig();
default ActionsApi getActionsApi() {
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 ActionsApi getActionsApi() {
return this.getApi(ActionsApi.class);
}
default ActivitiesApi getActivitiesApi() {
public ActionsApi getActionsApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, ActionsApi.class);
}
public ActivitiesApi getActivitiesApi() {
return this.getApi(ActivitiesApi.class);
}
default AspectsApi getAspectsApi() {
return this.getApi(AspectsApi.class);
public ActivitiesApi getActivitiesApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, ActivitiesApi.class);
}
default AuditApi getAuditApi() {
public AuditApi getAuditApi() {
return this.getApi(AuditApi.class);
}
default AuthenticationApi getAuthenticationApi() {
public AuditApi getAuditApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, AuditApi.class);
}
public AuthenticationApi getAuthenticationApi() {
return this.getApi(AuthenticationApi.class);
}
default CommentsApi getCommentsApi() {
public AuthenticationApi getAuthenticationApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, AuthenticationApi.class);
}
public CommentsApi getCommentsApi() {
return this.getApi(CommentsApi.class);
}
default DiscoveryApi getDiscoveryApi() {
public CommentsApi getCommentsApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, CommentsApi.class);
}
public DiscoveryApi getDiscoveryApi() {
return this.getApi(DiscoveryApi.class);
}
default DownloadsApi getDownloadsApi() {
public DiscoveryApi getDiscoveryApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, DiscoveryApi.class);
}
public DownloadsApi getDownloadsApi() {
return this.getApi(DownloadsApi.class);
}
default FavoritesApi getFavoritesApi() {
public DownloadsApi getDownloadsApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, DownloadsApi.class);
}
public FavoritesApi getFavoritesApi() {
return this.getApi(FavoritesApi.class);
}
default GroupsApi getGroupsApi() {
public FavoritesApi getFavoritesApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, FavoritesApi.class);
}
public GroupsApi getGroupsApi() {
return this.getApi(GroupsApi.class);
}
default NetworksApi getNetworksApi() {
public GroupsApi getGroupsApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, GroupsApi.class);
}
public NetworksApi getNetworksApi() {
return this.getApi(NetworksApi.class);
}
default NodesApi getNodesApi() {
public NetworksApi getNetworksApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, NetworksApi.class);
}
public NodesApi getNodesApi() {
return this.getApi(NodesApi.class);
}
default PeopleApi getPeopleApi() {
public NodesApi getNodesApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, NodesApi.class);
}
public PeopleApi getPeopleApi() {
return this.getApi(PeopleApi.class);
}
default PreferencesApi getPreferencesApi() {
public PeopleApi getPeopleApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, PeopleApi.class);
}
public PreferencesApi getPreferencesApi() {
return this.getApi(PreferencesApi.class);
}
default ProbesApi getProbesApi() {
public PreferencesApi getPreferencesApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, PreferencesApi.class);
}
public ProbesApi getProbesApi() {
return this.getApi(ProbesApi.class);
}
default QueriesApi getQueriesApi() {
public ProbesApi getProbesApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, ProbesApi.class);
}
public QueriesApi getQueriesApi() {
return this.getApi(QueriesApi.class);
}
default RatingsApi getRatingsApi() {
public QueriesApi getQueriesApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, QueriesApi.class);
}
public RatingsApi getRatingsApi() {
return this.getApi(RatingsApi.class);
}
default RenditionsApi getRenditionsApi() {
public RatingsApi getRatingsApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, RatingsApi.class);
}
public RenditionsApi getRenditionsApi() {
return this.getApi(RenditionsApi.class);
}
default SearchApi getSearchApi() {
public RenditionsApi getRenditionsApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, RenditionsApi.class);
}
public SearchApi getSearchApi() {
return this.getApi(SearchApi.class);
}
default SharedLinksApi getSharedLinksApi() {
public SearchApi getSearchApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, SearchApi.class);
}
public SharedLinksApi getSharedLinksApi() {
return this.getApi(SharedLinksApi.class);
}
default SitesApi getSitesApi() {
public SharedLinksApi getSharedLinksApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, SharedLinksApi.class);
}
public SitesApi getSitesApi() {
return this.getApi(SitesApi.class);
}
default TagsApi getTagsApi() {
public SitesApi getSitesApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, SitesApi.class);
}
public TagsApi getTagsApi() {
return this.getApi(TagsApi.class);
}
default TrashcanApi getTrashcanApi() {
public TagsApi getTagsApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, TagsApi.class);
}
public TrashcanApi getTrashcanApi() {
return this.getApi(TrashcanApi.class);
}
default TypesApi getTypesApi() {
return this.getApi(TypesApi.class);
public TrashcanApi getTrashcanApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, TrashcanApi.class);
}
default VersionsApi getVersionsApi() {
public VersionsApi getVersionsApi() {
return this.getApi(VersionsApi.class);
}
default V0Api getV0Api() {
public VersionsApi getVersionsApi(AuthorizationFilter authFilter) {
return this.getApi(authFilter, VersionsApi.class);
}
public V0Api getV0Api() {
return this.getApi(V0Api.class);
}
default V0Api getLegacyApi() {
return this.getV0Api();
public V0Api getV0Api(AuthorizationFilter authFilter) {
return this.getApi(authFilter, V0Api.class);
}
}

View File

@@ -0,0 +1,56 @@
package com.inteligr8.alfresco.acs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import com.inteligr8.alfresco.acs.api.NodesCxfApi;
import com.inteligr8.rs.AuthorizationFilter;
import com.inteligr8.rs.Client;
import com.inteligr8.rs.ClientConfiguration;
/**
* This class provides the Apache CXF client to the JAX-RS API for the ACS
* Public ReST API. It also provides extension API helpers.
*
* @author brian@inteligr8.com
*/
@Component("acs.api.cxf")
@Lazy
public class AcsPublicRestApiCxfImpl extends AcsPublicRestApi {
@Autowired
private AcsClientCxfImpl client;
/**
* This constructor is for Spring use.
*/
protected AcsPublicRestApiCxfImpl() {
}
/**
* This constructor is for POJO use.
*/
public AcsPublicRestApiCxfImpl(AcsClientCxfImpl client) {
this.client = client;
}
@Override
ClientConfiguration getConfig() {
return this.client.getConfig();
}
@Override
Client getClient() {
return this.client;
}
public NodesCxfApi getNodesExtApi() {
return this.client.getApi(NodesCxfApi.class);
}
public NodesCxfApi getNodesExtApi(AuthorizationFilter authFilter) {
return this.client.getApi(authFilter, NodesCxfApi.class);
}
}

View File

@@ -0,0 +1,56 @@
package com.inteligr8.alfresco.acs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import com.inteligr8.alfresco.acs.api.NodesJerseyApi;
import com.inteligr8.rs.AuthorizationFilter;
import com.inteligr8.rs.Client;
import com.inteligr8.rs.ClientConfiguration;
/**
* This class provides the Jersey client to the JAX-RS API for the ACS Public
* ReST API. It also provides extension API helpers.
*
* @author brian@inteligr8.com
*/
@Component("acs.api.jersey")
@Lazy
public class AcsPublicRestApiJerseyImpl extends AcsPublicRestApi {
@Autowired
private AcsClientJerseyImpl client;
/**
* This constructor is for Spring use.
*/
protected AcsPublicRestApiJerseyImpl() {
}
/**
* This constructor is for POJO use.
*/
public AcsPublicRestApiJerseyImpl(AcsClientJerseyImpl client) {
this.client = client;
}
@Override
ClientConfiguration getConfig() {
return this.client.getConfig();
}
@Override
Client getClient() {
return this.client;
}
public NodesJerseyApi getNodesExtApi() {
return this.client.getApi(NodesJerseyApi.class);
}
public NodesJerseyApi getNodesExtApi(AuthorizationFilter authFilter) {
return this.client.getApi(authFilter, NodesJerseyApi.class);
}
}

View File

@@ -1,18 +0,0 @@
package com.inteligr8.alfresco.acs;
import com.inteligr8.alfresco.acs.api.NodesCxfApi;
/**
* This interface appends Apache CXF implementation specific methods to the
* JAX-RS API of the ACS Public ReST API. This is due to a lack of multi-part
* in the JAX-RS specification.
*
* @author brian@inteligr8.com
*/
public interface AcsPublicRestCxfApi extends AcsPublicRestApi {
default NodesCxfApi getNodesExtApi() {
return this.getApi(NodesCxfApi.class);
}
}

View File

@@ -1,18 +0,0 @@
package com.inteligr8.alfresco.acs;
import com.inteligr8.alfresco.acs.api.NodesJerseyApi;
/**
* This interface appends Jersey implementation specific methods to the
* JAX-RS API of the ACS Public ReST API. This is due to a lack of multi-part
* in the JAX-RS specification.
*
* @author brian@inteligr8.com
*/
public interface AcsPublicRestJerseyApi extends AcsPublicRestApi {
default NodesJerseyApi getNodesExtApi() {
return this.getApi(NodesJerseyApi.class);
}
}

View File

@@ -1,22 +0,0 @@
package com.inteligr8.alfresco.acs;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public class MapUtils {
public static Map<String, String> toStringMap(Map<String, ?> map) {
if (map == null)
return null;
Map<String, String> strmap = new HashMap<>(map.size());
for (Entry<String, ?> element : map.entrySet()) {
String strvalue = element.getValue() == null ? null : element.getValue().toString();
strmap.put(element.getKey(), strvalue);
}
return strmap;
}
}

View File

@@ -0,0 +1,35 @@
package com.inteligr8.alfresco.acs;
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;
}
}
}

View File

@@ -0,0 +1,94 @@
package com.inteligr8.alfresco.acs;
import java.util.List;
import java.util.UUID;
import javax.ws.rs.NotFoundException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIf;
import com.inteligr8.alfresco.acs.api.DiscoveryApi;
import com.inteligr8.alfresco.acs.api.NodesApi;
import com.inteligr8.alfresco.acs.api.V0Api;
import com.inteligr8.alfresco.acs.model.RepositoryInfo;
import com.inteligr8.alfresco.acs.model.v0.ClassInfo;
import com.inteligr8.alfresco.acs.model.v0.MimeTypesData;
import com.inteligr8.alfresco.acs.model.v0.PropertyInfo;
import com.inteligr8.alfresco.acs.model.v0.ServerData;
public abstract class ConnectionClientIT extends ConditionalIT {
public abstract AcsPublicRestApi getClient();
@Test
@EnabledIf("hostExists")
public void testDiscovery() {
DiscoveryApi api = this.getClient().getDiscoveryApi();
RepositoryInfo repoInfo = api.getRepositoryInformation().getEntry().getRepository();
Assertions.assertNotNull(repoInfo);
Assertions.assertFalse(repoInfo.getStatus().isIsReadOnly());
Assertions.assertEquals("6", repoInfo.getVersion().getMajor());
}
@Test
@EnabledIf("hostExists")
public void testMissingNode() {
NodesApi api = this.getClient().getNodesApi();
Assertions.assertThrows(NotFoundException.class, () -> {
api.getNode(UUID.randomUUID().toString(), null, null, null);
});
}
@Test
@EnabledIf("hostExists")
public void testV0ServerInfo() {
V0Api api = this.getClient().getV0Api();
ServerData server = api.getServer();
Assertions.assertNotNull(server);
Assertions.assertNotNull(server.getData());
Assertions.assertNotNull(server.getData().getEdition());
Assertions.assertTrue(server.getData().getEdition().length() > 5);
Assertions.assertTrue(server.getData().getVersion().length() > 5);
Assertions.assertTrue(server.getData().getSchema().length() > 3);
}
@Test
@EnabledIf("hostExists")
public void testV0MimeTypes() {
V0Api api = this.getClient().getV0Api();
MimeTypesData mimeTypes = api.getMimeTypes();
Assertions.assertNotNull(mimeTypes);
Assertions.assertNotNull(mimeTypes.getData());
Assertions.assertTrue(mimeTypes.getData().getMimeTypes().size() > 50);
Assertions.assertNotNull(mimeTypes.getData().getMimeTypeInfo("application/pdf"));
Assertions.assertEquals("pdf", mimeTypes.getData().getMimeTypeInfo("application/pdf").getExtensions().getDefault());
}
@Test
@EnabledIf("hostExists")
public void testV0Classes() {
V0Api api = this.getClient().getV0Api();
List<ClassInfo> classes = api.getClasses(null, null, null);
Assertions.assertNotNull(classes);
Assertions.assertTrue(classes.size() > 50);
}
@Test
@EnabledIf("hostExists")
public void testV0Property() {
V0Api api = this.getClient().getV0Api();
List<PropertyInfo> props = api.getProperties(null, "cm:content", null);
Assertions.assertNotNull(props);
Assertions.assertEquals(1, props.size());
Assertions.assertEquals("d:content", props.iterator().next().getDataType());
}
}

View File

@@ -0,0 +1,28 @@
package com.inteligr8.alfresco.acs;
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 = {AcsClientConfiguration.class, AcsPublicRestApiCxfImpl.class, AcsClientCxfImpl.class})
public class ConnectionCxfClientIT extends ConnectionClientIT {
@Autowired
@Qualifier("acs.api.cxf")
private AcsPublicRestApiCxfImpl client;
@Override
public AcsPublicRestApi getClient() {
return this.client;
}
@Override
public ClientConfiguration getConfiguration() {
return this.client.getConfig();
}
}

View File

@@ -0,0 +1,28 @@
package com.inteligr8.alfresco.acs;
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 = {AcsClientConfiguration.class, AcsPublicRestApiJerseyImpl.class, AcsClientJerseyImpl.class})
public class ConnectionJerseyClientIT extends ConnectionClientIT {
@Autowired
@Qualifier("acs.api.jersey")
private AcsPublicRestApi client;
@Override
public AcsPublicRestApi getClient() {
return this.client;
}
@Override
public ClientConfiguration getConfiguration() {
return this.client.getConfig();
}
}

View File

@@ -0,0 +1,57 @@
package com.inteligr8.alfresco.acs;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.Collections;
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.acs.model.Node;
import com.inteligr8.alfresco.acs.model.NodeBodyCreate;
import com.inteligr8.alfresco.acs.model.NodeBodyCreateMultipartCxf;
import com.inteligr8.rs.ClientConfiguration;
@TestPropertySource(locations = {"/local.properties"})
@SpringJUnitConfig(classes = {AcsClientConfiguration.class, AcsPublicRestApiCxfImpl.class, AcsClientCxfImpl.class})
public class CxfUploadIT extends UploadIT {
@Autowired
@Qualifier("acs.api.cxf")
private AcsPublicRestApiCxfImpl client;
@Override
public AcsPublicRestApi getClient() {
return this.client;
}
@Override
public ClientConfiguration getConfiguration() {
return this.client.getConfig();
}
@Test
@EnabledIf("hostExists")
public void uploadFile() throws IOException {
String folderNodeId = this.getSharedFolder();
NodeBodyCreate nodeBody = new NodeBodyCreate().nodeType("trx:transferReport").name("test-name1.txt")
.properties(Collections.singletonMap("cm:author", "Brian"));
ByteArrayInputStream istream = new ByteArrayInputStream("This is a test".getBytes());
NodeBodyCreateMultipartCxf body = NodeBodyCreateMultipartCxf.from(nodeBody, "test-name2.txt", istream, true, null, null);
Node newNode = this.client.getNodesExtApi().createNode(folderNodeId, body).getEntry();
Assertions.assertNotNull(newNode);
Assertions.assertNotNull(newNode.getId());
Assertions.assertEquals(folderNodeId, newNode.getParentId());
Assertions.assertEquals(nodeBody.getNodeType(), newNode.getNodeType());
Assertions.assertTrue(newNode.getName().startsWith("test-name1"));
}
}

View File

@@ -0,0 +1,58 @@
package com.inteligr8.alfresco.acs;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.text.ParseException;
import java.util.Collections;
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.acs.model.Node;
import com.inteligr8.alfresco.acs.model.NodeBodyCreate;
import com.inteligr8.alfresco.acs.model.NodeBodyCreateMultipartJersey;
import com.inteligr8.rs.ClientConfiguration;
@TestPropertySource(locations = {"/local.properties"})
@SpringJUnitConfig(classes = {AcsClientConfiguration.class, AcsPublicRestApiJerseyImpl.class, AcsClientJerseyImpl.class})
public class JerseyUploadIT extends UploadIT {
@Autowired
@Qualifier("acs.api.jersey")
private AcsPublicRestApiJerseyImpl client;
@Override
public AcsPublicRestApi getClient() {
return this.client;
}
@Override
public ClientConfiguration getConfiguration() {
return this.client.getConfig();
}
@Test
@EnabledIf("hostExists")
public void uploadFile() throws IOException, ParseException {
String folderNodeId = this.getSharedFolder();
NodeBodyCreate nodeBody = new NodeBodyCreate().nodeType("trx:transferReport").name("test-name1.txt")
.properties(Collections.singletonMap("cm:author", "Brian"));
ByteArrayInputStream istream = new ByteArrayInputStream("This is a test".getBytes());
NodeBodyCreateMultipartJersey body = NodeBodyCreateMultipartJersey.from(nodeBody, "test-name2.txt", istream, true, null, null);
Node newNode = this.client.getNodesExtApi().createNode(folderNodeId, body).getEntry();
Assertions.assertNotNull(newNode);
Assertions.assertNotNull(newNode.getId());
Assertions.assertEquals(folderNodeId, newNode.getParentId());
Assertions.assertEquals(nodeBody.getNodeType(), newNode.getNodeType());
Assertions.assertTrue(newNode.getName().startsWith("test-name1"));
}
}

View File

@@ -0,0 +1,26 @@
package com.inteligr8.alfresco.acs;
import com.inteligr8.alfresco.acs.model.RequestQuery;
import com.inteligr8.alfresco.acs.model.RequestQuery.LanguageEnum;
import com.inteligr8.alfresco.acs.model.ResultNode;
import com.inteligr8.alfresco.acs.model.ResultSetPaging;
import com.inteligr8.alfresco.acs.model.SearchRequest;
public abstract class UploadIT extends ConditionalIT {
public abstract AcsPublicRestApi getClient();
public String getSharedFolder() {
RequestQuery query = new RequestQuery();
query.setLanguage(LanguageEnum.AFTS);
query.setQuery("=@cm:name:'Shared'");
SearchRequest searchRequest = new SearchRequest();
searchRequest.setQuery(query);
ResultSetPaging paging = this.getClient().getSearchApi().search(searchRequest);
ResultNode folderNode = paging.getList().getEntries().iterator().next().getEntry();
return folderNode.getId();
}
}

View File

@@ -0,0 +1,5 @@
content.service.baseUrl=http://localhost:8080/alfresco
content.service.security.oauth.tokenUrl=http://auth.example.org:8080/auth/realms/alfresco/protocol/openid-connect/token
content.service.security.oauth.clientId=alfresco
content.service.security.oauth.grantUsername=admin
content.service.security.oauth.grantPassword=admin

View File

@@ -0,0 +1,3 @@
content.service.baseUrl=http://localhost:8080/alfresco
content.service.security.basicAuth.username=admin
content.service.security.basicAuth.password=admin

View File

@@ -0,0 +1,19 @@
rootLogger.level=trace
rootLogger.appenderRef.stdout.ref=STDOUT
logger.spring.name=org.springframework
logger.spring.level=info
logger.common-rest-api.name=com.inteligr8.rs
logger.common-rest-api.level=trace
logger.this.name=com.inteligr8.alfresco.acs
logger.this.level=trace
logger.jaxrslog.name=jaxrs.request
logger.jaxrslog.level=trace
appender.stdout.type=Console
appender.stdout.name=STDOUT
appender.stdout.layout.type=PatternLayout
appender.stdout.layout.pattern=%C [%t] %m%n