Compare commits

...

40 Commits

Author SHA1 Message Date
Travis CI User
1de387abc0 [maven-release-plugin][skip ci] prepare release 17.3 2022-05-24 09:24:54 +00:00
Damian Ujma
83e06193d1 ACS-2800: Replace throwing NPE to CmisInvalidArgumentException (#1130)
* ACS-2800 Throw CmisInvalidArgumentException if type cannot be found

* ACS-2800 Reformat code
2022-05-24 10:43:09 +02:00
Travis CI User
02a2d88712 [maven-release-plugin][skip ci] prepare for next development iteration 2022-05-22 00:09:24 +00:00
Travis CI User
589b99e17d [maven-release-plugin][skip ci] prepare release 17.2 2022-05-22 00:09:21 +00:00
Alfresco CI User
74d8b50ac0 [force] Force release for 2022-05-22. 2022-05-22 00:03:24 +00:00
alandavis
906b6d4e5d amp.min.version needs to be 7.0.0 not 7.1.0 as was the case for 23.1 (which starts at 1 rather than 0)
[skip ci] as it is okay for now
2022-05-19 18:41:15 +01:00
Travis CI User
5f90fd945f [maven-release-plugin][skip ci] prepare for next development iteration 2022-05-19 15:41:42 +00:00
Travis CI User
3670437c2e [maven-release-plugin][skip ci] prepare release 17.1 2022-05-19 15:41:37 +00:00
alandavis
a128916bb4 Use 17.1-SNAPSHOT for ACS 7.3.0
[skip tests] as we have just run them
[no downstream] as we want to skip tests in enterprise repo too
2022-05-19 16:35:40 +01:00
Travis CI User
ea7de7e1e7 [maven-release-plugin][skip ci] prepare for next development iteration 2022-05-19 12:02:38 +00:00
Travis CI User
11acd44283 [maven-release-plugin][skip ci] prepare release 16.1 2022-05-19 12:02:35 +00:00
alandavis
af41e4b54c Change Master branch to 7.3.0 2022-05-19 12:09:27 +01:00
Travis CI User
cf8f27721a [maven-release-plugin][skip ci] prepare for next development iteration 2022-05-17 21:00:09 +00:00
Travis CI User
f04b1d2e33 [maven-release-plugin][skip ci] prepare release 23.1.0.30 2022-05-17 21:00:06 +00:00
montgolfiere
1f9e861e03 ACS-2925: Elasticsearch - refactor DB switching to not use Solr-specific properties / debug log (#1089)
* ACS-2925: Elasticsearch - refactor DB switching to not use Solr-specific properties / debug log

- as per TP suggestion, thanks

- new generic query.* props

  - query.cmis.queryConsistency
  - query.fts.queryConsistency
  - query.hybrid.enabled

- deprecate current solr.query.* props (eg. upgrade)

  - solr.query.cmis.queryConsistency
  - solr.query.fts.queryConsistency
  - solr.query.hybrid.enabled


- another attempt using two inject properties (deprecated + new). See option C1 in ACS-2925

- also unrelated lic header change (LocalPipelineTransform.java) to fix build warning
2022-05-17 21:22:00 +01:00
Marcin Strankowski
f5c1e26a9b ACS-2850: fix for intermittent failure on expiryLock test (#1083)
* ACS-2850: fix for intermittent failure on expiryLock test

First issue was int rounding of '(expirationDate - new Date())/1000', which for really close values of timeout set and passed through lockInfo could be rounded down to 0. Replaced by a rounding up formula.

Second issue was treating timeout == 0 as timeout.infinite. WebDav Infinite timeout has it's own marker "-1", in case of 0, lock was automatically turned into infinite time lock, while it should be an exception instead as creating a lock for 0s timeout is a programming error - the lock would immediatelly be expired upon creation (perhaps even with a date in the past, seeing as the expiryDate is filled).
Changes made clarify the intent behind calling the method instead of obfuscating it by passing the int value through date operations
2022-05-17 17:10:32 +02:00
Travis CI User
cd8b3594aa [maven-release-plugin][skip ci] prepare for next development iteration 2022-05-17 14:03:53 +00:00
Travis CI User
57e3c09981 [maven-release-plugin][skip ci] prepare release 23.1.0.29 2022-05-17 14:03:51 +00:00
mikolajbrzezinski
1ccb8a2164 Mnt 22905/case sensitive query fix (#1107)
* useCQ = true

* useCQ back to original

* useCQ = true

* Copyright Update

* useCQ restored, Javascrpit changed

* Javascript changes to filter

* PR comments requested change

* Revert "PR comments requested change"

This reverts commit 0673b6c3ff.

* Revert "useCQ restored, Javascrpit changed"

This reverts commit 00b79b5aca.

* Revert "Copyright Update"

This reverts commit 76d1f1c005.

* Revert "useCQ = true"

This reverts commit 215ad952f5.

* Revert "useCQ back to original"

This reverts commit deb5e82218.

* Revert "useCQ = true"

This reverts commit 115910ffc1.

* test change

* Initial changes

* Further changes

* Space deleted

* jobtitle search

* Restore check sorting and mock

* Avoid null [hint:useCQ]

* Wrong sign

* Fix

* Clean up

* Initial changes

* Rename Method
2022-05-17 15:17:56 +02:00
Travis CI User
26c412bd80 [maven-release-plugin][skip ci] prepare for next development iteration 2022-05-15 00:10:01 +00:00
Travis CI User
e4552968c6 [maven-release-plugin][skip ci] prepare release 23.1.0.28 2022-05-15 00:09:59 +00:00
Alfresco CI User
2fa31de761 [force] Force release for 2022-05-15. 2022-05-15 00:03:21 +00:00
alandavis
04ae83c74c Revert "ACS-2864 Use maven props in AGS test version.properties so we don't have to update the value"
This reverts commit b36e21ad04.
2022-05-09 17:13:50 +01:00
alandavis
b36e21ad04 ACS-2864 Use maven props in AGS test version.properties so we don't have to update the value
(cherry picked from commit 4a4bb2de02)
2022-05-09 16:22:37 +01:00
Travis CI User
9a615b50ea [maven-release-plugin][skip ci] prepare for next development iteration 2022-05-09 11:58:37 +00:00
Travis CI User
169e5efca2 [maven-release-plugin][skip ci] prepare release 23.1.0.27 2022-05-09 11:58:35 +00:00
kcichonczyk
8edfd4bdce [ACS-2747] Prevent private action execution from the V1 HTTP API. Added end-to-end test method. (#1108) 2022-05-09 13:14:10 +02:00
Travis CI User
810cd9f067 [maven-release-plugin][skip ci] prepare for next development iteration 2022-05-06 04:36:18 +00:00
Travis CI User
63f5bc534b [maven-release-plugin][skip ci] prepare release 23.1.0.26 2022-05-06 04:36:15 +00:00
Sbisht19
ebb6e333d3 Origin/feature/apps 1164 alfresco logs (#1102)
* Added test group for alfresco logs test cases to make them skipped in single pipeline

* Added import statement for TestGroup

* Added import statement for TestGroup

Co-authored-by: Suneet Gupta <suneet.gupta@hyland.com>
2022-05-05 20:57:57 +05:30
Travis CI User
8f141aed1e [maven-release-plugin][skip ci] prepare for next development iteration 2022-05-04 11:22:08 +00:00
Travis CI User
2a734c5a78 [maven-release-plugin][skip ci] prepare release 23.1.0.25 2022-05-04 11:22:05 +00:00
evasques
a7cceff6bf MNT-22968 - Bump Freemarker (#1093) 2022-05-04 10:39:33 +01:00
Alfresco CI User
7cafcb6a6b [force] Force release for 2022-05-01. 2022-05-01 00:03:58 +00:00
Travis CI User
652e10e5a3 [maven-release-plugin][skip ci] prepare for next development iteration 2022-04-24 00:10:33 +00:00
Travis CI User
ea7a1631c2 [maven-release-plugin][skip ci] prepare release 23.1.0.24 2022-04-24 00:10:31 +00:00
Alfresco CI User
e18aab83c5 [force] Force release for 2022-04-24. 2022-04-24 00:03:07 +00:00
Travis CI User
d6dce92351 [maven-release-plugin][skip ci] prepare for next development iteration 2022-04-22 13:06:28 +00:00
Travis CI User
5c31774753 [maven-release-plugin][skip ci] prepare release 23.1.0.23 2022-04-22 13:06:26 +00:00
alandavis
e331e4bd08 ACS-2768 tidy up start-compose.sh 2022-04-22 13:21:44 +01:00
62 changed files with 1478 additions and 1240 deletions

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<build>

View File

@@ -73,6 +73,7 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.alfresco.utility.model.TestGroup;
/**
* API tests for declaring document as record and filing it immediately to a record folder location within the file plan
@@ -257,7 +258,7 @@ public class DeclareAndFileDocumentAsRecordTests extends BaseRMRestTest
* Then I receive an error indicating that I have attempted to declare and file a document into an invalid record folder
* And the document is not declared as a record
*/
@Test (dataProvider = "invalidDestinationPaths")
@Test (dataProvider = "invalidDestinationPaths",groups = { TestGroup.NOT_SUPPORTED_ON_SINGLE_PIPELINE })
public void declareAndFileToInvalidLocationUsingActionsAPI(String containerPath, String expectedException) throws Exception
{
STEP("Declare document as record with an invalid location parameter value");

View File

@@ -62,6 +62,7 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.alfresco.utility.model.TestGroup;
/**
* API tests for declaring a document version as record and filing to a record folder location within the file plan
@@ -207,7 +208,7 @@ public class FileVersionAsRecordTests extends BaseRMRestTest
* record folder
* And the document is not declared as a version record
*/
@Test (dataProvider = "invalidDestinationPaths")
@Test (dataProvider = "invalidDestinationPaths", groups = { TestGroup.NOT_SUPPORTED_ON_SINGLE_PIPELINE })
public void declareVersionAndFileToInvalidLocationUsingActionsAPI(String containerPath, String expectedException) throws Exception
{
STEP("Declare document as record version with an invalid location parameter value");

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<properties>

View File

@@ -3,8 +3,8 @@
#
# Version label
version.major=23
version.minor=1
version.major=7
version.minor=3
version.revision=0
version.label=
@@ -15,4 +15,4 @@ version.edition=Community
version.scmrevision=@scm-path@-r@scm-revision@
# Build number
version.build=r@scm-revision@-b@build-number@
version.build=r@scm-revision@-b@build-number@

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<build>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<properties>

View File

@@ -78,6 +78,10 @@ public class ObjectTypeIdLuceneBuilder extends BaseLuceneBuilder
String field = getLuceneFieldName();
String stringValue = getValueAsString(value);
TypeDefinitionWrapper type = cmisDictionaryService.findType(stringValue);
if (type == null)
{
throw new CmisInvalidArgumentException("Unknown type: " + stringValue);
}
return lqpa
.getFieldQuery(field, type.getAlfrescoClass().toString(), AnalysisMode.IDENTIFIER, luceneFunction);
}

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<dependencies>

View File

@@ -9,6 +9,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
</project>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<modules>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<modules>

View File

@@ -27,11 +27,11 @@ fi
echo "Starting ACS stack in ${DOCKER_COMPOSE_PATH}"
TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)
TRANSFORM_ROUTER_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-service.version -q -DforceStdout)
export TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)
export TRANSFORM_ROUTER_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-service.version -q -DforceStdout)
# .env files are picked up from project directory correctly on docker-compose 1.23.0+
TRANSFORMERS_TAG=${TRANSFORMERS_TAG} TRANSFORM_ROUTER_TAG=${TRANSFORM_ROUTER_TAG} docker-compose --file "${DOCKER_COMPOSE_PATH}" --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
docker-compose --file "${DOCKER_COMPOSE_PATH}" --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
if [ $? -eq 0 ]
then

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<developers>

View File

@@ -11,6 +11,7 @@ import org.alfresco.rest.model.RestActionDefinitionModelsCollection;
import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.utility.Utility;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.TestGroup;
import org.alfresco.utility.model.UserModel;
@@ -21,10 +22,14 @@ import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.Properties;
public class ActionsTests extends RestTest
{
private UserModel adminUser;
private FileModel document;
private FolderModel folder;
private FileModel randomFile;
private SiteModel publicSite;
@BeforeClass(alwaysRun = true)
@@ -33,6 +38,8 @@ public class ActionsTests extends RestTest
adminUser = dataUser.getAdminUser();
publicSite = dataSite.createPublicRandomSite();
document = dataContent.usingSite(publicSite).usingUser(adminUser).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
folder = dataContent.usingUser(adminUser).createFolder();
randomFile = dataContent.usingUser(adminUser).usingResource(folder).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
}
@TestRail(section = { TestGroup.REST_API,TestGroup.ACTIONS }, executionType = ExecutionType.SANITY,
@@ -106,6 +113,22 @@ public class ActionsTests extends RestTest
});
}
@TestRail(section = { TestGroup.REST_API,TestGroup.ACTIONS }, executionType = ExecutionType.SANITY,
description = "Test for private action execution from POST api/-default-/public/alfresco/versions/1/action-executions, should not be possible to execute private action using V1 REST API")
@Test(groups = { TestGroup.REST_API, TestGroup.ACTIONS, TestGroup.SANITY})
public void executePrivateActionV1RESTAPI() throws Exception
{
// 'count-children' action is expected to be private (not exposed) by default
String actionDefinitionId = "count-children";
JSONObject response = restClient.authenticateUser(adminUser)
.withCoreAPI()
.usingActions()
.executeAction(actionDefinitionId, folder);
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);
restClient.assertLastError().containsSummary("Action '" + actionDefinitionId + "' is not exposed within 'http-v1' execution source.");
}
@TestRail (section = { TestGroup.REST_API, TestGroup.ACTIONS }, executionType = ExecutionType.SANITY,
description = "Sanity test for POST /action-executions")
@Test (groups = { TestGroup.REST_API, TestGroup.ACTIONS, TestGroup.SANITY })
@@ -141,7 +164,7 @@ public class ActionsTests extends RestTest
withCoreAPI().
usingActions().
getActionDefinitionById("add-features");
restClient.assertStatusCodeIs(HttpStatus.OK);
assertFalse(restActionDefinition.getId().isEmpty());
restActionDefinition.getId().equals("add-features");

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<developers>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<properties>

10
pom.xml
View File

@@ -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>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -23,11 +23,11 @@
</modules>
<properties>
<acs.version.major>23</acs.version.major>
<acs.version.minor>1</acs.version.minor>
<acs.version.major>7</acs.version.major>
<acs.version.minor>3</acs.version.minor>
<acs.version.revision>0</acs.version.revision>
<acs.version.label />
<amp.min.version>${acs.version.major}.1.0</amp.min.version>
<amp.min.version>${acs.version.major}.0.0</amp.min.version>
<version.edition>Community</version.edition>
<licenseName>community</licenseName>
@@ -147,7 +147,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.3</tag>
</scm>
<distributionManagement>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<dependencies>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 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
@@ -390,8 +390,9 @@ public class LockInfoImpl implements Serializable, LockInfo
else
{
Date now = dateNow();
long timeout = ((expires.getTime() - now.getTime()) / 1000);
return timeout;
long remainingTimeoutInSecondsRoundedUp = (Math.max(expires.getTime() - now.getTime(), 0) + 999) / 1000;
return remainingTimeoutInSecondsRoundedUp;
}
}

