mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
Compare commits
258 Commits
23.1.0.185
...
hack-build
Author | SHA1 | Date | |
---|---|---|---|
|
a99e5cdde9 | ||
|
7bc6dd142b | ||
|
6cbd2d7d50 | ||
|
1786cbec99 | ||
|
e16a53a23e | ||
|
21fb85f2a9 | ||
|
7dfd41997a | ||
|
6374aa30d6 | ||
|
ed8bdc87da | ||
|
5b8d758947 | ||
|
ed3f170d05 | ||
|
8d51e9885a | ||
|
a61faaece5 | ||
|
30de66257f | ||
|
ae1f955cc2 | ||
|
452db9a963 | ||
|
4eeb7feb74 | ||
|
5aa8c37c53 | ||
|
aafdd3c46a | ||
|
f73cf70cbb | ||
|
dd0e0626bd | ||
|
e4a5c1a38e | ||
|
c698ed1d6d | ||
|
2632486e0f | ||
|
ea24992b57 | ||
|
e6b35b7f66 | ||
|
0aa5fd7f59 | ||
|
55862fc394 | ||
|
f942c7b9df | ||
|
585111602f | ||
|
473942f3ba | ||
|
99905d349b | ||
|
4f1efa183c | ||
|
141c5f3b34 | ||
|
7c863be25e | ||
|
ad6354bd32 | ||
|
30e191a8cd | ||
|
b2bcfd72c1 | ||
|
698ca01778 | ||
|
e16a0820ee | ||
|
1f99216d37 | ||
|
3c60415ea0 | ||
|
e749ac6478 | ||
|
6cdcf7928a | ||
|
542230764d | ||
|
878cd3ceee | ||
|
582fc8ec2d | ||
|
53c99a0ba4 | ||
|
07cd283a1e | ||
|
f7a4da0ba5 | ||
|
c344f7ab1a | ||
|
afe100097e | ||
|
2cc0137be3 | ||
|
3e91bf6739 | ||
|
4b77b77013 | ||
|
7a84e4d5f1 | ||
|
eedb601320 | ||
|
536ac35aab | ||
|
a61d5a407e | ||
|
e8c9c9aef5 | ||
|
6b832aecd1 | ||
|
eebacd0a5f | ||
|
6eff1e1219 | ||
|
e52aaa6b8d | ||
|
fb78a5fe41 | ||
|
7b4c420f3e | ||
|
507a617c51 | ||
|
637cdd4f3b | ||
|
8959db9017 | ||
|
9032e1cd69 | ||
|
32f33c04b2 | ||
|
ce3b4f5f0c | ||
|
9fd4efcec7 | ||
|
395d7ded57 | ||
|
c157780dcb | ||
|
63be57cafe | ||
|
64dad4fc89 | ||
|
2f7db5f0ee | ||
|
61ff6dafe8 | ||
|
456adc2aa2 | ||
|
daf573e24a | ||
|
d46fbdcf4c | ||
|
70f3982b56 | ||
|
196817cd77 | ||
|
58b0075a68 | ||
|
d616226918 | ||
|
c3dadf6bbf | ||
|
a973e17a86 | ||
|
86d22ccd8e | ||
|
e0a1defb80 | ||
|
eebd110c34 | ||
|
9d60e36682 | ||
|
248fecd030 | ||
|
d3498f4bc4 | ||
|
a862b8f829 | ||
|
73a3f9bb19 | ||
|
71063661ea | ||
|
449c58adad | ||
|
94066cc682 | ||
|
52991462a7 | ||
|
e530ffb9b6 | ||
|
5e0c592fe9 | ||
|
fb3552945e | ||
|
8a43c5741d | ||
|
6af36ae79e | ||
|
d1585e4578 | ||
|
dee199da5e | ||
|
cd0db19ef8 | ||
|
ea835f9185 | ||
|
b3f49ebe54 | ||
|
a956469a0b | ||
|
a6f57ef9e8 | ||
|
67b5c9bc70 | ||
|
cd72aba32b | ||
|
7f43175288 | ||
|
60437b1cc3 | ||
|
5eae584ea5 | ||
|
234222ba4b | ||
|
d6c4934910 | ||
|
5fc889a101 | ||
|
ce8f1bda77 | ||
|
37606c1aa5 | ||
|
48d7f4223e | ||
|
e070354764 | ||
|
0c4ce183be | ||
|
c6881ac128 | ||
|
4c4c561f94 | ||
|
7c993ba695 | ||
|
8f929d9744 | ||
|
c28be29c0e | ||
|
285080566a | ||
|
99f8ba31c4 | ||
|
ce9bf0cd71 | ||
|
e436be7f10 | ||
|
06a4e28b40 | ||
|
5b9311a18a | ||
|
ccd2f5e996 | ||
|
94ac09bf44 | ||
|
9331c33e87 | ||
|
ba250f6872 | ||
|
5343b615e4 | ||
|
80ffd2826c | ||
|
41ce8a869e | ||
|
9ece324e92 | ||
|
ddd0fac97e | ||
|
c43dc66e2e | ||
|
a09c7ef4ca | ||
|
e89f0b4e82 | ||
|
e7f9b439ae | ||
|
4a0f5eab77 | ||
|
779c16677b | ||
|
ddf14c7e31 | ||
|
71df1b01e2 | ||
|
fc83e0d131 | ||
|
bce387bbb7 | ||
|
9fb46ed66c | ||
|
203f2933bc | ||
|
5849da3cc1 | ||
|
c3bcc5f242 | ||
|
7078ba7d56 | ||
|
65dd5be19b | ||
|
08e67aa004 | ||
|
63db311d11 | ||
|
ed674cfa2e | ||
|
21d7cf8c69 | ||
|
077ea7f9a5 | ||
|
6384a33ac9 | ||
|
0800c0e42a | ||
|
94b0bae03c | ||
|
82eef1b975 | ||
|
67fa274abb | ||
|
acc50febda | ||
|
7b4ba83797 | ||
|
874835301e | ||
|
9413bad6ef | ||
|
6af0413b08 | ||
|
5f75662aad | ||
|
6470baeeb2 | ||
|
8bfe25ef51 | ||
|
9207fde808 | ||
|
2f77cdd94f | ||
|
c18144643d | ||
|
746846982c | ||
|
63bc31acd1 | ||
|
332ff9791e | ||
|
03fe795fba | ||
|
557292982a | ||
|
d0fabbdf1f | ||
|
8d6a6aa69d | ||
|
293e6b2874 | ||
|
b0218f93cf | ||
|
b45441bd5c | ||
|
b17edae40e | ||
|
b884580688 | ||
|
a7d49cb4c0 | ||
|
4a274cf12d | ||
|
abda7368c4 | ||
|
1024ce468c | ||
|
6e1ba5a57d | ||
|
49ee002d4f | ||
|
a483159269 | ||
|
467a6d6970 | ||
|
9ffc211911 | ||
|
16e9c7b4d1 | ||
|
72ad6232f9 | ||
|
1d53410375 | ||
|
62acc9acd7 | ||
|
f6baf04711 | ||
|
468003d798 | ||
|
c3e8a57328 | ||
|
2ae93ee629 | ||
|
c7fc821b74 | ||
|
2867872733 | ||
|
644784d78e | ||
|
b700e7518b | ||
|
6f505bc673 | ||
|
e8a27dd68d | ||
|
3c242bc62b | ||
|
0b3755fda3 | ||
|
b90967d3a4 | ||
|
d10cbc2ad8 | ||
|
54178f0ab2 | ||
|
e4a4ad8106 | ||
|
89486b7492 | ||
|
88d4279df0 | ||
|
a1ae116b28 | ||
|
eefa2b7110 | ||
|
689dedb01f | ||
|
c6212fd711 | ||
|
597af3ab34 | ||
|
6d33166e24 | ||
|
6c9c1671f8 | ||
|
db13ac16f9 | ||
|
27186a56b8 | ||
|
653fb08a3a | ||
|
d0b8f9ffdc | ||
|
1d56eb1dd1 | ||
|
3a7dd08122 | ||
|
a3dffd36fe | ||
|
cb6257bf88 | ||
|
f67aef557a | ||
|
007b17b0b3 | ||
|
4df27b4627 | ||
|
663ca65c5c | ||
|
512af60f49 | ||
|
91edbd12d8 | ||
|
d06c1c483c | ||
|
f3e2855787 | ||
|
eacd10d40e | ||
|
ed6c22bd62 | ||
|
0c6eae8ffa | ||
|
ee345c6f7a | ||
|
bcc9dcae02 | ||
|
af5738c7c2 | ||
|
d713bc21d4 | ||
|
35cb8b7c82 | ||
|
48e4b0b48f | ||
|
de9d772962 |
96
.github/dependabot.yml
vendored
96
.github/dependabot.yml
vendored
@@ -14,15 +14,6 @@ updates:
|
||||
timezone: Africa/Abidjan
|
||||
open-pull-requests-limit: 99
|
||||
ignore:
|
||||
- dependency-name: com.google.code.gson:gson
|
||||
versions:
|
||||
- "> 2.8.6"
|
||||
- dependency-name: io.fabric8:fabric8-maven-plugin
|
||||
versions:
|
||||
- "> 4.4.0"
|
||||
- dependency-name: javax.servlet:javax.servlet-api
|
||||
versions:
|
||||
- "> 3.0.1"
|
||||
- dependency-name: org.acegisecurity:acegi-security
|
||||
versions:
|
||||
- "> 0.8.2_patched"
|
||||
@@ -52,92 +43,7 @@ updates:
|
||||
- "> 1.0.0"
|
||||
- dependency-name: org.freemarker:freemarker
|
||||
versions:
|
||||
- "> 2.3.20-alfresco-patched-20200421"
|
||||
- dependency-name: org.eclipse.jetty:jetty-server
|
||||
versions:
|
||||
- 9.4.38.v20210224
|
||||
- dependency-name: org.alfresco.tas:cmis
|
||||
versions:
|
||||
- "1.28"
|
||||
- dependency-name: org.springframework:spring-webmvc
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-web
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-tx
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-orm
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-test
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-jms
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-jdbc
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-expression
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-core
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-context-support
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-context
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-beans
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.springframework:spring-aop
|
||||
versions:
|
||||
- 5.3.4
|
||||
- 5.3.5
|
||||
- dependency-name: org.alfresco.tas:restapi
|
||||
versions:
|
||||
- "1.55"
|
||||
- dependency-name: org.eclipse.jetty:jetty-security
|
||||
versions:
|
||||
- 11.0.1
|
||||
- dependency-name: org.alfresco.aos-module:alfresco-vti-bin
|
||||
versions:
|
||||
- 1.4.0-M1
|
||||
- dependency-name: org.alfresco.aos-module:alfresco-aos-module-distributionzip
|
||||
versions:
|
||||
- 1.4.0-M1
|
||||
- dependency-name: org.alfresco.aos-module:alfresco-aos-module
|
||||
versions:
|
||||
- 1.4.0-M1
|
||||
- dependency-name: org.alfresco.surf:spring-webscripts-api
|
||||
versions:
|
||||
- "8.16"
|
||||
- dependency-name: org.alfresco.surf:spring-webscripts:tests
|
||||
versions:
|
||||
- "8.16"
|
||||
- dependency-name: org.alfresco.surf:spring-webscripts
|
||||
versions:
|
||||
- "8.16"
|
||||
- dependency-name: org.alfresco.surf:spring-surf-core-configservice
|
||||
versions:
|
||||
- "8.16"
|
||||
- "> 2.3.31-alfresco-patched"
|
||||
registries:
|
||||
- maven-repository-artifacts-alfresco-com-nexus-content-groups-int
|
||||
- package-ecosystem: "docker"
|
||||
|
207
.github/workflows/ci.yml
vendored
207
.github/workflows/ci.yml
vendored
@@ -36,8 +36,11 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Prepare maven cache and check compilation"
|
||||
@@ -55,11 +58,12 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.33.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.35.2
|
||||
continue-on-error: true
|
||||
with:
|
||||
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
||||
@@ -76,12 +80,10 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: Alfresco/ya-pmd-scan@v2.0.0
|
||||
with:
|
||||
fail-on-new-issues: "false"
|
||||
- uses: Alfresco/ya-pmd-scan@v2.0.5
|
||||
|
||||
all_unit_tests_suite:
|
||||
name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
|
||||
core_datamodel_tests:
|
||||
name: "Core, Data-Model - Build and test"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
@@ -90,14 +92,37 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run tests"
|
||||
run: |
|
||||
mvn -B test -pl core,data-model -am -DfailIfNoTests=false
|
||||
mvn -B test -pl "repository,mmt" -am "-Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite" -DfailIfNoTests=false
|
||||
run: mvn -B test -pl core,data-model -am -DfailIfNoTests=false
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
all_unit_tests_suite:
|
||||
name: "Repository - AllUnitTestsSuite - Build and test"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||
!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.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl repository,mmt -am -Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite -DfailIfNoTests=false
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
@@ -127,8 +152,11 @@ jobs:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -157,11 +185,14 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: ['10.2.18', '10.4', '10.5']
|
||||
version: ["10.2.18", "10.4", "10.5"]
|
||||
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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: Run MariaDB ${{ matrix.version }} database
|
||||
@@ -186,8 +217,11 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run MariaDB 10.6 database"
|
||||
@@ -212,8 +246,11 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run MySQL 8 database"
|
||||
@@ -225,8 +262,8 @@ jobs:
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
repository_postgresql_13_7_tests:
|
||||
name: "Repository - PostgreSQL 13.7 tests"
|
||||
repository_postgresql_13_12_tests:
|
||||
name: "Repository - PostgreSQL 13.12 tests"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
@@ -237,21 +274,52 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 13.7 database"
|
||||
- name: "Run PostgreSQL 13.12 database"
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||
env:
|
||||
POSTGRES_VERSION: 13.7
|
||||
POSTGRES_VERSION: 13.12
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
repository_postgresql_14_4_tests:
|
||||
name: "Repository - PostgreSQL 14.4 tests"
|
||||
repository_postgresql_14_9_tests:
|
||||
name: "Repository - PostgreSQL 14.9 tests"
|
||||
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 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.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 14.9 database"
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||
env:
|
||||
POSTGRES_VERSION: 14.9
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
repository_postgresql_15_4_tests:
|
||||
name: "Repository - PostgreSQL 15.4 tests"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
@@ -262,14 +330,17 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 14.4 database"
|
||||
- name: "Run PostgreSQL 15.4 database"
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||
env:
|
||||
POSTGRES_VERSION: 14.4
|
||||
POSTGRES_VERSION: 15.4
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
- name: "Clean Maven cache"
|
||||
@@ -285,8 +356,11 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run ActiveMQ"
|
||||
@@ -327,16 +401,19 @@ jobs:
|
||||
compose-profile: with-transform-core-aio
|
||||
- testSuite: SearchTestSuite
|
||||
compose-profile: default
|
||||
mvn-options: '-Dindex.subsystem.name=solr6'
|
||||
mvn-options: "-Dindex.subsystem.name=solr6"
|
||||
- testSuite: MTLSTestSuite
|
||||
compose-profile: with-mtls-transform-core-aio
|
||||
mtls: true
|
||||
disabledHostnameVerification: false
|
||||
mvn-options: '-Dencryption.ssl.keystore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.keystore -Dencryption.ssl.truststore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.truststore'
|
||||
mvn-options: "-Dencryption.ssl.keystore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.keystore -Dencryption.ssl.truststore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.truststore"
|
||||
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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Set transformers tag"
|
||||
@@ -405,8 +482,11 @@ jobs:
|
||||
REQUIRES_LOCAL_IMAGES: true
|
||||
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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -442,11 +522,14 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run Postgres 14.4 database"
|
||||
- name: "Run Postgres 15.4 database"
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl :alfresco-share-services -am -Dtest=ShareServicesTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
@@ -471,8 +554,11 @@ jobs:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -502,8 +588,11 @@ jobs:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -529,8 +618,11 @@ jobs:
|
||||
REQUIRES_LOCAL_IMAGES: true
|
||||
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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -565,7 +657,7 @@ jobs:
|
||||
ags_start_api_explorer:
|
||||
name: "Test Tomcat deployment of api explorer"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ prepare ]
|
||||
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]')) ||
|
||||
@@ -574,8 +666,11 @@ jobs:
|
||||
!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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@hack-build-cache
|
||||
with:
|
||||
build-cache: "true"
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
|
14
.github/workflows/master_release.yml
vendored
14
.github/workflows/master_release.yml
vendored
@@ -34,11 +34,12 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- 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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.2
|
||||
with:
|
||||
username: ${{ env.GIT_USERNAME }}
|
||||
email: ${{ env.GIT_EMAIL }}
|
||||
@@ -62,11 +63,12 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- 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
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.2
|
||||
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>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
@@ -83,6 +83,24 @@
|
||||
<groupId>com.github.docker-java</groupId>
|
||||
<artifactId>docker-java</artifactId>
|
||||
<version>3.3.2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcpkix-jdk15on</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15to18</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcpkix-jdk15to18</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@@ -28,7 +28,7 @@ package org.alfresco.rest.core;
|
||||
|
||||
import static lombok.AccessLevel.PROTECTED;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
@@ -26,8 +26,8 @@
|
||||
*/
|
||||
package org.alfresco.rest.core.v0;
|
||||
|
||||
import javax.json.Json;
|
||||
import javax.json.JsonReader;
|
||||
import jakarta.json.Json;
|
||||
import jakarta.json.JsonReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
@@ -42,8 +42,8 @@ import static org.testng.Assert.assertNotNull;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
import static org.testng.AssertJUnit.assertFalse;
|
||||
|
||||
import javax.json.Json;
|
||||
import javax.json.JsonObject;
|
||||
import jakarta.json.Json;
|
||||
import jakarta.json.JsonObject;
|
||||
import java.io.File;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil;
|
||||
|
@@ -135,7 +135,7 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
|
||||
* <p>
|
||||
* <p/> TestRail Test C775<p/>
|
||||
**/
|
||||
@Test
|
||||
@Test(enabled = false) // temporary disabled, see ACS-6073
|
||||
@AlfrescoTest(jira = "RM-1622")
|
||||
public void dispositionScheduleLinkedRecords() throws UnsupportedEncodingException {
|
||||
STEP("Create record category");
|
||||
@@ -202,7 +202,7 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
|
||||
* Check the disposition steps for a record can be executed
|
||||
* When the record is linked to a folder with the same disposition schedule
|
||||
* */
|
||||
@Test
|
||||
@Test(enabled = false) // temporary disabled, see ACS-6073
|
||||
@AlfrescoTest (jira = "RM-3060")
|
||||
public void sameDispositionScheduleLinkedRecords() throws UnsupportedEncodingException {
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -1,3 +1,3 @@
|
||||
SOLR6_TAG=2.0.7-A5
|
||||
POSTGRES_TAG=14.4
|
||||
ACTIVEMQ_TAG=5.17.4-jre17-rockylinux8
|
||||
SOLR6_TAG=2.0.8.1
|
||||
POSTGRES_TAG=15.4
|
||||
ACTIVEMQ_TAG=5.18.2-jre17-rockylinux8
|
||||
|
@@ -39,7 +39,7 @@ cache.jsonConversionComponentCache.timeToLiveSeconds=0
|
||||
cache.jsonConversionComponentCache.maxIdleSeconds=0
|
||||
cache.jsonConversionComponentCache.backup-count=1
|
||||
cache.jsonConversionComponentCache.eviction-policy=NONE
|
||||
cache.jsonConversionComponentCache.merge-policy=com.hazelcast.map.merge.PutIfAbsentMapMergePolicy
|
||||
cache.jsonConversionComponentCache.merge-policy=com.hazelcast.spi.merge.PutIfAbsentMergePolicy
|
||||
cache.jsonConversionComponentCache.nearCache.maxSize=50
|
||||
cache.jsonConversionComponentCache.nearCache.maxIdleSeconds=0
|
||||
cache.jsonConversionComponentCache.nearCache.timeToLiveSeconds=0
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
@@ -60,9 +60,12 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.mail</groupId>
|
||||
<artifactId>jakarta.mail-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.alfresco.surf</groupId>
|
||||
@@ -102,9 +105,8 @@
|
||||
<artifactId>swagger-parser</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.github.fge/json-schema-validator -->
|
||||
<dependency>
|
||||
<groupId>com.github.fge</groupId>
|
||||
<groupId>com.networknt</groupId>
|
||||
<artifactId>json-schema-validator</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -414,9 +416,7 @@
|
||||
<configuration>
|
||||
<images>
|
||||
<image>
|
||||
<!-- TODO upgrade this old postgres version -->
|
||||
<name>postgres:9.4.12</name>
|
||||
<!--<name>postgres:13.3</name>-->
|
||||
<name>postgres:15.4</name>
|
||||
<run>
|
||||
<ports>
|
||||
<port>${postgresql.tests.port}:${postgresql.port}</port>
|
||||
|
@@ -39,12 +39,12 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.Multipart;
|
||||
import javax.mail.Part;
|
||||
import javax.mail.internet.ContentType;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import javax.mail.internet.MimeUtility;
|
||||
import jakarta.mail.MessagingException;
|
||||
import jakarta.mail.Multipart;
|
||||
import jakarta.mail.Part;
|
||||
import jakarta.mail.internet.ContentType;
|
||||
import jakarta.mail.internet.MimeMessage;
|
||||
import jakarta.mail.internet.MimeUtility;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
|
@@ -52,7 +52,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.transaction.SystemException;
|
||||
import jakarta.transaction.SystemException;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
|
@@ -61,6 +61,7 @@ public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
super.setNodeService(nodeService);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -29,7 +29,7 @@ package org.alfresco.module.org_alfresco_module_rm.script;
|
||||
|
||||
import static org.alfresco.util.WebScriptUtils.getTemplateVars;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.script;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
@@ -30,7 +30,7 @@ package org.alfresco.module.org_alfresco_module_rm.script;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
|
@@ -34,7 +34,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
|
||||
|
@@ -34,7 +34,7 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
|
@@ -33,7 +33,7 @@ import static org.alfresco.util.WebScriptUtils.getTemplateVars;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.script;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@@ -32,7 +32,7 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
|
@@ -32,7 +32,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
|
||||
|
@@ -25,7 +25,7 @@
|
||||
* #L%
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -44,7 +44,7 @@
|
||||
*/
|
||||
package org.alfresco.repo.web.scripts.roles;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
|
@@ -25,7 +25,7 @@
|
||||
* #L%
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -54,7 +54,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||
|
@@ -45,12 +45,10 @@ import java.util.Set;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
|
||||
import com.github.fge.jackson.JsonLoader;
|
||||
import com.github.fge.jsonschema.core.exceptions.ProcessingException;
|
||||
import com.github.fge.jsonschema.core.report.ProcessingMessage;
|
||||
import com.github.fge.jsonschema.core.report.ProcessingReport;
|
||||
import com.github.fge.jsonschema.main.JsonSchema;
|
||||
import com.github.fge.jsonschema.main.JsonSchemaFactory;
|
||||
import com.networknt.schema.JsonSchema;
|
||||
import com.networknt.schema.JsonSchemaFactory;
|
||||
import com.networknt.schema.SpecVersion.VersionFlag;
|
||||
import com.networknt.schema.ValidationMessage;
|
||||
|
||||
import io.swagger.models.Swagger;
|
||||
import io.swagger.parser.SwaggerParser;
|
||||
@@ -66,8 +64,8 @@ import org.apache.commons.io.filefilter.WildcardFileFilter;
|
||||
*/
|
||||
public class BaseYamlUnitTest
|
||||
{
|
||||
private static String SWAGGER_2_SCHEMA_LOCATION = "/rest/schema.json";
|
||||
private static String OPEN_API_SPECIFICATION = "2.0";
|
||||
private static final String SWAGGER_2_SCHEMA_LOCATION = "/rest/schema.json";
|
||||
private static final String OPEN_API_SPECIFICATION = "2.0";
|
||||
|
||||
/**
|
||||
* Helper method to obtain path names for all yaml files found on the given path
|
||||
@@ -86,11 +84,11 @@ public class BaseYamlUnitTest
|
||||
/**
|
||||
* Helper method to validate that all given yaml files are valid readable Swagger format
|
||||
*/
|
||||
protected void validateYamlFiles(final Set<String> yamlFileNames) throws ProcessingException, IOException
|
||||
protected void validateYamlFiles(final Set<String> yamlFileNames) throws ValidationException, IOException
|
||||
{
|
||||
assertFalse("Expected at least 1 yaml file to validate", yamlFileNames.isEmpty());
|
||||
|
||||
final JsonSchema swaggerSchema = getSwaggerSchema(SWAGGER_2_SCHEMA_LOCATION);
|
||||
final JsonSchema swaggerSchema = getSwaggerSchema();
|
||||
assertNotNull("Failed to obtain the Swagger schema", swaggerSchema);
|
||||
|
||||
for (String yamlFilePath : yamlFileNames)
|
||||
@@ -106,11 +104,11 @@ public class BaseYamlUnitTest
|
||||
assertEquals("Failed to obtain Swagger version from yaml file " + yamlFilePath,
|
||||
swagger.getSwagger(), OPEN_API_SPECIFICATION);
|
||||
}
|
||||
catch (ProcessingException ex)
|
||||
catch (ValidationException ex)
|
||||
{
|
||||
// ensure the yaml filename is included in the message
|
||||
String context = String.format(yamlFilePath + ": %n" + ex.getMessage());
|
||||
throw new ProcessingException(context) ;
|
||||
throw new ValidationException(context) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,16 +116,15 @@ public class BaseYamlUnitTest
|
||||
/**
|
||||
* Helper method to read in the Swagger JSON schema file
|
||||
*/
|
||||
private JsonSchema getSwaggerSchema(final String schemaLocation) throws IOException, ProcessingException
|
||||
private JsonSchema getSwaggerSchema() throws IOException
|
||||
{
|
||||
JsonSchema swaggerSchema = null;
|
||||
final InputStream in = this.getClass().getResourceAsStream(schemaLocation);
|
||||
final InputStream in = this.getClass().getResourceAsStream(SWAGGER_2_SCHEMA_LOCATION);
|
||||
if (in != null)
|
||||
{
|
||||
final String swaggerSchemaAsString = IOUtils.toString(in);
|
||||
final JsonNode schemaNode = JsonLoader.fromString(swaggerSchemaAsString);
|
||||
final JsonSchemaFactory factory = JsonSchemaFactory.byDefault();
|
||||
swaggerSchema = factory.getJsonSchema(schemaNode);
|
||||
final JsonSchemaFactory factory = JsonSchemaFactory.getInstance(VersionFlag.V4);
|
||||
swaggerSchema = factory.getSchema(swaggerSchemaAsString);
|
||||
}
|
||||
return swaggerSchema;
|
||||
}
|
||||
@@ -135,7 +132,7 @@ public class BaseYamlUnitTest
|
||||
/**
|
||||
* Helper method to validate Yaml file against JSON schema
|
||||
*/
|
||||
private boolean validateYamlFile(final String yamlFilePath, final JsonSchema jsonSchema) throws IOException, ProcessingException
|
||||
private boolean validateYamlFile(final String yamlFilePath, final JsonSchema jsonSchema) throws IOException, ValidationException
|
||||
{
|
||||
// Get yaml file as a string
|
||||
final String yaml = new String(Files.readAllBytes(Paths.get(yamlFilePath)));
|
||||
@@ -152,19 +149,22 @@ public class BaseYamlUnitTest
|
||||
/**
|
||||
* Helper method to validate JSON string against JSON schema
|
||||
*/
|
||||
private boolean validateJSON(final String jsonData, final JsonSchema schema) throws IOException, ProcessingException
|
||||
private boolean validateJSON(final String jsonData, final JsonSchema schema) throws IOException, ValidationException
|
||||
{
|
||||
final JsonNode dataNode = JsonLoader.fromString(jsonData);
|
||||
final ProcessingReport report = schema.validate(dataNode);
|
||||
boolean isOk = report.isSuccess();
|
||||
if (!isOk)
|
||||
final JsonNode dataNode = new ObjectMapper().readTree(jsonData);
|
||||
|
||||
final Iterator<ValidationMessage> errors = schema.validate(dataNode).iterator();
|
||||
if (!errors.hasNext()) return true;
|
||||
|
||||
final ValidationMessage errorMessage = errors.next();
|
||||
throw new ValidationException(errorMessage.toString());
|
||||
}
|
||||
|
||||
private static class ValidationException extends Exception
|
||||
{
|
||||
public ValidationException(String message)
|
||||
{
|
||||
Iterator<ProcessingMessage> messages = report.iterator();
|
||||
if (messages.hasNext())
|
||||
{
|
||||
throw new ProcessingException(messages.next().toString());
|
||||
}
|
||||
super(message);
|
||||
}
|
||||
return isOk;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"title": "A JSON Schema for Swagger 2.0 API.",
|
||||
"id": "#",
|
||||
"$schema": "#",
|
||||
"id": "http://swagger.io/v2/schema.json#",
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"swagger",
|
||||
@@ -203,7 +203,7 @@
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/response"
|
||||
},
|
||||
"description": "One or more JSON representations for parameters"
|
||||
"description": "One or more JSON representations for responses"
|
||||
},
|
||||
"externalDocs": {
|
||||
"type": "object",
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
@@ -128,26 +128,8 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- SHA-2432 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.taglibs</groupId>
|
||||
<artifactId>taglibs-standard-spec</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.taglibs</groupId>
|
||||
<artifactId>taglibs-standard-impl</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.taglibs</groupId>
|
||||
<artifactId>taglibs-standard-jstlel</artifactId>
|
||||
<scope>provided</scope>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 - 2020 Alfresco Software Limited.
|
||||
* Copyright 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.
|
||||
@@ -27,7 +27,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.repo.web.scripts.admin.NodeBrowserPost;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 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 the paid license agreement will prevail.
|
||||
@@ -24,7 +24,7 @@ import java.util.Date;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.transaction.UserTransaction;
|
||||
import jakarta.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.node.archive.NodeArchiveService;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005 - 2021 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 the paid license agreement will prevail.
|
||||
@@ -24,7 +24,7 @@ import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.transaction.UserTransaction;
|
||||
import jakarta.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.model.Repository;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@@ -111,9 +111,8 @@
|
||||
|
||||
<!-- provided dependencies -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test only dependencies, as popped up while running mvn test -->
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -26,8 +26,8 @@ import java.net.UnknownHostException;
|
||||
import java.security.AlgorithmParameters;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.encryption.MACUtils.MACInput;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -21,8 +21,8 @@ package org.alfresco.encryption;
|
||||
import java.io.IOException;
|
||||
import java.security.AlgorithmParameters;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.httpclient.HttpMethod;
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -23,13 +23,13 @@ import static java.util.Collections.emptyList;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.transaction.HeuristicMixedException;
|
||||
import javax.transaction.HeuristicRollbackException;
|
||||
import javax.transaction.NotSupportedException;
|
||||
import javax.transaction.RollbackException;
|
||||
import javax.transaction.Status;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.UserTransaction;
|
||||
import jakarta.transaction.HeuristicMixedException;
|
||||
import jakarta.transaction.HeuristicRollbackException;
|
||||
import jakarta.transaction.NotSupportedException;
|
||||
import jakarta.transaction.RollbackException;
|
||||
import jakarta.transaction.Status;
|
||||
import jakarta.transaction.SystemException;
|
||||
import jakarta.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.error.StackTraceUtil;
|
||||
import org.alfresco.util.GUID;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -53,7 +53,7 @@ public interface TransactionListener
|
||||
* on the state of the transaction.
|
||||
* <p>
|
||||
* Although all transaction resources are still available, this method should
|
||||
* be used only for cleaning up resources after a commit has occured.
|
||||
* be used only for cleaning up resources after a commit has occurred.
|
||||
*/
|
||||
void afterCommit();
|
||||
|
||||
@@ -64,7 +64,7 @@ public interface TransactionListener
|
||||
* on the state of the transaction.
|
||||
* <p>
|
||||
* Although all transaction resources are still available, this method should
|
||||
* be used only for cleaning up resources after a rollback has occured.
|
||||
* be used only for cleaning up resources after a rollback has occurred.
|
||||
*/
|
||||
void afterRollback();
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -20,13 +20,13 @@ package org.alfresco.web.scripts.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.Filter;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.FilterConfig;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* Simple servlet filter to add a 'Cache-Control' HTTP header to a response.
|
||||
@@ -48,7 +48,7 @@ public class StaticAssetCacheFilter implements Filter
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
|
||||
* @see jakarta.servlet.Filter#init(jakarta.servlet.FilterConfig)
|
||||
*/
|
||||
public void init(FilterConfig config) throws ServletException
|
||||
{
|
||||
@@ -60,7 +60,7 @@ public class StaticAssetCacheFilter implements Filter
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
|
||||
* @see jakarta.servlet.Filter#doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, jakarta.servlet.FilterChain)
|
||||
*/
|
||||
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException,
|
||||
ServletException
|
||||
@@ -70,7 +70,7 @@ public class StaticAssetCacheFilter implements Filter
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see javax.servlet.Filter#destroy()
|
||||
* @see jakarta.servlet.Filter#destroy()
|
||||
*/
|
||||
public void destroy()
|
||||
{
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -21,9 +21,9 @@ package org.alfresco.web.scripts.servlet;
|
||||
|
||||
import javax.management.*;
|
||||
import javax.security.auth.x500.X500Principal;
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.*;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.Set;
|
||||
@@ -74,8 +74,6 @@ public abstract class X509ServletFilterBase implements Filter
|
||||
logger.debug("Initializing X509ServletFilter");
|
||||
}
|
||||
|
||||
this.handleClientAuth();
|
||||
|
||||
this.enforce = checkEnforce(config.getServletContext());
|
||||
|
||||
if(logger.isDebugEnabled())
|
||||
@@ -85,6 +83,8 @@ public abstract class X509ServletFilterBase implements Filter
|
||||
|
||||
if (this.enforce)
|
||||
{
|
||||
this.handleClientAuth();
|
||||
|
||||
/*
|
||||
* We are enforcing so get the cert-contains string.
|
||||
*/
|
||||
@@ -134,7 +134,7 @@ public abstract class X509ServletFilterBase implements Filter
|
||||
logger.debug("Enforcing X509 request");
|
||||
}
|
||||
|
||||
X509Certificate[] certs = (X509Certificate[])httpRequest.getAttribute("javax.servlet.request.X509Certificate");
|
||||
X509Certificate[] certs = (X509Certificate[])httpRequest.getAttribute("jakarta.servlet.request.X509Certificate");
|
||||
if(validCert(certs))
|
||||
{
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -21,9 +21,9 @@ package org.alfresco.util.transaction;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.transaction.RollbackException;
|
||||
import javax.transaction.Status;
|
||||
import javax.transaction.UserTransaction;
|
||||
import jakarta.transaction.RollbackException;
|
||||
import jakarta.transaction.Status;
|
||||
import jakarta.transaction.UserTransaction;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
@@ -90,9 +90,8 @@
|
||||
| see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Jakarta... -->
|
||||
@@ -100,7 +99,6 @@
|
||||
<groupId>jakarta.activation</groupId>
|
||||
<artifactId>jakarta.activation-api</artifactId>
|
||||
</dependency>
|
||||
<!-- REPO-5047 - Replaces com.sun.activation:javax.activation -->
|
||||
<dependency>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>jakarta.activation</artifactId>
|
||||
@@ -142,53 +140,11 @@
|
||||
<groupId>org.apache.chemistry.opencmis</groupId>
|
||||
<artifactId>chemistry-opencmis-commons-impl</artifactId>
|
||||
<version>${dependency.opencmis.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.sun.xml.messaging.saaj</groupId>
|
||||
<artifactId>saaj-impl</artifactId>
|
||||
</exclusion>
|
||||
<!-- Duplicates classes from com.fasterxml.woodstox:woodstox-core -->
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.woodstox</groupId>
|
||||
<artifactId>woodstox-core-asl</artifactId>
|
||||
</exclusion>
|
||||
<!-- [ACS-544] Excluded as conflicts with JDK9+ as it includes javax.transaction -->
|
||||
<exclusion>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.chemistry.opencmis</groupId>
|
||||
<artifactId>chemistry-opencmis-server-bindings</artifactId>
|
||||
<version>${dependency.opencmis.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</exclusion>
|
||||
<!-- Duplicates classes from jakarta.jws:jakarta.jws-api -->
|
||||
<exclusion>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
|
||||
</exclusion>
|
||||
<!-- Duplicates classes from jakarta.transaction:jakarta.transaction-api -->
|
||||
<exclusion>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
||||
</exclusion>
|
||||
<!-- Duplicates classes from jakarta.annotation:jakarta.annotation-api -->
|
||||
<exclusion>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
</exclusion>
|
||||
<!-- Duplicates classes from com.sun.activation:jakarta.activation -->
|
||||
<exclusion>
|
||||
<groupId>com.sun.activation</groupId>
|
||||
<artifactId>javax.activation</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- This is now deployed at:
|
||||
| http://artifacts.alfresco.com/nexus/content/repositories/thirdparty/org/acegisecurity/acegi-security/0.8.2_patched/
|
||||
@@ -241,6 +197,10 @@
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcmail-jdk15on</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
@@ -264,7 +224,10 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcmail-jdk15to18</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
|
@@ -58,10 +58,9 @@ public class LuceneConjunction<Q, S, E extends Throwable> extends BaseConjunctio
|
||||
public Q addComponent(Set<String> selectors, Map<String, Argument> functionArgs, QueryBuilderContext<Q, S, E> luceneContext, FunctionEvaluationContext functionContext)
|
||||
throws E
|
||||
{
|
||||
|
||||
QueryParserExpressionAdaptor<Q, E> expressionAdaptor = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
boolean must = false;
|
||||
boolean must_not = false;
|
||||
boolean mustNot = false;
|
||||
for (Constraint constraint : getConstraints())
|
||||
{
|
||||
if (constraint instanceof LuceneQueryBuilderComponent)
|
||||
@@ -84,23 +83,20 @@ public class LuceneConjunction<Q, S, E extends Throwable> extends BaseConjunctio
|
||||
break;
|
||||
case EXCLUDE:
|
||||
expressionAdaptor.addExcluded(constraintQuery, constraint.getBoost());
|
||||
must_not = true;
|
||||
mustNot = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
if(!must && must_not)
|
||||
{
|
||||
expressionAdaptor.addRequired(luceneContext.getLuceneQueryParserAdaptor().getMatchAllNodesQuery());
|
||||
}
|
||||
}
|
||||
if(!must && mustNot)
|
||||
{
|
||||
expressionAdaptor.addRequired(luceneContext.getLuceneQueryParserAdaptor().getMatchAllNodesQuery());
|
||||
}
|
||||
return expressionAdaptor.getQuery();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -40,12 +40,10 @@ import org.alfresco.repo.search.impl.querymodel.PropertyArgument;
|
||||
import org.alfresco.repo.search.impl.querymodel.Selector;
|
||||
import org.alfresco.repo.search.impl.querymodel.Source;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.BaseQuery;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.SimpleConstraint;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.PropertyAccessor;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Score;
|
||||
import org.alfresco.service.cmr.search.SearchParameters.SortDefinition;
|
||||
import org.alfresco.service.cmr.search.SearchParameters.SortDefinition.SortType;
|
||||
import org.alfresco.util.Pair;
|
||||
|
||||
/**
|
||||
* @author andyh
|
||||
@@ -72,10 +70,8 @@ public class LuceneQuery<Q, S, E extends Throwable> extends BaseQuery implements
|
||||
QueryParserExpressionAdaptor<Q, E> expressionBuilder = luceneContext.getLuceneQueryParserAdaptor().getExpressionAdaptor();
|
||||
|
||||
boolean must = false;
|
||||
boolean must_not = false;
|
||||
boolean mustNot = false;
|
||||
|
||||
ArrayList<Pair<Constraint, Q>> queriestoConjoin = new ArrayList<>();
|
||||
|
||||
if (selectors != null)
|
||||
{
|
||||
for (String selector : selectors)
|
||||
@@ -86,7 +82,6 @@ public class LuceneQuery<Q, S, E extends Throwable> extends BaseQuery implements
|
||||
@SuppressWarnings("unchecked")
|
||||
LuceneQueryBuilderComponent<Q, S, E> luceneQueryBuilderComponent = (LuceneQueryBuilderComponent<Q, S, E>) current;
|
||||
Q selectorQuery = luceneQueryBuilderComponent.addComponent(selectors, null, luceneContext, functionContext);
|
||||
queriestoConjoin.add(new Pair<Constraint, Q>(new SimpleConstraint(org.alfresco.repo.search.impl.querymodel.Constraint.Occur.MANDATORY), selectorQuery));
|
||||
if (selectorQuery != null)
|
||||
{
|
||||
expressionBuilder.addRequired(selectorQuery);
|
||||
@@ -108,8 +103,7 @@ public class LuceneQuery<Q, S, E extends Throwable> extends BaseQuery implements
|
||||
@SuppressWarnings("unchecked")
|
||||
LuceneQueryBuilderComponent<Q, S, E> luceneQueryBuilderComponent = (LuceneQueryBuilderComponent<Q, S, E>) constraint;
|
||||
Q constraintQuery = luceneQueryBuilderComponent.addComponent(selectors, null, luceneContext, functionContext);
|
||||
queriestoConjoin.add(new Pair<Constraint, Q>(constraint, constraintQuery));
|
||||
|
||||
|
||||
if (constraintQuery != null)
|
||||
{
|
||||
switch (constraint.getOccur())
|
||||
@@ -124,7 +118,7 @@ public class LuceneQuery<Q, S, E extends Throwable> extends BaseQuery implements
|
||||
break;
|
||||
case EXCLUDE:
|
||||
expressionBuilder.addExcluded(constraintQuery, constraint.getBoost());
|
||||
must_not = true;
|
||||
mustNot = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -135,13 +129,12 @@ public class LuceneQuery<Q, S, E extends Throwable> extends BaseQuery implements
|
||||
}
|
||||
}
|
||||
|
||||
if (!must && must_not)
|
||||
if (!must && mustNot)
|
||||
{
|
||||
expressionBuilder.addRequired(luceneContext.getLuceneQueryParserAdaptor().getMatchAllNodesQuery());
|
||||
}
|
||||
|
||||
return expressionBuilder.getQuery();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -165,10 +158,10 @@ public class LuceneQuery<Q, S, E extends Throwable> extends BaseQuery implements
|
||||
{
|
||||
if ((getOrderings() == null) || (getOrderings().size() == 0))
|
||||
{
|
||||
return Collections.<SortDefinition>emptyList();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
ArrayList<SortDefinition> definitions = new ArrayList<SortDefinition>(getOrderings().size());
|
||||
List<SortDefinition> definitions = new ArrayList<>(getOrderings().size());
|
||||
|
||||
for (Ordering ordering : getOrderings())
|
||||
{
|
||||
|
@@ -39,6 +39,7 @@ public class DirectAccessUrl implements Serializable
|
||||
private String contentUrl;
|
||||
private Date expiryTime;
|
||||
private boolean attachment;
|
||||
private String fileName;
|
||||
|
||||
public String getContentUrl()
|
||||
{
|
||||
@@ -70,18 +71,28 @@ public class DirectAccessUrl implements Serializable
|
||||
this.attachment = attachment;
|
||||
}
|
||||
|
||||
public String getFileName()
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName)
|
||||
{
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
@Override public boolean equals(Object obj)
|
||||
{
|
||||
if (this == obj) return true;
|
||||
if (obj == null || getClass() != obj.getClass()) return false;
|
||||
|
||||
DirectAccessUrl that = (DirectAccessUrl) obj;
|
||||
return attachment == that.attachment && Objects.equals(contentUrl,
|
||||
return Objects.equals(fileName, that.fileName) && attachment == that.attachment && Objects.equals(contentUrl,
|
||||
that.contentUrl) && Objects.equals(expiryTime, that.expiryTime);
|
||||
}
|
||||
|
||||
@Override public int hashCode()
|
||||
{
|
||||
return Objects.hash(contentUrl, expiryTime, attachment);
|
||||
return Objects.hash(contentUrl, expiryTime, attachment, fileName);
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
@@ -27,7 +27,7 @@ package org.alfresco.util;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import jakarta.servlet.ServletContext;
|
||||
|
||||
import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
|
||||
import org.apache.chemistry.opencmis.server.impl.CmisRepositoryContextListener;
|
||||
|
17
mmt/pom.xml
17
mmt/pom.xml
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@@ -20,6 +20,16 @@
|
||||
<groupId>de.schlichtherle.truezip</groupId>
|
||||
<artifactId>truezip-driver-zip</artifactId>
|
||||
<version>${dependency.truezip.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15to18</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.schlichtherle.truezip</groupId>
|
||||
@@ -31,6 +41,11 @@
|
||||
<artifactId>maven-artifact</artifactId>
|
||||
<version>${dependency.maven-artifact.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
|
@@ -9,6 +9,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
@@ -208,10 +208,6 @@ Hibernate http://www.hibernate.org/
|
||||
jid3lib http://javamusictag.sourceforge.net/
|
||||
TinyMCE http://www.tinymce.com/
|
||||
|
||||
|
||||
=== LGPL 3.0 ===
|
||||
Gytheio https://github.com/Alfresco/gytheio
|
||||
|
||||
|
||||
=== MIT License ===
|
||||
Bouncy Castle http://www.bouncycastle.org/
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Fetch image based on Tomcat 9.0, Java 17 and Rocky Linux 8
|
||||
# More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat
|
||||
FROM alfresco/alfresco-base-tomcat:tomcat9-jre17-rockylinux8-202303081618
|
||||
FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux8-202306291245
|
||||
|
||||
# Set default docker_context.
|
||||
ARG resource_path=target
|
||||
@@ -98,4 +98,4 @@ EXPOSE 10001
|
||||
# For remote debug
|
||||
EXPOSE 8000
|
||||
|
||||
USER ${IMAGEUSERNAME}
|
||||
USER ${IMAGEUSERNAME}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -1,3 +1,3 @@
|
||||
SOLR6_TAG=2.0.7-A5
|
||||
POSTGRES_TAG=14.4
|
||||
ACTIVEMQ_TAG=5.17.4-jre17-rockylinux8
|
||||
SOLR6_TAG=2.0.8.1
|
||||
POSTGRES_TAG=15.4
|
||||
ACTIVEMQ_TAG=5.18.2-jre17-rockylinux8
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<organization>
|
||||
@@ -18,7 +18,6 @@
|
||||
<properties>
|
||||
<maven.build.sourceVersion>17</maven.build.sourceVersion>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<chemistry-opencmis-commons-api>1.1.0</chemistry-opencmis-commons-api>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<maven-release.version>2.5.3</maven-release.version>
|
||||
<java.version>17</java.version>
|
||||
@@ -69,13 +68,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- open cmis settings -->
|
||||
<dependency>
|
||||
<groupId>org.apache.chemistry.opencmis</groupId>
|
||||
<artifactId>chemistry-opencmis-commons-api</artifactId>
|
||||
<version>${chemistry-opencmis-commons-api}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@@ -280,16 +280,26 @@ public class CmisUtil
|
||||
|
||||
protected boolean isPrivateWorkingCopy()
|
||||
{
|
||||
boolean result;
|
||||
final Document document;
|
||||
try
|
||||
{
|
||||
result = getPWCDocument().isVersionSeriesPrivateWorkingCopy();
|
||||
document = getPWCDocument();
|
||||
}
|
||||
catch (CmisVersioningException cmisVersioningException)
|
||||
{
|
||||
result = false;
|
||||
return false;
|
||||
}
|
||||
return result;
|
||||
|
||||
if (Boolean.FALSE.equals(document.isVersionable())) return false;
|
||||
if (Boolean.FALSE.equals(document.isVersionSeriesCheckedOut())) return false;
|
||||
|
||||
final Boolean isPWC = document.isPrivateWorkingCopy();
|
||||
if (isPWC != null) return isPWC;
|
||||
|
||||
final String vsCoId = document.getVersionSeriesCheckedOutId();
|
||||
if (vsCoId == null) return false;
|
||||
|
||||
return vsCoId.equals(document.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
@@ -31,6 +31,11 @@
|
||||
<artifactId>email</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.mail</groupId>
|
||||
<artifactId>jakarta.mail-api</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@@ -11,8 +11,8 @@ import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import javax.mail.FolderNotFoundException;
|
||||
import javax.mail.MessagingException;
|
||||
import jakarta.mail.FolderNotFoundException;
|
||||
import jakarta.mail.MessagingException;
|
||||
|
||||
public class ImapCheckFolderTests extends EmailTest
|
||||
{
|
||||
|
@@ -10,8 +10,8 @@ import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import javax.mail.FolderNotFoundException;
|
||||
import javax.mail.MessagingException;
|
||||
import jakarta.mail.FolderNotFoundException;
|
||||
import jakarta.mail.MessagingException;
|
||||
|
||||
public class ImapCopyFolderTests extends EmailTest
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package org.alfresco.email.imap;
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
import jakarta.mail.MessagingException;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil;
|
||||
import org.alfresco.email.EmailTest;
|
||||
|
@@ -12,7 +12,7 @@ import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import javax.mail.FolderNotFoundException;
|
||||
import jakarta.mail.FolderNotFoundException;
|
||||
|
||||
/**
|
||||
* Tests for Create Folder action using IMAP client
|
||||
|
@@ -10,7 +10,7 @@ import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import javax.mail.FolderNotFoundException;
|
||||
import jakarta.mail.FolderNotFoundException;
|
||||
|
||||
public class ImapDeleteFolderTests extends EmailTest
|
||||
{
|
||||
|
@@ -9,7 +9,7 @@ import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
import jakarta.mail.MessagingException;
|
||||
|
||||
public class ImapDeleteMessagesTests extends EmailTest
|
||||
{
|
||||
|
@@ -8,7 +8,7 @@ import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import javax.mail.Flags;
|
||||
import jakarta.mail.Flags;
|
||||
|
||||
public class ImapMessageFlagsTests extends EmailTest
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package org.alfresco.email.imap;
|
||||
|
||||
import javax.mail.FolderNotFoundException;
|
||||
import jakarta.mail.FolderNotFoundException;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil;
|
||||
import org.alfresco.email.EmailTest;
|
||||
|
@@ -10,8 +10,8 @@ import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import javax.mail.Flags;
|
||||
import javax.mail.MessagingException;
|
||||
import jakarta.mail.Flags;
|
||||
import jakarta.mail.MessagingException;
|
||||
import java.io.IOException;
|
||||
|
||||
public class ImapReadMessagesTests extends EmailTest
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package org.alfresco.email.imap;
|
||||
|
||||
import javax.mail.FolderNotFoundException;
|
||||
import jakarta.mail.FolderNotFoundException;
|
||||
|
||||
import org.alfresco.email.EmailTest;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
|
@@ -8,8 +8,8 @@ import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import javax.mail.FolderNotFoundException;
|
||||
import javax.mail.MessagingException;
|
||||
import jakarta.mail.FolderNotFoundException;
|
||||
import jakarta.mail.MessagingException;
|
||||
|
||||
public class ImapSitesTests extends EmailTest
|
||||
{
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -2,7 +2,7 @@ package org.alfresco.tas.integration;
|
||||
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
|
||||
import javax.mail.FolderNotFoundException;
|
||||
import jakarta.mail.FolderNotFoundException;
|
||||
|
||||
import org.alfresco.rest.model.RestCommentModel;
|
||||
import org.alfresco.rest.model.RestDeploymentModel;
|
||||
|
@@ -7,9 +7,9 @@ import static org.hamcrest.Matchers.equalTo;
|
||||
import io.restassured.RestAssured;
|
||||
import java.io.File;
|
||||
|
||||
import javax.json.JsonObject;
|
||||
import javax.mail.Flags;
|
||||
import javax.mail.MessagingException;
|
||||
import jakarta.json.JsonObject;
|
||||
import jakarta.mail.Flags;
|
||||
import jakarta.mail.MessagingException;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil;
|
||||
import org.alfresco.dataprep.SiteService.Visibility;
|
||||
|
@@ -5,7 +5,7 @@ import static org.alfresco.utility.report.log.Step.STEP;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
import jakarta.mail.MessagingException;
|
||||
|
||||
import org.alfresco.rest.model.RestCommentModel;
|
||||
import org.alfresco.rest.model.RestErrorModel;
|
||||
|
@@ -7,7 +7,7 @@ import io.restassured.http.ContentType;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.json.JsonObject;
|
||||
import jakarta.json.JsonObject;
|
||||
|
||||
import org.alfresco.rest.core.JsonBodyGenerator;
|
||||
import org.alfresco.rest.core.RestRequest;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.0.185</version>
|
||||
<version>23.1.0.256-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
@@ -17,8 +17,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<rest.api.explorer.branch>master</rest.api.explorer.branch>
|
||||
<httpclient-osgi-version>4.5.6</httpclient-osgi-version>
|
||||
<org.glassfish.version>1.1.4</org.glassfish.version>
|
||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||
<commons-lang3.version>3.13.0</commons-lang3.version>
|
||||
<scribejava-apis.version>8.3.3</scribejava-apis.version>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
@@ -45,13 +44,9 @@
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
<!-- fix the info log messages related to Could not instantiate TestExecutionListener
|
||||
[org.springframework.test.context.web.ServletTestExecutionListener -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<scope>provided</scope>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- alfresco tester settings -->
|
||||
@@ -142,13 +137,6 @@
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.glassfish/javax.json -->
|
||||
<dependency>
|
||||
<groupId>org.glassfish</groupId>
|
||||
<artifactId>javax.json</artifactId>
|
||||
<version>${org.glassfish.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger parser -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
@@ -171,14 +159,14 @@
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy</artifactId>
|
||||
<version>3.0.18</version>
|
||||
<version>3.0.19</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-json</artifactId>
|
||||
<version>3.0.18</version>
|
||||
<version>3.0.19</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -188,9 +176,8 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.glassfish</groupId>
|
||||
<artifactId>jakarta.json</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.eclipse.parsson</groupId>
|
||||
<artifactId>parsson</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@@ -25,11 +25,11 @@
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import javax.json.Json;
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import javax.json.JsonBuilderFactory;
|
||||
import javax.json.JsonObject;
|
||||
import javax.json.JsonObjectBuilder;
|
||||
import jakarta.json.Json;
|
||||
import jakarta.json.JsonArrayBuilder;
|
||||
import jakarta.json.JsonBuilderFactory;
|
||||
import jakarta.json.JsonObject;
|
||||
import jakarta.json.JsonObjectBuilder;
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 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
|
||||
@@ -86,6 +86,7 @@ import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.testng.Assert;
|
||||
@@ -630,36 +631,42 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
|
||||
STEP(restRequest.toString());
|
||||
|
||||
Response returnedResponse;
|
||||
switch (restRequest.getHttpMethod())
|
||||
final Response returnedResponse;
|
||||
HttpMethod httpMethod = restRequest.getHttpMethod();
|
||||
if (HttpMethod.GET.equals(httpMethod))
|
||||
{
|
||||
case GET:
|
||||
returnedResponse = onRequest().get(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
case DELETE:
|
||||
returnedResponse = onRequest().delete(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
case HEAD:
|
||||
returnedResponse = onRequest().head(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
case OPTIONS:
|
||||
returnedResponse = onRequest().options(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
case POST:
|
||||
returnedResponse = onRequest().body(restRequest.getBody())
|
||||
.post(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
case PUT:
|
||||
returnedResponse = onRequest().body(restRequest.getBody())
|
||||
.contentType(ContentType.JSON.withCharset(restRequest.getContentType()))
|
||||
.put(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
case TRACE:
|
||||
returnedResponse = onRequest().get(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
default:
|
||||
returnedResponse = onRequest().get(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
returnedResponse = onRequest().get(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
}
|
||||
else if (HttpMethod.DELETE.equals(httpMethod))
|
||||
{
|
||||
returnedResponse = onRequest().delete(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
}
|
||||
else if (HttpMethod.HEAD.equals(httpMethod))
|
||||
{
|
||||
returnedResponse = onRequest().head(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
}
|
||||
else if (HttpMethod.OPTIONS.equals(httpMethod))
|
||||
{
|
||||
returnedResponse = onRequest().options(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
}
|
||||
else if (HttpMethod.POST.equals(httpMethod))
|
||||
{
|
||||
returnedResponse = onRequest().body(restRequest.getBody())
|
||||
.post(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
}
|
||||
else if (HttpMethod.PUT.equals(httpMethod))
|
||||
{
|
||||
returnedResponse = onRequest().body(restRequest.getBody())
|
||||
.contentType(ContentType.JSON.withCharset(restRequest.getContentType()))
|
||||
.put(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
}
|
||||
else if (HttpMethod.TRACE.equals(httpMethod))
|
||||
{
|
||||
returnedResponse = onRequest().get(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
}
|
||||
else
|
||||
{
|
||||
returnedResponse = onRequest().get(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
}
|
||||
|
||||
logResponseInformation(restRequest, returnedResponse);
|
||||
|
@@ -31,15 +31,10 @@ import org.alfresco.rest.core.RestWrapper;
|
||||
import org.alfresco.rest.model.RestCustomAspectModel;
|
||||
import org.alfresco.rest.model.RestCustomModel;
|
||||
import org.alfresco.rest.model.RestCustomTypeModel;
|
||||
import org.alfresco.rest.model.RestGroupsModelsCollection;
|
||||
import org.alfresco.utility.model.CustomAspectModel;
|
||||
import org.alfresco.utility.model.CustomAspectPropertiesModel;
|
||||
import org.alfresco.utility.model.CustomContentModel;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
||||
import javax.json.Json;
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import javax.json.JsonObject;
|
||||
|
||||
/**
|
||||
* @author Bogdan Bocancea
|
||||
|
@@ -33,8 +33,8 @@ import org.alfresco.utility.model.CustomContentModel;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import javax.json.JsonObjectBuilder;
|
||||
import jakarta.json.JsonArrayBuilder;
|
||||
import jakarta.json.JsonObjectBuilder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@@ -30,11 +30,12 @@ import static org.alfresco.rest.core.JsonBodyGenerator.arrayToJson;
|
||||
import static org.alfresco.rest.requests.RuleSettings.IS_INHERITANCE_ENABLED;
|
||||
import static org.springframework.http.HttpMethod.PUT;
|
||||
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import jakarta.json.JsonArrayBuilder;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import io.restassured.http.ContentType;
|
||||
import org.alfresco.rest.core.JsonBodyGenerator;
|
||||
@@ -51,9 +52,11 @@ import org.alfresco.rest.model.RestCommentModelsCollection;
|
||||
import org.alfresco.rest.model.RestNodeAssocTargetModel;
|
||||
import org.alfresco.rest.model.RestNodeAssociationModel;
|
||||
import org.alfresco.rest.model.RestNodeAssociationModelCollection;
|
||||
import org.alfresco.rest.model.RestNodeAssociationTypeModel;
|
||||
import org.alfresco.rest.model.RestNodeBodyModel;
|
||||
import org.alfresco.rest.model.RestNodeBodyMoveCopyModel;
|
||||
import org.alfresco.rest.model.RestNodeChildAssocModelCollection;
|
||||
import org.alfresco.rest.model.RestNodeChildAssociationModel;
|
||||
import org.alfresco.rest.model.RestNodeModel;
|
||||
import org.alfresco.rest.model.RestNodeModelsCollection;
|
||||
import org.alfresco.rest.model.RestRatingModel;
|
||||
@@ -72,6 +75,7 @@ import org.alfresco.rest.model.body.RestNodeLockBodyModel;
|
||||
import org.alfresco.rest.model.builder.NodesBuilder;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.alfresco.utility.model.RepoTestModel;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.testng.reporters.Files;
|
||||
@@ -824,25 +828,118 @@ public class Node extends ModelRequest<Node>
|
||||
}
|
||||
|
||||
/**
|
||||
* Create secondary children association using POST call 'nodes/{nodeId}/secondary-children
|
||||
* Use a list of secondary children nodes
|
||||
* Creates a secondary child association using POST call to: 'nodes/{nodeId}/secondary-children'.
|
||||
*
|
||||
* @return a collection of nodes
|
||||
* @param secondaryChild - node, which should become a secondary child
|
||||
* @return a node's parent-child association
|
||||
*/
|
||||
public RestNodeChildAssocModelCollection createSecondaryChildren(String secondaryChildren)
|
||||
public RestNodeChildAssociationModel addSecondaryChild(RepoTestModel secondaryChild)
|
||||
{
|
||||
RestRequest request = RestRequest.requestWithBody(HttpMethod.POST, secondaryChildren, "nodes/{nodeId}/secondary-children?{parameters}", repoModel.getNodeRef(), restWrapper.getParameters());
|
||||
return addSecondaryChild("cm:contains", secondaryChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a secondary child association using POST call to: 'nodes/{nodeId}/secondary-children'.
|
||||
*
|
||||
* @param associationType - type of secondary parent-child relationship association
|
||||
* @param secondaryChild - node, which should become a secondary child
|
||||
* @return a node's parent-child association
|
||||
*/
|
||||
public RestNodeChildAssociationModel addSecondaryChild(String associationType, RepoTestModel secondaryChild)
|
||||
{
|
||||
return addSecondaryChild(new RestNodeChildAssociationModel(secondaryChild.getNodeRef(), associationType));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a secondary child association using POST call to: 'nodes/{nodeId}/secondary-children'.
|
||||
*
|
||||
* @param secondaryChildAssociation - node's secondary parent-child association model
|
||||
* @return a node's parent-child association
|
||||
*/
|
||||
public RestNodeChildAssociationModel addSecondaryChild(RestNodeChildAssociationModel secondaryChildAssociation)
|
||||
{
|
||||
RestRequest request = RestRequest.requestWithBody(HttpMethod.POST, secondaryChildAssociation.toJson(), "nodes/{nodeId}/secondary-children?{parameters}", repoModel.getNodeRef(), restWrapper.getParameters());
|
||||
return restWrapper.processModel(RestNodeChildAssociationModel.class, request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a secondary children association using POST call to: 'nodes/{nodeId}/secondary-children'.
|
||||
*
|
||||
* @param secondaryChildren - nodes, which should become secondary children
|
||||
* @return a collection of node's parent-child associations
|
||||
*/
|
||||
public RestNodeChildAssocModelCollection addSecondaryChildren(RepoTestModel... secondaryChildren)
|
||||
{
|
||||
return addSecondaryChildren("cm:contains", secondaryChildren);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a secondary children association using POST call to: 'nodes/{nodeId}/secondary-children'.
|
||||
*
|
||||
* @param associationType - type of secondary parent-child relationship association
|
||||
* @param secondaryChildren - nodes, which should become secondary children
|
||||
* @return a collection of node's parent-child associations
|
||||
*/
|
||||
public RestNodeChildAssocModelCollection addSecondaryChildren(String associationType, RepoTestModel... secondaryChildren)
|
||||
{
|
||||
return addSecondaryChildren(Stream.of(secondaryChildren)
|
||||
.map(child -> new RestNodeChildAssociationModel(child.getNodeRef(), associationType))
|
||||
.toArray(RestNodeChildAssociationModel[]::new));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a secondary children association using POST call to: 'nodes/{nodeId}/secondary-children'.
|
||||
*
|
||||
* @param secondaryChildrenAssociations - node's secondary parent-child association models
|
||||
* @return a collection of node's parent-child associations
|
||||
*/
|
||||
public RestNodeChildAssocModelCollection addSecondaryChildren(RestNodeChildAssociationModel... secondaryChildrenAssociations)
|
||||
{
|
||||
String requestBody = arrayToJson(Stream.of(secondaryChildrenAssociations).toList());
|
||||
RestRequest request = RestRequest.requestWithBody(HttpMethod.POST, requestBody, "nodes/{nodeId}/secondary-children?{parameters}", repoModel.getNodeRef(), restWrapper.getParameters());
|
||||
return restWrapper.processModels(RestNodeChildAssocModelCollection.class, request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete secondary children using DELETE call 'nodes/{nodeId}/secondary-children/{childId}
|
||||
* Removes secondary child association using DELETE call 'nodes/{nodeId}/secondary-children/{childId}'.
|
||||
*
|
||||
* @return a collection of nodes
|
||||
* @param secondaryChild - node, which should NOT be a secondary child anymore
|
||||
*/
|
||||
public void deleteSecondaryChild(RestNodeAssociationModel child)
|
||||
public void removeSecondaryChild(RepoTestModel secondaryChild)
|
||||
{
|
||||
RestRequest request = RestRequest.simpleRequest(HttpMethod.DELETE, "nodes/{nodeId}/secondary-children/{childId}?{parameters}", repoModel.getNodeRef(), child.getId(), restWrapper.getParameters());
|
||||
removeSecondaryChild(null, secondaryChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes secondary child association using DELETE call 'nodes/{nodeId}/secondary-children/{childId}'.
|
||||
*
|
||||
* @param associationType - type of secondary parent-child relationship association
|
||||
* @param secondaryChild - node, which should NOT be a secondary child anymore
|
||||
*/
|
||||
public void removeSecondaryChild(String associationType, RepoTestModel secondaryChild)
|
||||
{
|
||||
RestNodeAssociationModel associationModel = new RestNodeAssociationModel();
|
||||
RestNodeAssociationTypeModel associationTypeModel = new RestNodeAssociationTypeModel();
|
||||
if (associationType != null)
|
||||
{
|
||||
associationTypeModel.setAssocType(associationType);
|
||||
}
|
||||
associationModel.setAssociation(associationTypeModel);
|
||||
associationModel.setId(secondaryChild.getNodeRef());
|
||||
removeSecondaryChild(associationModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes secondary child association using DELETE call 'nodes/{nodeId}/secondary-children/{childId}'.
|
||||
*
|
||||
* @param secondaryChildAssociation - node's secondary parent-child association to remove
|
||||
*/
|
||||
public void removeSecondaryChild(RestNodeAssociationModel secondaryChildAssociation)
|
||||
{
|
||||
String parameters = StringUtils.isNotEmpty(secondaryChildAssociation.getAssociation().getAssocType()) ?
|
||||
"assocType=" + secondaryChildAssociation.getAssociation().getAssocType() + "&" + restWrapper.getParameters() :
|
||||
restWrapper.getParameters();
|
||||
RestRequest request = RestRequest.simpleRequest(HttpMethod.DELETE, "nodes/{nodeId}/secondary-children/{childId}?{parameters}", repoModel.getNodeRef(), secondaryChildAssociation.getId(), parameters);
|
||||
restWrapper.processEmptyModel(request);
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
package org.alfresco.rest.requests;
|
||||
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import jakarta.json.JsonArrayBuilder;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil.Priority;
|
||||
import org.alfresco.rest.core.JsonBodyGenerator;
|
||||
|
@@ -27,7 +27,7 @@ package org.alfresco.rest.requests;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import jakarta.json.JsonArrayBuilder;
|
||||
|
||||
import org.alfresco.rest.core.JsonBodyGenerator;
|
||||
import org.alfresco.rest.core.RestRequest;
|
||||
|
@@ -25,8 +25,8 @@
|
||||
*/
|
||||
package org.alfresco.rest.requests;
|
||||
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import javax.json.JsonObject;
|
||||
import jakarta.json.JsonArrayBuilder;
|
||||
import jakarta.json.JsonObject;
|
||||
|
||||
import org.alfresco.rest.core.JsonBodyGenerator;
|
||||
import org.alfresco.rest.core.RestRequest;
|
||||
|
@@ -39,8 +39,8 @@
|
||||
*/
|
||||
package org.alfresco.rest.requests.search;
|
||||
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import javax.json.JsonObjectBuilder;
|
||||
import jakarta.json.JsonArrayBuilder;
|
||||
import jakarta.json.JsonObjectBuilder;
|
||||
|
||||
import io.restassured.RestAssured;
|
||||
|
||||
|
@@ -27,7 +27,7 @@ package org.alfresco.rest.requests.syncServiceAPI;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import jakarta.json.JsonArrayBuilder;
|
||||
|
||||
import org.alfresco.rest.core.JsonBodyGenerator;
|
||||
import org.alfresco.rest.core.RestRequest;
|
||||
|
@@ -27,7 +27,7 @@ package org.alfresco.rest.requests.syncServiceAPI;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import jakarta.json.JsonArrayBuilder;
|
||||
|
||||
import org.alfresco.rest.core.JsonBodyGenerator;
|
||||
import org.alfresco.rest.core.RestRequest;
|
||||
|
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
package org.alfresco.rest.requests.workflowAPI;
|
||||
|
||||
import javax.json.JsonObject;
|
||||
import jakarta.json.JsonObject;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil.Priority;
|
||||
import org.alfresco.rest.core.RestWrapper;
|
||||
|
@@ -44,6 +44,7 @@
|
||||
package org.alfresco.rest.search;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
@@ -52,11 +53,11 @@ import org.alfresco.utility.model.TestModel;
|
||||
* @author Michael Suzuki
|
||||
*
|
||||
*/
|
||||
public class ResponseHighLightModel extends TestModel implements IRestModel<ResponseHighLightModel>
|
||||
public class ResponseHighlightModel extends TestModel implements IRestModel<ResponseHighlightModel>
|
||||
{
|
||||
private ResponseHighLightModel model;
|
||||
private ResponseHighlightModel model;
|
||||
private String field;
|
||||
private List<Object> snippets;
|
||||
private List<String> snippets;
|
||||
|
||||
public String getField()
|
||||
{
|
||||
@@ -66,19 +67,44 @@ public class ResponseHighLightModel extends TestModel implements IRestModel<Resp
|
||||
{
|
||||
this.field = field;
|
||||
}
|
||||
public List<Object> getSnippets()
|
||||
public List<String> getSnippets()
|
||||
{
|
||||
return snippets;
|
||||
}
|
||||
public void setSnippets(List<Object> snippets)
|
||||
public void setSnippets(List<String> snippets)
|
||||
{
|
||||
this.snippets = snippets;
|
||||
}
|
||||
@Override
|
||||
public ResponseHighLightModel onModel()
|
||||
public ResponseHighlightModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (this == o)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ResponseHighlightModel that = (ResponseHighlightModel) o;
|
||||
return Objects.equals(model, that.model) && Objects.equals(field, that.field) && Objects.equals(snippets, that.snippets);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(model, field, snippets);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "ResponseHighlightModel{model=%s, field=%s, snippets=%s}".formatted(model, field, snippets);
|
||||
}
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 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
|
||||
@@ -23,24 +23,6 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2017 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
package org.alfresco.rest.search;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@@ -55,23 +37,43 @@ import org.alfresco.utility.model.TestModel;
|
||||
*/
|
||||
public class RestRequestFieldsModel extends TestModel implements IRestModel<RestRequestFieldsModel>
|
||||
{
|
||||
public RestRequestFieldsModel(){}
|
||||
|
||||
public RestRequestFieldsModel(String fieldValue)
|
||||
{
|
||||
this.field = fieldValue;
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestRequestFieldsModel model;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private String field;
|
||||
private String prefix;
|
||||
private String postfix;
|
||||
private Integer snippetCount;
|
||||
private Integer fragmentSize;
|
||||
private Boolean mergeContiguous;
|
||||
|
||||
public RestRequestFieldsModel() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static RestRequestFieldsModel of(String field)
|
||||
{
|
||||
RestRequestFieldsModel fieldModel = new RestRequestFieldsModel();
|
||||
fieldModel.setField(field);
|
||||
return fieldModel;
|
||||
}
|
||||
|
||||
public static RestRequestFieldsModel of(String field, String prefix, String postfix)
|
||||
{
|
||||
RestRequestFieldsModel fieldModel = new RestRequestFieldsModel();
|
||||
fieldModel.setField(field);
|
||||
fieldModel.setPrefix(prefix);
|
||||
fieldModel.setPostfix(postfix);
|
||||
return fieldModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestRequestFieldsModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
@JsonProperty(required = true)
|
||||
private String field;
|
||||
|
||||
public String getField()
|
||||
{
|
||||
@@ -82,8 +84,116 @@ public class RestRequestFieldsModel extends TestModel implements IRestModel<Rest
|
||||
{
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getPrefix()
|
||||
{
|
||||
return prefix;
|
||||
}
|
||||
|
||||
public void setPrefix(String prefix)
|
||||
{
|
||||
this.prefix = prefix;
|
||||
}
|
||||
|
||||
public String getPostfix()
|
||||
{
|
||||
return postfix;
|
||||
}
|
||||
|
||||
public void setPostfix(String postfix)
|
||||
{
|
||||
this.postfix = postfix;
|
||||
}
|
||||
|
||||
public Integer getSnippetCount()
|
||||
{
|
||||
return snippetCount;
|
||||
}
|
||||
|
||||
public void setSnippetCount(Integer snippetCount)
|
||||
{
|
||||
this.snippetCount = snippetCount;
|
||||
}
|
||||
|
||||
public Integer getFragmentSize()
|
||||
{
|
||||
return fragmentSize;
|
||||
}
|
||||
|
||||
public void setFragmentSize(Integer fragmentSize)
|
||||
{
|
||||
this.fragmentSize = fragmentSize;
|
||||
}
|
||||
|
||||
public Boolean getMergeContiguous()
|
||||
{
|
||||
return mergeContiguous;
|
||||
}
|
||||
|
||||
public void setMergeContiguous(Boolean mergeContiguous)
|
||||
{
|
||||
this.mergeContiguous = mergeContiguous;
|
||||
}
|
||||
|
||||
public static Builder builder()
|
||||
{
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public static class Builder
|
||||
{
|
||||
private String field;
|
||||
private String prefix;
|
||||
private String postfix;
|
||||
private Integer snippetCount;
|
||||
private Integer fragmentSize;
|
||||
private Boolean mergeContiguous;
|
||||
|
||||
public Builder field(String field)
|
||||
{
|
||||
this.field = field;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder prefix(String prefix)
|
||||
{
|
||||
this.prefix = prefix;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder postfix(String postfix)
|
||||
{
|
||||
this.postfix = postfix;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder snippetCount(Integer snippetCount)
|
||||
{
|
||||
this.snippetCount = snippetCount;
|
||||
return this;
|
||||
}
|
||||
public Builder fragmentSize(Integer fragmentSize)
|
||||
{
|
||||
this.fragmentSize = fragmentSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder mergeContiguous(Boolean mergeContiguous)
|
||||
{
|
||||
this.mergeContiguous = mergeContiguous;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestFieldsModel build()
|
||||
{
|
||||
RestRequestFieldsModel fieldModel = new RestRequestFieldsModel();
|
||||
fieldModel.setField(field);
|
||||
fieldModel.setPrefix(prefix);
|
||||
fieldModel.setPostfix(postfix);
|
||||
fieldModel.setSnippetCount(snippetCount);
|
||||
fieldModel.setFragmentSize(fragmentSize);
|
||||
fieldModel.setMergeContiguous(mergeContiguous);
|
||||
return fieldModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,29 +2,30 @@
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 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
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.search;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@@ -33,62 +34,38 @@ import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated by 'msuzuki' on '2017-02-23 13:41' from 'Alfresco Search REST API' swagger file
|
||||
* Generated by 'msuzuki' on '2017-02-23 13:41' from 'Alfresco Search REST API' swagger file
|
||||
* Generated from 'Alfresco Search REST API' swagger file
|
||||
* Base Path {@linkplain /alfresco/api/-default-/public/search/versions/1}
|
||||
*/
|
||||
public class RestRequestHighlightModel extends TestModel implements IRestModel<RestRequestHighlightModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
@JsonProperty("entry")
|
||||
RestRequestHighlightModel model;
|
||||
|
||||
/** The string used to mark the start of a highlight in a fragment. */
|
||||
private String prefix;
|
||||
/** The string used to mark the end of a highlight in a fragment. */
|
||||
private String postfix;
|
||||
/** The maximum number of distinct highlight snippets to return for each highlight field. */
|
||||
private int snippetCount;
|
||||
/** The character length of each snippet. */
|
||||
private int fragmentSize;
|
||||
/** The number of characters to be considered for highlighting. Matches after this count will not be shown. */
|
||||
private int maxAnalyzedChars;
|
||||
/** If fragments overlap they can be merged into one larger fragment */
|
||||
private boolean mergeContiguous;
|
||||
/** Should phrases be identified. */
|
||||
private boolean usePhraseHighlighter;
|
||||
/** The fields to highlight and field specific configuration properties for each field */
|
||||
private List<RestRequestFieldsModel> fields;
|
||||
|
||||
@Override
|
||||
public RestRequestHighlightModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
The string used to mark the start of a highlight in a fragment.
|
||||
*/
|
||||
|
||||
private String prefix;
|
||||
/**
|
||||
The string used to mark the end of a highlight in a fragment.
|
||||
*/
|
||||
|
||||
private String postfix;
|
||||
/**
|
||||
The maximum number of distinct highlight snippets to return for each highlight field.
|
||||
*/
|
||||
|
||||
private int snippetCount;
|
||||
/**
|
||||
The character length of each snippet.
|
||||
*/
|
||||
|
||||
private int fragmentSize;
|
||||
/**
|
||||
The number of characters to be considered for highlighting. Matches after this count will not be shown.
|
||||
*/
|
||||
|
||||
private int maxAnalyzedChars;
|
||||
/**
|
||||
If fragments over lap they can be merged into one larger fragment
|
||||
*/
|
||||
|
||||
private boolean mergeContiguous;
|
||||
/**
|
||||
Should phrases be identified.
|
||||
*/
|
||||
|
||||
private boolean usePhraseHighlighter;
|
||||
/**
|
||||
The fields to highlight and field specific configuration properties for each field
|
||||
*/
|
||||
|
||||
private List<RestRequestFieldsModel> fields;
|
||||
|
||||
public String getPrefix()
|
||||
{
|
||||
return this.prefix;
|
||||
@@ -97,7 +74,7 @@ public class RestRequestHighlightModel extends TestModel implements IRestModel<R
|
||||
public void setPrefix(String prefix)
|
||||
{
|
||||
this.prefix = prefix;
|
||||
}
|
||||
}
|
||||
|
||||
public String getPostfix()
|
||||
{
|
||||
@@ -107,7 +84,7 @@ public class RestRequestHighlightModel extends TestModel implements IRestModel<R
|
||||
public void setPostfix(String postfix)
|
||||
{
|
||||
this.postfix = postfix;
|
||||
}
|
||||
}
|
||||
|
||||
public int getSnippetCount()
|
||||
{
|
||||
@@ -117,7 +94,7 @@ public class RestRequestHighlightModel extends TestModel implements IRestModel<R
|
||||
public void setSnippetCount(int snippetCount)
|
||||
{
|
||||
this.snippetCount = snippetCount;
|
||||
}
|
||||
}
|
||||
|
||||
public int getFragmentSize()
|
||||
{
|
||||
@@ -127,7 +104,7 @@ public class RestRequestHighlightModel extends TestModel implements IRestModel<R
|
||||
public void setFragmentSize(int fragmentSize)
|
||||
{
|
||||
this.fragmentSize = fragmentSize;
|
||||
}
|
||||
}
|
||||
|
||||
public int getMaxAnalyzedChars()
|
||||
{
|
||||
@@ -137,9 +114,9 @@ public class RestRequestHighlightModel extends TestModel implements IRestModel<R
|
||||
public void setMaxAnalyzedChars(int maxAnalyzedChars)
|
||||
{
|
||||
this.maxAnalyzedChars = maxAnalyzedChars;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getMergeContiguous()
|
||||
public boolean isMergeContiguous()
|
||||
{
|
||||
return this.mergeContiguous;
|
||||
}
|
||||
@@ -147,9 +124,9 @@ public class RestRequestHighlightModel extends TestModel implements IRestModel<R
|
||||
public void setMergeContiguous(boolean mergeContiguous)
|
||||
{
|
||||
this.mergeContiguous = mergeContiguous;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getUsePhraseHighlighter()
|
||||
public boolean isUsePhraseHighlighter()
|
||||
{
|
||||
return this.usePhraseHighlighter;
|
||||
}
|
||||
@@ -157,7 +134,7 @@ public class RestRequestHighlightModel extends TestModel implements IRestModel<R
|
||||
public void setUsePhraseHighlighter(boolean usePhraseHighlighter)
|
||||
{
|
||||
this.usePhraseHighlighter = usePhraseHighlighter;
|
||||
}
|
||||
}
|
||||
|
||||
public List<RestRequestFieldsModel> getFields()
|
||||
{
|
||||
@@ -167,6 +144,91 @@ public class RestRequestHighlightModel extends TestModel implements IRestModel<R
|
||||
public void setFields(List<RestRequestFieldsModel> fields)
|
||||
{
|
||||
this.fields = fields;
|
||||
}
|
||||
}
|
||||
|
||||
public static RestRequestHighlightModelBuilder builder()
|
||||
{
|
||||
return new RestRequestHighlightModelBuilder();
|
||||
}
|
||||
|
||||
public static class RestRequestHighlightModelBuilder
|
||||
{
|
||||
private String prefix;
|
||||
private String postfix;
|
||||
private int snippetCount;
|
||||
private int fragmentSize;
|
||||
private int maxAnalyzedChars;
|
||||
private boolean mergeContiguous;
|
||||
private boolean usePhraseHighlighter;
|
||||
private List<RestRequestFieldsModel> fields;
|
||||
|
||||
public RestRequestHighlightModelBuilder prefix(String prefix)
|
||||
{
|
||||
this.prefix = prefix;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestHighlightModelBuilder postfix(String postfix)
|
||||
{
|
||||
this.postfix = postfix;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestHighlightModelBuilder snippetCount(int snippetCount)
|
||||
{
|
||||
this.snippetCount = snippetCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestHighlightModelBuilder fragmentSize(int fragmentSize)
|
||||
{
|
||||
this.fragmentSize = fragmentSize;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestHighlightModelBuilder maxAnalyzedChars(int maxAnalyzedChars)
|
||||
{
|
||||
this.maxAnalyzedChars = maxAnalyzedChars;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestHighlightModelBuilder mergeContinuous(boolean mergeContiguous)
|
||||
{
|
||||
this.mergeContiguous = mergeContiguous;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestHighlightModelBuilder usePhraseHighlighter(boolean usePhraseHighlighter)
|
||||
{
|
||||
this.usePhraseHighlighter = usePhraseHighlighter;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestHighlightModelBuilder fields(List<String> fields)
|
||||
{
|
||||
this.fields = fields.stream().map(RestRequestFieldsModel::of).toList();
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestHighlightModelBuilder fields(RestRequestFieldsModel... fields)
|
||||
{
|
||||
this.fields = Arrays.stream(fields).toList();
|
||||
return this;
|
||||
}
|
||||
|
||||
public RestRequestHighlightModel build()
|
||||
{
|
||||
RestRequestHighlightModel highlightModel = new RestRequestHighlightModel();
|
||||
highlightModel.setPrefix(prefix);
|
||||
highlightModel.setPostfix(postfix);
|
||||
highlightModel.setSnippetCount(snippetCount);
|
||||
highlightModel.setFragmentSize(fragmentSize);
|
||||
highlightModel.setMaxAnalyzedChars(maxAnalyzedChars);
|
||||
highlightModel.setMergeContiguous(mergeContiguous);
|
||||
highlightModel.setUsePhraseHighlighter(usePhraseHighlighter);
|
||||
highlightModel.setFields(fields);
|
||||
return highlightModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,7 @@ public class SearchScoreModel extends TestModel implements IRestModel<SearchScor
|
||||
@JsonProperty(required = true)
|
||||
private float score;
|
||||
|
||||
private List<ResponseHighLightModel> highlight;
|
||||
private List<ResponseHighlightModel> highlight;
|
||||
|
||||
public float getScore()
|
||||
{
|
||||
@@ -78,12 +78,12 @@ public class SearchScoreModel extends TestModel implements IRestModel<SearchScor
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<ResponseHighLightModel> getHighlight()
|
||||
public List<ResponseHighlightModel> getHighlight()
|
||||
{
|
||||
return highlight;
|
||||
}
|
||||
|
||||
public void setHighlight(List<ResponseHighLightModel> highlight)
|
||||
public void setHighlight(List<ResponseHighlightModel> highlight)
|
||||
{
|
||||
this.highlight = highlight;
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.json.JsonObject;
|
||||
import jakarta.json.JsonObject;
|
||||
|
||||
import org.alfresco.rest.RestTest;
|
||||
import org.alfresco.rest.core.JsonBodyGenerator;
|
||||
|
@@ -35,7 +35,7 @@ import static org.springframework.http.HttpStatus.NOT_FOUND;
|
||||
import static org.springframework.http.HttpStatus.NO_CONTENT;
|
||||
import static org.springframework.http.HttpStatus.UNPROCESSABLE_ENTITY;
|
||||
|
||||
import javax.json.Json;
|
||||
import jakarta.json.Json;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@@ -32,7 +32,7 @@ import static org.springframework.http.HttpStatus.NOT_FOUND;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
import static org.springframework.http.HttpStatus.UNPROCESSABLE_ENTITY;
|
||||
|
||||
import javax.json.Json;
|
||||
import jakarta.json.Json;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package org.alfresco.rest.downloads;
|
||||
|
||||
import javax.json.JsonObject;
|
||||
import jakarta.json.JsonObject;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil.DocumentType;
|
||||
import org.alfresco.rest.RestTest;
|
||||
|
@@ -2,8 +2,8 @@ package org.alfresco.rest.groups;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.json.Json;
|
||||
import javax.json.JsonObject;
|
||||
import jakarta.json.Json;
|
||||
import jakarta.json.JsonObject;
|
||||
|
||||
import org.alfresco.rest.RestTest;
|
||||
import org.alfresco.utility.RetryOperation;
|
||||
|
@@ -10,8 +10,8 @@ import static org.testng.Assert.assertNull;
|
||||
import static org.testng.Assert.assertSame;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
import javax.json.Json;
|
||||
import javax.json.JsonObject;
|
||||
import jakarta.json.Json;
|
||||
import jakarta.json.JsonObject;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
|
@@ -125,11 +125,10 @@ public class NodesParentChildrenTests extends RestTest
|
||||
RestNodeChildAssociationModel childAssoc1 = new RestNodeChildAssociationModel(nodesBuilder.getNode("f1").getId(), "cm:contains");
|
||||
RestNodeChildAssociationModel childAssoc2 = new RestNodeChildAssociationModel(nodesBuilder.getNode("f2").getId(), "cm:contains");
|
||||
RestNodeChildAssociationModel childAssoc3 = new RestNodeChildAssociationModel(nodesBuilder.getNode("f3").getId(), "cm:preferenceImage");
|
||||
String secondaryChildrenBody = "[" + childAssoc1.toJson() + "," + childAssoc2.toJson() + "," + childAssoc3.toJson() + "]";
|
||||
|
||||
STEP("3. Create secondary child associations using POST /nodes/{nodeId}/secondary-children");
|
||||
RestNodeChildAssocModelCollection secondaryChildAssoc = restClient.withCoreAPI().usingNode(nodesBuilder.getNode("F1").toContentModel())
|
||||
.createSecondaryChildren(secondaryChildrenBody);
|
||||
.addSecondaryChildren(childAssoc1, childAssoc2, childAssoc3);
|
||||
restClient.assertStatusCodeIs(HttpStatus.CREATED);
|
||||
secondaryChildAssoc.getEntryByIndex(0).assertThat().field("childId").is(childAssoc1.getChildId());
|
||||
secondaryChildAssoc.getEntryByIndex(1).assertThat().field("childId").is(childAssoc2.getChildId());
|
||||
@@ -142,7 +141,7 @@ public class NodesParentChildrenTests extends RestTest
|
||||
secondaryChildren.assertThat().entriesListCountIs(2);
|
||||
|
||||
STEP("5. Check using DELETE /nodes/{nodeId}/secondary-children/{childId} that a secondary child can be deleted");
|
||||
restClient.withCoreAPI().usingNode(nodesBuilder.getNode("F1").toContentModel()).deleteSecondaryChild(secondaryChildren.getEntryByIndex(0));
|
||||
restClient.withCoreAPI().usingNode(nodesBuilder.getNode("F1").toContentModel()).removeSecondaryChild(secondaryChildren.getEntryByIndex(0));
|
||||
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
|
||||
|
||||
STEP("6. Check using GET /nodes/{nodeId}/secondary-children that a secondary child association was deleted");
|
||||
@@ -182,7 +181,7 @@ public class NodesParentChildrenTests extends RestTest
|
||||
|
||||
STEP("2. Create secondary child associations using POST /nodes/{nodeId}/secondary-children");
|
||||
RestNodeChildAssociationModel childAssoc = new RestNodeChildAssociationModel(nodesBuilder.getNode("f1").getId(), "cm:contains");
|
||||
restClient.withCoreAPI().usingNode(nodesBuilder.getNode("F1").toContentModel()).createSecondaryChildren(childAssoc.toJson());
|
||||
restClient.withCoreAPI().usingNode(nodesBuilder.getNode("F1").toContentModel()).addSecondaryChild(childAssoc);
|
||||
restClient.assertStatusCodeIs(HttpStatus.CREATED);
|
||||
|
||||
STEP("3. Get all parents for file 'f1' - both primary and secondary");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user