mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-29 15:21:53 +00:00
Compare commits
401 Commits
23.3.11.2
...
fix/update
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af8106bbe4 | ||
|
|
011a98f9a7 | ||
|
|
0b5211f7a9 | ||
|
|
1ad97022a2 | ||
|
|
567405dc1c | ||
|
|
8d6973a132 | ||
|
|
629c874bc8 | ||
|
|
19ec861873 | ||
|
|
7f8dd30305 | ||
|
|
40c7b5fd9f | ||
|
|
3f6a1c6880 | ||
|
|
b3f2cb95c8 | ||
|
|
d694959587 | ||
|
|
56aae78015 | ||
|
|
edba5b8754 | ||
|
|
5f8879feb7 | ||
|
|
ca575bc47e | ||
|
|
4fcb962a3c | ||
|
|
5397d88f4a | ||
|
|
448e49d8bb | ||
|
|
b825b5f18e | ||
|
|
24541a9512 | ||
|
|
2f6d097e16 | ||
|
|
7b074e1ee2 | ||
|
|
1bc5c94ace | ||
|
|
ba68efec67 | ||
|
|
bfcca88e63 | ||
|
|
9d704df3c0 | ||
|
|
73d46c1702 | ||
|
|
261dcc93bd | ||
|
|
2fa44f407c | ||
|
|
8e0377d586 | ||
|
|
925a2bb6b9 | ||
|
|
4eafb13ba6 | ||
|
|
f731c9734c | ||
|
|
e0a3b843f2 | ||
|
|
2889b1a8a3 | ||
|
|
22aa1f2725 | ||
|
|
77ab7d83fe | ||
|
|
a8faa94d15 | ||
|
|
baafbbbeb2 | ||
|
|
ed061f2287 | ||
|
|
6e435e1a8c | ||
|
|
05f6b90df8 | ||
|
|
0550dcd4f7 | ||
|
|
e137c91152 | ||
|
|
5a1c8334c8 | ||
|
|
c7bbb1f74b | ||
|
|
49a34c4fe3 | ||
|
|
70af2ea3ad | ||
|
|
ab6c5feba7 | ||
|
|
cb3cbb553a | ||
|
|
9470c27f3d | ||
|
|
edf263c43f | ||
|
|
69bb9a308a | ||
|
|
853d1bdc1b | ||
|
|
f7d1bbcec3 | ||
|
|
731d580f7e | ||
|
|
ad4126ffea | ||
|
|
933aced67c | ||
|
|
de0ba15a91 | ||
|
|
00c36251d4 | ||
|
|
ea9ce0c0c2 | ||
|
|
37231e50a2 | ||
|
|
26d8c7dcbe | ||
|
|
6ea97033d3 | ||
|
|
cd0b2ffd24 | ||
|
|
a14cbacb68 | ||
|
|
fc0b9863d4 | ||
|
|
29dc42d445 | ||
|
|
39da968d76 | ||
|
|
6a4fecd46e | ||
|
|
e083d4fcc2 | ||
|
|
53e8a06a6e | ||
|
|
c80e1fa94b | ||
|
|
675c6f7aa1 | ||
|
|
44d67847da | ||
|
|
d405043c5d | ||
|
|
da50f6271c | ||
|
|
a5e713c176 | ||
|
|
2dcd2788b2 | ||
|
|
6b738342c1 | ||
|
|
ba5f5418ab | ||
|
|
ee8f3bec18 | ||
|
|
39395af528 | ||
|
|
e6f9d88779 | ||
|
|
70f70c6ed3 | ||
|
|
15045f9612 | ||
|
|
c50c7c6a7e | ||
|
|
60199141f5 | ||
|
|
b5e023950d | ||
|
|
d4591acf2c | ||
|
|
f34f2849dd | ||
|
|
52f2be49f3 | ||
|
|
748be1f4a0 | ||
|
|
52f1af2da6 | ||
|
|
626a97ff45 | ||
|
|
4a91132226 | ||
|
|
b6fb8725ce | ||
|
|
5fc0d9edde | ||
|
|
44d394b1a0 | ||
|
|
c1d62cca4d | ||
|
|
24ae4ce57c | ||
|
|
b8f2ec252d | ||
|
|
ae721c86f6 | ||
|
|
aacef0c949 | ||
|
|
e4edceda75 | ||
|
|
09ec6688c6 | ||
|
|
14025f00de | ||
|
|
22c5a5e134 | ||
|
|
154cad1ff8 | ||
|
|
7749b89e2b | ||
|
|
bbb45e667b | ||
|
|
a5f01e0d94 | ||
|
|
0c6d455ec4 | ||
|
|
5e86f5163e | ||
|
|
4981be1564 | ||
|
|
9a30fbb75a | ||
|
|
9c86fdb8b5 | ||
|
|
c52f74832d | ||
|
|
70dd7642f4 | ||
|
|
0cf3eec834 | ||
|
|
dfd855440d | ||
|
|
88d46884c4 | ||
|
|
e6444a1c7a | ||
|
|
e215038230 | ||
|
|
a5f8034725 | ||
|
|
c7dd659268 | ||
|
|
ffae77169e | ||
|
|
3bcfaf256e | ||
|
|
0e8d56d7b2 | ||
|
|
ef9e8d574f | ||
|
|
a17712b501 | ||
|
|
fce6d1d7eb | ||
|
|
867af27a96 | ||
|
|
3de74456ae | ||
|
|
919880e363 | ||
|
|
e6ac2875b9 | ||
|
|
4250167a28 | ||
|
|
312463b5e0 | ||
|
|
c09f5f7cb0 | ||
|
|
6284e9724e | ||
|
|
dcf391faea | ||
|
|
475f345909 | ||
|
|
f42e033e40 | ||
|
|
546f37eded | ||
|
|
a35673d44f | ||
|
|
25e9bdbdb6 | ||
|
|
33ab26e52b | ||
|
|
7e35abfdc8 | ||
|
|
634e591264 | ||
|
|
86f66c86da | ||
|
|
2904535d40 | ||
|
|
e99905efbd | ||
|
|
ce65de0f10 | ||
|
|
29b19d4245 | ||
|
|
4eea43bddf | ||
|
|
4c9282790a | ||
|
|
39a74e42b6 | ||
|
|
a298c0dcb9 | ||
|
|
9ee56a5d08 | ||
|
|
6b80a2c39c | ||
|
|
f6569edde1 | ||
|
|
5ab9aa8cf2 | ||
|
|
8a171d09b5 | ||
|
|
3e423a1543 | ||
|
|
6351782c1d | ||
|
|
4c92868efb | ||
|
|
2cca9ea11b | ||
|
|
e12001e4d1 | ||
|
|
a57607f728 | ||
|
|
a79af2cac0 | ||
|
|
be807c5b19 | ||
|
|
ae03e7076e | ||
|
|
26e394c398 | ||
|
|
200aa95784 | ||
|
|
4eeabb3dbd | ||
|
|
227bbe4fd8 | ||
|
|
1461a04a3d | ||
|
|
52008dc139 | ||
|
|
f2a10052e4 | ||
|
|
add64e0cb6 | ||
|
|
14511e2621 | ||
|
|
42e0c93121 | ||
|
|
715bc273ee | ||
|
|
812541870e | ||
|
|
9aa5051826 | ||
|
|
54580b4aeb | ||
|
|
2b1b6091a3 | ||
|
|
74a147ab3f | ||
|
|
07f0595f5a | ||
|
|
e3422ea6a5 | ||
|
|
f4103c242f | ||
|
|
34fb5e9dd9 | ||
|
|
f6cf0670c1 | ||
|
|
c7bd036030 | ||
|
|
b20c573040 | ||
|
|
6568885c10 | ||
|
|
31237135c5 | ||
|
|
d528ed1e97 | ||
|
|
bb207340fd | ||
|
|
314e1aeb64 | ||
|
|
9846f7b04f | ||
|
|
6e442e93b8 | ||
|
|
fb3c57aab4 | ||
|
|
093b3281fb | ||
|
|
3b027c6c36 | ||
|
|
f193309e4c | ||
|
|
7668849a59 | ||
|
|
1350e68c29 | ||
|
|
ea63cf76e5 | ||
|
|
674fa8d7e0 | ||
|
|
60a31112ea | ||
|
|
67d8807529 | ||
|
|
dda1fd6ea3 | ||
|
|
7a937f1e51 | ||
|
|
187e9138da | ||
|
|
b8c9605ae6 | ||
|
|
8a1d8dba94 | ||
|
|
b2c87aa22d | ||
|
|
3748482f51 | ||
|
|
1f558e4c58 | ||
|
|
a7d31b9811 | ||
|
|
42cc7f16c2 | ||
|
|
c0ca7cc27f | ||
|
|
27962726b4 | ||
|
|
aeebd3dcc6 | ||
|
|
dde8dc90e6 | ||
|
|
aa1ec3cf35 | ||
|
|
30ce0a1f01 | ||
|
|
291684f3d8 | ||
|
|
0fed714674 | ||
|
|
f2752929ce | ||
|
|
cf66b63817 | ||
|
|
e387ae39cc | ||
|
|
e3483507d0 | ||
|
|
55c6eacf95 | ||
|
|
2ff97bfe83 | ||
|
|
88874ef191 | ||
|
|
74af4484da | ||
|
|
c24812dc20 | ||
|
|
0e78b61f4c | ||
|
|
97353e1ee9 | ||
|
|
024ad00229 | ||
|
|
c2da1838da | ||
|
|
93d4e603ed | ||
|
|
4197d9d5c7 | ||
|
|
a323e56a5a | ||
|
|
6f2100e072 | ||
|
|
a2dcb0ebd7 | ||
|
|
ef2019d844 | ||
|
|
a5adc32d79 | ||
|
|
a5f8e80bcc | ||
|
|
de3dfc1265 | ||
|
|
487dc56e3c | ||
|
|
fd4e630f0f | ||
|
|
008b33efbd | ||
|
|
f3e0c43f3b | ||
|
|
9f6ef99ef5 | ||
|
|
5e9d7f39d3 | ||
|
|
0f6950a72e | ||
|
|
87bba8e381 | ||
|
|
837fb0cccd | ||
|
|
0b511e0b55 | ||
|
|
67aa6ac5fc | ||
|
|
6805ce85c8 | ||
|
|
b00e11cb6f | ||
|
|
3d9b58ea76 | ||
|
|
02254b2ac4 | ||
|
|
7df8281358 | ||
|
|
3f2a143343 | ||
|
|
c8bfc18f83 | ||
|
|
8b3bd59d73 | ||
|
|
a6e915371f | ||
|
|
f5f1106506 | ||
|
|
5b0c31154e | ||
|
|
70a90c3870 | ||
|
|
a10ab896df | ||
|
|
5bc0c3975b | ||
|
|
6e20330424 | ||
|
|
1c1c9704a1 | ||
|
|
b7642b5813 | ||
|
|
69583721da | ||
|
|
d17c11b8ad | ||
|
|
57daaa24da | ||
|
|
da96fd52ca | ||
|
|
0fd088fc59 | ||
|
|
dea78f5d30 | ||
|
|
aa02febb3f | ||
|
|
84e1c90745 | ||
|
|
7ce2349edc | ||
|
|
6d02269164 | ||
|
|
ba323979ff | ||
|
|
b1cf324289 | ||
|
|
acb34b7861 | ||
|
|
ab1cce1fec | ||
|
|
7550799a26 | ||
|
|
6238485d2b | ||
|
|
8059ccad53 | ||
|
|
3896979b6c | ||
|
|
98a978a4d1 | ||
|
|
cb333d1c20 | ||
|
|
ee1d33cb41 | ||
|
|
1e16f74292 | ||
|
|
8d72d662a0 | ||
|
|
f346992500 | ||
|
|
5399fed53b | ||
|
|
1766ac749d | ||
|
|
5b31b22840 | ||
|
|
b4c18c9902 | ||
|
|
7491ba5156 | ||
|
|
57d8f4bab7 | ||
|
|
6c0b29ec3d | ||
|
|
91adfe22d7 | ||
|
|
40036caae4 | ||
|
|
5a0aadb425 | ||
|
|
d4a8ef2442 | ||
|
|
5555ee6871 | ||
|
|
1ba62b2a4c | ||
|
|
8abf1c3d36 | ||
|
|
22b6131f93 | ||
|
|
8a731dce40 | ||
|
|
a18861a4f6 | ||
|
|
87f31c5a3a | ||
|
|
ef878fe20f | ||
|
|
168aae1a3d | ||
|
|
ed706aa5d3 | ||
|
|
fe5a1d8436 | ||
|
|
54d122ccc1 | ||
|
|
945fe52df9 | ||
|
|
f1d9203430 | ||
|
|
1dc0720582 | ||
|
|
8dcc19cc63 | ||
|
|
d4883af0d0 | ||
|
|
4cb220de66 | ||
|
|
97bcd725ee | ||
|
|
38259f9b39 | ||
|
|
9b1f0d78a5 | ||
|
|
95d7dbc5fc | ||
|
|
920366d287 | ||
|
|
14e26c46fc | ||
|
|
c934f556cd | ||
|
|
73901303c5 | ||
|
|
bbb22a79eb | ||
|
|
099b072a47 | ||
|
|
0bf3c078cf | ||
|
|
9b45f75b48 | ||
|
|
52914459ea | ||
|
|
446b08aa03 | ||
|
|
08fbc569fe | ||
|
|
a8f50416a3 | ||
|
|
c5122ddca0 | ||
|
|
1d93bcbb0d | ||
|
|
c34f9af62d | ||
|
|
112875fbfd | ||
|
|
2d21456342 | ||
|
|
0363cab870 | ||
|
|
1f708ad712 | ||
|
|
475894525d | ||
|
|
58bad96724 | ||
|
|
02486a432a | ||
|
|
6de21cca78 | ||
|
|
185f7ebeb6 | ||
|
|
1b55aa9691 | ||
|
|
51aa490439 | ||
|
|
4cf2e76430 | ||
|
|
9e34ae3df8 | ||
|
|
6a4f82deae | ||
|
|
0e3173a573 | ||
|
|
2744561346 | ||
|
|
9b8ae96c2e | ||
|
|
adb8913b56 | ||
|
|
02237bd280 | ||
|
|
78001ed22c | ||
|
|
a568aeda17 | ||
|
|
f890e9f995 | ||
|
|
0ddeac79bb | ||
|
|
67ca73820b | ||
|
|
1df8702e16 | ||
|
|
12c4481ac2 | ||
|
|
0f572ec21a | ||
|
|
9c121743d9 | ||
|
|
c754eaeb93 | ||
|
|
b9e76970f9 | ||
|
|
0a46ec0ab2 | ||
|
|
ce39a66934 | ||
|
|
d098508e53 | ||
|
|
738a77301a | ||
|
|
be0ea5b247 | ||
|
|
d33dc8e1d4 | ||
|
|
d72b8c411a | ||
|
|
01c347673d | ||
|
|
dcc6f23548 | ||
|
|
22c94284ec | ||
|
|
9f1956b632 | ||
|
|
740bce8c80 | ||
|
|
801b526b4a | ||
|
|
fde025ad88 | ||
|
|
ba61253c94 | ||
|
|
bf5032675f | ||
|
|
cce8ef50ef |
198
.github/workflows/ci.yml
vendored
198
.github/workflows/ci.yml
vendored
@@ -41,18 +41,17 @@ 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@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- id: changed-files
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v6.1.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v8.2.0
|
||||
with:
|
||||
write-list-to-env: true
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v6.1.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Prepare maven cache and check compilation"
|
||||
@@ -70,12 +69,12 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v8.2.0
|
||||
continue-on-error: true
|
||||
with:
|
||||
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
||||
@@ -93,10 +92,10 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v8.2.0
|
||||
with:
|
||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||
repository: "Alfresco/veracode-baseline-archive"
|
||||
@@ -107,12 +106,16 @@ jobs:
|
||||
run: |
|
||||
bash ./scripts/ci/init.sh
|
||||
bash ./scripts/ci/build.sh
|
||||
- name: "Remove excluded files"
|
||||
run: |
|
||||
mkdir temp-dir-for-sast
|
||||
bash ./scripts/ci/remove-sast-exclusions.sh ./packaging/war/target/alfresco.war temp-dir-for-sast/reduced.war
|
||||
- name: "Run SAST Scan"
|
||||
uses: veracode/Veracode-pipeline-scan-action@v1.0.16
|
||||
with:
|
||||
vid: ${{ secrets.VERACODE_API_ID }}
|
||||
vkey: ${{ secrets.VERACODE_API_KEY }}
|
||||
file: "packaging/war/target/alfresco.war"
|
||||
file: "temp-dir-for-sast/reduced.war"
|
||||
fail_build: true
|
||||
project_name: alfresco-community-repo
|
||||
issue_details: true
|
||||
@@ -130,6 +133,8 @@ jobs:
|
||||
with:
|
||||
name: Veracode Pipeline-Scan Results (Human Readable)
|
||||
path: readable_output.zip
|
||||
- name: "Remove temporary directory"
|
||||
run: rm -rfv temp-dir-for-sast
|
||||
- name: "Clean Maven cache"
|
||||
run: bash ./scripts/ci/cleanup_cache.sh
|
||||
|
||||
@@ -143,10 +148,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@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/ya-pmd-scan@v4.0.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- uses: Alfresco/ya-pmd-scan@v4.1.0
|
||||
with:
|
||||
classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\""
|
||||
|
||||
@@ -176,14 +181,14 @@ jobs:
|
||||
testAttributes: "-Dtest=AllMmtUnitTestSuite"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testModule }}
|
||||
@@ -214,7 +219,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -256,9 +261,9 @@ jobs:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -267,10 +272,11 @@ 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"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }}
|
||||
@@ -301,7 +307,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -334,9 +340,9 @@ jobs:
|
||||
version: ['10.2.18', '10.4', '10.5']
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: Run MariaDB ${{ matrix.version }} database
|
||||
@@ -345,7 +351,7 @@ jobs:
|
||||
MARIADB_VERSION: ${{ matrix.version }}
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.version }}
|
||||
@@ -376,7 +382,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -405,9 +411,9 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run MariaDB 10.6 database"
|
||||
@@ -416,7 +422,7 @@ jobs:
|
||||
MARIADB_VERSION: 10.6
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||
@@ -447,7 +453,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -476,9 +482,9 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run MySQL 8 database"
|
||||
@@ -487,7 +493,7 @@ jobs:
|
||||
MYSQL_VERSION: 8
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||
@@ -518,7 +524,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -546,9 +552,9 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 13.12 database"
|
||||
@@ -557,7 +563,7 @@ jobs:
|
||||
POSTGRES_VERSION: 13.12
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||
@@ -588,7 +594,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -616,9 +622,9 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 14.9 database"
|
||||
@@ -627,7 +633,7 @@ jobs:
|
||||
POSTGRES_VERSION: 14.9
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||
@@ -658,7 +664,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -686,9 +692,9 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Run PostgreSQL 15.4 database"
|
||||
@@ -697,7 +703,7 @@ jobs:
|
||||
POSTGRES_VERSION: 15.4
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||
@@ -728,7 +734,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -754,16 +760,16 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- 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
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||
@@ -794,7 +800,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -854,9 +860,9 @@ jobs:
|
||||
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@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- name: "Set transformers tag"
|
||||
@@ -875,10 +881,11 @@ jobs:
|
||||
echo "HOSTNAME_VERIFICATION_DISABLED=false" >> "$GITHUB_ENV"
|
||||
fi
|
||||
- name: "Set up the environment"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }} ${{ matrix.idp }}
|
||||
@@ -909,7 +916,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -967,15 +974,16 @@ jobs:
|
||||
REQUIRES_LOCAL_IMAGES: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
bash ./scripts/ci/init.sh
|
||||
bash ./scripts/ci/build.sh
|
||||
- name: "Set up the environment"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
|
||||
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
||||
@@ -984,7 +992,7 @@ jobs:
|
||||
run: mvn install -pl :alfresco-community-repo-integration-test -am -DskipTests -Pall-tas-tests
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.test-name }}
|
||||
@@ -1022,7 +1030,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.tests.outcome }}
|
||||
@@ -1048,16 +1056,16 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- 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
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||
@@ -1088,7 +1096,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -1122,9 +1130,9 @@ jobs:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -1132,7 +1140,7 @@ jobs:
|
||||
bash ./scripts/ci/build.sh
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (PostgreSQL) ${{ matrix.test-name }}
|
||||
@@ -1168,9 +1176,9 @@ jobs:
|
||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -1178,7 +1186,7 @@ jobs:
|
||||
bash ./scripts/ci/build.sh
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (MySQL) ${{ matrix.test-name }}
|
||||
@@ -1210,9 +1218,9 @@ jobs:
|
||||
REQUIRES_LOCAL_IMAGES: true
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
@@ -1226,7 +1234,7 @@ jobs:
|
||||
mvn -B install -pl :alfresco-governance-services-automation-community-rest-api -am -Pags -Pall-tas-tests -DskipTests
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||
id: rp-prepare
|
||||
with:
|
||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||
@@ -1258,7 +1266,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
- name: "Summarize Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||
id: rp-summarize
|
||||
with:
|
||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||
@@ -1300,9 +1308,9 @@ jobs:
|
||||
!contains(github.event.head_commit.message, '[force]')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Build"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
|
||||
16
.github/workflows/master_release.yml
vendored
16
.github/workflows/master_release.yml
vendored
@@ -34,12 +34,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.2.0
|
||||
with:
|
||||
username: ${{ env.GIT_USERNAME }}
|
||||
email: ${{ env.GIT_EMAIL }}
|
||||
@@ -63,12 +63,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||
- name: "Init"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.16.0
|
||||
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.2.0
|
||||
with:
|
||||
username: ${{ env.GIT_USERNAME }}
|
||||
email: ${{ env.GIT_EMAIL }}
|
||||
|
||||
@@ -133,21 +133,21 @@
|
||||
"filename": ".github/workflows/ci.yml",
|
||||
"hashed_secret": "b86dc2f033a63f2b7b9e7d270ab806d2910d7572",
|
||||
"is_verified": false,
|
||||
"line_number": 293
|
||||
"line_number": 299
|
||||
},
|
||||
{
|
||||
"type": "Secret Keyword",
|
||||
"filename": ".github/workflows/ci.yml",
|
||||
"hashed_secret": "1bfb0e20f886150ba59b853bcd49dea893e00966",
|
||||
"is_verified": false,
|
||||
"line_number": 368
|
||||
"line_number": 374
|
||||
},
|
||||
{
|
||||
"type": "Secret Keyword",
|
||||
"filename": ".github/workflows/ci.yml",
|
||||
"hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39",
|
||||
"is_verified": false,
|
||||
"line_number": 901
|
||||
"line_number": 908
|
||||
}
|
||||
],
|
||||
".github/workflows/master_release.yml": [
|
||||
@@ -731,7 +731,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/AbstractBaseApiTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 120,
|
||||
"line_number": 111,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1539,7 +1539,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/rendition2/AbstractRenditionIntegrationTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 130,
|
||||
"line_number": 127,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1599,7 +1599,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/IdentityServiceFacadeFactoryBeanTest.java",
|
||||
"hashed_secret": "c4b66dbe168ad1d2b19119494a0da063801bc3bb",
|
||||
"is_verified": false,
|
||||
"line_number": 83,
|
||||
"line_number": 82,
|
||||
"is_secret": false
|
||||
},
|
||||
{
|
||||
@@ -1607,7 +1607,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/IdentityServiceFacadeFactoryBeanTest.java",
|
||||
"hashed_secret": "c5aad1895e1dcff195992938f1bcc9954d575ac9",
|
||||
"is_verified": false,
|
||||
"line_number": 92,
|
||||
"line_number": 91,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1627,7 +1627,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/SpringBasedIdentityServiceFacadeUnitTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 46,
|
||||
"line_number": 47,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1888,5 +1888,5 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"generated_at": "2025-03-31T12:42:09Z"
|
||||
"generated_at": "2025-01-07T10:56:22Z"
|
||||
}
|
||||
@@ -126,4 +126,3 @@ Please use [**this guide**](CONTRIBUTING.md) to make a contribution to the proje
|
||||
|
||||
- [Alfresco Content Services Documentation](https://docs.alfresco.com/content-services/latest/)
|
||||
- [Alfresco Platform](https://www.hyland.com/en/products/alfresco-platform)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>23.3.11.2</version>
|
||||
<version>25.1.0.21-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.3.11.2</version>
|
||||
<version>25.1.0.21-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>23.3.11.2</version>
|
||||
<version>25.1.0.21-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
@@ -98,7 +98,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.docker-java</groupId>
|
||||
<artifactId>docker-java</artifactId>
|
||||
<version>3.3.6</version>
|
||||
<version>3.4.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
|
||||
@@ -134,16 +134,6 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
||||
.until(() -> getRestAPIFactory().getSearchAPI(null).search(searchRequest).getPagination()
|
||||
.getTotalItems() == NUMBER_OF_FILES);
|
||||
|
||||
RestRequestQueryModel ancestorReq = getContentFromFolderAndAllSubfoldersQuery(rootFolder.getNodeRefWithoutVersion());
|
||||
SearchRequest ancestorSearchRequest = new SearchRequest();
|
||||
ancestorSearchRequest.setQuery(ancestorReq);
|
||||
|
||||
STEP("Wait until paths are indexed.");
|
||||
// to improve stability on CI - seems that sometimes during big load we need to wait longer for the condition
|
||||
await().atMost(120, TimeUnit.SECONDS)
|
||||
.until(() -> getRestAPIFactory().getSearchAPI(null).search(ancestorSearchRequest).getPagination()
|
||||
.getTotalItems() == NUMBER_OF_FILES);
|
||||
|
||||
holdBulkOperation = HoldBulkOperation.builder()
|
||||
.query(queryReq)
|
||||
.op(HoldBulkOperationType.ADD).build();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.3.11.2</version>
|
||||
<version>25.1.0.21-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
SOLR6_TAG=2.0.11
|
||||
SOLR6_TAG=2.0.13
|
||||
POSTGRES_TAG=15.4
|
||||
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
||||
|
||||
@@ -119,11 +119,6 @@ rm.patch.v35.holdNewChildAssocPatch.batchSize=1000
|
||||
rm.haspermissionmap.read=Read
|
||||
rm.haspermissionmap.write=WriteProperties,AddChildren,ReadContent
|
||||
|
||||
# Extended Permissions
|
||||
# Enable matching the given username with the correct casing username when retrieving an IPR group.
|
||||
# Only needs to be used if there are owners that don't have the username in the correct casing.
|
||||
rm.extendedSecurity.enableUsernameNormalization=false
|
||||
|
||||
#
|
||||
# Extended auto-version behaviour. If true and other auto-version properties are satisfied, then
|
||||
# a document will be auto-versioned when its type is changed.
|
||||
|
||||
@@ -611,7 +611,6 @@
|
||||
<property name="authorityService" ref="authorityService"/>
|
||||
<property name="permissionService" ref="permissionService"/>
|
||||
<property name="transactionService" ref="transactionService"/>
|
||||
<property name="enableUsernameNormalization" value="${rm.extendedSecurity.enableUsernameNormalization}" />
|
||||
</bean>
|
||||
|
||||
<bean id="ExtendedSecurityService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
|
||||
@@ -35,4 +35,3 @@
|
||||
}
|
||||
</#escape>
|
||||
</#macro>
|
||||
|
||||
|
||||
@@ -219,4 +219,3 @@ function getRecordFolder(recordFolder, parentPath)
|
||||
|
||||
// Start webscript
|
||||
main();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>23.3.11.2</version>
|
||||
<version>25.1.0.21-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -30,8 +30,7 @@ package org.alfresco.module.org_alfresco_module_dod5015.caveat;
|
||||
/**
|
||||
* Compatibility Implementation.
|
||||
* <p>
|
||||
* Used as a compatibility implementation when migrating from V1.0 to V2.0. RMCustom model still references
|
||||
* this class implementation, but package has been changed.
|
||||
* Used as a compatibility implementation when migrating from V1.0 to V2.0. RMCustom model still references this class implementation, but package has been changed.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* @deprecated as of 2.1 see {@link org.alfresco.module.org_alfresco_module_rm.admin.CannotApplyConstraintMetadataException}
|
||||
*/
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* @deprecated as of 2.1 see {@link org.alfresco.module.org_alfresco_module_rm.admin.InvalidCustomAspectMetadataException}
|
||||
*/
|
||||
|
||||
@@ -67,7 +67,8 @@ public class RecordsManagementServiceImpl extends ServiceBaseImpl
|
||||
/**
|
||||
* Set the service registry service
|
||||
*
|
||||
* @param serviceRegistry service registry
|
||||
* @param serviceRegistry
|
||||
* service registry
|
||||
*/
|
||||
public void setRecordsManagementServiceRegistry(RecordsManagementServiceRegistry serviceRegistry)
|
||||
{
|
||||
@@ -78,7 +79,9 @@ public class RecordsManagementServiceImpl extends ServiceBaseImpl
|
||||
|
||||
/**
|
||||
* Sets the default RM store reference
|
||||
* @param defaultStoreRef store reference
|
||||
*
|
||||
* @param defaultStoreRef
|
||||
* store reference
|
||||
*/
|
||||
@Deprecated
|
||||
public void setDefaultStoreRef(StoreRef defaultStoreRef)
|
||||
|
||||
@@ -65,7 +65,8 @@ public interface RMCaveatConfigComponent
|
||||
/**
|
||||
* Get RM constraint list
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
*/
|
||||
RMConstraintInfo getRMConstraint(String listName);
|
||||
|
||||
@@ -102,12 +103,14 @@ public interface RMCaveatConfigComponent
|
||||
/**
|
||||
* Delete RM Constraint
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
*/
|
||||
void deleteRMConstraint(String listName);
|
||||
|
||||
/**
|
||||
* Get the details of a caveat list
|
||||
*
|
||||
* @param listName
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -45,6 +45,11 @@ import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
import net.sf.acegisecurity.AccessDeniedException;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.MatchLogic;
|
||||
@@ -77,10 +82,6 @@ import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.JSONtoFmModel;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/**
|
||||
* RM Caveat Config component impl
|
||||
@@ -122,12 +123,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
private Lock readLock = lock.readLock();
|
||||
private Lock writeLock = lock.writeLock();
|
||||
|
||||
/*
|
||||
* Caveat Config (Shared) config
|
||||
* first string is property name
|
||||
* second string is authority name (user or group full name)
|
||||
* third string is list of values of property
|
||||
*/
|
||||
/* Caveat Config (Shared) config first string is property name second string is authority name (user or group full name) third string is list of values of property */
|
||||
private SimpleCache<String, Map<String, List<String>>> caveatConfig;
|
||||
|
||||
public void setCaveatConfig(SimpleCache<String, Map<String, List<String>>> caveatConfig)
|
||||
@@ -227,15 +223,12 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy#onContentUpdate(org.alfresco.service.cmr.repository.NodeRef, boolean)
|
||||
* RM-2770 - this method has to be fired on transaction commit to be able to validate the content when the content store is encrypted
|
||||
* @see org.alfresco.repo.content.ContentServicePolicies.OnContentUpdatePolicy#onContentUpdate(org.alfresco.service.cmr.repository.NodeRef, boolean) RM-2770 - this method has to be fired on transaction commit to be able to validate the content when the content store is encrypted
|
||||
*/
|
||||
@Override
|
||||
@Behaviour
|
||||
(
|
||||
@Behaviour(
|
||||
kind = BehaviourKind.CLASS,
|
||||
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT
|
||||
)
|
||||
notificationFrequency = NotificationFrequency.TRANSACTION_COMMIT)
|
||||
public void onContentUpdate(NodeRef nodeRef, boolean newContent)
|
||||
{
|
||||
if (logger.isInfoEnabled())
|
||||
@@ -279,7 +272,8 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
/**
|
||||
* Validate the caveat config and optionally update the cache.
|
||||
*
|
||||
* @param nodeRef The nodeRef of the config
|
||||
* @param nodeRef
|
||||
* The nodeRef of the config
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void validateAndReset(NodeRef nodeRef)
|
||||
@@ -385,8 +379,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
if (conName.equals(conStr))
|
||||
{
|
||||
// note: assumes only one caveat/LOV against a given property
|
||||
allowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>()
|
||||
{
|
||||
allowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>() {
|
||||
public List<String> doWork()
|
||||
{
|
||||
return ((RMListOfValuesConstraint) con).getAllowedValues();
|
||||
@@ -473,7 +466,6 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
return nodeService.getChildByName(rootNode, RecordsManagementModel.ASSOC_CAVEAT_CONFIG, CAVEAT_CONFIG_NAME);
|
||||
}
|
||||
|
||||
|
||||
public NodeRef updateOrCreateCaveatConfig(InputStream is)
|
||||
{
|
||||
NodeRef caveatConfig = getOrCreateCaveatConfig();
|
||||
@@ -753,10 +745,12 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
/**
|
||||
* Add a single value to an authority in a list. The existing values of the list remain.
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param authorityName
|
||||
* @param value
|
||||
* @throws AlfrescoRuntimeException if either the list or the authority do not already exist.
|
||||
* @throws AlfrescoRuntimeException
|
||||
* if either the list or the authority do not already exist.
|
||||
*/
|
||||
public void addRMConstraintListValue(String listName, String authorityName, String value)
|
||||
{
|
||||
@@ -806,6 +800,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
|
||||
/**
|
||||
* Get the member details of the specified list
|
||||
*
|
||||
* @param listName
|
||||
* @return the details of the specified list
|
||||
*/
|
||||
@@ -837,12 +832,12 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace the values for an authority in a list.
|
||||
* The existing values are removed.
|
||||
* Replace the values for an authority in a list. The existing values are removed.
|
||||
*
|
||||
* If the authority does not already exist in the list, it will be added
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param authorityName
|
||||
* @param values
|
||||
*/
|
||||
@@ -984,7 +979,8 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
/**
|
||||
* Remove an authority from a list
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param authorityName
|
||||
*/
|
||||
public void removeRMConstraintListAuthority(String listName, String authorityName)
|
||||
@@ -1010,7 +1006,8 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
}
|
||||
|
||||
/**
|
||||
* @param config the configuration to convert
|
||||
* @param config
|
||||
* the configuration to convert
|
||||
* @return a String containing the JSON representation of the configuration.
|
||||
*/
|
||||
private String convertToJSONString(SimpleCache<String, Map<String, List<String>>> config)
|
||||
@@ -1070,6 +1067,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
|
||||
/**
|
||||
* Get an RMConstraintInfo
|
||||
*
|
||||
* @param listQName
|
||||
* @return the constraint or null if it does not exist
|
||||
*/
|
||||
@@ -1086,8 +1084,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
|
||||
RMConstraintInfo info = new RMConstraintInfo();
|
||||
info.setName(listQName.toPrefixString());
|
||||
info.setTitle(con.getTitle());
|
||||
List<String> allowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>()
|
||||
{
|
||||
List<String> allowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>() {
|
||||
public List<String> doWork()
|
||||
{
|
||||
return def.getAllowedValues();
|
||||
|
||||
@@ -42,6 +42,7 @@ public interface RMCaveatConfigService
|
||||
|
||||
/**
|
||||
* Get allowed values for given caveat list (for current user)
|
||||
*
|
||||
* @param constraintName
|
||||
* @return
|
||||
*/
|
||||
@@ -55,18 +56,15 @@ public interface RMCaveatConfigService
|
||||
*/
|
||||
boolean hasAccess(NodeRef nodeRef);
|
||||
|
||||
/*
|
||||
* Get a single RM constraint
|
||||
*/
|
||||
/* Get a single RM constraint */
|
||||
RMConstraintInfo getRMConstraint(String listName);
|
||||
|
||||
/*
|
||||
* Get the names of all the caveat lists
|
||||
*/
|
||||
/* Get the names of all the caveat lists */
|
||||
Set<RMConstraintInfo> getAllRMConstraints();
|
||||
|
||||
/**
|
||||
* Get the details of a caveat list
|
||||
*
|
||||
* @param listName
|
||||
* @return
|
||||
*/
|
||||
@@ -80,50 +78,59 @@ public interface RMCaveatConfigService
|
||||
|
||||
/**
|
||||
* add RM constraint list
|
||||
* @param listName the name of the RMConstraintList
|
||||
*
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param listTitle
|
||||
*/
|
||||
RMConstraintInfo addRMConstraint(String listName, String listTitle, String[] allowedValues);
|
||||
|
||||
/**
|
||||
* update RM constraint list allowed values
|
||||
* @param listName the name of the RMConstraintList - can not be changed
|
||||
*
|
||||
* @param listName
|
||||
* the name of the RMConstraintList - can not be changed
|
||||
* @param allowedValues
|
||||
*/
|
||||
RMConstraintInfo updateRMConstraintAllowedValues(String listName, String[] allowedValues);
|
||||
|
||||
/**
|
||||
* update RM constraint Title
|
||||
* @param listName the name of the RMConstraintList - can not be changed
|
||||
* @param newTitle the new value for the title constraint
|
||||
*
|
||||
* @param listName
|
||||
* the name of the RMConstraintList - can not be changed
|
||||
* @param newTitle
|
||||
* the new value for the title constraint
|
||||
*/
|
||||
RMConstraintInfo updateRMConstraintTitle(String listName, String newTitle);
|
||||
|
||||
|
||||
/**
|
||||
* delete RM Constraint
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
*/
|
||||
void deleteRMConstraint(String listName);
|
||||
|
||||
/**
|
||||
* Add a single value to an authority in a list. The existing values of the list remain.
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param authorityName
|
||||
* @param value
|
||||
* @throws AlfrescoRuntimeException if either the list or the authority do not already exist.
|
||||
* @throws AlfrescoRuntimeException
|
||||
* if either the list or the authority do not already exist.
|
||||
*/
|
||||
void addRMConstraintListValue(String listName, String authorityName, String value);
|
||||
|
||||
/**
|
||||
* Replace the values for an authority in a list.
|
||||
* The existing values are removed.
|
||||
* Replace the values for an authority in a list. The existing values are removed.
|
||||
*
|
||||
* If the authority does not already exist in the list, it will be added
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param authorityName
|
||||
* @param values
|
||||
*/
|
||||
@@ -132,18 +139,19 @@ public interface RMCaveatConfigService
|
||||
/**
|
||||
* Remove an authority from a list
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param authorityName
|
||||
*/
|
||||
void removeRMConstraintListAuthority(String listName, String authorityName);
|
||||
|
||||
/**
|
||||
* Replace the values for an authority in a list.
|
||||
* The existing values are removed.
|
||||
* Replace the values for an authority in a list. The existing values are removed.
|
||||
*
|
||||
* If the authority does not already exist in the list, it will be added
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param value
|
||||
* @param authorities
|
||||
*/
|
||||
@@ -152,7 +160,8 @@ public interface RMCaveatConfigService
|
||||
/**
|
||||
* Remove an authority from a list
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param valueName
|
||||
*/
|
||||
void removeRMConstraintListValue(String listName, String valueName);
|
||||
|
||||
@@ -36,6 +36,9 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.MatchLogic;
|
||||
@@ -48,8 +51,6 @@ import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* RM Caveat Config Service impl
|
||||
@@ -66,7 +67,6 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
private RMCaveatConfigComponent rmCaveatConfigComponent;
|
||||
private RecordsManagementAdminService recordsManagementAdminService;
|
||||
|
||||
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
this.namespaceService = namespaceService;
|
||||
@@ -131,7 +131,9 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
|
||||
/**
|
||||
* add RM constraint list
|
||||
* @param listName the name of the RMConstraintList
|
||||
*
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
*/
|
||||
public RMConstraintInfo addRMConstraint(String listName, String title, String[] values)
|
||||
{
|
||||
@@ -185,7 +187,8 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
/**
|
||||
* delete RM Constraint List
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
*/
|
||||
public void deleteRMConstraint(String listName)
|
||||
{
|
||||
@@ -199,10 +202,12 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
/**
|
||||
* Add a single value to an authority in a list. The existing values of the list remain.
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param authorityName
|
||||
* @param value
|
||||
* @throws AlfrescoRuntimeException if either the list or the authority do not already exist.
|
||||
* @throws AlfrescoRuntimeException
|
||||
* if either the list or the authority do not already exist.
|
||||
*/
|
||||
public void addRMConstraintListValue(String listName, String authorityName, String value)
|
||||
{
|
||||
@@ -211,6 +216,7 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
|
||||
/**
|
||||
* Get the details of the specified list
|
||||
*
|
||||
* @param listName
|
||||
* @return the details of the specified list
|
||||
*/
|
||||
@@ -220,12 +226,12 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace the values for an authority in a list.
|
||||
* The existing values are removed.
|
||||
* Replace the values for an authority in a list. The existing values are removed.
|
||||
*
|
||||
* If the authority does not already exist in the list, it will be added
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param authorityName
|
||||
* @param values
|
||||
*/
|
||||
@@ -249,7 +255,8 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
/**
|
||||
* Remove an authority from a list
|
||||
*
|
||||
* @param listName the name of the RMConstraintList
|
||||
* @param listName
|
||||
* the name of the RMConstraintList
|
||||
* @param authorityName
|
||||
*/
|
||||
public void removeRMConstraintListAuthority(String listName, String authorityName)
|
||||
@@ -281,8 +288,7 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
i.setTitle(def.getTitle());
|
||||
|
||||
// note: assumes only one caveat/LOV against a given property
|
||||
List<String> allowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>()
|
||||
{
|
||||
List<String> allowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>() {
|
||||
public List<String> doWork()
|
||||
{
|
||||
return def.getAllowedValues();
|
||||
@@ -301,6 +307,7 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
|
||||
/**
|
||||
* Get an RMConstraintInfo
|
||||
*
|
||||
* @param listQName
|
||||
* @return the constraint or null if it does not exist
|
||||
*/
|
||||
@@ -317,8 +324,7 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
RMConstraintInfo info = new RMConstraintInfo();
|
||||
info.setName(listQName.toPrefixString());
|
||||
info.setTitle(con.getTitle());
|
||||
List<String> allowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>()
|
||||
{
|
||||
List<String> allowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>() {
|
||||
public List<String> doWork()
|
||||
{
|
||||
return def.getAllowedValues();
|
||||
@@ -348,8 +354,10 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
/**
|
||||
* Update The allowed values for an RM Constraint.
|
||||
*
|
||||
* @param listName The name of the list.
|
||||
* @param allowedValues the new alowed values
|
||||
* @param listName
|
||||
* The name of the list.
|
||||
* @param allowedValues
|
||||
* the new alowed values
|
||||
*
|
||||
*/
|
||||
public RMConstraintInfo updateRMConstraintAllowedValues(String listName, String[] allowedValues)
|
||||
@@ -369,8 +377,7 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
|
||||
if (con instanceof RMListOfValuesConstraint)
|
||||
{
|
||||
final RMListOfValuesConstraint def = (RMListOfValuesConstraint) con;
|
||||
List<String> oldAllowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>()
|
||||
{
|
||||
List<String> oldAllowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>() {
|
||||
public List<String> doWork()
|
||||
{
|
||||
return def.getAllowedValues();
|
||||
|
||||
@@ -40,30 +40,37 @@ public class RMConstraintInfo
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setCaseSensitive(boolean caseSensitive)
|
||||
{
|
||||
this.caseSensitive = caseSensitive;
|
||||
}
|
||||
|
||||
public boolean isCaseSensitive()
|
||||
{
|
||||
return caseSensitive;
|
||||
}
|
||||
|
||||
public void setAllowedValues(String[] values)
|
||||
{
|
||||
this.allowedValues = values.clone();
|
||||
}
|
||||
|
||||
public String[] getAllowedValues()
|
||||
{
|
||||
return allowedValues;
|
||||
|
||||
@@ -33,18 +33,18 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.service.cmr.dictionary.ConstraintException;
|
||||
import org.alfresco.service.cmr.i18n.MessageLookup;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.service.cmr.repository.datatype.TypeConversionException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* RM Constraint implementation that ensures the value is one of a constrained
|
||||
* <i>list of values</i>. By default, this constraint is case-sensitive.
|
||||
* RM Constraint implementation that ensures the value is one of a constrained <i>list of values</i>. By default, this constraint is case-sensitive.
|
||||
*
|
||||
* @see #setAllowedValues(List)
|
||||
* @see #setCaseSensitive(boolean)
|
||||
@@ -75,7 +75,6 @@ public class RMListOfValuesConstraint extends ListOfValuesConstraint
|
||||
RMListOfValuesConstraint.caveatConfigService = caveatConfigService;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
@@ -98,8 +97,7 @@ public class RMListOfValuesConstraint extends ListOfValuesConstraint
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the allowed values. Note that these are <tt>String</tt> instances, but may
|
||||
* represent non-<tt>String</tt> values. It is up to the caller to distinguish.
|
||||
* Get the allowed values. Note that these are <tt>String</tt> instances, but may represent non-<tt>String</tt> values. It is up to the caller to distinguish.
|
||||
*
|
||||
* @return Returns the values allowed
|
||||
*/
|
||||
@@ -169,10 +167,12 @@ public class RMListOfValuesConstraint extends ListOfValuesConstraint
|
||||
return this.allowedValuesUpper;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the values that are allowed by the constraint.
|
||||
*
|
||||
* @param allowedValues a list of allowed values
|
||||
* @param allowedValues
|
||||
* a list of allowed values
|
||||
*/
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
|
||||
@@ -29,7 +29,6 @@ package org.alfresco.module.org_alfresco_module_rm.caveat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
public class ScriptAuthority implements Serializable
|
||||
{
|
||||
/**
|
||||
@@ -43,18 +42,20 @@ public class ScriptAuthority implements Serializable
|
||||
{
|
||||
this.authorityName = authorityName;
|
||||
}
|
||||
|
||||
public String getAuthorityName()
|
||||
{
|
||||
return authorityName;
|
||||
}
|
||||
|
||||
public void setAuthorityTitle(String authorityName)
|
||||
{
|
||||
this.authorityTitle = authorityName;
|
||||
}
|
||||
|
||||
public String getAuthorityTitle()
|
||||
{
|
||||
return authorityTitle;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -35,11 +35,12 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
|
||||
public class ScriptConstraint implements Serializable
|
||||
{
|
||||
/**
|
||||
@@ -64,10 +65,12 @@ public class ScriptConstraint implements Serializable
|
||||
{
|
||||
info.setTitle(title);
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return info.getTitle();
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
info.setName(name);
|
||||
@@ -128,6 +131,7 @@ public class ScriptConstraint implements Serializable
|
||||
|
||||
/**
|
||||
* Update a value
|
||||
*
|
||||
* @param bodge
|
||||
*/
|
||||
public void updateValues(JSONArray bodge) throws Exception
|
||||
@@ -149,6 +153,7 @@ public class ScriptConstraint implements Serializable
|
||||
|
||||
/**
|
||||
* Update a value
|
||||
*
|
||||
* @param value
|
||||
* @param authorities
|
||||
*/
|
||||
@@ -160,6 +165,7 @@ public class ScriptConstraint implements Serializable
|
||||
|
||||
/**
|
||||
* Cascade delete an authority
|
||||
*
|
||||
* @param authority
|
||||
*/
|
||||
public void deleteAuthority(String authority)
|
||||
@@ -169,6 +175,7 @@ public class ScriptConstraint implements Serializable
|
||||
|
||||
/**
|
||||
* Cascade delete a value
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public void deleteValue(String value)
|
||||
@@ -176,9 +183,9 @@ public class ScriptConstraint implements Serializable
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a single value
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -43,14 +43,17 @@ public class ScriptConstraintAuthority implements Serializable
|
||||
{
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
public List<String> getValues()
|
||||
{
|
||||
return values;
|
||||
}
|
||||
|
||||
public void setAuthorityName(String authorityName)
|
||||
{
|
||||
this.authorityName = authorityName;
|
||||
}
|
||||
|
||||
public String getAuthorityName()
|
||||
{
|
||||
return authorityName;
|
||||
|
||||
@@ -43,22 +43,27 @@ public class ScriptConstraintValue implements Serializable
|
||||
{
|
||||
this.authorities = values;
|
||||
}
|
||||
|
||||
public List<ScriptAuthority> getAuthorities()
|
||||
{
|
||||
return authorities;
|
||||
}
|
||||
|
||||
public void setValueName(String authorityName)
|
||||
{
|
||||
this.value = authorityName;
|
||||
}
|
||||
|
||||
public String getValueName()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValueTitle(String authorityName)
|
||||
{
|
||||
this.value = authorityName;
|
||||
}
|
||||
|
||||
public String getValueTitle()
|
||||
{
|
||||
return value;
|
||||
|
||||
@@ -115,8 +115,9 @@ public class ScriptRMCaveatConfigService extends BaseScopableProcessorExtension
|
||||
|
||||
/**
|
||||
* Delete list
|
||||
*
|
||||
* @param listName
|
||||
|
||||
*
|
||||
*/
|
||||
public void deleteConstraintList(String listName)
|
||||
{
|
||||
@@ -125,8 +126,6 @@ public class ScriptRMCaveatConfigService extends BaseScopableProcessorExtension
|
||||
caveatConfigService.deleteRMConstraint(xxx);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Update value
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,8 @@ public interface DeprecatedExtendedSecurityService
|
||||
/**
|
||||
* Gets the set of authorities that are extended readers for the given node.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @return {@link Set}<{@link String}> set of extended readers
|
||||
*
|
||||
* @deprecated as of 2.5, use {@link ExtendedSecurityService#getReaders(NodeRef)}
|
||||
@@ -51,7 +52,8 @@ public interface DeprecatedExtendedSecurityService
|
||||
/**
|
||||
* Get the set of authorities that are extended writers for the given node.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @return {@link Set}<{@link String}> set of extended writers
|
||||
*
|
||||
* @deprecated as of 2.5, use {@link ExtendedSecurityService#getWriters(NodeRef)}
|
||||
@@ -63,9 +65,12 @@ public interface DeprecatedExtendedSecurityService
|
||||
*
|
||||
* As of, 2.5 this method no longer applies the extended security to parents.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to add extended read permissions
|
||||
* @param writers set of authorities to add extended write permissions
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param readers
|
||||
* set of authorities to add extended read permissions
|
||||
* @param writers
|
||||
* set of authorities to add extended write permissions
|
||||
*
|
||||
* @deprecated as of 2.5, use {@link ExtendedSecurityService#set(NodeRef, Set, Set)}
|
||||
*/
|
||||
@@ -75,74 +80,85 @@ public interface DeprecatedExtendedSecurityService
|
||||
/**
|
||||
* Add extended security for the specified authorities to a node.
|
||||
* <p>
|
||||
* If specified, the read and write extended permissions are applied to all parents up to the file plan as
|
||||
* extended read. This ensures parental read, but not parental write.
|
||||
* If specified, the read and write extended permissions are applied to all parents up to the file plan as extended read. This ensures parental read, but not parental write.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to add extended read permissions
|
||||
* @param writers set of authorities to add extended write permissions
|
||||
* @param applyToParents true if extended security applied to parents (read only) false otherwise.
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param readers
|
||||
* set of authorities to add extended read permissions
|
||||
* @param writers
|
||||
* set of authorities to add extended write permissions
|
||||
* @param applyToParents
|
||||
* true if extended security applied to parents (read only) false otherwise.
|
||||
*
|
||||
* @deprecated as of 2.5, because extended security is no longer applied to parents. Note that calling this method will
|
||||
* only apply the extended security to the node and the applyToParents parameter value will be ignored.
|
||||
* @deprecated as of 2.5, because extended security is no longer applied to parents. Note that calling this method will only apply the extended security to the node and the applyToParents parameter value will be ignored.
|
||||
*
|
||||
* @see ExtendedSecurityService#set(NodeRef, Set, Set)
|
||||
*/
|
||||
@Deprecated void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
|
||||
@Deprecated
|
||||
void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
|
||||
|
||||
/**
|
||||
* Remove all extended readers and writers from the given node reference.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
*
|
||||
* @deprecated as of 2.5, see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeAllExtendedSecurity(NodeRef nodeRef);
|
||||
@Deprecated
|
||||
void removeAllExtendedSecurity(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Remove the extended security for the specified authorities from a node.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to remove as extended readers
|
||||
* @param writers set of authorities to remove as extended writers
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param readers
|
||||
* set of authorities to remove as extended readers
|
||||
* @param writers
|
||||
* set of authorities to remove as extended writers
|
||||
*
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported.
|
||||
* Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported. Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
*
|
||||
* @see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers);
|
||||
@Deprecated
|
||||
void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers);
|
||||
|
||||
/**
|
||||
* Remove the extended security for the specified authorities from a node.
|
||||
* <p>
|
||||
* If specified, extended security will also be removed from the parent hierarchy.(read only). Note that
|
||||
* extended security is records as a reference count, so security will only be utterly removed from the parent
|
||||
* hierarchy if all references to the authority are removed.
|
||||
* If specified, extended security will also be removed from the parent hierarchy.(read only). Note that extended security is records as a reference count, so security will only be utterly removed from the parent hierarchy if all references to the authority are removed.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to remove as extended readers
|
||||
* @param writers set of authorities to remove as extedned writers
|
||||
* @param applyToParents true if removal of extended security is applied to parent hierarchy (read only), false
|
||||
* otherwise
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param readers
|
||||
* set of authorities to remove as extended readers
|
||||
* @param writers
|
||||
* set of authorities to remove as extedned writers
|
||||
* @param applyToParents
|
||||
* true if removal of extended security is applied to parent hierarchy (read only), false otherwise
|
||||
*
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported.
|
||||
* Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported. Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
*
|
||||
* @see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
|
||||
@Deprecated
|
||||
void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
|
||||
|
||||
/**
|
||||
* Remove all extended readers and writers from the given node reference.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param applyToParents if true then apply removal to parent hierarchy (read only) false otherwise.
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param applyToParents
|
||||
* if true then apply removal to parent hierarchy (read only) false otherwise.
|
||||
*
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported.
|
||||
* Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported. Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
*
|
||||
* @see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeAllExtendedSecurity(NodeRef nodeRef, boolean applyToParents);
|
||||
@Deprecated
|
||||
void removeAllExtendedSecurity(NodeRef nodeRef, boolean applyToParents);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,9 @@ package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.repo.security.permissions.DynamicAuthority;
|
||||
import org.alfresco.repo.security.permissions.PermissionReference;
|
||||
@@ -39,8 +42,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
/**
|
||||
* Extended readers dynamic authority implementation.
|
||||
@@ -137,8 +138,7 @@ public abstract class ExtendedSecurityBaseDynamicAuthority implements DynamicAut
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of the authorities from the extended security aspect that this dynamic
|
||||
* authority is checking against.
|
||||
* Gets a list of the authorities from the extended security aspect that this dynamic authority is checking against.
|
||||
*
|
||||
* @param nodeRef
|
||||
* @return
|
||||
|
||||
@@ -49,8 +49,10 @@ public interface FilePlanAuthenticationService
|
||||
/**
|
||||
* Run provided work as the global rm admin user.
|
||||
*
|
||||
* @param <R> return type
|
||||
* @param runAsWork work to execute as the rm admin user
|
||||
* @param <R>
|
||||
* return type
|
||||
* @param runAsWork
|
||||
* work to execute as the rm admin user
|
||||
* @return R result of work execution
|
||||
*
|
||||
* @deprecated as of 2.2, use
|
||||
|
||||
@@ -47,7 +47,8 @@ public interface RecordsManagementSecurityService
|
||||
/**
|
||||
* Creates the initial set of default roles for a root records management node
|
||||
*
|
||||
* @param rmRootNode root node
|
||||
* @param rmRootNode
|
||||
* root node
|
||||
*
|
||||
* @deprecated As of release 2.1, operation no longer supported
|
||||
*/
|
||||
@@ -55,10 +56,10 @@ public interface RecordsManagementSecurityService
|
||||
void bootstrapDefaultRoles(NodeRef rmRootNode);
|
||||
|
||||
/**
|
||||
* Returns the name of the container group for all roles of a specified file
|
||||
* plan.
|
||||
* Returns the name of the container group for all roles of a specified file plan.
|
||||
*
|
||||
* @param filePlan file plan node reference
|
||||
* @param filePlan
|
||||
* file plan node reference
|
||||
* @return String group name
|
||||
*
|
||||
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getAllRolesContainerGroup(NodeRef)}
|
||||
@@ -69,7 +70,8 @@ public interface RecordsManagementSecurityService
|
||||
/**
|
||||
* Get all the available roles for the given records management root node
|
||||
*
|
||||
* @param rmRootNode root node
|
||||
* @param rmRootNode
|
||||
* root node
|
||||
* @return {@link Set}<{@link Role}> all roles for a given root node
|
||||
*
|
||||
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getRoles(NodeRef)}
|
||||
@@ -103,6 +105,7 @@ public interface RecordsManagementSecurityService
|
||||
|
||||
/**
|
||||
* Indicate whether a role exists for a given records management root node
|
||||
*
|
||||
* @param rmRootNode
|
||||
* @param role
|
||||
* @return
|
||||
@@ -115,8 +118,10 @@ public interface RecordsManagementSecurityService
|
||||
/**
|
||||
* Determines whether the given user has the RM Admin role
|
||||
*
|
||||
* @param rmRootNode RM root node
|
||||
* @param user user name to check
|
||||
* @param rmRootNode
|
||||
* RM root node
|
||||
* @param user
|
||||
* user name to check
|
||||
* @return true if the user has the RM Admin role, false otherwise
|
||||
*
|
||||
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#hasRMAdminRole(NodeRef, String)}
|
||||
@@ -176,12 +181,14 @@ public interface RecordsManagementSecurityService
|
||||
void assignRoleToAuthority(NodeRef rmRootNode, String role, String authorityName);
|
||||
|
||||
/**
|
||||
* Sets a permission on a RM object. Assumes allow is true. Cascades permission down to record folder.
|
||||
* Cascades ReadRecord up to file plan.
|
||||
* Sets a permission on a RM object. Assumes allow is true. Cascades permission down to record folder. Cascades ReadRecord up to file plan.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param authority authority
|
||||
* @param permission permission
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param authority
|
||||
* authority
|
||||
* @param permission
|
||||
* permission
|
||||
*
|
||||
* @deprecated As of release 2.1, replaced by {@link FilePlanPermissionService#setPermission(NodeRef, String, String)}
|
||||
*/
|
||||
@@ -191,9 +198,12 @@ public interface RecordsManagementSecurityService
|
||||
/**
|
||||
* Deletes a permission from a RM object. Cascades removal down to record folder.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param authority authority
|
||||
* @param permission permission
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param authority
|
||||
* authority
|
||||
* @param permission
|
||||
* permission
|
||||
*
|
||||
* @deprecated As of release 2.1, replaced by {@link FilePlanPermissionService#deletePermission(NodeRef, String, String)}
|
||||
*/
|
||||
|
||||
@@ -55,7 +55,8 @@ public class RecordsManagementSecurityServiceImpl implements RecordsManagementSe
|
||||
private FilePlanPermissionService filePlanPermissionService;
|
||||
|
||||
/**
|
||||
* @param modelSecurityService model security service
|
||||
* @param modelSecurityService
|
||||
* model security service
|
||||
*/
|
||||
public void setModelSecurityService(ModelSecurityService modelSecurityService)
|
||||
{
|
||||
@@ -63,7 +64,8 @@ public class RecordsManagementSecurityServiceImpl implements RecordsManagementSe
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanRoleService file plan role service
|
||||
* @param filePlanRoleService
|
||||
* file plan role service
|
||||
*/
|
||||
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
|
||||
{
|
||||
@@ -71,7 +73,8 @@ public class RecordsManagementSecurityServiceImpl implements RecordsManagementSe
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanPermissionService file plan permission service
|
||||
* @param filePlanPermissionService
|
||||
* file plan permission service
|
||||
*/
|
||||
public void setFilePlanPermissionService(FilePlanPermissionService filePlanPermissionService)
|
||||
{
|
||||
|
||||
@@ -27,12 +27,13 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
|
||||
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
/**
|
||||
* Auditable action executer abstract base
|
||||
@@ -79,7 +80,8 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param auditable true if auditable, false otherwise
|
||||
* @param auditable
|
||||
* true if auditable, false otherwise
|
||||
*/
|
||||
public void setAuditable(boolean auditable)
|
||||
{
|
||||
@@ -87,7 +89,8 @@ public abstract class AuditableActionExecuterAbstractBase extends ActionExecuter
|
||||
}
|
||||
|
||||
/**
|
||||
* @param auditedImmediately true if to be audited immediately, false to be audited after transaction commits
|
||||
* @param auditedImmediately
|
||||
* true if to be audited immediately, false to be audited after transaction commits
|
||||
*/
|
||||
public void setAuditedImmediately(boolean auditedImmediately)
|
||||
{
|
||||
|
||||
@@ -64,7 +64,8 @@ public abstract class PropertySubActionExecuterAbstractBase extends AuditableAct
|
||||
}
|
||||
|
||||
/**
|
||||
* @param parameterProcessorComponent parameter processor component
|
||||
* @param parameterProcessorComponent
|
||||
* parameter processor component
|
||||
*/
|
||||
public void setParameterProcessorComponent(ParameterProcessorComponent parameterProcessorComponent)
|
||||
{
|
||||
@@ -72,7 +73,8 @@ public abstract class PropertySubActionExecuterAbstractBase extends AuditableAct
|
||||
}
|
||||
|
||||
/**
|
||||
* @param allowParameterSubstitutions true if property subs allowed, false otherwise
|
||||
* @param allowParameterSubstitutions
|
||||
* true if property subs allowed, false otherwise
|
||||
*/
|
||||
public void setAllowParameterSubstitutions(boolean allowParameterSubstitutions)
|
||||
{
|
||||
|
||||
@@ -35,6 +35,10 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||
@@ -61,9 +65,6 @@ import org.alfresco.service.cmr.security.OwnableService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.util.PropertyCheck;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Records management action executer base class
|
||||
@@ -148,7 +149,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set the transaction service
|
||||
*
|
||||
* @param transactionService The transaction service
|
||||
* @param transactionService
|
||||
* The transaction service
|
||||
*/
|
||||
public void setTransactionService(TransactionService transactionService)
|
||||
{
|
||||
@@ -168,7 +170,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set the namespace service
|
||||
*
|
||||
* @param namespaceService The namespace service
|
||||
* @param namespaceService
|
||||
* The namespace service
|
||||
*/
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
@@ -188,7 +191,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set the node service
|
||||
*
|
||||
* @param nodeService The node service
|
||||
* @param nodeService
|
||||
* The node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -208,7 +212,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set the dictionary service
|
||||
*
|
||||
* @param dictionaryService The dictionary service
|
||||
* @param dictionaryService
|
||||
* The dictionary service
|
||||
*/
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
@@ -228,7 +233,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set the content service
|
||||
*
|
||||
* @param contentService The content service
|
||||
* @param contentService
|
||||
* The content service
|
||||
*/
|
||||
public void setContentService(ContentService contentService)
|
||||
{
|
||||
@@ -248,7 +254,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set action service
|
||||
*
|
||||
* @param actionService The action service
|
||||
* @param actionService
|
||||
* The action service
|
||||
*/
|
||||
public void setActionService(ActionService actionService)
|
||||
{
|
||||
@@ -268,7 +275,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set the audit service that action details will be sent to
|
||||
*
|
||||
* @param recordsManagementAuditService The audit service that action details will be sent to
|
||||
* @param recordsManagementAuditService
|
||||
* The audit service that action details will be sent to
|
||||
*/
|
||||
public void setRecordsManagementAuditService(RecordsManagementAuditService recordsManagementAuditService)
|
||||
{
|
||||
@@ -288,7 +296,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set records management service
|
||||
*
|
||||
* @param recordsManagementActionService The records management service
|
||||
* @param recordsManagementActionService
|
||||
* The records management service
|
||||
*/
|
||||
public void setRecordsManagementActionService(RecordsManagementActionService recordsManagementActionService)
|
||||
{
|
||||
@@ -308,7 +317,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set the disposition service
|
||||
*
|
||||
* @param dispositionService The disposition service
|
||||
* @param dispositionService
|
||||
* The disposition service
|
||||
*/
|
||||
public void setDispositionService(DispositionService dispositionService)
|
||||
{
|
||||
@@ -328,7 +338,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Sets the vital record service
|
||||
*
|
||||
* @param vitalRecordService vital record service
|
||||
* @param vitalRecordService
|
||||
* vital record service
|
||||
*/
|
||||
public void setVitalRecordService(VitalRecordService vitalRecordService)
|
||||
{
|
||||
@@ -348,7 +359,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set the records management event service
|
||||
*
|
||||
* @param recordsManagementEventService The records management event service
|
||||
* @param recordsManagementEventService
|
||||
* The records management event service
|
||||
*/
|
||||
public void setRecordsManagementEventService(RecordsManagementEventService recordsManagementEventService)
|
||||
{
|
||||
@@ -368,7 +380,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set the ownable service
|
||||
*
|
||||
* @param ownableService The ownable service
|
||||
* @param ownableService
|
||||
* The ownable service
|
||||
*/
|
||||
public void setOwnableService(OwnableService ownableService)
|
||||
{
|
||||
@@ -388,7 +401,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set freeze service
|
||||
*
|
||||
* @param freezeService freeze service
|
||||
* @param freezeService
|
||||
* freeze service
|
||||
*/
|
||||
public void setFreezeService(FreezeService freezeService)
|
||||
{
|
||||
@@ -408,7 +422,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Set record service
|
||||
*
|
||||
* @param recordService record service
|
||||
* @param recordService
|
||||
* record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
@@ -428,7 +443,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Sets the records management admin service
|
||||
*
|
||||
* @param recordsManagementAdminService records management admin service
|
||||
* @param recordsManagementAdminService
|
||||
* records management admin service
|
||||
*/
|
||||
public void setRecordsManagementAdminService(RecordsManagementAdminService recordsManagementAdminService)
|
||||
{
|
||||
@@ -448,7 +464,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Sets the model security service
|
||||
*
|
||||
* @param modelSecurityService model security service
|
||||
* @param modelSecurityService
|
||||
* model security service
|
||||
*/
|
||||
public void setModelSecurityService(ModelSecurityService modelSecurityService)
|
||||
{
|
||||
@@ -468,7 +485,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Sets the record folder service
|
||||
*
|
||||
* @param recordFolderService record folder service
|
||||
* @param recordFolderService
|
||||
* record folder service
|
||||
*/
|
||||
public void setRecordFolderService(RecordFolderService recordFolderService)
|
||||
{
|
||||
@@ -488,7 +506,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Sets the hold service
|
||||
*
|
||||
* @param holdService hold service
|
||||
* @param holdService
|
||||
* hold service
|
||||
*/
|
||||
public void setHoldService(HoldService holdService)
|
||||
{
|
||||
@@ -508,7 +527,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Sets the identifier service
|
||||
*
|
||||
* @param identifierService the identifier service
|
||||
* @param identifierService
|
||||
* the identifier service
|
||||
*/
|
||||
public void setIdentifierService(IdentifierService identifierService)
|
||||
{
|
||||
@@ -518,7 +538,8 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Sets the applicable kinds
|
||||
*
|
||||
* @param applicableKinds kinds that this action is applicable for
|
||||
* @param applicableKinds
|
||||
* kinds that this action is applicable for
|
||||
*/
|
||||
public void setApplicableKinds(String[] applicableKinds)
|
||||
{
|
||||
@@ -678,8 +699,10 @@ public abstract class RMActionExecuterAbstractBase extends PropertySubActionExe
|
||||
/**
|
||||
* Function to pad a string with zero '0' characters to the required length
|
||||
*
|
||||
* @param s String to pad with leading zero '0' characters
|
||||
* @param len Length to pad to
|
||||
* @param s
|
||||
* String to pad with leading zero '0' characters
|
||||
* @param len
|
||||
* Length to pad to
|
||||
*
|
||||
* @return padded string or the original if already at >= len characters
|
||||
*
|
||||
|
||||
@@ -30,6 +30,8 @@ package org.alfresco.module.org_alfresco_module_rm.action;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
@@ -38,7 +40,6 @@ import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* @author Roy Wetherall
|
||||
@@ -81,8 +82,7 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether we should validate the next disposition action is the action we are
|
||||
* trying to execute.
|
||||
* Indicates whether we should validate the next disposition action is the action we are trying to execute.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -103,8 +103,7 @@ public abstract class RMDispositionActionExecuterAbstractBase extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
|
||||
@@ -72,15 +72,16 @@ public interface RecordsManagementAction
|
||||
/**
|
||||
* Execution of the action
|
||||
*
|
||||
* @param filePlanComponent file plan component the action is executed upon
|
||||
* @param parameters action parameters
|
||||
* @param filePlanComponent
|
||||
* file plan component the action is executed upon
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @return The result of the executed action
|
||||
*/
|
||||
RecordsManagementActionResult execute(NodeRef filePlanComponent, Map<String, Serializable> parameters);
|
||||
|
||||
/**
|
||||
* Some admin-related rmActions execute against a target nodeRef which is not provided
|
||||
* by the calling code, but is instead an implementation detail of the action.
|
||||
* Some admin-related rmActions execute against a target nodeRef which is not provided by the calling code, but is instead an implementation detail of the action.
|
||||
*
|
||||
* @return the target nodeRef
|
||||
*/
|
||||
|
||||
@@ -40,5 +40,4 @@ import org.alfresco.service.cmr.action.ActionConditionDefinition;
|
||||
*/
|
||||
@AlfrescoPublicApi
|
||||
public interface RecordsManagementActionConditionDefinition extends ActionConditionDefinition
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
@@ -44,7 +44,8 @@ public class RecordsManagementActionConditionDefinitionImpl extends ActionCondit
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @param name name of the condition
|
||||
* @param name
|
||||
* name of the condition
|
||||
*/
|
||||
public RecordsManagementActionConditionDefinitionImpl(String name)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,8 @@ package org.alfresco.module.org_alfresco_module_rm.action;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
@@ -37,7 +39,6 @@ import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.cmr.action.ActionConditionDefinition;
|
||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
/**
|
||||
* Records management action condition evaluator abstract base implementation.
|
||||
@@ -80,7 +81,8 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordsManagementActionService records management action service
|
||||
* @param recordsManagementActionService
|
||||
* records management action service
|
||||
*/
|
||||
public void setRecordsManagementActionService(RecordsManagementActionService recordsManagementActionService)
|
||||
{
|
||||
@@ -88,7 +90,8 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -96,7 +99,8 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
}
|
||||
|
||||
/**
|
||||
* @param retryingTransactionHelper retrying transaction helper
|
||||
* @param retryingTransactionHelper
|
||||
* retrying transaction helper
|
||||
*/
|
||||
public void setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
|
||||
{
|
||||
@@ -112,12 +116,10 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
// override to prevent condition being registered with the core action service
|
||||
|
||||
// run the following code as System
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>() {
|
||||
public Object doWork()
|
||||
{
|
||||
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>() {
|
||||
public Void execute()
|
||||
{
|
||||
getRecordsManagementActionService().register(RecordsManagementActionConditionEvaluatorAbstractBase.this);
|
||||
@@ -176,8 +178,7 @@ public abstract class RecordsManagementActionConditionEvaluatorAbstractBase exte
|
||||
/**
|
||||
* @see org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase#getActionConditionDefintion()
|
||||
*
|
||||
* TODO base class should provide "createActionDefinition" method that can be over-ridden like the ActionExecuter
|
||||
* base class to prevent duplication of code and a cleaner extension.
|
||||
* TODO base class should provide "createActionDefinition" method that can be over-ridden like the ActionExecuter base class to prevent duplication of code and a cleaner extension.
|
||||
*/
|
||||
@Override
|
||||
public ActionConditionDefinition getActionConditionDefintion()
|
||||
|
||||
@@ -49,7 +49,8 @@ public class RecordsManagementActionDefinitionImpl extends ActionDefinitionImpl
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @param name action definition name
|
||||
* @param name
|
||||
* action definition name
|
||||
*/
|
||||
public RecordsManagementActionDefinitionImpl(String name)
|
||||
{
|
||||
@@ -57,7 +58,8 @@ public class RecordsManagementActionDefinitionImpl extends ActionDefinitionImpl
|
||||
}
|
||||
|
||||
/**
|
||||
* @param applicableKinds applicable kinds
|
||||
* @param applicableKinds
|
||||
* applicable kinds
|
||||
*/
|
||||
public void setApplicableKinds(Set<FilePlanComponentKind> applicableKinds)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,8 @@ public class RecordsManagementActionResult
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param value result value
|
||||
* @param value
|
||||
* result value
|
||||
*/
|
||||
public RecordsManagementActionResult(Object value)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,6 @@ import java.util.Map;
|
||||
import org.alfresco.api.AlfrescoPublicApi;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
|
||||
/**
|
||||
* Records management action service interface
|
||||
*
|
||||
@@ -59,8 +58,7 @@ public interface RecordsManagementActionService
|
||||
List<RecordsManagementActionCondition> getRecordsManagementActionConditions();
|
||||
|
||||
/**
|
||||
* Get a list of the available disposition actions. A disposition action is a records
|
||||
* management action that can be used when defining disposition instructions.
|
||||
* Get a list of the available disposition actions. A disposition action is a records management action that can be used when defining disposition instructions.
|
||||
*
|
||||
* @return List of disposition actions
|
||||
*/
|
||||
@@ -69,7 +67,8 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Gets the named records management action
|
||||
*
|
||||
* @param name The name of the RM action to retrieve
|
||||
* @param name
|
||||
* The name of the RM action to retrieve
|
||||
* @return The RecordsManagementAction or null if it doesn't exist
|
||||
*/
|
||||
RecordsManagementAction getRecordsManagementAction(String name);
|
||||
@@ -77,7 +76,8 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Gets the named disposition action
|
||||
*
|
||||
* @param name The name of the disposition action to retrieve
|
||||
* @param name
|
||||
* The name of the disposition action to retrieve
|
||||
* @return The RecordsManagementAction or null if it doesn't exist
|
||||
*/
|
||||
RecordsManagementAction getDispositionAction(String name);
|
||||
@@ -85,8 +85,10 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Execute a records management action
|
||||
*
|
||||
* @param nodeRef node reference to a rm container, rm folder or record
|
||||
* @param name action name
|
||||
* @param nodeRef
|
||||
* node reference to a rm container, rm folder or record
|
||||
* @param name
|
||||
* action name
|
||||
* @return The result of executed records management action
|
||||
*/
|
||||
RecordsManagementActionResult executeRecordsManagementAction(NodeRef nodeRef, String name);
|
||||
@@ -94,8 +96,10 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Execute a records management action against several nodes
|
||||
*
|
||||
* @param nodeRefs node references to rm containers, rm folders or records
|
||||
* @param name action name
|
||||
* @param nodeRefs
|
||||
* node references to rm containers, rm folders or records
|
||||
* @param name
|
||||
* action name
|
||||
* @return The result of executed records management action against several nodes
|
||||
*/
|
||||
Map<NodeRef, RecordsManagementActionResult> executeRecordsManagementAction(List<NodeRef> nodeRefs, String name);
|
||||
@@ -103,9 +107,12 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Execute a records management action
|
||||
*
|
||||
* @param nodeRef node reference to a rm container, rm folder or record
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
* @param nodeRef
|
||||
* node reference to a rm container, rm folder or record
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @return The result of executed records management action
|
||||
*/
|
||||
RecordsManagementActionResult executeRecordsManagementAction(NodeRef nodeRef, String name, Map<String, Serializable> parameters);
|
||||
@@ -113,19 +120,23 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Execute a records management action against several nodes
|
||||
*
|
||||
* @param nodeRefs node references to rm containers, rm folders or records
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
* @param nodeRefs
|
||||
* node references to rm containers, rm folders or records
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @return The result of executed records management action against several nodes
|
||||
*/
|
||||
Map<NodeRef, RecordsManagementActionResult> executeRecordsManagementAction(List<NodeRef> nodeRefs, String name, Map<String, Serializable> parameters);
|
||||
|
||||
/**
|
||||
* Execute a records management action. The nodeRef against which the action is to be
|
||||
* executed must be provided by the RecordsManagementAction implementation.
|
||||
* Execute a records management action. The nodeRef against which the action is to be executed must be provided by the RecordsManagementAction implementation.
|
||||
*
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
* @return The result of executed records management action
|
||||
*/
|
||||
RecordsManagementActionResult executeRecordsManagementAction(String name, Map<String, Serializable> parameters);
|
||||
@@ -133,14 +144,16 @@ public interface RecordsManagementActionService
|
||||
/**
|
||||
* Register records management action
|
||||
*
|
||||
* @param rmAction records management action
|
||||
* @param rmAction
|
||||
* records management action
|
||||
*/
|
||||
void register(RecordsManagementAction rmAction);
|
||||
|
||||
/**
|
||||
* Register records management condition
|
||||
*
|
||||
* @param rmCondition records management condition
|
||||
* @param rmCondition
|
||||
* records management condition
|
||||
* @since 2.1
|
||||
*/
|
||||
void register(RecordsManagementActionCondition rmCondition);
|
||||
|
||||
@@ -36,6 +36,8 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementPolicies.BeforeRMActionExecution;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementPolicies.OnRMActionExecution;
|
||||
@@ -46,7 +48,6 @@ import org.alfresco.repo.policy.PolicyComponent;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Records Management Action Service Implementation
|
||||
@@ -104,7 +105,8 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
}
|
||||
|
||||
/**
|
||||
* @param freezeService freeze service
|
||||
* @param freezeService
|
||||
* freeze service
|
||||
*/
|
||||
public void setFreezeService(FreezeService freezeService)
|
||||
{
|
||||
@@ -119,7 +121,8 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Set the policy component
|
||||
*
|
||||
* @param policyComponent policy component
|
||||
* @param policyComponent
|
||||
* policy component
|
||||
*/
|
||||
public void setPolicyComponent(PolicyComponent policyComponent)
|
||||
{
|
||||
@@ -129,7 +132,8 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Set the node service
|
||||
*
|
||||
* @param nodeService node service
|
||||
* @param nodeService
|
||||
* node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -173,9 +177,12 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Invoke beforeRMActionExecution policy
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
*/
|
||||
protected void invokeBeforeRMActionExecution(NodeRef nodeRef, String name, Map<String, Serializable> parameters)
|
||||
{
|
||||
@@ -189,9 +196,12 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Invoke onRMActionExecution policy
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param name action name
|
||||
* @param parameters action parameters
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param name
|
||||
* action name
|
||||
* @param parameters
|
||||
* action parameters
|
||||
*/
|
||||
protected void invokeOnRMActionExecution(NodeRef nodeRef, String name, Map<String, Serializable> parameters)
|
||||
{
|
||||
@@ -226,7 +236,8 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
|
||||
/**
|
||||
* Gets the disposition actions for the given node
|
||||
*
|
||||
* @param nodeRef The node reference
|
||||
* @param nodeRef
|
||||
* The node reference
|
||||
* @return List of records management action
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
|
||||
@@ -30,17 +30,18 @@ package org.alfresco.module.org_alfresco_module_rm.action;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
|
||||
/**
|
||||
* Scheduled disposition job.
|
||||
@@ -59,11 +60,9 @@ public class ScheduledDispositionJob implements Job
|
||||
*/
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException
|
||||
{
|
||||
RecordsManagementActionService rmActionService
|
||||
= (RecordsManagementActionService)context.getJobDetail().getJobDataMap().get("recordsManagementActionService");
|
||||
RecordsManagementActionService rmActionService = (RecordsManagementActionService) context.getJobDetail().getJobDataMap().get("recordsManagementActionService");
|
||||
NodeService nodeService = (NodeService) context.getJobDetail().getJobDataMap().get("nodeService");
|
||||
|
||||
|
||||
// Calculate the date range used in the query
|
||||
Calendar cal = Calendar.getInstance();
|
||||
String year = String.valueOf(cal.get(Calendar.YEAR));
|
||||
|
||||
@@ -46,7 +46,8 @@ public class CustomParameterConstraint extends BaseParameterConstraint
|
||||
/**
|
||||
* Sets the parameter values
|
||||
*
|
||||
* @param parameterValues The parameter values
|
||||
* @param parameterValues
|
||||
* The parameter values
|
||||
*/
|
||||
public void setParameterValues(List<String> parameterValues)
|
||||
{
|
||||
|
||||
@@ -68,5 +68,4 @@ public class DispositionActionParameterConstraint extends BaseParameterConstrain
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -71,5 +71,4 @@ public class ManualEventParameterConstraint extends BaseParameterConstraint
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -64,7 +64,8 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* @param recordService record service
|
||||
* @param recordService
|
||||
* record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
@@ -72,7 +73,8 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dictionaryService dictionary service
|
||||
* @param dictionaryService
|
||||
* dictionary service
|
||||
*/
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
@@ -80,7 +82,8 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -92,8 +95,7 @@ public class RecordTypeParameterConstraint extends BaseParameterConstraint
|
||||
*/
|
||||
protected Map<String, String> getAllowableValuesImpl()
|
||||
{
|
||||
return AuthenticationUtil.runAsSystem(new RunAsWork<Map<String, String>>()
|
||||
{
|
||||
return AuthenticationUtil.runAsSystem(new RunAsWork<Map<String, String>>() {
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<String, String> doWork()
|
||||
{
|
||||
|
||||
@@ -81,7 +81,8 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
private RecordService recordService;
|
||||
|
||||
/**
|
||||
* @param nodeService node service
|
||||
* @param nodeService
|
||||
* node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -89,7 +90,8 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -97,16 +99,17 @@ public class CreateRecordAction extends AuditableActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param authenticationUtil authentication util
|
||||
* @param authenticationUtil
|
||||
* authentication util
|
||||
*/
|
||||
public void setAuthenticationUtil(AuthenticationUtil authenticationUtil)
|
||||
{
|
||||
this.authenticationUtil = authenticationUtil;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param recordService record service
|
||||
* @param recordService
|
||||
* record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,10 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.AuditableActionExecuterAbstractBase;
|
||||
@@ -50,9 +54,6 @@ import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Creates a new record from the 'current' document version.
|
||||
@@ -104,7 +105,8 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
private CapabilityService capabilityService;
|
||||
|
||||
/**
|
||||
* @param nodeService node service
|
||||
* @param nodeService
|
||||
* node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -112,7 +114,8 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -120,7 +123,8 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dictionaryService dictionary service
|
||||
* @param dictionaryService
|
||||
* dictionary service
|
||||
*/
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
@@ -128,7 +132,8 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordableVersionService recordable version service
|
||||
* @param recordableVersionService
|
||||
* recordable version service
|
||||
*/
|
||||
public void setRecordableVersionService(RecordableVersionService recordableVersionService)
|
||||
{
|
||||
@@ -136,7 +141,8 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param authenticationUtil authentication util
|
||||
* @param authenticationUtil
|
||||
* authentication util
|
||||
*/
|
||||
public void setAuthenticationUtil(AuthenticationUtil authenticationUtil)
|
||||
{
|
||||
@@ -144,7 +150,8 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordService record service
|
||||
* @param recordService
|
||||
* record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
@@ -152,7 +159,8 @@ public class DeclareAsVersionRecordAction extends AuditableActionExecuterAbstrac
|
||||
}
|
||||
|
||||
/**
|
||||
* @param capabilityService capability service
|
||||
* @param capabilityService
|
||||
* capability service
|
||||
*/
|
||||
public void setCapabilityService(CapabilityService capabilityService)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,9 @@ package org.alfresco.module.org_alfresco_module_rm.action.dm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.AuditableActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.InplaceRecordService;
|
||||
@@ -36,8 +39,6 @@ import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Hides a record within a collaboration site.
|
||||
@@ -64,7 +65,8 @@ public class HideRecordAction extends AuditableActionExecuterAbstractBase
|
||||
private InplaceRecordService inplaceRecordService;
|
||||
|
||||
/**
|
||||
* @param nodeService node service
|
||||
* @param nodeService
|
||||
* node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -72,7 +74,8 @@ public class HideRecordAction extends AuditableActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param inplaceRecordService inplace record service
|
||||
* @param inplaceRecordService
|
||||
* inplace record service
|
||||
*/
|
||||
public void setInplaceRecordService(InplaceRecordService inplaceRecordService)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,10 @@ package org.alfresco.module.org_alfresco_module_rm.action.dm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.AuditableActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
@@ -37,13 +41,9 @@ import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Moves a record within a collaboration site.
|
||||
* The record can be moved only within the collaboration site where it was declared.
|
||||
* Moves a record within a collaboration site. The record can be moved only within the collaboration site where it was declared.
|
||||
*
|
||||
* @author Tuna Aksoy
|
||||
* @since 2.3
|
||||
@@ -78,7 +78,8 @@ public class MoveDmRecordAction extends AuditableActionExecuterAbstractBase impl
|
||||
/**
|
||||
* Sets the node service
|
||||
*
|
||||
* @param nodeService Node service
|
||||
* @param nodeService
|
||||
* Node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -98,7 +99,8 @@ public class MoveDmRecordAction extends AuditableActionExecuterAbstractBase impl
|
||||
/**
|
||||
* Sets the inplace record service
|
||||
*
|
||||
* @param inplaceRecordService Inplace record service
|
||||
* @param inplaceRecordService
|
||||
* Inplace record service
|
||||
*/
|
||||
public void setInplaceRecordService(InplaceRecordService inplaceRecordService)
|
||||
{
|
||||
@@ -126,7 +128,8 @@ public class MoveDmRecordAction extends AuditableActionExecuterAbstractBase impl
|
||||
/**
|
||||
* Helper method to get the target node reference from the action parameter
|
||||
*
|
||||
* @param action The action
|
||||
* @param action
|
||||
* The action
|
||||
* @return Node reference of the target
|
||||
*/
|
||||
private NodeRef getTargetNodeRef(Action action)
|
||||
|
||||
@@ -29,6 +29,10 @@ package org.alfresco.module.org_alfresco_module_rm.action.dm;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
@@ -37,9 +41,6 @@ import org.alfresco.module.org_alfresco_module_rm.util.AuthenticationUtil;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Utility class containing helper methods for record
|
||||
@@ -54,8 +55,7 @@ public class RecordActionUtils
|
||||
|
||||
/** Private constructor to prevent instantiation. */
|
||||
private RecordActionUtils()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
static class Services
|
||||
{
|
||||
@@ -89,8 +89,10 @@ public class RecordActionUtils
|
||||
/**
|
||||
* Helper method to get the target record folder node reference from the action path parameter
|
||||
*
|
||||
* @param filePlan The filePlan containing the path
|
||||
* @param pathParameter The path
|
||||
* @param filePlan
|
||||
* The filePlan containing the path
|
||||
* @param pathParameter
|
||||
* The path
|
||||
* @return The NodeRef of the resolved path
|
||||
*/
|
||||
static NodeRef resolvePath(Services services, NodeRef filePlan, final String pathParameter, String actionName)
|
||||
@@ -124,8 +126,10 @@ public class RecordActionUtils
|
||||
/**
|
||||
* Helper method to recursively get the next path element node reference from the action path parameter
|
||||
*
|
||||
* @param parent The parent of the path elements
|
||||
* @param pathElements The path elements still to be resolved
|
||||
* @param parent
|
||||
* The parent of the path elements
|
||||
* @param pathElements
|
||||
* The path elements still to be resolved
|
||||
* @return The NodeRef of the resolved path element
|
||||
*/
|
||||
static NodeRef resolvePath(NodeService nodeService, NodeRef parent, List<String> pathElements, String actionName)
|
||||
@@ -165,8 +169,7 @@ public class RecordActionUtils
|
||||
// if the file plan is still null, raise an exception
|
||||
if (filePlan == null)
|
||||
{
|
||||
final String logMessage =
|
||||
String.format("Unable to execute %s action, because the fileplan path could not be determined. Make sure at least one file plan has been created.", actionName);
|
||||
final String logMessage = String.format("Unable to execute %s action, because the fileplan path could not be determined. Make sure at least one file plan has been created.", actionName);
|
||||
LOGGER.debug(logMessage);
|
||||
throw new AlfrescoRuntimeException(logMessage);
|
||||
}
|
||||
|
||||
@@ -27,15 +27,18 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.dm;
|
||||
|
||||
import static org.apache.commons.logging.LogFactory.getLog;
|
||||
|
||||
import static org.alfresco.model.ContentModel.ASPECT_VERSIONABLE;
|
||||
import static org.alfresco.model.ContentModel.TYPE_CONTENT;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.ASPECT_RECORD;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionModel.PROP_RECORDABLE_VERSION_POLICY;
|
||||
import static org.alfresco.service.cmr.dictionary.DataTypeDefinition.TEXT;
|
||||
import static org.apache.commons.logging.LogFactory.getLog;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionPolicy;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
|
||||
@@ -45,7 +48,6 @@ import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
/**
|
||||
* Sets the recordable version config for a document within a collaboration site.
|
||||
@@ -85,7 +87,8 @@ public class RecordableVersionConfigAction extends ActionExecuterAbstractBase
|
||||
/**
|
||||
* Sets the node service
|
||||
*
|
||||
* @param nodeService The node service
|
||||
* @param nodeService
|
||||
* The node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -135,7 +138,8 @@ public class RecordableVersionConfigAction extends ActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method to do checks on the actioned upon node reference
|
||||
*
|
||||
* @param actionedUponNodeRef The actioned upon node reference
|
||||
* @param actionedUponNodeRef
|
||||
* The actioned upon node reference
|
||||
* @return <code>true</code> if the actioned upon node reference passes the checks, <code>false</code> otherwise
|
||||
*/
|
||||
private boolean passedChecks(NodeRef actionedUponNodeRef)
|
||||
@@ -189,8 +193,10 @@ public class RecordableVersionConfigAction extends ActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method to construct log message
|
||||
*
|
||||
* @param actionedUponNodeRef The actioned upon node reference
|
||||
* @param messagePart The message which should be appended.
|
||||
* @param actionedUponNodeRef
|
||||
* The actioned upon node reference
|
||||
* @param messagePart
|
||||
* The message which should be appended.
|
||||
* @return The constructed log message
|
||||
*/
|
||||
private String buildLogMessage(NodeRef actionedUponNodeRef, String messagePart)
|
||||
|
||||
@@ -34,8 +34,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.util.ParameterCheck;
|
||||
|
||||
/**
|
||||
* Records management evaluator base implementation that delegates to a configured capability condition
|
||||
* implementation.
|
||||
* Records management evaluator base implementation that delegates to a configured capability condition implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
@@ -46,7 +45,8 @@ public class CapabilityConditionEvaluator extends RecordsManagementActionConditi
|
||||
private CapabilityCondition capabilityCondition;
|
||||
|
||||
/**
|
||||
* @param capabilityCondition capability condition
|
||||
* @param capabilityCondition
|
||||
* capability condition
|
||||
*/
|
||||
public void setCapabilityCondition(CapabilityCondition capabilityCondition)
|
||||
{
|
||||
|
||||
@@ -36,8 +36,7 @@ import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* Records management action condition who's implementation is delegated to an existing
|
||||
* action condition.
|
||||
* Records management action condition who's implementation is delegated to an existing action condition.
|
||||
* <p>
|
||||
* Useful for creating a RM version of an existing action condition implementation.
|
||||
*
|
||||
@@ -52,7 +51,8 @@ public class DelegateActionCondition extends RecordsManagementActionConditionEva
|
||||
/**
|
||||
* Sets the action condition evaluator
|
||||
*
|
||||
* @param actionConditionEvaluator The action condition evaluator
|
||||
* @param actionConditionEvaluator
|
||||
* The action condition evaluator
|
||||
*/
|
||||
public void setActionConditionEvaluator(ActionConditionEvaluator actionConditionEvaluator)
|
||||
{
|
||||
|
||||
@@ -41,8 +41,6 @@ import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Records management hasDispositionAction evaluator that evaluates whether the given node's disposition schedule has the specified disposition action.
|
||||
*
|
||||
@@ -65,7 +63,8 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
|
||||
/**
|
||||
* Sets the disposition service
|
||||
*
|
||||
* @param dispositionService The disposition service
|
||||
* @param dispositionService
|
||||
* The disposition service
|
||||
*/
|
||||
public void setDispositionService(DispositionService dispositionService)
|
||||
{
|
||||
@@ -79,7 +78,6 @@ public class HasDispositionActionEvaluator extends RecordsManagementActionCondit
|
||||
String position = ((QName) actionCondition.getParameterValue(PARAM_DISPOSITION_ACTION_RELATIVE_POSITION)).getLocalName();
|
||||
String action = ((QName) actionCondition.getParameterValue(PARAM_DISPOSITION_ACTION)).getLocalName();
|
||||
|
||||
|
||||
if (dispositionService.isDisposableItem(actionedUponNodeRef))
|
||||
{
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@ import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Records management IsKind evaluator that evaluates according to the file plan
|
||||
* component kind passed in.
|
||||
|
||||
@@ -62,7 +62,8 @@ public class IsRecordTypeEvaluator extends RecordsManagementActionConditionEvalu
|
||||
/**
|
||||
* Sets the node service
|
||||
*
|
||||
* @param nodeService The node service
|
||||
* @param nodeService
|
||||
* The node service
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,10 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
@@ -36,9 +40,6 @@ import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Action to add types to a record
|
||||
@@ -64,8 +65,7 @@ public class AddRecordTypeAction extends RMActionExecuterAbstractBase
|
||||
public static final String NAME = "addRecordTypes";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -84,14 +84,10 @@ public class AddRecordTypeAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action
|
||||
* The preconditions are:
|
||||
* - The node must exist
|
||||
* - The node must not be frozen
|
||||
* - The node must be record
|
||||
* - The node must not be declared
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action The preconditions are: - The node must exist - The node must not be frozen - The node must be record - The node must not be declared
|
||||
*
|
||||
* @param actionedUponNodeRef node reference
|
||||
* @param actionedUponNodeRef
|
||||
* node reference
|
||||
* @return Return true if the node reference passes all the preconditions for executing the action, false otherwise
|
||||
*/
|
||||
private boolean eligibleForAction(NodeRef actionedUponNodeRef)
|
||||
@@ -110,7 +106,8 @@ public class AddRecordTypeAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method to get the record types from the action
|
||||
*
|
||||
* @param action The action
|
||||
* @param action
|
||||
* The action
|
||||
* @return An array of record types
|
||||
*/
|
||||
private String[] getRecordTypes(Action action)
|
||||
|
||||
@@ -33,6 +33,10 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
@@ -42,13 +46,9 @@ import org.alfresco.service.cmr.dictionary.AspectDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* This class applies the aspect specified in the spring bean property customTypeAspect.
|
||||
* It is used to apply one of the 4 "custom type" aspects from the DOD 5015 model.
|
||||
* This class applies the aspect specified in the spring bean property customTypeAspect. It is used to apply one of the 4 "custom type" aspects from the DOD 5015 model.
|
||||
*
|
||||
* @author Neil McErlean
|
||||
*/
|
||||
@@ -106,9 +106,7 @@ public class ApplyCustomTypeAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* This method converts a Map of String, Serializable to a Map of QName, Serializable.
|
||||
* To do this, it assumes that each parameter name is a String representing a qname
|
||||
* of the form prefix:localName.
|
||||
* This method converts a Map of String, Serializable to a Map of QName, Serializable. To do this, it assumes that each parameter name is a String representing a qname of the form prefix:localName.
|
||||
*/
|
||||
private Map<QName, Serializable> getPropertyValues(Action action)
|
||||
{
|
||||
|
||||
@@ -35,6 +35,9 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition;
|
||||
@@ -47,13 +50,9 @@ import org.alfresco.service.cmr.action.ParameterDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.Period;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Action to implement the consequences of a change to the value of the DispositionActionDefinition
|
||||
* properties. When these properties are changed on a disposition schedule, then any associated
|
||||
* disposition actions may need to be updated as a consequence.
|
||||
* Action to implement the consequences of a change to the value of the DispositionActionDefinition properties. When these properties are changed on a disposition schedule, then any associated disposition actions may need to be updated as a consequence.
|
||||
*
|
||||
* @author Neil McErlean
|
||||
*/
|
||||
@@ -73,8 +72,7 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
@@ -141,7 +139,8 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
/**
|
||||
* Manually update the rolled up search properties
|
||||
*
|
||||
* @param disposableItem disposable item
|
||||
* @param disposableItem
|
||||
* disposable item
|
||||
*/
|
||||
private void rollupSearchProperties(NodeRef disposableItem)
|
||||
{
|
||||
@@ -180,12 +179,14 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes all the changes applied to the given disposition
|
||||
* action definition node for the given record or folder node.
|
||||
* Processes all the changes applied to the given disposition action definition node for the given record or folder node.
|
||||
*
|
||||
* @param dispositionActionDef The disposition action definition node
|
||||
* @param changedProps The set of properties changed on the action definition
|
||||
* @param recordOrFolder The record or folder the changes potentially need to be applied to
|
||||
* @param dispositionActionDef
|
||||
* The disposition action definition node
|
||||
* @param changedProps
|
||||
* The set of properties changed on the action definition
|
||||
* @param recordOrFolder
|
||||
* The record or folder the changes potentially need to be applied to
|
||||
*/
|
||||
private void processActionDefinitionChanges(NodeRef dispositionActionDef, List<QName> changedProps, NodeRef recordOrFolder)
|
||||
{
|
||||
@@ -216,11 +217,12 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the disposition action definition (step) being
|
||||
* updated has any effect on the given next action
|
||||
* Determines whether the disposition action definition (step) being updated has any effect on the given next action
|
||||
*
|
||||
* @param dispositionActionDef The disposition action definition node
|
||||
* @param nextAction The next disposition action
|
||||
* @param dispositionActionDef
|
||||
* The disposition action definition node
|
||||
* @param nextAction
|
||||
* The next disposition action
|
||||
* @return true if the step change affects the next action
|
||||
*/
|
||||
private boolean doesChangedStepAffectNextAction(NodeRef dispositionActionDef,
|
||||
@@ -243,11 +245,12 @@ public class BroadcastDispositionActionDefinitionUpdateAction extends RMActionEx
|
||||
}
|
||||
|
||||
/**
|
||||
* Persists any changes made to the period on the given disposition action
|
||||
* definition on the given next action.
|
||||
* Persists any changes made to the period on the given disposition action definition on the given next action.
|
||||
*
|
||||
* @param dispositionActionDef The disposition action definition node
|
||||
* @param nextAction The next disposition action
|
||||
* @param dispositionActionDef
|
||||
* The disposition action definition node
|
||||
* @param nextAction
|
||||
* The next disposition action
|
||||
*/
|
||||
protected void persistPeriodChanges(NodeRef dispositionActionDef, DispositionAction nextAction)
|
||||
{
|
||||
|
||||
@@ -44,8 +44,7 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
public static final String PARAM_CLOSE_PARENT = "closeParent";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, final NodeRef actionedUponNodeRef)
|
||||
@@ -53,8 +52,7 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
if (eligibleForAction(actionedUponNodeRef))
|
||||
{
|
||||
// do the work of creating the record as the system user
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() {
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
@@ -67,12 +65,10 @@ public class CloseRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action
|
||||
* The preconditions are:
|
||||
* - The node must exist
|
||||
* - The node must not be frozen
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action The preconditions are: - The node must exist - The node must not be frozen
|
||||
*
|
||||
* @param actionedUponNodeRef node reference
|
||||
* @param actionedUponNodeRef
|
||||
* node reference
|
||||
* @return Return true if the node reference passes all the preconditions for executing the action, false otherwise
|
||||
*/
|
||||
private boolean eligibleForAction(NodeRef actionedUponNodeRef)
|
||||
|
||||
@@ -69,8 +69,7 @@ public class CompleteEventAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
|
||||
@@ -30,6 +30,10 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
@@ -46,9 +50,6 @@ import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.model.FileNotFoundException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* File To action implementation.
|
||||
@@ -93,7 +94,8 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
/**
|
||||
* Sets the action mode
|
||||
*
|
||||
* @param mode Action mode
|
||||
* @param mode
|
||||
* Action mode
|
||||
*/
|
||||
protected void setMode(CopyMoveLinkFileToActionMode mode)
|
||||
{
|
||||
@@ -101,7 +103,8 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
}
|
||||
|
||||
/**
|
||||
* @param fileFolderService file folder service
|
||||
* @param fileFolderService
|
||||
* file folder service
|
||||
*/
|
||||
public void setFileFolderService(FileFolderService fileFolderService)
|
||||
{
|
||||
@@ -109,7 +112,8 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -159,8 +163,7 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
validateActionPostPathResolution(actionedUponNodeRef, recordFolder, actionName, targetIsUnfiledRecords);
|
||||
|
||||
final NodeRef finalRecordFolder = recordFolder;
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() {
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
@@ -272,7 +275,8 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
*
|
||||
* @param action
|
||||
* @param actionedUponNodeRef
|
||||
* @param targetisUnfiledRecords true is the target is in unfiled records
|
||||
* @param targetisUnfiledRecords
|
||||
* true is the target is in unfiled records
|
||||
* @return
|
||||
*/
|
||||
private NodeRef createOrResolvePath(final Action action, final NodeRef actionedUponNodeRef, final boolean targetisUnfiledRecords)
|
||||
@@ -293,8 +297,7 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
final boolean isRecord = getDictionaryService().isSubClass(type, ContentModel.TYPE_CONTENT);
|
||||
|
||||
// create or resolve the specified path
|
||||
path = getTransactionService().getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>()
|
||||
{
|
||||
path = getTransactionService().getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<NodeRef>() {
|
||||
public NodeRef execute() throws Throwable
|
||||
{
|
||||
return createOrResolvePath(action, context, actionedUponNodeRef, isRecord, Arrays.asList(pathElementsArray), targetisUnfiledRecords, create, false);
|
||||
@@ -307,14 +310,22 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
/**
|
||||
* Create or resolve the specified path
|
||||
*
|
||||
* @param action Action to use for reporting if anything goes wrong
|
||||
* @param parent Parent of path to be created
|
||||
* @param actionedUponNodeRef The node subject to the file/move/copy action
|
||||
* @param isRecord true if node is a CONTENT SubType
|
||||
* @param pathElements The elements of the path to be created
|
||||
* @param targetisUnfiledRecords true if the target is within unfiled records
|
||||
* @param create true if the path should be creeated if it does not exist
|
||||
* @param creating true if we have already created the parent and therefore can skip the check to see if the next path element already exists
|
||||
* @param action
|
||||
* Action to use for reporting if anything goes wrong
|
||||
* @param parent
|
||||
* Parent of path to be created
|
||||
* @param actionedUponNodeRef
|
||||
* The node subject to the file/move/copy action
|
||||
* @param isRecord
|
||||
* true if node is a CONTENT SubType
|
||||
* @param pathElements
|
||||
* The elements of the path to be created
|
||||
* @param targetisUnfiledRecords
|
||||
* true if the target is within unfiled records
|
||||
* @param create
|
||||
* true if the path should be creeated if it does not exist
|
||||
* @param creating
|
||||
* true if we have already created the parent and therefore can skip the check to see if the next path element already exists
|
||||
* @return
|
||||
*/
|
||||
private NodeRef createOrResolvePath(Action action, NodeRef parent, NodeRef actionedUponNodeRef, boolean isRecord, List<String> pathElements, boolean targetisUnfiledRecords, boolean create, boolean creating)
|
||||
@@ -371,11 +382,16 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
||||
/**
|
||||
* Create the specified child of the specified parent
|
||||
*
|
||||
* @param action Action to use for reporting if anything goes wrong
|
||||
* @param parent Parent of the child to be created
|
||||
* @param childName The name of the child to be created
|
||||
* @param targetisUnfiledRecords true if the child is being created in the unfiled directory (determines type as unfiled container child)
|
||||
* @param lastAsFolder true if this is the last element of the pathe being created and it should be created as a folder. ignored if targetIsUnfiledRecords is true
|
||||
* @param action
|
||||
* Action to use for reporting if anything goes wrong
|
||||
* @param parent
|
||||
* Parent of the child to be created
|
||||
* @param childName
|
||||
* The name of the child to be created
|
||||
* @param targetisUnfiledRecords
|
||||
* true if the child is being created in the unfiled directory (determines type as unfiled container child)
|
||||
* @param lastAsFolder
|
||||
* true if this is the last element of the pathe being created and it should be created as a folder. ignored if targetIsUnfiledRecords is true
|
||||
* @return
|
||||
*/
|
||||
private NodeRef createChild(final Action action, final NodeRef parent, final String childName, final boolean targetisUnfiledRecords, final boolean lastAsFolder)
|
||||
|
||||
@@ -27,12 +27,13 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Create disposition schedule action
|
||||
@@ -48,7 +49,8 @@ public class CreateDispositionScheduleAction extends RMActionExecuterAbstractBas
|
||||
private FilePlanService filePlanService;
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -73,12 +75,10 @@ public class CreateDispositionScheduleAction extends RMActionExecuterAbstractBas
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action
|
||||
* The preconditions are:
|
||||
* - The node must exist
|
||||
* - The node must not be a record category
|
||||
* Helper method to check the actioned upon node reference to decide to execute the action The preconditions are: - The node must exist - The node must not be a record category
|
||||
*
|
||||
* @param actionedUponNodeRef node reference
|
||||
* @param actionedUponNodeRef
|
||||
* node reference
|
||||
* @return Return true if the node reference passes all the preconditions for executing the action, false otherwise
|
||||
*/
|
||||
private boolean eligibleForAction(NodeRef actionedUponNodeRef)
|
||||
|
||||
@@ -69,12 +69,12 @@ public class CutOffAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the record or folder has been uncut off. If it has and this cut off action is an
|
||||
* automated disposition action then the cut off isn't run. If it has and this is a manual
|
||||
* cut off action then the uncut off aspect is removed prior to the uncut action.
|
||||
* Check if the record or folder has been uncut off. If it has and this cut off action is an automated disposition action then the cut off isn't run. If it has and this is a manual cut off action then the uncut off aspect is removed prior to the uncut action.
|
||||
*
|
||||
* @param action The cut off action
|
||||
* @param recordOrFolder The record or folder to be cut off
|
||||
* @param action
|
||||
* The cut off action
|
||||
* @param recordOrFolder
|
||||
* The record or folder to be cut off
|
||||
* @return True if the record or folder can be cut off
|
||||
*/
|
||||
private boolean checkUncutOffStatus(Action action, NodeRef recordOrFolder)
|
||||
|
||||
@@ -54,7 +54,8 @@ public class DeclareRecordAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Sets the record service
|
||||
*
|
||||
* @param recordService record service
|
||||
* @param recordService
|
||||
* record service
|
||||
*/
|
||||
public void setRecordService(RecordService recordService)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,8 @@ public class DelegateAction extends RMActionExecuterAbstractBase
|
||||
private boolean checkFrozen = false;
|
||||
|
||||
/**
|
||||
* @param delegateActionExecuter delegate action executer
|
||||
* @param delegateActionExecuter
|
||||
* delegate action executer
|
||||
*/
|
||||
public void setDelegateAction(ActionExecuter delegateActionExecuter)
|
||||
{
|
||||
@@ -60,7 +61,8 @@ public class DelegateAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param checkFrozen true if we check whether the actioned upon node reference is frozen, false otherwise
|
||||
* @param checkFrozen
|
||||
* true if we check whether the actioned upon node reference is frozen, false otherwise
|
||||
*/
|
||||
public void setCheckFrozen(boolean checkFrozen)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,8 @@ import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMDispositionActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.content.ContentDestructionComponent;
|
||||
@@ -43,7 +45,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.cmr.version.Version;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* Destroy action.
|
||||
@@ -71,7 +72,8 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
private boolean ghostingEnabled = true;
|
||||
|
||||
/**
|
||||
* @param contentDestructionComponent content destruction component
|
||||
* @param contentDestructionComponent
|
||||
* content destruction component
|
||||
*/
|
||||
public void setContentDestructionComponent(ContentDestructionComponent contentDestructionComponent)
|
||||
{
|
||||
@@ -79,7 +81,8 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param capabilityService capability service
|
||||
* @param capabilityService
|
||||
* capability service
|
||||
*/
|
||||
public void setCapabilityService(CapabilityService capabilityService)
|
||||
{
|
||||
@@ -87,7 +90,8 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param recordableVersionService recordable version service
|
||||
* @param recordableVersionService
|
||||
* recordable version service
|
||||
*/
|
||||
public void setRecordableVersionService(RecordableVersionService recordableVersionService)
|
||||
{
|
||||
@@ -95,7 +99,8 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param inplaceRecordService inplace record service
|
||||
* @param inplaceRecordService
|
||||
* inplace record service
|
||||
*/
|
||||
public void setInplaceRecordService(InplaceRecordService inplaceRecordService)
|
||||
{
|
||||
@@ -103,7 +108,8 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ghostingEnabled true if ghosting is enabled, false otherwise
|
||||
* @param ghostingEnabled
|
||||
* true if ghosting is enabled, false otherwise
|
||||
*/
|
||||
public void setGhostingEnabled(boolean ghostingEnabled)
|
||||
{
|
||||
@@ -198,8 +204,7 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the ghost on destroy property is set against the
|
||||
* definition for the passed action on the specified node
|
||||
* Return true if the ghost on destroy property is set against the definition for the passed action on the specified node
|
||||
*
|
||||
* @param action
|
||||
* @param nodeRef
|
||||
|
||||
@@ -29,12 +29,13 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Edit review as of date action.
|
||||
@@ -54,8 +55,7 @@ public class EditDispositionActionAsOfDateAction extends RMActionExecuterAbstrac
|
||||
public static final String PARAM_AS_OF_DATE = "asOfDate";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
|
||||
@@ -27,12 +27,13 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Edit freeze reason Action
|
||||
|
||||
@@ -29,11 +29,12 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -50,8 +51,7 @@ public class EditReviewAsOfDateAction extends RMActionExecuterAbstractBase
|
||||
public static final String PARAM_AS_OF_DATE = "asOfDate";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
@@ -42,8 +45,6 @@ import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* File report generic action.
|
||||
@@ -89,7 +90,8 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reportService report service
|
||||
* @param reportService
|
||||
* report service
|
||||
*/
|
||||
public void setReportService(ReportService reportService)
|
||||
{
|
||||
@@ -97,7 +99,8 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
}
|
||||
|
||||
/**
|
||||
* @param capabilityService capability service
|
||||
* @param capabilityService
|
||||
* capability service
|
||||
*/
|
||||
public void setCapabilityService(CapabilityService capabilityService)
|
||||
{
|
||||
@@ -105,8 +108,7 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -131,8 +133,7 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
final Report report = getReportService().generateReport(reportType, actionedUponNodeRef, mimetype);
|
||||
|
||||
// file the report as system
|
||||
NodeRef filedReport = AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>()
|
||||
{
|
||||
NodeRef filedReport = AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>() {
|
||||
@Override
|
||||
public NodeRef doWork()
|
||||
{
|
||||
@@ -148,7 +149,8 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
/**
|
||||
* Checks if the destination is frozen, closed, cut off or not. In case if it is an exception will be thrown.
|
||||
*
|
||||
* @param nodeRef The destination node reference for which the capability should be checked
|
||||
* @param nodeRef
|
||||
* The destination node reference for which the capability should be checked
|
||||
*/
|
||||
private void checkFilingPermissionOnlyCapability(NodeRef nodeRef)
|
||||
{
|
||||
@@ -159,25 +161,30 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the value of the given parameter. If the parameter has not been
|
||||
* passed from the UI an error will be thrown
|
||||
* Retrieves the value of the given parameter. If the parameter has not been passed from the UI an error will be thrown
|
||||
*
|
||||
* @param action The action
|
||||
* @param parameter The parameter for which the value should be retrieved
|
||||
* @param action
|
||||
* The action
|
||||
* @param parameter
|
||||
* The parameter for which the value should be retrieved
|
||||
* @return The value of the given parameter
|
||||
*/
|
||||
private String getParameterValue(Action action, String parameter)
|
||||
{
|
||||
String paramValue = (String) action.getParameterValue(parameter);
|
||||
if (StringUtils.isBlank(paramValue)) { throw new AlfrescoRuntimeException(I18NUtil.getMessage(
|
||||
MSG_PARAM_NOT_SUPPLIED, parameter)); }
|
||||
if (StringUtils.isBlank(paramValue))
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(
|
||||
MSG_PARAM_NOT_SUPPLIED, parameter));
|
||||
}
|
||||
return paramValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for getting the destination.
|
||||
*
|
||||
* @param action The action
|
||||
* @param action
|
||||
* The action
|
||||
* @return The file plan node reference
|
||||
*/
|
||||
private NodeRef getDestination(Action action)
|
||||
@@ -189,7 +196,8 @@ public class FileReportAction extends RMActionExecuterAbstractBase implements Re
|
||||
/**
|
||||
* Helper method for getting the report type.
|
||||
*
|
||||
* @param action The action
|
||||
* @param action
|
||||
* The action
|
||||
* @return The report type
|
||||
*/
|
||||
private QName getReportType(Action action)
|
||||
|
||||
@@ -67,7 +67,8 @@ public class FreezeAction extends RMActionExecuterAbstractBase
|
||||
if (getNodeService().exists(actionedUponNodeRef) &&
|
||||
!getNodeService().hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) &&
|
||||
(getRecordService().isRecord(actionedUponNodeRef) ||
|
||||
getRecordFolderService().isRecordFolder(actionedUponNodeRef)) &&
|
||||
getRecordFolderService().isRecordFolder(actionedUponNodeRef))
|
||||
&&
|
||||
!getFreezeService().isFrozen(actionedUponNodeRef))
|
||||
{
|
||||
getFreezeService().freeze((String) action.getParameterValue(PARAM_REASON), actionedUponNodeRef);
|
||||
|
||||
@@ -27,14 +27,15 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Action to re-open the records folder
|
||||
@@ -53,8 +54,7 @@ public class OpenRecordFolderAction extends RMActionExecuterAbstractBase
|
||||
public static final String PARAM_OPEN_PARENT = "openParent";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
|
||||
@@ -27,11 +27,12 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Relinquish Hold Action
|
||||
|
||||
@@ -33,6 +33,10 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.repo.action.ParameterDefinitionImpl;
|
||||
@@ -45,9 +49,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.workflow.RMWorkflowModel;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Request info action for starting a workflow to request more information for an undeclared record
|
||||
@@ -75,7 +76,8 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
private WorkflowService workflowService;
|
||||
|
||||
/**
|
||||
* @param workflowService workflow service
|
||||
* @param workflowService
|
||||
* workflow service
|
||||
*/
|
||||
public void setWorkflowService(WorkflowService workflowService)
|
||||
{
|
||||
@@ -123,8 +125,10 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method for creating a workflow package to contain the actioned upon nodeRef
|
||||
*
|
||||
* @param action The request info action
|
||||
* @param actionedUponNodeRef The actioned upon nodeRef
|
||||
* @param action
|
||||
* The request info action
|
||||
* @param actionedUponNodeRef
|
||||
* The actioned upon nodeRef
|
||||
* @return Returns a workflow package containing the actioned upon nodeRef
|
||||
*/
|
||||
private NodeRef getWorkflowPackage(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -139,7 +143,8 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method for getting the assignees from the action
|
||||
*
|
||||
* @param action The request info action
|
||||
* @param action
|
||||
* The request info action
|
||||
* @return Returns a list of {@link NodeRef}s each representing the assignee
|
||||
*/
|
||||
private Serializable getAssignees(Action action)
|
||||
@@ -157,7 +162,8 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method for getting the requested information from the action
|
||||
*
|
||||
* @param action The request info action
|
||||
* @param action
|
||||
* The request info action
|
||||
* @return Returns the requested information
|
||||
*/
|
||||
private Serializable getRequestedInformation(Action action)
|
||||
@@ -168,7 +174,8 @@ public class RequestInfoAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Helper method for getting the rule creator
|
||||
*
|
||||
* @param action The request info action
|
||||
* @param action
|
||||
* The request info action
|
||||
* @return Returns the rule creator
|
||||
*/
|
||||
private Serializable getRuleCreator(Action action)
|
||||
|
||||
@@ -38,7 +38,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import jakarta.mail.MessagingException;
|
||||
import jakarta.mail.Multipart;
|
||||
import jakarta.mail.Part;
|
||||
@@ -46,6 +45,11 @@ import jakarta.mail.internet.ContentType;
|
||||
import jakarta.mail.internet.MimeMessage;
|
||||
import jakarta.mail.internet.MimeUtility;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.ImapModel;
|
||||
@@ -63,10 +67,6 @@ import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
/**
|
||||
* Split Email Action
|
||||
@@ -105,7 +105,8 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Sets the relationship service instance
|
||||
*
|
||||
* @param relationshipService The relationship service instance
|
||||
* @param relationshipService
|
||||
* The relationship service instance
|
||||
*/
|
||||
public void setRelationshipService(RelationshipService relationshipService)
|
||||
{
|
||||
@@ -139,8 +140,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -213,8 +213,11 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
|
||||
/**
|
||||
* Create attachment from Mime Message Part
|
||||
* @param messageNodeRef - the node ref of the mime message
|
||||
* @param parentNodeRef - the node ref of the parent folder
|
||||
*
|
||||
* @param messageNodeRef
|
||||
* - the node ref of the mime message
|
||||
* @param parentNodeRef
|
||||
* - the node ref of the parent folder
|
||||
* @param part
|
||||
* @throws MessagingException
|
||||
* @throws IOException
|
||||
@@ -273,7 +276,6 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
*/
|
||||
createRMReference(messageNodeRef, attachmentRef.getChildRef());
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -281,8 +283,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
*/
|
||||
private void createRMReference(final NodeRef parentRef, final NodeRef childRef)
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() {
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
|
||||
@@ -52,7 +52,8 @@ public class TransferAction extends RMDispositionActionExecuterAbstractBase
|
||||
/**
|
||||
* Indicates whether this transfer is an accession or not
|
||||
*
|
||||
* @param isAccession Is the transfer an accession or not
|
||||
* @param isAccession
|
||||
* Is the transfer an accession or not
|
||||
*/
|
||||
public void setIsAccession(boolean isAccession)
|
||||
{
|
||||
@@ -62,7 +63,8 @@ public class TransferAction extends RMDispositionActionExecuterAbstractBase
|
||||
/**
|
||||
* Sets the transfer service
|
||||
*
|
||||
* @param transferService transfer service
|
||||
* @param transferService
|
||||
* transfer service
|
||||
*/
|
||||
public void setTransferService(TransferService transferService)
|
||||
{
|
||||
@@ -101,8 +103,10 @@ public class TransferAction extends RMDispositionActionExecuterAbstractBase
|
||||
/**
|
||||
* Create the transfer node and link the disposition lifecycle node beneath it
|
||||
*
|
||||
* @param action action
|
||||
* @param dispositionLifeCycleNodeRef disposition lifecycle node
|
||||
* @param action
|
||||
* action
|
||||
* @param dispositionLifeCycleNodeRef
|
||||
* disposition lifecycle node
|
||||
*/
|
||||
private void doTransfer(Action action, NodeRef dispositionLifeCycleNodeRef)
|
||||
{
|
||||
|
||||
@@ -27,13 +27,14 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.transfer.TransferService;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Transfer complete action
|
||||
@@ -60,7 +61,8 @@ public class TransferCompleteAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @param transferService transfer service
|
||||
* @param transferService
|
||||
* transfer service
|
||||
*/
|
||||
public void setTransferService(TransferService transferService)
|
||||
{
|
||||
@@ -68,8 +70,7 @@ public class TransferCompleteAction extends RMActionExecuterAbstractBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action,
|
||||
* org.alfresco.service.cmr.repository.NodeRef)
|
||||
* @see org.alfresco.repo.action.executer.ActionExecuterAbstractBase#executeImpl(org.alfresco.service.cmr.action.Action, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
@@ -81,7 +82,8 @@ public class TransferCompleteAction extends RMActionExecuterAbstractBase
|
||||
/**
|
||||
* Checks if the actioned upon node reference is a sub class of transfer
|
||||
*
|
||||
* @param actionedUponNodeRef actioned upon node reference
|
||||
* @param actionedUponNodeRef
|
||||
* actioned upon node reference
|
||||
*/
|
||||
private void checkTransferSubClass(NodeRef actionedUponNodeRef)
|
||||
{
|
||||
|
||||
@@ -29,12 +29,13 @@ package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* UnCutoff action implementation
|
||||
|
||||
@@ -27,13 +27,14 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.action.impl;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RMActionExecuterAbstractBase;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* Undeclare record action
|
||||
*
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.admin;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Custom metadata exception.
|
||||
*
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.admin;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Custom metadata exception.
|
||||
*
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.admin;
|
||||
|
||||
import org.alfresco.api.AlfrescoPublicApi;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.api.AlfrescoPublicApi;
|
||||
|
||||
/**
|
||||
* Custom metadata exception.
|
||||
*
|
||||
|
||||
@@ -36,6 +36,10 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementCustomModel;
|
||||
@@ -56,9 +60,6 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Base class for RM admin services
|
||||
@@ -149,7 +150,8 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Sets the dictionary service instance
|
||||
*
|
||||
* @param dictionaryService The dictionary service instance
|
||||
* @param dictionaryService
|
||||
* The dictionary service instance
|
||||
*/
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
@@ -159,7 +161,8 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Sets the node service instance
|
||||
*
|
||||
* @param nodeService The node service instance
|
||||
* @param nodeService
|
||||
* The node service instance
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -169,7 +172,8 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Sets the content service instance
|
||||
*
|
||||
* @param contentService The content service instance
|
||||
* @param contentService
|
||||
* The content service instance
|
||||
*/
|
||||
public void setContentService(ContentService contentService)
|
||||
{
|
||||
@@ -179,7 +183,8 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Sets the namespace service instance
|
||||
*
|
||||
* @param namespaceService The namespace service instance
|
||||
* @param namespaceService
|
||||
* The namespace service instance
|
||||
*/
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
@@ -189,7 +194,8 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Sets the dictionary repository bootstrap instance
|
||||
*
|
||||
* @param dictionaryRepositoryBootstrap The dictionary repository bootstrap instance
|
||||
* @param dictionaryRepositoryBootstrap
|
||||
* The dictionary repository bootstrap instance
|
||||
*/
|
||||
public void setDictionaryRepositoryBootstrap(DictionaryRepositoryBootstrap dictionaryRepositoryBootstrap)
|
||||
{
|
||||
@@ -217,7 +223,8 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Gets the node reference of the custom model
|
||||
*
|
||||
* @param uri The URI of the model namespace
|
||||
* @param uri
|
||||
* The URI of the model namespace
|
||||
* @return The node reference of the custom model
|
||||
*/
|
||||
protected NodeRef getCustomModelRef(String uri)
|
||||
@@ -259,7 +266,8 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Gets the deserialized model
|
||||
*
|
||||
* @param modelNodeRef The node reference of the model
|
||||
* @param modelNodeRef
|
||||
* The node reference of the model
|
||||
* @return The deserialized model
|
||||
*/
|
||||
protected M2Model readCustomContentModel(NodeRef modelNodeRef)
|
||||
@@ -299,8 +307,10 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Updates the content of the custom model
|
||||
*
|
||||
* @param modelRef The node reference of the model
|
||||
* @param deserializedModel The deserialized model
|
||||
* @param modelRef
|
||||
* The node reference of the model
|
||||
* @param deserializedModel
|
||||
* The deserialized model
|
||||
*/
|
||||
protected void writeCustomContentModel(NodeRef modelRef, M2Model deserializedModel)
|
||||
{
|
||||
@@ -328,7 +338,8 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Checks if the given association definition title exists
|
||||
*
|
||||
* @param associationDefinitionTitle The association definition title
|
||||
* @param associationDefinitionTitle
|
||||
* The association definition title
|
||||
* @return <code>true</code> if the association definition title exists, <code>false</code> otherwise
|
||||
*/
|
||||
protected boolean existsTitle(String associationDefinitionTitle)
|
||||
@@ -348,7 +359,8 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Splits the association definition title into source text and target text
|
||||
*
|
||||
* @param sourceTargetText The text to split into source text and target text
|
||||
* @param sourceTargetText
|
||||
* The text to split into source text and target text
|
||||
* @return Splited association definition title which includes source text and target text
|
||||
*/
|
||||
protected String[] splitAssociationDefinitionTitle(String sourceTargetText)
|
||||
@@ -364,8 +376,10 @@ public class RecordsManagementAdminBase implements RecordsManagementCustomModel
|
||||
/**
|
||||
* Creates the association definition title form the source text and target text
|
||||
*
|
||||
* @param sourceText The source text
|
||||
* @param targetText The target text
|
||||
* @param sourceText
|
||||
* The source text
|
||||
* @param targetText
|
||||
* The target text
|
||||
* @return The association definition title created from the source text and target text
|
||||
*/
|
||||
protected String composeAssociationDefinitionTitle(String sourceText, String targetText)
|
||||
|
||||
@@ -45,8 +45,7 @@ import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.namespace.QNamePattern;
|
||||
|
||||
/**
|
||||
* Records management custom model service interface. Implementations of this class are responsible
|
||||
* for the creation and maintenance of RM-related custom properties and custom associations.
|
||||
* Records management custom model service interface. Implementations of this class are responsible for the creation and maintenance of RM-related custom properties and custom associations.
|
||||
*
|
||||
* @author Neil McErlean, janv
|
||||
* @since 2.1
|
||||
@@ -63,10 +62,10 @@ public interface RecordsManagementAdminService
|
||||
Set<QName> getCustomisable();
|
||||
|
||||
/**
|
||||
* Get a list of all the registered customisable types and aspects present on a given
|
||||
* node reference.
|
||||
* Get a list of all the registered customisable types and aspects present on a given node reference.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @return Set of <{@link QName}>s of customisable types and aspects, empty if none
|
||||
*/
|
||||
Set<QName> getCustomisable(NodeRef nodeRef);
|
||||
@@ -74,7 +73,8 @@ public interface RecordsManagementAdminService
|
||||
/**
|
||||
* Indicates whether a type (or aspect) is customisable.
|
||||
*
|
||||
* @param type customisable type {@link QName}
|
||||
* @param type
|
||||
* customisable type {@link QName}
|
||||
* @return boolean true if type customisable, false otherwise
|
||||
*/
|
||||
boolean isCustomisable(QName type);
|
||||
@@ -82,48 +82,44 @@ public interface RecordsManagementAdminService
|
||||
/**
|
||||
* Makes a type customisable.
|
||||
*
|
||||
* @param type type {@link QName} to make customisable
|
||||
* @param type
|
||||
* type {@link QName} to make customisable
|
||||
*/
|
||||
void makeCustomisable(QName type);
|
||||
|
||||
/**
|
||||
* Assuming the custom properties are not in use, makes a type no longer customisable.
|
||||
*
|
||||
* @param type type {@link QName} to make customisable
|
||||
* @param type
|
||||
* type {@link QName} to make customisable
|
||||
*/
|
||||
void unmakeCustomisable(QName type);
|
||||
|
||||
/**
|
||||
* Indicates whether the custom property exists.
|
||||
*
|
||||
* @param property properties {@link QName}
|
||||
* @param property
|
||||
* properties {@link QName}
|
||||
* @return boolean true if property exists, false otherwise
|
||||
*/
|
||||
boolean existsCustomProperty(QName property);
|
||||
|
||||
/**
|
||||
* This method returns the custom properties that have been defined for the specified
|
||||
* customisable RM element.
|
||||
* This method returns the custom properties that have been defined for the specified customisable RM element.
|
||||
* <p>
|
||||
* Note: the custom property definitions are retrieved from the dictionaryService
|
||||
* which is notified of any newly created definitions on transaction commit.
|
||||
* Therefore custom properties created in the current transaction will not appear
|
||||
* in the result of this method.
|
||||
* Note: the custom property definitions are retrieved from the dictionaryService which is notified of any newly created definitions on transaction commit. Therefore custom properties created in the current transaction will not appear in the result of this method.
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @param customisableType
|
||||
* @return Map of <{@link QName}, {@link PropertyDefinition}>s of custom properties definitions
|
||||
*/
|
||||
Map<QName, PropertyDefinition> getCustomPropertyDefinitions(QName customisableType);
|
||||
|
||||
/**
|
||||
* This method returns the custom properties that have been defined for all of
|
||||
* the specified customisable RM elements.
|
||||
* This method returns the custom properties that have been defined for all of the specified customisable RM elements.
|
||||
* <p>
|
||||
* Note: the custom property definitions are retrieved from the dictionaryService
|
||||
* which is notified of any newly created definitions on transaction commit.
|
||||
* Therefore custom properties created in the current transaction will not appear
|
||||
* in the result of this method.
|
||||
* Note: the custom property definitions are retrieved from the dictionaryService which is notified of any newly created definitions on transaction commit. Therefore custom properties created in the current transaction will not appear in the result of this method.
|
||||
* </p>
|
||||
*
|
||||
* @return Map of <{@link QName}, {@link PropertyDefinition}>s of custom properties definitions
|
||||
@@ -135,16 +131,18 @@ public interface RecordsManagementAdminService
|
||||
*
|
||||
* Note: no default value, single valued, optional, not system protected, no constraints
|
||||
*
|
||||
* @param propId - If a value for propId is provided it will be used to identify property definitions
|
||||
* within URLs and in QNames. Therefore it must contain URL/QName-valid characters
|
||||
* only. It must also be unique.
|
||||
* If a null value is passed, an id will be generated.
|
||||
* @param typeName - mandatory. The aspect within which the property is to be defined.
|
||||
* This must be one of the CustomisableRmElements.
|
||||
* @param label - mandatory
|
||||
* @param dataType - mandatory
|
||||
* @param title - optional
|
||||
* @param description - optional
|
||||
* @param propId
|
||||
* - If a value for propId is provided it will be used to identify property definitions within URLs and in QNames. Therefore it must contain URL/QName-valid characters only. It must also be unique. If a null value is passed, an id will be generated.
|
||||
* @param typeName
|
||||
* - mandatory. The aspect within which the property is to be defined. This must be one of the CustomisableRmElements.
|
||||
* @param label
|
||||
* - mandatory
|
||||
* @param dataType
|
||||
* - mandatory
|
||||
* @param title
|
||||
* - optional
|
||||
* @param description
|
||||
* - optional
|
||||
*
|
||||
* @return the propId, whether supplied as a parameter or generated.
|
||||
*/
|
||||
@@ -153,21 +151,28 @@ public interface RecordsManagementAdminService
|
||||
/**
|
||||
* Add custom property definition with one optional constraint reference
|
||||
*
|
||||
* @param propId - If a value for propId is provided it will be used to identify property definitions
|
||||
* within URLs and in QNames. Therefore it must contain URL/QName-valid characters
|
||||
* only. It must also be unique.
|
||||
* If a null value is passed, an id will be generated.
|
||||
* @param typeName - mandatory. The aspect within which the property is to be defined.
|
||||
* This must be one of the CustomisableRmElements.
|
||||
* @param label - mandatory
|
||||
* @param dataType - mandatory
|
||||
* @param title - optional
|
||||
* @param description - optional
|
||||
* @param defaultValue - optional
|
||||
* @param multiValued - TRUE if multi-valued property
|
||||
* @param mandatory - TRUE if mandatory property
|
||||
* @param isProtected - TRUE if protected property
|
||||
* @param lovConstraintQName - optional custom constraint
|
||||
* @param propId
|
||||
* - If a value for propId is provided it will be used to identify property definitions within URLs and in QNames. Therefore it must contain URL/QName-valid characters only. It must also be unique. If a null value is passed, an id will be generated.
|
||||
* @param typeName
|
||||
* - mandatory. The aspect within which the property is to be defined. This must be one of the CustomisableRmElements.
|
||||
* @param label
|
||||
* - mandatory
|
||||
* @param dataType
|
||||
* - mandatory
|
||||
* @param title
|
||||
* - optional
|
||||
* @param description
|
||||
* - optional
|
||||
* @param defaultValue
|
||||
* - optional
|
||||
* @param multiValued
|
||||
* - TRUE if multi-valued property
|
||||
* @param mandatory
|
||||
* - TRUE if mandatory property
|
||||
* @param isProtected
|
||||
* - TRUE if protected property
|
||||
* @param lovConstraintQName
|
||||
* - optional custom constraint
|
||||
*
|
||||
* @return the propId, whether supplied as a parameter or generated.
|
||||
*/
|
||||
@@ -190,16 +195,21 @@ public interface RecordsManagementAdminService
|
||||
/**
|
||||
* Update the custom property definition's label (title).
|
||||
*
|
||||
* @param propQName the qname of the property definition
|
||||
* @param newLabel the new value for the label.
|
||||
* @param propQName
|
||||
* the qname of the property definition
|
||||
* @param newLabel
|
||||
* the new value for the label.
|
||||
* @return the propId.
|
||||
*/
|
||||
QName setCustomPropertyDefinitionLabel(QName propQName, String newLabel) throws PropertyAlreadyExistsMetadataException;
|
||||
|
||||
/**
|
||||
* Update the name and label of the custom property definition.
|
||||
* @param propQName The qname of the existing property definition
|
||||
* @param newName THe new name for both the custom property and its label.
|
||||
*
|
||||
* @param propQName
|
||||
* The qname of the existing property definition
|
||||
* @param newName
|
||||
* THe new name for both the custom property and its label.
|
||||
* @return
|
||||
* @throws CustomMetadataException
|
||||
*/
|
||||
@@ -208,8 +218,10 @@ public interface RecordsManagementAdminService
|
||||
/**
|
||||
* Sets a new list of values constraint on the custom property definition.
|
||||
*
|
||||
* @param propQName the qname of the property definition
|
||||
* @param newLovConstraint the List-Of-Values constraintRef.
|
||||
* @param propQName
|
||||
* the qname of the property definition
|
||||
* @param newLovConstraint
|
||||
* the List-Of-Values constraintRef.
|
||||
* @return the propId.
|
||||
*/
|
||||
QName setCustomPropertyDefinitionConstraint(QName propQName, QName newLovConstraint);
|
||||
@@ -217,7 +229,8 @@ public interface RecordsManagementAdminService
|
||||
/**
|
||||
* Removes all list of values constraints from the custom property definition.
|
||||
*
|
||||
* @param propQName the qname of the property definition
|
||||
* @param propQName
|
||||
* the qname of the property definition
|
||||
* @return the propId.
|
||||
*/
|
||||
QName removeCustomPropertyDefinitionConstraints(QName propQName);
|
||||
@@ -230,12 +243,7 @@ public interface RecordsManagementAdminService
|
||||
void removeCustomPropertyDefinition(QName propQName);
|
||||
|
||||
/**
|
||||
* This method returns the custom references that have been defined in the custom
|
||||
* model.
|
||||
* Note: the custom reference definitions are retrieved from the dictionaryService
|
||||
* which is notified of any newly created definitions on transaction commit.
|
||||
* Therefore custom references created in the current transaction will not appear
|
||||
* in the results.
|
||||
* This method returns the custom references that have been defined in the custom model. Note: the custom reference definitions are retrieved from the dictionaryService which is notified of any newly created definitions on transaction commit. Therefore custom references created in the current transaction will not appear in the results.
|
||||
*
|
||||
* @return The Map of custom references (both parent-child and standard).
|
||||
* @deprecated as of RM 2.3, please use {@link RelationshipService#getRelationshipDefinitions()} instead.
|
||||
@@ -245,17 +253,15 @@ public interface RecordsManagementAdminService
|
||||
/**
|
||||
* Fetches all associations <i>from</i> the given source.
|
||||
*
|
||||
* @param node the node from which the associations start.
|
||||
* @param node
|
||||
* the node from which the associations start.
|
||||
* @return a List of associations.
|
||||
* @deprecated as of RM 2.3, please
|
||||
* use{@link NodeService#getTargetAssocs(NodeRef, QNamePattern)} with QNamePattern RegexQNamePattern.MATCH_ALL
|
||||
* instead
|
||||
* @deprecated as of RM 2.3, please use{@link NodeService#getTargetAssocs(NodeRef, QNamePattern)} with QNamePattern RegexQNamePattern.MATCH_ALL instead
|
||||
*/
|
||||
List<AssociationRef> getCustomReferencesFrom(NodeRef node);
|
||||
|
||||
/**
|
||||
* Fetches all child associations of the given source. i.e. all associations where the
|
||||
* given node is the parent.
|
||||
* Fetches all child associations of the given source. i.e. all associations where the given node is the parent.
|
||||
*
|
||||
* @param node
|
||||
* @return
|
||||
@@ -266,10 +272,10 @@ public interface RecordsManagementAdminService
|
||||
/**
|
||||
* Returns a List of all associations <i>to</i> the given node.
|
||||
*
|
||||
* @param node the node to which the associations point.
|
||||
* @param node
|
||||
* the node to which the associations point.
|
||||
* @return a List of associations.
|
||||
* @deprecated as of RM 2.3, please use
|
||||
* {@link NodeService#getSourceAssocs(NodeRef, QNamePattern)} with QNamePattern RegexQNamePattern.MATCH_ALL instead.
|
||||
* @deprecated as of RM 2.3, please use {@link NodeService#getSourceAssocs(NodeRef, QNamePattern)} with QNamePattern RegexQNamePattern.MATCH_ALL instead.
|
||||
*/
|
||||
List<AssociationRef> getCustomReferencesTo(NodeRef node);
|
||||
|
||||
@@ -283,15 +289,14 @@ public interface RecordsManagementAdminService
|
||||
List<ChildAssociationRef> getCustomParentReferences(NodeRef node);
|
||||
|
||||
/**
|
||||
* This method adds the specified custom reference instance between the specified nodes.
|
||||
* Only one instance of any custom reference type is allowed in a given direction
|
||||
* between two given records.
|
||||
* This method adds the specified custom reference instance between the specified nodes. Only one instance of any custom reference type is allowed in a given direction between two given records.
|
||||
*
|
||||
* @param fromNode
|
||||
* @param toNode
|
||||
* @param assocId the server-side qname e.g. {http://www.alfresco.org/model/rmcustom/1.0}abcd-12-efgh-4567
|
||||
* @throws AlfrescoRuntimeException if an instance of the specified reference type
|
||||
* already exists from fromNode to toNode.
|
||||
* @param assocId
|
||||
* the server-side qname e.g. {http://www.alfresco.org/model/rmcustom/1.0}abcd-12-efgh-4567
|
||||
* @throws AlfrescoRuntimeException
|
||||
* if an instance of the specified reference type already exists from fromNode to toNode.
|
||||
* @deprecated as of RM 2.3, please use {@link RelationshipService#addRelationship(String, NodeRef, NodeRef)} instead.
|
||||
*/
|
||||
void addCustomReference(NodeRef fromNode, NodeRef toNode, QName assocId);
|
||||
@@ -301,7 +306,8 @@ public interface RecordsManagementAdminService
|
||||
*
|
||||
* @param fromNode
|
||||
* @param toNode
|
||||
* @param assocId the server-side qname e.g. {http://www.alfresco.org/model/rmcustom/1.0}abcd-12-efgh-4567
|
||||
* @param assocId
|
||||
* the server-side qname e.g. {http://www.alfresco.org/model/rmcustom/1.0}abcd-12-efgh-4567
|
||||
* @deprecated as of RM 2.3, please use {@link RelationshipService#removeRelationship(String, NodeRef, NodeRef)} instead.
|
||||
*/
|
||||
void removeCustomReference(NodeRef fromNode, NodeRef toNode, QName assocId);
|
||||
@@ -309,15 +315,15 @@ public interface RecordsManagementAdminService
|
||||
/**
|
||||
* This method creates a new custom association, using the given label as the title.
|
||||
*
|
||||
* @param label the title of the association definition
|
||||
* @param label
|
||||
* the title of the association definition
|
||||
* @return the QName of the newly-created association.
|
||||
* @deprecated as of RM 2.3, please use {@link RelationshipService#createRelationshipDefinition(org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipDisplayName)} instead.
|
||||
*/
|
||||
QName addCustomAssocDefinition(String label);
|
||||
|
||||
/**
|
||||
* This method creates a new custom child association, combining the given source and
|
||||
* target and using the combined String as the title.
|
||||
* This method creates a new custom child association, combining the given source and target and using the combined String as the title.
|
||||
*
|
||||
* @param source
|
||||
* @param target
|
||||
@@ -327,13 +333,14 @@ public interface RecordsManagementAdminService
|
||||
QName addCustomChildAssocDefinition(String source, String target);
|
||||
|
||||
/**
|
||||
* This method updates the source and target values for the specified child association.
|
||||
* The source and target will be combined into a single string and stored in the title property.
|
||||
* Source and target are String metadata for RM parent/child custom references.
|
||||
* This method updates the source and target values for the specified child association. The source and target will be combined into a single string and stored in the title property. Source and target are String metadata for RM parent/child custom references.
|
||||
*
|
||||
* @param refQName qname of the child association.
|
||||
* @param newSource the new value for the source field.
|
||||
* @param newTarget the new value for the target field.
|
||||
* @param refQName
|
||||
* qname of the child association.
|
||||
* @param newSource
|
||||
* the new value for the source field.
|
||||
* @param newTarget
|
||||
* the new value for the target field.
|
||||
* @see #getCompoundIdFor(String, String)
|
||||
* @see #splitSourceTargetId(String)
|
||||
* @deprecated as of RM 2.3, please use {@link RelationshipService#updateRelationshipDefinition(String, org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipDisplayName)} instead.
|
||||
@@ -341,38 +348,35 @@ public interface RecordsManagementAdminService
|
||||
QName updateCustomChildAssocDefinition(QName refQName, String newSource, String newTarget);
|
||||
|
||||
/**
|
||||
* This method updates the label value for the specified association.
|
||||
* The label will be stored in the title property.
|
||||
* Label is String metadata for bidirectional custom references.
|
||||
* This method updates the label value for the specified association. The label will be stored in the title property. Label is String metadata for bidirectional custom references.
|
||||
*
|
||||
* @param refQName qname of the child association.
|
||||
* @param newLabel the new value for the label field.
|
||||
* @param refQName
|
||||
* qname of the child association.
|
||||
* @param newLabel
|
||||
* the new value for the label field.
|
||||
* @deprecated as of RM 2.3, please use {@link RelationshipService#updateRelationshipDefinition(String, org.alfresco.module.org_alfresco_module_rm.relationship.RelationshipDisplayName)} instead.
|
||||
*/
|
||||
QName updateCustomAssocDefinition(QName refQName, String newLabel);
|
||||
|
||||
/**
|
||||
* This method returns ConstraintDefinition objects defined in the given model
|
||||
* (note: not property references or in-line defs)
|
||||
* The custom constraint definitions are retrieved from the dictionaryService
|
||||
* which is notified of any newly created definitions on transaction commit.
|
||||
* Therefore custom constraints created in the current transaction will not appear
|
||||
* in the results.
|
||||
* This method returns ConstraintDefinition objects defined in the given model (note: not property references or in-line defs) The custom constraint definitions are retrieved from the dictionaryService which is notified of any newly created definitions on transaction commit. Therefore custom constraints created in the current transaction will not appear in the results.
|
||||
*/
|
||||
List<ConstraintDefinition> getCustomConstraintDefinitions(QName modelQName);
|
||||
|
||||
/**
|
||||
* This method adds a Constraint definition to the custom model.
|
||||
* The implementation of this method would have to go into the M2Model and insert
|
||||
* the relevant M2Objects for this new constraint.
|
||||
* This method adds a Constraint definition to the custom model. The implementation of this method would have to go into the M2Model and insert the relevant M2Objects for this new constraint.
|
||||
*
|
||||
* param type not included as it would always be RMListOfValuesConstraint for RM.
|
||||
*
|
||||
* @param constraintName the name e.g. rmc:foo
|
||||
* @param title the human-readable title e.g. My foo list
|
||||
* @param constraintName
|
||||
* the name e.g. rmc:foo
|
||||
* @param title
|
||||
* the human-readable title e.g. My foo list
|
||||
* @param caseSensitive
|
||||
* @param allowedValues the allowed values list
|
||||
* @param matchLogic AND (all values must match), OR (at least one values must match)
|
||||
* @param allowedValues
|
||||
* the allowed values list
|
||||
* @param matchLogic
|
||||
* AND (all values must match), OR (at least one values must match)
|
||||
*/
|
||||
void addCustomConstraintDefinition(QName constraintName, String title, boolean caseSensitive, List<String> allowedValues, MatchLogic matchLogic);
|
||||
|
||||
@@ -380,14 +384,16 @@ public interface RecordsManagementAdminService
|
||||
* Remove custom constraint definition - if not referenced (by any properties)
|
||||
*
|
||||
*
|
||||
* @param constraintName the name e.g. rmc:foo
|
||||
* @param constraintName
|
||||
* the name e.g. rmc:foo
|
||||
*/
|
||||
void removeCustomConstraintDefinition(QName constraintName);
|
||||
|
||||
/**
|
||||
* Update custom constraint definition with new list of values (replaces existing list, if any)
|
||||
*
|
||||
* @param constraintName the name e.g. rmc:foo
|
||||
* @param constraintName
|
||||
* the name e.g. rmc:foo
|
||||
* @param newValues
|
||||
*/
|
||||
void changeCustomConstraintValues(QName constraintName, List<String> newValues);
|
||||
@@ -400,27 +406,25 @@ public interface RecordsManagementAdminService
|
||||
void changeCustomConstraintTitle(QName constraintName, String title);
|
||||
|
||||
/**
|
||||
* This method iterates over the custom properties, references looking for one whose id
|
||||
* exactly matches that specified.
|
||||
* This method iterates over the custom properties, references looking for one whose id exactly matches that specified.
|
||||
*
|
||||
* @param localName the localName part of the qname of the property or reference definition.
|
||||
* @param localName
|
||||
* the localName part of the qname of the property or reference definition.
|
||||
* @return the QName of the property, association definition which matches, or null.
|
||||
*/
|
||||
QName getQNameForClientId(String localName);
|
||||
|
||||
/**
|
||||
* Given a compound id for source and target strings (as used with parent/child
|
||||
* custom references), this method splits the String and returns an array containing
|
||||
* the source and target IDs separately.
|
||||
* Given a compound id for source and target strings (as used with parent/child custom references), this method splits the String and returns an array containing the source and target IDs separately.
|
||||
*
|
||||
* @param sourceTargetId the compound ID.
|
||||
* @param sourceTargetId
|
||||
* the compound ID.
|
||||
* @return a String array, where result[0] == sourceId and result[1] == targetId.
|
||||
*/
|
||||
String[] splitSourceTargetId(String sourceTargetId);
|
||||
|
||||
/**
|
||||
* This method retrieves a compound ID (client-side) for the specified
|
||||
* sourceId and targetId.
|
||||
* This method retrieves a compound ID (client-side) for the specified sourceId and targetId.
|
||||
*
|
||||
* @param sourceId
|
||||
* @param targetId
|
||||
|
||||
@@ -38,6 +38,14 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.extensions.surf.util.URLDecoder;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint;
|
||||
@@ -79,13 +87,6 @@ import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.alfresco.service.transaction.TransactionService;
|
||||
import org.alfresco.util.GUID;
|
||||
import org.alfresco.util.LockCallback;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.extensions.surf.util.URLDecoder;
|
||||
|
||||
/**
|
||||
* Records Management AdminService Implementation.
|
||||
@@ -142,7 +143,8 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
private boolean isCustomMapInit = false;
|
||||
|
||||
/**
|
||||
* @param transactionService transaction service
|
||||
* @param transactionService
|
||||
* transaction service
|
||||
*/
|
||||
public void setTransactionService(TransactionService transactionService)
|
||||
{
|
||||
@@ -150,7 +152,8 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
}
|
||||
|
||||
/**
|
||||
* @param relationshipService The relationship service instance
|
||||
* @param relationshipService
|
||||
* The relationship service instance
|
||||
*/
|
||||
public void setRelationshipService(RelationshipService relationshipService)
|
||||
{
|
||||
@@ -168,7 +171,8 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jobLockService The Job Lock service
|
||||
* @param jobLockService
|
||||
* The Job Lock service
|
||||
*/
|
||||
public void setJobLockService(JobLockService jobLockService)
|
||||
{
|
||||
@@ -176,8 +180,7 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that this application content listener must be executed with the lowest
|
||||
* precedence. (ie last)
|
||||
* Indicate that this application content listener must be executed with the lowest precedence. (ie last)
|
||||
*
|
||||
* @see Ordered#getOrder()
|
||||
*/
|
||||
@@ -251,7 +254,6 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper method to indicate whether the custom map is initialised or not.
|
||||
*
|
||||
@@ -266,18 +268,15 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
* @see org.alfresco.repo.node.NodeServicePolicies.OnAddAspectPolicy#onAddAspect(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName)
|
||||
*/
|
||||
@Override
|
||||
@Behaviour
|
||||
(
|
||||
@Behaviour(
|
||||
kind = BehaviourKind.CLASS,
|
||||
isService = true,
|
||||
notificationFrequency = NotificationFrequency.FIRST_EVENT
|
||||
)
|
||||
notificationFrequency = NotificationFrequency.FIRST_EVENT)
|
||||
public void onAddAspect(final NodeRef nodeRef, final QName aspectTypeQName)
|
||||
{
|
||||
if (isCustomMapInit)
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
@@ -299,18 +298,15 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
* @see org.alfresco.repo.node.NodeServicePolicies.OnRemoveAspectPolicy#onRemoveAspect(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.namespace.QName)
|
||||
*/
|
||||
@Override
|
||||
@Behaviour
|
||||
(
|
||||
@Behaviour(
|
||||
kind = BehaviourKind.CLASS,
|
||||
isService = true,
|
||||
notificationFrequency = NotificationFrequency.FIRST_EVENT
|
||||
)
|
||||
notificationFrequency = NotificationFrequency.FIRST_EVENT)
|
||||
public void onRemoveAspect(final NodeRef nodeRef, final QName aspectTypeQName)
|
||||
{
|
||||
if (isCustomMapInit)
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
@@ -333,18 +329,15 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
* @see org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy#onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef)
|
||||
*/
|
||||
@Override
|
||||
@Behaviour
|
||||
(
|
||||
@Behaviour(
|
||||
kind = BehaviourKind.CLASS,
|
||||
isService = true,
|
||||
notificationFrequency = NotificationFrequency.FIRST_EVENT
|
||||
)
|
||||
notificationFrequency = NotificationFrequency.FIRST_EVENT)
|
||||
public void onCreateNode(final ChildAssociationRef childAssocRef)
|
||||
{
|
||||
if (isCustomMapInit)
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||
{
|
||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
||||
@Override
|
||||
public Void doWork()
|
||||
{
|
||||
@@ -379,7 +372,8 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
}
|
||||
|
||||
/**
|
||||
* @param customisableTypes list of string representations of the type qnames that are customisable
|
||||
* @param customisableTypes
|
||||
* list of string representations of the type qnames that are customisable
|
||||
*/
|
||||
public void setCustomisableTypes(List<String> customisableTypes)
|
||||
{
|
||||
@@ -930,9 +924,7 @@ public class RecordsManagementAdminServiceImpl extends RecordsManagementAdminBas
|
||||
String lovConstraintQNameAsString = newLovConstraint.toPrefixString(getNamespaceService());
|
||||
|
||||
// Add the constraint - if it isn't already there (there should only be one constraint).
|
||||
String refOfExistingConstraint = (targetProp.getConstraints().isEmpty() ?
|
||||
null :
|
||||
targetProp.getConstraints().get(0).getRef());
|
||||
String refOfExistingConstraint = (targetProp.getConstraints().isEmpty() ? null : targetProp.getConstraints().get(0).getRef());
|
||||
|
||||
if (refOfExistingConstraint != null)
|
||||
{
|
||||
|
||||
@@ -32,12 +32,13 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.extensions.surf.util.ISO8601DateFormat;
|
||||
|
||||
import org.alfresco.api.AlfrescoPublicApi;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.alfresco.util.ParameterCheck;
|
||||
import org.springframework.extensions.surf.util.ISO8601DateFormat;
|
||||
|
||||
/**
|
||||
* Class to represent a Records Management audit entry.
|
||||
@@ -183,8 +184,7 @@ public final class RecordsManagementAuditEntry
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The human readable description of the reason for the audit log
|
||||
* entry i.e. metadata updated, record declared
|
||||
* @return The human readable description of the reason for the audit log entry i.e. metadata updated, record declared
|
||||
*/
|
||||
public String getEvent()
|
||||
{
|
||||
@@ -192,9 +192,7 @@ public final class RecordsManagementAuditEntry
|
||||
}
|
||||
|
||||
/**
|
||||
* An identifier for the item being audited, for example for a record
|
||||
* it will be the unique record identifier, for a user it would be the
|
||||
* username etc.
|
||||
* An identifier for the item being audited, for example for a record it will be the unique record identifier, for a user it would be the username etc.
|
||||
*
|
||||
* @return Ad identifier for the thing being audited
|
||||
*/
|
||||
|
||||
@@ -34,8 +34,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Class to represent the parameters for a Records Management
|
||||
* audit log query.
|
||||
* Class to represent the parameters for a Records Management audit log query.
|
||||
*
|
||||
* @author Gavin Cornwell
|
||||
*/
|
||||
@@ -68,10 +67,10 @@ public final class RecordsManagementAuditQueryParameters
|
||||
}
|
||||
|
||||
/**
|
||||
* Restricts the retrieved audit trail to entries made by
|
||||
* the provided user.
|
||||
* Restricts the retrieved audit trail to entries made by the provided user.
|
||||
*
|
||||
* @param user The username to filter by
|
||||
* @param user
|
||||
* The username to filter by
|
||||
*/
|
||||
public void setUser(String user)
|
||||
{
|
||||
@@ -88,10 +87,10 @@ public final class RecordsManagementAuditQueryParameters
|
||||
}
|
||||
|
||||
/**
|
||||
* Restricts the retrieved audit trail to the last
|
||||
* <code>maxEntries</code> entries.
|
||||
* Restricts the retrieved audit trail to the last <code>maxEntries</code> entries.
|
||||
*
|
||||
* @param maxEntries Maximum number of entries
|
||||
* @param maxEntries
|
||||
* Maximum number of entries
|
||||
*/
|
||||
public void setMaxEntries(int maxEntries)
|
||||
{
|
||||
@@ -108,10 +107,10 @@ public final class RecordsManagementAuditQueryParameters
|
||||
}
|
||||
|
||||
/**
|
||||
* Restricts the retrieved audit trail to only those entries
|
||||
* created by the give node.
|
||||
* Restricts the retrieved audit trail to only those entries created by the give node.
|
||||
*
|
||||
* @param nodeRef The node to get entries for
|
||||
* @param nodeRef
|
||||
* The node to get entries for
|
||||
*/
|
||||
public void setNodeRef(NodeRef nodeRef)
|
||||
{
|
||||
@@ -128,10 +127,10 @@ public final class RecordsManagementAuditQueryParameters
|
||||
}
|
||||
|
||||
/**
|
||||
* Restricts the retrieved audit trail to only those entries
|
||||
* that occurred after the given date.
|
||||
* Restricts the retrieved audit trail to only those entries that occurred after the given date.
|
||||
*
|
||||
* @param dateFrom Date to retrieve entries after
|
||||
* @param dateFrom
|
||||
* Date to retrieve entries after
|
||||
*/
|
||||
public void setDateFrom(Date dateFrom)
|
||||
{
|
||||
@@ -148,10 +147,10 @@ public final class RecordsManagementAuditQueryParameters
|
||||
}
|
||||
|
||||
/**
|
||||
* Restricts the retrieved audit trail to only those entries
|
||||
* that occurred before the given date.
|
||||
* Restricts the retrieved audit trail to only those entries that occurred before the given date.
|
||||
*
|
||||
* @param dateTo Date to retrieve entries before
|
||||
* @param dateTo
|
||||
* Date to retrieve entries before
|
||||
*/
|
||||
public void setDateTo(Date dateTo)
|
||||
{
|
||||
@@ -168,10 +167,10 @@ public final class RecordsManagementAuditQueryParameters
|
||||
}
|
||||
|
||||
/**
|
||||
* Restricts the retrieved audit trail to only those entries
|
||||
* that match the given event string.
|
||||
* Restricts the retrieved audit trail to only those entries that match the given event string.
|
||||
*
|
||||
* @param event Event to retrieve entries for
|
||||
* @param event
|
||||
* Event to retrieve entries for
|
||||
*/
|
||||
public void setEvent(String event)
|
||||
{
|
||||
@@ -188,19 +187,17 @@ public final class RecordsManagementAuditQueryParameters
|
||||
}
|
||||
|
||||
/**
|
||||
* Restricts the audit trail to only those entries that involve
|
||||
* the given property.
|
||||
* Restricts the audit trail to only those entries that involve the given property.
|
||||
*
|
||||
* @param property The property to retrieve entries for
|
||||
* @param property
|
||||
* The property to retrieve entries for
|
||||
*/
|
||||
public void setProperty(QName property)
|
||||
{
|
||||
this.property = property;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
/* @see java.lang.Object#toString() */
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
||||
@@ -47,7 +47,10 @@ import org.alfresco.service.namespace.QName;
|
||||
@SuppressWarnings("deprecation")
|
||||
public interface RecordsManagementAuditService extends RecordsManagementAuditServiceDeprecated
|
||||
{
|
||||
public enum ReportFormat { HTML, JSON }
|
||||
public enum ReportFormat
|
||||
{
|
||||
HTML, JSON
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of audit events.
|
||||
@@ -59,27 +62,30 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
/**
|
||||
* Register audit event.
|
||||
* <p>
|
||||
* Creates an instance of a simple audit event and registers it with
|
||||
* the service.
|
||||
* Creates an instance of a simple audit event and registers it with the service.
|
||||
*
|
||||
* @param name name of audit event
|
||||
* @param label display label of audit event
|
||||
* @param name
|
||||
* name of audit event
|
||||
* @param label
|
||||
* display label of audit event
|
||||
*/
|
||||
void registerAuditEvent(String name, String label);
|
||||
|
||||
/**
|
||||
* Register audit event.
|
||||
*
|
||||
* @param auditEvent audit event
|
||||
* @param auditEvent
|
||||
* audit event
|
||||
*/
|
||||
void registerAuditEvent(AuditEvent auditEvent);
|
||||
|
||||
/**
|
||||
* Audits an event, assumes no properties where modified and that the event should not be audited
|
||||
* immediately.
|
||||
* Audits an event, assumes no properties where modified and that the event should not be audited immediately.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param eventName event name
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param eventName
|
||||
* event name
|
||||
*/
|
||||
void auditEvent(NodeRef nodeRef,
|
||||
String eventName);
|
||||
@@ -87,10 +93,14 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
/**
|
||||
* Audits an event, assumes that the event should not be audited immediately and not be removed if no property is changed.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param eventName event name
|
||||
* @param before property values before event (this must be modifiable and may be changed by the method).
|
||||
* @param after property values after event (this must be modifiable and may be changed by the method).
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param eventName
|
||||
* event name
|
||||
* @param before
|
||||
* property values before event (this must be modifiable and may be changed by the method).
|
||||
* @param after
|
||||
* property values after event (this must be modifiable and may be changed by the method).
|
||||
*/
|
||||
void auditEvent(NodeRef nodeRef,
|
||||
String eventName,
|
||||
@@ -100,11 +110,16 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
/**
|
||||
* Audit event, assumes not to be removed if no property is changed.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param eventName event name
|
||||
* @param before property values before event (this must be modifiable and may be changed by the method).
|
||||
* @param after property values after event (this must be modifiable and may be changed by the method).
|
||||
* @param immediate true if event is to be audited immediately, false otherwise
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param eventName
|
||||
* event name
|
||||
* @param before
|
||||
* property values before event (this must be modifiable and may be changed by the method).
|
||||
* @param after
|
||||
* property values after event (this must be modifiable and may be changed by the method).
|
||||
* @param immediate
|
||||
* true if event is to be audited immediately, false otherwise
|
||||
*/
|
||||
void auditEvent(NodeRef nodeRef,
|
||||
String eventName,
|
||||
@@ -115,12 +130,18 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
/**
|
||||
* Audit event.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param eventName event name
|
||||
* @param before property values before event (this must be modifiable and may be changed by the method).
|
||||
* @param after property values after event (this must be modifiable and may be changed by the method).
|
||||
* @param immediate true if event is to be audited immediately, false otherwise
|
||||
* @param removeIfNoPropertyChanged true if event is not audited when there are no properties changed, false otherwise
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param eventName
|
||||
* event name
|
||||
* @param before
|
||||
* property values before event (this must be modifiable and may be changed by the method).
|
||||
* @param after
|
||||
* property values after event (this must be modifiable and may be changed by the method).
|
||||
* @param immediate
|
||||
* true if event is to be audited immediately, false otherwise
|
||||
* @param removeIfNoPropertyChanged
|
||||
* true if event is not audited when there are no properties changed, false otherwise
|
||||
*/
|
||||
void auditEvent(NodeRef nodeRef,
|
||||
String eventName,
|
||||
@@ -132,11 +153,16 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
/**
|
||||
* Supply incremental changes as part of an event. This will either create a new event or update the existing details to put any supplied properties into the map.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param eventName event name
|
||||
* @param before additional property values before event (this must be modifiable and may be changed by the method).
|
||||
* @param after additional property values after event (this must be modifiable and may be changed by the method).
|
||||
* @param removeIfNoPropertyChanged true if event is not audited when there are no properties changed, false otherwise
|
||||
* @param nodeRef
|
||||
* node reference
|
||||
* @param eventName
|
||||
* event name
|
||||
* @param before
|
||||
* additional property values before event (this must be modifiable and may be changed by the method).
|
||||
* @param after
|
||||
* additional property values after event (this must be modifiable and may be changed by the method).
|
||||
* @param removeIfNoPropertyChanged
|
||||
* true if event is not audited when there are no properties changed, false otherwise
|
||||
*/
|
||||
void auditOrUpdateEvent(NodeRef nodeRef,
|
||||
String eventName,
|
||||
@@ -147,7 +173,8 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
/**
|
||||
* Determines whether the RM audit log is currently enabled.
|
||||
*
|
||||
* @param filePlan file plan
|
||||
* @param filePlan
|
||||
* file plan
|
||||
* @return true if RM auditing is active false otherwise
|
||||
*/
|
||||
boolean isAuditLogEnabled(NodeRef filePlan);
|
||||
@@ -155,28 +182,32 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
/**
|
||||
* Start RM auditing.
|
||||
*
|
||||
* @param filePlan file plan
|
||||
* @param filePlan
|
||||
* file plan
|
||||
*/
|
||||
void startAuditLog(NodeRef filePlan);
|
||||
|
||||
/**
|
||||
* Stop RM auditing.
|
||||
*
|
||||
* @param filePlan file plan
|
||||
* @param filePlan
|
||||
* file plan
|
||||
*/
|
||||
void stopAuditLog(NodeRef filePlan);
|
||||
|
||||
/**
|
||||
* Clears the RM audit.
|
||||
*
|
||||
* @param filePlan file plan
|
||||
* @param filePlan
|
||||
* file plan
|
||||
*/
|
||||
void clearAuditLog(NodeRef filePlan);
|
||||
|
||||
/**
|
||||
* Returns the date the RM audit was last started.
|
||||
*
|
||||
* @param filePlan file plan
|
||||
* @param filePlan
|
||||
* file plan
|
||||
* @return Date the audit was last started
|
||||
*/
|
||||
Date getDateAuditLogLastStarted(NodeRef filePlan);
|
||||
@@ -189,48 +220,40 @@ public interface RecordsManagementAuditService extends RecordsManagementAuditSer
|
||||
Date getDateAuditLogLastStopped(NodeRef filePlan);
|
||||
|
||||
/**
|
||||
* Retrieves a list of audit log entries using the provided parameters
|
||||
* represented by the RecordsManagementAuditQueryParameters instance.
|
||||
* Retrieves a list of audit log entries using the provided parameters represented by the RecordsManagementAuditQueryParameters instance.
|
||||
* <p>
|
||||
* The parameters are all optional so an empty RecordsManagementAuditQueryParameters
|
||||
* object will result in ALL audit log entries for the RM system being
|
||||
* returned. Setting the various parameters effectively filters the full
|
||||
* audit trail.
|
||||
* The parameters are all optional so an empty RecordsManagementAuditQueryParameters object will result in ALL audit log entries for the RM system being returned. Setting the various parameters effectively filters the full audit trail.
|
||||
*
|
||||
* @param params Parameters to use to retrieve audit trail (never <tt>null</tt>)
|
||||
* @param format The format the report should be produced in
|
||||
* @param params
|
||||
* Parameters to use to retrieve audit trail (never <tt>null</tt>)
|
||||
* @param format
|
||||
* The format the report should be produced in
|
||||
* @return File containing JSON representation of audit trail
|
||||
*/
|
||||
File getAuditTrailFile(RecordsManagementAuditQueryParameters params, ReportFormat format);
|
||||
|
||||
/**
|
||||
* Retrieves a list of audit log entries using the provided parameters
|
||||
* represented by the RecordsManagementAuditQueryParameters instance.
|
||||
* Retrieves a list of audit log entries using the provided parameters represented by the RecordsManagementAuditQueryParameters instance.
|
||||
* <p>
|
||||
* The parameters are all optional so an empty RecordsManagementAuditQueryParameters
|
||||
* object will result in ALL audit log entries for the RM system being
|
||||
* returned. Setting the various parameters effectively filters the full
|
||||
* audit trail.
|
||||
* The parameters are all optional so an empty RecordsManagementAuditQueryParameters object will result in ALL audit log entries for the RM system being returned. Setting the various parameters effectively filters the full audit trail.
|
||||
*
|
||||
* @param params Parameters to use to retrieve audit trail (never <tt>null</tt>)
|
||||
* @param params
|
||||
* Parameters to use to retrieve audit trail (never <tt>null</tt>)
|
||||
* @return All entries for the audit trail
|
||||
*/
|
||||
List<RecordsManagementAuditEntry> getAuditTrail(RecordsManagementAuditQueryParameters params);
|
||||
|
||||
/**
|
||||
* Retrieves a list of audit log entries using the provided parameters
|
||||
* represented by the RecordsManagementAuditQueryParameters instance and
|
||||
* then files the resulting log as an undeclared record in the record folder
|
||||
* represented by the given NodeRef.
|
||||
* Retrieves a list of audit log entries using the provided parameters represented by the RecordsManagementAuditQueryParameters instance and then files the resulting log as an undeclared record in the record folder represented by the given NodeRef.
|
||||
* <p>
|
||||
* The parameters are all optional so an empty RecordsManagementAuditQueryParameters
|
||||
* object will result in ALL audit log entries for the RM system being
|
||||
* returned. Setting the various parameters effectively filters the full
|
||||
* audit trail.
|
||||
* The parameters are all optional so an empty RecordsManagementAuditQueryParameters object will result in ALL audit log entries for the RM system being returned. Setting the various parameters effectively filters the full audit trail.
|
||||
*
|
||||
* @param params Parameters to use to retrieve audit trail (never <tt>null</tt>)
|
||||
* @param destination NodeRef representing a record folder in which to file the audit log
|
||||
* @param format The format the report should be produced in
|
||||
* @param params
|
||||
* Parameters to use to retrieve audit trail (never <tt>null</tt>)
|
||||
* @param destination
|
||||
* NodeRef representing a record folder in which to file the audit log
|
||||
* @param format
|
||||
* The format the report should be produced in
|
||||
* @return NodeRef of the undeclared record filed
|
||||
*/
|
||||
NodeRef fileAuditTrailAsRecord(RecordsManagementAuditQueryParameters params, NodeRef destination, ReportFormat format);
|
||||
|
||||
@@ -27,14 +27,15 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.audit;
|
||||
|
||||
import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml4;
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
|
||||
import static org.alfresco.model.ContentModel.PROP_AUTHORITY_DISPLAY_NAME;
|
||||
import static org.alfresco.model.ContentModel.PROP_AUTHORITY_NAME;
|
||||
import static org.alfresco.model.ContentModel.PROP_USERNAME;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.audit.event.UserGroupMembershipUtils.PARENT_GROUP;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.dod5015.DOD5015Model.TYPE_DOD_5015_SITE;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.model.rma.type.RmSiteType.DEFAULT_SITE_NAME;
|
||||
import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml4;
|
||||
import static org.apache.commons.lang3.StringUtils.isBlank;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
@@ -54,6 +55,18 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import jakarta.transaction.SystemException;
|
||||
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.extensions.surf.util.ISO8601DateFormat;
|
||||
import org.springframework.extensions.surf.util.ParameterCheck;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction;
|
||||
@@ -95,17 +108,6 @@ import org.alfresco.util.PropertyCheck;
|
||||
import org.alfresco.util.PropertyMap;
|
||||
import org.alfresco.util.TempFileProvider;
|
||||
import org.alfresco.util.transaction.TransactionListenerAdapter;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.springframework.extensions.surf.util.ISO8601DateFormat;
|
||||
import org.springframework.extensions.surf.util.ParameterCheck;
|
||||
|
||||
/**
|
||||
* Records Management Audit Service Implementation.
|
||||
@@ -262,9 +264,13 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Set the site service (used to check the type of RM site created).
|
||||
*
|
||||
* @param siteService The site service.
|
||||
* @param siteService
|
||||
* The site service.
|
||||
*/
|
||||
public void setSiteService(SiteService siteService) { this.siteService = siteService; }
|
||||
public void setSiteService(SiteService siteService)
|
||||
{
|
||||
this.siteService = siteService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ContentService instance
|
||||
@@ -299,7 +305,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filePlanService file plan service
|
||||
* @param filePlanService
|
||||
* file plan service
|
||||
*/
|
||||
public void setFilePlanService(FilePlanService filePlanService)
|
||||
{
|
||||
@@ -307,7 +314,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
}
|
||||
|
||||
/**
|
||||
* @param namespaceService namespace service
|
||||
* @param namespaceService
|
||||
* namespace service
|
||||
*/
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
@@ -315,14 +323,14 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
}
|
||||
|
||||
/**
|
||||
* @param capabilityService capability service
|
||||
* @param capabilityService
|
||||
* capability service
|
||||
*/
|
||||
public void setCapabilityService(CapabilityService capabilityService)
|
||||
{
|
||||
this.capabilityService = capabilityService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ignoredAuditProperties
|
||||
*/
|
||||
@@ -597,11 +605,16 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Create a new audit event for this transaction.
|
||||
*
|
||||
* @param nodeRef The node the audit message is about.
|
||||
* @param eventName The event.
|
||||
* @param before The before property map to use.
|
||||
* @param after The after property map to use.
|
||||
* @param removeIfNoPropertyChanged Whether to remove the event if no properties have changed.
|
||||
* @param nodeRef
|
||||
* The node the audit message is about.
|
||||
* @param eventName
|
||||
* The event.
|
||||
* @param before
|
||||
* The before property map to use.
|
||||
* @param after
|
||||
* The after property map to use.
|
||||
* @param removeIfNoPropertyChanged
|
||||
* Whether to remove the event if no properties have changed.
|
||||
*/
|
||||
private void createAuditEventInTransaction(NodeRef nodeRef, String eventName, Map<QName, Serializable> before,
|
||||
Map<QName, Serializable> after, boolean removeIfNoPropertyChanged)
|
||||
@@ -622,8 +635,10 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Find an audit node if it already exists for the transaction.
|
||||
*
|
||||
* @param nodeRef The node the event is against.
|
||||
* @param eventName The name of the event.
|
||||
* @param nodeRef
|
||||
* The node the event is against.
|
||||
* @param eventName
|
||||
* The name of the event.
|
||||
* @return The pre-existing event node, or null if none exists.
|
||||
*/
|
||||
private RMAuditNode findExistingEventNode(NodeRef nodeRef, String eventName)
|
||||
@@ -703,8 +718,10 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Helper method to remove system properties from maps
|
||||
*
|
||||
* @param before properties before event
|
||||
* @param after properties after event
|
||||
* @param before
|
||||
* properties before event
|
||||
* @param after
|
||||
* properties after event
|
||||
*/
|
||||
private void removeAuditProperties(Map<QName, Serializable> before, Map<QName, Serializable> after)
|
||||
{
|
||||
@@ -730,10 +747,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
{
|
||||
private final Log logger = LogFactory.getLog(RecordsManagementAuditServiceImpl.class);
|
||||
|
||||
/*
|
||||
* Equality and hashcode generation are left unimplemented; we expect to only have a single
|
||||
* instance of this class per action.
|
||||
*/
|
||||
/* Equality and hashcode generation are left unimplemented; we expect to only have a single instance of this class per action. */
|
||||
|
||||
/**
|
||||
* Get the action parameters from the transaction and audit them.
|
||||
@@ -744,8 +758,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
final Set<RMAuditNode> auditedNodes = TransactionalResourceHelper.getSet(KEY_RM_AUDIT_NODE_RECORDS);
|
||||
|
||||
// Start a *new* read-write transaction to audit in
|
||||
RetryingTransactionCallback<Void> auditCallback = new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
RetryingTransactionCallback<Void> auditCallback = new RetryingTransactionCallback<Void>() {
|
||||
@Override
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
@@ -759,7 +772,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Do the actual auditing, assuming the presence of a viable transaction
|
||||
*
|
||||
* @param auditedNodes details of the nodes that were modified
|
||||
* @param auditedNodes
|
||||
* details of the nodes that were modified
|
||||
*/
|
||||
private void auditInTxn(Set<RMAuditNode> auditedNodes) throws SystemException
|
||||
{
|
||||
@@ -863,10 +877,14 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Get the audit trail, optionally dumping the results the the given writer dumping to a list.
|
||||
*
|
||||
* @param params the search parameters
|
||||
* @param results the list to which individual results will be dumped
|
||||
* @param writer Writer to write the audit trail
|
||||
* @param reportFormat Format to write the audit trail in, ignored if writer is <code>null</code>
|
||||
* @param params
|
||||
* the search parameters
|
||||
* @param results
|
||||
* the list to which individual results will be dumped
|
||||
* @param writer
|
||||
* Writer to write the audit trail
|
||||
* @param reportFormat
|
||||
* Format to write the audit trail in, ignored if writer is <code>null</code>
|
||||
*/
|
||||
protected void getAuditTrailImpl(
|
||||
final RecordsManagementAuditQueryParameters params,
|
||||
@@ -964,11 +982,10 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the start of the given date.
|
||||
* For example, if you had the date time of 12 Aug 2013 12:10:15.158
|
||||
* the result would be 12 Aug 2013 00:00:00.000.
|
||||
* Calculates the start of the given date. For example, if you had the date time of 12 Aug 2013 12:10:15.158 the result would be 12 Aug 2013 00:00:00.000.
|
||||
*
|
||||
* @param date The date for which the start should be calculated.
|
||||
* @param date
|
||||
* The date for which the start should be calculated.
|
||||
* @return Returns the start of the given date.
|
||||
*/
|
||||
protected Date getStartOfDay(Date date)
|
||||
@@ -978,9 +995,11 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
|
||||
/**
|
||||
* Gets the start of the from date
|
||||
*
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditServiceImpl#getStartOfDay(java.util.Date)
|
||||
*
|
||||
* @param date The date for which the start should be retrieved.
|
||||
* @param date
|
||||
* The date for which the start should be retrieved.
|
||||
* @return Returns null if the given date is null, otherwise the start of the given day.
|
||||
*/
|
||||
private Date getFromDate(Date date)
|
||||
@@ -991,7 +1010,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Returns the number of milliseconds for the "from date".
|
||||
*
|
||||
* @param date The date for which the number of milliseconds should retrieved.
|
||||
* @param date
|
||||
* The date for which the number of milliseconds should retrieved.
|
||||
* @return Returns null if the given date is null, otherwise the number of milliseconds for the given date.
|
||||
*/
|
||||
private Long getFromDateTime(Date date)
|
||||
@@ -1006,11 +1026,10 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the end of the given date.
|
||||
* For example, if you had the date time of 12 Aug 2013 12:10:15.158
|
||||
* the result would be 12 Aug 2013 23:59:59.999.
|
||||
* Calculates the end of the given date. For example, if you had the date time of 12 Aug 2013 12:10:15.158 the result would be 12 Aug 2013 23:59:59.999.
|
||||
*
|
||||
* @param date The date for which the end should be calculated.
|
||||
* @param date
|
||||
* The date for which the end should be calculated.
|
||||
* @return Returns the end of the given date.
|
||||
*/
|
||||
private Date getEndOfDay(Date date)
|
||||
@@ -1020,9 +1039,11 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
|
||||
/**
|
||||
* Gets the end of the from date
|
||||
*
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditServiceImpl#getEndOfDay(java.util.Date)
|
||||
*
|
||||
* @param date The date for which the end should be retrieved.
|
||||
* @param date
|
||||
* The date for which the end should be retrieved.
|
||||
* @return Returns null if the given date is null, otherwise the end of the given day.
|
||||
*/
|
||||
private Date getToDate(Date date)
|
||||
@@ -1033,7 +1054,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Returns the number of milliseconds for the "to date".
|
||||
*
|
||||
* @param date The date for which the number of milliseconds should retrieved.
|
||||
* @param date
|
||||
* The date for which the number of milliseconds should retrieved.
|
||||
* @return Returns null if the given date is null, otherwise the number of milliseconds for the given date.
|
||||
*/
|
||||
private Long getToDateTime(Date date)
|
||||
@@ -1118,9 +1140,11 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Writes the start of the audit trail stream to the given writer
|
||||
*
|
||||
* @param writer The writer to write to
|
||||
* @param writer
|
||||
* The writer to write to
|
||||
* @params params The parameters being used
|
||||
* @param reportFormat The format to write the header in
|
||||
* @param reportFormat
|
||||
* The format to write the header in
|
||||
* @throws IOException
|
||||
*/
|
||||
private void writeAuditTrailHeader(Writer writer,
|
||||
@@ -1204,9 +1228,12 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Writes an audit trail entry to the given writer
|
||||
*
|
||||
* @param writer The writer to write to
|
||||
* @param entry The entry to write
|
||||
* @param reportFormat The format to write the header in
|
||||
* @param writer
|
||||
* The writer to write to
|
||||
* @param entry
|
||||
* The entry to write
|
||||
* @param reportFormat
|
||||
* The format to write the header in
|
||||
* @throws IOException
|
||||
*/
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@@ -1228,9 +1255,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
writer.write("</span>");
|
||||
writer.write("<span class=\"label\">User:</span>");
|
||||
writer.write("<span class=\"value\">");
|
||||
writer.write(entry.getFullName() != null ?
|
||||
escapeHtml4(entry.getFullName()) :
|
||||
escapeHtml4(entry.getUserName()));
|
||||
writer.write(entry.getFullName() != null ? escapeHtml4(entry.getFullName()) : escapeHtml4(entry.getUserName()));
|
||||
writer.write("</span>");
|
||||
if (entry.getUserRole() != null && entry.getUserRole().length() > 0)
|
||||
{
|
||||
@@ -1396,9 +1421,12 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Update a JSON object with a node name for an audit event.
|
||||
*
|
||||
* @param entry The audit event.
|
||||
* @param json The object to update.
|
||||
* @throws JSONException If there is a problem updating the JSON.
|
||||
* @param entry
|
||||
* The audit event.
|
||||
* @param json
|
||||
* The object to update.
|
||||
* @throws JSONException
|
||||
* If there is a problem updating the JSON.
|
||||
*/
|
||||
private void setNodeName(RecordsManagementAuditEntry entry, JSONObject json) throws JSONException
|
||||
{
|
||||
@@ -1461,8 +1489,10 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Get a node name using the first non-blank value from a properties object using a list of property names.
|
||||
*
|
||||
* @param properties The properties object.
|
||||
* @param propertyNames The names of the properties to use. Return the first value that is not empty.
|
||||
* @param properties
|
||||
* The properties object.
|
||||
* @param propertyNames
|
||||
* The names of the properties to use. Return the first value that is not empty.
|
||||
* @return The value of the property, or null if it's not there.
|
||||
*/
|
||||
private String getNodeName(Map<QName, Serializable> properties, QName... propertyNames)
|
||||
@@ -1481,7 +1511,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Helper method to convert value to MLText
|
||||
*
|
||||
* @param map map of locale's and values
|
||||
* @param map
|
||||
* map of locale's and values
|
||||
* @return {@link MLText} multilingual text value
|
||||
*/
|
||||
private MLText convertToMlText(Map<Locale, String> map)
|
||||
@@ -1494,8 +1525,10 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Writes the end of the audit trail stream to the given writer
|
||||
*
|
||||
* @param writer The writer to write to
|
||||
* @param reportFormat The format to write the footer in
|
||||
* @param writer
|
||||
* The writer to write to
|
||||
* @param reportFormat
|
||||
* The format to write the footer in
|
||||
* @throws IOException
|
||||
*/
|
||||
private void writeAuditTrailFooter(Writer writer, ReportFormat reportFormat) throws IOException
|
||||
@@ -1520,7 +1553,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Returns the display label for a property QName
|
||||
*
|
||||
* @param property The property to get label for
|
||||
* @param property
|
||||
* The property to get label for
|
||||
* @return The label
|
||||
*/
|
||||
private String getPropertyLabel(QName property)
|
||||
@@ -1544,7 +1578,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
/**
|
||||
* Returns the display label for the given audit event key
|
||||
*
|
||||
* @param eventKey The audit event key
|
||||
* @param eventKey
|
||||
* The audit event key
|
||||
* @return The display label or null if the key does not exist
|
||||
*/
|
||||
private String getAuditEventLabel(String eventKey)
|
||||
@@ -1704,6 +1739,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @since 3.2
|
||||
* @deprecated since 2.1
|
||||
*/
|
||||
@@ -1732,7 +1768,6 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
firstEntry = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean valuesRequired()
|
||||
{
|
||||
@@ -1764,7 +1799,6 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Date timestamp = new Date(time);
|
||||
String eventName = null;
|
||||
String fullName = null;
|
||||
@@ -1864,7 +1898,8 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
{
|
||||
if ((filePlanService.isFilePlanComponent(nodeRef) &&
|
||||
!AccessStatus.ALLOWED.equals(
|
||||
capabilityService.getCapabilityAccessState(nodeRef, ACCESS_AUDIT_CAPABILITY))) ||
|
||||
capabilityService.getCapabilityAccessState(nodeRef, ACCESS_AUDIT_CAPABILITY)))
|
||||
||
|
||||
(!AccessStatus.ALLOWED.equals(permissionService.hasPermission(nodeRef, PermissionService.READ))))
|
||||
{
|
||||
return true;
|
||||
@@ -1913,7 +1948,9 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
|
||||
/**
|
||||
* Helper method to check permission on the hold, if any, from the given event properties
|
||||
* @param eventProperties event properties
|
||||
*
|
||||
* @param eventProperties
|
||||
* event properties
|
||||
*/
|
||||
private void checkPermissionIfHoldInProperties(Map<QName, Serializable> eventProperties)
|
||||
{
|
||||
@@ -1930,7 +1967,9 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
|
||||
/**
|
||||
* Helper method to remove the hold node ref, if any, from the given event properties
|
||||
* @param eventProperties event properties
|
||||
*
|
||||
* @param eventProperties
|
||||
* event properties
|
||||
*/
|
||||
private void removeHoldNodeRefIfPresent(Map<QName, Serializable> eventProperties)
|
||||
{
|
||||
@@ -1942,7 +1981,9 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
||||
|
||||
/**
|
||||
* Helper method to write the audit entry to file
|
||||
* @param entry audit entry
|
||||
*
|
||||
* @param entry
|
||||
* audit entry
|
||||
*/
|
||||
private void writeEntryToFile(RecordsManagementAuditEntry entry)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,8 @@ public class AddToHoldAuditEvent extends AuditEvent implements HoldServicePolici
|
||||
/**
|
||||
* Sets the node service
|
||||
*
|
||||
* @param nodeService nodeService to set
|
||||
* @param nodeService
|
||||
* nodeService to set
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
@@ -69,12 +70,10 @@ public class AddToHoldAuditEvent extends AuditEvent implements HoldServicePolici
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.hold.HoldServicePolicies.OnAddToHoldPolicy#onAddToHold(org.alfresco.service.cmr.repository.NodeRef, org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@Override
|
||||
@Behaviour
|
||||
(
|
||||
@Behaviour(
|
||||
kind = BehaviourKind.CLASS,
|
||||
type = "rma:hold",
|
||||
notificationFrequency = EVERY_EVENT
|
||||
)
|
||||
notificationFrequency = EVERY_EVENT)
|
||||
public void onAddToHold(NodeRef holdNodeRef, NodeRef contentNodeRef)
|
||||
{
|
||||
Map<QName, Serializable> auditProperties = HoldUtils.makePropertiesMap(holdNodeRef, nodeService);
|
||||
|
||||
@@ -56,7 +56,8 @@ public class AddToUserGroupAuditEvent extends AuditEvent implements OnCreateChil
|
||||
/**
|
||||
* Sets the node service
|
||||
*
|
||||
* @param nodeService nodeService to set
|
||||
* @param nodeService
|
||||
* nodeService to set
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
|
||||
@@ -27,12 +27,13 @@
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.audit.event;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
import org.alfresco.api.AlfrescoPublicApi;
|
||||
import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.util.ParameterCheck;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Class to represent an audit event
|
||||
@@ -54,7 +55,8 @@ public class AuditEvent implements RecordsManagementModel, Comparable<AuditEvent
|
||||
protected RecordsManagementAuditService recordsManagementAuditService;
|
||||
|
||||
/**
|
||||
* @param recordsManagementAuditService records management audit service
|
||||
* @param recordsManagementAuditService
|
||||
* records management audit service
|
||||
*/
|
||||
public void setRecordsManagementAuditService(RecordsManagementAuditService recordsManagementAuditService)
|
||||
{
|
||||
@@ -83,8 +85,10 @@ public class AuditEvent implements RecordsManagementModel, Comparable<AuditEvent
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @param name audit event name
|
||||
* @param label audit event label (can be actual label or I18N lookup key)
|
||||
* @param name
|
||||
* audit event name
|
||||
* @param label
|
||||
* audit event label (can be actual label or I18N lookup key)
|
||||
*/
|
||||
public AuditEvent(String name, String label)
|
||||
{
|
||||
@@ -104,7 +108,8 @@ public class AuditEvent implements RecordsManagementModel, Comparable<AuditEvent
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name audit event name
|
||||
* @param name
|
||||
* audit event name
|
||||
*/
|
||||
public void setName(String name)
|
||||
{
|
||||
@@ -125,7 +130,8 @@ public class AuditEvent implements RecordsManagementModel, Comparable<AuditEvent
|
||||
}
|
||||
|
||||
/**
|
||||
* @param label audit event label
|
||||
* @param label
|
||||
* audit event label
|
||||
*/
|
||||
public void setLabel(String label)
|
||||
{
|
||||
@@ -135,7 +141,8 @@ public class AuditEvent implements RecordsManagementModel, Comparable<AuditEvent
|
||||
/**
|
||||
* Compare by label.
|
||||
*
|
||||
* @param compare compare to audit event
|
||||
* @param compare
|
||||
* compare to audit event
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user