mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-24 14:32:01 +00:00
Compare commits
19 Commits
fix/MNT-23
...
17.146
Author | SHA1 | Date | |
---|---|---|---|
|
d0061fb530 | ||
|
1c91452ee9 | ||
|
af7e9f97aa | ||
|
282186b877 | ||
|
5ab44f4f35 | ||
|
bf855c5965 | ||
|
d02f88eed4 | ||
|
e487061e96 | ||
|
615406d5a1 | ||
|
548fc9e64a | ||
|
e7cc9ba008 | ||
|
e10e9fe1c5 | ||
|
d5a33e3f03 | ||
|
b62dfc1d76 | ||
|
3711be4e80 | ||
|
33297757bf | ||
|
5f9c8fc499 | ||
|
119ff309ac | ||
|
a93dd27674 |
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -292,7 +292,6 @@ public class DeleteRecordTests extends BaseRMRestTest
|
||||
* </pre>
|
||||
*/
|
||||
@Test (description = "Destroying record doesn't delete the content for the associated copy")
|
||||
@Ignore
|
||||
@AlfrescoTest (jira = "MNT-20145")
|
||||
public void destroyOfRecord()
|
||||
{
|
||||
@@ -320,8 +319,8 @@ public class DeleteRecordTests extends BaseRMRestTest
|
||||
RecordCategoryChild recFolder = createFolder(recordCategory.getId(), getRandomName("recFolder"));
|
||||
RecordBodyFile recordBodyFile = RecordBodyFile.builder().targetParentId(recFolder.getId()).build();
|
||||
Record recordFiled = getRestAPIFactory().getRecordsAPI().fileRecord(recordBodyFile, testFile.getNodeRefWithoutVersion());
|
||||
getRestAPIFactory().getRecordsAPI().completeRecord(recordFiled.getId());
|
||||
assertStatusCode(CREATED);
|
||||
completeRecord(recordFiled.getId());
|
||||
assertStatusCode(OK);
|
||||
|
||||
STEP("Execute the disposition schedule steps.");
|
||||
rmRolesAndActionsAPI.executeAction(getAdminUser().getUsername(), getAdminUser().getUsername(), recordFiled.getName(),
|
||||
|
@@ -53,7 +53,6 @@ import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.testng.AssertJUnit;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Ignore;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -135,7 +134,6 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
|
||||
* <p/> TestRail Test C775<p/>
|
||||
**/
|
||||
@Test
|
||||
@Ignore
|
||||
@AlfrescoTest(jira = "RM-1622")
|
||||
public void dispositionScheduleLinkedRecords() throws UnsupportedEncodingException {
|
||||
STEP("Create record category");
|
||||
@@ -202,7 +200,6 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
|
||||
* When the record is linked to a folder with the same disposition schedule
|
||||
* */
|
||||
@Test
|
||||
@Ignore
|
||||
@AlfrescoTest (jira = "RM-3060")
|
||||
public void sameDispositionScheduleLinkedRecords() throws UnsupportedEncodingException {
|
||||
|
||||
@@ -366,7 +363,6 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@AlfrescoTest(jira = "RM-1622")
|
||||
public void sameLevelDispositionScheduleStepsPeriodsCalculation() throws Exception {
|
||||
|
||||
@@ -419,7 +415,6 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
|
||||
}
|
||||
|
||||
@Test (dependsOnMethods = {"sameLevelDispositionScheduleStepsPeriodsCalculation" })
|
||||
@Ignore
|
||||
public void deleteLongestPeriodTestPrecondition() {
|
||||
// Delete the RM site
|
||||
getRestAPIFactory().getRMSiteAPI().deleteRMSite();
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -203,18 +203,7 @@ public abstract class AbstractHttpClient implements AlfrescoHttpClient
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @see AlfrescoHttpClient#setOverrideDefaultHeaders(boolean)
|
||||
*/
|
||||
public void setOverrideDefaultHeaders(boolean override)
|
||||
{
|
||||
if (httpClient != null)
|
||||
{
|
||||
if (httpClient instanceof RequestHeadersHttpClient)
|
||||
{
|
||||
((RequestHeadersHttpClient) httpClient).setOverrideDefaultHeaders(override);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -27,13 +27,4 @@ public interface AlfrescoHttpClient
|
||||
*
|
||||
*/
|
||||
public void close();
|
||||
|
||||
/**
|
||||
* Allows to override (or not) the default headers that will be included in HTTP requests
|
||||
*
|
||||
* @param override
|
||||
* if true, it will prevent the default headers to be duplicated, otherwise the request may contain
|
||||
* multiple instances of the same header
|
||||
*/
|
||||
public void setOverrideDefaultHeaders(boolean override);
|
||||
}
|
||||
|
@@ -37,8 +37,6 @@ public class RequestHeadersHttpClient extends HttpClient
|
||||
{
|
||||
|
||||
private Map<String, String> defaultHeaders;
|
||||
|
||||
private boolean overrideDefaultHeaders = false;
|
||||
|
||||
public RequestHeadersHttpClient(MultiThreadedHttpConnectionManager connectionManager)
|
||||
{
|
||||
@@ -60,11 +58,9 @@ public class RequestHeadersHttpClient extends HttpClient
|
||||
if (defaultHeaders != null)
|
||||
{
|
||||
defaultHeaders.forEach((k,v) -> {
|
||||
if (overrideDefaultHeaders)
|
||||
{
|
||||
method.setRequestHeader(k, v);
|
||||
}
|
||||
else
|
||||
Header h = method.getRequestHeader(k);
|
||||
boolean add = h == null || h.getValue() == null || !h.getValue().equals(v);
|
||||
if (add)
|
||||
{
|
||||
method.addRequestHeader(k, v);
|
||||
}
|
||||
@@ -94,8 +90,4 @@ public class RequestHeadersHttpClient extends HttpClient
|
||||
return super.executeMethod(hostconfig, method, state);
|
||||
}
|
||||
|
||||
public void setOverrideDefaultHeaders(boolean overrideDefaultHeaders)
|
||||
{
|
||||
this.overrideDefaultHeaders = overrideDefaultHeaders;
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -9,6 +9,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<organization>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* 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
|
||||
* 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.rules;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
import static org.alfresco.rest.rules.RulesTestsUtils.createRuleModel;
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import org.alfresco.rest.RestTest;
|
||||
import org.alfresco.rest.model.RestRuleModel;
|
||||
import org.alfresco.rest.model.RestRuleSetModel;
|
||||
import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestGroup;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@Test (groups = { TestGroup.RULES })
|
||||
public class ReorderRules extends RestTest
|
||||
{
|
||||
private UserModel user;
|
||||
private SiteModel site;
|
||||
|
||||
@BeforeClass (alwaysRun = true)
|
||||
public void dataPreparation()
|
||||
{
|
||||
STEP("Create a user and site.");
|
||||
user = dataUser.createRandomTestUser();
|
||||
site = dataSite.usingUser(user).createPublicRandomSite();
|
||||
}
|
||||
|
||||
/** Check we can get the ordered list of rules in a rule set. */
|
||||
@Test (groups = { TestGroup.REST_API, TestGroup.RULES })
|
||||
public void getOrderedRuleIds()
|
||||
{
|
||||
STEP("Create a folder containing three rules in the existing site");
|
||||
FolderModel folder = dataContent.usingUser(user).usingSite(site).createFolder();
|
||||
List<RestRuleModel> rules = IntStream.range(0, 3).mapToObj(index -> {
|
||||
RestRuleModel ruleModel = createRuleModel("ruleName");
|
||||
return restClient.authenticateUser(user).withCoreAPI().usingNode(folder).usingDefaultRuleSet().createSingleRule(ruleModel);
|
||||
}).collect(toList());
|
||||
|
||||
STEP("Get the default rule set for the folder including the ordered rule ids");
|
||||
RestRuleSetModel ruleSet = restClient.authenticateUser(user).withCoreAPI().usingNode(folder)
|
||||
.include("ruleIds").getDefaultRuleSet();
|
||||
|
||||
List<String> expectedRuleIds = rules.stream().map(RestRuleModel::getId).collect(toList());
|
||||
restClient.assertStatusCodeIs(OK);
|
||||
ruleSet.assertThat().field("ruleIds").is(expectedRuleIds);
|
||||
}
|
||||
}
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
10
pom.xml
10
pom.xml
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Community Repo Parent</name>
|
||||
|
||||
@@ -110,9 +110,9 @@
|
||||
<dependency.jakarta-json-path.version>2.7.0</dependency.jakarta-json-path.version>
|
||||
<dependency.jakarta-rpc-api.version>1.1.4</dependency.jakarta-rpc-api.version>
|
||||
|
||||
<alfresco.googledrive.version>3.2.3-A2</alfresco.googledrive.version>
|
||||
<alfresco.googledrive.version>3.2.3-A3</alfresco.googledrive.version>
|
||||
<alfresco.aos-module.version>1.4.1</alfresco.aos-module.version>
|
||||
<alfresco.api-explorer.version>7.2.1</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||
<alfresco.api-explorer.version>7.3.0-A1</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||
|
||||
<alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
|
||||
<license-maven-plugin.version>2.0.1.alfresco-2</license-maven-plugin.version>
|
||||
@@ -123,7 +123,7 @@
|
||||
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
|
||||
<dependency.tas-utility.version>3.0.56</dependency.tas-utility.version>
|
||||
<dependency.rest-assured.version>5.2.0</dependency.rest-assured.version>
|
||||
<dependency.tas-restapi.version>1.124</dependency.tas-restapi.version>
|
||||
<dependency.tas-restapi.version>1.126</dependency.tas-restapi.version>
|
||||
<dependency.tas-email.version>1.9</dependency.tas-email.version>
|
||||
<dependency.tas-webdav.version>1.7</dependency.tas-webdav.version>
|
||||
<dependency.tas-ftp.version>1.7</dependency.tas-ftp.version>
|
||||
@@ -150,7 +150,7 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||
<tag>HEAD</tag>
|
||||
<tag>17.146</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
package org.alfresco.rest.api.impl.rules;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
import static org.alfresco.rest.api.model.rules.InclusionType.INHERITED;
|
||||
import static org.alfresco.rest.api.model.rules.InclusionType.LINKED;
|
||||
import static org.alfresco.rest.api.model.rules.InclusionType.OWNED;
|
||||
@@ -32,6 +34,7 @@ import static org.alfresco.rest.api.model.rules.InclusionType.OWNED;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.rest.api.impl.mapper.rules.RestRuleModelMapper;
|
||||
import org.alfresco.rest.api.model.rules.RuleSet;
|
||||
import org.alfresco.service.Experimental;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
@@ -49,9 +52,11 @@ public class RuleSetLoader
|
||||
protected static final String LINKED_TO_BY = "linkedToBy";
|
||||
protected static final String IS_INHERITED = "isInherited";
|
||||
protected static final String IS_LINKED_TO = "isLinkedTo";
|
||||
protected static final String RULE_IDS = "ruleIds";
|
||||
private static final int MAX_INHERITED_BY_SIZE = 100;
|
||||
private NodeService nodeService;
|
||||
private RuleService ruleService;
|
||||
private RestRuleModelMapper restRuleModelMapper;
|
||||
|
||||
/**
|
||||
* Load a rule set for the given node ref.
|
||||
@@ -103,6 +108,10 @@ public class RuleSetLoader
|
||||
{
|
||||
ruleSet.setIsLinkedTo(loadIsLinkedTo(ruleSetNodeRef, parentRef));
|
||||
}
|
||||
if (includes.contains(RULE_IDS))
|
||||
{
|
||||
ruleSet.setRuleIds(loadRuleIds(parentRef));
|
||||
}
|
||||
}
|
||||
return ruleSet;
|
||||
}
|
||||
@@ -139,6 +148,14 @@ public class RuleSetLoader
|
||||
);
|
||||
}
|
||||
|
||||
private List<String> loadRuleIds(NodeRef folderNodeRef)
|
||||
{
|
||||
return ruleService.getRules(folderNodeRef, false).stream()
|
||||
.map(org.alfresco.service.cmr.rule.Rule::getNodeRef)
|
||||
.map(NodeRef::getId)
|
||||
.collect(toList());
|
||||
}
|
||||
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
@@ -148,4 +165,9 @@ public class RuleSetLoader
|
||||
{
|
||||
this.ruleService = ruleService;
|
||||
}
|
||||
|
||||
public void setRestRuleModelMapper(RestRuleModelMapper restRuleModelMapper)
|
||||
{
|
||||
this.restRuleModelMapper = restRuleModelMapper;
|
||||
}
|
||||
}
|
||||
|
@@ -45,6 +45,7 @@ public class RuleSet
|
||||
private List<NodeRef> linkedToBy;
|
||||
private Boolean isInherited;
|
||||
private Boolean isLinkedTo;
|
||||
private List<String> ruleIds;
|
||||
|
||||
public static RuleSet of(String id)
|
||||
{
|
||||
@@ -151,6 +152,16 @@ public class RuleSet
|
||||
return isLinkedTo;
|
||||
}
|
||||
|
||||
public List<String> getRuleIds()
|
||||
{
|
||||
return ruleIds;
|
||||
}
|
||||
|
||||
public void setRuleIds(List<String> ruleIds)
|
||||
{
|
||||
this.ruleIds = ruleIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
@@ -163,6 +174,7 @@ public class RuleSet
|
||||
.add("linkedToBy='" + linkedToBy + "'")
|
||||
.add("isInherited='" + isInherited + "'")
|
||||
.add("isLinkedTo='" + isLinkedTo + "'")
|
||||
.add("ruleIds='" + ruleIds + "'")
|
||||
.toString()
|
||||
+ '}';
|
||||
}
|
||||
@@ -181,13 +193,14 @@ public class RuleSet
|
||||
&& Objects.equals(inheritedBy, ruleSet.inheritedBy)
|
||||
&& Objects.equals(linkedToBy, ruleSet.linkedToBy)
|
||||
&& Objects.equals(isInherited, ruleSet.isInherited)
|
||||
&& Objects.equals(isLinkedTo, ruleSet.isLinkedTo);
|
||||
&& Objects.equals(isLinkedTo, ruleSet.isLinkedTo)
|
||||
&& Objects.equals(ruleIds, ruleSet.ruleIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(id, owningFolder, inclusionType, inheritedBy, linkedToBy, isInherited, isLinkedTo);
|
||||
return Objects.hash(id, owningFolder, inclusionType, inheritedBy, linkedToBy, isInherited, isLinkedTo, ruleIds);
|
||||
}
|
||||
|
||||
public static Builder builder()
|
||||
@@ -204,6 +217,7 @@ public class RuleSet
|
||||
private List<NodeRef> linkedToBy;
|
||||
private Boolean isInherited;
|
||||
private Boolean isLinkedTo;
|
||||
private List<String> ruleIds;
|
||||
|
||||
public Builder id(String id)
|
||||
{
|
||||
@@ -247,6 +261,12 @@ public class RuleSet
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder ruleIds(List<String> ruleIds)
|
||||
{
|
||||
this.ruleIds = ruleIds;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RuleSet create()
|
||||
{
|
||||
final RuleSet ruleSet = new RuleSet();
|
||||
@@ -257,6 +277,7 @@ public class RuleSet
|
||||
ruleSet.setLinkedToBy(linkedToBy);
|
||||
ruleSet.setIsInherited(isInherited);
|
||||
ruleSet.setIsLinkedTo(isLinkedTo);
|
||||
ruleSet.setRuleIds(ruleIds);
|
||||
return ruleSet;
|
||||
}
|
||||
}
|
||||
|
@@ -864,6 +864,7 @@
|
||||
<bean id="ruleSetLoader" class="org.alfresco.rest.api.impl.rules.RuleSetLoader">
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<property name="ruleService" ref="RuleService" />
|
||||
<property name="restRuleModelMapper" ref="ruleMapper" />
|
||||
</bean>
|
||||
|
||||
<bean id="ruleSets" class="org.alfresco.rest.api.impl.rules.RuleSetsImpl">
|
||||
|
@@ -90,6 +90,7 @@ public class RuleSetLoaderTest extends TestCase
|
||||
given(nodeServiceMock.getParentAssocs(RULE_SET_NODE)).willReturn(List.of(ruleSetAssociationMock, linkAssociationMock));
|
||||
|
||||
given(ruleServiceMock.getFoldersInheritingRuleSet(eq(RULE_SET_NODE), anyInt())).willReturn(List.of(INHERITING_FOLDER));
|
||||
given(ruleServiceMock.getFoldersLinkingToRuleSet(RULE_SET_NODE)).willReturn(List.of(LINKING_FOLDER));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>17.141-SNAPSHOT</version>
|
||||
<version>17.146</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -25,7 +25,6 @@
|
||||
*/
|
||||
package org.alfresco.repo.descriptor;
|
||||
|
||||
import java.security.Principal;
|
||||
import java.util.Date;
|
||||
import java.util.Properties;
|
||||
|
||||
@@ -125,6 +124,15 @@ public class DescriptorStartupLog extends AbstractLifecycleBean
|
||||
{
|
||||
msg += ", NO CLUSTER";
|
||||
}
|
||||
|
||||
if(license.isCustomEmbeddedWorkflowEnabled())
|
||||
{
|
||||
msg += ", customEmbeddedWorkflow:enabled";
|
||||
}
|
||||
else
|
||||
{
|
||||
msg += ", NO CUSTOM EMBEDDED WORKFLOW";
|
||||
}
|
||||
|
||||
String holder = license.getHolderOrganisation();
|
||||
if (holder != null)
|
||||
|
Reference in New Issue
Block a user