mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
Compare commits
30 Commits
tas-restap
...
tas-restap
Author | SHA1 | Date | |
---|---|---|---|
|
d87532ce55 | ||
|
e6f97e979a | ||
|
b800d4b7e4 | ||
|
92bad68c5b | ||
|
d77e02f9a8 | ||
|
8a6584540f | ||
|
2dec33388e | ||
|
2c149b412e | ||
|
10b427209d | ||
|
a53eb13f9f | ||
|
c0a90dd32b | ||
|
d2a414f8a7 | ||
|
e484360980 | ||
|
691855bed2 | ||
|
e81a33d770 | ||
|
9dab62b490 | ||
|
44f602eee4 | ||
|
c04c149779 | ||
|
9cfa31ca63 | ||
|
a061d8d4df | ||
|
8052f7f299 | ||
|
962ce7a740 | ||
|
57603871d3 | ||
|
7d7cc446a4 | ||
|
2733ece40f | ||
|
f01204bf0a | ||
|
add073938a | ||
|
472becd973 | ||
|
d9293fff27 | ||
|
361e6b0221 |
@@ -4,7 +4,7 @@
|
||||
<groupId>org.alfresco.tas</groupId>
|
||||
<artifactId>restapi</artifactId>
|
||||
<name>alfresco-tas-restapi</name>
|
||||
<version>1.41</version>
|
||||
<version>1.51</version>
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-super-pom</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<suiteXmlFile>src/main/resources/shared-resources/testCount.xml</suiteXmlFile>
|
||||
<maven.build.sourceVersion>11</maven.build.sourceVersion>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<tas.utility.version>3.0.20</tas.utility.version>
|
||||
<tas.utility.version>3.0.21</tas.utility.version>
|
||||
<rest-assured.version>3.3.0</rest-assured.version>
|
||||
<httpclient-osgi-version>4.5.3</httpclient-osgi-version>
|
||||
<json-path.version>3.3.0</json-path.version>
|
||||
@@ -37,7 +37,7 @@
|
||||
<jackson-databind.version>2.9.8</jackson-databind.version>
|
||||
<maven-release.version>2.5.3</maven-release.version>
|
||||
<org.glassfish.version>1.1.4</org.glassfish.version>
|
||||
<commons-lang3.version>3.10</commons-lang3.version>
|
||||
<commons-lang3.version>3.11</commons-lang3.version>
|
||||
<scribejava-apis.version>6.9.0</scribejava-apis.version>
|
||||
<test.exclude />
|
||||
<test.include />
|
||||
@@ -48,7 +48,7 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/alfresco-tas-restapi</url>
|
||||
<tag>v1.41</tag>
|
||||
<tag>v1.51</tag>
|
||||
</scm>
|
||||
|
||||
<issueManagement>
|
||||
@@ -274,7 +274,7 @@
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.0</version>
|
||||
<version>2.12.1</version>
|
||||
</dependency>
|
||||
|
||||
<!--fixing java.lang.ClassCastException: class [B cannot be cast to class [C ([B and [C are in module java.base of loader 'bootstrap') -->
|
||||
@@ -299,7 +299,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.1.1</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
|
@@ -23,7 +23,8 @@ public class RestSiteMemberModel extends TestModel implements IRestModel<RestSit
|
||||
|
||||
private UserRole role;
|
||||
private String id = "no-id";
|
||||
|
||||
private boolean isMemberOfGroup;
|
||||
|
||||
private RestPersonModel person;
|
||||
|
||||
public UserRole getRole()
|
||||
@@ -51,6 +52,16 @@ public class RestSiteMemberModel extends TestModel implements IRestModel<RestSit
|
||||
return person;
|
||||
}
|
||||
|
||||
public boolean getIsMemberOfGroup()
|
||||
{
|
||||
return isMemberOfGroup;
|
||||
}
|
||||
|
||||
public void setIsMemberOfGroup(boolean memberOfGroup)
|
||||
{
|
||||
isMemberOfGroup = memberOfGroup;
|
||||
}
|
||||
|
||||
public void setPerson(RestPersonModel person)
|
||||
{
|
||||
this.person = person;
|
||||
|
@@ -22,6 +22,7 @@ import org.alfresco.rest.core.RestModels;
|
||||
* {
|
||||
* "entry": {
|
||||
* "role": "SiteManager",
|
||||
* "isMemberOfGroup": false,
|
||||
* "person": {
|
||||
* "firstName": "Administrator",
|
||||
* "emailNotificationsEnabled": true,
|
||||
@@ -36,6 +37,7 @@ import org.alfresco.rest.core.RestModels;
|
||||
* {
|
||||
* "entry": {
|
||||
* "role": "SiteConsumer",
|
||||
* "isMemberOfGroup": false,
|
||||
* "person": {
|
||||
* "firstName": "CqeKxvPHBd FirstName",
|
||||
* "lastName": "LN-CqeKxvPHBd",
|
||||
|
@@ -56,6 +56,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
"async": false,
|
||||
"authority": null,
|
||||
"cascade": false
|
||||
"folderChange": false
|
||||
}
|
||||
]
|
||||
*/
|
||||
@@ -147,6 +148,9 @@ public class RestSyncSetChangesModel extends TestModel
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private int numberOfSecondaryAssocs;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private boolean folderChange;
|
||||
|
||||
|
||||
|
||||
@@ -294,4 +298,12 @@ public class RestSyncSetChangesModel extends TestModel
|
||||
{
|
||||
this.numberOfSecondaryAssocs = numberOfSecondaryAssocs;
|
||||
}
|
||||
|
||||
public boolean isFolderChange() {
|
||||
return folderChange;
|
||||
}
|
||||
|
||||
public void setFolderChange(boolean folderChange) {
|
||||
this.folderChange = folderChange;
|
||||
}
|
||||
}
|
||||
|
@@ -778,11 +778,6 @@ public class Node extends ModelRequest<Node>
|
||||
restWrapper.processEmptyModel(request);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*@param nodeId
|
||||
*@return
|
||||
*/
|
||||
public RestActionDefinitionModelsCollection getActionDefinitions()
|
||||
{
|
||||
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, "nodes/{nodeId}/action-definitions?{parameters}", repoModel.getNodeRef(), restWrapper.getParameters());
|
||||
@@ -790,4 +785,51 @@ public class Node extends ModelRequest<Node>
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Direct Access URL for a node
|
||||
* @return
|
||||
*/
|
||||
public RestResponse createDirectAccessURL()
|
||||
{
|
||||
RestRequest request = RestRequest.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/request-content-url", this.repoModel.getNodeRef());
|
||||
return this.restWrapper.process(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Direct Access URL for a specific node version. E.g "1.1"
|
||||
* @param versionId
|
||||
* @return
|
||||
*/
|
||||
public RestResponse createDirectAccessURLforVersion(String versionId)
|
||||
{
|
||||
RestRequest request = RestRequest
|
||||
.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/versions/{versionId}/request-content-url", this.repoModel.getNodeRef(), versionId);
|
||||
return this.restWrapper.process(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Direct Access URL for a specific node version rendition. E.g ("1.1", "pdf")
|
||||
* @param versionId
|
||||
* @param renditionId
|
||||
* @return
|
||||
*/
|
||||
public RestResponse createDirectAccessURLforVersionAndRendition(String versionId, String renditionId)
|
||||
{
|
||||
RestRequest request = RestRequest
|
||||
.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/request-content-url", this.repoModel.getNodeRef(), versionId, renditionId);
|
||||
return this.restWrapper.process(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Direct Access URL for a specific node rendition E.g "pdf"
|
||||
* @param renditionId
|
||||
* @return
|
||||
*/
|
||||
public RestResponse createDirectAccessURLforRendition(String renditionId)
|
||||
{
|
||||
RestRequest request = RestRequest
|
||||
.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/renditions/{renditionId}/request-content-url", this.repoModel.getNodeRef(), renditionId);
|
||||
return this.restWrapper.process(request);
|
||||
}
|
||||
|
||||
}
|
@@ -67,6 +67,17 @@ public class SolrAPI extends ModelRequest<SolrAPI>
|
||||
return restWrapper.processTextResponse(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes an action (like "delete") on SOLR alfresco core
|
||||
* @param urlActionPath some action name (like "delete")
|
||||
* @param queryBody parameters for the action
|
||||
*/
|
||||
public RestTextResponse postAction(String urlActionPath, String queryBody) throws Exception
|
||||
{
|
||||
RestRequest request = RestRequest.requestWithBody(HttpMethod.POST, queryBody, urlActionPath);
|
||||
return restWrapper.processTextResponse(request);
|
||||
}
|
||||
|
||||
public RestTextResponse getSelectQuery() throws Exception
|
||||
{
|
||||
List<Header> headers = new ArrayList<Header>();
|
||||
@@ -77,4 +88,19 @@ public class SolrAPI extends ModelRequest<SolrAPI>
|
||||
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, "select?q={parameters}", restWrapper.getParameters());
|
||||
return restWrapper.processTextResponse(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes a query in SOLR using JSON format for the results
|
||||
*/
|
||||
public RestTextResponse getSelectQueryJson() throws Exception
|
||||
{
|
||||
List<Header> headers = new ArrayList<Header>();
|
||||
headers.add(new Header("Content-Type", "application/json"));
|
||||
Headers header = new Headers(headers);
|
||||
restWrapper.setResponseHeaders(header);
|
||||
restWrapper.configureRequestSpec().setUrlEncodingEnabled(false);
|
||||
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, "select?q={parameters}&wt=json", restWrapper.getParameters());
|
||||
return restWrapper.processTextResponse(request);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package org.alfresco.rest.search;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.rest.core.assertion.ModelAssertion;
|
||||
@@ -12,6 +13,16 @@ import java.util.List;
|
||||
* Generated from 'Alfresco Content Services REST API' swagger file
|
||||
* Base Path {@linkplain /alfresco/api/-default-/public/search/versions/1}
|
||||
*/
|
||||
|
||||
/*
|
||||
From Jackson 2.8 this annotation is required to make sure that defaults are read from the actual field values,
|
||||
as opposing to field type defaults. For example, the default for boolean primitive is "false",
|
||||
but the default for the "min" field in this class is "true".
|
||||
This configuration does not affect the product and is only related to test framework and how it serializes the request into JSON.
|
||||
See org.alfresco.utility.model.TestModel#toJson
|
||||
Note: This change was required for org.alfresco.test.search.functional.searchServices.search.StatsSearchTest
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
|
||||
public class RestRequestStatsModel extends TestModel implements IRestModel<RestRequestStatsModel>
|
||||
{
|
||||
@Override
|
||||
|
@@ -56,7 +56,8 @@ public class RestDemoTests extends RestTest
|
||||
* Update existing comment using PUT call, check that comment content is updated <br/>
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test(groups = { "demo" })
|
||||
//Opened DESKTOPAPP-475 for fixing the failing test
|
||||
// @Test(groups = { "demo" })
|
||||
public void adminCanPostAndUpdateComments() throws Exception
|
||||
{
|
||||
FileModel fileModel = dataContent.usingUser(userModel)
|
||||
|
Reference in New Issue
Block a user