Compare commits

..

21 Commits

Author SHA1 Message Date
Travis CI User
df35137d12 [maven-release-plugin][skip ci] prepare release v1.105 2022-08-10 08:45:02 +00:00
Damian Ujma
1d1b454978 ACS-3351 Upgrade to Java 17 (#219) 2022-08-10 10:36:45 +02:00
Travis CI User
deaee78d09 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-09 12:09:27 +00:00
Travis CI User
9e3c144a7d [maven-release-plugin][skip ci] prepare release v1.104 2022-08-09 12:09:24 +00:00
Tom Page
d0b100a88b ACS-3361 Support for inclusionType. (#221) 2022-08-09 13:05:51 +01:00
Travis CI User
9d807242ee [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-09 11:21:44 +00:00
Travis CI User
5f2b5fe9af [maven-release-plugin][skip ci] prepare release v1.103 2022-08-09 11:21:43 +00:00
Marcin Strankowski
7edee67997 Move all versions under the rest-assured.version, update it to 5.1.1 (#220) 2022-08-09 13:17:55 +02:00
Travis CI User
5f151aaa96 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-08 14:20:54 +00:00
Travis CI User
dcf25d89d0 [maven-release-plugin][skip ci] prepare release v1.102 2022-08-08 14:20:51 +00:00
Tom Page
7d5aafecb5 ACS-3362 Add owningFolder field to rule set. (#218)
* ACS-3362 Add owningFolder field to rule set.

* ACS-3362 Allow passing include param.
2022-08-08 15:17:29 +01:00
Travis CI User
1d8f1bd8a2 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-05 13:58:04 +00:00
Travis CI User
fe04e621e1 [maven-release-plugin][skip ci] prepare release v1.101 2022-08-05 13:58:02 +00:00
krdabrowski
ee03296733 ACS-3360 GET APIs for rule sets E2E tests. (#217)
- fixed improper rest client method usage
2022-08-05 15:54:23 +02:00
Travis CI User
c5e89242ba [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-02 12:30:42 +00:00
Travis CI User
0fbeffe80a [maven-release-plugin][skip ci] prepare release v1.100 2022-08-02 12:30:40 +00:00
Tom Page
d1e9cf0144 ACS-3360 TAS endpoints for GET rule sets. (#216) 2022-08-02 14:27:17 +02:00
Travis CI User
b51146c868 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-29 12:01:19 +00:00
Travis CI User
515f243911 [maven-release-plugin][skip ci] prepare release v1.99 2022-07-29 12:01:17 +00:00
dependabot[bot]
a7263931f5 Bump utility from 3.0.48 to 3.0.49 (#209) 2022-07-29 11:58:13 +00:00
Travis CI User
2c23c674a7 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-29 08:26:45 +00:00
4 changed files with 103 additions and 75 deletions

View File

@@ -2,7 +2,7 @@ dist: focal
sudo: required sudo: required
language: java language: java
jdk: jdk:
- openjdk11 - openjdk17
cache: cache:
directories: directories:

View File

@@ -4,7 +4,7 @@
<groupId>org.alfresco.tas</groupId> <groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId> <artifactId>restapi</artifactId>
<name>alfresco-tas-restapi</name> <name>alfresco-tas-restapi</name>
<version>1.98</version> <version>1.105</version>
<parent> <parent>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<artifactId>alfresco-super-pom</artifactId> <artifactId>alfresco-super-pom</artifactId>
@@ -28,12 +28,9 @@
<suiteXmlFile>src/main/resources/shared-resources/testCount.xml</suiteXmlFile> <suiteXmlFile>src/main/resources/shared-resources/testCount.xml</suiteXmlFile>
<maven.build.sourceVersion>11</maven.build.sourceVersion> <maven.build.sourceVersion>11</maven.build.sourceVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tas.utility.version>3.0.48</tas.utility.version> <tas.utility.version>3.0.49</tas.utility.version>
<rest-assured.version>3.3.0</rest-assured.version> <rest-assured.version>5.1.1</rest-assured.version>
<httpclient-osgi-version>4.5.6</httpclient-osgi-version> <httpclient-osgi-version>4.5.6</httpclient-osgi-version>
<json-path.version>3.3.0</json-path.version>
<xml-path.version>3.3.0</xml-path.version>
<json-schema-validator.version>3.3.0</json-schema-validator.version>
<jackson-databind.version>2.13.3</jackson-databind.version> <jackson-databind.version>2.13.3</jackson-databind.version>
<maven-release.version>2.5.3</maven-release.version> <maven-release.version>2.5.3</maven-release.version>
<org.glassfish.version>1.1.4</org.glassfish.version> <org.glassfish.version>1.1.4</org.glassfish.version>
@@ -70,7 +67,7 @@
<connection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</connection> <connection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</developerConnection> <developerConnection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-tas-restapi</url> <url>https://github.com/Alfresco/alfresco-tas-restapi</url>
<tag>v1.98</tag> <tag>v1.105</tag>
</scm> </scm>
<issueManagement> <issueManagement>
@@ -264,7 +261,7 @@
<dependency> <dependency>
<groupId>io.rest-assured</groupId> <groupId>io.rest-assured</groupId>
<artifactId>json-path</artifactId> <artifactId>json-path</artifactId>
<version>${json-path.version}</version> <version>${rest-assured.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
@@ -276,7 +273,7 @@
<dependency> <dependency>
<groupId>io.rest-assured</groupId> <groupId>io.rest-assured</groupId>
<artifactId>xml-path</artifactId> <artifactId>xml-path</artifactId>
<version>${xml-path.version}</version> <version>${rest-assured.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
@@ -288,7 +285,7 @@
<dependency> <dependency>
<groupId>io.rest-assured</groupId> <groupId>io.rest-assured</groupId>
<artifactId>json-schema-validator</artifactId> <artifactId>json-schema-validator</artifactId>
<version>${json-schema-validator.version}</version> <version>${rest-assured.version}</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -4,37 +4,35 @@
* %% * %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited * Copyright (C) 2005 - 2022 Alfresco Software Limited
* %% * %%
* This file is part of the Alfresco software. * This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of * If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is * the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms: * provided under the following open source license terms:
* *
* Alfresco is free software: you can redistribute it and/or modify * Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by * it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* Alfresco is distributed in the hope that it will be useful, * Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L% * #L%
*/ */
package org.alfresco.rest.model; package org.alfresco.rest.model;
import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel; import org.alfresco.rest.core.IRestModel;
import org.alfresco.rest.core.assertion.ModelAssertion; import org.alfresco.rest.core.assertion.ModelAssertion;
import org.alfresco.utility.model.TestModel; import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* Generated by 'Kristian.Dimitrov@hyland.com' on '2022-07-13 15:53' from 'Alfresco Content Services REST API' swagger file * Generated by 'Kristian.Dimitrov@hyland.com' on '2022-07-13 15:53' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file * Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1} * Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/ */
@@ -43,7 +41,7 @@ public class RestRuleSetModel extends TestModel implements IRestModel<RestRuleSe
@Override @Override
public ModelAssertion<RestRuleSetModel> assertThat() public ModelAssertion<RestRuleSetModel> assertThat()
{ {
return new ModelAssertion<RestRuleSetModel>(this); return new ModelAssertion<>(this);
} }
@Override @Override
@@ -52,7 +50,7 @@ public class RestRuleSetModel extends TestModel implements IRestModel<RestRuleSe
return assertThat(); return assertThat();
} }
@JsonProperty(value = "entry") @JsonProperty (value = "entry")
RestRuleSetModel model; RestRuleSetModel model;
@Override @Override
@@ -62,30 +60,14 @@ public class RestRuleSetModel extends TestModel implements IRestModel<RestRuleSe
} }
/** /**
Identifier for the rule set * Identifier for the rule set
*/ */
@JsonProperty (required = true)
@JsonProperty(required = true) private String id;
private String id; /** The node id of the folder that owns this rule set */
/** private String owningFolder;
True if the rule set is shared to at least one folder /** The reason why the rule set is included for the folder. */
*/ private String inclusionType;
@JsonProperty(required = true)
private boolean shared;
/**
List of folder identifiers which use the rule set.
Note that any folders the user does not have access to will not appear in this list. Use **shared** instead to check existence of any link.
*/
private List<String> usedBy;
/**
An ordered list of the rule ids within the rule set
*/
private List<String> ruleIds;
public String getId() public String getId()
{ {
@@ -95,36 +77,25 @@ Note that any folders the user does not have access to will not appear in this l
public void setId(String id) public void setId(String id)
{ {
this.id = id; this.id = id;
}
public boolean getShared()
{
return this.shared;
} }
public void setShared(boolean shared) public String getOwningFolder()
{ {
this.shared = shared; return owningFolder;
}
public List<String> getUsedBy()
{
return this.usedBy;
} }
public void setUsedBy(List<String> usedBy) public void setOwningFolder(String owningFolder)
{ {
this.usedBy = usedBy; this.owningFolder = owningFolder;
}
public List<String> getRuleIds()
{
return this.ruleIds;
} }
public void setRuleIds(List<String> ruleIds) public String getInclusionType()
{ {
this.ruleIds = ruleIds; return inclusionType;
} }
public void setInclusionType(String inclusionType)
{
this.inclusionType = inclusionType;
}
} }

View File

@@ -26,13 +26,37 @@
package org.alfresco.rest.requests; package org.alfresco.rest.requests;
import javax.json.JsonArrayBuilder;
import java.io.File;
import java.io.IOException;
import io.restassured.http.ContentType; import io.restassured.http.ContentType;
import org.alfresco.rest.core.JsonBodyGenerator; import org.alfresco.rest.core.JsonBodyGenerator;
import org.alfresco.rest.core.RestRequest; import org.alfresco.rest.core.RestRequest;
import org.alfresco.rest.core.RestResponse; import org.alfresco.rest.core.RestResponse;
import org.alfresco.rest.core.RestWrapper; import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.exception.JsonToModelConversionException; import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.*; import org.alfresco.rest.model.RestActionDefinitionModelsCollection;
import org.alfresco.rest.model.RestCommentModel;
import org.alfresco.rest.model.RestCommentModelsCollection;
import org.alfresco.rest.model.RestNodeAssocTargetModel;
import org.alfresco.rest.model.RestNodeAssociationModel;
import org.alfresco.rest.model.RestNodeAssociationModelCollection;
import org.alfresco.rest.model.RestNodeBodyModel;
import org.alfresco.rest.model.RestNodeBodyMoveCopyModel;
import org.alfresco.rest.model.RestNodeChildAssocModelCollection;
import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.rest.model.RestNodeModelsCollection;
import org.alfresco.rest.model.RestRatingModel;
import org.alfresco.rest.model.RestRatingModelsCollection;
import org.alfresco.rest.model.RestRenditionInfoModel;
import org.alfresco.rest.model.RestRenditionInfoModelCollection;
import org.alfresco.rest.model.RestRuleSetModel;
import org.alfresco.rest.model.RestRuleSetModelsCollection;
import org.alfresco.rest.model.RestTagModel;
import org.alfresco.rest.model.RestTagModelsCollection;
import org.alfresco.rest.model.RestVersionModel;
import org.alfresco.rest.model.RestVersionModelsCollection;
import org.alfresco.rest.model.body.RestNodeLockBodyModel; import org.alfresco.rest.model.body.RestNodeLockBodyModel;
import org.alfresco.rest.model.builder.NodesBuilder; import org.alfresco.rest.model.builder.NodesBuilder;
import org.alfresco.utility.Utility; import org.alfresco.utility.Utility;
@@ -41,16 +65,15 @@ import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.testng.reporters.Files; import org.testng.reporters.Files;
import javax.json.JsonArrayBuilder;
import java.io.File;
import java.io.IOException;
/** /**
* Declares all Rest API under the /nodes path * Declares all Rest API under the /nodes path
* *
*/ */
public class Node extends ModelRequest<Node> public class Node extends ModelRequest<Node>
{ {
private static final String RULE_SETS_URI = "nodes/{nodeId}/rule-sets";
private static final String RULE_SET_BY_ID = RULE_SETS_URI + "/{ruleSetId}";
private RepoTestModel repoModel; private RepoTestModel repoModel;
public Node(RestWrapper restWrapper) public Node(RestWrapper restWrapper)
@@ -987,4 +1010,41 @@ public class Node extends ModelRequest<Node>
.withNodeId(repoModel.getNodeRef()) .withNodeId(repoModel.getNodeRef())
.withRuleSetId(ruleSetId); .withRuleSetId(ruleSetId);
} }
/**
* Get the rule sets defined on a folder.
*
* @return The list of rule sets.
*/
public RestRuleSetModelsCollection getListOfRuleSets()
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, RULE_SETS_URI + "?{parameters}",
repoModel.getNodeRef(), restWrapper.getParameters());
return restWrapper.processModels(RestRuleSetModelsCollection.class, request);
}
/**
* Get the specified rule set from a folder.
*
* @param ruleSetId The id of the rule set.
* @return The specified rule set.
*/
public RestRuleSetModel getRuleSet(String ruleSetId)
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, RULE_SET_BY_ID + "?{parameters}",
repoModel.getNodeRef(), ruleSetId, restWrapper.getParameters());
return restWrapper.processModel(RestRuleSetModel.class, request);
}
/**
* Get the default rule set from a folder.
*
* @return The specified rule set.
*/
public RestRuleSetModel getDefaultRuleSet()
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, RULE_SET_BY_ID + "?{parameters}",
repoModel.getNodeRef(), "-default-", restWrapper.getParameters());
return restWrapper.processModel(RestRuleSetModel.class, request);
}
} }