mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
Compare commits
228 Commits
feature/Pr
...
23.3.0.13
Author | SHA1 | Date | |
---|---|---|---|
|
d978b1cd68 | ||
|
dce356fe74 | ||
|
f965165894 | ||
|
2ac44c24a8 | ||
|
a0dc5a0d70 | ||
|
af94063bbb | ||
|
87b91b6cae | ||
|
6bdcaa9b10 | ||
|
86070d881c | ||
|
a82199967c | ||
|
f09266c081 | ||
|
563f65825f | ||
|
8bedeedfd5 | ||
|
a73cf6a71d | ||
|
1bdd6c022c | ||
|
1b553dbcaf | ||
|
5a3b4e1a0d | ||
|
1a0156b1e5 | ||
|
6ac9248262 | ||
|
70290c8f23 | ||
|
7d135b9356 | ||
|
df4629b801 | ||
|
df6f656b95 | ||
|
f27718c43b | ||
|
cbf0aaaaa4 | ||
|
2da78a94ad | ||
|
3325e08d57 | ||
|
985205e78e | ||
|
5fd5e75bd2 | ||
|
279bc15aac | ||
|
a3283b4521 | ||
|
e09c9118b2 | ||
|
330256438b | ||
|
2214f16e6e | ||
|
2237a45e76 | ||
|
f71a003904 | ||
|
10d55824f8 | ||
|
69f8bda762 | ||
|
d8de1ba353 | ||
|
d4d8718f16 | ||
|
859492ae1e | ||
|
6c08a60ce5 | ||
|
9cdc916189 | ||
|
8272347b71 | ||
|
cde7f0bba1 | ||
|
959678eb70 | ||
|
cf7bb499dc | ||
|
a915a4246c | ||
|
89b5fa9e90 | ||
|
03744ff5d5 | ||
|
965add646c | ||
|
1c93cc7ca4 | ||
|
0564b27ece | ||
|
b98fdf4ca9 | ||
|
1aff1eab1e | ||
|
c3b82354c1 | ||
|
04215f84a6 | ||
|
e6e05c8890 | ||
|
af69c12be3 | ||
|
eaf07ef88e | ||
|
c4714b19eb | ||
|
e3407e5a53 | ||
|
8d978d6527 | ||
|
de6b062f3e | ||
|
98231782f6 | ||
|
b4146744d2 | ||
|
f9f3248229 | ||
|
9297fa5cf4 | ||
|
3d1cc0924d | ||
|
3b574c56dc | ||
|
f737c3ef3c | ||
|
5e85b8149b | ||
|
11030f52fa | ||
|
c537166f68 | ||
|
448d2c9c2f | ||
|
dd5703a51a | ||
|
cfc0916c84 | ||
|
71b69529c6 | ||
|
9ffe27f028 | ||
|
47a636997c | ||
|
c97df2dbaa | ||
|
2734dcb107 | ||
|
197acb3a7b | ||
|
91019185d8 | ||
|
fb0c64b664 | ||
|
5f568179bd | ||
|
0396bbebbc | ||
|
12d1ecdefa | ||
|
ebdc62a421 | ||
|
aea34e8149 | ||
|
6a5f378ce1 | ||
|
e1de1c627d | ||
|
0209c8fc84 | ||
|
bb0c3ea207 | ||
|
605c3a6ccd | ||
|
d3c7342f05 | ||
|
0eb7abb95b | ||
|
a7925d54a6 | ||
|
dbd7ce1f48 | ||
|
ecfeb77fb0 | ||
|
1f72faa90c | ||
|
925a4f4a6a | ||
|
4f4f7cc02f | ||
|
ef9d724ee9 | ||
|
71cbb9e1ef | ||
|
effb697261 | ||
|
0b753c23c2 | ||
|
05f0df1b2f | ||
|
7a8cf67c2e | ||
|
da7f1877fd | ||
|
9a11075f41 | ||
|
4d22931dfe | ||
|
d9fe82a2d2 | ||
|
60e42b4090 | ||
|
824886ecdd | ||
|
e2f0ebb015 | ||
|
6872c3d683 | ||
|
4d8a9e35b7 | ||
|
0cea265153 | ||
|
1ef7b5bea9 | ||
|
0a9aac7332 | ||
|
12e1506d01 | ||
|
2c5a745b50 | ||
|
dd5f2a76ab | ||
|
e7bd28180c | ||
|
5bb8a621bf | ||
|
28ed202c78 | ||
|
d62423f378 | ||
|
fc7b2f9fbf | ||
|
df93094d67 | ||
|
e1db33ac7a | ||
|
c319370d4e | ||
|
5bfff49d5e | ||
|
74d017c371 | ||
|
c35de7aed3 | ||
|
29d7f8d298 | ||
|
20b0e3cf18 | ||
|
fb6dcac85e | ||
|
98b9bf34ff | ||
|
57da5fbdcd | ||
|
687b44b98a | ||
|
c83434a3f2 | ||
|
6b030b489b | ||
|
835aba686b | ||
|
58f7699c05 | ||
|
de7ef52037 | ||
|
eb5fd63839 | ||
|
62399e7017 | ||
|
383c6f0a1d | ||
|
af1df82dd9 | ||
|
028ff60748 | ||
|
2b2fdba3b7 | ||
|
f16a193b61 | ||
|
873119f56e | ||
|
2c41c0ead1 | ||
|
c957f40a78 | ||
|
f8a8b5c8f3 | ||
|
773d9ca9d9 | ||
|
1af0b72257 | ||
|
158fb067d0 | ||
|
016c212c65 | ||
|
c1bd8e71c4 | ||
|
f68446b3e5 | ||
|
9b26c66dec | ||
|
06c35ea379 | ||
|
5580609010 | ||
|
e16a3759ad | ||
|
9cce8d54d8 | ||
|
856bf011c5 | ||
|
d46fc62cdb | ||
|
eff41eef12 | ||
|
3d0185574d | ||
|
5664b5de78 | ||
|
82f44122bc | ||
|
6c3740c2a6 | ||
|
ecdbf41291 | ||
|
6abf01e083 | ||
|
7671d3b7bc | ||
|
a8a6b565a7 | ||
|
a660109b73 | ||
|
11cc7fd2cb | ||
|
fe356c6135 | ||
|
8b75f4f961 | ||
|
db9d6cc08c | ||
|
975503bf88 | ||
|
9f4ec29f9c | ||
|
5490228d71 | ||
|
408800ba89 | ||
|
773dd1d3e5 | ||
|
0d8b6ef853 | ||
|
63ef313ad5 | ||
|
a63cfecbcc | ||
|
d8e71ad38a | ||
|
d6bf9a5748 | ||
|
75a3e03dfa | ||
|
e0239cd48f | ||
|
a490b8d437 | ||
|
1c1a2183a3 | ||
|
0f0c143c6f | ||
|
9d41373752 | ||
|
5d4471bbb3 | ||
|
8451df09a8 | ||
|
935fcf1c16 | ||
|
f4a1cb5726 | ||
|
7d8cc58063 | ||
|
2005aa0754 | ||
|
c4b5da9452 | ||
|
c2bba964cb | ||
|
4b42ecf000 | ||
|
b042fbb3ca | ||
|
617eb7bb93 | ||
|
a3ccafb035 | ||
|
6065c6feec | ||
|
4cacbf3829 | ||
|
19840563e4 | ||
|
a386dacce1 | ||
|
4f9ee4e522 | ||
|
3bd3689d80 | ||
|
7bf3611e9a | ||
|
506a2b8e61 | ||
|
964b09251b | ||
|
78a996a663 | ||
|
0fa5d00c8b | ||
|
79c316a05f | ||
|
d7e0402733 | ||
|
40bd7b6ad3 | ||
|
93bee49246 | ||
|
8d51e9885a |
259
.github/workflows/ci.yml
vendored
259
.github/workflows/ci.yml
vendored
@@ -26,6 +26,9 @@ env:
|
||||
CI_WORKSPACE: ${{ github.workspace }}
|
||||
TAS_ENVIRONMENT: ./packaging/tests/environment
|
||||
TAS_SCRIPTS: ../alfresco-community-repo/packaging/tests/scripts
|
||||
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_OIDC_ADMIN_CLIENT_ID }}
|
||||
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_OIDC_CLIENT_SECRET }}
|
||||
AUTH0_ADMIN_PASSWORD: ${{ secrets.AUTH0_OIDC_ADMIN_PASSWORD }}
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
@@ -35,18 +38,10 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- id: changed-files
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v6.1.0
|
||||
with:
|
||||
write-list-to-env: true
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v6.1.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Prepare maven cache and check compilation"
|
||||
@@ -54,28 +49,81 @@ jobs:
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
veracode:
|
||||
veracode_sca:
|
||||
name: "Source Clear Scan (SCA)"
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request') &&
|
||||
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.35.2
|
||||
continue-on-error: true
|
||||
with:
|
||||
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
# SEE: ACS-6931 Currently times out after an hour. TO BE RESTORED after resolving the issue with Veracode Support.
|
||||
#
|
||||
# veracode_sast:
|
||||
# name: "Pipeline SAST Scan"
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: [prepare]
|
||||
# if: >
|
||||
# (github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
|
||||
# github.actor != 'dependabot[bot]' &&
|
||||
# !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@v1.35.2
|
||||
# - uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v5.6.0
|
||||
# with:
|
||||
# token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
# repository: "Alfresco/veracode-baseline-archive"
|
||||
# file-path: "alfresco-community-repo/alfresco-community-repo-baseline.json"
|
||||
# target: "baseline.json"
|
||||
# - name: "Build"
|
||||
# timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
# run: |
|
||||
# bash ./scripts/ci/init.sh
|
||||
# bash ./scripts/ci/build.sh
|
||||
# - name: "Run SAST Scan"
|
||||
# uses: veracode/Veracode-pipeline-scan-action@v1.0.10
|
||||
# with:
|
||||
# vid: ${{ secrets.VERACODE_API_ID }}
|
||||
# vkey: ${{ secrets.VERACODE_API_KEY }}
|
||||
# file: "packaging/war/target/alfresco.war"
|
||||
# fail_build: true
|
||||
# project_name: alfresco-community-repo
|
||||
# issue_details: true
|
||||
# veracode_policy_name: Alfresco Default
|
||||
# summary_output: true
|
||||
# summary_output_file: results.json
|
||||
# summary_display: true
|
||||
# baseline_file: baseline.json
|
||||
# - name: Upload scan result
|
||||
# if: success() || failure()
|
||||
# run: zip readable_output.zip results.json
|
||||
# - name: Upload Artifact
|
||||
# if: success() || failure()
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: Veracode Pipeline-Scan Results (Human Readable)
|
||||
# path: readable_output.zip
|
||||
# - name: "Clean Maven cache"
|
||||
# run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
pmd_scan:
|
||||
name: "PMD Scan"
|
||||
runs-on: ubuntu-latest
|
||||
@@ -86,10 +134,10 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- uses: Alfresco/ya-pmd-scan@v4.0.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
|
||||
- uses: Alfresco/ya-pmd-scan@v3.0.0
|
||||
with:
|
||||
classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\""
|
||||
|
||||
@@ -102,10 +150,10 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run tests"
|
||||
@@ -140,10 +188,10 @@ jobs:
|
||||
env:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -152,7 +200,7 @@ jobs:
|
||||
- name: "Set transformers tag"
|
||||
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||
- name: "Set up the environment"
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl remote-api -Dtest=${{ matrix.testSuite }} -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"
|
||||
@@ -174,14 +222,14 @@ jobs:
|
||||
matrix:
|
||||
version: ['10.2.18', '10.4', '10.5']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: Run MariaDB ${{ matrix.version }} database
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||
env:
|
||||
MARIADB_VERSION: ${{ matrix.version }}
|
||||
- name: "Run tests"
|
||||
@@ -201,14 +249,14 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run MariaDB 10.6 database"
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||
env:
|
||||
MARIADB_VERSION: 10.6
|
||||
- name: "Run tests"
|
||||
@@ -228,14 +276,14 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run MySQL 8 database"
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
|
||||
env:
|
||||
MYSQL_VERSION: 8
|
||||
- name: "Run tests"
|
||||
@@ -254,14 +302,14 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 13.12 database"
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||
env:
|
||||
POSTGRES_VERSION: 13.12
|
||||
- name: "Run tests"
|
||||
@@ -280,14 +328,14 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- 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
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||
env:
|
||||
POSTGRES_VERSION: 14.9
|
||||
- name: "Run tests"
|
||||
@@ -306,14 +354,14 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 15.4 database"
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||
env:
|
||||
POSTGRES_VERSION: 15.4
|
||||
- name: "Run tests"
|
||||
@@ -330,21 +378,21 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run ActiveMQ"
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl repository -am -Dtest=CamelRoutesTest,CamelComponentsTest -DfailIfNoTests=false
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
repository_app_context_test_suites:
|
||||
name: Repository - ${{ matrix.testSuite }}
|
||||
name: Repository - ${{ matrix.testSuite }} ${{ matrix.idp }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare]
|
||||
if: >
|
||||
@@ -363,9 +411,14 @@ jobs:
|
||||
compose-profile: with-transform-core-aio
|
||||
- testSuite: AppContext04TestSuite
|
||||
compose-profile: with-transform-core-aio
|
||||
- testSuite: AppContext05TestSuite
|
||||
compose-profile: with-sso
|
||||
mvn-options: '-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth -Dauthentication.chain=identity-service1:identity-service,alfrescoNtlm1:alfrescoNtlm'
|
||||
idp: Keycloak
|
||||
- testSuite: AppContext05TestSuite
|
||||
compose-profile: default
|
||||
mvn-options: '"-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth"'
|
||||
mvn-options: '-Didentity-service.auth-server-url=https://dev-ps-alfresco.auth0.com/ -Dauthentication.chain=identity-service1:identity-service,alfrescoNtlm1:alfrescoNtlm -Didentity-service.audience=http://localhost:3000 -Didentity-service.resource=${AUTH0_CLIENT_ID} -Didentity-service.credentials.secret=${AUTH0_CLIENT_SECRET} -Didentity-service.public-client=false -Didentity-service.realm= -Didentity-service.client-id.validation.disabled=false -Dadmin.user=admin@alfresco.com -Dadmin.password=${AUTH0_ADMIN_PASSWORD} -Dauth0.enabled=true -Dauth0.admin.password=${AUTH0_ADMIN_PASSWORD} -Didentity-service.principal-attribute=nickname'
|
||||
idp: Auth0
|
||||
- testSuite: AppContext06TestSuite
|
||||
compose-profile: with-transform-core-aio
|
||||
- testSuite: AppContextExtraTestSuite
|
||||
@@ -381,14 +434,16 @@ jobs:
|
||||
disabledHostnameVerification: false
|
||||
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@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Set transformers tag"
|
||||
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||
- name: "Set the host IP"
|
||||
run: echo "HOST_IP=$(hostname -I | cut -f1 -d' ')" >> $GITHUB_ENV
|
||||
- name: "Generate Keystores and Truststores for Mutual TLS configuration"
|
||||
if: ${{ matrix.mtls }}
|
||||
run: |
|
||||
@@ -401,11 +456,7 @@ jobs:
|
||||
echo "HOSTNAME_VERIFICATION_DISABLED=false" >> "$GITHUB_ENV"
|
||||
fi
|
||||
- name: "Set up the environment"
|
||||
run: |
|
||||
if [ -e ./scripts/ci/tests/${{ matrix.testSuite }}-setup.sh ]; then
|
||||
bash ./scripts/ci/tests/${{ matrix.testSuite }}-setup.sh
|
||||
fi
|
||||
docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||
- name: "Run tests"
|
||||
run: mvn -B test -pl repository -am -Dtest=${{ matrix.testSuite }} -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco ${{ matrix.mvn-options }}
|
||||
- name: "Clean Maven cache"
|
||||
@@ -452,10 +503,10 @@ jobs:
|
||||
env:
|
||||
REQUIRES_LOCAL_IMAGES: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -490,14 +541,14 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run Postgres 15.4 database"
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
|
||||
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
|
||||
- name: "Clean Maven cache"
|
||||
@@ -520,10 +571,10 @@ jobs:
|
||||
env:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -552,10 +603,10 @@ jobs:
|
||||
env:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -580,10 +631,10 @@ jobs:
|
||||
env:
|
||||
REQUIRES_LOCAL_IMAGES: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -600,7 +651,7 @@ jobs:
|
||||
run: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags -Pall-tas-tests
|
||||
- name: "Configure AWS credentials"
|
||||
if: ${{ always() }}
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AGS_AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AGS_AWS_SECRET_ACCESS_KEY }}
|
||||
@@ -626,10 +677,10 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
|
||||
- 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@v1.35.2
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
|
20
.github/workflows/master_release.yml
vendored
20
.github/workflows/master_release.yml
vendored
@@ -31,15 +31,15 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[no release]') &&
|
||||
github.event_name != 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.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@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.2
|
||||
with:
|
||||
username: ${{ env.GIT_USERNAME }}
|
||||
email: ${{ env.GIT_EMAIL }}
|
||||
@@ -60,15 +60,15 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[no downstream]') &&
|
||||
github.event_name != 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.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@v7.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.2
|
||||
with:
|
||||
username: ${{ env.GIT_USERNAME }}
|
||||
email: ${{ env.GIT_EMAIL }}
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -39,6 +39,9 @@ dependency-reduced-pom.xml
|
||||
|
||||
hs_err_pid*
|
||||
|
||||
# Development
|
||||
repository/scripts/hazelcast-init/alfresco-hazelcast-config.xml
|
||||
|
||||
# Alfresco runtime
|
||||
alf_data
|
||||
|
||||
|
@@ -1,14 +0,0 @@
|
||||
repos:
|
||||
- repo: https://github.com/Yelp/detect-secrets
|
||||
rev: v1.5.0
|
||||
hooks:
|
||||
- id: detect-secrets
|
||||
args: ["--baseline", ".secrets.baseline"]
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: check-format-and-headers
|
||||
name: Check format and headers and fix if necessary
|
||||
entry: ./scripts/hooks/check-format-and-headers.sh
|
||||
language: script
|
||||
files: ".*.java"
|
||||
pass_filenames: false
|
1864
.secrets.baseline
1864
.secrets.baseline
File diff suppressed because it is too large
Load Diff
@@ -3,52 +3,6 @@ Thanks for your interest in contributing to this project!
|
||||
|
||||
The following is a set of guidelines for contributing to this library. Most of them will make the life of the reviewer easier and therefore decrease the time required for the patch be included in the next version.
|
||||
|
||||
The project uses [pre-commit](https://pre-commit.com/) to format code (with [Spotless](https://github.com/diffplug/spotless)), validate license headers and check for secrets (with [detect-secrets](https://github.com/Yelp/detect-secrets)). To install the pre-commit hooks then first install pre-commit and then run:
|
||||
```shell
|
||||
pre-commit install
|
||||
```
|
||||
When you make a commit then these hooks will run and check the modified files. If it makes changes then you can review them and then `git commit` again to accept the changes.
|
||||
|
||||
#### Code Quality
|
||||
This project uses `spotless` that enforces `alfresco-formatter.xml` to ensure code quality.
|
||||
|
||||
To check code-style violations you can use:
|
||||
```bash
|
||||
mvn spotless:check
|
||||
```
|
||||
To reformat files you can use:
|
||||
```bash
|
||||
mvn spotless:apply
|
||||
```
|
||||
|
||||
#### Secret Detection
|
||||
|
||||
We are using [detect-secrets](https://github.com/Yelp/detect-secrets) to try to avoid accidentally publishing secret keys.
|
||||
If you have pre-commit installed then this should run automatically when making a commit. Usually there should be no issues,
|
||||
but if it finds a potential issue (e.g. a high entropy string) then you will see the following:
|
||||
|
||||
```shell
|
||||
Detect secrets...........................................................Failed
|
||||
- hook id: detect-secrets
|
||||
- exit code: 1
|
||||
|
||||
ERROR: Potential secrets about to be committed to git repo!
|
||||
|
||||
Secret Type: Secret Keyword
|
||||
Location: test.txt:1
|
||||
```
|
||||
|
||||
If this is a false positive and you actually want to commit the string then run these two commands:
|
||||
|
||||
```shell
|
||||
detect-secrets scan --baseline .secrets.baseline
|
||||
detect-secrets audit .secrets.baseline
|
||||
```
|
||||
|
||||
This will update the baseline file to include your new code and then allow you to review the detected secret and mark it as a false positive.
|
||||
Once you are finished then you can add `.secrets.baseline` to the staged changes and you should be able to create a commit.
|
||||
|
||||
|
||||
Because this project forms a part of Alfresco Content Services, the guidelines are hosted in the [Alfresco Social Community](https://hub.alfresco.com/t5/alfresco-content-services-ecm/ct-p/ECM-software) where they can be referenced from multiple projects.
|
||||
|
||||
You can report an issue in the ALF project of the [Alfresco issue tracker](http://issues.alfresco.com).
|
||||
|
@@ -1,401 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="23">
|
||||
<profile kind="CodeFormatterProfile" name="Spotless" version="23">
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_record_components" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_annotations" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="999"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_if_empty"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="999"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||
</profile>
|
||||
</profiles>
|
@@ -71,7 +71,7 @@ the _alfresco-internal_ repository:
|
||||
</snapshots>
|
||||
</repository>
|
||||
```
|
||||
|
||||
|
||||
|
||||
For additional instructions you can check the official Maven documentation:
|
||||
* [setting up repositories](https://maven.apache.org/guides/mini/guide-multiple-repositories.html)
|
||||
@@ -227,7 +227,7 @@ If only the Community or Enterprise images need to be built than the same comman
|
||||
|
||||
The Docker images of the Repo can be started independently from Share running the following command in the rm-repo-enterprise or rm-repo-community folder which contains the Docker-compose.yml file:
|
||||
```
|
||||
docker compose up
|
||||
docker-compose up
|
||||
```
|
||||
> Be aware of the fact that the Share images can not be started independently from Repo
|
||||
|
||||
@@ -237,5 +237,5 @@ e.g. In order to start an instance of rm-enterprise-repo and rm-enterprise-share
|
||||
|
||||
If you have a license for jRebel then this can be used from the rm-community-share or rm-enterprise-share directories with:
|
||||
```
|
||||
docker compose -f docker-compose.yml -f jrebel-docker-compose.yml --project-name agsdev up --build --force-recreate
|
||||
docker-compose -f docker-compose.yml -f jrebel-docker-compose.yml --project-name agsdev up --build --force-recreate
|
||||
```
|
||||
|
@@ -4,9 +4,9 @@ set -x
|
||||
# Display running containers
|
||||
docker ps
|
||||
|
||||
alfrescoContainerId=$(docker ps -a | grep '\-alfresco\-' | awk '{print $1}')
|
||||
shareContainerId=$(docker ps -a | grep '\-share\-' | awk '{print $1}')
|
||||
solrContainerId=$(docker ps -a | grep '\-search\-' | awk '{print $1}')
|
||||
alfrescoContainerId=$(docker ps -a | grep '_alfresco_' | awk '{print $1}')
|
||||
shareContainerId=$(docker ps -a | grep '_share_' | awk '{print $1}')
|
||||
solrContainerId=$(docker ps -a | grep '_search_' | awk '{print $1}')
|
||||
|
||||
docker logs $alfrescoContainerId > alfresco.log
|
||||
if [ -n "$shareContainerId" ]; then
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
@@ -96,11 +96,11 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15to18</artifactId>
|
||||
<artifactId>bcprov-jdk18on</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcpkix-jdk15to18</artifactId>
|
||||
<artifactId>bcpkix-jdk18on</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@@ -124,7 +124,7 @@ public abstract class BaseAPI
|
||||
|
||||
/**
|
||||
* Helper method to extract the property value for the given nodeRef and property name
|
||||
*
|
||||
*
|
||||
* @param result
|
||||
* @param nodeRef
|
||||
* @param propertyName
|
||||
@@ -152,7 +152,7 @@ public abstract class BaseAPI
|
||||
|
||||
return propertyValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper method to extract property values from request result and put them in map as a list that corresponds to a unique property value.
|
||||
*
|
||||
|
@@ -61,7 +61,7 @@ public class FilePlanComponentFields
|
||||
public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS = "rma:recordSearchDispositionEvents";
|
||||
public static final String PROPERTIES_DECLASSIFICATION_REVIEW_COMPLETED_BY = "rma:declassificationReviewCompletedBy";
|
||||
public static final String PROPERTIES_DECLASSIFICATION_REVIEW_COMPLETED_AT = "rma:declassificationReviewCompletedAt";
|
||||
|
||||
|
||||
|
||||
/** File plan properties */
|
||||
public static final String PROPERTIES_COMPONENT_ID = "st:componentId";
|
||||
|
@@ -125,7 +125,7 @@ public class RecordProperties extends TestModel
|
||||
|
||||
@JsonProperty (required = true, value = PROPERTIES_ORIGINAL_NAME)
|
||||
private String originalName;
|
||||
|
||||
|
||||
@JsonProperty (PROPERTIES_CLASSIFICATION)
|
||||
private List<String> classification;
|
||||
|
||||
|
@@ -112,10 +112,10 @@ public class RecordCategoryChildProperties extends TestModel
|
||||
|
||||
@JsonProperty (PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE)
|
||||
private Boolean recordSearchHasDispositionSchedule;
|
||||
|
||||
|
||||
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION)
|
||||
private String recordSearchDispositionPeriodExpression;
|
||||
|
||||
|
||||
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY)
|
||||
private String recordSearchDispositionAuthority;
|
||||
|
||||
@@ -136,7 +136,7 @@ public class RecordCategoryChildProperties extends TestModel
|
||||
|
||||
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS)
|
||||
private List<String> recordSearchDispositionEvents;
|
||||
|
||||
|
||||
@JsonProperty (PROPERTIES_OWNER)
|
||||
private Owner owner;
|
||||
|
||||
|
@@ -112,13 +112,13 @@ public class RecordFolderProperties extends TestModel
|
||||
|
||||
@JsonProperty (PROPERTIES_CLASSIFICATION)
|
||||
private List<String> classification;
|
||||
|
||||
|
||||
@JsonProperty (PROPERTIES_DESCRIPTION)
|
||||
private String description;
|
||||
|
||||
@JsonProperty (PROPERTIES_OWNER)
|
||||
private Owner owner;
|
||||
|
||||
|
||||
@JsonProperty (PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD)
|
||||
private String recordSearchVitalRecordReviewPeriod;
|
||||
|
||||
|
@@ -28,7 +28,7 @@ package org.alfresco.rest.rm.community.model.user;
|
||||
|
||||
/**
|
||||
* Constants for RM user capabilities
|
||||
*
|
||||
*
|
||||
* @author Kristijan Conkas
|
||||
* @since 2.6
|
||||
*/
|
||||
|
@@ -38,7 +38,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* The v0 REST API for nodes
|
||||
*
|
||||
*
|
||||
* @author jcule
|
||||
* @since 2.7EA1
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ public class NodeAPI extends BaseAPI
|
||||
|
||||
/**
|
||||
* Get the node metadata using the using the node data webscript: Document List v2 Component
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
* @param password
|
||||
* @param nodeId
|
||||
@@ -70,5 +70,5 @@ public class NodeAPI extends BaseAPI
|
||||
client.close();
|
||||
return doGetRequest(username, password, requestURL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -143,7 +143,7 @@ public class SearchAPI extends BaseAPI
|
||||
/**
|
||||
* Search as a user for nodes on site "rm" matching query, using SearchAPI.RM_DEFAULT_RECORD_FILTERS and sorted
|
||||
* by sortby and returns the property value for the given nodeRef and property name
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
* @param password
|
||||
* @param query
|
||||
@@ -157,9 +157,9 @@ public class SearchAPI extends BaseAPI
|
||||
{
|
||||
String searchFilterParamaters = MessageFormat.format(RM_DEFAULT_NODES_FILTERS, Boolean.toString(includeFolders),
|
||||
Boolean.toString(includeCategories));
|
||||
return getItemProperty(rmSearch(username, password, "rm", query, searchFilterParamaters, sortby), nodeRef, propertyName);
|
||||
return getItemProperty(rmSearch(username, password, "rm", query, searchFilterParamaters, sortby), nodeRef, propertyName);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generic faceted search.
|
||||
* @param username
|
||||
@@ -229,17 +229,17 @@ public class SearchAPI extends BaseAPI
|
||||
|
||||
/**
|
||||
* Helper method to extract list of names from search result.
|
||||
*
|
||||
*
|
||||
* @param searchResult
|
||||
* @return list of document or record names in search result
|
||||
* @throws FileNotFoundException
|
||||
* @throws JsonSyntaxException
|
||||
* @throws JsonIOException
|
||||
* @throws FileNotFoundException
|
||||
* @throws JsonSyntaxException
|
||||
* @throws JsonIOException
|
||||
* @throws RuntimeException for malformed search response
|
||||
*/
|
||||
/**
|
||||
* Helper method to extract list of names from search result.
|
||||
*
|
||||
*
|
||||
* @param searchResult
|
||||
* @return
|
||||
*/
|
||||
@@ -247,10 +247,10 @@ public class SearchAPI extends BaseAPI
|
||||
{
|
||||
return getPropertyValues(searchResult, "name");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper method to extract list of property values from search result for the given nodeRef.
|
||||
*
|
||||
*
|
||||
* @param searchResult
|
||||
* @param nodeRef
|
||||
* @param propertyName
|
||||
|
@@ -73,7 +73,7 @@ public class AuditLoginEventsTests extends BaseRMRestTest
|
||||
assertTrue("The list of events is not filtered by " + LOGIN_UNSUCCESSFUL.event,
|
||||
auditEntries.stream().allMatch(auditEntry -> auditEntry.getEvent().equals(LOGIN_UNSUCCESSFUL.eventDisplayName)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Given I have tried to login using valid credentials
|
||||
* When I view the RM audit filtered by Login successful event
|
||||
|
@@ -62,6 +62,7 @@ import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI;
|
||||
import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
|
||||
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
|
||||
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI;
|
||||
import org.alfresco.rest.rm.community.utils.AlfrescoRetryAnalyzer;
|
||||
import org.alfresco.rest.v0.service.RoleService;
|
||||
import org.alfresco.test.AlfrescoTest;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
@@ -289,10 +290,11 @@ public class UpdateRecordsTests extends BaseRMRestTest
|
||||
* </pre>
|
||||
*/
|
||||
@Test
|
||||
(
|
||||
dataProvider = "completeRecords",
|
||||
description = "Complete records can't be updated"
|
||||
)
|
||||
(
|
||||
dataProvider = "completeRecords",
|
||||
description = "Complete records can't be updated",
|
||||
retryAnalyzer = AlfrescoRetryAnalyzer.class
|
||||
)
|
||||
@AlfrescoTest(jira="RM-4362")
|
||||
@Bug (id = "APPS-132")
|
||||
public void completeRecordsCantBeUpdated(String electronicRecordId, String nonElectronicRecordId)
|
||||
|
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2024 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.utils;
|
||||
|
||||
import org.testng.ITestResult;
|
||||
import org.testng.util.RetryAnalyzerCount;
|
||||
|
||||
public class AlfrescoRetryAnalyzer extends RetryAnalyzerCount
|
||||
{
|
||||
public AlfrescoRetryAnalyzer() {
|
||||
super();
|
||||
setCount(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean retryMethod(ITestResult result)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -1,3 +1,3 @@
|
||||
SOLR6_TAG=2.0.11
|
||||
SOLR6_TAG=2.0.8.1
|
||||
POSTGRES_TAG=15.4
|
||||
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
||||
|
@@ -33,7 +33,7 @@ function main()
|
||||
{
|
||||
// Log debug message
|
||||
logger.log("Record " + node.name + " has been superseded. Sending notification");
|
||||
|
||||
|
||||
// Send notification
|
||||
rmService.sendSupersededNotification(node);
|
||||
}
|
||||
|
@@ -99,10 +99,10 @@ function main()
|
||||
{
|
||||
version = versionHistory[i];
|
||||
p = getPerson(version.creator);
|
||||
|
||||
|
||||
recordNodeRef = version.getVersionProperty("recordNodeRef");
|
||||
isRecordedVersionDestroyed = version.getVersionProperty("RecordedVersionDestroyed");
|
||||
|
||||
|
||||
versions[versions.length] =
|
||||
{
|
||||
nodeRef: version.node.nodeRef.toString(),
|
||||
|
@@ -26,19 +26,19 @@
|
||||
*/
|
||||
/**
|
||||
* Delete the rm constraint list
|
||||
*/
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
// Get the shortname
|
||||
var shortName = url.extension;
|
||||
|
||||
|
||||
// Get the constraint
|
||||
var constraint = caveatConfig.getConstraint(shortName);
|
||||
|
||||
|
||||
if (constraint != null)
|
||||
{
|
||||
caveatConfig.deleteConstraintList(shortName);
|
||||
|
||||
|
||||
// Pass the constraint name to the template
|
||||
model.constraintName = shortName;
|
||||
}
|
||||
|
@@ -26,15 +26,15 @@
|
||||
*/
|
||||
/**
|
||||
* Get the detail of the rm constraint
|
||||
*/
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
// Get the shortname
|
||||
var shortName = url.extension;
|
||||
|
||||
|
||||
// Get the constraint
|
||||
var constraint = caveatConfig.getConstraint(shortName);
|
||||
|
||||
|
||||
if (constraint != null)
|
||||
{
|
||||
// Pass the constraint detail to the template
|
||||
|
@@ -26,14 +26,14 @@
|
||||
*/
|
||||
/**
|
||||
* List the names of the rm constraints
|
||||
*/
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
var wel = true;
|
||||
var withEmptyLists = args["withEmptyLists"];
|
||||
// Pass the information to the template
|
||||
if (withEmptyLists != null && withEmptyLists === 'false')
|
||||
{
|
||||
{
|
||||
model.constraints = caveatConfig.constraintsWithoutEmptyList;
|
||||
}
|
||||
else
|
||||
|
@@ -26,15 +26,15 @@
|
||||
*/
|
||||
/**
|
||||
* Get the detail of the rm constraint
|
||||
*/
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
var urlElements = url.extension.split("/");
|
||||
var shortName = urlElements[0];
|
||||
|
||||
|
||||
// Get the constraint
|
||||
var constraint = caveatConfig.getConstraint(shortName);
|
||||
|
||||
|
||||
if (constraint != null)
|
||||
{
|
||||
// Pass the constraint detail to the template
|
||||
|
@@ -26,33 +26,33 @@
|
||||
*/
|
||||
/**
|
||||
* Update the details of a value in an rm constraint
|
||||
*/
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
var urlElements = url.extension.split("/");
|
||||
var shortName = urlElements[0];
|
||||
|
||||
|
||||
var values = null;
|
||||
|
||||
|
||||
if (json.has("values"))
|
||||
{
|
||||
values = json.getJSONArray("values");
|
||||
}
|
||||
|
||||
|
||||
if (values == null)
|
||||
{
|
||||
status.setCode(status.STATUS_BAD_REQUEST, "Values missing");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Get the constraint
|
||||
var constraint = caveatConfig.getConstraint(shortName);
|
||||
|
||||
|
||||
if (constraint != null)
|
||||
{
|
||||
constraint.updateValues(values);
|
||||
constraint.updateValues(values);
|
||||
model.constraint = caveatConfig.getConstraint(shortName);
|
||||
model.constraintName = shortName;
|
||||
model.constraintName = shortName;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -26,13 +26,13 @@
|
||||
*/
|
||||
/**
|
||||
* Delete the rm constraint list
|
||||
*/
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
var urlElements = url.extension.split("/");
|
||||
var shortName = urlElements[0];
|
||||
var authorityName = urlElements[1];
|
||||
|
||||
|
||||
if (shortName == null)
|
||||
{
|
||||
status.setCode(status.STATUS_BAD_REQUEST, "shortName missing");
|
||||
@@ -43,16 +43,16 @@ function main()
|
||||
status.setCode(status.STATUS_BAD_REQUEST, "value missing");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Get the constraint
|
||||
var constraint = caveatConfig.getConstraint(shortName);
|
||||
|
||||
|
||||
if (constraint != null)
|
||||
{
|
||||
caveatConfig.deleteRMConstraintListValue(shortName, valueName);
|
||||
|
||||
|
||||
var constraint = caveatConfig.getConstraint(shortName);
|
||||
|
||||
|
||||
// Pass the constraint name to the template
|
||||
model.constraint = constraint;
|
||||
}
|
||||
|
@@ -26,28 +26,28 @@
|
||||
*/
|
||||
/**
|
||||
* Get the detail of the rm constraint
|
||||
*/
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
var urlElements = url.extension.split("/");
|
||||
var shortName = decodeURIComponent(urlElements[0]);
|
||||
var valueName = decodeURIComponent(urlElements[2])
|
||||
|
||||
|
||||
// Get the constraint
|
||||
var constraint = caveatConfig.getConstraint(shortName);
|
||||
|
||||
|
||||
if (constraint != null)
|
||||
{
|
||||
// Pass the constraint detail to the template
|
||||
var value = constraint.getValue(valueName);
|
||||
|
||||
|
||||
if(value == null)
|
||||
{
|
||||
// Return 404
|
||||
status.setCode(404, "Constraint List: " + shortName + " value: " + valueName + "does not exist");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
model.value = value;
|
||||
model.constraint = constraint;
|
||||
}
|
||||
|
@@ -114,7 +114,7 @@ function getRecordSeries(seriesNode)
|
||||
// Create Record Series object
|
||||
var recordSerie = {
|
||||
parentPath: "/",
|
||||
name: seriesNode.name,
|
||||
name: seriesNode.name,
|
||||
identifier: seriesNode.properties["rma:identifier"],
|
||||
description: seriesNode.properties["description"]
|
||||
};
|
||||
@@ -154,7 +154,7 @@ function getRecordCategory(categoryNode, parentPath)
|
||||
name: categoryNode.name,
|
||||
identifier: categoryNode.properties["rma:identifier"],
|
||||
vitalRecordIndicator: categoryNode.properties["vitalRecordIndicator"],
|
||||
dispositionAuthority: categoryNode.properties["dispositionAuthority"],
|
||||
dispositionAuthority: categoryNode.properties["dispositionAuthority"],
|
||||
recordFolders: [],
|
||||
dispositionActions: []
|
||||
};
|
||||
|
@@ -36,12 +36,12 @@ function main()
|
||||
status.setCode(status.STATUS_NOT_FOUND, "Site not found: '" + siteId + "'");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
var searchNode = siteNode.getContainer("Saved Searches");
|
||||
if (searchNode != null)
|
||||
{
|
||||
var kids, ssNode;
|
||||
|
||||
|
||||
if (bPublic == null || bPublic == "true")
|
||||
{
|
||||
// public searches are in the root of the folder
|
||||
@@ -56,7 +56,7 @@ function main()
|
||||
kids = userNode.children;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (kids)
|
||||
{
|
||||
for (var i = 0, ii = kids.length; i < ii; i++)
|
||||
@@ -73,7 +73,7 @@ function main()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
model.savedSearches = savedSearches;
|
||||
}
|
||||
|
||||
|
@@ -40,7 +40,7 @@ function main()
|
||||
status.setCode(status.STATUS_BAD_REQUEST, "nodeRef: '" + nodeRef + "' is not of type 'rma:transfer'");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
model.transfer = transfer;
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
||||
/**
|
||||
* Live Search Component
|
||||
*
|
||||
*
|
||||
* Takes the following object as Input:
|
||||
* params
|
||||
* {
|
||||
@@ -41,7 +41,7 @@
|
||||
* term: search terms
|
||||
* maxResults: maximum results to return
|
||||
* };
|
||||
*
|
||||
*
|
||||
* Outputs:
|
||||
* items - Array of objects containing the search results
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ const SURF_CONFIG_QNAMEPATH = "/cm:surf-config/";
|
||||
/**
|
||||
* Returns site information data structure.
|
||||
* { shortName: siteId, title: title }
|
||||
*
|
||||
*
|
||||
* Caches the data to avoid repeatedly querying the repository.
|
||||
*/
|
||||
var siteDataCache = {};
|
||||
@@ -134,13 +134,13 @@ function getDocumentItem(container, node) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits the qname path to a node.
|
||||
*
|
||||
*
|
||||
* Returns container meta object containing the following properties:
|
||||
* siteId
|
||||
* containerId
|
||||
@@ -151,7 +151,7 @@ function splitQNamePath(node) {
|
||||
siteId: null,
|
||||
containerId: null
|
||||
};
|
||||
|
||||
|
||||
if (path.match("^"+SITES_SPACE_QNAME_PATH) == SITES_SPACE_QNAME_PATH)
|
||||
{
|
||||
var tmp = path.substring(SITES_SPACE_QNAME_PATH.length),
|
||||
@@ -167,13 +167,13 @@ function splitQNamePath(node) {
|
||||
// strip container id from the path
|
||||
var containerId = tmp.substring(0, pos);
|
||||
containerId = containerId.substring(containerId.indexOf(":") + 1);
|
||||
|
||||
|
||||
container.siteId = siteId;
|
||||
container.containerId = containerId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
@@ -197,36 +197,36 @@ function liveSearch(params) {
|
||||
|
||||
/**
|
||||
* Return Document Search results with the given search terms.
|
||||
*
|
||||
*
|
||||
* "AND" is the default operator unless configured otherwise, OR, AND and NOT are also supported -
|
||||
* as is any other valid fts-alfresco elements such as "quoted terms" and (bracket terms) and also
|
||||
* propname:propvalue syntax.
|
||||
*
|
||||
*
|
||||
* @param params Object containing search parameters - see API description above
|
||||
*/
|
||||
function getDocResults(params) {
|
||||
// ensure a TYPE is specified
|
||||
var ftsQuery = params.term + ' AND +TYPE:"cm:content"';
|
||||
|
||||
|
||||
// site constraint
|
||||
if (params.siteId !== null)
|
||||
{
|
||||
// use SITE syntax to restrict to specific site
|
||||
ftsQuery += ' AND SITE:"' + params.siteId + '"';
|
||||
}
|
||||
|
||||
|
||||
// root node - generally used for overridden Repository root in Share
|
||||
if (params.rootNode !== null)
|
||||
{
|
||||
ftsQuery = 'PATH:"' + rootNode.qnamePath + '//*" AND (' + ftsQuery + ')';
|
||||
}
|
||||
|
||||
|
||||
// main query construction
|
||||
ftsQuery = '(' + ftsQuery + ') AND -TYPE:"cm:thumbnail" AND -TYPE:"cm:failedThumbnail" AND -TYPE:"cm:rating" AND -TYPE:"fm:post" AND -ASPECT:"sys:hidden" AND -ASPECT:"rma:savedSearch" AND -cm:creator:system';
|
||||
|
||||
|
||||
if (logger.isLoggingEnabled())
|
||||
logger.log("LiveQuery:\r\n" + ftsQuery);
|
||||
|
||||
|
||||
// get default fts operator from the config
|
||||
//
|
||||
// TODO: common search lib - for both live and standard e.g. to get values like this...
|
||||
@@ -237,7 +237,7 @@ function getDocResults(params) {
|
||||
{
|
||||
operator = cf.toString();
|
||||
}
|
||||
|
||||
|
||||
// perform fts-alfresco language query
|
||||
var queryDef = {
|
||||
query: ftsQuery,
|
||||
@@ -254,10 +254,10 @@ function getDocResults(params) {
|
||||
var rs = search.queryResultSet(queryDef);
|
||||
nodes = rs.nodes,
|
||||
results = [];
|
||||
|
||||
|
||||
if (logger.isLoggingEnabled())
|
||||
logger.log("Processing resultset of length: " + nodes.length);
|
||||
|
||||
|
||||
for (var i=0, item; i<nodes.length && i<params.maxResults; i++)
|
||||
{
|
||||
// For each node we extract the site/container qname path and then
|
||||
@@ -279,13 +279,13 @@ function getDocResults(params) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return buildResults(results, params, rs.meta.hasMore);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return Site Search results with the given search terms.
|
||||
*
|
||||
*
|
||||
* @param params Object containing search parameters - see API description above
|
||||
*/
|
||||
function getSiteResults(params) {
|
||||
@@ -297,7 +297,7 @@ function getSiteResults(params) {
|
||||
|
||||
/**
|
||||
* Return People Search results with the given search terms.
|
||||
*
|
||||
*
|
||||
* @param params Object containing search parameters - see API description above
|
||||
*/
|
||||
function getPeopleResults(params) {
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -139,7 +139,7 @@ public class JSONConversionComponentTest extends BaseRMTestCase
|
||||
Serializable value = stringValue;
|
||||
if (type.equals("boolean"))
|
||||
{
|
||||
value = new Boolean(stringValue);
|
||||
value = Boolean.valueOf(stringValue);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
@@ -4,8 +4,8 @@
|
||||
|
||||
# Version label
|
||||
version.major=23
|
||||
version.minor=1
|
||||
version.revision=1
|
||||
version.minor=3
|
||||
version.revision=0
|
||||
version.label=
|
||||
|
||||
# Edition label
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2023 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -55,11 +55,11 @@ public class CannedQueryTest extends TestCase
|
||||
RESULTS_TWO = new ArrayList<Long>(10);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
RESULTS_TWO.add(new Long(i));
|
||||
RESULTS_TWO.add(Long.valueOf(i));
|
||||
}
|
||||
ANTI_RESULTS = new HashSet<Object>();
|
||||
ANTI_RESULTS.add("ONE_5");
|
||||
ANTI_RESULTS.add(new Long(5));
|
||||
ANTI_RESULTS.add(Long.valueOf(5));
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
@@ -25,6 +25,7 @@ import junit.framework.TestCase;
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
@SuppressWarnings({"PMD.DetachedTestCase", "PMD.JUnit4TestShouldUseTestAnnotation"})
|
||||
public class VersionNumberTest extends TestCase
|
||||
{
|
||||
public void testCreate()
|
||||
@@ -136,4 +137,36 @@ public class VersionNumberTest extends TestCase
|
||||
assertEquals(-1, version8.compareTo(version9));
|
||||
assertEquals(-1, version9.compareTo(version10));
|
||||
}
|
||||
|
||||
public void testCompareNewSchema() {
|
||||
// module min/max repo version is 23, actual ACS version is 23.1.0 which is greater than module
|
||||
VersionNumber repoVersionMin = new VersionNumber("23");
|
||||
VersionNumber repoVerisionActual = new VersionNumber("23.1.0");
|
||||
assertEquals(1, repoVerisionActual.compareTo(repoVersionMin));
|
||||
|
||||
// module min/max repo version is 23.2, actual ACS version is 23.1.1 which is lower than module
|
||||
repoVersionMin = new VersionNumber("23.2");
|
||||
repoVerisionActual = new VersionNumber("23.1.1");
|
||||
assertEquals(-1, repoVerisionActual.compareTo(repoVersionMin));
|
||||
|
||||
// module min/max repo version is 7.4, actual ACS version is 23.1.0 which is greater than module
|
||||
repoVersionMin = new VersionNumber("7.4");
|
||||
repoVerisionActual = new VersionNumber("23.1.0");
|
||||
assertEquals(1, repoVerisionActual.compareTo(repoVersionMin));
|
||||
|
||||
// module min/max repo version is 24, actual ACS version is 24.1.0 which is greater than module
|
||||
repoVersionMin = new VersionNumber("24");
|
||||
repoVerisionActual = new VersionNumber("24.1.0");
|
||||
assertEquals(1, repoVerisionActual.compareTo(repoVersionMin));
|
||||
|
||||
// module min/max repo version is 24, actual ACS version is 23.2.0 which is lower than module
|
||||
repoVersionMin = new VersionNumber("24");
|
||||
repoVerisionActual = new VersionNumber("23.2.0");
|
||||
assertEquals(-1, repoVerisionActual.compareTo(repoVersionMin));
|
||||
|
||||
// module min/max repo version is 24.2, actual ACS version is 24.2.0 which is equal to module
|
||||
repoVersionMin = new VersionNumber("24.2");
|
||||
repoVerisionActual = new VersionNumber("24.2.0");
|
||||
assertEquals(0, repoVerisionActual.compareTo(repoVersionMin));
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
@@ -193,14 +193,6 @@
|
||||
<artifactId>tika-parsers-standard-package</artifactId>
|
||||
<version>${dependency.tika.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<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>
|
||||
@@ -224,10 +216,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcmail-jdk15to18</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
|
@@ -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
|
||||
@@ -121,7 +121,7 @@ public class AssociationRef implements EntityRef, Serializable
|
||||
String targetNodeRefStr = tokenizer.nextToken();
|
||||
String assocTypeQNameStr = tokenizer.nextToken();
|
||||
|
||||
this.id = new Long(idStr);
|
||||
this.id = Long.valueOf(idStr);
|
||||
this.sourceRef = new NodeRef(sourceNodeRefStr);
|
||||
this.targetRef = new NodeRef(targetNodeRefStr);
|
||||
this.assocTypeQName = QName.createQName(assocTypeQNameStr);
|
||||
|
@@ -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
|
||||
@@ -391,7 +391,7 @@ public class DefaultTypeConverter extends TypeConverter
|
||||
{
|
||||
public Boolean convert(Number source)
|
||||
{
|
||||
return new Boolean(source.longValue() > 0);
|
||||
return Boolean.valueOf(source.longValue() > 0);
|
||||
}
|
||||
});
|
||||
addConverter(Number.class, Byte.class, new TypeConverter.Converter<Number, Byte>()
|
||||
@@ -549,8 +549,8 @@ public class DefaultTypeConverter extends TypeConverter
|
||||
//
|
||||
// Boolean ->
|
||||
//
|
||||
final Long LONG_FALSE = new Long(0L);
|
||||
final Long LONG_TRUE = new Long(1L);
|
||||
final Long LONG_FALSE = Long.valueOf(0L);
|
||||
final Long LONG_TRUE = Long.valueOf(1L);
|
||||
addConverter(Boolean.class, Long.class, new TypeConverter.Converter<Boolean, Long>()
|
||||
{
|
||||
public Long convert(Boolean source)
|
||||
|
@@ -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
|
||||
@@ -190,7 +190,7 @@ public class Duration implements Comparable, Serializable
|
||||
{
|
||||
if (token == StreamTokenizer.TT_NUMBER)
|
||||
{
|
||||
nval = new Double(tok.nval);
|
||||
nval = Double.valueOf(tok.nval);
|
||||
}
|
||||
else if (token == StreamTokenizer.TT_EOF)
|
||||
{
|
||||
|
@@ -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
|
||||
@@ -57,8 +57,8 @@ public class DefaultTypeConverterTest extends TestCase
|
||||
|
||||
public void testPrimitives()
|
||||
{
|
||||
assertEquals(Boolean.valueOf(false), DefaultTypeConverter.INSTANCE.convert(Boolean.class, false));
|
||||
assertEquals(Boolean.valueOf(true), DefaultTypeConverter.INSTANCE.convert(Boolean.class, true));
|
||||
assertEquals(Boolean.FALSE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, false));
|
||||
assertEquals(Boolean.TRUE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, true));
|
||||
assertEquals(Character.valueOf('a'), DefaultTypeConverter.INSTANCE.convert(Character.class, 'a'));
|
||||
assertEquals(Byte.valueOf("3"), DefaultTypeConverter.INSTANCE.convert(Byte.class, (byte) 3));
|
||||
assertEquals(Short.valueOf("4"), DefaultTypeConverter.INSTANCE.convert(Short.class, (short) 4));
|
||||
@@ -70,8 +70,8 @@ public class DefaultTypeConverterTest extends TestCase
|
||||
|
||||
public void testNoConversion()
|
||||
{
|
||||
assertEquals(Boolean.valueOf(false), DefaultTypeConverter.INSTANCE.convert(Boolean.class, Boolean.valueOf(false)));
|
||||
assertEquals(Boolean.valueOf(true), DefaultTypeConverter.INSTANCE.convert(Boolean.class, Boolean.valueOf(true)));
|
||||
assertEquals(Boolean.FALSE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, Boolean.FALSE));
|
||||
assertEquals(Boolean.TRUE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, Boolean.TRUE));
|
||||
assertEquals(Character.valueOf('w'), DefaultTypeConverter.INSTANCE.convert(Character.class, Character.valueOf('w')));
|
||||
assertEquals(Byte.valueOf("3"), DefaultTypeConverter.INSTANCE.convert(Byte.class, Byte.valueOf("3")));
|
||||
assertEquals(Short.valueOf("4"), DefaultTypeConverter.INSTANCE.convert(Short.class, Short.valueOf("4")));
|
||||
@@ -90,8 +90,8 @@ public class DefaultTypeConverterTest extends TestCase
|
||||
|
||||
public void testToString()
|
||||
{
|
||||
assertEquals("true", DefaultTypeConverter.INSTANCE.convert(String.class, new Boolean(true)));
|
||||
assertEquals("false", DefaultTypeConverter.INSTANCE.convert(String.class, new Boolean(false)));
|
||||
assertEquals("true", DefaultTypeConverter.INSTANCE.convert(String.class, Boolean.TRUE));
|
||||
assertEquals("false", DefaultTypeConverter.INSTANCE.convert(String.class, Boolean.FALSE));
|
||||
assertEquals("v", DefaultTypeConverter.INSTANCE.convert(String.class, Character.valueOf('v')));
|
||||
assertEquals("3", DefaultTypeConverter.INSTANCE.convert(String.class, Byte.valueOf("3")));
|
||||
assertEquals("4", DefaultTypeConverter.INSTANCE.convert(String.class, Short.valueOf("4")));
|
||||
@@ -132,8 +132,8 @@ public class DefaultTypeConverterTest extends TestCase
|
||||
|
||||
public void testFromString()
|
||||
{
|
||||
assertEquals(Boolean.valueOf(true), DefaultTypeConverter.INSTANCE.convert(Boolean.class, "True"));
|
||||
assertEquals(Boolean.valueOf(false), DefaultTypeConverter.INSTANCE.convert(Boolean.class, "woof"));
|
||||
assertEquals(Boolean.TRUE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, "True"));
|
||||
assertEquals(Boolean.FALSE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, "woof"));
|
||||
assertEquals(Character.valueOf('w'), DefaultTypeConverter.INSTANCE.convert(Character.class, "w"));
|
||||
assertEquals(Byte.valueOf("3"), DefaultTypeConverter.INSTANCE.convert(Byte.class, "3"));
|
||||
assertEquals(Short.valueOf("4"), DefaultTypeConverter.INSTANCE.convert(Short.class, "4"));
|
||||
@@ -316,8 +316,8 @@ public class DefaultTypeConverterTest extends TestCase
|
||||
private ArrayList<Object> makeList()
|
||||
{
|
||||
ArrayList<Object> list = new ArrayList<Object>();
|
||||
list.add(Boolean.valueOf(true));
|
||||
list.add(Boolean.valueOf(false));
|
||||
list.add(Boolean.TRUE);
|
||||
list.add(Boolean.FALSE);
|
||||
list.add(Character.valueOf('q'));
|
||||
list.add(Byte.valueOf("1"));
|
||||
list.add(Short.valueOf("2"));
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@@ -29,7 +29,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15to18</artifactId>
|
||||
<artifactId>bcprov-jdk18on</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.schlichtherle.truezip</groupId>
|
||||
|
@@ -9,6 +9,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -1,3 +1,3 @@
|
||||
SOLR6_TAG=2.0.11
|
||||
SOLR6_TAG=2.0.8.1
|
||||
POSTGRES_TAG=15.4
|
||||
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -27,8 +27,8 @@ fi
|
||||
# The second parameter can be used to avoid doing a clean up if we are doing a restart test.
|
||||
if [ "$CLEAN_UP" != "no-clean-up" ]
|
||||
then
|
||||
docker compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") kill
|
||||
docker compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") rm -f
|
||||
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") kill
|
||||
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") rm -f
|
||||
|
||||
export GENERATED_IMAGES=$(docker images | grep '^environment_' | awk '{ print $3 }')
|
||||
if [ -n "$GENERATED_IMAGES" ]
|
||||
@@ -43,7 +43,7 @@ export TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-tra
|
||||
export TRANSFORM_ROUTER_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-service.version -q -DforceStdout)
|
||||
|
||||
# .env files are picked up from project directory correctly on docker-compose 1.23.0+
|
||||
docker compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
|
||||
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
|
@@ -10,8 +10,8 @@ fi
|
||||
|
||||
echo "Killing ACS stack in ${DOCKER_COMPOSE_PATH}"
|
||||
|
||||
docker compose --file ${DOCKER_COMPOSE_PATH} ps
|
||||
docker-compose --file ${DOCKER_COMPOSE_PATH} ps
|
||||
# logs for debug
|
||||
docker compose --file ${DOCKER_COMPOSE_PATH} logs --no-color -t alfresco
|
||||
docker compose --file ${DOCKER_COMPOSE_PATH} kill
|
||||
docker compose --file ${DOCKER_COMPOSE_PATH} rm -fv
|
||||
docker-compose --file ${DOCKER_COMPOSE_PATH} logs --no-color -t alfresco
|
||||
docker-compose --file ${DOCKER_COMPOSE_PATH} kill
|
||||
docker-compose --file ${DOCKER_COMPOSE_PATH} rm -fv
|
@@ -9,13 +9,27 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If MTLS enabled configure keystore/truststore for curl command
|
||||
if [[ $ALFRESCO_URL == https* ]]; then
|
||||
KEYSTORE_TRUSTSTORE_PATH="${CI_WORKSPACE}/keystores/testClient"
|
||||
KEYSTORE_PASSWORD="password"
|
||||
|
||||
ADDITIONAL_MTLS_CONFIG="--key $KEYSTORE_TRUSTSTORE_PATH/client-key.pem --cert $KEYSTORE_TRUSTSTORE_PATH/client-cert.pem:$KEYSTORE_PASSWORD --cacert $KEYSTORE_TRUSTSTORE_PATH/testClient_truststore.pem"
|
||||
if [[ ${HOSTNAME_VERIFICATION_DISABLED} == true ]]; then
|
||||
ADDITIONAL_MTLS_CONFIG=$ADDITIONAL_MTLS_CONFIG" -k"
|
||||
fi
|
||||
else
|
||||
ADDITIONAL_MTLS_CONFIG=""
|
||||
fi
|
||||
|
||||
WAIT_INTERVAL=1
|
||||
COUNTER=0
|
||||
TIMEOUT=300
|
||||
t0=$(date +%s)
|
||||
|
||||
echo "Waiting for alfresco to start"
|
||||
until $(curl --output /dev/null --silent --head --fail ${ALFRESCO_URL}) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
|
||||
echo curl --output /dev/null --silent --head --fail ${ADDITIONAL_MTLS_CONFIG} ${ALFRESCO_URL}
|
||||
until $(curl --output /dev/null --silent --head --fail ${ADDITIONAL_MTLS_CONFIG} ${ALFRESCO_URL}) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
|
||||
printf '.'
|
||||
sleep $WAIT_INTERVAL
|
||||
COUNTER=$(($COUNTER+$WAIT_INTERVAL))
|
||||
@@ -37,7 +51,7 @@ else
|
||||
echo "Alfresco Could not start in time."
|
||||
echo "All started containers:"
|
||||
docker ps -a
|
||||
ALFCONTAINER=`docker ps -a | grep '\-alfresco' | awk '{ print $1 }'`
|
||||
ALFCONTAINER=`docker ps -a | grep _alfresco | awk '{ print $1 }'`
|
||||
echo "Last 200 lines from alfresco.log on container $ALFCONTAINER:"
|
||||
docker logs --tail=200 $ALFCONTAINER
|
||||
exit 1
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<organization>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@@ -38,13 +38,17 @@ public class RestGroupsModel extends TestModel implements IRestModel<RestGroupsM
|
||||
private String id;
|
||||
@JsonProperty(required = true)
|
||||
private String displayName;
|
||||
@JsonProperty()
|
||||
private String description;
|
||||
@JsonProperty(required = true)
|
||||
private Boolean isRoot;
|
||||
@JsonProperty()
|
||||
private Boolean hasSubgroups;
|
||||
|
||||
@JsonProperty("parentIds")
|
||||
private ArrayList<String> parentIds;
|
||||
private List<String> parentIds;
|
||||
@JsonProperty("zones")
|
||||
private ArrayList<String> zones;
|
||||
private List<String> zones;
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestGroupsModel model;
|
||||
@@ -75,6 +79,22 @@ public class RestGroupsModel extends TestModel implements IRestModel<RestGroupsM
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Boolean getHasSubgroups() {
|
||||
return hasSubgroups;
|
||||
}
|
||||
|
||||
public void setHasSubgroups(Boolean hasSubgroups) {
|
||||
this.hasSubgroups = hasSubgroups;
|
||||
}
|
||||
|
||||
public Boolean getIsRoot()
|
||||
{
|
||||
return isRoot;
|
||||
@@ -85,22 +105,22 @@ public class RestGroupsModel extends TestModel implements IRestModel<RestGroupsM
|
||||
this.isRoot = isRoot;
|
||||
}
|
||||
|
||||
public ArrayList<String> getParentIds()
|
||||
public List<String> getParentIds()
|
||||
{
|
||||
return parentIds;
|
||||
}
|
||||
|
||||
public void setParentIds(ArrayList<String> parentIds)
|
||||
public void setParentIds(List<String> parentIds)
|
||||
{
|
||||
this.parentIds = parentIds;
|
||||
}
|
||||
|
||||
public ArrayList<String> getZones()
|
||||
public List<String> getZones()
|
||||
{
|
||||
return zones;
|
||||
}
|
||||
|
||||
public void setZones(ArrayList<String> zones)
|
||||
public void setZones(List<String> zones)
|
||||
{
|
||||
this.zones = zones;
|
||||
}
|
||||
|
@@ -31,44 +31,73 @@ public class GroupsTests extends RestTest
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.GROUPS, TestGroup.SANITY })
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.NODES }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify creation, listing, updating and deletion of groups.")
|
||||
public void createListUpdateAndDeleteGroup() throws Exception
|
||||
public void createListUpdateAndDeleteGroup()
|
||||
{
|
||||
String groupName = "ZtestGroup" + UUID.randomUUID().toString();
|
||||
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).build();
|
||||
String groupName = "ZtestGroup" + UUID.randomUUID();
|
||||
String subGroupName = "ZtestSubgroup" + UUID.randomUUID();
|
||||
String groupDescription = "ZtestGroup description" + UUID.randomUUID();
|
||||
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).add("description", groupDescription).build();
|
||||
JsonObject subgroupBody = Json.createObjectBuilder().add("id", subGroupName).add("displayName", subGroupName).build();
|
||||
String groupBodyCreate = groupBody.toString();
|
||||
String subgroupBodyCreate = subgroupBody.toString();
|
||||
|
||||
//GroupCreation:
|
||||
//-ve
|
||||
restClient.authenticateUser(userModel).withCoreAPI().usingGroups().createGroup(groupBodyCreate);
|
||||
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);
|
||||
//+ve
|
||||
restClient.authenticateUser(adminUser).withCoreAPI().usingParams("include=zones").usingGroups().createGroup(groupBodyCreate)
|
||||
restClient.authenticateUser(adminUser).withCoreAPI().usingParams("include=zones,hasSubgroups,description").usingGroups().createGroup(groupBodyCreate)
|
||||
.assertThat().field("zones").contains("APP.DEFAULT")
|
||||
.and().field("isRoot").is(true)
|
||||
.and().field("displayName").is(groupName);
|
||||
.and().field("displayName").is(groupName)
|
||||
.and().field("description").is(groupDescription)
|
||||
.and().field("hasSubgroups").is(false);
|
||||
restClient.assertStatusCodeIs(HttpStatus.CREATED);
|
||||
|
||||
//AddChildGroup
|
||||
restClient.authenticateUser(adminUser).withCoreAPI().usingParams("include=zones").usingGroups().createGroup(subgroupBodyCreate);
|
||||
restClient.assertStatusCodeIs(HttpStatus.CREATED);
|
||||
|
||||
//LinkChildGroupToParent
|
||||
JsonObject groupMembershipGroupBody = Json.createObjectBuilder().add("id", "GROUP_"+subGroupName).add("memberType", "GROUP").build();
|
||||
String groupMembershipGroupBodyCreate = groupMembershipGroupBody.toString();
|
||||
restClient.authenticateUser(adminUser).withCoreAPI().usingGroups().createGroupMembership("GROUP_"+groupName, groupMembershipGroupBodyCreate);
|
||||
restClient.assertStatusCodeIs(HttpStatus.CREATED);
|
||||
|
||||
//ListGroups:
|
||||
restClient.withCoreAPI().usingParams("orderBy=displayName DESC&maxItems=10").usingGroups().listGroups()
|
||||
.assertThat().entriesListContains("id", "GROUP_"+groupName)
|
||||
.and().entriesListContains("id", "GROUP_"+subGroupName)
|
||||
.and().entriesListDoesNotContain("zones")
|
||||
.and().paginationField("maxItems").is("10");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
groupBody = Json.createObjectBuilder().add("displayName", "Z"+groupName).build();
|
||||
groupBody = Json.createObjectBuilder().add("displayName", "Z"+groupName).add("description", "Z"+groupDescription).build();
|
||||
String groupBodyUpdate = groupBody.toString();
|
||||
//UpdateGroup:
|
||||
restClient.withCoreAPI().usingGroups().updateGroupDetails("GROUP_"+groupName, groupBodyUpdate)
|
||||
restClient.withCoreAPI().usingParams("include=description").usingGroups().updateGroupDetails("GROUP_"+groupName, groupBodyUpdate)
|
||||
.assertThat().field("displayName").is("Z"+groupName)
|
||||
.and().field("description").is("Z"+groupDescription)
|
||||
.and().field("id").is("GROUP_"+groupName)
|
||||
.and().field("zones").isNull();
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
//GetGroupDetails:
|
||||
restClient.withCoreAPI().usingParams("include=zones").usingGroups().getGroupDetail("GROUP_"+groupName)
|
||||
restClient.withCoreAPI().usingParams("include=zones,hasSubgroups").usingGroups().getGroupDetail("GROUP_"+groupName)
|
||||
.assertThat().field("id").is("GROUP_"+groupName)
|
||||
.and().field("zones").contains("APP.DEFAULT")
|
||||
.and().field("isRoot").is(true);
|
||||
.and().field("isRoot").is(true)
|
||||
.and().field("hasSubgroups").is(true);
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
//DeleteChildGroup:
|
||||
restClient.authenticateUser(adminUser).withCoreAPI().usingGroups().deleteGroup("GROUP_"+subGroupName);
|
||||
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
|
||||
|
||||
//VerifyIfParentHasNoSubgroups:
|
||||
restClient.withCoreAPI().usingParams("include=zones,hasSubgroups").usingGroups().getGroupDetail("GROUP_"+groupName)
|
||||
.assertThat().field("id").is("GROUP_"+groupName)
|
||||
.and().field("hasSubgroups").is(false);
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
//DeleteGroup:
|
||||
@@ -83,9 +112,9 @@ public class GroupsTests extends RestTest
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.GROUPS, TestGroup.SANITY })
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.NODES }, executionType = ExecutionType.SANITY,
|
||||
description = "Verify creation, listing(only for person) and deletion of group memberships. ")
|
||||
public void createListDeleteGroupMembership() throws Exception
|
||||
public void createListDeleteGroupMembership()
|
||||
{
|
||||
String groupName = "ZtestGroup" + UUID.randomUUID().toString();
|
||||
String groupName = "ZtestGroup" + UUID.randomUUID();
|
||||
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).build();
|
||||
String groupBodyCreate = groupBody.toString();
|
||||
|
||||
@@ -95,6 +124,7 @@ public class GroupsTests extends RestTest
|
||||
|
||||
JsonObject groupMembershipBody = Json.createObjectBuilder().add("id", userModel.getUsername()).add("memberType", "PERSON").build();
|
||||
String groupMembershipBodyCreate = groupMembershipBody.toString();
|
||||
|
||||
//MembershipCreation:
|
||||
//-ve
|
||||
restClient.authenticateUser(userModel).withCoreAPI().usingGroups().createGroupMembership("GROUP_"+groupName, groupMembershipBodyCreate);
|
||||
@@ -127,7 +157,7 @@ public class GroupsTests extends RestTest
|
||||
description = "Verify listing of group memberships.")
|
||||
public void listGroupMembership() throws Exception
|
||||
{
|
||||
String groupName = "testGroup" + UUID.randomUUID().toString();
|
||||
String groupName = "testGroup" + UUID.randomUUID();
|
||||
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).build();
|
||||
String groupBodyCreate = groupBody.toString();
|
||||
|
||||
@@ -146,12 +176,10 @@ public class GroupsTests extends RestTest
|
||||
restClient.assertStatusCodeIs(HttpStatus.CREATED);
|
||||
|
||||
//ListGroupMembership
|
||||
RetryOperation op = new RetryOperation(){
|
||||
public void execute() throws Exception{
|
||||
restClient.withCoreAPI().usingGroups().listGroupMemberships("GROUP_"+groupName)
|
||||
.assertThat().entriesListContains("id", userModel.getUsername());
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
}
|
||||
RetryOperation op = () -> {
|
||||
restClient.withCoreAPI().usingGroups().listGroupMemberships("GROUP_"+groupName)
|
||||
.assertThat().entriesListContains("id", userModel.getUsername());
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
};
|
||||
Utility.sleep(500, 35000, op);// Allow indexing to complete.
|
||||
}
|
||||
|
@@ -4,18 +4,14 @@ import org.alfresco.dataprep.CMISUtil.DocumentType;
|
||||
import org.alfresco.rest.RestTest;
|
||||
import org.alfresco.rest.exception.JsonToModelConversionException;
|
||||
import org.alfresco.rest.model.RestProcessDefinitionModel;
|
||||
import org.alfresco.rest.model.RestProcessModel;
|
||||
import org.alfresco.rest.model.RestProcessModelsCollection;
|
||||
import org.alfresco.utility.model.*;
|
||||
import org.alfresco.utility.testrail.ExecutionType;
|
||||
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Ignore;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Cristina Axinte
|
||||
@@ -48,18 +44,16 @@ public class GetProcessesCoreTests extends RestTest
|
||||
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW,TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Verify user gets all processes started by him ordered descending by id")
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.REGRESSION }, enabled = false)
|
||||
@Ignore("Until ACS-6234 is done")
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.REGRESSION })
|
||||
public void getProcessesOrderedByIdDESC()
|
||||
{
|
||||
RestProcessModelsCollection processes = restClient.authenticateUser(userWhoStartsTask).withParams("orderBy=id DESC")
|
||||
.withWorkflowAPI().getProcesses();
|
||||
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
processes.assertThat().entriesListIsNotEmpty();
|
||||
List<RestProcessModel> processesList = processes.getEntries();
|
||||
processesList.get(0).onModel().assertThat().field("id").is(process3.getId());
|
||||
processesList.get(1).onModel().assertThat().field("id").is(task2.getProcessId());
|
||||
processesList.get(2).onModel().assertThat().field("id").is(task1.getProcessId());
|
||||
processes.assertThat().entriesListIsNotEmpty()
|
||||
.and().entriesListIsSortedDescBy("id")
|
||||
.and().entrySetContains("id", task1.getProcessId(), task2.getProcessId(), process3.getId());
|
||||
}
|
||||
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW,TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION,
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
85
pom.xml
85
pom.xml
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Community Repo Parent</name>
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
<properties>
|
||||
<acs.version.major>23</acs.version.major>
|
||||
<acs.version.minor>1</acs.version.minor>
|
||||
<acs.version.revision>1</acs.version.revision>
|
||||
<acs.version.minor>3</acs.version.minor>
|
||||
<acs.version.revision>0</acs.version.revision>
|
||||
<acs.version.label />
|
||||
<amp.min.version>${acs.version.major}.0.0</amp.min.version>
|
||||
|
||||
@@ -51,20 +51,20 @@
|
||||
<dependency.alfresco-server-root.version>7.0.1</dependency.alfresco-server-root.version>
|
||||
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
|
||||
<dependency.activiti.version>5.23.0</dependency.activiti.version>
|
||||
<dependency.alfresco-transform-core.version>5.1.3</dependency.alfresco-transform-core.version>
|
||||
<dependency.alfresco-transform-service.version>4.1.3</dependency.alfresco-transform-service.version>
|
||||
<dependency.alfresco-transform-core.version>5.1.0</dependency.alfresco-transform-core.version>
|
||||
<dependency.alfresco-transform-service.version>4.1.0</dependency.alfresco-transform-service.version>
|
||||
<dependency.alfresco-greenmail.version>7.0</dependency.alfresco-greenmail.version>
|
||||
<dependency.acs-event-model.version>0.0.24</dependency.acs-event-model.version>
|
||||
<dependency.acs-event-model.version>0.0.27</dependency.acs-event-model.version>
|
||||
|
||||
<dependency.aspectj.version>1.9.20.1</dependency.aspectj.version>
|
||||
<dependency.spring.version>6.0.12</dependency.spring.version>
|
||||
<dependency.spring-security.version>6.1.4</dependency.spring-security.version>
|
||||
<dependency.spring.version>6.0.17</dependency.spring.version>
|
||||
<dependency.spring-security.version>6.2.2</dependency.spring-security.version>
|
||||
<dependency.antlr.version>3.5.3</dependency.antlr.version>
|
||||
<dependency.jackson.version>2.15.2</dependency.jackson.version>
|
||||
<dependency.cxf.version>4.0.2</dependency.cxf.version>
|
||||
<dependency.opencmis.version>1.0.0-jakarta-1</dependency.opencmis.version>
|
||||
<dependency.webscripts.version>9.0</dependency.webscripts.version>
|
||||
<dependency.bouncycastle.version>1.76</dependency.bouncycastle.version>
|
||||
<dependency.bouncycastle.version>1.77</dependency.bouncycastle.version>
|
||||
<dependency.mockito-core.version>5.4.0</dependency.mockito-core.version>
|
||||
<dependency.assertj.version>3.24.2</dependency.assertj.version>
|
||||
<dependency.org-json.version>20231013</dependency.org-json.version>
|
||||
@@ -81,17 +81,16 @@
|
||||
<dependency.slf4j.version>2.0.9</dependency.slf4j.version>
|
||||
<dependency.log4j.version>2.20.0</dependency.log4j.version>
|
||||
<dependency.groovy.version>3.0.19</dependency.groovy.version>
|
||||
<dependency.tika.version>2.4.1</dependency.tika.version>
|
||||
<dependency.tika.version>2.9.1</dependency.tika.version>
|
||||
<dependency.truezip.version>7.7.10</dependency.truezip.version>
|
||||
<dependency.poi.version>5.2.2</dependency.poi.version>
|
||||
<dependency.poi-ooxml-lite.version>5.2.3</dependency.poi-ooxml-lite.version>
|
||||
<dependency.poi.version>5.2.5</dependency.poi.version>
|
||||
<dependency.jboss.logging.version>3.5.0.Final</dependency.jboss.logging.version>
|
||||
<dependency.camel.version>4.0.0</dependency.camel.version> <!-- when bumping this version, please keep track/sync with included netty.io dependencies -->
|
||||
<dependency.netty.version>4.1.96.Final</dependency.netty.version> <!-- must be in sync with camels transitive dependencies, e.g.: netty-common -->
|
||||
<dependency.activemq.version>5.18.3</dependency.activemq.version>
|
||||
<dependency.apache-compress.version>1.24.0</dependency.apache-compress.version>
|
||||
<dependency.apache-compress.version>1.26.0</dependency.apache-compress.version>
|
||||
<dependency.awaitility.version>4.2.0</dependency.awaitility.version>
|
||||
<dependency.swagger-ui.version>3.38.0</dependency.swagger-ui.version>
|
||||
<dependency.swagger-ui.version>4.1.3</dependency.swagger-ui.version>
|
||||
<dependency.swagger-parser.version>1.0.67</dependency.swagger-parser.version>
|
||||
<dependency.maven-filtering.version>3.1.1</dependency.maven-filtering.version>
|
||||
<dependency.maven-artifact.version>3.8.6</dependency.maven-artifact.version>
|
||||
@@ -111,17 +110,14 @@
|
||||
<dependency.java-ee-activation.version>1.2.0</dependency.java-ee-activation.version>
|
||||
<dependency.jakarta-ee-json-api.version>2.1.2</dependency.jakarta-ee-json-api.version>
|
||||
<dependency.jakarta-ee-json-impl.version>1.1.4</dependency.jakarta-ee-json-impl.version>
|
||||
<dependency.jakarta-json-path.version>2.8.0</dependency.jakarta-json-path.version>
|
||||
<dependency.jakarta-json-path.version>2.9.0</dependency.jakarta-json-path.version>
|
||||
<dependency.json-smart.version>2.5.0</dependency.json-smart.version>
|
||||
<alfresco.googledrive.version>4.0.0</alfresco.googledrive.version>
|
||||
<alfresco.aos-module.version>2.0.0</alfresco.aos-module.version>
|
||||
<alfresco.api-explorer.version>23.1.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||
<alfresco.googledrive.version>4.1.0</alfresco.googledrive.version>
|
||||
<alfresco.aos-module.version>3.0.0</alfresco.aos-module.version>
|
||||
<alfresco.api-explorer.version>23.2.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||
|
||||
<alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
|
||||
<license-maven-plugin.version>2.0.1</license-maven-plugin.version>
|
||||
<spotless-plugin.version>2.43.0</spotless-plugin.version>
|
||||
<!-- Do not match any files by default, but this can be overridden from the command line. -->
|
||||
<spotless-include-list>NO_AUTOMATED_FORMATTING</spotless-include-list>
|
||||
|
||||
<dependency.postgresql.version>42.6.0</dependency.postgresql.version>
|
||||
<dependency.mysql.version>8.0.30</dependency.mysql.version>
|
||||
@@ -155,7 +151,7 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||
<tag>HEAD</tag>
|
||||
<tag>23.3.0.13</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -332,7 +328,7 @@
|
||||
<dependency>
|
||||
<groupId>xalan</groupId>
|
||||
<artifactId>xalan</artifactId>
|
||||
<version>2.7.2-alfresco</version>
|
||||
<version>2.7.3-alfresco</version>
|
||||
<exclusions>
|
||||
<!-- [ACS-544] Excluded to avoid conflict in JDK9+ as it includes javax.xml and w3c.org -->
|
||||
<exclusion>
|
||||
@@ -465,7 +461,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
<version>5.1.1</version>
|
||||
<version>5.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
@@ -653,17 +649,17 @@
|
||||
<!-- Enforce newer version -->
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15to18</artifactId>
|
||||
<artifactId>bcprov-jdk18on</artifactId>
|
||||
<version>${dependency.bouncycastle.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcmail-jdk15to18</artifactId>
|
||||
<artifactId>bcmail-jdk18on</artifactId>
|
||||
<version>${dependency.bouncycastle.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcpkix-jdk15to18</artifactId>
|
||||
<artifactId>bcpkix-jdk18on</artifactId>
|
||||
<version>${dependency.bouncycastle.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -1039,10 +1035,9 @@
|
||||
</goals>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<failOnMissing>true</failOnMissing>
|
||||
<excludedScopes>provided,test</excludedScopes>
|
||||
<excludedGroups>^(org\.alfresco|com\.alfresco|org\.activiti).*</excludedGroups>
|
||||
<failIfWarning>true</failIfWarning>
|
||||
<failOnMissing>true</failOnMissing>
|
||||
<includedLicenses>
|
||||
https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/includedLicenses.txt
|
||||
</includedLicenses>
|
||||
@@ -1115,10 +1110,10 @@
|
||||
<exclude>com.sun.xml.bind</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>org.bouncycastle:bcprov-jdk15to18:[1.74,)</include>
|
||||
<include>org.bouncycastle:bcmail-jdk15to18:[1.74,)</include>
|
||||
<include>org.bouncycastle:bcpkix-jdk15to18:[1.74,)</include>
|
||||
<include>org.bouncycastle:bcutil-jdk15to18:[1.74,)</include>
|
||||
<include>org.bouncycastle:bcprov-jdk18on:[1.77,)</include>
|
||||
<include>org.bouncycastle:bcmail-jdk18on:[1.77,)</include>
|
||||
<include>org.bouncycastle:bcpkix-jdk18on:[1.77,)</include>
|
||||
<include>org.bouncycastle:bcutil-jdk18on:[1.77,)</include>
|
||||
</includes>
|
||||
</bannedDependencies>
|
||||
</rules>
|
||||
@@ -1127,26 +1122,6 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.diffplug.spotless</groupId>
|
||||
<artifactId>spotless-maven-plugin</artifactId>
|
||||
<version>${spotless-plugin.version}</version>
|
||||
<configuration>
|
||||
<java>
|
||||
<includes>
|
||||
${spotless-include-list}
|
||||
</includes>
|
||||
<eclipse>
|
||||
<file>alfresco-formatter.xml</file>
|
||||
</eclipse>
|
||||
<importOrder>
|
||||
<order>\#java|\#javax|\#jakarta,\#,\#org.alfresco,java|javax|jakarta,,org.alfresco</order>
|
||||
</importOrder>
|
||||
<removeUnusedImports />
|
||||
<formatAnnotations />
|
||||
</java>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
@@ -1158,10 +1133,6 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.diffplug.spotless</groupId>
|
||||
<artifactId>spotless-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>23.1.1.13-SNAPSHOT</version>
|
||||
<version>23.3.0.13</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@@ -45,7 +45,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.santuario</groupId>
|
||||
<artifactId>xmlsec</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
<!-- newer version, see REPO-3133 -->
|
||||
<dependency>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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
|
||||
@@ -57,7 +57,7 @@ public class ServerStatusWebScript extends AbstractWebScript implements Applicat
|
||||
// hence providing ability for subsystem to be disabled (whilst still supporting ability to check status and/or dynamically start via JMX)
|
||||
String isEnabled = (String)subsystem.getProperty("imap.server.enabled");
|
||||
|
||||
if (new Boolean(isEnabled).booleanValue())
|
||||
if (Boolean.valueOf(isEnabled).booleanValue())
|
||||
{
|
||||
res.getWriter().write("enabled");
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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
|
||||
@@ -109,7 +109,7 @@ public class KeywordSearch extends DeclarativeWebScript
|
||||
int startPage = 1;
|
||||
try
|
||||
{
|
||||
startPage = new Integer(startPageArg);
|
||||
startPage = Integer.valueOf(startPageArg);
|
||||
}
|
||||
catch(NumberFormatException e)
|
||||
{
|
||||
@@ -119,7 +119,7 @@ public class KeywordSearch extends DeclarativeWebScript
|
||||
int itemsPerPage = DEFAULT_ITEMS_PER_PAGE;
|
||||
try
|
||||
{
|
||||
itemsPerPage = new Integer(itemsPerPageArg);
|
||||
itemsPerPage = Integer.valueOf(itemsPerPageArg);
|
||||
}
|
||||
catch(NumberFormatException e)
|
||||
{
|
||||
|
@@ -133,7 +133,7 @@ public class QuickShareThumbnailContentGet extends QuickShareContentGet
|
||||
String phString = req.getParameter("ph");
|
||||
if (phString != null)
|
||||
{
|
||||
ph = new Boolean(phString);
|
||||
ph = Boolean.valueOf(phString);
|
||||
}
|
||||
|
||||
Scriptable scope = new BaseScopableProcessorExtension().getScope(); // note: required for ValueConverter (collection)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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
|
||||
@@ -149,7 +149,7 @@ public class PatchThumbnailsAsRenditionsGet extends DeclarativeWebScript
|
||||
}
|
||||
|
||||
Map<String, Object> model = new HashMap<String, Object>();
|
||||
model.put("patchedNodeCount", new Long(patchedNodeRefs));
|
||||
model.put("patchedNodeCount", Long.valueOf(patchedNodeRefs));
|
||||
|
||||
return model;
|
||||
}
|
||||
|
@@ -34,6 +34,7 @@ import org.alfresco.repo.management.subsystems.ActivateableBean;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.external.AdminConsoleAuthenticator;
|
||||
import org.alfresco.repo.security.authentication.external.RemoteUserMapper;
|
||||
import org.alfresco.repo.web.auth.AuthenticationListener;
|
||||
import org.alfresco.repo.web.auth.TicketCredentials;
|
||||
@@ -67,16 +68,18 @@ import java.util.Set;
|
||||
*/
|
||||
public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactory
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(RemoteUserAuthenticatorFactory.class);
|
||||
private static final Log LOGGER = LogFactory.getLog(RemoteUserAuthenticatorFactory.class);
|
||||
public static final long GET_REMOTE_USER_TIMEOUT_MILLISECONDS_DEFAULT = 10000L; // 10 sec
|
||||
|
||||
protected RemoteUserMapper remoteUserMapper;
|
||||
protected AuthenticationComponent authenticationComponent;
|
||||
protected AdminConsoleAuthenticator adminConsoleAuthenticator;
|
||||
|
||||
private boolean alwaysAllowBasicAuthForAdminConsole = true;
|
||||
List<String> adminConsoleScriptFamilies;
|
||||
long getRemoteUserTimeoutMilliseconds = GET_REMOTE_USER_TIMEOUT_MILLISECONDS_DEFAULT;
|
||||
|
||||
|
||||
public void setRemoteUserMapper(RemoteUserMapper remoteUserMapper)
|
||||
{
|
||||
this.remoteUserMapper = remoteUserMapper;
|
||||
@@ -117,6 +120,12 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
this.getRemoteUserTimeoutMilliseconds = getRemoteUserTimeoutMilliseconds;
|
||||
}
|
||||
|
||||
public void setAdminConsoleAuthenticator(
|
||||
AdminConsoleAuthenticator adminConsoleAuthenticator)
|
||||
{
|
||||
this.adminConsoleAuthenticator = adminConsoleAuthenticator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Authenticator create(WebScriptServletRequest req, WebScriptServletResponse res)
|
||||
{
|
||||
@@ -140,36 +149,46 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
{
|
||||
boolean authenticated = false;
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
if (LOGGER.isTraceEnabled())
|
||||
{
|
||||
logger.trace("Authenticate level required: " + required + " is guest: " + isGuest);
|
||||
LOGGER.trace("Authenticate level required: " + required + " is guest: " + isGuest);
|
||||
}
|
||||
|
||||
String userId = null;
|
||||
if (isRemoteUserMapperActive())
|
||||
{
|
||||
if (isAlwaysAllowBasicAuthForAdminConsole())
|
||||
{
|
||||
final boolean useTimeoutForAdminAccessingAdminConsole = shouldUseTimeoutForAdminAccessingAdminConsole(required, isGuest);
|
||||
|
||||
if (useTimeoutForAdminAccessingAdminConsole && isBasicAuthHeaderPresentForAdmin())
|
||||
{
|
||||
return callBasicAuthForAdminConsoleAccess(required, isGuest);
|
||||
}
|
||||
try
|
||||
{
|
||||
userId = getRemoteUserWithTimeout(useTimeoutForAdminAccessingAdminConsole);
|
||||
}
|
||||
catch (AuthenticationTimeoutException e)
|
||||
{
|
||||
//return basic auth challenge
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (servletReq.getServiceMatch() != null &&
|
||||
isAdminConsoleWebScript(servletReq.getServiceMatch().getWebScript()) && isAdminConsoleAuthenticatorActive())
|
||||
{
|
||||
// retrieve the remote user if configured and available - authenticate that user directly
|
||||
userId = getRemoteUser();
|
||||
userId = getAdminConsoleUser();
|
||||
}
|
||||
|
||||
if (userId == null)
|
||||
{
|
||||
if (isAlwaysAllowBasicAuthForAdminConsole())
|
||||
{
|
||||
final boolean useTimeoutForAdminAccessingAdminConsole = shouldUseTimeoutForAdminAccessingAdminConsole(required, isGuest);
|
||||
|
||||
if (useTimeoutForAdminAccessingAdminConsole && isBasicAuthHeaderPresentForAdmin())
|
||||
{
|
||||
return callBasicAuthForAdminConsoleAccess(required, isGuest);
|
||||
}
|
||||
try
|
||||
{
|
||||
userId = getRemoteUserWithTimeout(useTimeoutForAdminAccessingAdminConsole);
|
||||
}
|
||||
catch (AuthenticationTimeoutException e)
|
||||
{
|
||||
//return basic auth challenge
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// retrieve the remote user if configured and available - authenticate that user directly
|
||||
userId = getRemoteUser();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,9 +227,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
{
|
||||
// Validate the ticket for the current SessionUser
|
||||
authenticationService.validate(user.getTicket());
|
||||
if (logger.isDebugEnabled())
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Ticket is valid. Retaining cached user in session.");
|
||||
LOGGER.debug("Ticket is valid. Retaining cached user in session.");
|
||||
}
|
||||
listener.userAuthenticated(new TicketCredentials(user.getTicket()));
|
||||
authenticated = true;
|
||||
@@ -222,9 +241,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
}
|
||||
catch (AuthenticationException authErr)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
logger.debug("An Authentication error occur. Removing User session.", authErr);
|
||||
LOGGER.debug("An Authentication error occur. Removing User session.", authErr);
|
||||
}
|
||||
session.removeAttribute(AuthenticationDriver.AUTHENTICATION_USER);
|
||||
session.invalidate();
|
||||
@@ -236,15 +255,20 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
authenticated = super.authenticate(required, isGuest);
|
||||
}
|
||||
}
|
||||
if(!authenticated && servletReq.getServiceMatch() != null &&
|
||||
isAdminConsoleWebScript(servletReq.getServiceMatch().getWebScript()) && isAdminConsoleAuthenticatorActive())
|
||||
{
|
||||
adminConsoleAuthenticator.requestAuthentication(this.servletReq.getHttpServletRequest(), this.servletRes.getHttpServletResponse());
|
||||
}
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
private boolean callBasicAuthForAdminConsoleAccess(RequiredAuthentication required, boolean isGuest)
|
||||
{
|
||||
// return REST call, after a timeout/basic auth challenge
|
||||
if (logger.isTraceEnabled())
|
||||
if (LOGGER.isTraceEnabled())
|
||||
{
|
||||
logger.trace("An Admin Console request has come in with Basic Auth headers present for an admin user.");
|
||||
LOGGER.trace("An Admin Console request has come in with Basic Auth headers present for an admin user.");
|
||||
}
|
||||
// In order to prompt for another password, in case it was not entered correctly,
|
||||
// the output of this method should be returned by the calling "authenticate" method;
|
||||
@@ -258,9 +282,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
boolean useTimeoutForAdminAccessingAdminConsole = RequiredAuthentication.admin.equals(required) && !isGuest &&
|
||||
servletReq.getServiceMatch() != null && isAdminConsoleWebScript(servletReq.getServiceMatch().getWebScript());
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
if (LOGGER.isTraceEnabled())
|
||||
{
|
||||
logger.trace("Should ensure that the admins can login with basic auth: " + useTimeoutForAdminAccessingAdminConsole);
|
||||
LOGGER.trace("Should ensure that the admins can login with basic auth: " + useTimeoutForAdminAccessingAdminConsole);
|
||||
}
|
||||
return useTimeoutForAdminAccessingAdminConsole;
|
||||
}
|
||||
@@ -270,6 +294,11 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
return remoteUserMapper != null && (!(remoteUserMapper instanceof ActivateableBean) || ((ActivateableBean) remoteUserMapper).isActive());
|
||||
}
|
||||
|
||||
private boolean isAdminConsoleAuthenticatorActive()
|
||||
{
|
||||
return adminConsoleAuthenticator != null && (!(adminConsoleAuthenticator instanceof ActivateableBean) || ((ActivateableBean) adminConsoleAuthenticator).isActive());
|
||||
}
|
||||
|
||||
protected boolean isAdminConsoleWebScript(WebScript webScript)
|
||||
{
|
||||
if (webScript == null || adminConsoleScriptFamilies == null || webScript.getDescription() == null
|
||||
@@ -278,9 +307,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
return false;
|
||||
}
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
if (LOGGER.isTraceEnabled())
|
||||
{
|
||||
logger.trace("WebScript: " + webScript + " has these families: " + webScript.getDescription().getFamilys());
|
||||
LOGGER.trace("WebScript: " + webScript + " has these families: " + webScript.getDescription().getFamilys());
|
||||
}
|
||||
|
||||
// intersect the "family" sets defined
|
||||
@@ -288,9 +317,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
families.retainAll(adminConsoleScriptFamilies);
|
||||
final boolean isAdminConsole = !families.isEmpty();
|
||||
|
||||
if (logger.isTraceEnabled() && isAdminConsole)
|
||||
if (LOGGER.isTraceEnabled() && isAdminConsole)
|
||||
{
|
||||
logger.trace("Detected an Admin Console webscript: " + webScript );
|
||||
LOGGER.trace("Detected an Admin Console webscript: " + webScript);
|
||||
}
|
||||
|
||||
return isAdminConsole;
|
||||
@@ -316,7 +345,7 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.warn("Exception trying to get the remote user: " + e.getMessage(), e);
|
||||
LOGGER.warn("Exception trying to get the remote user: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
returnedRemoteUser = getRemoteUserRunnable.getReturnedRemoteUser();
|
||||
@@ -330,9 +359,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
final String message = "Could not get the remote user in a reasonable time: " + getRemoteUserTimeoutMilliseconds + " milliseconds. "
|
||||
+ "Adjust the timeout property 'authentication.getRemoteUserTimeoutMilliseconds' if required.";
|
||||
|
||||
if (logger.isWarnEnabled())
|
||||
if (LOGGER.isWarnEnabled())
|
||||
{
|
||||
logger.warn("Returning basic auth challenge for Admin Console. Cause: " + message);
|
||||
LOGGER.warn("Returning basic auth challenge for Admin Console. Cause: " + message);
|
||||
}
|
||||
HttpServletResponse res = servletRes.getHttpServletResponse();
|
||||
res.setStatus(401);
|
||||
@@ -379,15 +408,29 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
||||
|
||||
private void logRemoteUserID(String userId)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
String message = (userId == null) ?
|
||||
"No external user ID in request." :
|
||||
"Extracted external user ID from request: " + AuthenticationUtil.maskUsername(userId);
|
||||
logger.debug(message);
|
||||
LOGGER.debug(message);
|
||||
}
|
||||
}
|
||||
|
||||
protected String getAdminConsoleUser()
|
||||
{
|
||||
String userId = null;
|
||||
|
||||
if (isRemoteUserMapperActive())
|
||||
{
|
||||
userId = adminConsoleAuthenticator.getAdminConsoleUser(this.servletReq.getHttpServletRequest(), this.servletRes.getHttpServletResponse());
|
||||
}
|
||||
|
||||
logRemoteUserID(userId);
|
||||
|
||||
return userId;
|
||||
}
|
||||
|
||||
class GetRemoteUserRunnable implements Runnable
|
||||
{
|
||||
private volatile String returnedRemoteUser;
|
||||
|
@@ -175,6 +175,10 @@ public class NodesMetaDataGet extends DeclarativeWebScript
|
||||
{
|
||||
filter.setIncludeChildIds(o.getBoolean("includeChildIds"));
|
||||
}
|
||||
if(o.has("includeChildAssociations"))
|
||||
{
|
||||
filter.setIncludeChildAssociations(o.getBoolean("includeChildAssociations"));
|
||||
}
|
||||
if(o.has("includeTxnId"))
|
||||
{
|
||||
filter.setIncludeTxnId(o.getBoolean("includeTxnId"));
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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
|
||||
@@ -165,7 +165,7 @@ public class Paging
|
||||
{
|
||||
try
|
||||
{
|
||||
pageNo = new Integer(strPageNo);
|
||||
pageNo = Integer.valueOf(strPageNo);
|
||||
}
|
||||
catch(NumberFormatException e) {};
|
||||
}
|
||||
@@ -177,7 +177,7 @@ public class Paging
|
||||
{
|
||||
try
|
||||
{
|
||||
pageSize = new Integer(strPageSize);
|
||||
pageSize = Integer.valueOf(strPageSize);
|
||||
}
|
||||
catch(NumberFormatException e) {};
|
||||
}
|
||||
@@ -189,7 +189,7 @@ public class Paging
|
||||
{
|
||||
try
|
||||
{
|
||||
skipCount = new Integer(strSkipCount);
|
||||
skipCount = Integer.valueOf(strSkipCount);
|
||||
}
|
||||
catch(NumberFormatException e) {};
|
||||
}
|
||||
@@ -201,7 +201,7 @@ public class Paging
|
||||
{
|
||||
try
|
||||
{
|
||||
maxItems = new Integer(strMaxItems);
|
||||
maxItems = Integer.valueOf(strMaxItems);
|
||||
}
|
||||
catch(NumberFormatException e) {};
|
||||
}
|
||||
|
@@ -351,7 +351,7 @@ public class WebDAV
|
||||
}
|
||||
else if (davPropName.equals(WebDAV.XML_GET_CONTENT_LENGTH))
|
||||
{
|
||||
value = new Long(contentData.getSize());
|
||||
value = Long.valueOf(contentData.getSize());
|
||||
}
|
||||
}
|
||||
return value;
|
||||
|
@@ -40,8 +40,10 @@ public interface Groups
|
||||
{
|
||||
String PARAM_ID = "id";
|
||||
String PARAM_DISPLAY_NAME = "displayName";
|
||||
String PARAM_INCLUDE_DESCRIPTION = "description";
|
||||
String PARAM_INCLUDE_PARENT_IDS = "parentIds";
|
||||
String PARAM_INCLUDE_ZONES = "zones";
|
||||
String PARAM_INCLUDE_HAS_SUBGROUPS = "hasSubgroups";
|
||||
String PARAM_IS_ROOT = "isRoot";
|
||||
String PARAM_CASCADE = "cascade";
|
||||
String PARAM_MEMBER_TYPE = "memberType";
|
||||
|
@@ -109,11 +109,11 @@ public class NetworkWebScriptGet extends ApiWebScript implements ResponseWriter
|
||||
}
|
||||
catch (ApiException | WebScriptException apiException)
|
||||
{
|
||||
renderException(apiException, res, assistant);
|
||||
renderException(apiException, res, req, assistant);
|
||||
}
|
||||
catch (RuntimeException runtimeException)
|
||||
{
|
||||
renderException(runtimeException, res, assistant);
|
||||
renderException(runtimeException, res, req, assistant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -118,11 +118,11 @@ public class NetworksWebScriptGet extends ApiWebScript implements RecognizedPara
|
||||
}
|
||||
catch (ApiException | WebScriptException apiException)
|
||||
{
|
||||
renderException(apiException, res, assistant);
|
||||
renderException(apiException, res, req, assistant);
|
||||
}
|
||||
catch (RuntimeException runtimeException)
|
||||
{
|
||||
renderException(runtimeException, res, assistant);
|
||||
renderException(runtimeException, res, req, assistant);
|
||||
}
|
||||
}
|
||||
}
|
@@ -143,7 +143,7 @@ public class PublicApiTenantWebScriptServletRuntime extends TenantWebScriptServl
|
||||
else
|
||||
{
|
||||
try {
|
||||
renderException((Exception)exception, response, apiAssistant);
|
||||
renderException((Exception)exception, response, request, apiAssistant);
|
||||
} catch (IOException e) {
|
||||
logger.error("Internal error", e);
|
||||
throw new WebScriptException("Internal error", e);
|
||||
|
@@ -27,6 +27,7 @@ package org.alfresco.rest.api.impl;
|
||||
|
||||
import static org.alfresco.repo.security.authentication.AuthenticationUtil.runAsSystem;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.Collator;
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
@@ -40,6 +41,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.query.CannedQueryPageDetails;
|
||||
import org.alfresco.query.EmptyPagingResults;
|
||||
import org.alfresco.query.PagingRequest;
|
||||
@@ -71,8 +73,10 @@ import org.alfresco.rest.workflow.api.impl.MapBasedQueryWalkerOrSupported;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.service.cmr.security.AuthorityType;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.AlfrescoCollator;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
@@ -101,9 +105,9 @@ public class GroupsImpl implements Groups
|
||||
}
|
||||
|
||||
// List groups filtering (via where clause)
|
||||
private final static Set<String> LIST_GROUPS_EQUALS_QUERY_PROPERTIES = new HashSet<>(Arrays.asList(new String[] { PARAM_IS_ROOT }));
|
||||
private final static Set<String> LIST_GROUPS_EQUALS_QUERY_PROPERTIES = new HashSet<>(List.of(PARAM_IS_ROOT));
|
||||
|
||||
private final static Set<String> LIST_GROUP_MEMBERS_QUERY_PROPERTIES = new HashSet<>(Arrays.asList(new String[] { PARAM_MEMBER_TYPE }));
|
||||
private final static Set<String> LIST_GROUP_MEMBERS_QUERY_PROPERTIES = new HashSet<>(List.of(PARAM_MEMBER_TYPE));
|
||||
|
||||
protected AuthorityService authorityService;
|
||||
private AuthorityDAO authorityDAO;
|
||||
@@ -142,7 +146,12 @@ public class GroupsImpl implements Groups
|
||||
authorityDisplayName = group.getDisplayName();
|
||||
}
|
||||
|
||||
String authority = authorityService.createAuthority(AuthorityType.GROUP, group.getId(), authorityDisplayName, authorityZones);
|
||||
Map<QName, Serializable> props = new HashMap<>();
|
||||
if (group.getDescription() != null)
|
||||
{
|
||||
props.put(ContentModel.PROP_DESCRIPTION, group.getDescription());
|
||||
}
|
||||
String authority = authorityService.createAuthority(AuthorityType.GROUP, group.getId(), authorityDisplayName, authorityZones, props);
|
||||
|
||||
// Set a given child authority to be included by the given parent
|
||||
// authorities.
|
||||
@@ -161,7 +170,14 @@ public class GroupsImpl implements Groups
|
||||
|
||||
try
|
||||
{
|
||||
authorityService.setAuthorityDisplayName(groupId, group.getDisplayName());
|
||||
if (group.getDescription() != null)
|
||||
{
|
||||
authorityService.setAuthorityDisplayNameAndDescription(groupId, group.getDisplayName(), group.getDescription());
|
||||
}
|
||||
else
|
||||
{
|
||||
authorityService.setAuthorityDisplayName(groupId, group.getDisplayName());
|
||||
}
|
||||
}
|
||||
catch (AuthorityException ae)
|
||||
{
|
||||
@@ -173,10 +189,10 @@ public class GroupsImpl implements Groups
|
||||
|
||||
public Group getGroup(String groupId, Parameters parameters) throws EntityNotFoundException
|
||||
{
|
||||
AuthorityInfo authorityInfo = getAuthorityInfo(groupId);
|
||||
final List<String> includeParam = parameters.getInclude();
|
||||
AuthorityInfo authorityInfo = getAuthorityInfo(groupId, includeParam.contains(PARAM_INCLUDE_DESCRIPTION));
|
||||
|
||||
final Set<String> rootAuthorities = getAllRootAuthorities(AuthorityType.GROUP);
|
||||
final List<String> includeParam = parameters.getInclude();
|
||||
|
||||
return getGroup(authorityInfo, includeParam, rootAuthorities);
|
||||
}
|
||||
@@ -196,7 +212,7 @@ public class GroupsImpl implements Groups
|
||||
PagingResults<AuthorityInfo> pagingResult;
|
||||
try
|
||||
{
|
||||
pagingResult = getAuthoritiesInfo(authorityType, groupsFilters, rootAuthorities, sortProp, paging);
|
||||
pagingResult = getAuthoritiesInfo(authorityType, groupsFilters, rootAuthorities, sortProp, paging, parameters.getInclude().contains(PARAM_INCLUDE_DESCRIPTION));
|
||||
}
|
||||
catch (UnknownAuthorityException e)
|
||||
{
|
||||
@@ -213,7 +229,7 @@ public class GroupsImpl implements Groups
|
||||
|
||||
private List<Group> createGroupsResponse(final List<AuthorityInfo> page, final List<String> includeParam, final Set<String> rootAuthorities)
|
||||
{
|
||||
List<Group> groups = new AbstractList<Group>()
|
||||
List<Group> groups = new AbstractList<>()
|
||||
{
|
||||
@Override
|
||||
public Group get(int index)
|
||||
@@ -336,7 +352,7 @@ public class GroupsImpl implements Groups
|
||||
filter(a -> a.startsWith(AuthorityType.GROUP.getPrefixString())).
|
||||
filter(a -> isRootPredicate(finalIsRootParam, rootAuthorities, a)).
|
||||
filter(a -> zonePredicate(a, finalZoneFilter)).
|
||||
map(this::getAuthorityInfo).
|
||||
map(a -> getAuthorityInfo(a, includeParam.contains(PARAM_INCLUDE_DESCRIPTION))).
|
||||
sorted(new AuthorityInfoComparator(sortProp.getFirst(), sortProp.getSecond())).
|
||||
collect(Collectors.toList());
|
||||
|
||||
@@ -355,23 +371,25 @@ public class GroupsImpl implements Groups
|
||||
}
|
||||
|
||||
private PagingResults<AuthorityInfo> getAuthoritiesInfo(AuthorityType authorityType, GroupsFilter groupsFilter, Set<String> rootAuthorities,
|
||||
Pair<String, Boolean> sortProp, Paging paging)
|
||||
Pair<String, Boolean> sortProp, Paging paging, boolean includeDescription)
|
||||
{
|
||||
Boolean isRootParam = groupsFilter.getIsRoot();
|
||||
String zoneFilter = groupsFilter.getZoneFilter();
|
||||
String displayNameFilter = groupsFilter.getDisplayNameFilter();
|
||||
PagingResults<AuthorityInfo> pagingResult;
|
||||
|
||||
if (isRootParam != null || displayNameFilter != null)
|
||||
// Don't use canned queries when fetching authorities with description
|
||||
// if better performance is requested for loading descriptions we can add canned queries in the future
|
||||
if (isRootParam != null || displayNameFilter != null || includeDescription)
|
||||
{
|
||||
List<AuthorityInfo> groupList;
|
||||
|
||||
if (isRootParam != null && isRootParam)
|
||||
if ((isRootParam != null && isRootParam) || includeDescription)
|
||||
{
|
||||
// Limit the post processing work by using the already loaded
|
||||
// list of root authorities.
|
||||
List<AuthorityInfo> authorities = rootAuthorities.stream().
|
||||
map(this::getAuthorityInfo).
|
||||
map(auth -> getAuthorityInfo(auth, includeDescription)).
|
||||
filter(auth -> zonePredicate(auth.getAuthorityName(), zoneFilter)).
|
||||
filter(auth -> displayNamePredicate(auth.getAuthorityDisplayName(), displayNameFilter)).
|
||||
collect(Collectors.toList());
|
||||
@@ -526,9 +544,9 @@ public class GroupsImpl implements Groups
|
||||
* The authority name.
|
||||
* @return The authority info.
|
||||
*/
|
||||
private AuthorityInfo getAuthorityInfo(String id)
|
||||
private AuthorityInfo getAuthorityInfo(String id, boolean includeDescription)
|
||||
{
|
||||
return getAuthorityInfo(id, false);
|
||||
return getAuthorityInfo(id, includeDescription, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -537,11 +555,13 @@ public class GroupsImpl implements Groups
|
||||
*
|
||||
* @param id
|
||||
* The authority name.
|
||||
* @param includeDescription
|
||||
* True if description should be loaded
|
||||
* @param defaultDisplayNameIfNull
|
||||
* True if we would like to get a default value (e.g. shortName of the authority) if the authority display name is null.
|
||||
* @return The authority info.
|
||||
*/
|
||||
private AuthorityInfo getAuthorityInfo(String id, boolean defaultDisplayNameIfNull)
|
||||
private AuthorityInfo getAuthorityInfo(String id, boolean includeDescription, boolean defaultDisplayNameIfNull)
|
||||
{
|
||||
if (id == null || id.isEmpty())
|
||||
{
|
||||
@@ -554,9 +574,20 @@ public class GroupsImpl implements Groups
|
||||
throw new EntityNotFoundException(id);
|
||||
}
|
||||
|
||||
String authorityDisplayName = getAuthorityDisplayName(id, defaultDisplayNameIfNull);
|
||||
String authorityDisplayName;
|
||||
String description = null;
|
||||
|
||||
return new AuthorityInfo(null, authorityDisplayName, id);
|
||||
if (includeDescription)
|
||||
{
|
||||
Pair<String, String> displayNameAndDescription = getAuthorityDisplayNameAndDescription(id, defaultDisplayNameIfNull);
|
||||
authorityDisplayName = displayNameAndDescription.getFirst();
|
||||
description = displayNameAndDescription.getSecond();
|
||||
}
|
||||
else
|
||||
{
|
||||
authorityDisplayName = getAuthorityDisplayName(id, defaultDisplayNameIfNull);
|
||||
}
|
||||
return new AuthorityInfo(null, authorityDisplayName, id, description);
|
||||
}
|
||||
|
||||
private String getAuthorityDisplayName(String id, boolean defaultDisplayNameIfNull)
|
||||
@@ -564,6 +595,11 @@ public class GroupsImpl implements Groups
|
||||
return defaultDisplayNameIfNull ? authorityService.getAuthorityDisplayName(id) : authorityDAO.getAuthorityDisplayName(id);
|
||||
}
|
||||
|
||||
private Pair<String, String> getAuthorityDisplayNameAndDescription(String id, boolean defaultDisplayNameIfNull)
|
||||
{
|
||||
return defaultDisplayNameIfNull ? authorityService.getAuthorityDisplayNameAndDescription(id) : authorityDAO.getAuthorityDisplayNameAndDescription(id);
|
||||
}
|
||||
|
||||
private Group getGroup(AuthorityInfo authorityInfo, List<String> includeParam, Set<String> rootAuthorities)
|
||||
{
|
||||
if (authorityInfo == null)
|
||||
@@ -576,13 +612,23 @@ public class GroupsImpl implements Groups
|
||||
|
||||
// REPO-1743
|
||||
String authorityDisplayName = authorityInfo.getAuthorityDisplayName();
|
||||
String description = authorityInfo.getDescription();
|
||||
if (authorityDisplayName == null || authorityDisplayName.isEmpty())
|
||||
{
|
||||
authorityDisplayName = authorityService.getAuthorityDisplayName(authorityInfo.getAuthorityName());
|
||||
if (includeParam != null && includeParam.contains(PARAM_INCLUDE_DESCRIPTION))
|
||||
{
|
||||
Pair<String, String> displayNameAndDescription = authorityService.getAuthorityDisplayNameAndDescription(authorityInfo.getAuthorityName());
|
||||
authorityDisplayName = displayNameAndDescription.getFirst();
|
||||
description = displayNameAndDescription.getSecond();
|
||||
}
|
||||
else
|
||||
{
|
||||
authorityDisplayName = authorityService.getAuthorityDisplayName(authorityInfo.getAuthorityName());
|
||||
}
|
||||
}
|
||||
|
||||
group.setDisplayName(authorityDisplayName);
|
||||
|
||||
group.setDescription(description);
|
||||
group.setIsRoot(isRootAuthority(rootAuthorities, authorityInfo.getAuthorityName()));
|
||||
|
||||
// Optionally include
|
||||
@@ -606,6 +652,19 @@ public class GroupsImpl implements Groups
|
||||
Set<String> authorityZones = authorityService.getAuthorityZones(authorityInfo.getAuthorityName());
|
||||
group.setZones(authorityZones);
|
||||
}
|
||||
|
||||
if (includeParam.contains(PARAM_INCLUDE_HAS_SUBGROUPS))
|
||||
{
|
||||
Set<String> containedAuthorities;
|
||||
try
|
||||
{
|
||||
containedAuthorities = authorityService.getContainedAuthorities(AuthorityType.GROUP, authorityInfo.getAuthorityName(), true);
|
||||
} catch (UnknownAuthorityException e)
|
||||
{
|
||||
containedAuthorities = Collections.emptySet();
|
||||
}
|
||||
group.setHasSubgroups(CollectionUtils.isNotEmpty(containedAuthorities));
|
||||
}
|
||||
}
|
||||
|
||||
return group;
|
||||
@@ -621,7 +680,7 @@ public class GroupsImpl implements Groups
|
||||
Pair<String, Boolean> sortProp;
|
||||
List<SortColumn> sortCols = parameters.getSorting();
|
||||
|
||||
if ((sortCols != null) && (sortCols.size() > 0))
|
||||
if (sortCols != null && !sortCols.isEmpty())
|
||||
{
|
||||
if (sortCols.size() > 1)
|
||||
{
|
||||
@@ -636,7 +695,7 @@ public class GroupsImpl implements Groups
|
||||
throw new InvalidArgumentException("Invalid sort field: " + sortCol.column);
|
||||
}
|
||||
|
||||
sortProp = new Pair<>(sortPropName, (sortCol.asc ? Boolean.TRUE : Boolean.FALSE));
|
||||
sortProp = new Pair<>(sortPropName, sortCol.asc ? Boolean.TRUE : Boolean.FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -851,7 +910,6 @@ public class GroupsImpl implements Groups
|
||||
validateGroupMemberId(groupMemberId);
|
||||
|
||||
// Verify if groupMemberId is member of groupId
|
||||
AuthorityType authorityType = AuthorityType.getAuthorityType(groupMemberId);
|
||||
Set<String> parents = authorityService.getContainingAuthorities(AuthorityType.GROUP, groupMemberId, true);
|
||||
if (!parents.contains(groupId))
|
||||
{
|
||||
@@ -894,7 +952,7 @@ public class GroupsImpl implements Groups
|
||||
}
|
||||
|
||||
List<AuthorityInfo> authorityInfoList = new ArrayList<>(authorities.size());
|
||||
authorityInfoList.addAll(authorities.stream().map(this::getAuthorityInfo).collect(Collectors.toList()));
|
||||
authorityInfoList.addAll(authorities.stream().map(auth -> getAuthorityInfo(auth, false)).collect(Collectors.toList()));
|
||||
|
||||
// Post process sorting - this should be moved to service
|
||||
// layer. It is done here because sorting is not supported at
|
||||
@@ -943,7 +1001,7 @@ public class GroupsImpl implements Groups
|
||||
|
||||
private GroupMember getGroupMember(String authorityId)
|
||||
{
|
||||
AuthorityInfo authorityInfo = getAuthorityInfo(authorityId);
|
||||
AuthorityInfo authorityInfo = getAuthorityInfo(authorityId, false);
|
||||
|
||||
return getGroupMember(authorityInfo);
|
||||
}
|
||||
@@ -1014,6 +1072,10 @@ public class GroupsImpl implements Groups
|
||||
{
|
||||
throw new InvalidArgumentException("Group update does not support field: zones");
|
||||
}
|
||||
if (group.wasSet(Group.HAS_SUBGROUPS))
|
||||
{
|
||||
throw new InvalidArgumentException("Group update does not support field: hasSubgroups");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1054,7 +1116,7 @@ public class GroupsImpl implements Groups
|
||||
{
|
||||
String name = inferPrefix ? authorityService.getName(authorityType, authorityName) : authorityName;
|
||||
|
||||
return (name != null && authorityService.authorityExists(name));
|
||||
return name != null && authorityService.authorityExists(name);
|
||||
}
|
||||
|
||||
private boolean isGroupAuthority(String authorityName)
|
||||
|
@@ -42,7 +42,9 @@ public class Group implements Comparable<Group>
|
||||
|
||||
protected String id; // group id (aka authority name)
|
||||
protected String displayName;
|
||||
protected String description;
|
||||
protected Boolean isRoot;
|
||||
protected Boolean hasSubgroups;
|
||||
protected Set<String> parentIds;
|
||||
protected Set<String> zones;
|
||||
|
||||
@@ -50,7 +52,9 @@ public class Group implements Comparable<Group>
|
||||
|
||||
public static final String ID = "id";
|
||||
public static final String DISPLAY_NAME = "displayName";
|
||||
public static final String DESCRIPTION = "description";
|
||||
public static final String IS_ROOT = "isRoot";
|
||||
public static final String HAS_SUBGROUPS = "hasSubgroups";
|
||||
public static final String PARENT_IDS = "parentIds";
|
||||
public static final String ZONES = "zones";
|
||||
|
||||
@@ -81,6 +85,14 @@ public class Group implements Comparable<Group>
|
||||
setFields.put(DISPLAY_NAME, true);
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Boolean getIsRoot()
|
||||
{
|
||||
return isRoot;
|
||||
@@ -92,6 +104,14 @@ public class Group implements Comparable<Group>
|
||||
setFields.put(IS_ROOT, true);
|
||||
}
|
||||
|
||||
public Boolean getHasSubgroups() {
|
||||
return hasSubgroups;
|
||||
}
|
||||
|
||||
public void setHasSubgroups(Boolean hasSubgroups) {
|
||||
this.hasSubgroups = hasSubgroups;
|
||||
}
|
||||
|
||||
public Set<String> getParentIds()
|
||||
{
|
||||
return parentIds;
|
||||
@@ -154,12 +174,13 @@ public class Group implements Comparable<Group>
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "Group [id=" + id + ", displayName=" + displayName + ", isRoot=" + isRoot + "]";
|
||||
return "Group [id=" + id + ", displayName=" + displayName + ", description=" + description
|
||||
+ ", isRoot=" + isRoot + ", hasSubgroups=" + hasSubgroups + "]";
|
||||
}
|
||||
|
||||
public boolean wasSet(String fieldName)
|
||||
{
|
||||
Boolean b = setFields.get(fieldName);
|
||||
return (b != null ? b : false);
|
||||
return b != null && b;
|
||||
}
|
||||
}
|
@@ -108,7 +108,7 @@ public class SearchApiWebscript extends AbstractWebScript implements RecognizedP
|
||||
renderJsonResponse(webScriptResponse, toRender, assistant.getJsonHelper());
|
||||
|
||||
} catch (Exception exception) {
|
||||
renderException(exception,webScriptResponse,assistant);
|
||||
renderException(exception,webScriptResponse,webScriptRequest,assistant);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -102,11 +102,11 @@ public class SearchSQLApiWebscript extends AbstractWebScript implements Recogniz
|
||||
{
|
||||
if (exception instanceof QueryParserException)
|
||||
{
|
||||
renderException(exception,res,assistant);
|
||||
renderException(exception,res,webScriptRequest,assistant);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderException(new WebScriptException(400, exception.getMessage()), res, assistant);
|
||||
renderException(new WebScriptException(400, exception.getMessage()), res, webScriptRequest, assistant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* 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
|
||||
@@ -56,7 +56,7 @@ public class SearchSQLQuery
|
||||
this.stmt = stmt;
|
||||
this.format = format != null ? format : "default";
|
||||
this.locales = locales != null ? locales : Collections.emptyList();
|
||||
this.itemLimit = itemLimit == null || itemLimit < 1 ? new Integer(1000) : itemLimit;
|
||||
this.itemLimit = itemLimit == null || itemLimit < 1 ? Integer.valueOf(1000) : itemLimit;
|
||||
this.includeMetadata = includeMetadata;
|
||||
this.timezone = timezone;
|
||||
this.filterQueries = filterQueries != null ? filterQueries : Collections.emptyList();
|
||||
|
@@ -104,13 +104,9 @@ public class JacksonHelper implements InitializingBean
|
||||
JsonGenerator generator = objectMapper.getFactory().createGenerator(outStream, encoding);
|
||||
writer.writeContents(generator, objectMapper);
|
||||
}
|
||||
catch (JsonMappingException error)
|
||||
catch (JsonMappingException | JsonGenerationException error)
|
||||
{
|
||||
logger.error("Failed to write Json output", error);
|
||||
}
|
||||
catch (JsonGenerationException generror)
|
||||
{
|
||||
logger.error("Failed to write Json output", generror);
|
||||
throw new IOException("Failed to write Json output", error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -26,37 +26,34 @@
|
||||
|
||||
package org.alfresco.rest.framework.tools;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerationException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.alfresco.rest.framework.Api;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.rest.framework.core.exceptions.DefaultExceptionResolver;
|
||||
import org.alfresco.rest.framework.core.exceptions.ErrorResponse;
|
||||
import org.alfresco.rest.framework.core.exceptions.UnsupportedResourceOperationException;
|
||||
import org.alfresco.rest.framework.jacksonextensions.BeanPropertiesFilter;
|
||||
import org.alfresco.rest.framework.jacksonextensions.ExecutionResult;
|
||||
import org.alfresco.rest.framework.jacksonextensions.JacksonHelper;
|
||||
import org.alfresco.rest.framework.resource.SerializablePagedCollection;
|
||||
import org.alfresco.rest.framework.resource.content.BinaryResource;
|
||||
import org.alfresco.rest.framework.resource.content.ContentInfo;
|
||||
import org.alfresco.rest.framework.resource.content.ContentInfoImpl;
|
||||
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
||||
import org.alfresco.rest.framework.resource.parameters.Params;
|
||||
import org.alfresco.rest.framework.webscripts.WithResponse;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.extensions.webscripts.*;
|
||||
import org.springframework.extensions.webscripts.Cache;
|
||||
import org.springframework.extensions.webscripts.Description;
|
||||
import org.springframework.extensions.webscripts.Format;
|
||||
import org.springframework.extensions.webscripts.Status;
|
||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||
import org.springframework.extensions.webscripts.WebScriptResponse;
|
||||
import org.springframework.extensions.webscripts.WrappingWebScriptResponse;
|
||||
import org.springframework.extensions.webscripts.servlet.WebScriptServletResponse;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.core.JsonGenerationException;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
/*
|
||||
* Writes to the response
|
||||
@@ -193,24 +190,52 @@ public interface ResponseWriter
|
||||
default void renderErrorResponse(final ErrorResponse errorResponse, final WebScriptResponse res, final JacksonHelper jsonHelper)
|
||||
throws IOException
|
||||
{
|
||||
renderErrorResponse(errorResponse, res, null, jsonHelper);
|
||||
}
|
||||
|
||||
String logId = "";
|
||||
|
||||
if (Status.STATUS_INTERNAL_SERVER_ERROR == errorResponse.getStatusCode() || resWriterLogger().isDebugEnabled())
|
||||
{
|
||||
logId = org.alfresco.util.GUID.generate();
|
||||
resWriterLogger().error(logId + " : " + errorResponse.getStackTrace());
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a JSON error response
|
||||
*
|
||||
* @param errorResponse The error
|
||||
* @param res web script response
|
||||
* @param req web script request
|
||||
* @throws IOException
|
||||
*/
|
||||
default void renderErrorResponse(final ErrorResponse errorResponse, final WebScriptResponse res, final WebScriptRequest req,
|
||||
final JacksonHelper jsonHelper) throws IOException
|
||||
{
|
||||
String stackMessage = I18NUtil.getMessage(DefaultExceptionResolver.STACK_MESSAGE_ID);
|
||||
String logId = org.alfresco.util.GUID.generate();
|
||||
|
||||
final ErrorResponse errorToWrite = new ErrorResponse(errorResponse.getErrorKey(), errorResponse.getStatusCode(),
|
||||
errorResponse.getBriefSummary(), stackMessage, logId, errorResponse.getAdditionalState(), DefaultExceptionResolver.ERROR_URL);
|
||||
errorResponse.getBriefSummary(), stackMessage, logId, errorResponse.getAdditionalState(),
|
||||
DefaultExceptionResolver.ERROR_URL);
|
||||
|
||||
String reqUrl = (req != null) ? req.getURL() : "unknown";
|
||||
String userName = AuthenticationUtil.getFullyAuthenticatedUser() != null ? AuthenticationUtil.getFullyAuthenticatedUser()
|
||||
: "unauthenticated user";
|
||||
|
||||
// If internal server error or class in debug then print the stack trace
|
||||
if (Status.STATUS_INTERNAL_SERVER_ERROR == errorResponse.getStatusCode() || resWriterLogger().isDebugEnabled())
|
||||
{
|
||||
resWriterLogger().error("Exception " + errorToWrite.getLogId() + ". Request " + reqUrl + " executed by " + userName
|
||||
+ " returned status code " + errorResponse.getStatusCode() + " with message: "
|
||||
+ errorResponse.getBriefSummary() + " - Stack Trace: " + errorResponse.getStackTrace());
|
||||
}
|
||||
else
|
||||
{
|
||||
resWriterLogger().error("Exception " + errorToWrite.getLogId() + ". Request " + reqUrl + " executed by user "
|
||||
+ userName + " returned status code " + errorResponse.getStatusCode() + " with message: "
|
||||
+ errorResponse.getBriefSummary() + " - Increase logging on " + this.getClass().getName()
|
||||
+ " for stack trace.");
|
||||
}
|
||||
|
||||
setContentInfoOnResponse(res, DEFAULT_JSON_CONTENT);
|
||||
|
||||
// Status must be set before the response is written by Jackson (which will by default close and commit the response).
|
||||
// In a r/w txn, web script buffered responses ensure that it doesn't really matter but for r/o txns this is important.
|
||||
// Status must be set before the response is written by Jackson (which will by default close and commit the
|
||||
// response).
|
||||
// In a r/w txn, web script buffered responses ensure that it doesn't really matter but for r/o txns this is
|
||||
// important.
|
||||
res.setStatus(errorToWrite.getStatusCode());
|
||||
|
||||
jsonHelper.withWriter(res.getOutputStream(), new JacksonHelper.Writer()
|
||||
@@ -218,7 +243,7 @@ public interface ResponseWriter
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void writeContents(JsonGenerator generator, ObjectMapper objectMapper)
|
||||
throws JsonGenerationException, JsonMappingException, IOException
|
||||
throws JsonGenerationException, JsonMappingException, IOException
|
||||
{
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("error", errorToWrite);
|
||||
@@ -236,7 +261,21 @@ public interface ResponseWriter
|
||||
*/
|
||||
default void renderException(final Exception exception, final WebScriptResponse response, final ApiAssistant assistant) throws IOException
|
||||
{
|
||||
renderErrorResponse(assistant.resolveException(exception), response, assistant.getJsonHelper());
|
||||
renderException(exception, response, null, assistant);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders an exception to the output stream as Json.
|
||||
*
|
||||
* @param exception
|
||||
* @param response
|
||||
* @param request
|
||||
* @throws IOException
|
||||
*/
|
||||
default void renderException(final Exception exception, final WebScriptResponse response, final WebScriptRequest request,
|
||||
final ApiAssistant assistant) throws IOException
|
||||
{
|
||||
renderErrorResponse(assistant.resolveException(exception), response, request, assistant.getJsonHelper());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -180,15 +180,15 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
|
||||
}
|
||||
catch (ContentIOException cioe)
|
||||
{
|
||||
handleContentIOException(res, cioe);
|
||||
handleContentIOException(res, req, cioe);
|
||||
}
|
||||
catch (AlfrescoRuntimeException | ApiException | WebScriptException xception )
|
||||
{
|
||||
renderException(xception, res, assistant);
|
||||
renderException(xception, res, req, assistant);
|
||||
}
|
||||
catch (RuntimeException runtimeException)
|
||||
{
|
||||
renderException(runtimeException, res, assistant);
|
||||
renderException(runtimeException, res, req, assistant);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -224,17 +224,17 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
private void handleContentIOException(final WebScriptResponse res, ContentIOException exception) throws IOException
|
||||
private void handleContentIOException(final WebScriptResponse res, final WebScriptRequest req, ContentIOException exception) throws IOException
|
||||
{
|
||||
// If the Content-Length is not set back to -1 any client will expect to receive binary and will hang until it times out
|
||||
res.setHeader(HEADER_CONTENT_LENGTH, String.valueOf(-1));
|
||||
if (exception instanceof ArchivedIOException)
|
||||
{
|
||||
renderException(new ArchivedContentException(exception.getMsgId(), exception), res, assistant);
|
||||
renderException(new ArchivedContentException(exception.getMsgId(), exception), res, req, assistant);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderException(exception, res, assistant);
|
||||
renderException(exception, res, req, assistant);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -72,7 +72,7 @@ public class CORSContextListener implements ServletContextListener
|
||||
WebApplicationContext wc = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
|
||||
|
||||
Properties gP = (Properties) wc.getBean(BEAN_GLOBAL_PROPERTIES);
|
||||
Boolean corsEnabled = new Boolean(gP.getProperty(CORS_ENABLED));
|
||||
Boolean corsEnabled = Boolean.valueOf(gP.getProperty(CORS_ENABLED));
|
||||
|
||||
if(logger.isDebugEnabled())
|
||||
{
|
||||
|
@@ -213,6 +213,7 @@
|
||||
<property name="authenticationComponent" ref="authenticationComponent" />
|
||||
<property name="authenticationListener" ref="webScriptAuthenticationListener"/>
|
||||
<property name="remoteUserMapper" ref="RemoteUserMapper" />
|
||||
<property name="adminConsoleAuthenticator" ref="AdminConsoleAuthenticator" />
|
||||
<property name="alwaysAllowBasicAuthForAdminConsole">
|
||||
<value>${authentication.alwaysAllowBasicAuthForAdminConsole.enabled}</value>
|
||||
</property>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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
|
||||
@@ -146,7 +146,7 @@ public class AdminWebScriptTest extends BaseWebScriptTest
|
||||
RepoUsage usage = usageStatus.getUsage();
|
||||
LicenseDescriptor licenseDescriptor = descriptorService.getLicenseDescriptor();
|
||||
Date validUntil = (licenseDescriptor == null) ? null : licenseDescriptor.getValidUntil(); // might be null
|
||||
Integer checkLevel = new Integer(usageStatus.getLevel().ordinal());
|
||||
Integer checkLevel = Integer.valueOf(usageStatus.getLevel().ordinal());
|
||||
|
||||
String url = "/api/admin/usage";
|
||||
TestWebScriptServer.GetRequest req = new TestWebScriptServer.GetRequest(url);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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
|
||||
@@ -445,7 +445,7 @@ public class AuditWebScriptTest extends BaseWebScriptTest
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
assertTrue("Expected at least one entry", jsonEntries.length() > 0);
|
||||
assertEquals("Entry count and physical count don't match", new Long(jsonEntries.length()), entryCount);
|
||||
assertEquals("Entry count and physical count don't match", Long.valueOf(jsonEntries.length()), entryCount);
|
||||
JSONObject jsonEntry = jsonEntries.getJSONObject(0);
|
||||
Long entryId = jsonEntry.getLong(AbstractAuditWebScript.JSON_KEY_ENTRY_ID);
|
||||
assertNotNull("No entry ID", entryId);
|
||||
@@ -483,7 +483,7 @@ public class AuditWebScriptTest extends BaseWebScriptTest
|
||||
assertTrue("Should have found entries", jsonEntries.length() > 0);
|
||||
|
||||
// Now login with failure using a GUID and ensure that we can find it
|
||||
String missingUser = new Long(System.currentTimeMillis()).toString();
|
||||
String missingUser = Long.valueOf(System.currentTimeMillis()).toString();
|
||||
|
||||
// Query for event that has not happened
|
||||
url = "/api/audit/query/" + APP_REPOTEST_NAME + "/repositorytest/login/error/user" + "?value=" + missingUser;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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
|
||||
@@ -147,7 +147,7 @@ public class QuickShareRestApiTest extends BaseWebScriptTest
|
||||
userOneHome = repositoryHelper.getUserHome(personService.getPerson(USER_ONE));
|
||||
// no pun intended
|
||||
quickFile = AbstractContentTransformerTest.loadQuickTestFile("jpg");
|
||||
TEST_CONTENT = new byte[new Long(quickFile.length()).intValue()];
|
||||
TEST_CONTENT = new byte[Long.valueOf(quickFile.length()).intValue()];
|
||||
new FileInputStream(quickFile).read(TEST_CONTENT);
|
||||
testNode = createTestFile(userOneHome, TEST_NAME, quickFile);
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* 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
|
||||
@@ -913,8 +913,8 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
{
|
||||
String[] parts = currentVersionLabel.split("\\.");
|
||||
|
||||
int majorVer = new Integer(parts[0]).intValue();
|
||||
int minorVer = new Integer(parts[1]).intValue();
|
||||
int majorVer = Integer.valueOf(parts[0]).intValue();
|
||||
int minorVer = Integer.valueOf(parts[1]).intValue();
|
||||
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put(Nodes.PARAM_OVERWRITE, "true");
|
||||
|
@@ -523,13 +523,13 @@ public class AuthenticationsTest extends AbstractSingleNetworkSiteTest
|
||||
private RemoteUserMapper createRemoteUserMapperToUseForTheTest(boolean useIdentityService)
|
||||
{
|
||||
PersonService personServiceLocal = (PersonService) applicationContext.getBean("PersonService");
|
||||
|
||||
RemoteUserMapper remoteUserMapper;
|
||||
if (useIdentityService)
|
||||
{
|
||||
InterceptingIdentityRemoteUserMapper interceptingRemoteUserMapper = new InterceptingIdentityRemoteUserMapper();
|
||||
interceptingRemoteUserMapper.setActive(true);
|
||||
interceptingRemoteUserMapper.setPersonService(personServiceLocal);
|
||||
interceptingRemoteUserMapper.setIdentityServiceFacade(null);
|
||||
interceptingRemoteUserMapper.setJitProvisioningHandler(null);
|
||||
interceptingRemoteUserMapper.setUserIdToReturn(user2);
|
||||
remoteUserMapper = interceptingRemoteUserMapper;
|
||||
}
|
||||
|
@@ -43,17 +43,20 @@ import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.service.cmr.security.AuthorityType;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.util.GUID;
|
||||
import org.alfresco.util.testing.category.LuceneTests;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
import org.mockito.Mock;
|
||||
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
/**
|
||||
@@ -69,13 +72,13 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
|
||||
|
||||
protected AuthorityService authorityService;
|
||||
|
||||
private String rootGroupName = null;
|
||||
private Group rootGroup = null;
|
||||
private Group groupA = null;
|
||||
private Group groupB = null;
|
||||
private GroupMember groupMemberA = null;
|
||||
private GroupMember groupMemberB = null;
|
||||
private GroupMember personMember = null;
|
||||
private String rootGroupName;
|
||||
private Group rootGroup;
|
||||
private Group groupA;
|
||||
private Group groupB;
|
||||
private GroupMember groupMemberA;
|
||||
private GroupMember groupMemberB;
|
||||
private GroupMember personMember;
|
||||
@Mock
|
||||
private ResultSetRow groupAResultSetRow;
|
||||
@Mock
|
||||
@@ -670,6 +673,7 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
|
||||
// Optionally included.
|
||||
assertNull(group.getParentIds());
|
||||
assertNull(group.getZones());
|
||||
assertNull(group.getHasSubgroups());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -956,7 +960,7 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
|
||||
expected.retainAll(respPostProcess.getList());
|
||||
|
||||
// If this assertion fails, then the tests aren't providing any value - change them!
|
||||
assertTrue("List doesn't contain enough items for test to be conclusive.", expected.size() > 0);
|
||||
assertTrue("List doesn't contain enough items for test to be conclusive.", !expected.isEmpty());
|
||||
checkList(expected, respPostProcess.getPaging(), respPostProcess);
|
||||
}
|
||||
|
||||
@@ -977,7 +981,7 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
|
||||
expected.retainAll(respPostProcess.getList());
|
||||
|
||||
// If this assertion fails, then the tests aren't providing any value - change them!
|
||||
assertTrue("List doesn't contain enough items for test to be conclusive.", expected.size() > 0);
|
||||
assertTrue("List doesn't contain enough items for test to be conclusive.", !expected.isEmpty());
|
||||
checkList(expected, respPostProcess.getPaging(), respPostProcess);
|
||||
}
|
||||
|
||||
@@ -1154,7 +1158,6 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
|
||||
|
||||
// -ve test: invalid zones clause
|
||||
{
|
||||
Paging paging = getPaging(0, Integer.MAX_VALUE);
|
||||
Map<String, String> otherParams = new HashMap<>();
|
||||
otherParams.put("include", org.alfresco.rest.api.Groups.PARAM_INCLUDE_ZONES);
|
||||
|
||||
@@ -1418,16 +1421,17 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
|
||||
setRequestContext(networkOne.getId(), networkAdmin, DEFAULT_ADMIN_PWD);
|
||||
|
||||
Map<String, String> otherParams = new HashMap<>();
|
||||
otherParams.put("include", org.alfresco.rest.api.Groups.PARAM_INCLUDE_PARENT_IDS);
|
||||
otherParams.put("include", org.alfresco.rest.api.Groups.PARAM_INCLUDE_HAS_SUBGROUPS);
|
||||
|
||||
Group group = generateGroup();
|
||||
|
||||
Group createdGroup01 = groupsProxy.createGroup(group, null, HttpServletResponse.SC_CREATED);
|
||||
Group createdGroup01 = groupsProxy.createGroup(group, otherParams, HttpServletResponse.SC_CREATED);
|
||||
|
||||
assertNotNull(createdGroup01);
|
||||
assertNotNull(createdGroup01.getId());
|
||||
assertTrue(createdGroup01.getIsRoot());
|
||||
assertNull(createdGroup01.getParentIds());
|
||||
assertFalse(createdGroup01.getHasSubgroups());
|
||||
|
||||
Set<String> subGroup01Parents = new HashSet<>();
|
||||
subGroup01Parents.add(createdGroup01.getId());
|
||||
@@ -1435,12 +1439,18 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
|
||||
Group subGroup01 = generateGroup();
|
||||
subGroup01.setParentIds(subGroup01Parents);
|
||||
|
||||
otherParams.put("include", org.alfresco.rest.api.Groups.PARAM_INCLUDE_PARENT_IDS + "," + org.alfresco.rest.api.Groups.PARAM_INCLUDE_HAS_SUBGROUPS);
|
||||
Group createdSubGroup01 = groupsProxy.createGroup(subGroup01, otherParams, HttpServletResponse.SC_CREATED);
|
||||
assertNotNull(createdSubGroup01);
|
||||
assertNotNull(createdSubGroup01.getId());
|
||||
assertFalse(createdSubGroup01.getIsRoot());
|
||||
assertNotNull(createdSubGroup01.getParentIds());
|
||||
assertEquals(subGroup01Parents, createdSubGroup01.getParentIds());
|
||||
assertFalse(createdSubGroup01.getHasSubgroups());
|
||||
|
||||
//validate if parent group now has any subgroup
|
||||
Group group01 = groupsProxy.getGroup(createdGroup01.getId(), otherParams, HttpServletResponse.SC_OK);
|
||||
assertTrue(group01.getHasSubgroups());
|
||||
}
|
||||
|
||||
// Group id is missing.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user