mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-29 15:21:53 +00:00
Compare commits
64 Commits
23.1.0.149
...
APPS-2000_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ffe06391b | ||
|
|
92ff7151d8 | ||
|
|
d7722e4f25 | ||
|
|
6a87008665 | ||
|
|
6d14548119 | ||
|
|
67c4751676 | ||
|
|
d4a60a1d24 | ||
|
|
4388a75924 | ||
|
|
5982ec7172 | ||
|
|
7f26658eba | ||
|
|
88273f3073 | ||
|
|
7218864a44 | ||
|
|
133dd2b1c1 | ||
|
|
ade270743e | ||
|
|
59b50f0c67 | ||
|
|
8837c15a67 | ||
|
|
bac818baf2 | ||
|
|
2f6c845865 | ||
|
|
347627d0fd | ||
|
|
a495dae1db | ||
|
|
a07da7308f | ||
|
|
8b472e89f5 | ||
|
|
a3aaaedb0e | ||
|
|
044d07af86 | ||
|
|
110ccd5574 | ||
|
|
8fbe444266 | ||
|
|
5ef0bbb840 | ||
|
|
ba5720b494 | ||
|
|
866adc16f3 | ||
|
|
577788a8c6 | ||
|
|
6b02b4dc05 | ||
|
|
fc847ac7a5 | ||
|
|
25e8f0c6f8 | ||
|
|
499cf08ecd | ||
|
|
f0c191d7ca | ||
|
|
a1faf97fc5 | ||
|
|
d372ff6f5e | ||
|
|
095bf0e8d8 | ||
|
|
c23db31ca4 | ||
|
|
6cfcc8b207 | ||
|
|
20582dfcf9 | ||
|
|
fb6b1ef4ab | ||
|
|
7fc184ccf3 | ||
|
|
732d4e4733 | ||
|
|
bd94060fea | ||
|
|
d46ae1634f | ||
|
|
7bd31eca5f | ||
|
|
8938aaff09 | ||
|
|
18dadfe110 | ||
|
|
4e9fb76404 | ||
|
|
295c3ba58e | ||
|
|
195e0e927c | ||
|
|
b0adc1a6bb | ||
|
|
828c98d03f | ||
|
|
1d4c97cfb7 | ||
|
|
e0d5d0691f | ||
|
|
96942ceeb9 | ||
|
|
2d16c28859 | ||
|
|
51fe0275df | ||
|
|
4786a0fb0b | ||
|
|
3f91a6001f | ||
|
|
bc6398c038 | ||
|
|
cac97dc1e7 | ||
|
|
5cdb5f2922 |
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
@@ -561,3 +561,27 @@ jobs:
|
|||||||
aws s3 cp --acl private ./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports/rm-automation-community-rest-api.log s3://ags-travis-artifacts/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests/rm-automation-community-rest-api.log
|
aws s3 cp --acl private ./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports/rm-automation-community-rest-api.log s3://ags-travis-artifacts/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests/rm-automation-community-rest-api.log
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
ags_start_api_explorer:
|
||||||
|
name: "Test Tomcat deployment of api explorer"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [ prepare ]
|
||||||
|
if: >
|
||||||
|
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip ags]')) ||
|
||||||
|
contains(github.event.head_commit.message, '[ags]')) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Build"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: |
|
||||||
|
bash ./scripts/ci/init.sh
|
||||||
|
bash ./scripts/ci/build.sh
|
||||||
|
- name: "Test Tomcat deployment"
|
||||||
|
run: |
|
||||||
|
mvn verify -Pags,start-api-explorer -DskipTests &
|
||||||
|
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8085/api-explorer"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.docker-java</groupId>
|
<groupId>com.github.docker-java</groupId>
|
||||||
<artifactId>docker-java</artifactId>
|
<artifactId>docker-java</artifactId>
|
||||||
<version>3.3.0</version>
|
<version>3.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -36,24 +36,40 @@
|
|||||||
<id>start-api-explorer</id>
|
<id>start-api-explorer</id>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.tomcat.maven</groupId>
|
<groupId>org.codehaus.cargo</groupId>
|
||||||
<artifactId>tomcat7-maven-plugin</artifactId>
|
<artifactId>cargo-maven3-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>run-war</id>
|
<id>run-war</id>
|
||||||
<goals>
|
<phase>verify</phase>
|
||||||
<goal>run-war</goal>
|
<goals>
|
||||||
</goals>
|
<goal>run</goal>
|
||||||
<phase>verify</phase>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
|
<container>
|
||||||
<path>/api-explorer</path>
|
<containerId>tomcat9x</containerId>
|
||||||
<port>8085</port>
|
<type>embedded</type>
|
||||||
</configuration>
|
<log>target/cargo.log</log>
|
||||||
</plugin>
|
</container>
|
||||||
|
<configuration>
|
||||||
|
<properties>
|
||||||
|
<cargo.servlet.port>8085</cargo.servlet.port>
|
||||||
|
</properties>
|
||||||
|
</configuration>
|
||||||
|
<deployables>
|
||||||
|
<deployable>
|
||||||
|
<type>war</type>
|
||||||
|
<properties>
|
||||||
|
<context>/api-explorer</context>
|
||||||
|
</properties>
|
||||||
|
<pingURL>http://localhost:8085/api-explorer</pingURL>
|
||||||
|
</deployable>
|
||||||
|
</deployables>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -201,6 +201,11 @@ public class SearchParameters implements BasicSearchParameters
|
|||||||
|
|
||||||
private String timezone;
|
private String timezone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the limit to track the total hits on search results
|
||||||
|
*/
|
||||||
|
private int trackTotalHits;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*/
|
*/
|
||||||
@@ -251,6 +256,7 @@ public class SearchParameters implements BasicSearchParameters
|
|||||||
sp.stats = this.stats;
|
sp.stats = this.stats;
|
||||||
sp.ranges = this.ranges;
|
sp.ranges = this.ranges;
|
||||||
sp.timezone = this.timezone;
|
sp.timezone = this.timezone;
|
||||||
|
sp.trackTotalHits = this.trackTotalHits;
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1641,6 +1647,21 @@ public class SearchParameters implements BasicSearchParameters
|
|||||||
{
|
{
|
||||||
this.includeMetadata = includeMetadata;
|
this.includeMetadata = includeMetadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getTrackTotalHits()
|
||||||
|
{
|
||||||
|
return trackTotalHits;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a maximum value for the report of total hits. The reported number of hits will never exceed this limit even
|
||||||
|
* if more are found. If unset, the engine’s default tracking limit is applied. To remove any limit, set to -1.
|
||||||
|
*
|
||||||
|
* @param trackTotalHits int
|
||||||
|
*/
|
||||||
|
public void setTrackTotalHits(int trackTotalHits)
|
||||||
|
{
|
||||||
|
this.trackTotalHits = trackTotalHits;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -9,6 +9,6 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<organization>
|
<organization>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -171,14 +171,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.codehaus.groovy</groupId>
|
||||||
<artifactId>groovy</artifactId>
|
<artifactId>groovy</artifactId>
|
||||||
<version>3.0.17</version>
|
<version>3.0.18</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
|
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.codehaus.groovy</groupId>
|
||||||
<artifactId>groovy-json</artifactId>
|
<artifactId>groovy-json</artifactId>
|
||||||
<version>3.0.17</version>
|
<version>3.0.18</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/*-
|
||||||
|
* #%L
|
||||||
|
* alfresco-tas-restapi
|
||||||
|
* %%
|
||||||
|
* Copyright (C) 2005 - 2023 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.search;
|
||||||
|
|
||||||
|
import org.alfresco.rest.core.IRestModel;
|
||||||
|
import org.alfresco.utility.model.TestModel;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class RestRequestLimitsModel extends TestModel implements IRestModel<RestRequestLimitsModel>
|
||||||
|
{
|
||||||
|
@JsonProperty
|
||||||
|
RestRequestLimitsModel model;
|
||||||
|
|
||||||
|
private Integer permissionEvaluationTime;
|
||||||
|
private Integer permissionEvaluationCount;
|
||||||
|
private Integer trackTotalHitsLimit;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RestRequestLimitsModel onModel()
|
||||||
|
{
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RestRequestLimitsModel(Integer permissionEvaluationTime, Integer permissionEvaluationCount,
|
||||||
|
Integer trackTotalHitsLimit)
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
this.permissionEvaluationTime = permissionEvaluationTime;
|
||||||
|
this.permissionEvaluationCount = permissionEvaluationCount;
|
||||||
|
this.trackTotalHitsLimit = trackTotalHitsLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPermissionEvaluationTime()
|
||||||
|
{
|
||||||
|
return permissionEvaluationTime;
|
||||||
|
}
|
||||||
|
public void setPermissionEvaluationTime(Integer permissionEvaluationTime)
|
||||||
|
{
|
||||||
|
this.permissionEvaluationTime = permissionEvaluationTime;
|
||||||
|
}
|
||||||
|
public Integer getPermissionEvaluationCount()
|
||||||
|
{
|
||||||
|
return permissionEvaluationCount;
|
||||||
|
}
|
||||||
|
public void setPermissionEvaluationCount(Integer permissionEvaluationCount)
|
||||||
|
{
|
||||||
|
this.permissionEvaluationCount = permissionEvaluationCount;
|
||||||
|
}
|
||||||
|
public Integer getTrackTotalHitsLimit()
|
||||||
|
{
|
||||||
|
return trackTotalHitsLimit;
|
||||||
|
}
|
||||||
|
public void setTrackTotalHitsLimit(Integer trackTotalHitsLimit)
|
||||||
|
{
|
||||||
|
this.trackTotalHitsLimit = trackTotalHitsLimit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -79,6 +79,7 @@ public class SearchRequest extends TestModel
|
|||||||
List<SortClause> sort;
|
List<SortClause> sort;
|
||||||
RestRequestDefaultsModel defaults;
|
RestRequestDefaultsModel defaults;
|
||||||
List<RestRequestTemplatesModel> templates;
|
List<RestRequestTemplatesModel> templates;
|
||||||
|
RestRequestLimitsModel limits;
|
||||||
|
|
||||||
public SearchRequest()
|
public SearchRequest()
|
||||||
{
|
{
|
||||||
@@ -302,4 +303,15 @@ public class SearchRequest extends TestModel
|
|||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RestRequestLimitsModel getLimits()
|
||||||
|
{
|
||||||
|
return limits;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLimits(RestRequestLimitsModel limits)
|
||||||
|
{
|
||||||
|
this.limits = limits;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
43
pom.xml
43
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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Alfresco Community Repo Parent</name>
|
<name>Alfresco Community Repo Parent</name>
|
||||||
|
|
||||||
@@ -54,21 +54,22 @@
|
|||||||
<dependency.alfresco-transform-service.version>3.0.0</dependency.alfresco-transform-service.version>
|
<dependency.alfresco-transform-service.version>3.0.0</dependency.alfresco-transform-service.version>
|
||||||
<dependency.alfresco-transform-core.version>4.0.0</dependency.alfresco-transform-core.version>
|
<dependency.alfresco-transform-core.version>4.0.0</dependency.alfresco-transform-core.version>
|
||||||
<dependency.alfresco-greenmail.version>6.9</dependency.alfresco-greenmail.version>
|
<dependency.alfresco-greenmail.version>6.9</dependency.alfresco-greenmail.version>
|
||||||
<dependency.acs-event-model.version>0.0.22</dependency.acs-event-model.version>
|
<dependency.acs-event-model.version>0.0.23</dependency.acs-event-model.version>
|
||||||
|
|
||||||
<dependency.spring.version>5.3.27</dependency.spring.version>
|
<dependency.spring.version>5.3.27</dependency.spring.version>
|
||||||
<dependency.antlr.version>3.5.3</dependency.antlr.version>
|
<dependency.antlr.version>3.5.3</dependency.antlr.version>
|
||||||
<dependency.jackson.version>2.15.1</dependency.jackson.version>
|
<dependency.jackson.version>2.15.1</dependency.jackson.version>
|
||||||
<dependency.cxf.version>3.5.5</dependency.cxf.version>
|
<dependency.cxf.version>3.5.5</dependency.cxf.version>
|
||||||
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
|
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
|
||||||
<dependency.webscripts.version>8.43</dependency.webscripts.version>
|
<dependency.webscripts.version>8.45</dependency.webscripts.version>
|
||||||
<dependency.bouncycastle.version>1.70</dependency.bouncycastle.version>
|
<dependency.bouncycastle.version>1.70</dependency.bouncycastle.version>
|
||||||
<dependency.mockito-core.version>4.9.0</dependency.mockito-core.version>
|
<dependency.mockito-core.version>4.9.0</dependency.mockito-core.version>
|
||||||
<dependency.assertj.version>3.24.2</dependency.assertj.version>
|
<dependency.assertj.version>3.24.2</dependency.assertj.version>
|
||||||
<dependency.org-json.version>20230227</dependency.org-json.version>
|
<dependency.org-json.version>20230618</dependency.org-json.version>
|
||||||
<dependency.commons-dbcp.version>2.9.0</dependency.commons-dbcp.version>
|
<dependency.commons-dbcp.version>2.9.0</dependency.commons-dbcp.version>
|
||||||
<dependency.commons-io.version>2.11.0</dependency.commons-io.version>
|
<dependency.commons-io.version>2.11.0</dependency.commons-io.version>
|
||||||
<dependency.gson.version>2.8.9</dependency.gson.version>
|
<dependency.gson.version>2.8.9</dependency.gson.version>
|
||||||
|
<dependency.guava.version>32.1.1-jre</dependency.guava.version>
|
||||||
<dependency.httpclient.version>4.5.13</dependency.httpclient.version>
|
<dependency.httpclient.version>4.5.13</dependency.httpclient.version>
|
||||||
<dependency.httpcore.version>4.4.16</dependency.httpcore.version>
|
<dependency.httpcore.version>4.4.16</dependency.httpcore.version>
|
||||||
<dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version>
|
<dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version>
|
||||||
@@ -76,7 +77,7 @@
|
|||||||
<dependency.slf4j.version>2.0.7</dependency.slf4j.version>
|
<dependency.slf4j.version>2.0.7</dependency.slf4j.version>
|
||||||
<dependency.log4j.version>2.20.0</dependency.log4j.version>
|
<dependency.log4j.version>2.20.0</dependency.log4j.version>
|
||||||
<dependency.gytheio.version>0.20.0-A1</dependency.gytheio.version>
|
<dependency.gytheio.version>0.20.0-A1</dependency.gytheio.version>
|
||||||
<dependency.groovy.version>3.0.17</dependency.groovy.version>
|
<dependency.groovy.version>3.0.18</dependency.groovy.version>
|
||||||
<dependency.tika.version>2.4.1</dependency.tika.version>
|
<dependency.tika.version>2.4.1</dependency.tika.version>
|
||||||
<dependency.spring-security.version>5.8.3</dependency.spring-security.version>
|
<dependency.spring-security.version>5.8.3</dependency.spring-security.version>
|
||||||
<dependency.truezip.version>7.7.10</dependency.truezip.version>
|
<dependency.truezip.version>7.7.10</dependency.truezip.version>
|
||||||
@@ -92,7 +93,7 @@
|
|||||||
<dependency.apache.taglibs.version>1.2.5</dependency.apache.taglibs.version>
|
<dependency.apache.taglibs.version>1.2.5</dependency.apache.taglibs.version>
|
||||||
<dependency.awaitility.version>4.2.0</dependency.awaitility.version>
|
<dependency.awaitility.version>4.2.0</dependency.awaitility.version>
|
||||||
<dependency.swagger-ui.version>3.38.0</dependency.swagger-ui.version>
|
<dependency.swagger-ui.version>3.38.0</dependency.swagger-ui.version>
|
||||||
<dependency.swagger-parser.version>1.0.66</dependency.swagger-parser.version>
|
<dependency.swagger-parser.version>1.0.67</dependency.swagger-parser.version>
|
||||||
<dependency.maven-filtering.version>3.1.1</dependency.maven-filtering.version>
|
<dependency.maven-filtering.version>3.1.1</dependency.maven-filtering.version>
|
||||||
<dependency.maven-artifact.version>3.8.6</dependency.maven-artifact.version>
|
<dependency.maven-artifact.version>3.8.6</dependency.maven-artifact.version>
|
||||||
<dependency.jdom2.version>2.0.6.1</dependency.jdom2.version>
|
<dependency.jdom2.version>2.0.6.1</dependency.jdom2.version>
|
||||||
@@ -107,10 +108,10 @@
|
|||||||
<dependency.jakarta-mail-api.version>1.6.5</dependency.jakarta-mail-api.version>
|
<dependency.jakarta-mail-api.version>1.6.5</dependency.jakarta-mail-api.version>
|
||||||
<dependency.jakarta-json-api.version>1.1.6</dependency.jakarta-json-api.version>
|
<dependency.jakarta-json-api.version>1.1.6</dependency.jakarta-json-api.version>
|
||||||
<dependency.jakarta-json-path.version>2.8.0</dependency.jakarta-json-path.version>
|
<dependency.jakarta-json-path.version>2.8.0</dependency.jakarta-json-path.version>
|
||||||
<dependency.json-smart.version>2.4.11</dependency.json-smart.version>
|
<dependency.json-smart.version>2.5.0</dependency.json-smart.version>
|
||||||
<dependency.jakarta-rpc-api.version>1.1.4</dependency.jakarta-rpc-api.version>
|
<dependency.jakarta-rpc-api.version>1.1.4</dependency.jakarta-rpc-api.version>
|
||||||
|
|
||||||
<alfresco.googledrive.version>3.4.1</alfresco.googledrive.version>
|
<alfresco.googledrive.version>3.4.2-A2</alfresco.googledrive.version>
|
||||||
<alfresco.aos-module.version>1.6.1</alfresco.aos-module.version>
|
<alfresco.aos-module.version>1.6.1</alfresco.aos-module.version>
|
||||||
<alfresco.api-explorer.version>23.1.0-A1</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
<alfresco.api-explorer.version>23.1.0-A1</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||||
|
|
||||||
@@ -121,11 +122,11 @@
|
|||||||
<dependency.mysql.version>8.0.30</dependency.mysql.version>
|
<dependency.mysql.version>8.0.30</dependency.mysql.version>
|
||||||
<dependency.mysql-image.version>8</dependency.mysql-image.version>
|
<dependency.mysql-image.version>8</dependency.mysql-image.version>
|
||||||
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
|
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
|
||||||
<dependency.tas-utility.version>4.0.3</dependency.tas-utility.version>
|
<dependency.tas-utility.version>4.0.4</dependency.tas-utility.version>
|
||||||
<dependency.rest-assured.version>5.3.0</dependency.rest-assured.version>
|
<dependency.rest-assured.version>5.3.1</dependency.rest-assured.version>
|
||||||
<dependency.tas-email.version>1.21</dependency.tas-email.version>
|
<dependency.tas-email.version>1.23</dependency.tas-email.version>
|
||||||
<dependency.tas-webdav.version>1.16</dependency.tas-webdav.version>
|
<dependency.tas-webdav.version>1.18</dependency.tas-webdav.version>
|
||||||
<dependency.tas-ftp.version>1.17</dependency.tas-ftp.version>
|
<dependency.tas-ftp.version>1.18</dependency.tas-ftp.version>
|
||||||
<dependency.tas-dataprep.version>2.6</dependency.tas-dataprep.version>
|
<dependency.tas-dataprep.version>2.6</dependency.tas-dataprep.version>
|
||||||
|
|
||||||
<!-- AGS properties shared between community and enterprise -->
|
<!-- AGS properties shared between community and enterprise -->
|
||||||
@@ -149,7 +150,7 @@
|
|||||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||||
<tag>23.1.0.149</tag>
|
<tag>HEAD</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
@@ -359,7 +360,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
<artifactId>commons-codec</artifactId>
|
<artifactId>commons-codec</artifactId>
|
||||||
<version>1.15</version>
|
<version>1.16.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-lang</groupId>
|
<groupId>commons-lang</groupId>
|
||||||
@@ -771,6 +772,11 @@
|
|||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>${dependency.gson.version}</version>
|
<version>${dependency.gson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.guava</groupId>
|
||||||
|
<artifactId>guava</artifactId>
|
||||||
|
<version>${dependency.guava.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.camel</groupId>
|
<groupId>org.apache.camel</groupId>
|
||||||
<artifactId>camel-core</artifactId>
|
<artifactId>camel-core</artifactId>
|
||||||
@@ -886,7 +892,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.18.26</version>
|
<version>1.18.28</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -1003,6 +1009,11 @@
|
|||||||
<skipDeploy>true</skipDeploy>
|
<skipDeploy>true</skipDeploy>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.cargo</groupId>
|
||||||
|
<artifactId>cargo-maven3-plugin</artifactId>
|
||||||
|
<version>1.10.8</version>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -823,6 +823,11 @@ public class SearchMapper
|
|||||||
sp.setLimitBy(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS);
|
sp.setLimitBy(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS);
|
||||||
sp.setMaxPermissionCheckTimeMillis(limits.getPermissionEvaluationTime());
|
sp.setMaxPermissionCheckTimeMillis(limits.getPermissionEvaluationTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(limits.getTrackTotalHitsLimit() != null)
|
||||||
|
{
|
||||||
|
sp.setTrackTotalHits(limits.getTrackTotalHitsLimit());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public class FacetField
|
|||||||
|
|
||||||
public String toFilterQuery(String value)
|
public String toFilterQuery(String value)
|
||||||
{
|
{
|
||||||
return field+":\""+value+"\"";
|
return ("Null".equals(value)) ? "ISNULL:\"" + field + "\"" : field + ":\"" + value + "\"";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPrefix()
|
public String getPrefix()
|
||||||
|
|||||||
@@ -37,13 +37,16 @@ public class Limits
|
|||||||
|
|
||||||
private final Integer permissionEvaluationTime;
|
private final Integer permissionEvaluationTime;
|
||||||
private final Integer permissionEvaluationCount;
|
private final Integer permissionEvaluationCount;
|
||||||
|
private final Integer trackTotalHitsLimit;
|
||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public Limits(@JsonProperty("permissionEvaluationTime") Integer permissionEvaluationTime,
|
public Limits(@JsonProperty("permissionEvaluationTime") Integer permissionEvaluationTime,
|
||||||
@JsonProperty("permissionEvaluationCount") Integer permissionEvaluationCount)
|
@JsonProperty("permissionEvaluationCount") Integer permissionEvaluationCount,
|
||||||
|
@JsonProperty("trackTotalHitsLimit") Integer trackTotalHitsLimit)
|
||||||
{
|
{
|
||||||
this.permissionEvaluationTime = permissionEvaluationTime;
|
this.permissionEvaluationTime = permissionEvaluationTime;
|
||||||
this.permissionEvaluationCount = permissionEvaluationCount;
|
this.permissionEvaluationCount = permissionEvaluationCount;
|
||||||
|
this.trackTotalHitsLimit = trackTotalHitsLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getPermissionEvaluationTime()
|
public Integer getPermissionEvaluationTime()
|
||||||
@@ -55,4 +58,9 @@ public class Limits
|
|||||||
{
|
{
|
||||||
return permissionEvaluationCount;
|
return permissionEvaluationCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getTrackTotalHitsLimit()
|
||||||
|
{
|
||||||
|
return trackTotalHitsLimit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -745,33 +745,56 @@ public class SearchMapperTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void fromLimits() throws Exception
|
public void fromLimits_setNull() throws Exception
|
||||||
{
|
{
|
||||||
SearchParameters searchParameters = new SearchParameters();
|
SearchParameters searchParameters = new SearchParameters();
|
||||||
searchMapper.setDefaults(searchParameters);
|
searchMapper.setDefaults(searchParameters);
|
||||||
|
|
||||||
//Doesn't error
|
|
||||||
searchMapper.fromLimits(searchParameters, null);
|
searchMapper.fromLimits(searchParameters, null);
|
||||||
assertEquals(500, searchParameters.getLimit());
|
assertEquals("LimitBy default value should be unlimited", LimitBy.UNLIMITED, searchParameters.getLimitBy());
|
||||||
assertEquals(LimitBy.UNLIMITED, searchParameters.getLimitBy());
|
assertEquals("Limit default value should be 500", 500, searchParameters.getLimit());
|
||||||
|
}
|
||||||
|
|
||||||
searchMapper.fromLimits(searchParameters, new Limits(null, null));
|
@Test
|
||||||
assertEquals(LimitBy.UNLIMITED, searchParameters.getLimitBy());
|
public void fromLimits_setAllLimitsAsNull() throws Exception
|
||||||
assertEquals(500, searchParameters.getLimit());
|
{
|
||||||
|
SearchParameters searchParameters = new SearchParameters();
|
||||||
searchMapper.fromLimits(searchParameters, new Limits(null, 34));
|
|
||||||
assertEquals(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS, searchParameters.getLimitBy());
|
|
||||||
assertEquals(34, searchParameters.getMaxPermissionChecks());
|
|
||||||
assertEquals(-1, searchParameters.getLimit());
|
|
||||||
assertEquals(-1, searchParameters.getMaxPermissionCheckTimeMillis());
|
|
||||||
|
|
||||||
searchParameters = new SearchParameters();
|
|
||||||
searchMapper.setDefaults(searchParameters);
|
searchMapper.setDefaults(searchParameters);
|
||||||
searchMapper.fromLimits(searchParameters, new Limits(1000, null));
|
searchMapper.fromLimits(searchParameters, new Limits(null, null, null));
|
||||||
|
assertEquals("LimitBy default value should be unlimited", LimitBy.UNLIMITED, searchParameters.getLimitBy());
|
||||||
|
assertEquals("Limit default value should be 500", 500, searchParameters.getLimit());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void fromLimits_setPermissionEvaluationCount() throws Exception
|
||||||
|
{
|
||||||
|
SearchParameters searchParameters = new SearchParameters();
|
||||||
|
searchMapper.setDefaults(searchParameters);
|
||||||
|
searchMapper.fromLimits(searchParameters, new Limits(null, 34, null));
|
||||||
assertEquals(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS, searchParameters.getLimitBy());
|
assertEquals(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS, searchParameters.getLimitBy());
|
||||||
assertEquals(1000, searchParameters.getMaxPermissionCheckTimeMillis());
|
assertEquals("MaxPermissionChecks should be set", 34, searchParameters.getMaxPermissionChecks());
|
||||||
assertEquals(-1, searchParameters.getLimit());
|
assertEquals("Limit should be -1", -1, searchParameters.getLimit());
|
||||||
assertEquals(-1, searchParameters.getMaxPermissionChecks());
|
assertEquals("MaxPermissionCheckTimeMillis should be -1", -1, searchParameters.getMaxPermissionCheckTimeMillis());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void fromLimits_setPermissionEvaluationTime() throws Exception
|
||||||
|
{
|
||||||
|
SearchParameters searchParameters = new SearchParameters();
|
||||||
|
searchMapper.setDefaults(searchParameters);
|
||||||
|
searchMapper.fromLimits(searchParameters, new Limits(1000, null, null));
|
||||||
|
assertEquals(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS, searchParameters.getLimitBy());
|
||||||
|
assertEquals("MaxPermissionCheckTimeMillis should be set", 1000, searchParameters.getMaxPermissionCheckTimeMillis());
|
||||||
|
assertEquals("Limit should be -1", -1, searchParameters.getLimit());
|
||||||
|
assertEquals("MaxPermissionChecks should be -1", -1, searchParameters.getMaxPermissionChecks());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void fromLimits_setTrackTotalHitsLimit() throws Exception
|
||||||
|
{
|
||||||
|
SearchParameters searchParameters = new SearchParameters();
|
||||||
|
searchMapper.setDefaults(searchParameters);
|
||||||
|
searchMapper.fromLimits(searchParameters, new Limits(null, null, 10));
|
||||||
|
assertEquals("TrackTotalHits should be set", 10, searchParameters.getTrackTotalHits());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>23.1.0.149</version>
|
<version>23.1.0.163-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ibm.icu</groupId>
|
<groupId>com.ibm.icu</groupId>
|
||||||
<artifactId>icu4j</artifactId>
|
<artifactId>icu4j</artifactId>
|
||||||
<version>73.1</version>
|
<version>73.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.googlecode.json-simple</groupId>
|
<groupId>com.googlecode.json-simple</groupId>
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import java.util.zip.ZipException;
|
|||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.model.ApplicationModel;
|
import org.alfresco.model.ApplicationModel;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.repo.action.ActionServiceImpl;
|
||||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||||
import org.alfresco.repo.content.MimetypeMap;
|
import org.alfresco.repo.content.MimetypeMap;
|
||||||
import org.alfresco.repo.importer.ACPImportPackageHandler;
|
import org.alfresco.repo.importer.ACPImportPackageHandler;
|
||||||
@@ -65,6 +66,8 @@ import org.alfresco.util.TempFileProvider;
|
|||||||
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
||||||
import org.apache.commons.compress.archivers.zip.ZipFile;
|
import org.apache.commons.compress.archivers.zip.ZipFile;
|
||||||
import org.apache.commons.compress.utils.InputStreamStatistics;
|
import org.apache.commons.compress.utils.InputStreamStatistics;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Importer action executor
|
* Importer action executor
|
||||||
@@ -73,6 +76,7 @@ import org.apache.commons.compress.utils.InputStreamStatistics;
|
|||||||
*/
|
*/
|
||||||
public class ImporterActionExecuter extends ActionExecuterAbstractBase
|
public class ImporterActionExecuter extends ActionExecuterAbstractBase
|
||||||
{
|
{
|
||||||
|
private static Log logger = LogFactory.getLog(ImporterActionExecuter.class);
|
||||||
public static final String NAME = "import";
|
public static final String NAME = "import";
|
||||||
public static final String PARAM_ENCODING = "encoding";
|
public static final String PARAM_ENCODING = "encoding";
|
||||||
public static final String PARAM_DESTINATION_FOLDER = "destination";
|
public static final String PARAM_DESTINATION_FOLDER = "destination";
|
||||||
@@ -242,17 +246,21 @@ public class ImporterActionExecuter extends ActionExecuterAbstractBase
|
|||||||
// http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4820807
|
// http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4820807
|
||||||
// We also try to use the extra encoding information if present
|
// We also try to use the extra encoding information if present
|
||||||
String encoding = (String) ruleAction.getParameterValue(PARAM_ENCODING);
|
String encoding = (String) ruleAction.getParameterValue(PARAM_ENCODING);
|
||||||
|
logger.info("Encoding before: "+encoding);
|
||||||
if (encoding == null)
|
if (encoding == null)
|
||||||
{
|
{
|
||||||
encoding = "UTF-8";
|
logger.info("Encoding is null ");
|
||||||
|
encoding = "Cp437";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (encoding.equalsIgnoreCase("default"))
|
if (encoding.equalsIgnoreCase("default"))
|
||||||
{
|
{
|
||||||
encoding = null;
|
logger.info("Encoding is default ");
|
||||||
|
encoding = "Cp437";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logger.info("Encoding after: "+encoding);
|
||||||
zipFile = new ZipFile(tempFile, encoding, true);
|
zipFile = new ZipFile(tempFile, encoding, true);
|
||||||
// build a temp dir name based on the ID of the noderef we are importing
|
// build a temp dir name based on the ID of the noderef we are importing
|
||||||
// also use the long life temp folder as large ZIP files can take a while
|
// also use the long life temp folder as large ZIP files can take a while
|
||||||
|
|||||||
Reference in New Issue
Block a user