View File

@@ -1,28 +1,28 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 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%
*/
/*
* #%L
* Alfresco Remote API
* %%
* 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.repo.webdav;
import java.util.Date;
@@ -449,30 +449,18 @@ public class LockMethod extends WebDAVMethod
*/
protected final void createLock(FileInfo lockNode, String userName) throws WebDAVServerException
{
// Create Lock token
lockToken = WebDAV.makeLockToken(lockNode.getNodeRef(), userName);
if (createExclusive)
{
// Lock the node
lockInfo.setTimeoutSeconds(getLockTimeout());
lockInfo.setExclusiveLockToken(lockToken);
}
else
{
if (!createExclusive) {
// Shared lock creation should already have been prohibited when parsing the request body
throw new WebDAVServerException(HttpServletResponse.SC_PRECONDITION_FAILED);
}
// Store lock depth
lockToken = WebDAV.makeLockToken(lockNode.getNodeRef(), userName);
lockInfo.setExclusiveLockToken(lockToken);
lockInfo.setDepth(WebDAV.getDepthName(m_depth));
// Store lock scope (shared/exclusive)
String scope = createExclusive ? WebDAV.XML_EXCLUSIVE : WebDAV.XML_SHARED;
lockInfo.setScope(scope);
// Store the owner of this lock
lockInfo.setScope(WebDAV.XML_EXCLUSIVE);
lockInfo.setOwner(userName);
// Lock the node
getDAVLockService().lock(lockNode.getNodeRef(), lockInfo);
getDAVLockService().lock(lockNode.getNodeRef(), lockInfo, getLockTimeout());
if (logger.isDebugEnabled())
{

View File

@@ -1,28 +1,28 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 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%
*/
/*
* #%L
* Alfresco Remote API
* %%
* 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.repo.webdav;
@@ -56,7 +56,9 @@ public interface WebDAVLockService
void lock(NodeRef nodeRef, String userName, int timeout);
void lock(NodeRef nodeRef, LockInfo lockInfo);
void lock(NodeRef nodeRef, LockInfo lockInfo, int timeout);
/**
* Shared method for webdav/vti to unlock node. Unlocked node is automatically removed from
* current sessions's locked resources list.

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 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
@@ -32,7 +32,6 @@ import java.util.List;
import javax.servlet.http.HttpSession;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.lock.LockUtils;
import org.alfresco.repo.lock.mem.Lifetime;
import org.alfresco.repo.lock.mem.LockState;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
@@ -237,57 +236,15 @@ public class WebDAVLockServiceImpl implements WebDAVLockService
}
}
public void lock(NodeRef nodeRef, LockInfo lockInfo)
{
boolean performSessionBehavior = false;
long timeout;
timeout = lockInfo.getRemainingTimeoutSeconds();
// ALF-11777 fix, do not lock node for more than 24 hours (webdav and vti)
if (timeout >= WebDAV.TIMEOUT_24_HOURS || timeout == WebDAV.TIMEOUT_INFINITY)
{
timeout = WebDAV.TIMEOUT_24_HOURS;
lockInfo.setTimeoutSeconds((int) timeout);
performSessionBehavior = true;
}
// TODO: lock children according to depth? lock type?
final String additionalInfo = lockInfo.toJSON();
lockService.lock(nodeRef, LockType.WRITE_LOCK, (int) timeout, Lifetime.EPHEMERAL, additionalInfo);
if (logger.isDebugEnabled())
{
logger.debug(nodeRef + " was locked for " + timeout + " seconds.");
}
if (performSessionBehavior)
{
HttpSession session = currentSession.get();
if (session == null)
{
if (logger.isDebugEnabled())
{
logger.debug("Couldn't find current session.");
}
return;
}
storeObjectInSessionList(session, LOCKED_RESOURCES, new Pair<String, NodeRef>(AuthenticationUtil.getRunAsUser(), nodeRef));
if (logger.isDebugEnabled())
{
logger.debug(nodeRef + " was added to the session " + session.getId() + " for post expiration processing.");
}
}
public void lock(NodeRef nodeRef, LockInfo lockInfo) {
int timeout = (int) lockInfo.getRemainingTimeoutSeconds();
lock(nodeRef, lockInfo, timeout);
}
/**
* Shared method for webdav/vti protocols to lock node. If node is locked for more than 24 hours it is automatically added
* to the current session locked resources list.
*
*
* @param nodeRef the node to lock
* @param userName userName
* @param timeout the number of seconds before the locks expires
@@ -295,8 +252,68 @@ public class WebDAVLockServiceImpl implements WebDAVLockService
@Override
public void lock(NodeRef nodeRef, String userName, int timeout)
{
LockInfo lockInfo = createLock(nodeRef, userName, true, timeout);
lock(nodeRef, lockInfo);
LockInfo lockInfo = createLock(nodeRef, userName, true);
lock(nodeRef, lockInfo, timeout);
}
public void lock(NodeRef nodeRef, LockInfo lockInfo, int timeout)
{
// ALF-11777 fix, do not lock node for more than 24 hours (webdav and vti)
boolean performSessionBehavior = false;
if (timeout > WebDAV.TIMEOUT_24_HOURS || timeout == WebDAV.TIMEOUT_INFINITY)
{
timeout = WebDAV.TIMEOUT_24_HOURS;
performSessionBehavior = true;
}
validateLockTimeout(timeout);
lockInner(nodeRef, lockInfo, timeout);
if (performSessionBehavior)
{
performLockSessionBehavior(nodeRef);
}
}
private void validateLockTimeout(int timeout) {
if (timeout != WebDAV.TIMEOUT_INFINITY && timeout == LockService.TIMEOUT_INFINITY) {
throw new IllegalArgumentException("Timeout == " + LockService.TIMEOUT_INFINITY +
" is treated as permanence for locks. For maximum allowed timeout set " + WebDAV.TIMEOUT_INFINITY);
}
}
private void lockInner(NodeRef nodeRef, LockInfo lockInfo, int timeout) {
//Update/set true expiry date of a lock to be used in additional information
lockInfo.setTimeoutSeconds(timeout);
// TODO: lock children according to depth? lock type?
final String additionalInfo = lockInfo.toJSON();
lockService.lock(nodeRef, LockType.WRITE_LOCK, timeout, Lifetime.EPHEMERAL, additionalInfo);
if (logger.isDebugEnabled())
{
logger.debug(nodeRef + " was locked for " + timeout + " seconds.");
}
}
private void performLockSessionBehavior(NodeRef nodeRef) {
HttpSession session = currentSession.get();
if (session == null)
{
if (logger.isDebugEnabled())
{
logger.debug("Couldn't find current session.");
}
return;
}
storeObjectInSessionList(session, LOCKED_RESOURCES, new Pair<String, NodeRef>(AuthenticationUtil.getRunAsUser(), nodeRef));
if (logger.isDebugEnabled())
{
logger.debug(nodeRef + " was added to the session " + session.getId() + " for post expiration processing.");
}
}
/**
@@ -444,19 +461,15 @@ public class WebDAVLockServiceImpl implements WebDAVLockService
* @param nodeRef NodeRef
* @param userName String
* @param createExclusive boolean
* @param timeoutSecs int
*/
private LockInfo createLock(NodeRef nodeRef, String userName, boolean createExclusive, int timeoutSecs)
private LockInfo createLock(NodeRef nodeRef, String userName, boolean createExclusive)
{
// Create Lock token
String lockToken = WebDAV.makeLockToken(nodeRef, userName);
LockInfo lockInfo = new LockInfoImpl();
if (createExclusive)
{
// Lock the node
lockInfo.setTimeoutSeconds(timeoutSecs);
lockInfo.setExclusiveLockToken(lockToken);
}
else
@@ -464,15 +477,11 @@ public class WebDAVLockServiceImpl implements WebDAVLockService
lockInfo.addSharedLockToken(lockToken);
}
// Store lock depth
lockInfo.setDepth(WebDAV.getDepthName(WebDAV.DEPTH_INFINITY));
// Store lock scope (shared/exclusive)
String scope = createExclusive ? WebDAV.XML_EXCLUSIVE : WebDAV.XML_SHARED;
lockInfo.setScope(scope);
// Store the owner of this lock
lockInfo.setOwner(userName);
// TODO: to help with debugging/refactoring (remove later)
String currentUser = AuthenticationUtil.getFullyAuthenticatedUser();
if (!currentUser.equals(userName))
{

View File

@@ -26,11 +26,14 @@
package org.alfresco.rest.api.impl;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.action.ActionExecutionContext;
import org.alfresco.repo.action.RuntimeActionService;
import org.alfresco.rest.api.Actions;
import org.alfresco.rest.api.model.Action;
import org.alfresco.rest.api.model.ActionDefinition;
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
import org.alfresco.rest.framework.core.exceptions.PermissionDeniedException;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rest.framework.resource.parameters.SortColumn;
@@ -72,6 +75,9 @@ public class ActionsImpl implements Actions
private NamespaceService namespaceService;
private NodeService nodeService;
private NamespacePrefixResolver prefixResolver;
private RuntimeActionService runtimeActionService;
private final String HTTP_V1_EXECUTION_SOURCE = "http-v1";
public void setActionService(ActionService actionService)
{
@@ -98,6 +104,11 @@ public class ActionsImpl implements Actions
this.prefixResolver = prefixResolver;
}
public void setRuntimeActionService(RuntimeActionService runtimeActionService)
{
this.runtimeActionService = runtimeActionService;
}
@Override
public ActionDefinition getActionDefinitionById(String actionDefinitionId)
{
@@ -263,6 +274,16 @@ public class ActionsImpl implements Actions
throw new EntityNotFoundException(action.getActionDefinitionId());
}
final ActionExecutionContext actionExecutionContext = ActionExecutionContext
.builder(actionDef.getName())
.withExecutionSource(HTTP_V1_EXECUTION_SOURCE)
.build();
if (!runtimeActionService.isExposed(actionExecutionContext))
{
throw new PermissionDeniedException("Action '" + actionDef.getName() + "' is not exposed within '" + HTTP_V1_EXECUTION_SOURCE + "' execution source.");
}
// targetId is optional, however, currently targetId must be a valid node ID.
NodeRef actionedUponNodeRef = null;
if (action.getTargetId() != null && !action.getTargetId().isEmpty())

View File

@@ -566,6 +566,7 @@
<property name="namespaceService" ref="NamespaceService"/>
<property name="nodeService" ref="NodeService"/>
<property name="prefixResolver" ref="namespaceService"/>
<property name="runtimeActionService" ref="actionService"/>
</bean>
<bean id="Actions" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces" value="org.alfresco.rest.api.Actions"/>

View File

@@ -3,6 +3,7 @@ function main()
// Get the args
var filter = args["filter"];
if (filter!==null && !filter.includes(":")) {filter += " [hint:useCQ]";}
var maxResults = args["maxResults"];
var skipCountStr = args["skipCount"];
var skipCount = skipCountStr != null ? parseInt(skipCountStr) : -1;

View File

@@ -3,7 +3,7 @@ function main()
// Get the args
var siteShortName = url.templateArgs.shortname,
site = siteService.getSite(siteShortName),
filter = (args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "",
filter = ((args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "" )+ " [hint:useCQ]",
maxResults = (args.maxResults == null) ? 10 : parseInt(args.maxResults, 10),
authorityType = args.authorityType,
zone = args.zone,

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.0.23-SNAPSHOT</version>
<version>17.3</version>
</parent>
<dependencies>
@@ -236,7 +236,7 @@
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.20-alfresco-patched-20200421</version>
<version>2.3.20-alfresco-patched-20220413</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2019-2022 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

View File

@@ -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
@@ -321,7 +321,7 @@ public class LockServiceImpl implements LockService,
public void lock(NodeRef nodeRef, LockType lockType)
{
// Lock with no expiration
lock(nodeRef, lockType, 0);
lock(nodeRef, lockType, TIMEOUT_INFINITY);
}
/**
@@ -371,16 +371,8 @@ public class LockServiceImpl implements LockService,
public void lock(NodeRef nodeRef, LockType lockType, int timeToExpire, Lifetime lifetime, String additionalInfo)
{
invokeBeforeLock(nodeRef, lockType);
if (lifetime.equals(Lifetime.EPHEMERAL) && (timeToExpire > MAX_EPHEMERAL_LOCK_SECONDS))
{
throw new IllegalArgumentException("Attempt to create ephemeral lock for " +
timeToExpire + " seconds - exceeds maximum allowed time.");
}
if (lifetime.equals(Lifetime.EPHEMERAL) && (timeToExpire > ephemeralExpiryThreshold))
{
lifetime = Lifetime.PERSISTENT;
}
validateTimeToExpire(timeToExpire, lifetime);
lifetime = switchLifetimeMode(timeToExpire, lifetime);
nodeRef = tenantService.getName(nodeRef);
@@ -442,6 +434,22 @@ public class LockServiceImpl implements LockService,
}
}
}
private void validateTimeToExpire(int timeToExpire, Lifetime lifetime) {
if (lifetime.equals(Lifetime.EPHEMERAL) && (timeToExpire > MAX_EPHEMERAL_LOCK_SECONDS))
{
throw new IllegalArgumentException("Attempt to create ephemeral lock for " +
timeToExpire + " seconds - exceeds maximum allowed time.");
}
}
private Lifetime switchLifetimeMode(int timeToExpire, Lifetime lifetime) {
if (lifetime.equals(Lifetime.EPHEMERAL) && (timeToExpire > ephemeralExpiryThreshold))
{
return Lifetime.PERSISTENT;
}
return lifetime;
}
private void persistLockProps(NodeRef nodeRef, LockType lockType, Lifetime lifetime, String userName, Date expiryDate, String additionalInfo)
{
@@ -468,16 +476,16 @@ public class LockServiceImpl implements LockService,
*/
private Date makeExpiryDate(int timeToExpire)
{
// Set the expiry date
Date expiryDate = null;
if (timeToExpire > 0)
{
expiryDate = new Date();
Calendar calendar = Calendar.getInstance();
calendar.setTime(expiryDate);
calendar.add(Calendar.SECOND, timeToExpire);
expiryDate = calendar.getTime();
boolean permanent = timeToExpire <= TIMEOUT_INFINITY;
if (permanent) {
return null;
}
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.SECOND, timeToExpire);
Date expiryDate = calendar.getTime();
return expiryDate;
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 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
@@ -23,7 +23,7 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.search.impl.solr;
package org.alfresco.repo.search.impl;
import org.alfresco.opencmis.dictionary.CMISDictionaryService;
import org.alfresco.opencmis.search.CMISQueryOptions;

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 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
@@ -23,7 +23,7 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.search.impl.solr;
package org.alfresco.repo.search.impl;
import java.util.ArrayList;
import java.util.HashSet;
@@ -36,6 +36,7 @@ import org.alfresco.repo.domain.solr.SearchDAO;
import org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryLanguage;
import org.alfresco.repo.search.impl.lucene.LuceneQueryLanguageSPI;
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
import org.alfresco.repo.search.impl.solr.SolrJSONResultSet;
import org.alfresco.repo.search.results.ChildAssocRefResultSet;
import org.alfresco.repo.solr.NodeParameters;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
@@ -61,12 +62,16 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
LuceneQueryLanguageSPI indexQueryLanguage;
QueryConsistency queryConsistency = QueryConsistency.DEFAULT;
QueryConsistency solrQueryConsistency = null; // Deprecated
private NodeService nodeService;
private SearchDAO searchDao;
private boolean hybridEnabled;
private Boolean hybridEnabled;
private Boolean solrHybridEnabled; // Deprecated
private String subsystemName;
/**
* @param dbQueryLanguage the dbQueryLanguage to set
@@ -92,6 +97,12 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
this.queryConsistency = queryConsistency;
}
// Deprecated
public void setSolrQueryConsistency(QueryConsistency solrQueryConsistency)
{
this.solrQueryConsistency = solrQueryConsistency;
}
/**
* @param nodeService the nodeService to set
*/
@@ -105,17 +116,35 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
this.searchDao = searchDao;
}
public void setHybridEnabled(boolean hybridEnabled)
public void setHybridEnabled(Boolean hybridEnabled)
{
this.hybridEnabled = hybridEnabled;
}
// Deprecated
public void setSolrHybridEnabled(Boolean solrHybridEnabled)
{
this.solrHybridEnabled = solrHybridEnabled;
}
public void setSubsystemName(String subsystemName)
{
this.subsystemName = subsystemName;
}
public ResultSet executeQuery(SearchParameters searchParameters)
{
QueryConsistency consistency = searchParameters.getQueryConsistency();
if(consistency == QueryConsistency.DEFAULT)
{
consistency = queryConsistency;
if(solrQueryConsistency != null)
{
consistency = solrQueryConsistency;
}
else
{
consistency = queryConsistency;
}
}
switch(consistency)
@@ -125,7 +154,7 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
{
if(logger.isDebugEnabled())
{
logger.debug("Using SOLR query: "+dbQueryLanguage.getName()+" for "+searchParameters);
logger.debug("Using "+subsystemName+" query: "+dbQueryLanguage.getName()+" for "+searchParameters);
}
StopWatch stopWatch = new StopWatch("index only");
stopWatch.start();
@@ -133,7 +162,7 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
stopWatch.stop();
if (logger.isDebugEnabled())
{
logger.debug("SOLR returned " + results.length() + " results in " +
logger.debug(subsystemName+" returned " + results.length() + " results in " +
stopWatch.getLastTaskTimeMillis() + "ms");
}
return results;
@@ -165,7 +194,7 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
throw new QueryModelException("No query language available");
}
case HYBRID:
if (!hybridEnabled)
if (((solrHybridEnabled != null) && (!solrHybridEnabled)) || (hybridEnabled == null) || (!hybridEnabled))
{
throw new DisabledFeatureException("Hybrid query is disabled.");
}
@@ -209,7 +238,7 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
{
if(logger.isDebugEnabled())
{
logger.debug("Using SOLR query: "+dbQueryLanguage.getName()+" for "+searchParameters);
logger.debug("Using "+subsystemName+" query: "+dbQueryLanguage.getName()+" for "+searchParameters);
}
stopWatch.start();
@@ -218,7 +247,7 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
stopWatch.stop();
if (logger.isDebugEnabled())
{
logger.debug("SOLR returned " + results.length() + " results in " +
logger.debug(subsystemName+" returned " + results.length() + " results in " +
stopWatch.getLastTaskTimeMillis() + "ms");
}
return results;
@@ -231,14 +260,14 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
{
if(logger.isDebugEnabled())
{
logger.debug("(No DB QL) Using SOLR query: "+"dbQueryLanguage==null"+" for "+searchParameters);
logger.debug("(No DB QL) Using "+subsystemName+" query: "+"dbQueryLanguage==null"+" for "+searchParameters);
}
stopWatch.start();
ResultSet results = indexQueryLanguage.executeQuery(searchParameters);
stopWatch.stop();
if (logger.isDebugEnabled())
{
logger.debug("SOLR returned " + results.length() + " results in " +
logger.debug(subsystemName+" returned " + results.length() + " results in " +
stopWatch.getLastTaskTimeMillis() + "ms");
}
return results;
@@ -282,21 +311,21 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
{
if (indexQueryLanguage == null || dbQueryLanguage == null)
{
throw new QueryModelException("Both index and DB query language required for hybrid search [index=" +
throw new QueryModelException("Both "+subsystemName+" and DB query language required for hybrid search [index=" +
indexQueryLanguage + ", DB=" + dbQueryLanguage + "]");
}
StopWatch stopWatch = new StopWatch("hybrid search");
if (logger.isDebugEnabled())
{
logger.debug("Hybrid search, using SOLR query: "+dbQueryLanguage.getName()+" for "+searchParameters);
logger.debug("Hybrid search, using "+subsystemName+" query: "+dbQueryLanguage.getName()+" for "+searchParameters);
}
stopWatch.start("index query");
ResultSet indexResults = indexQueryLanguage.executeQuery(searchParameters);
stopWatch.stop();
if (logger.isDebugEnabled())
{
logger.debug("SOLR query returned " + indexResults.length() + " results in " +
logger.debug(subsystemName+" query returned " + indexResults.length() + " results in " +
stopWatch.getLastTaskTimeMillis() + "ms");
}
// TODO: if the results are up-to-date, then nothing more to do - return the results.
@@ -305,7 +334,7 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
{
if (logger.isWarnEnabled())
{
logger.warn("Hybrid search can only use database when SOLR is also in use. " +
logger.warn("Hybrid search can only use database when "+subsystemName+" is also in use. " +
"Skipping DB search, returning results from index.");
}
return indexResults;
@@ -345,7 +374,7 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
{
nodeRefs.add(n.getNodeRef());
}
// Only use the SOLR results for nodes that haven't changed since indexing.
// Only use the Search Index results for nodes that haven't changed since indexing.
for (ChildAssociationRef car : indexResults.getChildAssocRefs())
{
if (!nodeRefs.contains(car.getChildRef()))
@@ -360,7 +389,7 @@ public class DbOrIndexSwitchingQueryLanguage extends AbstractLuceneQueryLanguage
stopWatch.stop(); // merge result sets
if (logger.isDebugEnabled())
{
String stats = String.format("SOLR=%d, DB=%d, total=%d",
String stats = String.format(subsystemName+"=%d, DB=%d, total=%d",
indexResults.length(), dbResults.length(), results.length());
logger.debug("Hybrid search returning combined results with counts: " + stats);
logger.debug(stopWatch.prettyPrint());

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 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
@@ -23,19 +23,19 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.search.impl.solr;
/**
* Identifies an attempt to use a disabled feature.
*
* @author Matt Ward
*/
public class DisabledFeatureException extends RuntimeException
{
private static final long serialVersionUID = 1L;
DisabledFeatureException(String message)
{
super(message);
}
package org.alfresco.repo.search.impl;
/**
* Identifies an attempt to use a disabled feature.
*
* @author Matt Ward
*/
public class DisabledFeatureException extends RuntimeException
{
private static final long serialVersionUID = 1L;
DisabledFeatureException(String message)
{
super(message);
}
}

View File

@@ -1,29 +1,29 @@
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 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.repo.search.impl.solr;
/*
* #%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.repo.search.impl;
import java.util.HashMap;
import java.util.Map;
@@ -52,19 +52,19 @@ import org.apache.chemistry.opencmis.commons.enums.CapabilityQuery;
/**
* @author Andy
*/
public class SolrOpenCMISQueryServiceImpl implements CMISQueryService
public class OpenCMISQueryServiceImpl implements CMISQueryService
{
private LuceneQueryLanguageSPI solrQueryLanguage;
private LuceneQueryLanguageSPI queryLanguage;
private NodeService nodeService;
private DictionaryService alfrescoDictionaryService;
private CMISDictionaryService cmisDictionaryService;
public void setSolrQueryLanguage(LuceneQueryLanguageSPI solrQueryLanguage)
public void setQueryLanguage(LuceneQueryLanguageSPI queryLanguage)
{
this.solrQueryLanguage = solrQueryLanguage;
this.queryLanguage = queryLanguage;
}
public void setNodeService(NodeService nodeService)
@@ -87,7 +87,7 @@ public class SolrOpenCMISQueryServiceImpl implements CMISQueryService
{
SearchParameters searchParameters = options.getAsSearchParmeters();
searchParameters.addExtraParameter("cmisVersion", options.getCmisVersion().toString());
ResultSet rs = solrQueryLanguage.executeQuery(searchParameters);
ResultSet rs = queryLanguage.executeQuery(searchParameters);
CapabilityJoin joinSupport = getJoinSupport();
if(options.getQueryMode() == CMISQueryOptions.CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS)

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 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
@@ -42,6 +42,8 @@ import org.alfresco.service.cmr.repository.NodeRef;
@AlfrescoPublicApi
public interface LockService
{
int TIMEOUT_INFINITY = 0;
/**
* Places a lock on a node.
* <p>

View File

@@ -4,7 +4,7 @@
<!-- Core and miscellaneous bean definitions -->
<beans>
<bean id="search.cmis.alfresco.switching" class="org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage" >
<bean id="base.search.cmis.alfresco.switching" abstract="true" class="org.alfresco.repo.search.impl.DbOrIndexSwitchingQueryLanguage">
<property name="factories">
<list>
<ref bean="search.indexerAndSearcherFactory" />
@@ -19,15 +19,19 @@
<property name="indexQueryLanguage">
<ref bean="search.cmis.alfresco.index" />
</property>
<property name="queryConsistency">
<value>${solr.query.cmis.queryConsistency}</value>
</property>
<property name="queryConsistency" value="${query.cmis.queryConsistency}"/>
<property name="solrQueryConsistency" value="${solr.query.cmis.queryConsistency}"/>
<!-- Deprecated -->
<property name="hybridEnabled" value="${query.hybrid.enabled}"/>
<property name="solrHybridEnabled" value="${solr.query.hybrid.enabled}"/>
<property name="nodeService" ref="NodeService"/>
<property name="searchDao" ref="searchDAO"/>
<property name="hybridEnabled" value="${solr.query.hybrid.enabled}"/>
</bean>
<bean id="search.cmis.alfresco.switching1.1" class="org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage" >
<bean id="base.search.cmis.alfresco.switching1.1" abstract="true" class="org.alfresco.repo.search.impl.DbOrIndexSwitchingQueryLanguage">
<property name="factories">
<list>
<ref bean="search.indexerAndSearcherFactory" />
@@ -42,12 +46,15 @@
<property name="indexQueryLanguage">
<ref bean="search.cmis.alfresco.index" />
</property>
<property name="queryConsistency">
<value>${solr.query.cmis.queryConsistency}</value>
</property>
<property name="queryConsistency" value="${query.cmis.queryConsistency}"/>
<!-- Deprecated -->
<property name="solrQueryConsistency" value="${solr.query.cmis.queryConsistency}"/>
</bean>
<bean id="search.cmis.strict.switching" class="org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage" >
<bean id="base.search.cmis.strict.switching" abstract="true" class="org.alfresco.repo.search.impl.DbOrIndexSwitchingQueryLanguage">
<property name="factories">
<list>
<ref bean="search.indexerAndSearcherFactory" />
@@ -62,15 +69,19 @@
<property name="indexQueryLanguage">
<ref bean="search.cmis.alfresco.index" />
</property>
<property name="queryConsistency">
<value>${solr.query.cmis.queryConsistency}</value>
</property>
<property name="queryConsistency" value="${query.cmis.queryConsistency}"/>
<property name="solrQueryConsistency" value="${solr.query.cmis.queryConsistency}"/>
<!-- Deprecated -->
<property name="hybridEnabled" value="${query.hybrid.enabled}"/>
<property name="solrHybridEnabled" value="${solr.query.hybrid.enabled}"/>
<property name="nodeService" ref="NodeService"/>
<property name="searchDao" ref="searchDAO"/>
<property name="hybridEnabled" value="${solr.query.hybrid.enabled}"/>
</bean>
<bean id="search.cmis.alfresco.db" class="org.alfresco.repo.search.impl.solr.DbCmisQueryLanguage" >
<bean id="search.cmis.alfresco.db" class="org.alfresco.repo.search.impl.DbCmisQueryLanguage" >
<property name="factories">
<list>
<ref bean="search.indexerAndSearcherFactory" />
@@ -90,7 +101,7 @@
</property>
</bean>
<bean id="search.cmis.alfresco.db1.1" class="org.alfresco.repo.search.impl.solr.DbCmisQueryLanguage" >
<bean id="search.cmis.alfresco.db1.1" class="org.alfresco.repo.search.impl.DbCmisQueryLanguage" >
<property name="factories">
<list>
<ref bean="search.indexerAndSearcherFactory" />

View File

@@ -64,8 +64,8 @@
</property>
<!-- Query collections should be loaded on demand using this component - once loaded thay are available for use -->
</bean>
<bean id="search.fts.alfresco.switching" class="org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguage" >
<bean id="base.search.fts.alfresco.switching" abstract="true" class="org.alfresco.repo.search.impl.DbOrIndexSwitchingQueryLanguage">
<property name="factories">
<list>
<ref bean="search.indexerAndSearcherFactory" />
@@ -80,12 +80,16 @@
<property name="indexQueryLanguage">
<ref bean="search.fts.alfresco.index" />
</property>
<property name="queryConsistency">
<value>${solr.query.fts.queryConsistency}</value>
</property>
<property name="queryConsistency" value="${query.fts.queryConsistency}"/>
<property name="solrQueryConsistency" value="${solr.query.fts.queryConsistency}"/>
<!-- Deprecated -->
<property name="hybridEnabled" value="${query.hybrid.enabled}"/>
<property name="solrHybridEnabled" value="${solr.query.hybrid.enabled}"/>
<property name="searchDao" ref="searchDAO"/>
<property name="hybridEnabled" value="${solr.query.hybrid.enabled}"/>
</bean>
</bean>
<bean id="search.fts.alfresco.db" class="org.alfresco.repo.search.impl.solr.DbAftsQueryLanguage" >
<property name="dictionaryService" ref="dictionaryService" />

View File

@@ -2,9 +2,14 @@ search.solrTrackingSupport.enabled=true
search.solrTrackingSupport.ignorePathsForSpecificTypes=false
search.solrTrackingSupport.ignorePathsForSpecificAspects=false
solr.query.fts.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
solr.query.cmis.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
solr.query.hybrid.enabled=false
# Deprecated
solr.query.fts.queryConsistency=
solr.query.cmis.queryConsistency=
solr.query.hybrid.enabled=
query.fts.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
query.cmis.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
query.hybrid.enabled=false
search.solrShardRegistry.purgeOnInit=false
search.solrShardRegistry.shardInstanceTimeoutInSeconds=300

View File

@@ -99,7 +99,11 @@
<ref bean="search.indexerAndSearcherFactory" />
</property>
</bean>
<bean id="search.fts.alfresco.switching" parent="base.search.fts.alfresco.switching" >
<property name="subsystemName" value="noindex"/>
</bean>
<bean id="search.fts.alfresco.index" class="org.alfresco.repo.search.impl.solr.NoIndexQueryLanguage" >
<property name="factories">
<list>

View File

@@ -5,7 +5,19 @@
<import resource="../common-opencmis-context.xml" />
<bean id="search.OpenCMISQueryService" class="org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl" >
<bean id="search.cmis.alfresco.switching" parent="base.search.cmis.alfresco.switching" >
<property name="subsystemName" value="noindex"/>
</bean>
<bean id="search.cmis.alfresco.switching1.1" parent="base.search.cmis.alfresco.switching1.1" >
<property name="subsystemName" value="noindex"/>
</bean>
<bean id="search.cmis.strict.switching" parent="base.search.cmis.strict.switching" >
<property name="subsystemName" value="noindex"/>
</bean>
<bean id="search.OpenCMISQueryService" class="org.alfresco.repo.search.impl.OpenCMISQueryServiceImpl" >
<property name="cmisDictionaryService">
<ref bean="OpenCMISDictionaryService" />
</property>
@@ -15,12 +27,12 @@
<property name="alfrescoDictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="solrQueryLanguage">
<property name="queryLanguage">
<ref bean="search.cmis.alfresco.switching" />
</property>
</bean>
<bean id="search.OpenCMISQueryService1.1" class="org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl" >
<bean id="search.OpenCMISQueryService1.1" class="org.alfresco.repo.search.impl.OpenCMISQueryServiceImpl" >
<property name="cmisDictionaryService">
<ref bean="OpenCMISDictionaryService1.1" />
</property>
@@ -30,7 +42,7 @@
<property name="alfrescoDictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="solrQueryLanguage">
<property name="queryLanguage">
<ref bean="search.cmis.alfresco.switching1.1" />
</property>
</bean>

View File

@@ -2,9 +2,14 @@ search.solrTrackingSupport.enabled=true
search.solrTrackingSupport.ignorePathsForSpecificTypes=false
search.solrTrackingSupport.ignorePathsForSpecificAspects=false
solr.query.fts.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
solr.query.cmis.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
solr.query.hybrid.enabled=false
# Deprecated
solr.query.fts.queryConsistency=
solr.query.cmis.queryConsistency=
solr.query.hybrid.enabled=
query.fts.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
query.cmis.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
query.hybrid.enabled=false
search.solrShardRegistry.purgeOnInit=false
search.solrShardRegistry.shardInstanceTimeoutInSeconds=300

View File

@@ -4,7 +4,19 @@
<beans>
<import resource="../common-opencmis-context.xml" />
<bean id="search.OpenCMISQueryService" class="org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl" >
<bean id="search.cmis.alfresco.switching" parent="base.search.cmis.alfresco.switching" >
<property name="subsystemName" value="solr"/>
</bean>
<bean id="search.cmis.alfresco.switching1.1" parent="base.search.cmis.alfresco.switching1.1" >
<property name="subsystemName" value="solr"/>
</bean>
<bean id="search.cmis.strict.switching" parent="base.search.cmis.strict.switching" >
<property name="subsystemName" value="solr"/>
</bean>
<bean id="search.OpenCMISQueryService" class="org.alfresco.repo.search.impl.OpenCMISQueryServiceImpl" >
<property name="cmisDictionaryService">
<ref bean="OpenCMISDictionaryService" />
</property>
@@ -14,12 +26,12 @@
<property name="alfrescoDictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="solrQueryLanguage">
<property name="queryLanguage">
<ref bean="search.cmis.alfresco.switching" />
</property>
</bean>
<bean id="search.OpenCMISQueryService1.1" class="org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl" >
<bean id="search.OpenCMISQueryService1.1" class="org.alfresco.repo.search.impl.OpenCMISQueryServiceImpl" >
<property name="cmisDictionaryService">
<ref bean="OpenCMISDictionaryService1.1" />
</property>
@@ -29,7 +41,7 @@
<property name="alfrescoDictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="solrQueryLanguage">
<property name="queryLanguage">
<ref bean="search.cmis.alfresco.switching1.1" />
</property>
</bean>

View File

@@ -168,7 +168,11 @@
</property>
</bean>
<bean id="search.fts.alfresco.switching" parent="base.search.fts.alfresco.switching" >
<property name="subsystemName" value="solr"/>
</bean>
<bean id="search.index.alfresco" class="org.alfresco.repo.search.impl.solr.SolrQueryLanguage" >
<property name="factories">
<list>

View File

@@ -2,9 +2,14 @@ search.solrTrackingSupport.enabled=true
search.solrTrackingSupport.ignorePathsForSpecificTypes=false
search.solrTrackingSupport.ignorePathsForSpecificAspects=false
solr.query.fts.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
solr.query.cmis.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
solr.query.hybrid.enabled=false
# Deprecated
solr.query.fts.queryConsistency=
solr.query.cmis.queryConsistency=
solr.query.hybrid.enabled=
query.fts.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
query.cmis.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
query.hybrid.enabled=false
search.solrShardRegistry.purgeOnInit=false
search.solrShardRegistry.shardInstanceTimeoutInSeconds=300

View File

@@ -4,7 +4,19 @@
<beans>
<import resource="../common-opencmis-context.xml" />
<bean id="search.OpenCMISQueryService" class="org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl" >
<bean id="search.cmis.alfresco.switching" parent="base.search.cmis.alfresco.switching" >
<property name="subsystemName" value="solr4"/>
</bean>
<bean id="search.cmis.alfresco.switching1.1" parent="base.search.cmis.alfresco.switching1.1" >
<property name="subsystemName" value="solr4"/>
</bean>
<bean id="search.cmis.strict.switching" parent="base.search.cmis.strict.switching" >
<property name="subsystemName" value="solr4"/>
</bean>
<bean id="search.OpenCMISQueryService" class="org.alfresco.repo.search.impl.OpenCMISQueryServiceImpl" >
<property name="cmisDictionaryService">
<ref bean="OpenCMISDictionaryService" />
</property>
@@ -14,12 +26,12 @@
<property name="alfrescoDictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="solrQueryLanguage">
<property name="queryLanguage">
<ref bean="search.cmis.alfresco.switching" />
</property>
</bean>
<bean id="search.OpenCMISQueryService1.1" class="org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl" >
<bean id="search.OpenCMISQueryService1.1" class="org.alfresco.repo.search.impl.OpenCMISQueryServiceImpl" >
<property name="cmisDictionaryService">
<ref bean="OpenCMISDictionaryService1.1" />
</property>
@@ -29,7 +41,7 @@
<property name="alfrescoDictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="solrQueryLanguage">
<property name="queryLanguage">
<ref bean="search.cmis.alfresco.switching1.1" />
</property>
</bean>

View File

@@ -218,6 +218,10 @@
</property>
</bean>
<bean id="search.fts.alfresco.switching" parent="base.search.fts.alfresco.switching" >
<property name="subsystemName" value="sol4"/>
</bean>
<bean id="search.fts.alfresco.index" class="org.alfresco.repo.search.impl.solr.SolrQueryLanguage" >
<property name="factories">
<list>

View File

@@ -2,9 +2,14 @@ search.solrTrackingSupport.enabled=true
search.solrTrackingSupport.ignorePathsForSpecificTypes=false
search.solrTrackingSupport.ignorePathsForSpecificAspects=false
solr.query.fts.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
solr.query.cmis.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
solr.query.hybrid.enabled=false
# Deprecated
solr.query.fts.queryConsistency=
solr.query.cmis.queryConsistency=
solr.query.hybrid.enabled=
query.fts.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
query.cmis.queryConsistency=TRANSACTIONAL_IF_POSSIBLE
query.hybrid.enabled=false
search.solrShardRegistry.purgeOnInit=false
search.solrShardRegistry.shardInstanceTimeoutInSeconds=300

View File

@@ -4,7 +4,19 @@
<beans>
<import resource="../common-opencmis-context.xml" />
<bean id="search.OpenCMISQueryService" class="org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl" >
<bean id="search.cmis.alfresco.switching" parent="base.search.cmis.alfresco.switching" >
<property name="subsystemName" value="solr6"/>
</bean>
<bean id="search.cmis.alfresco.switching1.1" parent="base.search.cmis.alfresco.switching1.1" >
<property name="subsystemName" value="solr6"/>
</bean>
<bean id="search.cmis.strict.switching" parent="base.search.cmis.strict.switching" >
<property name="subsystemName" value="solr6"/>
</bean>
<bean id="search.OpenCMISQueryService" class="org.alfresco.repo.search.impl.OpenCMISQueryServiceImpl" >
<property name="cmisDictionaryService">
<ref bean="OpenCMISDictionaryService" />
</property>
@@ -14,12 +26,12 @@
<property name="alfrescoDictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="solrQueryLanguage">
<property name="queryLanguage">
<ref bean="search.cmis.alfresco.switching" />
</property>
</bean>
<bean id="search.OpenCMISQueryService1.1" class="org.alfresco.repo.search.impl.solr.SolrOpenCMISQueryServiceImpl" >
<bean id="search.OpenCMISQueryService1.1" class="org.alfresco.repo.search.impl.OpenCMISQueryServiceImpl" >
<property name="cmisDictionaryService">
<ref bean="OpenCMISDictionaryService1.1" />
</property>
@@ -29,7 +41,7 @@
<property name="alfrescoDictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="solrQueryLanguage">
<property name="queryLanguage">
<ref bean="search.cmis.alfresco.switching1.1" />
</property>
</bean>

View File

@@ -238,6 +238,10 @@
</property>
</bean>
<bean id="search.fts.alfresco.switching" parent="base.search.fts.alfresco.switching" >
<property name="subsystemName" value="solr6"/>
</bean>
<bean id="search.fts.alfresco.index" class="org.alfresco.repo.search.impl.solr.SolrQueryLanguage" >
<property name="factories">
<list>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 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
@@ -28,7 +28,7 @@ package org.alfresco.repo.search;
import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.search.impl.solr.DisabledFeatureException;
import org.alfresco.repo.search.impl.DisabledFeatureException;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.MutableAuthenticationDao;

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 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
@@ -38,6 +38,8 @@ import java.util.List;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.domain.node.Node;
import org.alfresco.repo.domain.solr.SearchDAO;
import org.alfresco.repo.search.impl.DbOrIndexSwitchingQueryLanguage;
import org.alfresco.repo.search.impl.DisabledFeatureException;
import org.alfresco.repo.search.impl.lucene.LuceneQueryLanguageSPI;
import org.alfresco.repo.search.impl.querymodel.QueryModelException;
import org.alfresco.repo.solr.NodeParameters;