mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-29 15:21:53 +00:00
Compare commits
24 Commits
20.73
...
ACS-3916_G
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06004e207d | ||
|
|
a7c35ae391 | ||
|
|
324e2f619d | ||
|
|
5d269e05ab | ||
|
|
9c6e8aad9c | ||
|
|
915fe193e2 | ||
|
|
a2756aa868 | ||
|
|
b28e02c6fa | ||
|
|
8d00a1ab61 | ||
|
|
a86ad3c973 | ||
|
|
2cdbe6f306 | ||
|
|
556e1923d1 | ||
|
|
22e8a506ff | ||
|
|
f63c9ee8c4 | ||
|
|
b5b9b9e2c4 | ||
|
|
9e88a6562e | ||
|
|
dbddc08fcc | ||
|
|
9b5e69e070 | ||
|
|
23f6f6fc90 | ||
|
|
9d8e93474c | ||
|
|
3d450e1d8d | ||
|
|
e587ef124e | ||
|
|
34c8f9e431 | ||
|
|
736cc74479 |
84
.github/workflows/ci.yml
vendored
84
.github/workflows/ci.yml
vendored
@@ -35,8 +35,8 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Prepare maven cache and check compilation"
|
||||
@@ -49,16 +49,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
((github.ref_name == 'master' || contains(github.ref_name, 'release/')) && github.event_name != 'pull_request') &&
|
||||
((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request') &&
|
||||
!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.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.33.0
|
||||
continue-on-error: true
|
||||
with:
|
||||
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
||||
@@ -75,8 +75,8 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run tests"
|
||||
@@ -112,8 +112,8 @@ jobs:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: |
|
||||
@@ -133,7 +133,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
(((github.ref_name == 'master' || contains(github.ref_name, 'release/')) &&
|
||||
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
|
||||
github.event_name != 'pull_request' &&
|
||||
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||
contains(github.event.head_commit.message, '[db]')) &&
|
||||
@@ -145,8 +145,8 @@ jobs:
|
||||
version: ['10.2.18', '10.4', '10.5']
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: Run MariaDB ${{ matrix.version }} database
|
||||
@@ -163,7 +163,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
|
||||
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
|
||||
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||
contains(github.event.head_commit.message, '[latest db]') ||
|
||||
contains(github.event.head_commit.message, '[db]')) &&
|
||||
@@ -171,8 +171,8 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run MariaDB 10.6 database"
|
||||
@@ -189,7 +189,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
|
||||
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
|
||||
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||
contains(github.event.head_commit.message, '[latest db]') ||
|
||||
contains(github.event.head_commit.message, '[db]')) &&
|
||||
@@ -197,8 +197,8 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run MySQL 8 database"
|
||||
@@ -215,15 +215,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
(((github.ref_name == 'master' || contains(github.ref_name, 'release/')) && github.event_name != 'pull_request' &&
|
||||
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request' &&
|
||||
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||
contains(github.event.head_commit.message, '[db]')) &&
|
||||
!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.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 13.7 database"
|
||||
@@ -247,8 +247,8 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 14.4 database"
|
||||
@@ -270,8 +270,8 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run ActiveMQ"
|
||||
@@ -315,8 +315,8 @@ jobs:
|
||||
mvn-options: '-Dindex.subsystem.name=solr6'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Set transformers tag"
|
||||
@@ -337,7 +337,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||
!contains(github.event.head_commit.message, '[skip tas]')) ||
|
||||
contains(github.event.head_commit.message, '[tas]')) &&
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
@@ -374,8 +374,8 @@ jobs:
|
||||
REQUIRES_LOCAL_IMAGES: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: |
|
||||
@@ -411,8 +411,8 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run Postgres 14.4 database"
|
||||
@@ -427,7 +427,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||
(((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]') &&
|
||||
@@ -440,8 +440,8 @@ jobs:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: |
|
||||
@@ -458,7 +458,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||
(((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 on MySQL]')) &&
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
@@ -471,8 +471,8 @@ jobs:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: |
|
||||
@@ -489,7 +489,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||
(((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, '[skip tas]')) ||
|
||||
(contains(github.event.head_commit.message, '[ags]') && contains(github.event.head_commit.message, '[tas]'))) &&
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
@@ -498,8 +498,8 @@ jobs:
|
||||
REQUIRES_LOCAL_IMAGES: true
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: |
|
||||
|
||||
12
.github/workflows/master_release.yml
vendored
12
.github/workflows/master_release.yml
vendored
@@ -32,11 +32,11 @@ jobs:
|
||||
github.event_name != 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0
|
||||
with:
|
||||
username: ${{ env.GIT_USERNAME }}
|
||||
email: ${{ env.GIT_EMAIL }}
|
||||
@@ -58,11 +58,11 @@ jobs:
|
||||
github.event_name != 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.32.0
|
||||
- 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: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.32.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0
|
||||
with:
|
||||
username: ${{ env.GIT_USERNAME }}
|
||||
email: ${{ env.GIT_EMAIL }}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -241,7 +241,7 @@ var Filters =
|
||||
filterData = filterData.slice(0, -1);
|
||||
}
|
||||
filterQuery = this.constructPathQuery(parsedArgs);
|
||||
filterParams.query = filterQuery + " +PATH:\"/cm:generalclassifiable" + Filters.iso9075EncodePath(filterData) + "/member\"";
|
||||
filterParams.query = filterQuery + " +PATH:\"/cm:categoryRoot/cm:generalclassifiable" + Filters.iso9075EncodePath(filterData) + "/member\"";
|
||||
break;
|
||||
|
||||
case "aspect":
|
||||
|
||||
@@ -230,7 +230,7 @@ var Filters =
|
||||
filterData = filterData.slice(0, -1);
|
||||
}
|
||||
filterQuery = this.constructPathQuery(parsedArgs);
|
||||
filterParams.query = filterQuery + " +PATH:\"/cm:generalclassifiable" + Filters.iso9075EncodePath(filterData) + "/member\"";
|
||||
filterParams.query = filterQuery + " +PATH:\"/cm:categoryRoot/cm:generalclassifiable" + Filters.iso9075EncodePath(filterData) + "/member\"";
|
||||
break;
|
||||
|
||||
default: // "path"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Data model classes
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -51,6 +51,18 @@ public class MLText extends HashMap<Locale, String>
|
||||
{
|
||||
private static final long serialVersionUID = -3696135175650511841L;
|
||||
|
||||
/**
|
||||
* Returns default locale used by the {@link MLText} implementation
|
||||
*
|
||||
* @see I18NUtil#getLocale()
|
||||
*
|
||||
* @return default locale
|
||||
*/
|
||||
public static Locale getDefaultLocale()
|
||||
{
|
||||
return I18NUtil.getLocale();
|
||||
}
|
||||
|
||||
public MLText()
|
||||
{
|
||||
super(3, 0.75F);
|
||||
@@ -61,13 +73,13 @@ public class MLText extends HashMap<Locale, String>
|
||||
*
|
||||
* @param value the value for the current default locale
|
||||
*
|
||||
* @see I18NUtil#getLocale()
|
||||
* @see #getDefaultLocale()
|
||||
* @see #MLText(Locale, String)
|
||||
* @see #getDefaultValue()
|
||||
*/
|
||||
public MLText(String value)
|
||||
{
|
||||
this(I18NUtil.getLocale(), value);
|
||||
this(getDefaultLocale(), value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,7 +136,7 @@ public class MLText extends HashMap<Locale, String>
|
||||
/**
|
||||
* Retrieves a default value from the set of available locales.<br/>
|
||||
*
|
||||
* @see I18NUtil#getLocale()
|
||||
* @see #getDefaultLocale()
|
||||
* @see #getClosestValue(Locale)
|
||||
*/
|
||||
public String getDefaultValue()
|
||||
@@ -135,7 +147,7 @@ public class MLText extends HashMap<Locale, String>
|
||||
return null;
|
||||
}
|
||||
// There is some hope of getting a match
|
||||
Locale locale = I18NUtil.getLocale();
|
||||
Locale locale = getDefaultLocale();
|
||||
return getClosestValue(locale);
|
||||
}
|
||||
|
||||
@@ -168,7 +180,7 @@ public class MLText extends HashMap<Locale, String>
|
||||
if (match == null)
|
||||
{
|
||||
// No close matches for the locale - go for the default locale
|
||||
locale = I18NUtil.getLocale();
|
||||
locale = getDefaultLocale();
|
||||
match = I18NUtil.getNearestLocale(locale, options);
|
||||
if (match == null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<organization>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
6
pom.xml
6
pom.xml
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Community Repo Parent</name>
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
|
||||
<license-maven-plugin.version>2.0.1.alfresco-2</license-maven-plugin.version>
|
||||
|
||||
<dependency.postgresql.version>42.5.0</dependency.postgresql.version>
|
||||
<dependency.postgresql.version>42.5.2</dependency.postgresql.version>
|
||||
<dependency.mysql.version>8.0.30</dependency.mysql.version>
|
||||
<dependency.mysql-image.version>8</dependency.mysql-image.version>
|
||||
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
|
||||
@@ -148,7 +148,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>20.73</tag>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
/*
|
||||
* #%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 - 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.rest.api.impl;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.tagging.NonExistentTagException;
|
||||
import org.alfresco.repo.tagging.TagExistsException;
|
||||
@@ -60,7 +60,7 @@ import org.alfresco.util.TypeConstraint;
|
||||
*/
|
||||
public class TagsImpl implements Tags
|
||||
{
|
||||
private static final Object PARAM_INCLUDE_COUNT = "count";
|
||||
private static final Object PARAM_INCLUDE_COUNT = "count";
|
||||
private Nodes nodes;
|
||||
private TaggingService taggingService;
|
||||
private TypeConstraint typeConstraint;
|
||||
@@ -128,37 +128,37 @@ public class TagsImpl implements Tags
|
||||
taggingService.removeTag(nodeRef, tagValue);
|
||||
}
|
||||
|
||||
public CollectionWithPagingInfo<Tag> getTags(StoreRef storeRef, Parameters params)
|
||||
{
|
||||
Paging paging = params.getPaging();
|
||||
PagingResults<Pair<NodeRef, String>> results = taggingService.getTags(storeRef, Util.getPagingRequest(paging));
|
||||
taggingService.getPagedTags(storeRef, 0, paging.getMaxItems());
|
||||
Integer totalItems = results.getTotalResultCount().getFirst();
|
||||
List<Pair<NodeRef, String>> page = results.getPage();
|
||||
List<Tag> tags = new ArrayList<Tag>(page.size());
|
||||
List<Pair<String, Integer>> tagsByCount = null;
|
||||
Map<String, Integer> tagsByCountMap = new HashMap<String, Integer>();
|
||||
|
||||
if (params.getInclude().contains(PARAM_INCLUDE_COUNT))
|
||||
{
|
||||
tagsByCount = taggingService.findTaggedNodesAndCountByTagName(storeRef);
|
||||
if (tagsByCount != null)
|
||||
{
|
||||
for (Pair<String, Integer> tagByCountElem : tagsByCount)
|
||||
{
|
||||
tagsByCountMap.put(tagByCountElem.getFirst(), tagByCountElem.getSecond());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Pair<NodeRef, String> pair : page)
|
||||
{
|
||||
Tag selectedTag = new Tag(pair.getFirst(), pair.getSecond());
|
||||
selectedTag.setCount(tagsByCountMap.get(selectedTag.getTag()));
|
||||
tags.add(selectedTag);
|
||||
}
|
||||
|
||||
return CollectionWithPagingInfo.asPaged(paging, tags, results.hasMoreItems(), (totalItems == null ? null : totalItems.intValue()));
|
||||
}
|
||||
public CollectionWithPagingInfo<Tag> getTags(StoreRef storeRef, Parameters params)
|
||||
{
|
||||
Paging paging = params.getPaging();
|
||||
PagingResults<Pair<NodeRef, String>> results = taggingService.getTags(storeRef, Util.getPagingRequest(paging));
|
||||
taggingService.getPagedTags(storeRef, 0, paging.getMaxItems());
|
||||
Integer totalItems = results.getTotalResultCount().getFirst();
|
||||
List<Pair<NodeRef, String>> page = results.getPage();
|
||||
List<Tag> tags = new ArrayList<Tag>(page.size());
|
||||
List<Pair<String, Integer>> tagsByCount = null;
|
||||
Map<String, Integer> tagsByCountMap = new HashMap<String, Integer>();
|
||||
|
||||
if (params.getInclude().contains(PARAM_INCLUDE_COUNT))
|
||||
{
|
||||
tagsByCount = taggingService.findTaggedNodesAndCountByTagName(storeRef);
|
||||
if (tagsByCount != null)
|
||||
{
|
||||
for (Pair<String, Integer> tagByCountElem : tagsByCount)
|
||||
{
|
||||
tagsByCountMap.put(tagByCountElem.getFirst(), tagByCountElem.getSecond());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Pair<NodeRef, String> pair : page)
|
||||
{
|
||||
Tag selectedTag = new Tag(pair.getFirst(), pair.getSecond());
|
||||
selectedTag.setCount(tagsByCountMap.get(selectedTag.getTag()));
|
||||
tags.add(selectedTag);
|
||||
}
|
||||
|
||||
return CollectionWithPagingInfo.asPaged(paging, tags, results.hasMoreItems(), (totalItems == null ? null : totalItems.intValue()));
|
||||
}
|
||||
|
||||
public NodeRef validateTag(String tagId)
|
||||
{
|
||||
@@ -177,6 +177,11 @@ public class TagsImpl implements Tags
|
||||
{
|
||||
throw new EntityNotFoundException(tagId);
|
||||
}
|
||||
String tag = taggingService.getTagName(tagNodeRef);
|
||||
if(taggingService.isTag(storeRef,tag)==false)
|
||||
{
|
||||
throw new EntityNotFoundException(tagId);
|
||||
}
|
||||
return tagNodeRef;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>20.73</version>
|
||||
<version>20.79-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -304,6 +304,14 @@ public class EventConsolidator implements EventSupportedPolicies
|
||||
builder.setProperties(mappedProps);
|
||||
resourceBeforeAllFieldsNull = false;
|
||||
}
|
||||
|
||||
Map<String, Map<String, String>> localizedProps =helper.getLocalizedPropertiesBefore(changedPropsBefore, after);
|
||||
if (!localizedProps.isEmpty())
|
||||
{
|
||||
builder.setLocalizedProperties(localizedProps);
|
||||
resourceBeforeAllFieldsNull = false;
|
||||
}
|
||||
|
||||
String name = (String) changedPropsBefore.get(ContentModel.PROP_NAME);
|
||||
if (name != null)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
package org.alfresco.repo.event2;
|
||||
|
||||
import static java.util.Optional.ofNullable;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
@@ -34,8 +36,11 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.event.v1.model.ContentInfo;
|
||||
import org.alfresco.repo.event.v1.model.NodeResource;
|
||||
@@ -43,6 +48,7 @@ import org.alfresco.repo.event.v1.model.UserInfo;
|
||||
import org.alfresco.repo.event2.filter.EventFilterRegistry;
|
||||
import org.alfresco.repo.event2.filter.NodeAspectFilter;
|
||||
import org.alfresco.repo.event2.filter.NodePropertyFilter;
|
||||
import org.alfresco.repo.node.MLPropertyInterceptor;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
@@ -152,6 +158,7 @@ public class NodeResourceHelper implements InitializingBean
|
||||
.setPrimaryAssocQName(getPrimaryAssocQName(nodeRef))
|
||||
.setPrimaryHierarchy(PathUtil.getNodeIdsInReverse(path, false))
|
||||
.setProperties(mapToNodeProperties(properties))
|
||||
.setLocalizedProperties(mapToNodeLocalizedProperties(properties))
|
||||
.setAspectNames(getMappedAspects(nodeRef));
|
||||
}
|
||||
|
||||
@@ -200,9 +207,8 @@ public class NodeResourceHelper implements InitializingBean
|
||||
props.forEach((k, v) -> {
|
||||
if (!nodePropertyFilter.isExcluded(k))
|
||||
{
|
||||
if (v != null && v instanceof MLText)
|
||||
if (v instanceof MLText)
|
||||
{
|
||||
//TODO - should we send all of the values if multiple locales exist?
|
||||
v = ((MLText) v).getDefaultValue();
|
||||
}
|
||||
|
||||
@@ -213,6 +219,23 @@ public class NodeResourceHelper implements InitializingBean
|
||||
return filteredProps;
|
||||
}
|
||||
|
||||
public Map<String, Map<String, String>> mapToNodeLocalizedProperties(Map<QName, Serializable> props)
|
||||
{
|
||||
Map<String, Map<String, String>> filteredProps = new HashMap<>(props.size());
|
||||
|
||||
props.forEach((k, v) -> {
|
||||
if (!nodePropertyFilter.isExcluded(k) && v instanceof MLText)
|
||||
{
|
||||
final MLText mlTextValue = (MLText) v;
|
||||
final HashMap<String, String> localizedValues = new HashMap<>(mlTextValue.size());
|
||||
mlTextValue.forEach((locale, text) -> localizedValues.put(locale.toString(), text));
|
||||
filteredProps.put(getQNamePrefixString(k), localizedValues);
|
||||
}
|
||||
});
|
||||
|
||||
return filteredProps.isEmpty() ? null : filteredProps;
|
||||
}
|
||||
|
||||
public ContentInfo getContentInfo(Map<QName, Serializable> props)
|
||||
{
|
||||
final Serializable content = props.get(ContentModel.PROP_CONTENT);
|
||||
@@ -313,11 +336,6 @@ public class NodeResourceHelper implements InitializingBean
|
||||
return filteredAspects;
|
||||
}
|
||||
|
||||
private boolean isNotEmptyString(Serializable ser)
|
||||
{
|
||||
return !(ser instanceof String) || !((String) ser).isEmpty();
|
||||
}
|
||||
|
||||
public QName getNodeType(NodeRef nodeRef)
|
||||
{
|
||||
return nodeService.getType(nodeRef);
|
||||
@@ -330,7 +348,58 @@ public class NodeResourceHelper implements InitializingBean
|
||||
|
||||
public Map<QName, Serializable> getProperties(NodeRef nodeRef)
|
||||
{
|
||||
return nodeService.getProperties(nodeRef);
|
||||
//We need to have full MLText properties here. This is why we are marking the current thread as MLAware
|
||||
final boolean toRestore = MLPropertyInterceptor.isMLAware();
|
||||
MLPropertyInterceptor.setMLAware(true);
|
||||
try
|
||||
{
|
||||
return nodeService.getProperties(nodeRef);
|
||||
} finally
|
||||
{
|
||||
MLPropertyInterceptor.setMLAware(toRestore);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, Map<String, String>> getLocalizedPropertiesBefore(Map<QName, Serializable> propsBefore, NodeResource nodeAfter)
|
||||
{
|
||||
final Map<String, Map<String, String>> locPropsBefore = ofNullable(propsBefore)
|
||||
.map(this::mapToNodeLocalizedProperties)
|
||||
.orElseGet(Map::of);
|
||||
final Map<String, Map<String, String>> locPropsAfter = ofNullable(nodeAfter)
|
||||
.map(NodeResource::getLocalizedProperties)
|
||||
.orElseGet(Map::of);
|
||||
|
||||
return getLocalizedPropertiesBefore(locPropsBefore, locPropsAfter);
|
||||
}
|
||||
|
||||
static Map<String, Map<String, String>> getLocalizedPropertiesBefore(Map<String, Map<String, String>> locPropsBefore,
|
||||
Map<String, Map<String, String>> locPropsAfter)
|
||||
{
|
||||
final Map<String, Map<String, String>> result = new HashMap<>(locPropsBefore.size());
|
||||
|
||||
Sets.union(locPropsBefore.keySet(), locPropsAfter.keySet()).forEach(propertyName -> {
|
||||
final Map<String, String> valuesBefore = ofNullable(locPropsBefore.get(propertyName)).orElseGet(Map::of);
|
||||
final Map<String, String> valuesAfter = ofNullable(locPropsAfter.get(propertyName)).orElseGet(Map::of);
|
||||
|
||||
if (!valuesAfter.isEmpty() || !valuesBefore.isEmpty())
|
||||
{
|
||||
final Map<String, String> diff = new HashMap<>(valuesBefore.size());
|
||||
Sets.union(valuesBefore.keySet(), valuesAfter.keySet()).forEach(lang -> {
|
||||
final String valueBefore = valuesBefore.get(lang);
|
||||
final String valueAfter = valuesAfter.get(lang);
|
||||
if (!Objects.equals(valueBefore, valueAfter))
|
||||
{
|
||||
diff.put(lang, valueBefore);
|
||||
}
|
||||
});
|
||||
if (!diff.isEmpty())
|
||||
{
|
||||
result.put(propertyName, diff);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public Set<String> getMappedAspects(NodeRef nodeRef)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// check category exists?
|
||||
var category = search.luceneSearch("PATH:\"/cm:generalclassifiable//cm:" + url.extension + "\"");
|
||||
var category = search.luceneSearch("PATH:\"/cm:categoryRoot/cm:generalclassifiable//cm:" + url.extension + "\"");
|
||||
if (category == undefined)
|
||||
{
|
||||
status.code = 404;
|
||||
@@ -9,6 +9,6 @@ if (category == undefined)
|
||||
else
|
||||
{
|
||||
// perform category search
|
||||
var nodes = search.luceneSearch("PATH:\"/cm:generalclassifiable//cm:" + url.extension + "//member\"");
|
||||
var nodes = search.luceneSearch("PATH:\"/cm:categoryRoot/cm:generalclassifiable//cm:" + url.extension + "//member\"");
|
||||
model.resultset = nodes;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<value>{http://www.alfresco.org/model/content/1.0}categories</value>
|
||||
</key>
|
||||
<!-- Note - FreeMarker ${..} entries must be escaped in Spring context files -->
|
||||
<value>\$\{selectSingleNode('workspace://SpacesStore', 'lucene', 'PATH:"/cm:generalclassifiable/cm:Languages/cm:English"' )\}</value>
|
||||
<value>\$\{selectSingleNode('workspace://SpacesStore', 'lucene', 'PATH:"/cm:categoryRoot/cm:generalclassifiable/cm:Languages/cm:English"' )\}</value>
|
||||
</entry>
|
||||
</map>
|
||||
</property>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -32,6 +32,7 @@ import static org.awaitility.Awaitility.await;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.jms.ConnectionFactory;
|
||||
|
||||
@@ -47,6 +48,7 @@ import org.alfresco.repo.event.v1.model.Resource;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.service.cmr.dictionary.CustomModelService;
|
||||
import org.alfresco.service.cmr.repository.MLText;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
@@ -89,6 +91,11 @@ public abstract class AbstractContextAwareRepoEvent extends BaseSpringTest
|
||||
private static final String CAMEL_ROUTE = "jms:topic:" + TOPIC_NAME;
|
||||
private static final CamelContext CAMEL_CONTEXT = new DefaultCamelContext();
|
||||
|
||||
protected final Locale defaultLocale = new Locale(MLText.getDefaultLocale().getLanguage());
|
||||
protected final Locale germanLocale = new Locale(Locale.GERMAN.getLanguage(), "XX");
|
||||
protected final Locale frenchLocale = new Locale(Locale.FRENCH.getLanguage());
|
||||
protected final Locale japaneseLocale = new Locale(Locale.JAPANESE.getLanguage(), "YY", "ZZ");
|
||||
|
||||
private static boolean isCamelConfigured;
|
||||
private static DataFormat dataFormat;
|
||||
|
||||
@@ -388,6 +395,20 @@ public abstract class AbstractContextAwareRepoEvent extends BaseSpringTest
|
||||
return (T) resource.getProperties().get(propertyName);
|
||||
}
|
||||
|
||||
protected String getLocalizedProperty(NodeResource resource, String propertyName, Locale locale)
|
||||
{
|
||||
assertTrue(containsLocalizedProperty(resource, propertyName, locale));
|
||||
return resource.getLocalizedProperties().get(propertyName).get(locale.toString());
|
||||
}
|
||||
|
||||
protected boolean containsLocalizedProperty(NodeResource resource, String propertyName, Locale locale)
|
||||
{
|
||||
assertNotNull(resource);
|
||||
assertNotNull(resource.getLocalizedProperties());
|
||||
assertNotNull(resource.getLocalizedProperties().get(propertyName));
|
||||
return resource.getLocalizedProperties().get(propertyName).containsKey(locale.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Await at most 5 seconds for the condition (ie. {@code numOfEvents})
|
||||
* to be met before throwing a timeout exception.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -38,6 +38,7 @@ import org.alfresco.repo.event.v1.model.EventData;
|
||||
import org.alfresco.repo.event.v1.model.EventType;
|
||||
import org.alfresco.repo.event.v1.model.NodeResource;
|
||||
import org.alfresco.repo.event.v1.model.RepoEvent;
|
||||
import org.alfresco.service.cmr.repository.MLText;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.GUID;
|
||||
@@ -50,7 +51,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
*/
|
||||
public class CreateRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private NodeDAO nodeDAO;
|
||||
|
||||
@@ -63,6 +63,9 @@ public class CreateRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
PropertyMap propertyMap = new PropertyMap();
|
||||
propertyMap.put(ContentModel.PROP_TITLE, "test title");
|
||||
propertyMap.put(ContentModel.PROP_NAME, name);
|
||||
final MLText localizedDescription = new MLText(germanLocale, "german description");
|
||||
localizedDescription.addValue(defaultLocale, "default description");
|
||||
propertyMap.put(ContentModel.PROP_DESCRIPTION, localizedDescription);
|
||||
final NodeRef nodeRef = createNode(ContentModel.TYPE_CONTENT, localName, propertyMap);
|
||||
|
||||
final RepoEvent<EventData<NodeResource>> resultRepoEvent = getRepoEvent(1);
|
||||
@@ -91,6 +94,10 @@ public class CreateRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
assertNotNull(nodeResource.getPrimaryHierarchy());
|
||||
assertNotNull("Default aspects were not added. ", nodeResource.getAspectNames());
|
||||
assertEquals("test title", getProperty(nodeResource, "cm:title"));
|
||||
assertEquals("test title", getLocalizedProperty(nodeResource, "cm:title", defaultLocale));
|
||||
assertEquals("default description", getProperty(nodeResource, "cm:description"));
|
||||
assertEquals("default description", getLocalizedProperty(nodeResource, "cm:description", defaultLocale));
|
||||
assertEquals("german description", getLocalizedProperty(nodeResource, "cm:description", germanLocale));
|
||||
assertNull("There is no content.", nodeResource.getContent());
|
||||
|
||||
assertNotNull("Missing createdByUser property.", nodeResource.getCreatedByUser());
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -31,6 +31,7 @@ import org.alfresco.repo.event.v1.model.EventData;
|
||||
import org.alfresco.repo.event.v1.model.EventType;
|
||||
import org.alfresco.repo.event.v1.model.NodeResource;
|
||||
import org.alfresco.repo.event.v1.model.RepoEvent;
|
||||
import org.alfresco.service.cmr.repository.MLText;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.GUID;
|
||||
@@ -48,6 +49,9 @@ public class DeleteRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
String localName = GUID.generate();
|
||||
PropertyMap propertyMap = new PropertyMap();
|
||||
propertyMap.put(ContentModel.PROP_TITLE, "test title");
|
||||
final MLText localizedDescription = new MLText(germanLocale, "german description");
|
||||
localizedDescription.addValue(defaultLocale, "default description");
|
||||
propertyMap.put(ContentModel.PROP_DESCRIPTION, localizedDescription);
|
||||
NodeRef nodeRef = createNode(ContentModel.TYPE_CONTENT, localName, propertyMap);
|
||||
|
||||
NodeResource createdResource = getNodeResource(1);
|
||||
@@ -62,10 +66,16 @@ public class DeleteRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
|
||||
deleteNode(nodeRef);
|
||||
final RepoEvent<EventData<NodeResource>> resultRepoEvent = getRepoEvent(2);
|
||||
final NodeResource nodeResource = getNodeResource(resultRepoEvent);
|
||||
|
||||
assertEquals("Repo event type:", EventType.NODE_DELETED.getType(), resultRepoEvent.getType());
|
||||
assertEquals(createdResource.getId(), getNodeResource(resultRepoEvent).getId());
|
||||
assertEquals(createdResource.getId(), nodeResource.getId());
|
||||
assertEquals("Wrong primaryAssocQName prefix.", "ce:" + localName, createdResource.getPrimaryAssocQName());
|
||||
assertEquals("test title", getProperty(nodeResource, "cm:title"));
|
||||
assertEquals("test title", getLocalizedProperty(nodeResource, "cm:title", defaultLocale));
|
||||
assertEquals("default description", getProperty(nodeResource, "cm:description"));
|
||||
assertEquals("default description", getLocalizedProperty(nodeResource, "cm:description", defaultLocale));
|
||||
assertEquals("german description", getLocalizedProperty(nodeResource, "cm:description", germanLocale));
|
||||
|
||||
// There should be no resourceBefore
|
||||
EventData<NodeResource> eventData = getEventData(resultRepoEvent);
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* 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.repo.event2;
|
||||
|
||||
import static org.alfresco.repo.event2.NodeResourceHelper.getLocalizedPropertiesBefore;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class NodeResourceHelperUnitTest
|
||||
{
|
||||
@Test
|
||||
public void shouldExtractOnlyRelevantPropertiesForBeforeNode()
|
||||
{
|
||||
final Map<String, Map<String, String>> before =
|
||||
Map.of(
|
||||
"unchanged-empty", locValues(),
|
||||
"unchanged-non-empty", locValues("pl", "Kiełbasa", "en", "Sausage"),
|
||||
"changed-added", locValues("pl", "Kiełbasa"),
|
||||
"changed-modified", locValues("pl", "XYZ", "en", "Sausage"),
|
||||
"changed-deleted", locValues("pl", "Kiełbasa", "en", "Sausage"),
|
||||
"changed-added-modified-deleted", locValues("pl", "XYZ", "en", "Sausage"),
|
||||
"changed-to-empty", locValues("pl", "Kiełbasa", "en", "Sausage"),
|
||||
"changed-from-empty", locValues(),
|
||||
"removed-empty", locValues(),
|
||||
"removed-non-empty", locValues("pl", "Kiełbasa", "en", "Sausage")
|
||||
);
|
||||
|
||||
final Map<String, Map<String, String>> after =
|
||||
Map.of(
|
||||
"unchanged-empty", locValues(),
|
||||
"unchanged-non-empty", locValues("pl", "Kiełbasa", "en", "Sausage"),
|
||||
"changed-added", locValues("pl", "Kiełbasa", "en", "Sausage"),
|
||||
"changed-modified", locValues("pl", "Kiełbasa", "en", "Sausage"),
|
||||
"changed-deleted", locValues("en", "Sausage"),
|
||||
"changed-added-modified-deleted", locValues("pl", "Kiełbasa", "de", "Würst"),
|
||||
"changed-to-empty", locValues(),
|
||||
"changed-from-empty", locValues("pl", "Kiełbasa", "en", "Sausage"),
|
||||
"new-empty", locValues(),
|
||||
"new-non-empty", locValues("de", "Würst")
|
||||
);
|
||||
|
||||
final Map<String, Map<String, String>> diff = getLocalizedPropertiesBefore(before, after);
|
||||
|
||||
assertFalse(diff.containsKey("unchanged-empty"));
|
||||
assertFalse(diff.containsKey("unchanged-non-empty"));
|
||||
assertEquals(locValues("en", null), diff.get("changed-added"));
|
||||
assertEquals(locValues("pl", "XYZ"), diff.get("changed-modified"));
|
||||
assertEquals(locValues("pl", "Kiełbasa"), diff.get("changed-deleted"));
|
||||
assertEquals(locValues("pl", "XYZ", "en", "Sausage", "de", null), diff.get("changed-added-modified-deleted"));
|
||||
assertEquals(locValues("pl", "Kiełbasa", "en", "Sausage"), diff.get("changed-to-empty"));
|
||||
assertEquals(locValues("pl", null, "en", null), diff.get("changed-from-empty"));
|
||||
assertFalse(diff.containsKey("removed-empty"));
|
||||
assertEquals(locValues("pl", "Kiełbasa", "en", "Sausage"), diff.get("removed-non-empty"));
|
||||
assertFalse(diff.containsKey("new-empty"));
|
||||
assertEquals(locValues("de", null), diff.get("new-non-empty"));
|
||||
}
|
||||
|
||||
private LocalizedValues locValues(String l1, String v1, String l2, String v2, String l3, String v3)
|
||||
{
|
||||
return locValues(l1, v1, l2, v2).append(l3, v3);
|
||||
}
|
||||
|
||||
private LocalizedValues locValues(String l1, String v1, String l2, String v2)
|
||||
{
|
||||
return locValues(l1, v1).append(l2, v2);
|
||||
}
|
||||
|
||||
private LocalizedValues locValues(String l1, String v1)
|
||||
{
|
||||
return locValues().append(l1, v1);
|
||||
}
|
||||
|
||||
private LocalizedValues locValues()
|
||||
{
|
||||
return new LocalizedValues();
|
||||
}
|
||||
|
||||
private static class LocalizedValues extends HashMap<String, String>
|
||||
{
|
||||
public LocalizedValues append(String language, String value)
|
||||
{
|
||||
this.put(language, value);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -34,7 +34,8 @@ import org.junit.runners.Suite.SuiteClasses;
|
||||
@SuiteClasses({ EventFilterUnitTest.class,
|
||||
EventConsolidatorUnitTest.class,
|
||||
EventJSONSchemaUnitTest.class,
|
||||
EventGeneratorQueueUnitTest.class
|
||||
EventGeneratorQueueUnitTest.class,
|
||||
NodeResourceHelperUnitTest.class
|
||||
})
|
||||
public class RepoEvent2UnitSuite
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
package org.alfresco.repo.event2;
|
||||
|
||||
import static org.alfresco.model.ContentModel.PROP_DESCRIPTION;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@@ -46,6 +48,7 @@ import org.alfresco.service.cmr.dictionary.CustomModelDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.TypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.MLText;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.GUID;
|
||||
@@ -279,6 +282,60 @@ public class UpdateRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
assertNull(resourceBefore.getPrimaryAssocQName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateContentWithLocalizedProperties()
|
||||
{
|
||||
final String description = "cm:description";
|
||||
final NodeRef nodeRef = createNode(ContentModel.TYPE_CONTENT);
|
||||
NodeResource resource = getNodeResource(1);
|
||||
|
||||
assertNull(getProperty(resource, description));
|
||||
assertNull(resource.getLocalizedProperties());
|
||||
assertNull(getEventData(1).getResourceBefore());
|
||||
|
||||
retryingTransactionHelper.doInTransaction(() -> {
|
||||
final MLText localizedDescription = new MLText(germanLocale, "german description");
|
||||
localizedDescription.addValue(defaultLocale, "default description");
|
||||
localizedDescription.addValue(japaneseLocale, "japanese description");
|
||||
|
||||
nodeService.setProperty(nodeRef, PROP_DESCRIPTION, localizedDescription);
|
||||
return null;
|
||||
});
|
||||
|
||||
resource = getNodeResource(2);
|
||||
NodeResource resourceBefore = getNodeResourceBefore(2);
|
||||
|
||||
assertEquals("default description", getProperty(resource, description));
|
||||
assertEquals("default description", getLocalizedProperty(resource, description, defaultLocale));
|
||||
assertEquals("german description", getLocalizedProperty(resource, description, germanLocale));
|
||||
assertEquals("japanese description", getLocalizedProperty(resource, description, japaneseLocale));
|
||||
assertNull(getLocalizedProperty(resourceBefore, description, defaultLocale));
|
||||
assertNull(getLocalizedProperty(resourceBefore, description, germanLocale));
|
||||
assertNull(getLocalizedProperty(resourceBefore, description, japaneseLocale));
|
||||
|
||||
retryingTransactionHelper.doInTransaction(() -> {
|
||||
final MLText localizedDescription = new MLText(frenchLocale, "french description added");
|
||||
localizedDescription.addValue(defaultLocale, "default description modified");
|
||||
localizedDescription.addValue(japaneseLocale, "japanese description");
|
||||
|
||||
nodeService.setProperty(nodeRef, PROP_DESCRIPTION, localizedDescription);
|
||||
return null;
|
||||
});
|
||||
|
||||
resource = getNodeResource(3);
|
||||
resourceBefore = getNodeResourceBefore(3);
|
||||
|
||||
assertEquals("default description modified", getProperty(resource, description));
|
||||
assertEquals("default description modified", getLocalizedProperty(resource, description, defaultLocale));
|
||||
assertEquals("french description added", getLocalizedProperty(resource, description, frenchLocale));
|
||||
assertEquals("japanese description", getLocalizedProperty(resource, description, japaneseLocale));
|
||||
assertFalse(containsLocalizedProperty(resource, description, germanLocale));
|
||||
assertEquals("default description", getLocalizedProperty(resourceBefore, description, defaultLocale));
|
||||
assertEquals("german description", getLocalizedProperty(resourceBefore, description, germanLocale));
|
||||
assertNull(getLocalizedProperty(resourceBefore, description, frenchLocale));
|
||||
assertFalse(containsLocalizedProperty(resourceBefore, description, japaneseLocale));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateContentTitle()
|
||||
{
|
||||
@@ -296,8 +353,11 @@ public class UpdateRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
});
|
||||
|
||||
resource = getNodeResource(2);
|
||||
NodeResource resourceBefore = getNodeResourceBefore(2);
|
||||
title = getProperty(resource, "cm:title");
|
||||
assertEquals("test title", title);
|
||||
assertEquals("test title", getLocalizedProperty(resource, "cm:title", defaultLocale));
|
||||
assertNull(getLocalizedProperty(resourceBefore, "cm:title", defaultLocale));
|
||||
|
||||
// update content cm:title property again with "new test title" value
|
||||
retryingTransactionHelper.doInTransaction(() -> {
|
||||
@@ -308,10 +368,13 @@ public class UpdateRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
resource = getNodeResource(3);
|
||||
title = getProperty(resource, "cm:title");
|
||||
assertEquals("new test title", title);
|
||||
assertEquals("new test title", getLocalizedProperty(resource, "cm:title", defaultLocale));
|
||||
|
||||
NodeResource resourceBefore = getNodeResourceBefore(3);
|
||||
|
||||
resourceBefore = getNodeResourceBefore(3);
|
||||
title = getProperty(resourceBefore, "cm:title");
|
||||
assertEquals("Wrong old property.", "test title", title);
|
||||
assertEquals("test title", getLocalizedProperty(resourceBefore, "cm:title", defaultLocale));
|
||||
assertNotNull(resourceBefore.getModifiedAt());
|
||||
}
|
||||
|
||||
@@ -354,7 +417,7 @@ public class UpdateRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
|
||||
// update content cm:description property with "test_description" value
|
||||
retryingTransactionHelper.doInTransaction(() -> {
|
||||
nodeService.setProperty(nodeRef, ContentModel.PROP_DESCRIPTION, "test description");
|
||||
nodeService.setProperty(nodeRef, PROP_DESCRIPTION, "test description");
|
||||
return null;
|
||||
});
|
||||
|
||||
@@ -492,7 +555,7 @@ public class UpdateRepoEventIT extends AbstractContextAwareRepoEvent
|
||||
QName.createQName(TEST_NAMESPACE, GUID.generate()),
|
||||
ContentModel.TYPE_CONTENT).getChildRef();
|
||||
|
||||
nodeService.setProperty(node1, ContentModel.PROP_DESCRIPTION, "test description");
|
||||
nodeService.setProperty(node1, PROP_DESCRIPTION, "test description");
|
||||
return null;
|
||||
});
|
||||
//Create and update node are done in the same transaction so one event is expected
|
||||
|
||||
@@ -1220,7 +1220,7 @@ public class MultiTDemoTest extends TestCase
|
||||
}
|
||||
|
||||
// Find all root categories
|
||||
String query = "PATH:\"/cm:generalclassifiable/*\"";
|
||||
String query = "PATH:\"/cm:categoryRoot/cm:generalclassifiable/*\"";
|
||||
ResultSet resultSet = searchService.query(SPACES_STORE, SearchService.LANGUAGE_LUCENE, query);
|
||||
int cnt = resultSet.length();
|
||||
|
||||
@@ -1246,7 +1246,7 @@ public class MultiTDemoTest extends TestCase
|
||||
assertEquals(cnt, resultSet.length());
|
||||
resultSet.close();
|
||||
|
||||
String queryMembers = "PATH:\"/cm:generalclassifiable//cm:catA/member\"";
|
||||
String queryMembers = "PATH:\"/cm:categoryRoot/cm:generalclassifiable//cm:catA/member\"";
|
||||
resultSet = searchService.query(SPACES_STORE, SearchService.LANGUAGE_LUCENE, queryMembers);
|
||||
assertEquals(0, resultSet.length());
|
||||
resultSet.close();
|
||||
@@ -1273,7 +1273,7 @@ public class MultiTDemoTest extends TestCase
|
||||
assertEquals(1, categories.size());
|
||||
|
||||
// test ETHREEOH-210
|
||||
queryMembers = "PATH:\"/cm:generalclassifiable//cm:CatA/member\"";
|
||||
queryMembers = "PATH:\"/cm:categoryRoot/cm:generalclassifiable//cm:CatA/member\"";
|
||||
resultSet = searchService.query(SPACES_STORE, SearchService.LANGUAGE_LUCENE, queryMembers);
|
||||
assertEquals(1, resultSet.length());
|
||||
resultSet.close();
|
||||
|
||||
@@ -5,7 +5,6 @@ set -vex
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
|
||||
# Maven Setup
|
||||
mkdir -p "${HOME}/.m2" && cp -f .github/.ci.settings.xml "${HOME}/.m2/settings.xml"
|
||||
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf
|
||||
|
||||
# Docker Logins
|
||||
|
||||
Reference in New Issue
Block a user