Compare commits
29 Commits
v2.0.1
...
v1.1.7-acs
Author | SHA1 | Date | |
---|---|---|---|
dd43fcd0e1 | |||
4f2aab316d | |||
e971cfdaea | |||
ba3aaa97f3 | |||
b1f4399412 | |||
ac59ee7960 | |||
d0afee96da | |||
8f4370a55f | |||
de86a1e01e | |||
e610752bc1 | |||
e07a8f9c0e | |||
7f495b6c76 | |||
41c7bd062b | |||
5d7d2b68ec | |||
ac0622c1e4 | |||
1211f8ad5b | |||
8c2c394e9f | |||
61400ad8c7 | |||
6cc939addb | |||
147a9a4a3e | |||
9f4f0d1c9f | |||
7089fb2bc8 | |||
fa0a7d19ed | |||
11d9038ef1 | |||
29baa2a56a | |||
41379c3970 | |||
3aed4d2e4e | |||
5bcfd265da | |||
0724ee4d5b |
121
pom.xml
121
pom.xml
@@ -4,28 +4,34 @@
|
||||
<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.7</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>
|
||||
|
||||
<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.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-jaxrs</artifactId>
|
||||
@@ -38,26 +44,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>
|
||||
|
||||
@@ -88,9 +132,30 @@
|
||||
<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>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>3.0.0-M5</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.3.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>javadoc</id>
|
||||
@@ -358,10 +423,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 +444,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>
|
||||
|
@@ -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. ```JSON { \"list\": { \"pagination\": { \"count\": 0, \"hasMoreItems\": true, \"totalItems\": 0, \"skipCount\": 0, \"maxItems\": 0 }, \"entries\": [ { \"entry\": { \"associations\": [], \"mandatoryAspects\": [], \"includedInSupertypeQuery\": true, \"description\": \"Titled\", \"isContainer\": false, \"model\": { \"id\": \"cm:contentmodel\", \"author\": \"Alfresco\", \"description\": \"Alfresco Content Domain Model\", \"namespaceUri\": \"http://www.alfresco.org/model/content/1.0\", \"namespacePrefix\": \"cm\" }, \"id\": \"cm:titled\", \"title\": \"Titled\", \"properties\": [ { \"id\": \"cm:title\", \"title\": \"Title\", \"description\": \"Content Title\", \"dataType\": \"d:mltext\", \"isMultiValued\": false, \"isMandatory\": false, \"isMandatoryEnforced\": false, \"isProtected\": false }, { ... } ] } }, { \"entry\": { ... } }, { \"entry\": { ... } }, ] } } ```
|
||||
*
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ public interface AuditApi {
|
||||
/**
|
||||
* Permanently delete audit entries for an audit application
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Permanently delete audit entries for an audit application **auditApplicationId**. The **where** clause must be specified, either with an inclusive time period or for an inclusive range of ids. The delete is within the context of the given audit application. For example: * ```where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')``` * ```where=(id BETWEEN ('1234', '4321')``` You must have admin rights to delete audit information.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Permanently delete audit entries for an audit application **auditApplicationId**. The **where** clause must be specified, either with an inclusive time period or for an inclusive range of ids. The delete is within the context of the given audit application. For example: * ```where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')``` * ```where=(id BETWEEN ('1234', '4321')``` You must have admin rights to delete audit information.
|
||||
*
|
||||
*/
|
||||
@DELETE
|
||||
@@ -68,7 +68,7 @@ public interface AuditApi {
|
||||
/**
|
||||
* Get audit application info
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Get status of an audit application **auditApplicationId**. You must have admin rights to retrieve audit information. You can use the **include** parameter to return the minimum and/or maximum audit record id for the application.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Get status of an audit application **auditApplicationId**. You must have admin rights to retrieve audit information. You can use the **include** parameter to return the minimum and/or maximum audit record id for the application.
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@@ -99,10 +99,10 @@ public interface AuditApi {
|
||||
@ApiOperation(value = "Get audit entry", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successful response", response = AuditEntryEntry.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **auditApplicationId** or **auditEntryId** is not a valid format "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **auditApplicationId** or **auditEntryId** is not a valid format "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "User does not have permission to retrieve audit information"),
|
||||
@ApiResponse(code = 404, message = "**auditApplicationId** or **auditEntryId** does not exist "),
|
||||
@ApiResponse(code = 404, message = "**auditApplicationId** or **auditEntryId** does not exist "),
|
||||
@ApiResponse(code = 501, message = "Audit is disabled for the system"),
|
||||
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
|
||||
public AuditEntryEntry getAuditEntry(@PathParam("auditApplicationId") String auditApplicationId, @PathParam("auditEntryId") String auditEntryId, @QueryParam("fields")List<String> fields);
|
||||
@@ -120,7 +120,7 @@ public interface AuditApi {
|
||||
@ApiOperation(value = "List audit applications", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successful response", response = AuditAppPaging.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: value of **maxItems** or **skipCount** is invalid "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: value of **maxItems** or **skipCount** is invalid "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "User does not have permission to retrieve audit information"),
|
||||
@ApiResponse(code = 501, message = "Audit is disabled for the system"),
|
||||
@@ -130,7 +130,7 @@ public interface AuditApi {
|
||||
/**
|
||||
* List audit entries for an audit application
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for audit application **auditApplicationId**. You can use the **include** parameter to return additional **values** information. The list can be filtered by one or more of: * **createdByUser** person id * **createdAt** inclusive time period * **id** inclusive range of ids * **valuesKey** audit entry values contains the exact matching key * **valuesValue** audit entry values contains the exact matching value The default sort order is **createdAt** ascending, but you can use an optional **ASC** or **DESC** modifier to specify an ascending or descending sort order. For example, specifying ```orderBy=createdAt DESC``` returns audit entries in descending **createdAt** order. You must have admin rights to retrieve audit information.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for audit application **auditApplicationId**. You can use the **include** parameter to return additional **values** information. The list can be filtered by one or more of: * **createdByUser** person id * **createdAt** inclusive time period * **id** inclusive range of ids * **valuesKey** audit entry values contains the exact matching key * **valuesValue** audit entry values contains the exact matching value The default sort order is **createdAt** ascending, but you can use an optional **ASC** or **DESC** modifier to specify an ascending or descending sort order. For example, specifying ```orderBy=createdAt DESC``` returns audit entries in descending **createdAt** order. You must have admin rights to retrieve audit information.
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@@ -140,18 +140,18 @@ public interface AuditApi {
|
||||
@ApiOperation(value = "List audit entries for an audit application", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successful response", response = AuditEntryPaging.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: *auditApplicationId** is not a valid format, value of **maxItems** or **skipCount** is invalid "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: *auditApplicationId** is not a valid format, value of **maxItems** or **skipCount** is invalid "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "User does not have permission to retrieve audit information"),
|
||||
@ApiResponse(code = 404, message = "**applicationId** does not exist "),
|
||||
@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
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for node **nodeId**. The list can be filtered by **createdByUser** and for a given inclusive time period. The default sort order is **createdAt** ascending, but you can use an optional **ASC** or **DESC** modifier to specify an ascending or descending sort order. For example, specifying ```orderBy=createdAt DESC``` returns audit entries in descending **createdAt** order. This relies on the pre-configured 'alfresco-access' audit application.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for node **nodeId**. The list can be filtered by **createdByUser** and for a given inclusive time period. The default sort order is **createdAt** ascending, but you can use an optional **ASC** or **DESC** modifier to specify an ascending or descending sort order. For example, specifying ```orderBy=createdAt DESC``` returns audit entries in descending **createdAt** order. This relies on the pre-configured 'alfresco-access' audit application.
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@@ -161,10 +161,10 @@ public interface AuditApi {
|
||||
@ApiOperation(value = "List audit entries for a node", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successful response", response = AuditEntryPaging.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: *nodeId** is not a valid format, value of **maxItems** or **skipCount** is invalid "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: *nodeId** is not a valid format, value of **maxItems** or **skipCount** is invalid "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "User does not have permission to retrieve audit information"),
|
||||
@ApiResponse(code = 404, message = "**nodeId** does not exist "),
|
||||
@ApiResponse(code = 404, message = "**nodeId** does not exist "),
|
||||
@ApiResponse(code = 501, message = "Audit is disabled for the system"),
|
||||
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
|
||||
public AuditEntryPaging listAuditEntriesForNode(@PathParam("nodeId") String nodeId, @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);
|
||||
@@ -172,7 +172,7 @@ public interface AuditApi {
|
||||
/**
|
||||
* Update audit application info
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Disable or re-enable the audit application **auditApplicationId**. New audit entries will not be created for a disabled audit application until it is re-enabled (and system-wide auditing is also enabled). Note, it is still possible to query &/or delete any existing audit entries even if auditing is disabled for the audit application. You must have admin rights to update audit application.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Disable or re-enable the audit application **auditApplicationId**. New audit entries will not be created for a disabled audit application until it is re-enabled (and system-wide auditing is also enabled). Note, it is still possible to query &/or delete any existing audit entries even if auditing is disabled for the audit application. You must have admin rights to update audit application.
|
||||
*
|
||||
*/
|
||||
@PUT
|
||||
|
@@ -24,7 +24,7 @@ public interface CommentsApi {
|
||||
/**
|
||||
* Create a comment
|
||||
*
|
||||
* Creates a comment on node **nodeId**. You specify the comment in a JSON body like this: ```JSON { \"content\": \"This is a comment\" } ``` **Note:** You can create more than one comment by specifying a list of comments in the JSON body like this: ```JSON [ { \"content\": \"This is a comment\" }, { \"content\": \"This is another comment\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
* Creates a comment on node **nodeId**. You specify the comment in a JSON body like this: ```JSON { \"content\": \"This is a comment\" } ``` **Note:** You can create more than one comment by specifying a list of comments in the JSON body like this: ```JSON [ { \"content\": \"This is a comment\" }, { \"content\": \"This is another comment\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@@ -76,7 +76,7 @@ public interface CommentsApi {
|
||||
@ApiOperation(value = "List comments", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successful response", response = CommentPaging.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** exists but does not identify a file or a folder, or the value of **maxItems** is invalid, or the value of **skipCount** is invalid "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** exists but does not identify a file or a folder, or the value of **maxItems** is invalid, or the value of **skipCount** is invalid "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "User does not have permission read comments on the node"),
|
||||
@ApiResponse(code = 404, message = "**nodeId** does not exist "),
|
||||
|
@@ -23,7 +23,7 @@ public interface DownloadsApi {
|
||||
/**
|
||||
* Cancel a download
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Cancels the creation of a download request. **Note:** The download node can be deleted using the **DELETE /nodes/{downloadId}** endpoint By default, if the download node is not deleted it will be picked up by a cleaner job which removes download nodes older than a configurable amount of time (default is 1 hour) Information about the existing progress at the time of cancelling can be retrieved by calling the **GET /downloads/{downloadId}** endpoint The cancel operation is done asynchronously.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Cancels the creation of a download request. **Note:** The download node can be deleted using the **DELETE /nodes/{downloadId}** endpoint By default, if the download node is not deleted it will be picked up by a cleaner job which removes download nodes older than a configurable amount of time (default is 1 hour) Information about the existing progress at the time of cancelling can be retrieved by calling the **GET /downloads/{downloadId}** endpoint The cancel operation is done asynchronously.
|
||||
*
|
||||
*/
|
||||
@DELETE
|
||||
@@ -42,7 +42,7 @@ public interface DownloadsApi {
|
||||
/**
|
||||
* Create a new download
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Creates a new download node asynchronously, the content of which will be the zipped content of the **nodeIds** specified in the JSON body like this: ```JSON { \"nodeIds\": [ \"c8bb482a-ff3c-4704-a3a3-de1c83ccd84c\", \"cffa62db-aa01-493d-9594-058bc058eeb1\" ] } ``` **Note:** The content of the download node can be obtained using the **GET /nodes/{downloadId}/content** endpoint
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Creates a new download node asynchronously, the content of which will be the zipped content of the **nodeIds** specified in the JSON body like this: ```JSON { \"nodeIds\": [ \"c8bb482a-ff3c-4704-a3a3-de1c83ccd84c\", \"cffa62db-aa01-493d-9594-058bc058eeb1\" ] } ``` **Note:** The content of the download node can be obtained using the **GET /nodes/{downloadId}/content** endpoint
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
|
@@ -28,7 +28,7 @@ public interface FavoritesApi {
|
||||
/**
|
||||
* Create a favorite
|
||||
*
|
||||
* Favorite a **site**, **file**, or **folder** in the repository. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. **Note:** You can favorite more than one entity by specifying a list of objects in the JSON body like this: ```JSON [ { \"target\": { \"file\": { \"guid\": \"abcde-01234-....\" } } }, { \"target\": { \"file\": { \"guid\": \"abcde-09863-....\" } } }, ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
* Favorite a **site**, **file**, or **folder** in the repository. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. **Note:** You can favorite more than one entity by specifying a list of objects in the JSON body like this: ```JSON [ { \"target\": { \"file\": { \"guid\": \"abcde-01234-....\" } } }, { \"target\": { \"file\": { \"guid\": \"abcde-09863-....\" } } }, ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@@ -48,7 +48,7 @@ public interface FavoritesApi {
|
||||
/**
|
||||
* Create a site favorite
|
||||
*
|
||||
* **Note:** this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use `/people/{personId}/favorites` instead. Create a site favorite for person **personId**. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. **Note:** You can favorite more than one site by specifying a list of sites in the JSON body like this: ```JSON [ { \"id\": \"test-site-1\" }, { \"id\": \"test-site-2\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
* **Note:** this endpoint is deprecated as of Alfresco 4.2, and will be removed in the future. Use `/people/{personId}/favorites` instead. Create a site favorite for person **personId**. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. **Note:** You can favorite more than one site by specifying a list of sites in the JSON body like this: ```JSON [ { \"id\": \"test-site-1\" }, { \"id\": \"test-site-2\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
|
@@ -28,7 +28,7 @@ public interface GroupsApi {
|
||||
/**
|
||||
* Create a group
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Create a group. The group id must start with \"GROUP\\_\". If this is omitted it will be added automatically. This format is also returned when listing groups or group memberships. It should be noted that the other group-related operations also expect the id to start with \"GROUP\\_\". If one or more parentIds are specified then the group will be created and become a member of each of the specified parent groups. If no parentIds are specified then the group will be created as a root group. The group will be created in the **APP.DEFAULT** and **AUTH.ALF** zones. You must have admin rights to create a group.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Create a group. The group id must start with \"GROUP\\_\". If this is omitted it will be added automatically. This format is also returned when listing groups or group memberships. It should be noted that the other group-related operations also expect the id to start with \"GROUP\\_\". If one or more parentIds are specified then the group will be created and become a member of each of the specified parent groups. If no parentIds are specified then the group will be created as a root group. The group will be created in the **APP.DEFAULT** and **AUTH.ALF** zones. You must have admin rights to create a group.
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@@ -70,7 +70,7 @@ public interface GroupsApi {
|
||||
/**
|
||||
* Delete a group
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Delete group **groupId**. The option to cascade delete applies this recursively to any hierarchy of group members. In this case, removing a group member does not delete the person or sub-group itself. If a removed sub-group no longer has any parent groups then it becomes a root group. You must have admin rights to delete a group.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Delete group **groupId**. The option to cascade delete applies this recursively to any hierarchy of group members. In this case, removing a group member does not delete the person or sub-group itself. If a removed sub-group no longer has any parent groups then it becomes a root group. You must have admin rights to delete a group.
|
||||
*
|
||||
*/
|
||||
@DELETE
|
||||
@@ -151,7 +151,7 @@ public interface GroupsApi {
|
||||
/**
|
||||
* List group memberships
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. Gets a list of group membership information for person **personId**. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. 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: ``` (isRoot=true) ``` 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 `MY.ZONE` zone. ``` where=(zones in ('MY.ZONE')) ``` This may be combined with the isRoot filter, as shown below: ``` where=(isRoot=false AND zones in ('MY.ZONE')) ``` ***Note:*** restrictions include * `AND` is the only supported operator when combining `isRoot` and `zones` 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 or more 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 group membership information for person **personId**. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. 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: ``` (isRoot=true) ``` 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 `MY.ZONE` zone. ``` where=(zones in ('MY.ZONE')) ``` This may be combined with the isRoot filter, as shown below: ``` where=(isRoot=false AND zones in ('MY.ZONE')) ``` ***Note:*** restrictions include * `AND` is the only supported operator when combining `isRoot` and `zones` 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 or more of the following fields in the **orderBy** parameter: * id * displayName
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@@ -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: ``` (isRoot=true) ``` 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 `MY.ZONE` zone. ``` where=(zones in ('MY.ZONE')) ``` This may be combined with the isRoot filter, as shown below: ``` where=(isRoot=false AND zones in ('MY.ZONE')) ``` The following where clause will only return groups with displayName `MY.GROUP.NAME`. ``` where=(displayName in ('MY.GROUP.NAME')) ``` This may be combined with the isRoot and zones filter, as shown below: ``` where=(isRoot=false AND displayName in ('MY.GROUP.NAME')) ``` ``` where=(zones in ('MY.ZONE') AND displayName in ('MY.GROUP.NAME')) ``` ``` where=(isRoot=false AND zones in ('MY.ZONE') AND displayName in ('MY.GROUP.NAME')) ``` ***Note:*** restrictions include * `AND` is the only supported operator when combining `isRoot`, `zones` and `displayName` 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: ``` (isRoot=true) ``` 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 `MY.ZONE` zone. ``` where=(zones in ('MY.ZONE')) ``` This may be combined with the isRoot filter, as shown below: ``` where=(isRoot=false AND zones in ('MY.ZONE')) ``` ***Note:*** restrictions include * `AND` is the only supported operator when combining `isRoot` and `zones` 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
@@ -69,7 +69,7 @@ public interface PeopleApi {
|
||||
/**
|
||||
* Get avatar image
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Gets the avatar image related to the person **personId**. If the person has no related avatar then the **placeholder** query parameter can be optionally used to request a placeholder image to be returned. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Gets the avatar image related to the person **personId**. If the person has no related avatar then the **placeholder** query parameter can be optionally used to request a placeholder image to be returned. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@@ -157,7 +157,7 @@ public interface PeopleApi {
|
||||
/**
|
||||
* Update avatar image
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Updates the avatar image related to the person **personId**. The request body should be the binary stream for the avatar image. The content type of the file should be an image file. This will be used to generate an \"avatar\" thumbnail rendition. You must be the person or have admin rights to update a person's avatar. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2.2 and newer versions. Updates the avatar image related to the person **personId**. The request body should be the binary stream for the avatar image. The content type of the file should be an image file. This will be used to generate an \"avatar\" thumbnail rendition. You must be the person or have admin rights to update a person's avatar. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user.
|
||||
*
|
||||
*/
|
||||
@PUT
|
||||
|
@@ -42,7 +42,7 @@ public interface PreferencesApi {
|
||||
/**
|
||||
* List preferences
|
||||
*
|
||||
* Gets a list of preferences for person **personId**. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. Note that each preference consists of an **id** and a **value**. The **value** can be of any JSON type.
|
||||
* Gets a list of preferences for person **personId**. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. Note that each preference consists of an **id** and a **value**. The **value** can be of any JSON type.
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
|
@@ -43,7 +43,7 @@ public interface QueriesApi {
|
||||
/**
|
||||
* Find people
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of people that match the given search criteria. The search term is used to look for matches against person id, firstname and lastname. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term You can sort the result list using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter: * id * firstName * lastName
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of people that match the given search criteria. The search term is used to look for matches against person id, firstname and lastname. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term You can sort the result list using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter: * id * firstName * lastName
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@@ -61,7 +61,7 @@ public interface QueriesApi {
|
||||
/**
|
||||
* Find sites
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of sites that match the given search criteria. The search term is used to look for sites that match against site id, title or description. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term The default sort order for the returned list is for sites to be sorted by ascending id. You can override the default by using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter: * id * title * description
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of sites that match the given search criteria. The search term is used to look for sites that match against site id, title or description. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term The default sort order for the returned list is for sites to be sorted by ascending id. You can override the default by using the **orderBy** parameter. You can specify one or more of the following fields in the **orderBy** parameter: * id * title * description
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
|
@@ -91,7 +91,7 @@ public interface RenditionsApi {
|
||||
/**
|
||||
* List renditions
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for each rendition of the the file **nodeId**, 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: ``` (status='CREATED') ```
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for each rendition of the the file **nodeId**, 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: ``` (status='CREATED') ```
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
|
File diff suppressed because one or more lines are too long
@@ -29,7 +29,7 @@ public interface SharedLinksApi {
|
||||
/**
|
||||
* Create a shared link to a file
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Create a shared link to the file **nodeId** in the request body. Also, an optional expiry date could be set, so the shared link would become invalid when the expiry date is reached. For example: ```JSON { \"nodeId\": \"1ff9da1a-ee2f-4b9c-8c34-3333333333\", \"expiresAt\": \"2017-03-23T23:00:00.000+0000\" } ``` **Note:** You can create shared links to more than one file specifying a list of **nodeId**s in the JSON body like this: ```JSON [ { \"nodeId\": \"1ff9da1a-ee2f-4b9c-8c34-4444444444\" }, { \"nodeId\": \"1ff9da1a-ee2f-4b9c-8c34-5555555555\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Create a shared link to the file **nodeId** in the request body. Also, an optional expiry date could be set, so the shared link would become invalid when the expiry date is reached. For example: ```JSON { \"nodeId\": \"1ff9da1a-ee2f-4b9c-8c34-3333333333\", \"expiresAt\": \"2017-03-23T23:00:00.000+0000\" } ``` **Note:** You can create shared links to more than one file specifying a list of **nodeId**s in the JSON body like this: ```JSON [ { \"nodeId\": \"1ff9da1a-ee2f-4b9c-8c34-4444444444\" }, { \"nodeId\": \"1ff9da1a-ee2f-4b9c-8c34-5555555555\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@@ -133,7 +133,7 @@ public interface SharedLinksApi {
|
||||
/**
|
||||
* Get shared link rendition information
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets rendition information for the file with shared link identifier **sharedId**. This API method returns rendition information where the rendition status is CREATED, which means the rendition is available to view/download. **Note:** No authentication is required to call this endpoint.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets rendition information for the file with shared link identifier **sharedId**. This API method returns rendition information where the rendition status is CREATED, which means the rendition is available to view/download. **Note:** No authentication is required to call this endpoint.
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@@ -174,7 +174,7 @@ public interface SharedLinksApi {
|
||||
/**
|
||||
* List renditions for a shared link
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for the file with shared link identifier **sharedId**. This API method returns rendition information, including the rendition id, for each rendition where the rendition status is CREATED, which means the rendition is available to view/download. **Note:** No authentication is required to call this endpoint.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of the rendition information for the file with shared link identifier **sharedId**. This API method returns rendition information, including the rendition id, for each rendition where the rendition status is CREATED, which means the rendition is available to view/download. **Note:** No authentication is required to call this endpoint.
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@@ -203,7 +203,7 @@ public interface SharedLinksApi {
|
||||
@ApiOperation(value = "List shared links", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successful response", response = SharedLinkPaging.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: value of **maxItems** or **skipCount** is invalid "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: value of **maxItems** or **skipCount** is invalid "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 501, message = "Shared links are disabled for the system"),
|
||||
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
|
||||
|
@@ -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;
|
||||
@@ -63,7 +61,7 @@ public interface SitesApi {
|
||||
/**
|
||||
* Create a site
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Creates a default site with the given details. Unless explicitly specified, the site id will be generated from the site title. The site id must be unique and only contain alphanumeric and/or dash characters. Note: the id of a site cannot be updated once the site has been created. For example, to create a public site called \"Marketing\" the following body could be used: ```JSON { \"title\": \"Marketing\", \"visibility\": \"PUBLIC\" } ``` The creation of the (surf) configuration files required by Share can be skipped via the **skipConfiguration** query parameter. **Note:** if skipped then such a site will **not** work within Share. The addition of the site to the user's site favorites can be skipped via the **skipAddToFavorites** query parameter. The creator will be added as a member with Site Manager role. When you create a site, a container called **documentLibrary** is created for you in the new site. This container is the root folder for content stored in the site.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Creates a default site with the given details. Unless explicitly specified, the site id will be generated from the site title. The site id must be unique and only contain alphanumeric and/or dash characters. Note: the id of a site cannot be updated once the site has been created. For example, to create a public site called \"Marketing\" the following body could be used: ```JSON { \"title\": \"Marketing\", \"visibility\": \"PUBLIC\" } ``` The creation of the (surf) configuration files required by Share can be skipped via the **skipConfiguration** query parameter. **Note:** if skipped then such a site will **not** work within Share. The addition of the site to the user's site favorites can be skipped via the **skipAddToFavorites** query parameter. The creator will be added as a member with Site Manager role. When you create a site, a container called **documentLibrary** is created for you in the new site. This container is the root folder for content stored in the site.
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@@ -73,37 +71,16 @@ public interface SitesApi {
|
||||
@ApiOperation(value = "Create a site", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 201, message = "Successful response", response = SiteEntry.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **id**, **title**, or **description** exceed the maximum length; or **id** contains invalid characters; or **siteBodyCreate** invalid "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **id**, **title**, or **description** exceed the maximum length; or **id** contains invalid characters; or **siteBodyCreate** invalid "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 409, message = "Site with the given identifier already exists"),
|
||||
@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: ```JSON [ { \"role\": \"SiteConsumer\", \"id\": \"authorityId\" }, { \"role\": \"SiteConsumer\", \"id\": \"authorityId\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
*
|
||||
*/
|
||||
@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
|
||||
*
|
||||
* Creates a site membership for person **personId** 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 people in the JSON body like this: ```JSON [ { \"role\": \"SiteConsumer\", \"id\": \"joe\" }, { \"role\": \"SiteConsumer\", \"id\": \"fred\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
* Creates a site membership for person **personId** 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 people in the JSON body like this: ```JSON [ { \"role\": \"SiteConsumer\", \"id\": \"joe\" }, { \"role\": \"SiteConsumer\", \"id\": \"fred\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@@ -124,7 +101,7 @@ public interface SitesApi {
|
||||
/**
|
||||
* Create a site membership request
|
||||
*
|
||||
* Create a site membership request for yourself on the site with the identifier of **id**, specified in the JSON body. The result of the request differs depending on the type of site. * For a **public** site, you join the site immediately as a SiteConsumer. * For a **moderated** site, your request is added to the site membership request list. The request waits for approval from the Site Manager. * You cannot request membership of a **private** site. Members are invited by the site administrator. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. **Note:** You can create site membership requests for more than one site by specifying a list of sites in the JSON body like this: ```JSON [ { \"message\": \"Please can you add me\", \"id\": \"test-site-1\", \"title\": \"Request for test site 1\", }, { \"message\": \"Please can you add me\", \"id\": \"test-site-2\", \"title\": \"Request for test site 2\", } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
* Create a site membership request for yourself on the site with the identifier of **id**, specified in the JSON body. The result of the request differs depending on the type of site. * For a **public** site, you join the site immediately as a SiteConsumer. * For a **moderated** site, your request is added to the site membership request list. The request waits for approval from the Site Manager. * You cannot request membership of a **private** site. Members are invited by the site administrator. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. **Note:** You can create site membership requests for more than one site by specifying a list of sites in the JSON body like this: ```JSON [ { \"message\": \"Please can you add me\", \"id\": \"test-site-1\", \"title\": \"Request for test site 1\", }, { \"message\": \"Please can you add me\", \"id\": \"test-site-2\", \"title\": \"Request for test site 2\", } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@@ -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
|
||||
@@ -496,7 +417,7 @@ public interface SitesApi {
|
||||
/**
|
||||
* Update a site
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Update the details for the given site **siteId**. Site Manager or otherwise a (site) admin can update title, description or visibility. Note: the id of a site cannot be updated once the site has been created.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Update the details for the given site **siteId**. Site Manager or otherwise a (site) admin can update title, description or visibility. Note: the id of a site cannot be updated once the site has been created.
|
||||
*
|
||||
*/
|
||||
@PUT
|
||||
@@ -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
|
||||
*
|
||||
|
@@ -24,7 +24,7 @@ public interface TagsApi {
|
||||
/**
|
||||
* Create a tag for a node
|
||||
*
|
||||
* Creates a tag on the node **nodeId**. You specify the tag in a JSON body like this: ```JSON { \"tag\":\"test-tag-1\" } ``` **Note:** You can create more than one tag by specifying a list of tags in the JSON body like this: ```JSON [ { \"tag\":\"test-tag-1\" }, { \"tag\":\"test-tag-2\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
* Creates a tag on the node **nodeId**. You specify the tag in a JSON body like this: ```JSON { \"tag\":\"test-tag-1\" } ``` **Note:** You can create more than one tag by specifying a list of tags in the JSON body like this: ```JSON [ { \"tag\":\"test-tag-1\" }, { \"tag\":\"test-tag-2\" } ] ``` If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example: ```JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ```
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@@ -37,7 +37,7 @@ public interface TagsApi {
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **tagBodyCreate** is invalid "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "User does not have permission to create tags on the node"),
|
||||
@ApiResponse(code = 404, message = "**nodeId** does not exist "),
|
||||
@ApiResponse(code = 404, message = "**nodeId** does not exist "),
|
||||
@ApiResponse(code = 405, message = "Cannot tag a node of this type"),
|
||||
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
|
||||
public TagEntry createTagForNode(@PathParam("nodeId") String nodeId, TagBody tagBodyCreate, @QueryParam("fields")List<String> fields);
|
||||
|
@@ -39,7 +39,7 @@ public interface TrashcanApi {
|
||||
@ApiOperation(value = "Permanently delete a deleted node", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 204, message = "Successful response"),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "User does not have permission to permanently delete the deleted node"),
|
||||
@ApiResponse(code = 404, message = "**nodeId** does not exist "),
|
||||
@@ -173,7 +173,7 @@ public interface TrashcanApi {
|
||||
/**
|
||||
* Restore a deleted node
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Attempts to restore the deleted node **nodeId** to its original location or to a new location. If the node is successfully restored to its former primary parent, then only the primary child association will be restored, including recursively for any primary children. It should be noted that no other secondary child associations or peer associations will be restored, for any of the nodes within the primary parent-child hierarchy of restored nodes, irrespective of whether these associations were to nodes within or outside of the restored hierarchy. Also, any previously shared link will not be restored since it is deleted at the time of delete of each node.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Attempts to restore the deleted node **nodeId** to its original location or to a new location. If the node is successfully restored to its former primary parent, then only the primary child association will be restored, including recursively for any primary children. It should be noted that no other secondary child associations or peer associations will be restored, for any of the nodes within the primary parent-child hierarchy of restored nodes, irrespective of whether these associations were to nodes within or outside of the restored hierarchy. Also, any previously shared link will not be restored since it is deleted at the time of delete of each node.
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@@ -183,7 +183,7 @@ public interface TrashcanApi {
|
||||
@ApiOperation(value = "Restore a deleted node", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successful response", response = NodeEntry.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** or **targetNodeId** is not a valid format "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** or **targetNodeId** is not a valid format "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "User does not have permission to restore the deleted node or user does not have permission to the target node"),
|
||||
@ApiResponse(code = 404, message = "**nodeId** does not exist or the restore destination parent node does not exists "),
|
||||
|
@@ -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. ```JSON { \"list\": { \"pagination\": { \"count\": 0, \"hasMoreItems\": true, \"totalItems\": 0, \"skipCount\": 0, \"maxItems\": 0 }, \"entries\": [ { \"entry\": { \"associations\": [], \"isArchive\": true, \"mandatoryAspects\": [ \"cm:auditable\", \"sys:referenceable\", \"sys:localized\" ], \"includedInSupertypeQuery\": true, \"description\": \"Base Content Object\", \"isContainer\": false, \"model\": { \"id\": \"cm:contentmodel\", \"author\": \"Alfresco\", \"description\": \"Alfresco Content Domain Model\", \"namespaceUri\": \"http://www.alfresco.org/model/content/1.0\", \"namespacePrefix\": \"cm\" }, \"id\": \"cm:content\", \"title\": \"Content\", \"parentId\": \"cm:cmobject\" \"properties\": [ { \"id\": \"cm:name\", \"title\": \"Name\", \"description\": \"Name\", \"dataType\": \"d:text\", \"isMultiValued\": false, \"isMandatory\": true, \"isMandatoryEnforced\": true \"isProtected\": false ... }, { ... } ] } }, { \"entry\": { ... } }, { \"entry\": { ... } }, ] } } ```
|
||||
*
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
@@ -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,32 +23,10 @@ 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: ```JSON { \"id\":\"doclib\" } ``` Multiple names may be specified as a comma separated list or using a list format: ```JSON [ { \"id\": \"doclib\" }, { \"id\": \"avatar\" } ] ```
|
||||
*
|
||||
*/
|
||||
@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
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Delete the version identified by **versionId** and **nodeId*. If the version is successfully deleted then the content and metadata for that versioned node will be deleted and will no longer appear in the version history. This operation cannot be undone. If the most recent version is deleted the live node will revert to the next most recent version. We currently do not allow the last version to be deleted. If you wish to clear the history then you can remove the \"cm:versionable\" aspect (via update node) which will also disable versioning. In this case, you can re-enable versioning by adding back the \"cm:versionable\" aspect or using the version params (majorVersion and comment) on a subsequent file content update.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Delete the version identified by **versionId** and **nodeId*. If the version is successfully deleted then the content and metadata for that versioned node will be deleted and will no longer appear in the version history. This operation cannot be undone. If the most recent version is deleted the live node will revert to the next most recent version. We currently do not allow the last version to be deleted. If you wish to clear the history then you can remove the \"cm:versionable\" aspect (via update node) which will also disable versioning. In this case, you can re-enable versioning by adding back the \"cm:versionable\" aspect or using the version params (majorVersion and comment) on a subsequent file content update.
|
||||
*
|
||||
*/
|
||||
@DELETE
|
||||
@@ -61,7 +36,7 @@ public interface VersionsApi {
|
||||
@ApiOperation(value = "Delete a version", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 204, message = "Successful response"),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format, or exists but does not identify a file, or **versionId** is invalid "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format, or exists but does not identify a file, or **versionId** is invalid "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "Current user does not have permission to delete the versioned node"),
|
||||
@ApiResponse(code = 404, message = "**nodeId** or **versionId** does not exist "),
|
||||
@@ -112,53 +87,10 @@ 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
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets the version history as an ordered list of versions for the specified **nodeId**. The list is ordered in descending modified order. So the most recent version is first and the original version is last in the list.
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets the version history as an ordered list of versions for the specified **nodeId**. The list is ordered in descending modified order. So the most recent version is first and the original version is last in the list.
|
||||
*
|
||||
*/
|
||||
@GET
|
||||
@@ -168,33 +100,13 @@ public interface VersionsApi {
|
||||
@ApiOperation(value = "List version history", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successful response", response = VersionPaging.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "Current user does not have permission for **nodeId**"),
|
||||
@ApiResponse(code = 404, message = "Target **nodeId** does not exist"),
|
||||
@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: ``` (status='CREATED') ```
|
||||
*
|
||||
*/
|
||||
@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
|
||||
*
|
||||
@@ -208,7 +120,7 @@ public interface VersionsApi {
|
||||
@ApiOperation(value = "Revert a version", tags={ })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successful response", response = VersionEntry.class),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format, or it exists but does not identify a file, or **versionId** is invalid, or **revertBody** invalid "),
|
||||
@ApiResponse(code = 400, message = "Invalid parameter: **nodeId** is not a valid format, or it exists but does not identify a file, or **versionId** is invalid, or **revertBody** invalid "),
|
||||
@ApiResponse(code = 401, message = "Authentication failed"),
|
||||
@ApiResponse(code = 403, message = "Current user does not have permission to revert the versioned node"),
|
||||
@ApiResponse(code = 404, message = "**nodeId** or **versionId** does not exist "),
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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");
|
||||
|
@@ -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
|
||||
|
@@ -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")
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -17,9 +17,9 @@ public class SharedLink {
|
||||
@ApiModelProperty(value = "")
|
||||
private String nodeId = null;
|
||||
|
||||
@ApiModelProperty(value = "The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name. ")
|
||||
@ApiModelProperty(value = "The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name. ")
|
||||
/**
|
||||
* The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name.
|
||||
* The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name.
|
||||
**/
|
||||
private String name = null;
|
||||
|
||||
@@ -64,9 +64,6 @@ public class SharedLink {
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private List<String> aspectNames = null;
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
private PathInfo path = null;
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
@@ -122,7 +119,7 @@ public class SharedLink {
|
||||
}
|
||||
|
||||
/**
|
||||
* The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name.
|
||||
* The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name.
|
||||
* @return name
|
||||
**/
|
||||
@JsonProperty("name")
|
||||
@@ -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();
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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 \"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.
|
||||
* @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();
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -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 ");
|
||||
}
|
||||
}
|
||||
|
@@ -14,9 +14,9 @@ public class Version {
|
||||
@ApiModelProperty(value = "")
|
||||
private String versionComment = null;
|
||||
|
||||
@ApiModelProperty(required = true, value = "The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name. ")
|
||||
@ApiModelProperty(required = true, value = "The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name. ")
|
||||
/**
|
||||
* The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name.
|
||||
* The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name.
|
||||
**/
|
||||
private String name = null;
|
||||
|
||||
@@ -80,7 +80,7 @@ public class Version {
|
||||
}
|
||||
|
||||
/**
|
||||
* The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name.
|
||||
* The name must not contain spaces or the following special characters: * \" < > \\ / ? : and |. The character . must not be used at the end of the name.
|
||||
* @return name
|
||||
**/
|
||||
@JsonProperty("name")
|
||||
|
@@ -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 & 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;
|
||||
}
|
||||
|
||||
}
|
@@ -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 & 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;
|
||||
}
|
||||
|
||||
}
|
@@ -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 & 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;
|
||||
}
|
||||
|
||||
}
|
@@ -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);
|
||||
}
|
||||
|
||||
public AuditApi getAuditApi(AuthorizationFilter authFilter) {
|
||||
return this.getApi(authFilter, AuditApi.class);
|
||||
}
|
||||
|
||||
default AuthenticationApi getAuthenticationApi() {
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
}
|
@@ -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);
|
||||
}
|
||||
|
||||
}
|
@@ -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);
|
||||
}
|
||||
|
||||
}
|
@@ -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);
|
||||
}
|
||||
|
||||
}
|
@@ -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;
|
||||
}
|
||||
|
||||
}
|
@@ -1,29 +1,28 @@
|
||||
package com.inteligr8.alfresco.acs.model;
|
||||
package com.inteligr8.alfresco.acs.api;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.ContentDisposition;
|
||||
import org.apache.cxf.jaxrs.ext.multipart.MultipartBody;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.inteligr8.alfresco.acs.model.NodeBodyCreate;
|
||||
|
||||
public class NodeBodyCreateMultipartCxf extends MultipartBody {
|
||||
public class NodeBodyCreateMultipart extends MultipartBody {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(NodeBodyCreateMultipartCxf.class);
|
||||
private static final ObjectMapper om = new ObjectMapper();
|
||||
|
||||
public static NodeBodyCreateMultipartCxf from(
|
||||
public static NodeBodyCreateMultipart from(
|
||||
NodeBodyCreate nodeBody, String filename, InputStream istream,
|
||||
Boolean autoRename, Boolean majorVersion, Boolean versioningEnabled) throws IOException {
|
||||
List<Attachment> atts = new LinkedList<>();
|
||||
@@ -35,14 +34,14 @@ public class NodeBodyCreateMultipartCxf extends MultipartBody {
|
||||
if (versioningEnabled != null)
|
||||
atts.add(toAttachment("versioningEnabled", String.valueOf(versioningEnabled)));
|
||||
atts.add(toAttachment(filename, istream));
|
||||
return new NodeBodyCreateMultipartCxf(atts, true);
|
||||
return new NodeBodyCreateMultipart(atts, true);
|
||||
}
|
||||
|
||||
public NodeBodyCreateMultipartCxf(List<Attachment> atts) throws IOException {
|
||||
public NodeBodyCreateMultipart(List<Attachment> atts) throws IOException {
|
||||
super(atts);
|
||||
}
|
||||
|
||||
public NodeBodyCreateMultipartCxf(List<Attachment> atts, boolean outbound) throws IOException {
|
||||
public NodeBodyCreateMultipart(List<Attachment> atts, boolean outbound) throws IOException {
|
||||
super(atts, outbound);
|
||||
}
|
||||
|
||||
@@ -64,35 +63,37 @@ public class NodeBodyCreateMultipartCxf extends MultipartBody {
|
||||
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static List<Attachment> toAttachments(NodeBodyCreate nodeBody) throws IOException {
|
||||
List<Attachment> atts = new LinkedList<>();
|
||||
atts.add(toAttachment("name", nodeBody.getName()));
|
||||
atts.add(toAttachment("nodeType", nodeBody.getNodeType()));
|
||||
if (nodeBody.getAspectNames() != null && !nodeBody.getAspectNames().isEmpty())
|
||||
logger.warn("The ACS Public REST API does not support the explicit inclusion of aspects while creating content");
|
||||
if (nodeBody.getProperties() != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> props = (Map<String, Object>)nodeBody.getProperties();
|
||||
for (Entry<String, Object> prop : props.entrySet()) {
|
||||
if (prop.getValue() != null) {
|
||||
// FIXME convert dates as ACS would expect them to be formatted
|
||||
atts.add(toAttachment(prop.getKey(), prop.getValue().toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nodeBody.getAspectNames() != null)
|
||||
atts.add(toAttachment("aspectNames", nodeBody.getAspectNames()));
|
||||
if (nodeBody.getProperties() != null)
|
||||
atts.add(toAttachment("properties", (Map<String, Object>)nodeBody.getProperties()));
|
||||
return atts;
|
||||
}
|
||||
|
||||
private static Attachment toAttachment(String name, String value) {
|
||||
return new Attachment(name, new ByteArrayInputStream(value.getBytes()), new ContentDisposition("form-data; name=\"" + name + "\""));
|
||||
}
|
||||
|
||||
private static Attachment toAttachment(String name, Collection<String> c) throws JsonProcessingException {
|
||||
return toJsonAttachment(name, c);
|
||||
}
|
||||
|
||||
private static Attachment toAttachment(String name, Map<String, Object> map) throws JsonProcessingException {
|
||||
return toJsonAttachment(name, map);
|
||||
}
|
||||
|
||||
private static Attachment toJsonAttachment(String name, Object obj) throws JsonProcessingException {
|
||||
String json = om.writeValueAsString(obj);
|
||||
return new Attachment(name, new ByteArrayInputStream(json.getBytes()), new ContentDisposition("form-data; name=\"" + name + "\""));
|
||||
}
|
||||
|
||||
private static Attachment toAttachment(String filename, InputStream istream) {
|
||||
if (filename == null) {
|
||||
return new Attachment("filedata", istream, new ContentDisposition("form-data; name=\"filedata\""));
|
||||
} else {
|
||||
return new Attachment("filedata", istream, new ContentDisposition("form-data; name=\"filedata\"; filename=\"" + filename + "\""));
|
||||
}
|
||||
return new Attachment("filedata", istream, new ContentDisposition("form-data; name=\"filedata\"; filename=\"" + filename + "\""));
|
||||
}
|
||||
|
||||
}
|
@@ -7,8 +7,9 @@ import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.apache.cxf.jaxrs.ext.multipart.MultipartBody;
|
||||
|
||||
import com.inteligr8.alfresco.acs.model.Error;
|
||||
import com.inteligr8.alfresco.acs.model.NodeBodyCreateMultipartCxf;
|
||||
import com.inteligr8.alfresco.acs.model.NodeEntry;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -39,7 +40,7 @@ public interface NodesCxfApi {
|
||||
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
|
||||
public NodeEntry createNode(
|
||||
@PathParam("nodeId") String nodeId,
|
||||
NodeBodyCreateMultipartCxf body);
|
||||
MultipartBody body);
|
||||
/*
|
||||
* This better impl doesn't work
|
||||
*
|
||||
|
@@ -1,5 +1,8 @@
|
||||
package com.inteligr8.alfresco.acs.api;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
@@ -7,8 +10,11 @@ import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
||||
import org.glassfish.jersey.media.multipart.FormDataParam;
|
||||
|
||||
import com.inteligr8.alfresco.acs.model.Error;
|
||||
import com.inteligr8.alfresco.acs.model.NodeBodyCreateMultipartJersey;
|
||||
import com.inteligr8.alfresco.acs.model.NodeBodyCreate;
|
||||
import com.inteligr8.alfresco.acs.model.NodeEntry;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -39,6 +45,13 @@ public interface NodesJerseyApi {
|
||||
@ApiResponse(code = 200, message = "Unexpected error", response = Error.class) })
|
||||
public NodeEntry createNode(
|
||||
@PathParam("nodeId") String nodeId,
|
||||
NodeBodyCreateMultipartJersey file);
|
||||
NodeBodyCreate nodeBodyCreate,
|
||||
@FormDataParam("autoRename") Boolean autoRename,
|
||||
@FormDataParam("majorVersion") Boolean majorVersion,
|
||||
@FormDataParam("versioningEnabled") Boolean versioningEnabled,
|
||||
@FormDataParam("include") List<String> include,
|
||||
@FormDataParam("fields") List<String> fields,
|
||||
@FormDataParam("filedata") InputStream filedataStream,
|
||||
@FormDataParam("filedata") FormDataContentDisposition filedataDisposition);
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,28 @@
|
||||
package com.inteligr8.alfresco.acs.model;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
public class NodeBodyCreateFile extends NodeBodyCreate {
|
||||
|
||||
@ApiModelProperty
|
||||
private File filedata;
|
||||
|
||||
@JsonProperty
|
||||
public File getFiledata() {
|
||||
return this.filedata;
|
||||
}
|
||||
|
||||
public void setFiledata(File filedata) {
|
||||
this.filedata = filedata;
|
||||
}
|
||||
|
||||
public NodeBodyCreateFile filedata(File filedata) {
|
||||
this.filedata = filedata;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
@@ -1,95 +0,0 @@
|
||||
package com.inteligr8.alfresco.acs.model;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.text.ParseException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.glassfish.jersey.media.multipart.BodyPart;
|
||||
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
|
||||
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
|
||||
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
public class NodeBodyCreateMultipartJersey extends FormDataMultiPart {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(NodeBodyCreateMultipartJersey.class);
|
||||
private static final ObjectMapper om = new ObjectMapper();
|
||||
|
||||
public static NodeBodyCreateMultipartJersey from(
|
||||
NodeBodyCreate nodeBody, String filename, InputStream istream,
|
||||
Boolean autoRename, Boolean majorVersion, Boolean versioningEnabled) throws IOException, ParseException {
|
||||
NodeBodyCreateMultipartJersey multipart = new NodeBodyCreateMultipartJersey();
|
||||
multipart.field("autoRename", String.valueOf(autoRename))
|
||||
.field("majorVersion", String.valueOf(majorVersion))
|
||||
.field("versioningEnabled", String.valueOf(versioningEnabled))
|
||||
.bodyPart(toBodyPart(filename, istream))
|
||||
.getBodyParts().addAll(toFields(nodeBody));
|
||||
return multipart;
|
||||
}
|
||||
|
||||
private NodeBodyCreateMultipartJersey() throws IOException {
|
||||
}
|
||||
|
||||
public NodeBodyCreate getBody() throws IOException {
|
||||
BodyPart bodyPart = this.getField("");
|
||||
if (bodyPart == null)
|
||||
throw new IllegalStateException();
|
||||
if (!MediaType.APPLICATION_JSON_TYPE.equals(bodyPart.getMediaType()))
|
||||
throw new IllegalStateException();
|
||||
|
||||
InputStream istream = bodyPart.getEntityAs(InputStream.class);
|
||||
try {
|
||||
return om.readValue(istream, NodeBodyCreate.class);
|
||||
} finally {
|
||||
istream.close();
|
||||
}
|
||||
}
|
||||
|
||||
public FormDataBodyPart getFiledataAttachment() {
|
||||
return this.getField("filedata");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static List<FormDataBodyPart> toFields(NodeBodyCreate nodeBody) throws IOException {
|
||||
List<FormDataBodyPart> fields = new LinkedList<>();
|
||||
fields.add(new FormDataBodyPart("name", nodeBody.getName()));
|
||||
fields.add(new FormDataBodyPart("nodeType", nodeBody.getNodeType()));
|
||||
if (nodeBody.getAspectNames() != null && !nodeBody.getAspectNames().isEmpty())
|
||||
logger.warn("The ACS Public REST API does not support the explicit inclusion of aspects while creating content");
|
||||
if (nodeBody.getProperties() != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> props = (Map<String, Object>)nodeBody.getProperties();
|
||||
for (Entry<String, Object> prop : props.entrySet()) {
|
||||
if (prop.getValue() != null) {
|
||||
// FIXME convert dates as ACS would expect them to be formatted
|
||||
fields.add(new FormDataBodyPart(prop.getKey(), prop.getValue().toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fields;
|
||||
}
|
||||
|
||||
private static BodyPart toBodyPart(String filename, InputStream istream) throws ParseException {
|
||||
if (filename == null) {
|
||||
return new FormDataBodyPart()
|
||||
.contentDisposition(new FormDataContentDisposition("form-data; name=\"filedata\""))
|
||||
.entity(istream);
|
||||
} else {
|
||||
return new FormDataBodyPart()
|
||||
.contentDisposition(new FormDataContentDisposition("form-data; name=\"filedata\"; filename=\"" + filename + "\""))
|
||||
.entity(istream);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1 +0,0 @@
|
||||
org.apache.cxf.jaxrs.client.spec.ClientBuilderImpl
|
35
src/test/java/com/inteligr8/alfresco/acs/ConditionalIT.java
Normal file
35
src/test/java/com/inteligr8/alfresco/acs/ConditionalIT.java
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
94
src/test/java/com/inteligr8/alfresco/acs/ConnectionClientIT.java
Executable file
94
src/test/java/com/inteligr8/alfresco/acs/ConnectionClientIT.java
Executable 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());
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,60 @@
|
||||
package com.inteligr8.alfresco.acs;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
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.api.NodeBodyCreateMultipart;
|
||||
import com.inteligr8.alfresco.acs.model.NodeBodyCreate;
|
||||
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;
|
||||
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();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void uploadFile() throws IOException {
|
||||
RequestQuery query = new RequestQuery();
|
||||
query.setLanguage(LanguageEnum.AFTS);
|
||||
query.setQuery("=@cm:name:'Shared'");
|
||||
|
||||
SearchRequest searchRequest = new SearchRequest();
|
||||
searchRequest.setQuery(query);
|
||||
|
||||
ResultSetPaging paging = this.client.getSearchApi().search(searchRequest);
|
||||
ResultNode folderNode = paging.getList().getEntries().iterator().next().getEntry();
|
||||
String folderNodeId = folderNode.getId();
|
||||
|
||||
NodeBodyCreate nodeBody = new NodeBodyCreate().nodeType("cm:content").name("TestFolder");
|
||||
|
||||
ByteArrayInputStream istream = new ByteArrayInputStream("This is a test".getBytes());
|
||||
NodeBodyCreateMultipart body = NodeBodyCreateMultipart.from(nodeBody, "test.txt", istream, true, null, null);
|
||||
|
||||
this.client.getNodesExtApi().createNode(folderNodeId, body);
|
||||
}
|
||||
|
||||
}
|
@@ -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();
|
||||
}
|
||||
|
||||
}
|
@@ -1 +0,0 @@
|
||||
org.glassfish.jersey.client.JerseyClientBuilder
|
5
src/test/resources/local-oauth.properties
Normal file
5
src/test/resources/local-oauth.properties
Normal 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
|
3
src/test/resources/local.properties
Normal file
3
src/test/resources/local.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
content.service.baseUrl=http://localhost:8080/alfresco
|
||||
content.service.security.basicAuth.username=admin
|
||||
content.service.security.basicAuth.password=admin
|
19
src/test/resources/log4j2.properties
Normal file
19
src/test/resources/log4j2.properties
Normal 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
|
Reference in New Issue
Block a user