mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-24 14:32:01 +00:00
Compare commits
15 Commits
tas-restap
...
tas-restap
Author | SHA1 | Date | |
---|---|---|---|
|
9e3c144a7d | ||
|
d0b100a88b | ||
|
9d807242ee | ||
|
5f2b5fe9af | ||
|
7edee67997 | ||
|
5f151aaa96 | ||
|
dcf25d89d0 | ||
|
7d5aafecb5 | ||
|
1d8f1bd8a2 | ||
|
fe04e621e1 | ||
|
ee03296733 | ||
|
c5e89242ba | ||
|
0fbeffe80a | ||
|
d1e9cf0144 | ||
|
b51146c868 |
@@ -4,7 +4,7 @@
|
||||
<groupId>org.alfresco.tas</groupId>
|
||||
<artifactId>restapi</artifactId>
|
||||
<name>alfresco-tas-restapi</name>
|
||||
<version>1.99</version>
|
||||
<version>1.104</version>
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-super-pom</artifactId>
|
||||
@@ -29,11 +29,8 @@
|
||||
<maven.build.sourceVersion>11</maven.build.sourceVersion>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<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>
|
||||
<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>
|
||||
<maven-release.version>2.5.3</maven-release.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>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/alfresco-tas-restapi</url>
|
||||
<tag>v1.99</tag>
|
||||
<tag>v1.104</tag>
|
||||
</scm>
|
||||
|
||||
<issueManagement>
|
||||
@@ -264,7 +261,7 @@
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>json-path</artifactId>
|
||||
<version>${json-path.version}</version>
|
||||
<version>${rest-assured.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
@@ -276,7 +273,7 @@
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>xml-path</artifactId>
|
||||
<version>${xml-path.version}</version>
|
||||
<version>${rest-assured.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
@@ -288,7 +285,7 @@
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>json-schema-validator</artifactId>
|
||||
<version>${json-schema-validator.version}</version>
|
||||
<version>${rest-assured.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@@ -4,37 +4,35 @@
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
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.assertion.ModelAssertion;
|
||||
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
|
||||
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
|
||||
*/
|
||||
@@ -43,7 +41,7 @@ public class RestRuleSetModel extends TestModel implements IRestModel<RestRuleSe
|
||||
@Override
|
||||
public ModelAssertion<RestRuleSetModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestRuleSetModel>(this);
|
||||
return new ModelAssertion<>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -52,7 +50,7 @@ public class RestRuleSetModel extends TestModel implements IRestModel<RestRuleSe
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
@JsonProperty (value = "entry")
|
||||
RestRuleSetModel model;
|
||||
|
||||
@Override
|
||||
@@ -62,30 +60,14 @@ public class RestRuleSetModel extends TestModel implements IRestModel<RestRuleSe
|
||||
}
|
||||
|
||||
/**
|
||||
Identifier for the rule set
|
||||
*/
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private String id;
|
||||
/**
|
||||
True if the rule set is shared to at least one folder
|
||||
*/
|
||||
|
||||
@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;
|
||||
* Identifier for the rule set
|
||||
*/
|
||||
@JsonProperty (required = true)
|
||||
private String id;
|
||||
/** The node id of the folder that owns this rule set */
|
||||
private String owningFolder;
|
||||
/** The reason why the rule set is included for the folder. */
|
||||
private String inclusionType;
|
||||
|
||||
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)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public boolean getShared()
|
||||
{
|
||||
return this.shared;
|
||||
}
|
||||
|
||||
public void setShared(boolean shared)
|
||||
public String getOwningFolder()
|
||||
{
|
||||
this.shared = shared;
|
||||
}
|
||||
|
||||
public List<String> getUsedBy()
|
||||
{
|
||||
return this.usedBy;
|
||||
return owningFolder;
|
||||
}
|
||||
|
||||
public void setUsedBy(List<String> usedBy)
|
||||
public void setOwningFolder(String owningFolder)
|
||||
{
|
||||
this.usedBy = usedBy;
|
||||
}
|
||||
|
||||
public List<String> getRuleIds()
|
||||
{
|
||||
return this.ruleIds;
|
||||
this.owningFolder = owningFolder;
|
||||
}
|
||||
|
||||
public void setRuleIds(List<String> ruleIds)
|
||||
public String getInclusionType()
|
||||
{
|
||||
this.ruleIds = ruleIds;
|
||||
}
|
||||
return inclusionType;
|
||||
}
|
||||
|
||||
public void setInclusionType(String inclusionType)
|
||||
{
|
||||
this.inclusionType = inclusionType;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -26,13 +26,37 @@
|
||||
|
||||
package org.alfresco.rest.requests;
|
||||
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import io.restassured.http.ContentType;
|
||||
import org.alfresco.rest.core.JsonBodyGenerator;
|
||||
import org.alfresco.rest.core.RestRequest;
|
||||
import org.alfresco.rest.core.RestResponse;
|
||||
import org.alfresco.rest.core.RestWrapper;
|
||||
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.builder.NodesBuilder;
|
||||
import org.alfresco.utility.Utility;
|
||||
@@ -41,16 +65,15 @@ import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpStatus;
|
||||
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
|
||||
*
|
||||
*/
|
||||
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;
|
||||
|
||||
public Node(RestWrapper restWrapper)
|
||||
@@ -987,4 +1010,41 @@ public class Node extends ModelRequest<Node>
|
||||
.withNodeId(repoModel.getNodeRef())
|
||||
.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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user