Compare commits

..

327 Commits

Author SHA1 Message Date
alfresco-build
231075fd5e [maven-release-plugin][skip ci] prepare release 25.2.0.41 2025-06-04 08:13:46 +00:00
jakubkochman
979420879c ACS-9646 removed extra space that broke the escaping logic (#3374) 2025-06-04 09:21:31 +02:00
alfresco-build
db330e28f5 [maven-release-plugin][skip ci] prepare for next development iteration 2025-06-03 05:02:09 +00:00
alfresco-build
bae0573636 [maven-release-plugin][skip ci] prepare release 25.2.0.40 2025-06-03 05:02:07 +00:00
SatyamSah5
8089fc2572 [ACS-9697] Added user-friendly error message. (#3371) 2025-06-03 09:41:57 +05:30
alfresco-build
1c4fe53c0f [maven-release-plugin][skip ci] prepare for next development iteration 2025-06-01 00:09:36 +00:00
alfresco-build
7a8aa1a2c1 [maven-release-plugin][skip ci] prepare release 25.2.0.39 2025-06-01 00:09:34 +00:00
Alfresco CI User
e08ba1fd4f [force] Force release for 2025-06-01. 2025-06-01 00:05:59 +00:00
alfresco-build
4f40bd0687 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-29 09:34:20 +00:00
alfresco-build
a3578f7baa [maven-release-plugin][skip ci] prepare release 25.2.0.38 2025-05-29 09:34:18 +00:00
jakubkochman
8e8b9c868f ACS-9635 bumped httpclient5 to 5.5 to fix CVE-2025-27820(#3369) 2025-05-29 10:53:01 +02:00
cezary-witkowski
f77b3b79e5 [MNT-24859] Basic Auth still possible with Keycloak enabled (#3361)
Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>
Co-authored-by: Sathish Kumar <ST28@ford.com>
Co-authored-by: pmm <purusothaman.mm@hyland.com>
Co-authored-by: purusothaman-mm <purusothman.mm@hyland.com>
2025-05-27 13:31:00 +02:00
alfresco-build
3a7157f4a7 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-26 16:46:11 +00:00
alfresco-build
d6b979f341 [maven-release-plugin][skip ci] prepare release 25.2.0.37 2025-05-26 16:46:09 +00:00
varapathijanakiram
a090de4e71 Merge pull request #3367 from Alfresco/revert-3333-fix/MNT-24776
Revert "Fix category picker visibility to show only permitted categories based on local permissions"
2025-05-26 21:33:31 +05:30
varapathijanakiram
03621db30a Revert "Fix category picker visibility to show only permitted categories base…"
This reverts commit 8645cdc76d.
2025-05-26 20:45:15 +05:30
alfresco-build
766a6def2b [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-25 00:08:54 +00:00
alfresco-build
117804fb68 [maven-release-plugin][skip ci] prepare release 25.2.0.36 2025-05-25 00:08:52 +00:00
Alfresco CI User
f03e6761ce [force] Force release for 2025-05-25. 2025-05-25 00:05:09 +00:00
alfresco-build
74c8288206 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-23 12:33:45 +00:00
alfresco-build
c0bd0a680b [maven-release-plugin][skip ci] prepare release 25.2.0.35 2025-05-23 12:33:42 +00:00
varapathijanakiram
8645cdc76d Fix category picker visibility to show only permitted categories based on local permissions (#3333) 2025-05-23 17:19:34 +05:30
alfresco-build
5055eec2df [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-23 07:27:34 +00:00
alfresco-build
892f41d6fd [maven-release-plugin][skip ci] prepare release 25.2.0.34 2025-05-23 07:27:32 +00:00
Damian Ujma
075b02baee ACS-9429 Fix AGS Roles API (#3365) 2025-05-23 08:34:27 +02:00
alfresco-build
7c8a75ce6c [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-19 07:21:46 +00:00
alfresco-build
cb0a925e27 [maven-release-plugin][skip ci] prepare release 25.2.0.33 2025-05-19 07:21:44 +00:00
Damian Ujma
c7d2699f7e ACS-9428 Add AGS Roles V1 API (#3287) 2025-05-19 08:27:46 +02:00
alfresco-build
b942b55193 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-19 05:30:08 +00:00
alfresco-build
c1100fe983 [maven-release-plugin][skip ci] prepare release 25.2.0.32 2025-05-19 05:30:06 +00:00
SatyamSah5
62236c90f5 [ACS-9572] show proper message for duplicate unzipping (#3348) 2025-05-19 10:02:53 +05:30
alfresco-build
eabdab91fb [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-18 00:08:45 +00:00
alfresco-build
4f83076cfe [maven-release-plugin][skip ci] prepare release 25.2.0.31 2025-05-18 00:08:43 +00:00
Alfresco CI User
7eda1d420f [force] Force release for 2025-05-18. 2025-05-18 00:05:03 +00:00
alfresco-build
411388d62d [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-16 17:47:37 +00:00
alfresco-build
245d1317ac [maven-release-plugin][skip ci] prepare release 25.2.0.30 2025-05-16 17:47:35 +00:00
Damian Ujma
ee5e34ca32 ACS-9399 Add AGS Roles V1 API (Read) (#3350)
Co-authored-by: SatyamSah5 <satyam.sah25@rediffmail.com>
Co-authored-by: bsayan2 <sayan.bhattacharya@hyland.com>
2025-05-16 18:55:45 +02:00
alfresco-build
c4dcef73e1 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-16 15:15:16 +00:00
alfresco-build
4f53fee1fc [maven-release-plugin][skip ci] prepare release 25.2.0.29 2025-05-16 15:15:13 +00:00
Gerard Olenski
d163410e3d ACS-9578 Improve stability in AddToHoldsBulkV1Tests (#3355) 2025-05-16 16:30:55 +02:00
jakubkochman
9ca251edba Feature/acs 9456 SCIM user sync (#3324) 2025-05-15 10:55:09 +02:00
alfresco-build
193cb9b30d [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-15 08:07:08 +00:00
alfresco-build
e9a36f67fe [maven-release-plugin][skip ci] prepare release 25.2.0.28 2025-05-15 08:07:06 +00:00
DurgDineshsai
c18a58caea Merge pull request #3338 from Alfresco/fix/MNT-24146
[MNT-24146] - Unable to update password for 'admin' user
2025-05-15 12:00:59 +05:30
alfresco-build
11659ab917 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-14 14:10:25 +00:00
alfresco-build
89b1049809 [maven-release-plugin][skip ci] prepare release 25.2.0.27 2025-05-14 14:10:23 +00:00
Belal Ansari
192c105719 ACS-9578 Changes done as part of test case failure for AddToHoldsBulkV1Tests (#3345) 2025-05-14 18:58:41 +05:30
DurgDineshsai
b8fc8efa07 [MNT-24146] Removing the unnecessary logic 2025-05-13 12:42:58 +05:30
DurgDineshsai
2e851cf88d [MNT-24146] Admin user unable to update passowrd 2025-05-13 10:39:16 +05:30
alfresco-build
ebf081c731 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-11 00:08:29 +00:00
alfresco-build
b979701264 [maven-release-plugin][skip ci] prepare release 25.2.0.26 2025-05-11 00:08:26 +00:00
Alfresco CI User
aa0d02abf2 [force] Force release for 2025-05-11. 2025-05-11 00:04:50 +00:00
alfresco-build
2f7b8d50a3 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-09 09:53:33 +00:00
alfresco-build
800736a025 [maven-release-plugin][skip ci] prepare release 25.2.0.25 2025-05-09 09:53:31 +00:00
Kacper Magdziarz
b8b7e5193e [ACS-9635] Revert updated of HttpClient5 and HttpCore5 (#3337) 2025-05-09 11:01:35 +02:00
alfresco-build
808faa71b3 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-08 13:20:15 +00:00
alfresco-build
0bd476968b [maven-release-plugin][skip ci] prepare release 25.2.0.24 2025-05-08 13:20:12 +00:00
Kacper Magdziarz
e51e5e8ca5 [PRODSEC-10123] Bump Httpcore5 to 5.3.4 2025-05-08 14:34:42 +02:00
alfresco-build
46db14d5ff [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-07 17:09:56 +00:00
alfresco-build
b5fa73ca3b [maven-release-plugin][skip ci] prepare release 25.2.0.23 2025-05-07 17:09:54 +00:00
Kacper Magdziarz
c962daae3b [PRODSEC-10123] Bump Httpclient5 to 5.4.4 (#3336) 2025-05-07 18:18:26 +02:00
alfresco-build
8efc559b09 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-05 07:30:49 +00:00
alfresco-build
08628732fc [maven-release-plugin][skip ci] prepare release 25.2.0.22 2025-05-05 07:30:47 +00:00
tathagta15
7f74bf7b3e Bump camel version to 4.11.0 (#3334) 2025-05-05 12:08:42 +05:30
alfresco-build
390073b153 [maven-release-plugin][skip ci] prepare for next development iteration 2025-05-04 00:08:55 +00:00
alfresco-build
68c87f69c5 [maven-release-plugin][skip ci] prepare release 25.2.0.21 2025-05-04 00:08:53 +00:00
Alfresco CI User
2b936050c8 [force] Force release for 2025-05-04. 2025-05-04 00:05:08 +00:00
alfresco-build
28184ca69a [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-30 06:54:38 +00:00
alfresco-build
e05c74813e [maven-release-plugin][skip ci] prepare release 25.2.0.20 2025-04-30 06:54:36 +00:00
tathagta15
e05a1d9ba9 Bump spring-security to 6.3.8 (#3329) 2025-04-30 11:14:56 +05:30
tathagta15
5aab15a77a Bump poi-ooxml version to 5.4.0 (#3328) 2025-04-29 18:10:26 +05:30
alfresco-build
5d267c8d60 [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-27 00:08:37 +00:00
alfresco-build
18fc9a58b4 [maven-release-plugin][skip ci] prepare release 25.2.0.19 2025-04-27 00:08:34 +00:00
Alfresco CI User
6a7ba876b7 [force] Force release for 2025-04-27. 2025-04-27 00:04:58 +00:00
alfresco-build
65bdb242ec [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-25 08:09:22 +00:00
alfresco-build
5a537b301a [maven-release-plugin][skip ci] prepare release 25.2.0.18 2025-04-25 08:09:20 +00:00
KushalBanik
515b894241 [MNT-24490] Reference for AlfrescoSQLServerDialect changed to SQLServerDialect (#3323) 2025-04-25 12:54:39 +05:30
alfresco-build
4978d9e790 [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-23 07:29:04 +00:00
alfresco-build
bf8f5117ac [maven-release-plugin][skip ci] prepare release 25.2.0.17 2025-04-23 07:29:02 +00:00
mohit-singh4
cfb5cb2c6d [fix/MNT-24172-fixRecreationOfRendition2] Fix of recreation of rendition2 (#3155)
Co-authored-by: mohit-singh4 <mohit.singh@contractors.hyland.com>
2025-04-23 12:16:57 +05:30
alfresco-build
71eed6822d [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-20 00:08:37 +00:00
alfresco-build
b1fe69693c [maven-release-plugin][skip ci] prepare release 25.2.0.16 2025-04-20 00:08:35 +00:00
Alfresco CI User
56d415fe4c [force] Force release for 2025-04-20. 2025-04-20 00:04:49 +00:00
alfresco-build
8f4e617703 [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-16 11:44:50 +00:00
alfresco-build
d8bdb82291 [maven-release-plugin][skip ci] prepare release 25.2.0.15 2025-04-16 11:44:47 +00:00
vedantmehra9
f2927a804e Merge pull request #3195 from Alfresco/MNT-23926_add_sevenpass_dod_5220.22-M_ags_deletion
[MNT-23926] Added Seven Pass algorithm for deletion
2025-04-16 15:53:49 +05:30
alfresco-build
baba2090a8 [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-15 05:44:38 +00:00
alfresco-build
dbb1bc11f4 [maven-release-plugin][skip ci] prepare release 25.2.0.14 2025-04-15 05:44:37 +00:00
SatyamSah5
9b53abdc98 [MNT-24358] deleted outdated mTLS config (#3313) 2025-04-15 10:22:52 +05:30
alfresco-build
58bff2bebf [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-13 00:31:48 +00:00
alfresco-build
63fc98d100 [maven-release-plugin][skip ci] prepare release 25.2.0.13 2025-04-13 00:31:46 +00:00
Alfresco CI User
60763787b4 [force] Force release for 2025-04-13. 2025-04-13 00:28:47 +00:00
alfresco-build
6b6e6264a0 [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-09 09:06:52 +00:00
alfresco-build
656eb16a38 [maven-release-plugin][skip ci] prepare release 25.2.0.12 2025-04-09 09:06:49 +00:00
SatyamSah5
447cf86ba6 Merge pull request #3299 from Alfresco/fix/MNT-24623_unzip_error_accent_fix
[MNT-24623] Fix for unsuccessful unzip when folder name contains accent characters.
2025-04-09 13:53:42 +05:30
Satyam Sah
dbf149779d added supress warning for ImporterActionExecutorTest 2025-04-08 17:58:05 +05:30
alfresco-build
cdcf2a7f9b [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-08 08:56:30 +00:00
alfresco-build
9e4f07a010 [maven-release-plugin][skip ci] prepare release 25.2.0.11 2025-04-08 08:56:28 +00:00
Belal Ansari
c2bae9c53a MNT-24891 - Skip actionContext to classify as an adhoc property in add-features action logic (#3298)
Skip actionContext to classify as an adhoc property in add-features action logic
2025-04-08 13:43:26 +05:30
alfresco-build
7412553930 [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-06 00:08:44 +00:00
alfresco-build
ca214ee58f [maven-release-plugin][skip ci] prepare release 25.2.0.10 2025-04-06 00:08:42 +00:00
Alfresco CI User
bb261a1ddc [force] Force release for 2025-04-06. 2025-04-06 00:05:01 +00:00
Satyam Sah
920d34b289 format fix 2025-04-04 15:36:44 +05:30
Satyam Sah
9c65ffddc9 removed redundant logic 2025-04-04 15:20:59 +05:30
Satyam Sah
e817e7d64f added proper message 2025-04-04 15:05:39 +05:30
alfresco-build
f098334fba [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-04 09:35:08 +00:00
alfresco-build
4d6ee95daf [maven-release-plugin][skip ci] prepare release 25.2.0.9 2025-04-04 09:35:06 +00:00
Satyam Sah
2ded9e6c4b Added unit test case for MNT-24623 2025-04-04 14:58:38 +05:30
Kacper Magdziarz
6954f432ff [ACS-9490] Use FixedThreadPool for ExecutorService (#3301)
Add property `local.transform.threadPoolSize=8` for controlling size of thread pool used for transforms.
2025-04-04 10:52:17 +02:00
Satyam Sah
494545b20d Stripped Accent characters from folder name before directory creation. 2025-04-03 18:33:03 +05:30
alfresco-build
86c52f5d0e [maven-release-plugin][skip ci] prepare for next development iteration 2025-04-01 13:49:11 +00:00
alfresco-build
39ef9442fb [maven-release-plugin][skip ci] prepare release 25.2.0.8 2025-04-01 13:49:09 +00:00
cezary-witkowski
388c12ab3e [MNT-24937] Fix EventTableOutbox messages flooding the logs on bootstrap failure (#3286) 2025-04-01 15:04:58 +02:00
alfresco-build
ebb0355692 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-30 00:08:37 +00:00
alfresco-build
53abde6bea [maven-release-plugin][skip ci] prepare release 25.2.0.7 2025-03-30 00:08:35 +00:00
Alfresco CI User
4e990f918b [force] Force release for 2025-03-30. 2025-03-30 00:04:44 +00:00
alfresco-build
416774e4a6 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-29 00:01:55 +00:00
alfresco-build
2c885bdd61 [maven-release-plugin][skip ci] prepare release 25.2.0.6 2025-03-29 00:01:52 +00:00
Tiago Salvado
74380693d0 [MNT-24992] Add method to force renditions content hash code (#3288) 2025-03-28 23:17:58 +00:00
alfresco-build
502ae6c02f [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-26 09:45:09 +00:00
alfresco-build
de880c8273 [maven-release-plugin][skip ci] prepare release 25.2.0.5 2025-03-26 09:45:06 +00:00
Damian Ujma
658de4f7e6 ACS-9433 Bump AOS version to 3.3.0-A1 (#3285) 2025-03-26 09:43:11 +01:00
alfresco-build
b89ddc51c1 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-25 15:17:15 +00:00
alfresco-build
7c1ca67ef4 [maven-release-plugin][skip ci] prepare release 25.2.0.4 2025-03-25 15:17:12 +00:00
Damian Ujma
2388687eb0 ACS-9414 Enhance the Identity Provider configuration (#3263) 2025-03-25 15:19:34 +01:00
alfresco-build
637c349205 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-23 00:08:00 +00:00
alfresco-build
21434e1ce1 [maven-release-plugin][skip ci] prepare release 25.2.0.3 2025-03-23 00:07:58 +00:00
Alfresco CI User
f49ce68c9e [force] Force release for 2025-03-23. 2025-03-23 00:04:50 +00:00
alfresco-build
f630da7cce [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-19 08:22:48 +00:00
alfresco-build
48ad5adc84 [maven-release-plugin][skip ci] prepare release 25.2.0.2 2025-03-19 08:22:46 +00:00
mohit-singh4
2b372ec381 [APPS-3242] Fix for facet query for elasticsearch (#3260)
Co-authored-by: mohit-singh4 <mohit.singh@contractors.hyland.com>
2025-03-19 13:06:44 +05:30
alfresco-build
30c40ee6e0 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-17 16:01:07 +00:00
alfresco-build
adc45c2cd9 [maven-release-plugin][skip ci] prepare release 25.2.0.1 2025-03-17 16:01:05 +00:00
Gerard Olenski
f94c21ea57 Merge pull request #3269 from Alfresco/feature/ACS-9417-reformat-code
ACS-9417 reformat code and simplify CI
2025-03-17 16:01:46 +01:00
alfresco-build
bc8424482b Apply Pre-Commit code formatting 2025-03-17 14:00:58 +00:00
Gerard Olenski
5255760f6e Trigger [reformat code] 2025-03-17 14:35:18 +01:00
Gerard Olenski
0ade3216e4 ACS-9417 Reformat code and simplify CI 2025-03-17 14:32:12 +01:00
cezary-witkowski
d282e347dc [ACS-9379] NodeRefRadixHasher no longer expects UUID format for NodeRef.id. Every not empty string works. Backward compatible. (#3247)
Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>
2025-03-17 14:17:54 +01:00
Kacper Magdziarz
6a26cb0e0f Updating master branch to 25.2.0 after 25.1.0 ACS release [skip ci] 2025-03-17 13:46:56 +01:00
vedantmehra9
157430c0d6 formatting issue 2025-03-17 13:25:29 +05:30
Vedant Mehra
9cddeb61c8 Merge branch 'master' of https://github.com/Alfresco/alfresco-community-repo into MNT-23926_add_sevenpass_dod_5220.22-M_ags_deletion 2025-03-17 10:44:52 +05:30
alfresco-build
7a7e166314 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-16 00:09:30 +00:00
alfresco-build
37e890ed1b [maven-release-plugin][skip ci] prepare release 25.1.0.71 2025-03-16 00:09:28 +00:00
Alfresco CI User
2ba01f005a [force] Force release for 2025-03-16. 2025-03-16 00:04:55 +00:00
alfresco-build
5ee1ec2d11 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-13 10:30:48 +00:00
alfresco-build
e6f69eeb74 [maven-release-plugin][skip ci] prepare release 25.1.0.70 2025-03-13 10:30:45 +00:00
Piotr Żurek
2f4c70a4d5 Merge pull request #3261 from Alfresco/feature/ACS-9080-bump-server-root
ACS-9080 Bump server root
2025-03-13 10:29:33 +01:00
Piotr Żurek
147a6c8c80 ACS-9080 Bump server root 2025-03-13 10:10:08 +01:00
jakubkochman
18980100a1 ACS-9080 new documentation url (#3239) 2025-03-13 10:00:03 +01:00
Vedant Mehra
86980cb634 Merge branch 'master' of https://github.com/Alfresco/alfresco-community-repo into MNT-23926_add_sevenpass_dod_5220.22-M_ags_deletion 2025-03-12 13:05:29 +05:30
alfresco-build
3967bd1295 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-11 11:14:42 +00:00
alfresco-build
f467e982c2 [maven-release-plugin][skip ci] prepare release 25.1.0.69 2025-03-11 11:14:40 +00:00
Gerard Olenski
51395de707 ACS-9259 Improve stability of HazelcastLockStoreTxTest test (#3248) 2025-03-11 11:13:57 +01:00
Kacper Magdziarz
9d25c6dcd5 [ACS-9353] Bump ATS to 4.1.7 (#3254) 2025-03-11 11:00:45 +01:00
Piotr Żurek
1cb25daaa1 Merge pull request #3253 from Alfresco/feature/ACS-9330-bump-api-explorer
ACS-9330 Bump REST API Explorer
2025-03-11 09:50:38 +01:00
Piotr Żurek
fc3eb2e55f ACS-9330 Bump REST API Explorer 2025-03-11 08:50:13 +01:00
alfresco-build
200a8a2d4c [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-11 06:55:11 +00:00
alfresco-build
e3fff18703 [maven-release-plugin][skip ci] prepare release 25.1.0.68 2025-03-11 06:55:07 +00:00
Damian Ujma
f9da66c6e4 ACS-9357 Bump IE/SS to 2.0.15 (#3251) 2025-03-10 14:32:09 +01:00
alfresco-build
e58df0ab6f [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-09 00:07:02 +00:00
alfresco-build
1ef208546f [maven-release-plugin][skip ci] prepare release 25.1.0.67 2025-03-09 00:07:00 +00:00
Alfresco CI User
28307d7c91 [force] Force release for 2025-03-09. 2025-03-09 00:03:54 +00:00
alfresco-build
0c0a95d095 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-06 13:29:01 +00:00
alfresco-build
41db40b6a2 [maven-release-plugin][skip ci] prepare release 25.1.0.66 2025-03-06 13:28:59 +00:00
Tiago Salvado
ec78a1486c [MNT-24913] Added fallback method to obtain deployment category in order to check if workflow is secure (#3236) 2025-03-06 12:35:03 +00:00
alfresco-build
7749f7b80d [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-06 10:25:57 +00:00
alfresco-build
1cec73b176 [maven-release-plugin][skip ci] prepare release 25.1.0.65 2025-03-06 10:25:55 +00:00
dependabot[bot]
58902c77f1 Bump org.alfresco:alfresco-transform-model from 5.1.7-A.3 to 5.1.7-A.4 (#3242)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 10:39:37 +01:00
alfresco-build
b1f689ed42 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-03 08:58:23 +00:00
alfresco-build
68ff2e8b43 [maven-release-plugin][skip ci] prepare release 25.1.0.64 2025-03-03 08:58:20 +00:00
Kacper Magdziarz
e5559d544f [ACS-9356] Bump Solr to 2.0.15-A.1 (#3233) 2025-03-03 09:12:10 +01:00
alfresco-build
b618aaf874 [maven-release-plugin][skip ci] prepare for next development iteration 2025-03-02 00:07:51 +00:00
alfresco-build
8260867f49 [maven-release-plugin][skip ci] prepare release 25.1.0.63 2025-03-02 00:07:49 +00:00
Alfresco CI User
ca0c0b54b5 [force] Force release for 2025-03-02. 2025-03-02 00:04:43 +00:00
alfresco-build
c44ff3b5cb [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-28 10:03:00 +00:00
alfresco-build
102a442c66 [maven-release-plugin][skip ci] prepare release 25.1.0.62 2025-02-28 10:02:58 +00:00
dependabot[bot]
c00d1a2f38 Bump net.minidev:json-smart from 2.5.1 to 2.5.2 (#3197)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-28 09:53:03 +01:00
alfresco-build
c6f957d005 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-27 10:32:16 +00:00
alfresco-build
078195379d [maven-release-plugin][skip ci] prepare release 25.1.0.61 2025-02-27 10:32:13 +00:00
rrajoria
2da46a6659 Revert Unlock Document Changes (#3212) 2025-02-27 14:50:15 +05:30
Vedant Mehra
72fed7f913 Merge branch 'master' of https://github.com/Alfresco/alfresco-community-repo into MNT-23926_add_sevenpass_dod_5220.22-M_ags_deletion 2025-02-27 13:30:42 +05:30
alfresco-build
4846007eb2 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-26 21:30:28 +00:00
alfresco-build
2ddeb8ef80 [maven-release-plugin][skip ci] prepare release 25.1.0.60 2025-02-26 21:30:26 +00:00
Piotr Żurek
0303f74372 ACS-9352 Bump T-Core to 5.1.7-A.3 & ATS to 4.1.7-A.1 (#3226) 2025-02-26 21:34:02 +01:00
alfresco-build
c405974d8d [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-26 16:43:36 +00:00
alfresco-build
d541ba3e49 [maven-release-plugin][skip ci] prepare release 25.1.0.59 2025-02-26 16:43:34 +00:00
Damian Ujma
cc86d9e9ed Revert "ACS-9199 Bump subethasmtp version to 7.1.3 (#3207)" (#3225) 2025-02-26 17:00:04 +01:00
dependabot[bot]
7a7fbf37a2 PRODSEC-9938 PRODSEC-9940 Bump io.netty:netty-bom from 4.1.117.Final to 4.1.118.Final (#3194)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-26 13:57:26 +01:00
alfresco-build
6fd9fed28d [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-26 09:47:17 +00:00
alfresco-build
3f518beb46 [maven-release-plugin][skip ci] prepare release 25.1.0.58 2025-02-26 09:47:14 +00:00
Gerard Olenski
8b3fbdfec1 PRODSEC-9936 Bump spring-security to 6.3.7 (#3223) 2025-02-26 08:26:16 +01:00
alfresco-build
5d847fe5f9 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-25 11:02:11 +00:00
alfresco-build
b3a9633da3 [maven-release-plugin][skip ci] prepare release 25.1.0.57 2025-02-25 11:02:09 +00:00
Giovanni Toraldo
ebdc0b2614 OPSEXP-3032 Bump to latest alfresco-base-tomcat (#3222) 2025-02-25 10:43:29 +01:00
alfresco-build
8fb922a065 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-23 00:07:43 +00:00
alfresco-build
0a9e2e1ce7 [maven-release-plugin][skip ci] prepare release 25.1.0.56 2025-02-23 00:07:41 +00:00
Alfresco CI User
de5bf5a500 [force] Force release for 2025-02-23. 2025-02-23 00:04:35 +00:00
alfresco-build
5112722755 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-19 15:26:53 +00:00
alfresco-build
0835f03ba6 [maven-release-plugin][skip ci] prepare release 25.1.0.55 2025-02-19 15:26:51 +00:00
Damian Ujma
1adddb0f7f ACS-9199 Bump subethasmtp version to 7.1.3 (#3207)
* ACS-9199 Bump subethasmtp to 7.1.3

* ACS-9199 Bump subethasmtp to 7.1.3

* ACS-9199 Use org.eclipse.angus

* ACS-9199 Update notice.txt

* ACS-9199 Remove provided scope for jakarta.mail:mail-api

* ACS-9199 Fix ags

* ACS-9199 Remove verbose
2025-02-19 15:42:14 +01:00
alfresco-build
85c0d7896e [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-19 14:42:02 +00:00
alfresco-build
64b5ca9f2b [maven-release-plugin][skip ci] prepare release 25.1.0.54 2025-02-19 14:42:00 +00:00
Kacper Magdziarz
e85ed14ac8 [ACS-9313] Switch to new tags for tomcat base images in Dockerfiles (#3208) 2025-02-19 14:43:03 +01:00
Vedant Mehra
13a83d9e22 reverting properties file change 2025-02-19 15:29:43 +05:30
Vedant Mehra
a2735539ea changes for review comments 2025-02-19 15:25:43 +05:30
alfresco-build
48d391d250 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-17 13:00:19 +00:00
alfresco-build
df2c21dfef [maven-release-plugin][skip ci] prepare release 25.1.0.53 2025-02-17 13:00:17 +00:00
Kacper Magdziarz
b0a5d484b6 [ACS-9270] Switch MySQL driver from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver (#3204) 2025-02-17 12:58:42 +01:00
alfresco-build
798ca41d63 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-17 08:55:52 +00:00
alfresco-build
7b8576c403 [maven-release-plugin][skip ci] prepare release 25.1.0.52 2025-02-17 08:55:50 +00:00
Gerard Olenski
75d5201af1 ACS 9256 improve async tests stability (#3191)
* ACS-9256 Improved stability in DynamicallySizedThreadPoolExecutorTest

* ACS-9256 Removed unused unstable test in SpringAwareUserTransactionTest

* ACS-9256 Improved stability in DynamicallySizedThreadPoolExecutorTest

* ACS-9256 Improved stability in ActionServiceImplTest and RuleServiceCoverageTest

* ACS-9256 Improved stability in ActionTrackingServiceImplTest

* ACS-9256 Improved performance in ComparePropertyValueEvaluatorTest

* ACS-9256 Improved performance in LockServiceImplTest

* ACS-9256 Improved stability in LockBehaviourImplTest

* ACS-9256 Improved stability in ContentMetadataExtracterTest

* ACS-9256 Removed unstable and unused tests

* ACS-9256 Improve stability in CachedContentCleanupJobTest

* ACS-9256 Pre-commit fixes
2025-02-17 08:58:04 +01:00
alfresco-build
9e5a030b6f [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-16 00:07:50 +00:00
alfresco-build
8974a388d6 [maven-release-plugin][skip ci] prepare release 25.1.0.51 2025-02-16 00:07:48 +00:00
Alfresco CI User
05f266d1a8 [force] Force release for 2025-02-16. 2025-02-16 00:04:40 +00:00
Vedant Mehra
1cb3931f21 changes for pmd 2025-02-13 19:20:39 +05:30
Vedant Mehra
0f5653e250 changes for pmd 2025-02-13 18:03:54 +05:30
Vedant Mehra
4a33ad8c3b changes for pmd 2025-02-13 16:25:47 +05:30
alfresco-build
2bade87366 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-13 10:39:13 +00:00
alfresco-build
df501acd12 [maven-release-plugin][skip ci] prepare release 25.1.0.50 2025-02-13 10:39:11 +00:00
Piotr Żurek
455dd3573e Switch build tools to v8.13.0 (#3198) 2025-02-13 10:57:20 +01:00
Vedant Mehra
85703f4284 changes for pmd 2025-02-13 14:41:43 +05:30
Vedant Mehra
127912aca9 Removed unwanted files from commit 2025-02-13 12:26:52 +05:30
Vedant Mehra
70135ab771 fixed pre commit issues 2025-02-13 11:02:07 +05:30
alfresco-build
48669a2a37 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-12 13:23:34 +00:00
alfresco-build
b7711b17f5 [maven-release-plugin][skip ci] prepare release 25.1.0.49 2025-02-12 13:23:32 +00:00
Vedant Mehra
fa516ef58f [MNT-23926] Added Seven Pass algorithm for deletion 2025-02-12 14:52:44 +05:30
Piotr Żurek
3687d06c8f Trigger CI 2025-02-12 09:29:20 +01:00
alfresco-build
f763a3a6cc [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-10 11:50:52 +00:00
alfresco-build
220badc4dc [maven-release-plugin][skip ci] prepare release 25.1.0.48 2025-02-10 11:50:50 +00:00
Gerard Olenski
8d6e021207 ACS 9185 implement rest api for reauthorizing a single user (#3190)
* ACS-9185 Reauthorize endpoint

* ACS-9185 Add the reauthorization code endpoint

* ACS-9185 Refactored model

* ACS-9185 Fixed rest wrapper implementation

---------

Co-authored-by: Damian Ujma <damian.ujma@hyland.com>
2025-02-10 11:25:51 +01:00
alfresco-build
dc48e60382 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-09 00:07:48 +00:00
alfresco-build
66bc900254 [maven-release-plugin][skip ci] prepare release 25.1.0.47 2025-02-09 00:07:47 +00:00
Alfresco CI User
37cad17e7a [force] Force release for 2025-02-09. 2025-02-09 00:04:38 +00:00
alfresco-build
226c695d97 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-06 11:28:23 +00:00
alfresco-build
5703bf0927 [maven-release-plugin][skip ci] prepare release 25.1.0.46 2025-02-06 11:28:21 +00:00
dependabot[bot]
c370c39e34 Bump dependency.spring.version from 6.2.1 to 6.2.2 (#3151)
Bumps `dependency.spring.version` from 6.2.1 to 6.2.2.

Updates `org.springframework:spring-aop` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-beans` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-context` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-context-support` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-core` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-expression` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-jdbc` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-jms` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-test` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-orm` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-tx` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-web` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

Updates `org.springframework:spring-webmvc` from 6.2.1 to 6.2.2
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.2.1...v6.2.2)

---
updated-dependencies:
- dependency-name: org.springframework:spring-aop
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-beans
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-context
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-context-support
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-expression
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-jms
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-test
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-orm
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-tx
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework:spring-webmvc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-06 11:44:48 +01:00
alfresco-build
643510f1b4 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-04 10:38:43 +00:00
alfresco-build
5e2c8eac98 [maven-release-plugin][skip ci] prepare release 25.1.0.45 2025-02-04 10:38:40 +00:00
dependabot[bot]
888d034b82 Bump com.google.code.gson:gson from 2.12.0 to 2.12.1 (#3180)
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.12.0...gson-parent-2.12.1)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-04 10:52:07 +01:00
dependabot[bot]
b16b116293 Bump joda-time:joda-time from 2.13.0 to 2.13.1 (#3188)
Bumps [joda-time:joda-time](https://github.com/JodaOrg/joda-time) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/JodaOrg/joda-time/releases)
- [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt)
- [Commits](https://github.com/JodaOrg/joda-time/compare/v2.13.0...v2.13.1)

---
updated-dependencies:
- dependency-name: joda-time:joda-time
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-04 10:49:33 +01:00
alfresco-build
f4a6346471 [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-03 08:48:12 +00:00
alfresco-build
70387a8a19 [maven-release-plugin][skip ci] prepare release 25.1.0.44 2025-02-03 08:48:09 +00:00
dependabot[bot]
c4b9ee4284 Bump dependency.cxf.version from 4.0.5 to 4.1.0 (#3093)
Bumps `dependency.cxf.version` from 4.0.5 to 4.1.0.

Updates `org.apache.cxf:cxf-rt-frontend-jaxws` from 4.0.5 to 4.1.0

Updates `org.apache.cxf:cxf-rt-frontend-jaxrs` from 4.0.5 to 4.1.0

Updates `org.apache.cxf:cxf-rt-rs-client` from 4.0.5 to 4.1.0

Updates `org.apache.cxf:cxf-rt-transports-http` from 4.0.5 to 4.1.0

Updates `org.apache.cxf:cxf-rt-ws-policy` from 4.0.5 to 4.1.0

---
updated-dependencies:
- dependency-name: org.apache.cxf:cxf-rt-frontend-jaxws
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.cxf:cxf-rt-frontend-jaxrs
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.cxf:cxf-rt-rs-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.cxf:cxf-rt-transports-http
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.cxf:cxf-rt-ws-policy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 09:02:46 +01:00
alfresco-build
1629daa28e [maven-release-plugin][skip ci] prepare for next development iteration 2025-02-02 00:07:35 +00:00
alfresco-build
c9f2b1f9c7 [maven-release-plugin][skip ci] prepare release 25.1.0.43 2025-02-02 00:07:33 +00:00
Alfresco CI User
f00af42eee [force] Force release for 2025-02-02. 2025-02-02 00:04:26 +00:00
alfresco-build
6849da5d48 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-30 16:46:20 +00:00
alfresco-build
d4816e71bd [maven-release-plugin][skip ci] prepare release 25.1.0.42 2025-01-30 16:46:17 +00:00
dependabot[bot]
652e36bcac Bump com.networknt:json-schema-validator from 1.5.4 to 1.5.5 (#3152)
Bumps [com.networknt:json-schema-validator](https://github.com/networknt/json-schema-validator) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/networknt/json-schema-validator/releases)
- [Changelog](https://github.com/networknt/json-schema-validator/blob/master/CHANGELOG.md)
- [Commits](https://github.com/networknt/json-schema-validator/compare/1.5.4...1.5.5)

---
updated-dependencies:
- dependency-name: com.networknt:json-schema-validator
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-30 17:02:28 +01:00
dependabot[bot]
22b9bfd056 Bump com.diffplug.spotless:spotless-maven-plugin from 2.43.0 to 2.44.2 (#3153)
Bumps [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless) from 2.43.0 to 2.44.2.
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/lib/2.43.0...maven/2.44.2)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-30 16:58:02 +01:00
dependabot[bot]
4743ee4d9a Bump io.netty:netty-bom from 4.1.113.Final to 4.1.117.Final (#3157)
Bumps [io.netty:netty-bom](https://github.com/netty/netty) from 4.1.113.Final to 4.1.117.Final.
- [Commits](https://github.com/netty/netty/compare/netty-4.1.113.Final...netty-4.1.117.Final)

---
updated-dependencies:
- dependency-name: io.netty:netty-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-30 16:57:10 +01:00
dependabot[bot]
1d7ac4dfaf Bump org.apache.httpcomponents.core5:httpcore5 from 5.3 to 5.3.3 (#3170)
Bumps [org.apache.httpcomponents.core5:httpcore5](https://github.com/apache/httpcomponents-core) from 5.3 to 5.3.3.
- [Changelog](https://github.com/apache/httpcomponents-core/blob/rel/v5.3.3/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-core/compare/rel/v5.3...rel/v5.3.3)

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.core5:httpcore5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-30 16:55:44 +01:00
dependabot[bot]
1a17f7a0cf Bump com.google.code.gson:gson from 2.11.0 to 2.12.0 (#3171)
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.11.0 to 2.12.0.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.11.0...gson-parent-2.12.0)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-30 16:53:52 +01:00
alfresco-build
7d98849187 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-30 11:00:49 +00:00
alfresco-build
cb92c78b3c [maven-release-plugin][skip ci] prepare release 25.1.0.41 2025-01-30 11:00:46 +00:00
Damian Ujma
733e232e42 ACS-9178 Add REST API for deauthorizing (#3169)
* ACS-9178 Set peopleEntityResource bean id

* ACS-9178 Add the 'deauthorizeUser' operation

* ACS-9178 Add 'deauthorizeUser' to Rest API

* ACS-9178 Add test

* ACS-9178 Fix PMD

* ACS-9178 Fix deauthorize API tests

---------

Co-authored-by: Gerard Olenski <gerard.olenski@hyland.com>
2025-01-30 11:07:57 +01:00
alfresco-build
6804d5e288 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-29 16:30:16 +00:00
alfresco-build
ef0a39871d [maven-release-plugin][skip ci] prepare release 25.1.0.40 2025-01-29 16:30:11 +00:00
dependabot[bot]
6b929e45e7 Bump io.swagger:swagger-parser from 1.0.72 to 1.0.73 (#3158)
Bumps [io.swagger:swagger-parser](https://github.com/swagger-api/swagger-parser) from 1.0.72 to 1.0.73.
- [Release notes](https://github.com/swagger-api/swagger-parser/releases)
- [Commits](https://github.com/swagger-api/swagger-parser/compare/v1.0.72...v1.0.73)

---
updated-dependencies:
- dependency-name: io.swagger:swagger-parser
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-29 16:47:29 +01:00
dependabot[bot]
7249bc91ff Bump org.postgresql:postgresql from 42.7.4 to 42.7.5 (#3159)
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.7.4 to 42.7.5.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.7.4...REL42.7.5)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-29 16:43:32 +01:00
alfresco-build
d20b00b9ae [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-29 15:27:03 +00:00
alfresco-build
208e10c9b0 [maven-release-plugin][skip ci] prepare release 25.1.0.39 2025-01-29 15:27:01 +00:00
dependabot[bot]
304c68444c Bump org.assertj:assertj-core from 3.26.3 to 3.27.3 (#3163)
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.3 to 3.27.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.26.3...assertj-build-3.27.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-29 15:43:36 +01:00
dependabot[bot]
2f0a502958 Bump commons-codec:commons-codec from 1.17.1 to 1.18.0 (#3166)
Bumps [commons-codec:commons-codec](https://github.com/apache/commons-codec) from 1.17.1 to 1.18.0.
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.17.1...rel/commons-codec-1.18.0)

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-29 15:42:03 +01:00
alfresco-build
e6d3963ef6 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-29 11:38:01 +00:00
alfresco-build
5004d357b9 [maven-release-plugin][skip ci] prepare release 25.1.0.38 2025-01-29 11:37:59 +00:00
Kacper Magdziarz
6c61e78b2a [ACS-9181] Bump Keycloak to 26.1.0 (#3168) 2025-01-29 11:35:27 +01:00
alfresco-build
d5192922cf [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-27 14:02:15 +00:00
alfresco-build
9e3cf355e1 [maven-release-plugin][skip ci] prepare release 25.1.0.37 2025-01-27 14:02:13 +00:00
Piotr Żurek
d0f18ac1a5 ACS-9137 Bump ATS/SS/IE (#3164) 2025-01-27 14:15:10 +01:00
alfresco-build
bcf8a576e9 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-26 00:06:57 +00:00
alfresco-build
1a8ca698c7 [maven-release-plugin][skip ci] prepare release 25.1.0.36 2025-01-26 00:06:55 +00:00
Alfresco CI User
cabb64f4cd [force] Force release for 2025-01-26. 2025-01-26 00:04:08 +00:00
alfresco-build
3cd5cfbbe1 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-20 05:55:02 +00:00
alfresco-build
6d6e6d913e [maven-release-plugin][skip ci] prepare release 25.1.0.35 2025-01-20 05:54:59 +00:00
vedantmehra9
692da57e7f [apps-3106] updating api-explorer version to 25.1.0-A1 2025-01-20 10:44:34 +05:30
vedantmehra9
d4b0499c00 Merge pull request #3123 from Alfresco/fix/apps-3106_Remove_Character_Java_Doc
[APPS-3106] Removed special characters from yaml files
2025-01-20 10:36:36 +05:30
alfresco-build
1b35495717 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-19 00:07:53 +00:00
alfresco-build
2b9b6b825c [maven-release-plugin][skip ci] prepare release 25.1.0.34 2025-01-19 00:07:51 +00:00
Alfresco CI User
6244cb87b6 [force] Force release for 2025-01-19. 2025-01-19 00:04:46 +00:00
alfresco-build
52c5f34e1a [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-17 10:56:34 +00:00
alfresco-build
cd977453a4 [maven-release-plugin][skip ci] prepare release 25.1.0.33 2025-01-17 10:56:32 +00:00
Cezary Witkowski
1592f7fa1d [MNT-24807] repo event2 is exposing user password hash and salt (#3147)
* [MNT-24807] Implemented PropertyReplacer that replaces values of sensitive properties (e.g. passwords) during creation of NodeResource for event2

* [MNT-24807] Fix failing tests

* Revert "[MNT-24807] Fix failing tests"

This reverts commit c118f713f2.

* [MNT-24807] Fix failing tests without reformat

Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>

* [MNT-24807] Introduced interface to keep convention

Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>

* [MNT-24807] Added ability to configure property filter and mapper for user

Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>

* [MNT-24807] Fixed npe and pmd issues

Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>

* [MNT-24807] Fixed more pmd comments, applied pre-commit formatting

Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>

* [MNT-24807] Renamed user configured properties to indicate what they do, added failsafe when userConfiguredReplacementText is not configured at all

Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>

* [MNT-24807] Added unit tests

Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>

* [MNT-24807] Additional config to disable property mapper entirely

* [MNT-24807] PMD again

* [MNT-24807] Updated year in licence for some files I missed

Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>

---------

Signed-off-by: cezary-witkowski <cezary.witkowski@hyland.com>
2025-01-17 11:16:31 +01:00
alfresco-build
ea36e77775 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-17 09:02:35 +00:00
alfresco-build
e5968a25f3 [maven-release-plugin][skip ci] prepare release 25.1.0.32 2025-01-17 09:02:33 +00:00
Damian Ujma
c02422077c ACS-9140 Bump IE/SS to 2.0.14-A.1 (#3150) 2025-01-16 16:41:59 +01:00
Vedant Mehra
021f7f98d4 [APPS-3106]-Special characters handling 2025-01-16 10:21:28 +05:30
alfresco-build
9d9c7a8d73 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-15 16:45:50 +00:00
alfresco-build
96b5968ce4 [maven-release-plugin][skip ci] prepare release 25.1.0.31 2025-01-15 16:45:47 +00:00
Sara
7b3c24416c ACS-9136 Bump ATS 4.1.6-A.1 (#3148) 2025-01-15 15:17:52 +00:00
alfresco-build
03412b7d5a [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-14 10:17:31 +00:00
alfresco-build
ab34e52f4e [maven-release-plugin][skip ci] prepare release 25.1.0.30 2025-01-14 10:17:29 +00:00
Gerard Olenski
fb45a3e3c2 ACS-9113 Verify Supported Platform for 25.1 (#3142)
- updated test suites to verify support of MariaDB 10.11
2025-01-14 10:07:23 +01:00
Piotr Żurek
d11a0deacc ACS-9045 Upgrade to Spring Framework 6.2.x (#3143) 2025-01-14 09:39:18 +01:00
alfresco-build
35c01f78c3 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-13 12:51:48 +00:00
alfresco-build
2ba65ac19d [maven-release-plugin][skip ci] prepare release 25.1.0.29 2025-01-13 12:51:46 +00:00
Kacper Magdziarz
c7e79193b0 [ACS-9045] Bump Spring Framework to 6.2.0 (#3083)
* [ACS-9045] Bump Spring Framework to 6.2.0

* [ACS-9045] Bump Surf Webscripts to 10.0

* [ACS-9045] Force bean initiation order

* [ACS-9045] Use not Deprecated determineTransactionManager method

Co-authored-by: Damian Ujma <damian.ujma@hyland.com>
2025-01-13 13:12:04 +01:00
alfresco-build
85648077e6 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-13 09:53:52 +00:00
alfresco-build
a5bf4c750b [maven-release-plugin][skip ci] prepare release 25.1.0.28 2025-01-13 09:53:49 +00:00
Gerard Olenski
986c387412 ACS-9113 [db] Verify Supported Platform for 25.1 (#3134)
- updated CI to run tests on PostgreSQL 14.x, 15.x, 16.x
2025-01-13 10:13:26 +01:00
alfresco-build
7956830390 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-12 00:07:44 +00:00
alfresco-build
2421752f4d [maven-release-plugin][skip ci] prepare release 25.1.0.27 2025-01-12 00:07:42 +00:00
Alfresco CI User
3be58cf5af [force] Force release for 2025-01-12. 2025-01-12 00:04:25 +00:00
Vedant Mehra
c34212b1b3 Merge branch 'master' of https://github.com/Alfresco/alfresco-community-repo into fix/apps-3106_Remove_Character_Java_Doc 2025-01-10 12:07:56 +05:30
alfresco-build
da9c7c372c [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-09 19:59:34 +00:00
alfresco-build
148c0e9602 [maven-release-plugin][skip ci] prepare release 25.1.0.26 2025-01-09 19:59:32 +00:00
dependabot[bot]
3eada8a1fd Bump org.codehaus.cargo:cargo-maven3-plugin from 1.10.14 to 1.10.16 (#3095)
Bumps org.codehaus.cargo:cargo-maven3-plugin from 1.10.14 to 1.10.16.

---
updated-dependencies:
- dependency-name: org.codehaus.cargo:cargo-maven3-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-09 19:19:44 +00:00
alfresco-build
1416f4d877 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-09 19:10:19 +00:00
alfresco-build
0f3708c01b [maven-release-plugin][skip ci] prepare release 25.1.0.25 2025-01-09 19:10:17 +00:00
dependabot[bot]
f193389fe5 Bump dependency.log4j.version from 2.24.2 to 2.24.3 (#3094)
Bumps `dependency.log4j.version` from 2.24.2 to 2.24.3.

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-api` from 2.24.2 to 2.24.3

Updates `org.apache.logging.log4j:log4j-core` from 2.24.2 to 2.24.3

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-slf4j2-impl
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-09 18:28:59 +00:00
alfresco-build
fc0a1d3cc6 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-09 16:49:47 +00:00
alfresco-build
3551dbeb29 [maven-release-plugin][skip ci] prepare release 25.1.0.24 2025-01-09 16:49:45 +00:00
dependabot[bot]
436fde1a06 Bump org.alfresco:alfresco-greenmail from 7.0 to 7.1 (#2931)
Bumps [org.alfresco:alfresco-greenmail](https://github.com/Alfresco/alfresco-greenmail) from 7.0 to 7.1.
- [Commits](https://github.com/Alfresco/alfresco-greenmail/compare/alfresco-greenmail-7.0...alfresco-greenmail-7.1)

---
updated-dependencies:
- dependency-name: org.alfresco:alfresco-greenmail
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sara <sara.aspery@alfresco.com>
2025-01-09 16:09:40 +00:00
alfresco-build
c5ac2f3c4a [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-09 09:17:19 +00:00
alfresco-build
ae00e09b11 [maven-release-plugin][skip ci] prepare release 25.1.0.23 2025-01-09 09:17:17 +00:00
Manish Kumar
38b796f9ce fix/MNT-24542 class cast exception (#3092)
* [MNT-24542] fix class cast exception

* pre-commit-issue

* removed else part

* address review comments

* fix-conflict
2025-01-09 14:07:27 +05:30
alfresco-build
f9be67add6 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-09 07:19:54 +00:00
alfresco-build
dc458fd54e [maven-release-plugin][skip ci] prepare release 25.1.0.22 2025-01-09 07:19:53 +00:00
mohit-singh4
60a0d6a492 [APPS-3154] fix for number of file field in response (#3108)
* [fix/APPS-3154] Rectifying number of Files field in response.

* [fix/APPS-3154] Rectifying number of Files field in response.

* [fix/APPS-3154] Rectifying number of Files field in response.

* [fix/APPS-3154-fixForNumberOfFileFieldInResponse] fix for NumberOfFiles field in response

* [fix/APPS-3154-fixForNumberOfFileFieldInResponse] Updating numberOfFiles field in response

---------

Co-authored-by: mohit-singh4 <mohit.singh@contractors.hyland.com>
2025-01-09 12:08:33 +05:30
Vedant Mehra
f204310364 [apps-3106]-Reverted yaml change for build check 2025-01-09 11:11:42 +05:30
Vedant Mehra
7ac4c434e9 Merge branch 'master' of https://github.com/Alfresco/alfresco-community-repo into fix/apps-3106_Remove_Character_Java_Doc 2025-01-09 10:30:12 +05:30
alfresco-build
82f7b5a005 [maven-release-plugin][skip ci] prepare for next development iteration 2025-01-08 12:21:51 +00:00
alfresco-build
0f99564ca0 [maven-release-plugin][skip ci] prepare release 25.1.0.21 2025-01-08 12:21:49 +00:00
Piotr Żurek
b14f1ee7f1 Trigger CI 2025-01-08 12:28:32 +01:00
SathishK-T
99ef818606 [3172] License Header Update (#3126)
Co-authored-by: Sathish Kumar <ST28@ford.com>
2025-01-08 15:11:16 +05:30
Vedant Mehra
62a9d439b7 [APPS-3106] Precommit formatter 2025-01-08 14:53:04 +05:30
Vedant Mehra
0253b399a2 [APPS-3106] Removed special characters from yaml files 2025-01-07 13:16:31 +05:30
6426 changed files with 992635 additions and 964669 deletions

View File

@@ -44,14 +44,10 @@ jobs:
- 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@v8.2.0
with:
write-list-to-env: true
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v8.2.0
- 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/pre-commit@v8.16.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Prepare maven cache and check compilation"
@@ -69,12 +65,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.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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v8.16.0
continue-on-error: true
with:
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
@@ -92,10 +88,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.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
- 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
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
repository: "Alfresco/veracode-baseline-archive"
@@ -148,10 +144,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.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
- 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.3.0
with:
classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\""
@@ -181,14 +177,14 @@ jobs:
testAttributes: "-Dtest=AllMmtUnitTestSuite"
steps:
- uses: actions/checkout@v4
- 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/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
- 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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testModule }}
@@ -219,7 +215,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -261,9 +257,9 @@ jobs:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -276,7 +272,7 @@ jobs:
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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }}
@@ -307,7 +303,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -337,12 +333,12 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ['10.2.18', '10.4', '10.5']
version: ['10.5', '10.6']
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: Run MariaDB ${{ matrix.version }} database
@@ -351,7 +347,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.version }}
@@ -382,7 +378,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -398,8 +394,8 @@ jobs:
- name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh
repository_mariadb_10_6_tests:
name: "Repository - MariaDB 10.6 tests"
repository_mariadb_10_11_tests:
name: "Repository - MariaDB 10.11 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
@@ -411,18 +407,18 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run MariaDB 10.6 database"
- name: "Run MariaDB 10.11 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
env:
MARIADB_VERSION: 10.6
MARIADB_VERSION: 10.11
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -453,7 +449,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -482,9 +478,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.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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run MySQL 8 database"
@@ -493,7 +489,7 @@ jobs:
MYSQL_VERSION: 8
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -515,7 +511,7 @@ jobs:
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
run: |
eval "args=($RP_OPTS)"
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=com.mysql.cj.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
continue-on-error: true
- name: "Update GitHub Step Summary"
if: github.ref_name == 'master'
@@ -524,7 +520,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -540,8 +536,8 @@ jobs:
- name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh
repository_postgresql_13_12_tests:
name: "Repository - PostgreSQL 13.12 tests"
repository_postgresql_14_15_tests:
name: "Repository - PostgreSQL 14.15 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
@@ -552,18 +548,18 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 13.12 database"
- name: "Run PostgreSQL 14.15 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 13.12
POSTGRES_VERSION: 14.15
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -594,7 +590,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -610,8 +606,8 @@ jobs:
- name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh
repository_postgresql_14_9_tests:
name: "Repository - PostgreSQL 14.9 tests"
repository_postgresql_15_10_tests:
name: "Repository - PostgreSQL 15.10 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
@@ -622,18 +618,18 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 14.9 database"
- name: "Run PostgreSQL 15.10 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 14.9
POSTGRES_VERSION: 15.10
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -664,7 +660,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -680,8 +676,8 @@ jobs:
- name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh
repository_postgresql_15_4_tests:
name: "Repository - PostgreSQL 15.4 tests"
repository_postgresql_16_6_tests:
name: "Repository - PostgreSQL 16.6 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
@@ -692,18 +688,18 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 15.4 database"
- name: "Run PostgreSQL 16.6 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 15.4
POSTGRES_VERSION: 16.6
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -734,7 +730,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -760,16 +756,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.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/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
- 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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -800,7 +796,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -860,9 +856,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.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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Set transformers tag"
@@ -885,7 +881,7 @@ jobs:
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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }} ${{ matrix.idp }}
@@ -916,7 +912,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -974,9 +970,9 @@ jobs:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -992,7 +988,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.test-name }}
@@ -1030,7 +1026,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.tests.outcome }}
@@ -1056,16 +1052,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.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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run Postgres 15.4 database"
- name: "Run Postgres 16.6 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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -1096,7 +1092,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -1130,9 +1126,9 @@ jobs:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -1140,7 +1136,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (PostgreSQL) ${{ matrix.test-name }}
@@ -1176,9 +1172,9 @@ jobs:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -1186,7 +1182,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (MySQL) ${{ matrix.test-name }}
@@ -1218,9 +1214,9 @@ jobs:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v4
- 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/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
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -1234,7 +1230,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -1266,7 +1262,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.2.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -1308,9 +1304,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.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/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
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |

View File

@@ -34,12 +34,12 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- 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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.16.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.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/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
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.16.0
with:
username: ${{ env.GIT_USERNAME }}
email: ${{ env.GIT_EMAIL }}

View File

@@ -0,0 +1,32 @@
name: Pre-Commit formatter
on:
push:
branches:
- precommit/**
jobs:
format-code:
name: "Reformat code"
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[reformat code]')
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.9"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
continue-on-error: true
with:
extra_args: --all-files
- name: Update secrets baseline
run: pip install detect-secrets && detect-secrets scan --baseline .secrets.baseline
- uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.16.0
with:
username: ${{ secrets.BOT_GITHUB_USERNAME }}
add-options: -u
commit-message: "Apply Pre-Commit code formatting"
skip-if-no-changes: true
- name: Push changes
run: git push

View File

@@ -133,21 +133,21 @@
"filename": ".github/workflows/ci.yml",
"hashed_secret": "b86dc2f033a63f2b7b9e7d270ab806d2910d7572",
"is_verified": false,
"line_number": 299
"line_number": 295
},
{
"type": "Secret Keyword",
"filename": ".github/workflows/ci.yml",
"hashed_secret": "1bfb0e20f886150ba59b853bcd49dea893e00966",
"is_verified": false,
"line_number": 374
"line_number": 370
},
{
"type": "Secret Keyword",
"filename": ".github/workflows/ci.yml",
"hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39",
"is_verified": false,
"line_number": 908
"line_number": 904
}
],
".github/workflows/master_release.yml": [
@@ -247,7 +247,7 @@
"filename": "core/src/main/java/org/alfresco/encryption/AlfrescoKeyStore.java",
"hashed_secret": "a718763bca0f328b0e7ce2a98d9e79fc271bf827",
"is_verified": false,
"line_number": 35,
"line_number": 34,
"is_secret": false
}
],
@@ -257,7 +257,7 @@
"filename": "core/src/main/java/org/alfresco/httpclient/HttpClientFactory.java",
"hashed_secret": "5d3c708390e5f51413e414393d4ad2a6d0e59a45",
"is_verified": false,
"line_number": 126,
"line_number": 128,
"is_secret": false
}
],
@@ -423,7 +423,7 @@
"filename": "packaging/tests/tas-cmis/src/main/java/org/alfresco/cmis/AuthParameterProviderFactory.java",
"hashed_secret": "a28cecdb5056cf30135809b921e38a84deb6c345",
"is_verified": false,
"line_number": 102,
"line_number": 100,
"is_secret": false
},
{
@@ -431,7 +431,7 @@
"filename": "packaging/tests/tas-cmis/src/main/java/org/alfresco/cmis/AuthParameterProviderFactory.java",
"hashed_secret": "5e39d8e2991ef9705998de26b33f11be0f3cdcde",
"is_verified": false,
"line_number": 103,
"line_number": 101,
"is_secret": false
}
],
@@ -539,7 +539,7 @@
"filename": "packaging/tests/tas-restapi/src/main/java/org/alfresco/rest/model/RestSitePersonMembershipRequestModelsCollection.java",
"hashed_secret": "8b30a14989d7b8093ac29462fe29423d836625b4",
"is_verified": false,
"line_number": 39,
"line_number": 33,
"is_secret": false
}
],
@@ -623,7 +623,7 @@
"filename": "remote-api/src/main/java/org/alfresco/repo/web/scripts/tenant/AbstractTenantAdminWebScript.java",
"hashed_secret": "889d2688743fdce6115117a5ba7dbc5f33e0ce03",
"is_verified": false,
"line_number": 38,
"line_number": 39,
"is_secret": false
}
],
@@ -633,7 +633,7 @@
"filename": "remote-api/src/main/java/org/alfresco/web/app/servlet/AlfrescoX509ServletFilter.java",
"hashed_secret": "43d52295ed5cb7e2b772f2b8be9695ddde971c49",
"is_verified": false,
"line_number": 62,
"line_number": 60,
"is_secret": false
},
{
@@ -641,7 +641,7 @@
"filename": "remote-api/src/main/java/org/alfresco/web/app/servlet/AlfrescoX509ServletFilter.java",
"hashed_secret": "1bd5147ff91b8b1220d2f1ffde850ebabbc5ec8c",
"is_verified": false,
"line_number": 63,
"line_number": 61,
"is_secret": false
}
],
@@ -671,7 +671,7 @@
"filename": "remote-api/src/test/java/org/alfresco/repo/remoteticket/RemoteAlfrescoTicketServiceTest.java",
"hashed_secret": "a926a50b320cea0d6c008a04322627400fe33f55",
"is_verified": false,
"line_number": 74,
"line_number": 73,
"is_secret": false
}
],
@@ -681,7 +681,7 @@
"filename": "remote-api/src/test/java/org/alfresco/repo/web/scripts/node/NodeWebScripTest.java",
"hashed_secret": "a926a50b320cea0d6c008a04322627400fe33f55",
"is_verified": false,
"line_number": 95,
"line_number": 96,
"is_secret": false
}
],
@@ -691,7 +691,7 @@
"filename": "remote-api/src/test/java/org/alfresco/repo/web/scripts/servlet/RemoteAuthenticatorFactoryAdminConsoleAccessTest.java",
"hashed_secret": "4ffa743f28fc949c19e65ab045d7906d0609a2c2",
"is_verified": false,
"line_number": 269,
"line_number": 268,
"is_secret": false
}
],
@@ -701,7 +701,7 @@
"filename": "remote-api/src/test/java/org/alfresco/repo/web/scripts/solr/SOLRAuthenticationFilterTest.java",
"hashed_secret": "76ed0a056aa77060de25754586440cff390791d0",
"is_verified": false,
"line_number": 63,
"line_number": 59,
"is_secret": false
}
],
@@ -711,7 +711,7 @@
"filename": "remote-api/src/test/java/org/alfresco/repo/webdav/LockMethodTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 109,
"line_number": 108,
"is_secret": false
}
],
@@ -741,7 +741,7 @@
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/RepoService.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 418,
"line_number": 412,
"is_secret": false
}
],
@@ -751,7 +751,7 @@
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestCMIS.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 182,
"line_number": 175,
"is_secret": false
}
],
@@ -761,7 +761,7 @@
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
"hashed_secret": "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4",
"is_verified": false,
"line_number": 592,
"line_number": 595,
"is_secret": false
},
{
@@ -769,7 +769,7 @@
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
"hashed_secret": "53dad674827218e94c8fe9c1984c8dd9db512a17",
"is_verified": false,
"line_number": 728,
"line_number": 731,
"is_secret": false
},
{
@@ -777,7 +777,7 @@
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
"hashed_secret": "be66cf01c56d963de61462f37a43df2305367216",
"is_verified": false,
"line_number": 1429,
"line_number": 1434,
"is_secret": false
},
{
@@ -785,7 +785,7 @@
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
"hashed_secret": "283d47a9338ed1100b5fe2a5aff2d1f7c799bfd0",
"is_verified": false,
"line_number": 1430,
"line_number": 1435,
"is_secret": false
},
{
@@ -793,7 +793,7 @@
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/TestPeople.java",
"hashed_secret": "425a715491af2bbec1eef2def6fa8d79c3050401",
"is_verified": false,
"line_number": 1452,
"line_number": 1457,
"is_secret": false
}
],
@@ -883,7 +883,7 @@
"filename": "repository/src/main/java/org/alfresco/heartbeat/jobs/LockingJob.java",
"hashed_secret": "b003370e1497c5003e21f1ec5da89e3d2d819506",
"is_verified": false,
"line_number": 60,
"line_number": 59,
"is_secret": false
},
{
@@ -891,7 +891,7 @@
"filename": "repository/src/main/java/org/alfresco/heartbeat/jobs/LockingJob.java",
"hashed_secret": "fc99e6a90240c45f46ed33a4d96a3dbecef41c60",
"is_verified": false,
"line_number": 61,
"line_number": 60,
"is_secret": false
}
],
@@ -901,7 +901,7 @@
"filename": "repository/src/main/java/org/alfresco/heartbeat/jobs/NonLockingJob.java",
"hashed_secret": "b003370e1497c5003e21f1ec5da89e3d2d819506",
"is_verified": false,
"line_number": 52,
"line_number": 54,
"is_secret": false
}
],
@@ -911,7 +911,7 @@
"filename": "repository/src/main/java/org/alfresco/repo/admin/patch/impl/AdminUserPatch.java",
"hashed_secret": "87a754b00f7ee047d496808125d6259104e9382a",
"is_verified": false,
"line_number": 60,
"line_number": 62,
"is_secret": false
}
],
@@ -931,7 +931,7 @@
"filename": "repository/src/main/java/org/alfresco/repo/remoteconnector/RemoteConnectorServiceImpl.java",
"hashed_secret": "a172ffc990129fe6f68b50f6037c54a1894ee3fd",
"is_verified": false,
"line_number": 204,
"line_number": 205,
"is_secret": false
},
{
@@ -939,7 +939,7 @@
"filename": "repository/src/main/java/org/alfresco/repo/remoteconnector/RemoteConnectorServiceImpl.java",
"hashed_secret": "a172ffc990129fe6f68b50f6037c54a1894ee3fd",
"is_verified": false,
"line_number": 204,
"line_number": 205,
"is_secret": false
}
],
@@ -949,7 +949,7 @@
"filename": "repository/src/main/java/org/alfresco/repo/security/authentication/ResetPasswordServiceImpl.java",
"hashed_secret": "e25df0eeed8d8eb4e198c3464c7bf747bc26eff8",
"is_verified": false,
"line_number": 92,
"line_number": 91,
"is_secret": false
}
],
@@ -959,7 +959,7 @@
"filename": "repository/src/main/java/org/alfresco/repo/security/authentication/SimpleAcceptOrRejectAllAuthenticationComponentImpl.java",
"hashed_secret": "304de25a3d73b68ad408ca3843356b5cf67f6f14",
"is_verified": false,
"line_number": 93,
"line_number": 89,
"is_secret": false
}
],
@@ -969,7 +969,7 @@
"filename": "repository/src/main/java/org/alfresco/repo/transfer/TransferServiceImpl2.java",
"hashed_secret": "9ae9f2be7702b726809545808a8a9ba2e5a38410",
"is_verified": false,
"line_number": 130,
"line_number": 129,
"is_secret": false
}
],
@@ -1273,7 +1273,7 @@
"filename": "repository/src/main/resources/alfresco/repository.properties",
"hashed_secret": "84551ae5442affc9f1a2d3b4c86ae8b24860149d",
"is_verified": false,
"line_number": 770,
"line_number": 771,
"is_secret": false
}
],
@@ -1303,7 +1303,7 @@
"filename": "repository/src/test/java/org/alfresco/filesys/FTPServerTest.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 88,
"line_number": 86,
"is_secret": false
},
{
@@ -1311,7 +1311,7 @@
"filename": "repository/src/test/java/org/alfresco/filesys/FTPServerTest.java",
"hashed_secret": "c464af817287343305cbd6493c593885695df531",
"is_verified": false,
"line_number": 92,
"line_number": 90,
"is_secret": false
},
{
@@ -1319,7 +1319,7 @@
"filename": "repository/src/test/java/org/alfresco/filesys/FTPServerTest.java",
"hashed_secret": "8ad8572a0b3fc4cb3afc1baaebc97a2cae58eb8c",
"is_verified": false,
"line_number": 93,
"line_number": 91,
"is_secret": false
},
{
@@ -1327,7 +1327,7 @@
"filename": "repository/src/test/java/org/alfresco/filesys/FTPServerTest.java",
"hashed_secret": "915692b4d7465b0084354173d552ac90145dc315",
"is_verified": false,
"line_number": 94,
"line_number": 92,
"is_secret": false
}
],
@@ -1337,7 +1337,7 @@
"filename": "repository/src/test/java/org/alfresco/filesys/repo/ContentDiskDriverTest.java",
"hashed_secret": "8c85434f6f339a24b808810bd95629d0f5856355",
"is_verified": false,
"line_number": 1280,
"line_number": 1257,
"is_secret": false
}
],
@@ -1347,7 +1347,7 @@
"filename": "repository/src/test/java/org/alfresco/opencmis/CMISTest.java",
"hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
"is_verified": false,
"line_number": 4134,
"line_number": 4001,
"is_secret": false
}
],
@@ -1357,7 +1357,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/coci/CheckOutCheckInServiceImplTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 140,
"line_number": 141,
"is_secret": false
}
],
@@ -1367,7 +1367,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/i18n/MessageServiceImplTest.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 102,
"line_number": 101,
"is_secret": false
}
],
@@ -1377,7 +1377,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/imap/ImapMessageTest.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 118,
"line_number": 116,
"is_secret": false
}
],
@@ -1387,7 +1387,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/imap/ImapServiceImplCacheTest.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 68,
"line_number": 66,
"is_secret": false
}
],
@@ -1397,7 +1397,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/imap/ImapServiceImplTest.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 116,
"line_number": 111,
"is_secret": false
}
],
@@ -1407,7 +1407,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/imap/LoadTester.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 80,
"line_number": 79,
"is_secret": false
}
],
@@ -1417,7 +1417,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/imap/RemoteLoadTester.java",
"hashed_secret": "678721c0433c8cf5c9069a0e70784cf1839e866b",
"is_verified": false,
"line_number": 58,
"line_number": 55,
"is_secret": false
}
],
@@ -1427,27 +1427,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/invitation/site/InviteSenderTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 109,
"is_secret": false
}
],
"repository/src/test/java/org/alfresco/repo/lock/LockBehaviourImplTest.java": [
{
"type": "Secret Keyword",
"filename": "repository/src/test/java/org/alfresco/repo/lock/LockBehaviourImplTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 112,
"is_secret": false
}
],
"repository/src/test/java/org/alfresco/repo/lock/LockServiceImplTest.java": [
{
"type": "Secret Keyword",
"filename": "repository/src/test/java/org/alfresco/repo/lock/LockServiceImplTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 103,
"line_number": 108,
"is_secret": false
}
],
@@ -1483,7 +1463,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/model/filefolder/FileFolderServiceImplTest.java",
"hashed_secret": "9e10e28cb9c3e381c13d13fa97dd97148982cdaa",
"is_verified": false,
"line_number": 595,
"line_number": 590,
"is_secret": false
}
],
@@ -1493,7 +1473,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/notification/NotificationServiceImplSystemTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 74,
"line_number": 75,
"is_secret": false
}
],
@@ -1503,7 +1483,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/oauth1/OAuth1CredentialsStoreServiceTest.java",
"hashed_secret": "c60646de4c4893cf860a12ecb7ba4f5317b1a1d0",
"is_verified": false,
"line_number": 61,
"line_number": 62,
"is_secret": false
},
{
@@ -1511,7 +1491,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/oauth1/OAuth1CredentialsStoreServiceTest.java",
"hashed_secret": "c60646de4c4893cf860a12ecb7ba4f5317b1a1d0",
"is_verified": false,
"line_number": 61,
"line_number": 62,
"is_secret": false
},
{
@@ -1519,7 +1499,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/oauth1/OAuth1CredentialsStoreServiceTest.java",
"hashed_secret": "ad8a621976e9a19cc78af501a84638a04fca9b83",
"is_verified": false,
"line_number": 65,
"line_number": 66,
"is_secret": false
}
],
@@ -1529,7 +1509,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/oauth2/OAuth2CredentialsStoreServiceTest.java",
"hashed_secret": "c60646de4c4893cf860a12ecb7ba4f5317b1a1d0",
"is_verified": false,
"line_number": 70,
"line_number": 64,
"is_secret": false
}
],
@@ -1539,7 +1519,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/rendition2/AbstractRenditionIntegrationTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 127,
"line_number": 130,
"is_secret": false
}
],
@@ -1549,7 +1529,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/replication/ReplicationServiceIntegrationTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 1328,
"line_number": 1317,
"is_secret": false
}
],
@@ -1559,7 +1539,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/AuthenticationServiceImplTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 68,
"line_number": 69,
"is_secret": false
}
],
@@ -1569,7 +1549,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/AuthenticationTest.java",
"hashed_secret": "607e729c2f77c4e821e68e26b4c1f5a4398624e9",
"is_verified": false,
"line_number": 2129,
"line_number": 2121,
"is_secret": false
}
],
@@ -1579,7 +1559,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/AuthorizationTest.java",
"hashed_secret": "9d4e1e23bd5b727046a9e3b4b7db57bd8d6ee684",
"is_verified": false,
"line_number": 37,
"line_number": 36,
"is_secret": false
}
],
@@ -1589,7 +1569,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/CompositePasswordEncoderTest.java",
"hashed_secret": "4360136f24381dcec1d35d79fbf7dac4b54dfe97",
"is_verified": false,
"line_number": 301,
"line_number": 310,
"is_secret": false
}
],
@@ -1617,7 +1597,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/LazyInstantiatingIdentityServiceFacadeUnitTest.java",
"hashed_secret": "12e59296b0d17c1ceb345a7adca98574c835ba24",
"is_verified": false,
"line_number": 45,
"line_number": 46,
"is_secret": false
}
],
@@ -1627,7 +1607,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/SpringBasedIdentityServiceFacadeUnitTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 47,
"line_number": 48,
"is_secret": false
}
],
@@ -1647,7 +1627,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/transfer/HttpClientTransmitterImplTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 75,
"line_number": 73,
"is_secret": false
}
],
@@ -1657,7 +1637,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceCallbackTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 664,
"line_number": 658,
"is_secret": false
}
],
@@ -1667,7 +1647,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 203,
"line_number": 202,
"is_secret": false
},
{
@@ -1675,7 +1655,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java",
"hashed_secret": "ad782ecdac770fc6eb9a62e44f90873fb97fb26b",
"is_verified": false,
"line_number": 513,
"line_number": 512,
"is_secret": false
},
{
@@ -1683,7 +1663,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 3687,
"line_number": 3593,
"is_secret": false
}
],
@@ -1693,7 +1673,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceToBeRefactoredTest.java",
"hashed_secret": "8be3c943b1609fffbfc51aad666d0a04adf83c9d",
"is_verified": false,
"line_number": 2682,
"line_number": 2510,
"is_secret": false
},
{
@@ -1701,7 +1681,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/transfer/TransferServiceToBeRefactoredTest.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 3772,
"line_number": 3517,
"is_secret": false
}
],
@@ -1711,7 +1691,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/transfer/manifest/ManifestIntegrationTest.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 115,
"line_number": 114,
"is_secret": false
}
],
@@ -1721,7 +1701,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/transfer/manifest/TransferManifestTest.java",
"hashed_secret": "5395ebfd174b0a5617e6f409dfbb3e064e3fdf0a",
"is_verified": false,
"line_number": 127,
"line_number": 126,
"is_secret": false
}
],
@@ -1731,7 +1711,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/version/BaseVersionStoreTest.java",
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
"is_verified": false,
"line_number": 149,
"line_number": 144,
"is_secret": false
}
],
@@ -1751,7 +1731,7 @@
"filename": "repository/src/test/java/org/alfresco/repo/version/VersionServiceImplTest.java",
"hashed_secret": "dee17075a8c96d9c57c15d56b1f64e5abc1caf0b",
"is_verified": false,
"line_number": 122,
"line_number": 121,
"is_secret": false
}
],
@@ -1761,7 +1741,7 @@
"filename": "repository/src/test/java/org/alfresco/util/test/junitrules/AlfrescoTenant.java",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 67,
"line_number": 73,
"is_secret": false
}
],
@@ -1771,7 +1751,7 @@
"filename": "repository/src/test/java/org/alfresco/util/test/testusers/TestUserComponentImpl.java",
"hashed_secret": "f73e110427648014568f7144031a6d48060eab0a",
"is_verified": false,
"line_number": 55,
"line_number": 63,
"is_secret": false
}
],
@@ -1888,5 +1868,5 @@
}
]
},
"generated_at": "2025-01-07T10:56:22Z"
"generated_at": "2025-04-22T06:32:47Z"
}

View File

@@ -11,6 +11,8 @@ When you make a commit then these hooks will run and check the modified files. I
#### Code Quality
This project uses `spotless` that enforces `alfresco-formatter.xml` to ensure code quality.
The code style definition file is taken always form the `master` branch of `alfresco-community-repo`.
All downstream projects use this code style definition file as well.
To check code-style violations you can use:
```bash

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>25.1.0.21-SNAPSHOT</version>
<version>25.2.0.41</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>25.1.0.21-SNAPSHOT</version>
<version>25.2.0.41</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>25.1.0.21-SNAPSHOT</version>
<version>25.2.0.41</version>
</parent>
<build>

View File

@@ -0,0 +1,30 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.model;
public record CapabilityModel(String name, String title, String description, GroupModel group, int index)
{}

View File

@@ -0,0 +1,30 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.model;
public record GroupModel(String id, String title)
{}

View File

@@ -0,0 +1,91 @@
/*-
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.model.role;
import java.util.List;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.alfresco.rest.rm.community.model.CapabilityModel;
import org.alfresco.utility.model.TestModel;
/**
* POJO for role
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Role extends TestModel
{
@JsonProperty(required = true)
private String name;
@JsonProperty(required = true)
private List<CapabilityModel> capabilities;
@JsonProperty(required = true)
private String displayLabel;
@JsonProperty(required = true)
private String groupShortName;
private List<String> assignedUsers;
private List<String> assignedGroups;
private String roleGroupName;
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
Role role = (Role) o;
return Objects.equals(name, role.name) && Objects.equals(capabilities, role.capabilities)
&& Objects.equals(displayLabel, role.displayLabel) && Objects.equals(groupShortName, role.groupShortName) && Objects.equals(assignedUsers, role.assignedUsers)
&& Objects.equals(assignedGroups, role.assignedGroups) && Objects.equals(roleGroupName, role.roleGroupName);
}
@Override
public int hashCode()
{
return Objects.hash(name, capabilities, displayLabel, groupShortName, assignedUsers, assignedGroups, roleGroupName);
}
}

View File

@@ -0,0 +1,32 @@
/*-
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.model.role;
import org.alfresco.rest.core.RestModels;
public class RoleCollection extends RestModels<RoleEntry, RoleCollection>
{}

View File

@@ -0,0 +1,47 @@
/*-
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.model.role;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.alfresco.rest.core.RestModels;
@Builder
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class RoleEntry extends RestModels<Role, RoleEntry>
{
@JsonProperty
private Role entry;
}

View File

@@ -35,7 +35,7 @@ package org.alfresco.rest.rm.community.model.user;
*/
public enum UserRoles
{
IN_PLACE_WRITERS("ExtendedWriters", "In-Place Writers"), ROLE_RM_ADMIN("Administrator", "Records Management Administrator"), ROLE_RM_MANAGER("RecordsManager", "Records Management Manager"), ROLE_RM_POWER_USER("PowerUser", "Records Management Power User"), ROLE_RM_SECURITY_OFFICER("SecurityOfficer", "Records Management Security Officer"), ROLE_RM_USER("User", "Records Management User");
IN_PLACE_WRITERS("ExtendedWriters", "In-Place Writers"), ROLE_RM_ADMIN("Administrator", "Records Management Administrator"), ROLE_RM_MANAGER("RecordsManager", "Records Management Manager"), ROLE_RM_POWER_USER("PowerUser", "Records Management Power User"), ROLE_RM_SECURITY_OFFICER("SecurityOfficer", "Records Management Security Officer"), ROLE_RM_USER("User", "Records Management User"), IN_PLACE_READERS("ExtendedReaders", "In-Place Readers");
public final String roleId;
public final String displayName;

View File

@@ -43,6 +43,7 @@ import org.alfresco.rest.rm.community.model.hold.Hold;
import org.alfresco.rest.rm.community.model.hold.HoldCollection;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryCollection;
import org.alfresco.rest.rm.community.model.role.RoleCollection;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
/**
@@ -303,4 +304,39 @@ public class FilePlanAPI extends RMModelRequest
{
return getHolds(filePlanId, EMPTY);
}
/**
* Gets the roles of a file plan.
*
* @param filePlanId
* The identifier of a file plan
* @param parameters
* The URL parameters to add
* @return The {Pagination and RoleModel Entries} for the given {@code filePlanId}
* @throws RuntimeException
* for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code filePlanId}</li>
* <li>{@code filePlanId} does not exist</li>
* </ul>
*/
public RoleCollection getFilePlanRoles(String filePlanId, String parameters)
{
mandatoryString("filePlanId", filePlanId);
return getRmRestWrapper().processModels(RoleCollection.class, simpleRequest(
GET,
"file-plans/{filePlanId}/roles?{parameters}",
filePlanId,
parameters));
}
/**
* See {@link #getFilePlanRoles(String, String)}
*/
public RoleCollection getFilePlanRoles(String filePlanId)
{
return getFilePlanRoles(filePlanId, EMPTY);
}
}

View File

@@ -93,6 +93,7 @@ import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
import org.alfresco.rest.search.RestRequestQueryModel;
import org.alfresco.rest.search.SearchNodeModel;
import org.alfresco.rest.search.SearchRequest;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.SearchAPI;
import org.alfresco.utility.Utility;
import org.alfresco.utility.data.DataUserAIS;
@@ -127,6 +128,10 @@ public class BaseRMRestTest extends RestTest
@Getter(value = PROTECTED)
private SearchAPI searchApi;
@Autowired
@Getter(PROTECTED)
private RMRolesAndActionsAPI rmRolesAndActionsV0API;
protected static final String iso8601_DateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
/**

View File

@@ -28,6 +28,7 @@ package org.alfresco.rest.rm.community.fileplans;
import static java.util.Arrays.asList;
import static com.google.common.collect.Sets.newHashSet;
import static org.springframework.http.HttpStatus.CONFLICT;
import static org.springframework.http.HttpStatus.CREATED;
import static org.springframework.http.HttpStatus.FORBIDDEN;
@@ -56,19 +57,27 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_CONTAINER_TYPE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_RECORD_FOLDER_TYPE;
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
import static org.alfresco.rest.rm.community.model.user.UserRoles.IN_PLACE_READERS;
import static org.alfresco.rest.rm.community.model.user.UserRoles.IN_PLACE_WRITERS;
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_ADMIN;
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_MANAGER;
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_POWER_USER;
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_SECURITY_OFFICER;
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_USER;
import static org.alfresco.utility.data.RandomData.getRandomAlphanumeric;
import static org.alfresco.utility.data.RandomData.getRandomName;
import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Set;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.base.DataProviderClass;
import org.alfresco.rest.rm.community.model.CapabilityModel;
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
import org.alfresco.rest.rm.community.model.fileplan.FilePlanProperties;
import org.alfresco.rest.rm.community.model.hold.Hold;
@@ -76,6 +85,9 @@ import org.alfresco.rest.rm.community.model.hold.HoldCollection;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryCollection;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryProperties;
import org.alfresco.rest.rm.community.model.role.Role;
import org.alfresco.rest.rm.community.model.role.RoleCollection;
import org.alfresco.rest.rm.community.model.user.UserCapabilities;
import org.alfresco.rest.rm.community.requests.gscore.api.RMSiteAPI;
import org.alfresco.utility.constants.ContainerName;
import org.alfresco.utility.model.UserModel;
@@ -87,6 +99,7 @@ import org.alfresco.utility.report.Bug;
* @author Rodica Sutu
* @since 2.6
*/
@SuppressWarnings("PMD.UnitTestShouldIncludeAssert")
public class FilePlanTests extends BaseRMRestTest
{
// ** Number of children (for children creation test) */
@@ -594,4 +607,171 @@ public class FilePlanTests extends BaseRMRestTest
}
});
}
/**
* <pre>
* Given that a file plan exists
* When rmAdmin user ask the API for roles
* It provides list of all default roles
* </pre>
*/
@Test
public void listFilePlanAllDefaultRoles()
{
List<String> defaultRolesDisplayNames = asList(IN_PLACE_READERS.displayName, ROLE_RM_ADMIN.displayName, ROLE_RM_MANAGER.displayName, ROLE_RM_POWER_USER.displayName, ROLE_RM_USER.displayName, IN_PLACE_WRITERS.displayName, ROLE_RM_SECURITY_OFFICER.displayName);
// Call to new API to get the roles and capabilities
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI().getFilePlanRoles(FILE_PLAN_ALIAS);
assertStatusCode(OK);
roleCollection.getEntries().forEach(roleModelEntry -> {
Role role = roleModelEntry.getEntry();
assertTrue(defaultRolesDisplayNames.contains(role.getDisplayLabel()));
assertNotNull(role.getCapabilities());
});
}
/**
* <pre>
* Given that a file plan exists
* When rmAdmin user ask the API for roles with SystemRoles as false
* It provides list of all roles excluding SystemRoles
* </pre>
*/
@Test
public void listFilePlanAllRolesExcludeSystemRoles()
{
String parameters = "where=(systemRoles=false)";
List<String> systemRolesDisplayNames = asList(IN_PLACE_WRITERS.displayName, IN_PLACE_READERS.displayName);
// Call to new API to get the roles and capabilities
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI().getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
assertStatusCode(OK);
roleCollection.getEntries().forEach(roleModelEntry -> {
Role role = roleModelEntry.getEntry();
assertFalse(systemRolesDisplayNames.contains(role.getDisplayLabel()));
assertNotNull(role.getCapabilities());
});
}
/**
* <pre>
* Given that a file plan exists
* When a non-RM user asks the API for the roles
* Then the status code 403 (Permission denied) is return
* </pre>
*/
@Test
public void nonRmUserFilePlanRoles()
{
// Create a random user
UserModel nonRMuser = getDataUser().createRandomTestUser("testUser");
// Call to new API to get the roles and capabilities
getRestAPIFactory().getFilePlansAPI(nonRMuser).getFilePlanRoles(FILE_PLAN_ALIAS);
assertStatusCode(FORBIDDEN);
}
/**
* <pre>
* Given that a file plan exists
* When a RM_Manager user asks the API for the roles
* returns the RM_Manager role and capabilities
* </pre>
*/
@Test
public void rmManagerFilePlanRolesAndCapabilities()
{
// Create a random user
UserModel managerUser = getDataUser().createRandomTestUser("managerUser");
// Assign RecordsManager role to user
getRestAPIFactory().getRMUserAPI().assignRoleToUser(managerUser.getUsername(), ROLE_RM_MANAGER.roleId);
String parameters = "where=(personId='" + managerUser.getUsername() + "')";
// Call to new API to get the roles and capabilities
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI(managerUser).getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
roleCollection.getEntries().forEach(roleModelEntry -> {
Role role = roleModelEntry.getEntry();
assertEquals(ROLE_RM_MANAGER.displayName, role.getDisplayLabel());
assertNotNull(role.getCapabilities());
});
}
/**
* <pre>
* Given that a file plan exists
* When a User with more than one role asks the API for the roles and relation
* returns the roles and capabilities
* </pre>
*/
@Test
public void multipleRoleUserFilePlanRolesAndCapabilities()
{
// Create a random user
UserModel rmUser = getDataUser().createRandomTestUser("rmUser");
// Assign rmUser role to user
getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmUser.getUsername(), ROLE_RM_USER.roleId);
getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmUser.getUsername(), ROLE_RM_POWER_USER.roleId);
String parameters = "where=(personId='" + rmUser.getUsername() + "')";
// Call to new API to get the roles and capabilities
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI(rmUser).getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
assertStatusCode(OK);
assertEquals(roleCollection.getEntries().size(), 2);
roleCollection.getEntries().forEach(roleModelEntry -> {
Role role = roleModelEntry.getEntry();
assertTrue(role.getDisplayLabel().equals(ROLE_RM_USER.displayName) || role.getDisplayLabel().equals(ROLE_RM_POWER_USER.displayName));
assertNotNull(role.getCapabilities());
});
}
/**
* <pre>
* Given that a file plan exists
* When a new user with a new role asks the API for the roles and relation
* returns the new role and new capabilities
* </pre>
*/
@Test
public void newRoleUserFilePlanRolesAndCapabilities()
{
/** A list of capabilities. */
Set<String> newCapabilities = newHashSet(UserCapabilities.VIEW_RECORDS_CAP, UserCapabilities.DECLARE_RECORDS_CAP);
// Create a new role using old API
getRmRolesAndActionsV0API().createRole(getAdminUser().getUsername(), getAdminUser().getPassword(), "NewTestRole",
"New Role Label", newCapabilities);
// Create a random user
UserModel rmNewUser = getDataUser().createRandomTestUser("rmPowerUser");
// Assign New role to user
getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmNewUser.getUsername(), "NewTestRole");
String parameters = "where=(personId='" + rmNewUser.getUsername() + "')";
// Call to new API to get the roles and capabilities
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI(rmNewUser).getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
assertStatusCode(OK);
assertEquals(roleCollection.getEntries().size(), 1);
roleCollection.getEntries().forEach(roleModelEntry -> {
List<CapabilityModel> capabilities = roleModelEntry.getEntry().getCapabilities();
capabilities.forEach(capabilityModel -> {
assertTrue(newCapabilities.contains(capabilityModel.name()));
});
});
}
/**
* <pre>
* Given that a file plan exists
* When API call happens with Capability filter
* returns roles associated with the capability
* </pre>
*/
@Test
public void filePlanRolesAndCapabilitiesFilter()
{
String parameters = "where=(systemRoles=true and capabilityName in ('ManageRules'))";
// Call to new API to get the roles and capabilities, filter by capability, include assigned users
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI().getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
assertStatusCode(OK);
assertEquals(roleCollection.getEntries().size(), 1);
roleCollection.getEntries().forEach(roleModelEntry -> {
Role role = roleModelEntry.getEntry();
assertEquals(ROLE_RM_ADMIN.displayName, role.getDisplayLabel());
assertNotNull(role.getCapabilities());
});
}
}

View File

@@ -134,6 +134,16 @@ 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();

View File

@@ -23,7 +23,7 @@ Recorded content can be explicitly destroyed whilst maintaining the original nod
* License: Alfresco Community
* Issue Tracker Link: [JIRA RM](https://issues.alfresco.com/jira/projects/RM/summary)
* Contribution Model: Alfresco Closed Source
* Documentation: [docs.alfresco.com (Records Management)](http://docs.alfresco.com/rm2.4/concepts/welcome-rm.html)
* Documentation: [docs.alfresco.com (Records Management)](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services-Community-Edition/23.4/Alfresco-Governance-Services-Community-Edition/Introduction)
***

View File

@@ -21,18 +21,18 @@ RM is split into two main parts - a repository integration and a Share integrati
* [Community License](../LICENSE.txt)
* [Enterprise License](../../rm-enterprise/LICENSE.txt) (this file will only be present in clones of the Enterprise repository)
* [Issue Tracker Link](https://issues.alfresco.com/jira/projects/RM)
* [Community Documentation Link](http://docs.alfresco.com/rm-community/concepts/welcome-rm.html)
* [Enterprise Documentation Link](http://docs.alfresco.com/rm/concepts/welcome-rm.html)
* [Community Documentation Link](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services-Community-Edition/23.4/Alfresco-Governance-Services-Community-Edition/Introduction)
* [Enterprise Documentation Link](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services/23.4/Alfresco-Governance-Services/Introduction)
* [Contribution Model](../../CONTRIBUTING.md)
***
### Prerequisite Knowledge
An understanding of Alfresco Content Services is assumed. The following pages from the [developer documentation](http://docs.alfresco.com/5.2/concepts/dev-for-developers.html) give useful background information:
An understanding of Alfresco Content Services is assumed. The following pages from the [developer documentation](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services-Community-Edition/23.4/Alfresco-Content-Services-Community-Edition/Develop) give useful background information:
* [ACS Architecture](http://docs.alfresco.com/5.2/concepts/dev-arch-overview.html)
* [Platform Extensions](http://docs.alfresco.com/5.2/concepts/dev-platform-extensions.html)
* [Share Extensions](http://docs.alfresco.com/5.2/concepts/dev-extensions-share.html)
* [ACS Architecture](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Software-Architecture)
* [Platform Extensions](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Extension-Points-Overview)
* [Share Extensions](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Share-UI-Extension-Points)
***
@@ -44,12 +44,12 @@ The RM Share module communicates with the repository module via REST APIs. Inter
* A DAO layer responsible for CRUD operations against the database.
#### REST API
The REST API endpoints fall into two main types - v0 (Webscripts) and v1. The [v0 API](http://docs.alfresco.com/5.2/references/dev-extension-points-webscripts.html) is older and not recommended for integrations. The [v1 API](http://docs.alfresco.com/5.1/pra/1/topics/pra-welcome-aara.html) is newer but isn't yet feature complete. If you are running RM locally then the GS API Explorer will be available at [this link](http://localhost:8080/gs-api-explorer/).
The REST API endpoints fall into two main types - v0 (Webscripts) and v1. The [v0 API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Web-Scripts) is older and not recommended for integrations. The [v1 API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/REST-API-Guide) is newer but isn't yet feature complete. If you are running RM locally then the GS API Explorer will be available at [this link](http://localhost:8080/gs-api-explorer/).
Internally the GS v1 REST API is built on the [Alfresco v1 REST API framework](https://community.alfresco.com/community/ecm/blog/2016/10/11/v1-rest-api-part-1-introduction). It aims to be consistent with this in terms of behaviour and naming.
#### Java Public API
The Java service layer is fronted by a [Java Public API](http://docs.alfresco.com/5.2/concepts/java-public-api-list.html), which we will ensure backward compatible with previous releases. Before we remove any methods there will first be a release containing that method deprecated to allow third party integrations to migrate to a new method. The Java Public API also includes a set of POJO objects which are needed to communicate with the services. It is easy to identify classes that are part of the Java Public API as they are annotated `@AlfrescoPublicApi`.
The Java service layer is fronted by a [Java Public API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Reference/Java-Foundation-API), which we will ensure backward compatible with previous releases. Before we remove any methods there will first be a release containing that method deprecated to allow third party integrations to migrate to a new method. The Java Public API also includes a set of POJO objects which are needed to communicate with the services. It is easy to identify classes that are part of the Java Public API as they are annotated `@AlfrescoPublicApi`.
Each Java service will have at least four beans defined for it:
@@ -61,7 +61,7 @@ Each Java service will have at least four beans defined for it:
#### DAOs
The DAOs are not part of the Java Public API, but handle CRUD operations against RM stored data. We have some custom queries to improve performance for particularly heavy operations.
We use standard Alfresco [data modelling](http://docs.alfresco.com/5.2/references/dev-extension-points-content-model.html) to store RM metadata. We extend the [Alfresco patching mechanism](http://docs.alfresco.com/5.2/references/dev-extension-points-patch.html) to provide community and enterprise schema upgrades.
We use standard Alfresco [data modelling](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Content-Model-Extension-Point) to store RM metadata. We extend the [Alfresco patching mechanism](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Patches) to provide community and enterprise schema upgrades.
***

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>25.1.0.21-SNAPSHOT</version>
<version>25.2.0.41</version>
</parent>
<modules>

View File

@@ -1,3 +1,3 @@
SOLR6_TAG=2.0.13
POSTGRES_TAG=15.4
SOLR6_TAG=2.0.15
POSTGRES_TAG=16.6
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8

View File

@@ -34,4 +34,7 @@
<!-- content cleanser -->
<bean id="contentCleanser.522022M" class="org.alfresco.module.org_alfresco_module_rm.content.cleanser.ContentCleanser522022M"/>
<!-- content cleanser -->
<bean id="contentCleanser.SevenPass" class="org.alfresco.module.org_alfresco_module_rm.content.cleanser.ContentCleanserSevenPass"/>
</beans>

View File

@@ -78,6 +78,12 @@
<property name="transactionService" ref="transactionService" />
</bean>
<bean class="org.alfresco.rm.rest.api.fileplans.FilePlanRolesRelation">
<property name="apiUtils" ref="apiUtils" />
<property name="rmRoles" ref="rm.roles" />
<property name="filePlanService" ref="FilePlanService" />
</bean>
<bean class="org.alfresco.rm.rest.api.holds.HoldsEntityResource" >
<property name="holdService" ref="HoldService" />
<property name="apiUtils" ref="apiUtils" />
@@ -228,6 +234,11 @@
<property name="siteSurfConfig" ref="rm.siteSurfConfig" />
</bean>
<bean id="rm.roles" class="org.alfresco.rm.rest.api.impl.RMRolesImpl">
<property name="nodesModelFactory" ref="nodesModelFactory" />
<property name="filePlanRoleService" ref="FilePlanRoleService"/>
</bean>
<bean id="rm.siteSurfConfig" class="org.alfresco.rest.api.impl.SiteSurfConfig">
<property name="configPath" value="alfresco/module/org_alfresco_module_rm/bootstrap/site"/>
</bean>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>25.1.0.21-SNAPSHOT</version>
<version>25.2.0.41</version>
</parent>
<properties>
@@ -427,7 +427,7 @@
<configuration>
<images>
<image>
<name>postgres:15.4</name>
<name>postgres:16.6</name>
<run>
<ports>
<port>${postgresql.tests.port}:${postgresql.port}</port>

View File

@@ -30,7 +30,8 @@ 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
*/

View File

@@ -27,9 +27,8 @@
package org.alfresco.module.org_alfresco_module_rm;
import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.service.namespace.QName;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* @deprecated as of 2.1 see {@link org.alfresco.module.org_alfresco_module_rm.admin.CannotApplyConstraintMetadataException}

View File

@@ -27,9 +27,8 @@
package org.alfresco.module.org_alfresco_module_rm;
import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.service.namespace.QName;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* @deprecated as of 2.1 see {@link org.alfresco.module.org_alfresco_module_rm.admin.InvalidCustomAspectMetadataException}

View File

@@ -67,8 +67,7 @@ public class RecordsManagementServiceImpl extends ServiceBaseImpl
/**
* Set the service registry service
*
* @param serviceRegistry
* service registry
* @param serviceRegistry service registry
*/
public void setRecordsManagementServiceRegistry(RecordsManagementServiceRegistry serviceRegistry)
{
@@ -79,9 +78,7 @@ 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)

View File

@@ -46,7 +46,7 @@ import java.util.Map;
for (Map.Entry<String, List<String>> entry : source.entrySet())
{
List<String> values = entry.getValue();
List<String>values = entry.getValue();
for (String value : values)
{
String authority = entry.getKey();
@@ -54,7 +54,7 @@ import java.util.Map;
{
// already exists
List<String> list = pivot.get(value);
list.add(authority);
list.add(authority );
}
else
{

View File

@@ -65,8 +65,7 @@ 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);
@@ -83,12 +82,12 @@ public interface RMCaveatConfigComponent
/**
* Update RM constraint values for given authority
*/
void updateRMConstraintListAuthority(String listName, String authorityName, List<String> values);
void updateRMConstraintListAuthority(String listName, String authorityName, List<String>values);
/**
* Update RM constraint authorities for given value
*/
void updateRMConstraintListValue(String listName, String valueName, List<String> authorities);
void updateRMConstraintListValue(String listName, String valueName, List<String>authorities);
/**
* Remove RM constraint value (all authorities)
@@ -103,14 +102,12 @@ 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
*/

View File

@@ -45,11 +45,6 @@ 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;
@@ -82,6 +77,10 @@ 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
@@ -123,7 +122,12 @@ 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)
@@ -190,7 +194,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
if (logger.isInfoEnabled())
{
logger.info("Caveat aspects configured " + caveatAspectQNames);
logger.info("Caveat aspects configured "+caveatAspectQNames);
}
}
else
@@ -207,7 +211,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
if (logger.isInfoEnabled())
{
logger.info("Caveat models configured " + caveatModelQNames);
logger.info("Caveat models configured "+caveatModelQNames);
}
}
else
@@ -223,17 +227,20 @@ 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())
{
logger.info("onContentUpdate: " + nodeRef + ", " + newContent);
logger.info("onContentUpdate: "+nodeRef+", "+newContent);
}
validateAndReset(nodeRef);
@@ -248,7 +255,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
{
if (logger.isInfoEnabled())
{
logger.info("beforeDeleteNode: " + nodeRef);
logger.info("beforeDeleteNode: "+nodeRef);
}
validateAndReset(nodeRef);
@@ -263,7 +270,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
{
if (logger.isInfoEnabled())
{
logger.info("onCreateNode: " + childAssocRef);
logger.info("onCreateNode: "+childAssocRef);
}
validateAndReset(childAssocRef.getChildRef());
@@ -272,8 +279,7 @@ 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)
@@ -288,9 +294,9 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
if (caveatConfigData != null)
{
NodeRef existing = getCaveatConfigNode();
if ((existing != null && (!existing.equals(nodeRef))))
if ((existing != null && (! existing.equals(nodeRef))))
{
throw new AlfrescoRuntimeException("Cannot create more than one caveat config (existing=" + existing + ", new=" + nodeRef + ")");
throw new AlfrescoRuntimeException("Cannot create more than one caveat config (existing="+existing+", new="+nodeRef+")");
}
try
@@ -315,7 +321,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
if (logger.isTraceEnabled())
{
logger.trace("validateAndReset: models to check " + models);
logger.trace("validateAndReset: models to check "+models);
}
for (QName model : models)
@@ -332,7 +338,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
{
if (logger.isTraceEnabled())
{
logger.trace("validateAndReset: properties to check " + props);
logger.trace("validateAndReset: properties to check "+props);
}
}
@@ -355,12 +361,12 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
}
}
if (!prefixFound)
if (! prefixFound)
{
throw new AlfrescoRuntimeException("Unexpected prefix: " + conPrefix + " (" + conStr + ") expected one of " + expectedPrefixes + ")");
throw new AlfrescoRuntimeException("Unexpected prefix: "+ conPrefix + " (" + conStr +") expected one of "+expectedPrefixes+")");
}
Map<String, List<String>> caveatMap = (Map<String, List<String>>) conEntry.getValue();
Map<String, List<String>> caveatMap = (Map<String, List<String>>)conEntry.getValue();
List<String> allowedValues = null;
@SuppressWarnings("unused")
@@ -375,14 +381,15 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
final Constraint con = conDef.getConstraint();
if (con instanceof RMListOfValuesConstraint)
{
String conName = ((RMListOfValuesConstraint) con).getShortName();
String conName = ((RMListOfValuesConstraint)con).getShortName();
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();
return ((RMListOfValuesConstraint)con).getAllowedValues();
}
}, AuthenticationUtil.getSystemUserName());
@@ -397,7 +404,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
{
if (logger.isInfoEnabled())
{
logger.info("Processing constraint: " + conQName);
logger.info("Processing constraint: "+conQName);
}
for (Map.Entry<String, List<String>> caveatEntry : caveatMap.entrySet())
@@ -406,20 +413,20 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
List<String> caveatList = caveatEntry.getValue();
// validate authority (user or group) - note: groups are configured with fullname (ie. GROUP_xxx)
if ((!authorityService.authorityExists(authorityName) && !personService.personExists(authorityName)))
if ((! authorityService.authorityExists(authorityName) && ! personService.personExists(authorityName)))
{
// TODO - review warnings (& I18N)
String msg = "User/group does not exist: " + authorityName + " (constraint=" + conStr + ")";
String msg = "User/group does not exist: "+authorityName+" (constraint="+conStr+")";
logger.warn(msg);
}
// validate caveat list
for (String value : caveatList)
{
if (!allowedValues.contains(value))
if (! allowedValues.contains(value))
{
// TODO - review warnings (& add I18N)
String msg = "Invalid value in list: " + value + " (authority=" + authorityName + ", constraint=" + conStr + ")";
String msg = "Invalid value in list: "+value+" (authority="+authorityName+", constraint="+conStr+")";
logger.warn(msg);
}
}
@@ -437,7 +444,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
for (Map.Entry<String, Object> conEntry : caveatConfigMap.entrySet())
{
String conStr = conEntry.getKey();
Map<String, List<String>> caveatMap = (Map<String, List<String>>) conEntry.getValue();
Map<String, List<String>> caveatMap = (Map<String, List<String>>)conEntry.getValue();
Map<String, List<String>> cacheValue = caveatConfig.get(conStr);
if (cacheValue == null || !cacheValue.equals(caveatMap))
@@ -454,7 +461,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
}
catch (JSONException e)
{
throw new AlfrescoRuntimeException("Invalid caveat config syntax: " + e);
throw new AlfrescoRuntimeException("Invalid caveat config syntax: "+e);
}
}
}
@@ -466,6 +473,7 @@ 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();
@@ -561,7 +569,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
private List<String> getRMAllowedValues(String userName, Set<String> userGroupFullNames, String constraintName)
{
Set<String> allowedValues = new HashSet<>();
Set<String>allowedValues = new HashSet<>();
// note: userName and userGroupNames must not be null
Map<String, List<String>> caveatConstraintDef = null;
@@ -578,7 +586,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
if (caveatConstraintDef != null)
{
List<String> direct = caveatConstraintDef.get(userName);
if (direct != null)
if(direct != null)
{
allowedValues.addAll(direct);
}
@@ -586,14 +594,14 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
for (String group : userGroupFullNames)
{
List<String> values = caveatConstraintDef.get(group);
if (values != null)
if(values != null)
{
allowedValues.addAll(values);
}
}
}
List<String> ret = new ArrayList<>();
List<String>ret = new ArrayList<>();
ret.addAll(allowedValues);
return Collections.unmodifiableList(ret);
}
@@ -609,7 +617,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
{
try
{
if ((!nodeService.exists(nodeRef)) || (caveatAspectQNames.size() == 0))
if ((! nodeService.exists(nodeRef)) || (caveatAspectQNames.size() == 0))
{
return true;
}
@@ -624,7 +632,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
}
}
if (!found)
if (! found)
{
// no caveat aspect
return true;
@@ -650,7 +658,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
Constraint con = conDef.getConstraint();
if (con instanceof RMListOfValuesConstraint)
{
RMListOfValuesConstraint rmCon = ((RMListOfValuesConstraint) con);
RMListOfValuesConstraint rmCon = ((RMListOfValuesConstraint)con);
String conName = rmCon.getShortName();
MatchLogic matchLogic = rmCon.getMatchLogicEnum();
Map<String, List<String>> caveatConstraintDef = caveatConfig.get(conName);
@@ -668,18 +676,18 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
if (val instanceof String)
{
propValues = new ArrayList<>(1);
propValues.add((String) val);
propValues.add((String)val);
}
else if (val instanceof List)
{
propValues = (List<String>) val;
propValues = (List<String>)val;
}
if (propValues != null && !isAllowed(propValues, allowedValues, matchLogic))
{
if (logger.isDebugEnabled())
{
logger.debug("Veto access: caveat=" + conName + ", userName=" + userName + ", nodeRef=" + nodeRef + ", propName=" + propName + ", propValues=" + propValues + ", allowedValues=" + allowedValues);
logger.debug("Veto access: caveat="+conName+", userName="+userName+", nodeRef="+nodeRef+", propName="+propName+", propValues="+propValues+", allowedValues="+allowedValues);
}
return false;
}
@@ -706,11 +714,11 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
// check user/group values match all values on node
for (String propValue : propValues)
{
if (!userGroupValues.contains(propValue))
if (! userGroupValues.contains(propValue))
{
if (logger.isTraceEnabled())
{
logger.trace("Not allowed: " + propValues + ", " + userGroupValues + ", " + matchLogic);
logger.trace("Not allowed: "+propValues+", "+userGroupValues+", "+matchLogic);
}
return false;
@@ -732,25 +740,23 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
if (logger.isTraceEnabled())
{
logger.trace("Not allowed: " + propValues + ", " + userGroupValues + ", " + matchLogic);
logger.trace("Not allowed: "+propValues+", "+userGroupValues+", "+matchLogic);
}
return false;
}
logger.error("Unexpected match logic type: " + matchLogic);
logger.error("Unexpected match logic type: "+matchLogic);
return false;
}
/**
* 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)
{
@@ -759,9 +765,9 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
{
readLock.lock();
members = caveatConfig.get(listName);
if (members == null)
if(members == null)
{
throw new AlfrescoRuntimeException("unable to add to list, list not defined:" + listName);
throw new AlfrescoRuntimeException("unable to add to list, list not defined:"+ listName);
}
try
@@ -770,15 +776,15 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
writeLock.lock();
// check again
members = caveatConfig.get(listName);
if (members == null)
if(members == null)
{
throw new AlfrescoRuntimeException("unable to add to list, list not defined:" + listName);
throw new AlfrescoRuntimeException("unable to add to list, list not defined:"+ listName);
}
List<String> values = members.get(authorityName);
if (values == null)
if(values == null)
{
throw new AlfrescoRuntimeException("Unable to add to authority in list. Authority not member listName: " + listName + " authorityName:" + authorityName);
throw new AlfrescoRuntimeException("Unable to add to authority in list. Authority not member listName: "+ listName + " authorityName:" +authorityName);
}
values.add(value);
@@ -800,7 +806,6 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
/**
* Get the member details of the specified list
*
* @param listName
* @return the details of the specified list
*/
@@ -832,23 +837,23 @@ 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
*/
public void updateRMConstraintListAuthority(String listName, String authorityName, List<String> values)
public void updateRMConstraintListAuthority(String listName, String authorityName, List<String>values)
{
Map<String, List<String>> members = null;
try
{
writeLock.lock();
members = caveatConfig.get(listName);
if (members == null)
if(members == null)
{
// Create the new list, with the authority name
Map<String, List<String>> constraint = new HashMap<>(0);
@@ -876,7 +881,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
* @param valueName
* @param authorities
*/
public void updateRMConstraintListValue(String listName, String valueName, List<String> authorities)
public void updateRMConstraintListValue(String listName, String valueName, List<String>authorities)
{
Map<String, List<String>> members = caveatConfig.get(listName);
@@ -884,7 +889,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
{
writeLock.lock();
if (members == null)
if(members == null)
{
// Members List does not exist
Map<String, List<String>> emptyConstraint = new HashMap<>(0);
@@ -898,21 +903,21 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
// remove all authorities which have this value
List<String> existingAuthorities = pivot.get(valueName);
if (existingAuthorities != null)
if(existingAuthorities != null)
{
for (String authority : existingAuthorities)
for(String authority : existingAuthorities)
{
List<String> vals = members.get(authority);
vals.remove(valueName);
}
}
// add the new authorities for this value
for (String authority : authorities)
for(String authority : authorities)
{
List<String> vals = members.get(authority);
if (vals == null)
if(vals == null)
{
vals = new ArrayList<>();
vals= new ArrayList<>();
members.put(authority, vals);
}
vals.add(valueName);
@@ -950,9 +955,9 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
// remove all authorities which have this value
List<String> existingAuthorities = pivot.get(valueName);
if (existingAuthorities != null)
if(existingAuthorities != null)
{
for (String authority : existingAuthorities)
for(String authority : existingAuthorities)
{
List<String> vals = members.get(authority);
vals.remove(valueName);
@@ -979,8 +984,7 @@ 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)
@@ -990,7 +994,7 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
{
writeLock.lock();
members = caveatConfig.get(listName);
if (members != null)
if(members != null)
{
members.remove(listName);
}
@@ -1003,11 +1007,10 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
{
writeLock.unlock();
}
}
}
/**
* @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)
@@ -1067,24 +1070,24 @@ public class RMCaveatConfigComponentImpl implements ContentServicePolicies.OnCon
/**
* Get an RMConstraintInfo
*
* @param listQName
* @return the constraint or null if it does not exist
*/
public RMConstraintInfo getRMConstraint(QName listQName)
{
ConstraintDefinition dictionaryDef = dictionaryService.getConstraint(listQName);
if (dictionaryDef != null)
if(dictionaryDef != null)
{
Constraint con = dictionaryDef.getConstraint();
if (con instanceof RMListOfValuesConstraint)
{
final RMListOfValuesConstraint def = (RMListOfValuesConstraint) con;
final RMListOfValuesConstraint def = (RMListOfValuesConstraint)con;
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();

View File

@@ -42,7 +42,6 @@ public interface RMCaveatConfigService
/**
* Get allowed values for given caveat list (for current user)
*
* @param constraintName
* @return
*/
@@ -56,15 +55,18 @@ 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
*/
@@ -78,90 +80,79 @@ 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
*/
void updateRMConstraintListAuthority(String listName, String authorityName, List<String> values);
void updateRMConstraintListAuthority(String listName, String authorityName, List<String>values);
/**
* 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
*/
void updateRMConstraintListValue(String listName, String value, List<String> authorities);
void updateRMConstraintListValue(String listName, String value, List<String>authorities);
/**
* 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);

View File

@@ -36,9 +36,6 @@ 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;
@@ -51,6 +48,8 @@ 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
@@ -67,6 +66,7 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
private RMCaveatConfigComponent rmCaveatConfigComponent;
private RecordsManagementAdminService recordsManagementAdminService;
public void setNamespaceService(NamespaceService namespaceService)
{
this.namespaceService = namespaceService;
@@ -131,9 +131,7 @@ 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)
{
@@ -152,8 +150,8 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
listName = sb.toString();
}
List<String> allowedValues = new ArrayList<>();
for (String value : values)
List<String>allowedValues = new ArrayList<>();
for(String value : values)
{
allowedValues.add(value);
}
@@ -187,8 +185,7 @@ 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)
{
@@ -202,12 +199,10 @@ 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)
{
@@ -216,7 +211,6 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
/**
* Get the details of the specified list
*
* @param listName
* @return the details of the specified list
*/
@@ -226,16 +220,16 @@ 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
*/
public void updateRMConstraintListAuthority(String listName, String authorityName, List<String> values)
public void updateRMConstraintListAuthority(String listName, String authorityName, List<String>values)
{
rmCaveatConfigComponent.updateRMConstraintListAuthority(listName, authorityName, values);
}
@@ -247,7 +241,7 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
* @param valueName
* @param authorities
*/
public void updateRMConstraintListValue(String listName, String valueName, List<String> authorities)
public void updateRMConstraintListValue(String listName, String valueName, List<String>authorities)
{
rmCaveatConfigComponent.updateRMConstraintListValue(listName, valueName, authorities);
}
@@ -255,8 +249,7 @@ 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)
@@ -277,18 +270,19 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
defs.addAll(recordsManagementAdminService.getCustomConstraintDefinitions(caveatModelQName));
}
for (ConstraintDefinition dictionaryDef : defs)
for(ConstraintDefinition dictionaryDef : defs)
{
Constraint con = dictionaryDef.getConstraint();
if (con instanceof RMListOfValuesConstraint)
{
final RMListOfValuesConstraint def = (RMListOfValuesConstraint) con;
final RMListOfValuesConstraint def = (RMListOfValuesConstraint)con;
RMConstraintInfo i = new RMConstraintInfo();
i.setName(def.getShortName());
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();
@@ -307,24 +301,24 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
/**
* Get an RMConstraintInfo
*
* @param listQName
* @return the constraint or null if it does not exist
*/
public RMConstraintInfo getRMConstraint(QName listQName)
{
ConstraintDefinition dictionaryDef = dictionaryService.getConstraint(listQName);
if (dictionaryDef != null)
if(dictionaryDef != null)
{
Constraint con = dictionaryDef.getConstraint();
if (con instanceof RMListOfValuesConstraint)
{
final RMListOfValuesConstraint def = (RMListOfValuesConstraint) con;
final RMListOfValuesConstraint def = (RMListOfValuesConstraint)con;
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();
@@ -354,20 +348,18 @@ 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)
{
QName listQName = QName.createQName(listName, namespaceService);
if (allowedValues != null)
if(allowedValues != null)
{
List<String> allowedValueList = new ArrayList<>();
for (String value : allowedValues)
List<String>allowedValueList = new ArrayList<>();
for(String value : allowedValues)
{
allowedValueList.add(value);
}
@@ -376,8 +368,9 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
Constraint con = dictionaryDef.getConstraint();
if (con instanceof RMListOfValuesConstraint)
{
final RMListOfValuesConstraint def = (RMListOfValuesConstraint) con;
List<String> oldAllowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>() {
final RMListOfValuesConstraint def = (RMListOfValuesConstraint)con;
List<String> oldAllowedValues = AuthenticationUtil.runAs(new RunAsWork<List<String>>()
{
public List<String> doWork()
{
return def.getAllowedValues();
@@ -387,9 +380,9 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
/**
* Deal with any additions
*/
for (String newValue : allowedValueList)
for(String newValue : allowedValueList)
{
if (!oldAllowedValues.contains(newValue) && logger.isDebugEnabled())
if(!oldAllowedValues.contains(newValue) && logger.isDebugEnabled())
{
// This is an addition
logger.debug("value added to list:" + listQName + ":" + newValue);
@@ -399,12 +392,12 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
/**
* Deal with any deletions
*/
for (String oldValue : oldAllowedValues)
for(String oldValue : oldAllowedValues)
{
if (!allowedValueList.contains(oldValue))
if(!allowedValueList.contains(oldValue))
{
// This is a deletion
if (logger.isDebugEnabled())
if(logger.isDebugEnabled())
{
logger.debug("value removed from list:" + listQName + ":" + oldValue);
}
@@ -424,7 +417,7 @@ public class RMCaveatConfigServiceImpl implements RMCaveatConfigService
*/
public void removeRMConstraintListValue(String listName, String valueName)
{
// TODO need to update the rm constraint definition
//TODO need to update the rm constraint definition
// recordsManagementAdminService.
rmCaveatConfigComponent.removeRMConstraintListValue(listName, valueName);

View File

@@ -40,37 +40,30 @@ 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;

View File

@@ -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,6 +75,7 @@ public class RMListOfValuesConstraint extends ListOfValuesConstraint
RMListOfValuesConstraint.caveatConfigService = caveatConfigService;
}
@Override
public String toString()
{
@@ -97,7 +98,8 @@ 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
*/
@@ -105,7 +107,7 @@ public class RMListOfValuesConstraint extends ListOfValuesConstraint
public List<String> getRawAllowedValues()
{
String runAsUser = AuthenticationUtil.getRunAsUser();
if ((runAsUser != null) && (!runAsUser.equals(AuthenticationUtil.getSystemUserName())) && (caveatConfigService != null))
if ((runAsUser != null) && (! runAsUser.equals(AuthenticationUtil.getSystemUserName())) && (caveatConfigService != null))
{
// get allowed values for current user
List<String> allowedForUser = caveatConfigService.getRMAllowedValues(getShortName());
@@ -146,7 +148,7 @@ public class RMListOfValuesConstraint extends ListOfValuesConstraint
private List<String> getAllowedValuesUpper()
{
String runAsUser = AuthenticationUtil.getRunAsUser();
if ((runAsUser != null) && (!runAsUser.equals(AuthenticationUtil.getSystemUserName())) && (caveatConfigService != null))
if ((runAsUser != null) && (! runAsUser.equals(AuthenticationUtil.getSystemUserName())) && (caveatConfigService != null))
{
// get allowed values for current user
List<String> allowedForUser = caveatConfigService.getRMAllowedValues(getType());
@@ -167,14 +169,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"})
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void setAllowedValues(List allowedValues)
{

View File

@@ -29,6 +29,7 @@ package org.alfresco.module.org_alfresco_module_rm.caveat;
import java.io.Serializable;
public class ScriptAuthority implements Serializable
{
/**
@@ -42,20 +43,18 @@ 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;
}
}

View File

@@ -35,12 +35,11 @@ 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
{
/**
@@ -65,12 +64,10 @@ public class ScriptConstraint implements Serializable
{
info.setTitle(title);
}
public String getTitle()
{
return info.getTitle();
}
public void setName(String name)
{
info.setName(name);
@@ -117,7 +114,7 @@ public class ScriptConstraint implements Serializable
public void updateTitle(String newTitle)
{
info.setTitle(newTitle);
rmCaveatconfigService.updateRMConstraintTitle(info.getName(), newTitle);
rmCaveatconfigService.updateRMConstraintTitle(info.getName(), newTitle) ;
}
/**
@@ -131,19 +128,18 @@ public class ScriptConstraint implements Serializable
/**
* Update a value
*
* @param bodge
*/
public void updateValues(JSONArray bodge) throws Exception
{
for (int i = 0; i < bodge.length(); i++)
for(int i = 0; i < bodge.length(); i++)
{
JSONObject obj = bodge.getJSONObject(i);
String value = obj.getString("value");
JSONArray authorities = obj.getJSONArray("authorities");
List<String> aList = new ArrayList<>();
for (int j = 0; j < authorities.length(); j++)
for(int j = 0; j < authorities.length();j++)
{
aList.add(authorities.getString(j));
}
@@ -153,7 +149,6 @@ public class ScriptConstraint implements Serializable
/**
* Update a value
*
* @param value
* @param authorities
*/
@@ -165,27 +160,25 @@ public class ScriptConstraint implements Serializable
/**
* Cascade delete an authority
*
* @param authority
*/
public void deleteAuthority(String authority)
{
// Do nothing
//Do nothing
}
/**
* Cascade delete a value
*
* @param value
*/
public void deleteValue(String value)
{
// Do nothing
//Do nothing
}
/**
* Get a single value
*
* @param value
* @return
*/
@@ -193,9 +186,9 @@ public class ScriptConstraint implements Serializable
{
ScriptConstraintValue[] values = getValues();
for (ScriptConstraintValue val : values)
for(ScriptConstraintValue val : values)
{
if (val.getValueName().equalsIgnoreCase(value))
if(val.getValueName().equalsIgnoreCase(value))
{
return val;
}
@@ -225,13 +218,13 @@ public class ScriptConstraint implements Serializable
List<String> authorities = entry.getValue();
List<ScriptAuthority> sauth = new ArrayList<>();
for (String authority : authorities)
for(String authority : authorities)
{
ScriptAuthority a = new ScriptAuthority();
a.setAuthorityName(authority);
String displayName = authorityService.getAuthorityDisplayName(authority);
if (StringUtils.isNotBlank(displayName))
if(StringUtils.isNotBlank(displayName))
{
a.setAuthorityTitle(displayName);
}
@@ -249,9 +242,9 @@ public class ScriptConstraint implements Serializable
* Now go through and add any "empty" values
*/
Set<String> values = pivot.keySet();
for (String value : info.getAllowedValues())
for(String value : info.getAllowedValues())
{
if (!values.contains(value))
if(!values.contains(value))
{
ScriptConstraintValue constraint = new ScriptConstraintValue();
constraint.setValueName(value);

View File

@@ -37,23 +37,20 @@ public class ScriptConstraintAuthority implements Serializable
*/
private static final long serialVersionUID = -4659454215122271811L;
private String authorityName;
private List<String> values;
private List<String>values;
public void setValues(List<String> values)
{
this.values = values;
}
public List<String> getValues()
{
return values;
}
public void setAuthorityName(String authorityName)
{
this.authorityName = authorityName;
}
public String getAuthorityName()
{
return authorityName;

View File

@@ -37,33 +37,28 @@ public class ScriptConstraintValue implements Serializable
*/
private static final long serialVersionUID = -4659454215122271811L;
private String value;
private List<ScriptAuthority> authorities;
private List<ScriptAuthority>authorities;
public void setAuthorities(List<ScriptAuthority> values)
{
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;

View File

@@ -66,12 +66,12 @@ public class ScriptRMCaveatConfigService extends BaseScopableProcessorExtension
public ScriptConstraint getConstraint(String listName)
{
// TODO Temporary conversion
//TODO Temporary conversion
String xxx = listName.replace("_", ":");
RMConstraintInfo info = caveatConfigService.getRMConstraint(xxx);
if (info != null)
if(info != null)
{
return new ScriptConstraint(info, caveatConfigService, getAuthorityService());
}
@@ -94,7 +94,7 @@ public class ScriptRMCaveatConfigService extends BaseScopableProcessorExtension
Set<RMConstraintInfo> values = caveatConfigService.getAllRMConstraints();
List<ScriptConstraint> vals = new ArrayList<>(values.size());
for (RMConstraintInfo value : values)
for(RMConstraintInfo value : values)
{
ScriptConstraint c = new ScriptConstraint(value, caveatConfigService, getAuthorityService());
if (includeEmptyList)
@@ -115,21 +115,22 @@ public class ScriptRMCaveatConfigService extends BaseScopableProcessorExtension
/**
* Delete list
*
* @param listName
*
*/
public void deleteConstraintList(String listName)
{
// TODO Temporary conversion
//TODO Temporary conversion
String xxx = listName.replace("_", ":");
caveatConfigService.deleteRMConstraint(xxx);
}
/**
* Update value
*/
public void updateConstraintValues(String listName, String authorityName, String[] values)
public void updateConstraintValues(String listName, String authorityName, String[]values)
{
List<String> vals = new ArrayList<>();
caveatConfigService.updateRMConstraintListAuthority(listName, authorityName, vals);
@@ -140,7 +141,7 @@ public class ScriptRMCaveatConfigService extends BaseScopableProcessorExtension
*/
public void deleteRMConstraintListAuthority(String listName, String authorityName)
{
// TODO Temporary conversion
//TODO Temporary conversion
String xxx = listName.replace("_", ":");
caveatConfigService.removeRMConstraintListAuthority(xxx, authorityName);
@@ -151,7 +152,7 @@ public class ScriptRMCaveatConfigService extends BaseScopableProcessorExtension
*/
public void deleteRMConstraintListValue(String listName, String valueName)
{
// TODO Temporary conversion
//TODO Temporary conversion
String xxx = listName.replace("_", ":");
caveatConfigService.removeRMConstraintListValue(xxx, valueName);
@@ -160,8 +161,8 @@ public class ScriptRMCaveatConfigService extends BaseScopableProcessorExtension
public ScriptConstraint createConstraint(String listName, String title, String[] allowedValues)
{
// TODO Temporary conversion
if (listName != null)
//TODO Temporary conversion
if(listName != null)
{
listName = listName.replace("_", ":");
}

View File

@@ -41,8 +41,7 @@ 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}&lt;{@link String}&gt; set of extended readers
*
* @deprecated as of 2.5, use {@link ExtendedSecurityService#getReaders(NodeRef)}
@@ -52,8 +51,7 @@ 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}&lt;{@link String}&gt; set of extended writers
*
* @deprecated as of 2.5, use {@link ExtendedSecurityService#getWriters(NodeRef)}
@@ -65,12 +63,9 @@ 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)}
*/
@@ -80,85 +75,74 @@ 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);
}

View File

@@ -78,7 +78,7 @@ public class ExtendedReaderDynamicAuthority extends ExtendedSecurityBaseDynamicA
{
Set<String> result = null;
Map<String, Integer> readerMap = (Map<String, Integer>) getNodeService().getProperty(nodeRef, PROP_READERS);
Map<String, Integer> readerMap = (Map<String, Integer>)getNodeService().getProperty(nodeRef, PROP_READERS);
if (readerMap != null)
{
result = readerMap.keySet();

View File

@@ -30,9 +30,6 @@ 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;
@@ -42,6 +39,8 @@ 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.
@@ -82,7 +81,7 @@ public abstract class ExtendedSecurityBaseDynamicAuthority implements DynamicAut
{
if (authorityService == null)
{
authorityService = (AuthorityService) applicationContext.getBean("authorityService");
authorityService = (AuthorityService)applicationContext.getBean("authorityService");
}
return authorityService;
}
@@ -94,7 +93,7 @@ public abstract class ExtendedSecurityBaseDynamicAuthority implements DynamicAut
{
if (extendedSecurityService == null)
{
extendedSecurityService = (ExtendedSecurityService) applicationContext.getBean("extendedSecurityService");
extendedSecurityService = (ExtendedSecurityService)applicationContext.getBean("extendedSecurityService");
}
return extendedSecurityService;
}
@@ -106,7 +105,7 @@ public abstract class ExtendedSecurityBaseDynamicAuthority implements DynamicAut
{
if (nodeService == null)
{
nodeService = (NodeService) applicationContext.getBean("dbNodeService");
nodeService = (NodeService)applicationContext.getBean("dbNodeService");
}
return nodeService;
}
@@ -118,7 +117,7 @@ public abstract class ExtendedSecurityBaseDynamicAuthority implements DynamicAut
{
if (modelDAO == null)
{
modelDAO = (ModelDAO) applicationContext.getBean("permissionsModelDAO");
modelDAO = (ModelDAO)applicationContext.getBean("permissionsModelDAO");
}
return modelDAO;
}
@@ -138,7 +137,8 @@ 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

View File

@@ -83,7 +83,7 @@ public class ExtendedWriterDynamicAuthority extends ExtendedSecurityBaseDynamicA
{
Set<String> result = null;
Map<String, Integer> map = (Map<String, Integer>) getNodeService().getProperty(nodeRef, PROP_WRITERS);
Map<String, Integer> map = (Map<String, Integer>)getNodeService().getProperty(nodeRef, PROP_WRITERS);
if (map != null)
{
result = map.keySet();

View File

@@ -49,10 +49,8 @@ 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

View File

@@ -47,8 +47,7 @@ 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
*/
@@ -56,10 +55,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)}
@@ -70,8 +69,7 @@ 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}&lt;{@link Role}&gt; all roles for a given root node
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getRoles(NodeRef)}
@@ -105,7 +103,6 @@ public interface RecordsManagementSecurityService
/**
* Indicate whether a role exists for a given records management root node
*
* @param rmRootNode
* @param role
* @return
@@ -118,10 +115,8 @@ 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)}
@@ -181,14 +176,12 @@ 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)}
*/
@@ -198,12 +191,9 @@ 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)}
*/

View File

@@ -55,8 +55,7 @@ public class RecordsManagementSecurityServiceImpl implements RecordsManagementSe
private FilePlanPermissionService filePlanPermissionService;
/**
* @param modelSecurityService
* model security service
* @param modelSecurityService model security service
*/
public void setModelSecurityService(ModelSecurityService modelSecurityService)
{
@@ -64,8 +63,7 @@ public class RecordsManagementSecurityServiceImpl implements RecordsManagementSe
}
/**
* @param filePlanRoleService
* file plan role service
* @param filePlanRoleService file plan role service
*/
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
{
@@ -73,8 +71,7 @@ public class RecordsManagementSecurityServiceImpl implements RecordsManagementSe
}
/**
* @param filePlanPermissionService
* file plan permission service
* @param filePlanPermissionService file plan permission service
*/
public void setFilePlanPermissionService(FilePlanPermissionService filePlanPermissionService)
{

View File

@@ -92,9 +92,12 @@ public interface RecordsManagementPolicies
interface OnRemoveReference extends ClassPolicy
{
/**
* @param fromNodeRef from node reference
* @param toNodeRef to node reference
* @param reference name of reference
* @param fromNodeRef
* from node reference
* @param toNodeRef
* to node reference
* @param reference
* name of reference
*/
void onRemoveReference(NodeRef fromNodeRef, NodeRef toNodeRef, QName reference);
}
@@ -110,7 +113,8 @@ public interface RecordsManagementPolicies
QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "beforeRecordFile");
/**
* @param nodeRef node reference
* @param nodeRef
* node reference
*/
void beforeFileRecord(NodeRef nodeRef);
}
@@ -126,13 +130,15 @@ public interface RecordsManagementPolicies
QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "onRecordFile");
/**
* @param nodeRef node reference
* @param nodeRef
* node reference
*/
void onFileRecord(NodeRef nodeRef);
}
/**
* Before record declaration
*
* @since 2.5
*/
interface BeforeRecordDeclaration extends ClassPolicy
@@ -142,6 +148,7 @@ public interface RecordsManagementPolicies
/**
* On record declaration
*
* @since 2.5
*/
interface OnRecordDeclaration extends ClassPolicy
@@ -151,6 +158,7 @@ public interface RecordsManagementPolicies
/**
* Before record rejection
*
* @since 2.5
*/
interface BeforeRecordRejection extends ClassPolicy
@@ -160,6 +168,7 @@ public interface RecordsManagementPolicies
/**
* On record rejection
*
* @since 2.5
*/
interface OnRecordRejection extends ClassPolicy

View File

@@ -77,7 +77,6 @@ public interface RecordsManagementServiceRegistry extends ServiceRegistry
@Deprecated
QName RECORDS_MANAGEMENT_SECURITY_SERVICE = QName.createQName(NamespaceService.ALFRESCO_URI, "RecordsManagementSecurityService");
/**
* @return records management service
*/

View File

@@ -33,6 +33,10 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import org.alfresco.repo.batch.BatchProcessWorkProvider;
import org.alfresco.repo.batch.BatchProcessor;
import org.alfresco.repo.batch.BatchProcessor.BatchProcessWorker;
@@ -45,9 +49,6 @@ import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.SearchParameters;
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.transaction.TransactionService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
/**
* A base class for executing bulk operations on nodes based on search query results
@@ -79,8 +80,10 @@ public abstract class BulkBaseService<T> implements InitializingBean
/**
* Execute bulk operation on node based on the search query results
*
* @param nodeRef node reference
* @param bulkOperation bulk operation
* @param nodeRef
* node reference
* @param bulkOperation
* bulk operation
* @return bulk status
*/
public T execute(NodeRef nodeRef, BulkOperation bulkOperation)
@@ -154,8 +157,10 @@ public abstract class BulkBaseService<T> implements InitializingBean
/**
* Get initial bulk status
*
* @param processId process id
* @param totalItems total items
* @param processId
* process id
* @param totalItems
* total items
* @return bulk status
*/
protected abstract T getInitBulkStatus(String processId, long totalItems);
@@ -170,9 +175,12 @@ public abstract class BulkBaseService<T> implements InitializingBean
/**
* Get work provider
*
* @param bulkOperation bulk operation
* @param bulkStatusUpdater bulk status updater
* @param bulkProgress bulk progress
* @param bulkOperation
* bulk operation
* @param bulkStatusUpdater
* bulk status updater
* @param bulkProgress
* bulk progress
* @return work provider
*/
protected abstract BatchProcessWorkProvider<NodeRef> getWorkProvider(BulkOperation bulkOperation,
@@ -181,9 +189,12 @@ public abstract class BulkBaseService<T> implements InitializingBean
/**
* Get worker provider
*
* @param nodeRef node reference
* @param bulkOperation bulk operation
* @param bulkProgress bulk progress
* @param nodeRef
* node reference
* @param bulkOperation
* bulk operation
* @param bulkProgress
* bulk progress
* @return worker provider
*/
protected abstract BatchProcessWorker<NodeRef> getWorkerProvider(NodeRef nodeRef, BulkOperation bulkOperation,
@@ -192,8 +203,10 @@ public abstract class BulkBaseService<T> implements InitializingBean
/**
* Check permissions
*
* @param nodeRef node reference
* @param bulkOperation bulk operation
* @param nodeRef
* node reference
* @param bulkOperation
* bulk operation
*/
protected abstract void checkPermissions(NodeRef nodeRef, BulkOperation bulkOperation);

View File

@@ -30,5 +30,4 @@ package org.alfresco.module.org_alfresco_module_rm.bulk;
* An immutable POJO to represent a bulk cancellation request
*/
public record BulkCancellationRequest(String reason)
{
}
{}

View File

@@ -36,23 +36,28 @@ public interface BulkMonitor<T>
/**
* Update the bulk status
*
* @param bulkStatus the bulk status
* @param bulkStatus
* the bulk status
*/
void updateBulkStatus(T bulkStatus);
/**
* Register a process
*
* @param nodeRef the node reference
* @param processId the process id
* @param bulkOperation the bulk operation
* @param nodeRef
* the node reference
* @param processId
* the process id
* @param bulkOperation
* the bulk operation
*/
void registerProcess(NodeRef nodeRef, String processId, BulkOperation bulkOperation);
/**
* Get the bulk status
*
* @param bulkStatusId the bulk status id
* @param bulkStatusId
* the bulk status id
* @return the bulk status
*/
T getBulkStatus(String bulkStatusId);

View File

@@ -33,5 +33,4 @@ import java.util.concurrent.atomic.AtomicInteger;
* An immutable POJO to represent the progress of a bulk operation
*/
public record BulkProgress(long totalItems, String processId, AtomicBoolean cancelled, AtomicInteger currentNodeNumber)
{
}
{}

View File

@@ -33,13 +33,14 @@ import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import org.springframework.context.ApplicationEvent;
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
import org.alfresco.module.org_alfresco_module_rm.bulk.BulkCancellationRequest;
import org.alfresco.module.org_alfresco_module_rm.bulk.BulkOperation;
import org.alfresco.repo.cache.SimpleCache;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.util.Pair;
import org.springframework.context.ApplicationEvent;
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
/**
* Default hold bulk monitor implementation
@@ -125,7 +126,7 @@ public class DefaultHoldBulkMonitor extends AbstractLifecycleBean implements Hol
protected static Comparator<HoldBulkStatusAndProcessDetails> sortBulkStatuses()
{
return Comparator.<HoldBulkStatusAndProcessDetails, Date>comparing(
return Comparator.<HoldBulkStatusAndProcessDetails, Date> comparing(
statusAndProcess -> statusAndProcess.holdBulkStatus().endTime(),
Comparator.nullsLast(Comparator.naturalOrder()))
.thenComparing(statusAndProcess -> statusAndProcess.holdBulkStatus().startTime(),

View File

@@ -38,7 +38,8 @@ public interface HoldBulkMonitor extends BulkMonitor<HoldBulkStatus>
/**
* Get the bulk statuses with process details for a hold
*
* @param holdId the hold id
* @param holdId
* the hold id
* @return the bulk statuses with process details
*/
List<HoldBulkStatusAndProcessDetails> getBulkStatusesWithProcessDetails(String holdId);
@@ -46,8 +47,10 @@ public interface HoldBulkMonitor extends BulkMonitor<HoldBulkStatus>
/**
* Get the bulk status with process details
*
* @param holdId the hold id
* @param bulkStatusId the bulk status id
* @param holdId
* the hold id
* @param bulkStatusId
* the bulk status id
* @return the bulk status with process details
*/
HoldBulkStatusAndProcessDetails getBulkStatusWithProcessDetails(String holdId, String bulkStatusId);

View File

@@ -34,5 +34,4 @@ import org.alfresco.module.org_alfresco_module_rm.bulk.BulkOperation;
* A simple immutable POJO to hold the details of a bulk process
*/
public record HoldBulkProcessDetails(String bulkStatusId, String creatorInstance, BulkOperation bulkOperation) implements Serializable
{
}
{}

View File

@@ -38,8 +38,10 @@ public interface HoldBulkService
/**
* Initiates a bulk operation on a hold.
*
* @param holdRef The hold reference
* @param bulkOperation The bulk operation
* @param holdRef
* The hold reference
* @param bulkOperation
* The bulk operation
* @return The initial status of the bulk operation
*/
HoldBulkStatus execute(NodeRef holdRef, BulkOperation bulkOperation);
@@ -47,9 +49,12 @@ public interface HoldBulkService
/**
* Cancels a bulk operation.
*
* @param holdRef The hold reference
* @param bulkStatusId The bulk status id
* @param bulkCancellationRequest The bulk cancellation request
* @param holdRef
* The hold reference
* @param bulkStatusId
* The bulk status id
* @param bulkCancellationRequest
* The bulk cancellation request
*/
void cancelBulkOperation(NodeRef holdRef, String bulkStatusId, BulkCancellationRequest bulkCancellationRequest);
}

View File

@@ -34,6 +34,10 @@ import java.util.Collections;
import java.util.Locale;
import java.util.Optional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.bulk.BulkBaseService;
import org.alfresco.module.org_alfresco_module_rm.bulk.BulkCancellationRequest;
@@ -56,9 +60,6 @@ import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.SearchParameters;
import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.cmr.security.PermissionService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* Implementation of the {@link HoldBulkService} interface.

View File

@@ -38,10 +38,7 @@ public record HoldBulkStatus(String bulkStatusId, Date startTime, Date endTime,
{
public enum Status
{
PENDING("PENDING"),
IN_PROGRESS("IN PROGRESS"),
DONE("DONE"),
CANCELLED("CANCELLED");
PENDING("PENDING"), IN_PROGRESS("IN PROGRESS"), DONE("DONE"), CANCELLED("CANCELLED");
private final String value;

View File

@@ -31,5 +31,4 @@ package org.alfresco.module.org_alfresco_module_rm.bulk.hold;
*/
public record HoldBulkStatusAndProcessDetails(HoldBulkStatus holdBulkStatus,
HoldBulkProcessDetails holdBulkProcessDetails)
{
}
{}

View File

@@ -40,8 +40,7 @@ import org.alfresco.rm.rest.api.model.HoldBulkStatusEntry;
public final class HoldBulkUtils
{
private HoldBulkUtils()
{
}
{}
public static HoldBulkStatusEntry toHoldBulkStatusEntry(
HoldBulkStatusAndProcessDetails holdBulkStatusAndProcessDetails)

View File

@@ -0,0 +1,51 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.module.org_alfresco_module_rm.content.cleanser;
import java.io.File;
/**
* DoD 5220-22M Seven Pass data cleansing implementation.
*
*/
public class ContentCleanserSevenPass extends ContentCleanser522022M
{
/**
* @see org.alfresco.module.org_alfresco_module_rm.content.cleanser.ContentCleanser#cleanse(java.io.File)
*/
@Override
public void cleanse(File file)
{
super.cleanse(file);
overwrite(file, overwriteZeros);
overwrite(file, overwriteZeros);
overwrite(file, overwriteOnes);
overwrite(file, overwriteRandom);
}
}

View File

@@ -42,10 +42,10 @@ import org.alfresco.service.cmr.repository.NodeRef;
public interface HoldService
{
/**
* Indicates whether the passed node reference is a hold. A hold is a container for a group of frozen object and contains the freeze
* reason.
* Indicates whether the passed node reference is a hold. A hold is a container for a group of frozen object and contains the freeze reason.
*
* @param nodeRef hold node reference
* @param nodeRef
* hold node reference
* @return boolean true if hold, false otherwise
*/
boolean isHold(NodeRef nodeRef);
@@ -53,7 +53,8 @@ public interface HoldService
/**
* Gets the list of all the holds within the holds container in the given file plan
*
* @param filePlan The {@link NodeRef} of the file plan
* @param filePlan
* The {@link NodeRef} of the file plan
* @return List of hold node references
*/
List<NodeRef> getHolds(NodeRef filePlan);
@@ -61,7 +62,8 @@ public interface HoldService
/**
* Gets the node reference for the hold with the given name in the given file plan
*
* @param name {@link String} The name of the hold
* @param name
* {@link String} The name of the hold
* @return {@link NodeRef} of the hold with the given name
*/
NodeRef getHold(NodeRef filePlan, String name);
@@ -69,9 +71,10 @@ public interface HoldService
/**
* Gets the list of all the holds within the holds container for the given node reference
*
* @param nodeRef The {@link NodeRef} of the record / record folder /active content
* @param includedInHold <code>true</code> to retrieve the list of hold node references which will include the node reference
* <code>false</code> to get a list of node references which will not have the given node reference
* @param nodeRef
* The {@link NodeRef} of the record / record folder /active content
* @param includedInHold
* <code>true</code> to retrieve the list of hold node references which will include the node reference <code>false</code> to get a list of node references which will not have the given node reference
* @return List of hold node references
*/
List<NodeRef> heldBy(NodeRef nodeRef, boolean includedInHold);
@@ -79,7 +82,8 @@ public interface HoldService
/**
* Gets the list of item node references which are in the given hold
*
* @param hold {@link NodeRef} of the hold
* @param hold
* {@link NodeRef} of the hold
* @return Lost of item {@link NodeRef}s which are in the given hold
*/
List<NodeRef> getHeld(NodeRef hold);
@@ -87,10 +91,14 @@ public interface HoldService
/**
* Creates a hold with the given name, reason and description for the given file plan
*
* @param filePlan The {@link NodeRef} of the file plan
* @param name {@link String} The name of the hold
* @param reason {@link String} The reason of the hold
* @param description {@link String} The description of the hold
* @param filePlan
* The {@link NodeRef} of the file plan
* @param name
* {@link String} The name of the hold
* @param reason
* {@link String} The reason of the hold
* @param description
* {@link String} The description of the hold
* @return The {@link NodeRef} of the created hold
*/
NodeRef createHold(NodeRef filePlan, String name, String reason, String description);
@@ -98,7 +106,8 @@ public interface HoldService
/**
* Gets the hold reason for the given hold node reference
*
* @param hold The {@link NodeRef} of the hold
* @param hold
* The {@link NodeRef} of the hold
* @return {@link String} The reason of the hold
*/
String getHoldReason(NodeRef hold);
@@ -106,111 +115,138 @@ public interface HoldService
/**
* Sets the hold reason
*
* @param hold The {@link NodeRef} of the hold
* @param reason {@link String} The reason for the hold
* @param hold
* The {@link NodeRef} of the hold
* @param reason
* {@link String} The reason for the hold
*/
void setHoldReason(NodeRef hold, String reason);
/**
* Sets the reason for the hold deletion
*
* @param hold The {@link NodeRef} of the hold
* @param reason {@link String} The reason for the hold
* @param hold
* The {@link NodeRef} of the hold
* @param reason
* {@link String} The reason for the hold
*/
void setHoldDeletionReason(NodeRef hold, String reason);
/**
* Updates a hold with the given name, reason and description
*
* @param hold The {@link NodeRef} of the hold
* @param name {@link String} The name of the hold
* @param reason {@link String} The reason of the hold
* @param description {@link String} The description of the hold
* @param hold
* The {@link NodeRef} of the hold
* @param name
* {@link String} The name of the hold
* @param reason
* {@link String} The reason of the hold
* @param description
* {@link String} The description of the hold
*/
void updateHold(NodeRef hold, String name, String reason, String description);
/**
* Deletes the hold
*
* @param hold The {@link NodeRef} of the hold
* @param hold
* The {@link NodeRef} of the hold
*/
void deleteHold(NodeRef hold);
/**
* Adds the item to the given hold
*
* @param hold The {@link NodeRef} of the hold
* @param nodeRef The {@link NodeRef} of the record / record folder / active content which will be added to the given hold
* @param hold
* The {@link NodeRef} of the hold
* @param nodeRef
* The {@link NodeRef} of the record / record folder / active content which will be added to the given hold
*/
void addToHold(NodeRef hold, NodeRef nodeRef);
/**
* Adds the items to the the given hold
*
* @param hold The {@link NodeRef} of the hold to which the items will be added
* @param nodeRefs The item {@link NodeRef}s which will be added to the hold
* @param hold
* The {@link NodeRef} of the hold to which the items will be added
* @param nodeRefs
* The item {@link NodeRef}s which will be added to the hold
*/
void addToHold(NodeRef hold, List<NodeRef> nodeRefs);
/**
* Adds the item to the given list of holds
*
* @param holds The list of {@link NodeRef}s of the holds
* @param nodeRef The {@link NodeRef} of the record / record folder / active content which will be added to the given holds
* @param holds
* The list of {@link NodeRef}s of the holds
* @param nodeRef
* The {@link NodeRef} of the record / record folder / active content which will be added to the given holds
*/
void addToHolds(List<NodeRef> holds, NodeRef nodeRef);
/**
* Adds the given items to the given list of holds
*
* @param holds List of holds to which the given items will be added
* @param nodeRefs The list of items which will be added to the given holds
* @param holds
* List of holds to which the given items will be added
* @param nodeRefs
* The list of items which will be added to the given holds
*/
void addToHolds(List<NodeRef> holds, List<NodeRef> nodeRefs);
/**
* Removes the record from the given hold
*
* @param hold The {@link NodeRef} of the hold
* @param nodeRef The {@link NodeRef} of the record / record folder which will be removed from the given hold
* @param hold
* The {@link NodeRef} of the hold
* @param nodeRef
* The {@link NodeRef} of the record / record folder which will be removed from the given hold
*/
void removeFromHold(NodeRef hold, NodeRef nodeRef);
/**
* Removes the given items from the given hold
*
* @param hold The hold {@link NodeRef} from which the given items will be removed
* @param nodeRefs The list of items which will be removed from the given holds
* @param hold
* The hold {@link NodeRef} from which the given items will be removed
* @param nodeRefs
* The list of items which will be removed from the given holds
*/
void removeFromHold(NodeRef hold, List<NodeRef> nodeRefs);
/**
* Removes the item from the given list of hold
*
* @param holds The list {@link NodeRef}s of the holds
* @param nodeRef The {@link NodeRef} of the record / record folder which will be removed from the given holds
* @param holds
* The list {@link NodeRef}s of the holds
* @param nodeRef
* The {@link NodeRef} of the record / record folder which will be removed from the given holds
*/
void removeFromHolds(List<NodeRef> holds, NodeRef nodeRef);
/**
* Removes the items from the given holds
*
* @param holds List of hold {@link NodeRef}s from which the items will be removed
* @param nodeRefs List of item {@link NodeRef}s which will be removed from the given holds
* @param holds
* List of hold {@link NodeRef}s from which the items will be removed
* @param nodeRefs
* List of item {@link NodeRef}s which will be removed from the given holds
*/
void removeFromHolds(List<NodeRef> holds, List<NodeRef> nodeRefs);
/**
* Removes the given {@link NodeRef} from all the holds
*
* @param nodeRef The {@link NodeRef} of item which will be removed from all the holds
* @param nodeRef
* The {@link NodeRef} of item which will be removed from all the holds
*/
void removeFromAllHolds(NodeRef nodeRef);
/**
* Removes the given list of {@link NodeRef}s from all the holds
*
* @param nodeRefs The list of item {@link NodeRef}s which will be removed from all the holds
* @param nodeRefs
* The list of item {@link NodeRef}s which will be removed from all the holds
*/
void removeFromAllHolds(List<NodeRef> nodeRefs);
}

View File

@@ -43,6 +43,12 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.ListUtils;
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.capability.CapabilityService;
@@ -79,11 +85,6 @@ import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.util.ParameterCheck;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.ListUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* Hold service implementation
@@ -129,7 +130,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Set the file plan service
*
* @param filePlanService the file plan service
* @param filePlanService
* the file plan service
*/
public void setFilePlanService(FilePlanService filePlanService)
{
@@ -139,7 +141,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Set the record service
*
* @param recordService the record service
* @param recordService
* the record service
*/
public void setRecordService(RecordService recordService)
{
@@ -149,7 +152,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Set the record folder service
*
* @param recordFolderService the record folder service
* @param recordFolderService
* the record folder service
*/
public void setRecordFolderService(RecordFolderService recordFolderService)
{
@@ -159,7 +163,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Set the permission service
*
* @param permissionService the permission services
* @param permissionService
* the permission services
*/
public void setPermissionService(PermissionService permissionService)
{
@@ -167,7 +172,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
}
/**
* @param capabilityService capability service
* @param capabilityService
* capability service
*/
public void setCapabilityService(CapabilityService capabilityService)
{
@@ -187,7 +193,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Sets the policy component instance
*
* @param policyComponent The policy component instance
* @param policyComponent
* The policy component instance
*/
public void setPolicyComponent(PolicyComponent policyComponent)
{
@@ -228,7 +235,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
*
* @see org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy#beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef)
*/
@Behaviour(kind=BehaviourKind.CLASS, type="rma:hold", notificationFrequency=NotificationFrequency.EVERY_EVENT)
@Behaviour(kind = BehaviourKind.CLASS, type = "rma:hold", notificationFrequency = NotificationFrequency.EVERY_EVENT)
@Override
public void beforeDeleteNode(final NodeRef hold)
{
@@ -236,15 +243,14 @@ public class HoldServiceImpl extends ServiceBaseImpl
{
checkPermissionsForDeleteHold(hold);
RunAsWork<Void> work = new RunAsWork<Void>()
{
RunAsWork<Void> work = new RunAsWork<Void>() {
@Override
public Void doWork()
{
List<NodeRef> frozenNodes = getHeld(hold);
for (NodeRef frozenNode : frozenNodes)
{
//set in transaction cache in order not to trigger update policy when removing the child association
// set in transaction cache in order not to trigger update policy when removing the child association
transactionalResourceHelper.getSet("frozen").add(frozenNode);
removeFreezeAspect(frozenNode, 1);
}
@@ -258,8 +264,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
}
/**
* Helper method removes the freeze aspect from the record and record folder if it is no longer
* in a hold.
* Helper method removes the freeze aspect from the record and record folder if it is no longer in a hold.
*
* @param nodeRef
*/
@@ -271,7 +276,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
if (nodeService.hasAspect(nodeRef, ASPECT_FROZEN))
{
// remove the freeze aspect from the node
//set in transaction cache in order not to trigger update policy when removing the aspect
// set in transaction cache in order not to trigger update policy when removing the aspect
transactionalResourceHelper.getSet("frozen").add(nodeRef);
nodeService.removeAspect(nodeRef, ASPECT_FROZEN);
}
@@ -287,7 +292,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
if (recordsOtherHolds.size() == index)
{
// remove the freeze aspect from the node
//set in transaction cache in order not to trigger update policy when removing the aspect
// set in transaction cache in order not to trigger update policy when removing the aspect
transactionalResourceHelper.getSet("frozen").add(record);
nodeService.removeAspect(record, ASPECT_FROZEN);
}
@@ -359,8 +364,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
if (!CollectionUtils.isEmpty(filePlans))
{
final List<NodeRef> holdsNotIncludingNodeRef = new ArrayList<>();
filePlans.forEach(filePlan ->
{
filePlans.forEach(filePlan -> {
// invert list to get list of holds that do not contain this node
final List<NodeRef> allHolds = getHolds(filePlan);
holdsNotIncludingNodeRef.addAll(ListUtils.subtract(allHolds, new ArrayList<>(holdsIncludingNodeRef)));
@@ -379,7 +383,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Helper method to get holds that are direct parents of the given node.
*
* @param nodeRef node reference
* @param nodeRef
* node reference
* @return Set<{@link NodeRef}> set of parent holds
*/
private Set<NodeRef> getParentHolds(NodeRef nodeRef)
@@ -492,7 +497,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
if (nodeService.exists(hold) && isHold(hold))
{
// get the reason
reason = (String)nodeService.getProperty(hold, PROP_HOLD_REASON);
reason = (String) nodeService.getProperty(hold, PROP_HOLD_REASON);
}
return reason;
@@ -573,7 +578,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Helper method to check if user has correct permissions to delete hold
*
* @param hold hold to be deleted
* @param hold
* hold to be deleted
*/
private void checkPermissionsForDeleteHold(NodeRef hold)
{
@@ -680,8 +686,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
// fire before add to hold policy
invokeBeforeAddToHold(hold, nodeRef);
// run as system to ensure we have all the appropriate permissions to perform the manipulations we require
authenticationUtil.runAsSystem((RunAsWork<Void>) () ->
{
authenticationUtil.runAsSystem((RunAsWork<Void>) () -> {
// gather freeze properties
final Map<QName, Serializable> props = new HashMap<>(2);
props.put(PROP_FROZEN_AT, new Date());
@@ -690,7 +695,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
addFrozenAspect(nodeRef, props);
// Link the record to the hold
//set in transaction cache in order not to trigger update policy when adding the association
// set in transaction cache in order not to trigger update policy when adding the association
transactionalResourceHelper.getSet("frozen").add(nodeRef);
nodeService.addChild(hold, nodeRef, ASSOC_FROZEN_CONTENT, ASSOC_FROZEN_CONTENT);
// get the documents primary parent assoc
@@ -716,7 +721,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Check if the given node is eligible to be added into a hold
*
* @param nodeRef the node to be checked
* @param nodeRef
* the node to be checked
*/
private void checkNodeCanBeAddedToHold(NodeRef nodeRef)
{
@@ -748,14 +754,16 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Add Frozen aspect only if node isn't already frozen
*
* @param nodeRef node on which aspect will be added
* @param props aspect properties map
* @param nodeRef
* node on which aspect will be added
* @param props
* aspect properties map
*/
private void addFrozenAspect(NodeRef nodeRef, Map<QName, Serializable> props)
{
if (!nodeService.hasAspect(nodeRef, ASPECT_FROZEN))
{
//set in transaction cache in order not to trigger update policy when adding the aspect
// set in transaction cache in order not to trigger update policy when adding the aspect
transactionalResourceHelper.getSet("frozen").add(nodeRef);
// add freeze aspect
nodeService.addAspect(nodeRef, ASPECT_FROZEN, props);
@@ -845,10 +853,9 @@ public class HoldServiceImpl extends ServiceBaseImpl
invokeBeforeRemoveFromHold(hold, nodeRef);
// run as system so we don't run into further permission issues
// we already know we have to have the correct capability to get here
authenticationUtil.runAsSystem((RunAsWork<Void>) () ->
{
authenticationUtil.runAsSystem((RunAsWork<Void>) () -> {
// remove from hold
//set in transaction cache in order not to trigger update policy when removing the child association
// set in transaction cache in order not to trigger update policy when removing the child association
transactionalResourceHelper.getSet("frozen").add(nodeRef);
nodeService.removeChild(hold, nodeRef);
@@ -859,8 +866,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
}
// run as system as we can't be sure if have remove aspect rights on node
authenticationUtil.runAsSystem((RunAsWork<Void>) () ->
{
authenticationUtil.runAsSystem((RunAsWork<Void>) () -> {
removeFreezeAspect(nodeRef, 0);
return null;
});
@@ -921,9 +927,12 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Invoke beforeCreateHold policy
*
* @param nodeRef node reference
* @param name hold name
* @param reason hold reason
* @param nodeRef
* node reference
* @param name
* hold name
* @param reason
* hold reason
*/
protected void invokeBeforeCreateHold(NodeRef nodeRef, String name, String reason)
{
@@ -935,7 +944,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Invoke onCreateHold policy
*
* @param nodeRef node reference
* @param nodeRef
* node reference
*/
protected void invokeOnCreateHold(NodeRef nodeRef)
{
@@ -946,7 +956,8 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Invoke beforeDeleteHold policy
*
* @param nodeRef node reference
* @param nodeRef
* node reference
*/
protected void invokeBeforeDeleteHold(NodeRef nodeRef)
{
@@ -957,8 +968,10 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Invoke onDeleteHold policy
*
* @param holdName name of the hold
* @param classQNames hold types and aspects
* @param holdName
* name of the hold
* @param classQNames
* hold types and aspects
*/
protected void invokeOnDeleteHold(String holdName, Set<QName> classQNames)
{
@@ -971,8 +984,10 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Invoke beforeAddToHold policy
*
* @param hold hold node reference
* @param contentNodeRef content node reference
* @param hold
* hold node reference
* @param contentNodeRef
* content node reference
*/
protected void invokeBeforeAddToHold(NodeRef hold, NodeRef contentNodeRef)
{
@@ -983,8 +998,10 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Invoke onAddToHold policy
*
* @param hold hold node reference
* @param contentNodeRef content node reference
* @param hold
* hold node reference
* @param contentNodeRef
* content node reference
*/
protected void invokeOnAddToHold(NodeRef hold, NodeRef contentNodeRef)
{
@@ -995,8 +1012,10 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Invoke beforeRemoveFromHold policy
*
* @param hold hold node reference
* @param contentNodeRef content node reference
* @param hold
* hold node reference
* @param contentNodeRef
* content node reference
*/
protected void invokeBeforeRemoveFromHold(NodeRef hold, NodeRef contentNodeRef)
{
@@ -1007,8 +1026,10 @@ public class HoldServiceImpl extends ServiceBaseImpl
/**
* Invoke onRemoveFromHold policy
*
* @param hold hold node reference
* @param contentNodeRef content node reference
* @param hold
* hold node reference
* @param contentNodeRef
* content node reference
*/
protected void invokeOnRemoveFromHold(NodeRef hold, NodeRef contentNodeRef)
{

View File

@@ -45,11 +45,14 @@ public interface HoldServicePolicies
interface BeforeCreateHoldPolicy extends ClassPolicy
{
public static final QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "beforeCreateHold");
/**
* Called before a hold is created.
*
* @param name name of the hold to be created
* @param reason reason for the hold to be created
* @param name
* name of the hold to be created
* @param reason
* reason for the hold to be created
*/
void beforeCreateHold(String name, String reason);
}
@@ -57,10 +60,12 @@ public interface HoldServicePolicies
interface OnCreateHoldPolicy extends ClassPolicy
{
public static final QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateHold");
/**
* Called when a hold is created.
*
* @param hold node reference
* @param hold
* node reference
*/
void onCreateHold(NodeRef hold);
}
@@ -68,10 +73,12 @@ public interface HoldServicePolicies
interface BeforeDeleteHoldPolicy extends ClassPolicy
{
public static final QName QNAME = QName.createQName(NamespaceService.ALFRESCO_URI, "beforeDeleteHold");
/**
* Called before a hold is deleted.
*
* @param hold node reference
* @param hold
* node reference
*/
void beforeDeleteHold(NodeRef hold);
}
@@ -83,7 +90,8 @@ public interface HoldServicePolicies
/**
* Called when a hold is deleted.
*
* @param holdname name of the deleted hold
* @param holdname
* name of the deleted hold
*/
void onDeleteHold(String holdname);
}
@@ -95,8 +103,10 @@ public interface HoldServicePolicies
/**
* Called before adding content to hold.
*
* @param hold the hold to be added into
* @param contentNodeRef the item to be added to hold
* @param hold
* the hold to be added into
* @param contentNodeRef
* the item to be added to hold
*/
void beforeAddToHold(NodeRef hold, NodeRef contentNodeRef);
}
@@ -108,8 +118,10 @@ public interface HoldServicePolicies
/**
* Called when content is added to hold.
*
* @param hold the hold to be added into
* @param contentNodeRef the item to be added to hold
* @param hold
* the hold to be added into
* @param contentNodeRef
* the item to be added to hold
*/
void onAddToHold(NodeRef hold, NodeRef contentNodeRef);
}
@@ -121,8 +133,10 @@ public interface HoldServicePolicies
/**
* Called before removing content from hold.
*
* @param hold the hold to be removed from
* @param contentNodeRef the item to be removed from hold
* @param hold
* the hold to be removed from
* @param contentNodeRef
* the item to be removed from hold
*/
void beforeRemoveFromHold(NodeRef hold, NodeRef contentNodeRef);
}
@@ -134,8 +148,10 @@ public interface HoldServicePolicies
/**
* Called when removing content from hold.
*
* @param hold the hold to be removed from
* @param contentNodeRef the item to be removed from hold
* @param hold
* the hold to be removed from
* @param contentNodeRef
* the item to be removed from hold
*/
void onRemoveFromHold(NodeRef hold, NodeRef contentNodeRef);
}

View File

@@ -36,9 +36,9 @@ import java.util.Map;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionService;
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
@@ -50,10 +50,8 @@ import org.alfresco.service.cmr.search.SearchParameters;
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.PersonService;
/**
* The Disposition Lifecycle Job Finds all disposition action nodes which are for disposition actions specified Where
* asOf &gt; now OR dispositionEventsEligible = true; Runs the cut off or retain action for eligible records.
* The Disposition Lifecycle Job Finds all disposition action nodes which are for disposition actions specified Where asOf &gt; now OR dispositionEventsEligible = true; Runs the cut off or retain action for eligible records.
*
* @author mrogers
* @author Roy Wetherall
@@ -88,7 +86,8 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
private FreezeService freezeService;
/**
* @param freezeService freeze service
* @param freezeService
* freeze service
*/
public void setFreezeService(FreezeService freezeService)
{
@@ -98,7 +97,8 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
/**
* List of disposition actions to automatically execute when eligible.
*
* @param dispositionActions disposition actions
* @param dispositionActions
* disposition actions
*/
public void setDispositionActions(List<String> dispositionActions)
{
@@ -111,7 +111,8 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
}
/**
* @param recordsManagementActionService records management action service
* @param recordsManagementActionService
* records management action service
*/
public void setRecordsManagementActionService(RecordsManagementActionService recordsManagementActionService)
{
@@ -119,7 +120,8 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
}
/**
* @param nodeService node service
* @param nodeService
* node service
*/
public void setNodeService(NodeService nodeService)
{
@@ -127,7 +129,8 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
}
/**
* @param searchService search service
* @param searchService
* search service
*/
public void setSearchService(SearchService searchService)
{
@@ -215,13 +218,10 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
// execute search
ResultSet results = searchService.query(params);
if(results != null)
if (results != null)
{
// filtering out the hold/freezed cases from the result set
resultNodes =
results.getNodeRefs().stream().filter(node -> nodeService.getPrimaryParent(node) == null ?
!freezeService.isFrozenOrHasFrozenChildren(node) :
!freezeService.isFrozenOrHasFrozenChildren(nodeService.getPrimaryParent(node).getParentRef())).collect(Collectors.toList());
resultNodes = results.getNodeRefs().stream().filter(node -> nodeService.getPrimaryParent(node) == null ? !freezeService.isFrozenOrHasFrozenChildren(node) : !freezeService.isFrozenOrHasFrozenChildren(nodeService.getPrimaryParent(node).getParentRef())).collect(Collectors.toList());
}
hasMore = results.hasMore();
skipCount += resultNodes.size(); // increase by page size
@@ -246,7 +246,8 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
/**
* Helper method that executes a disposition action
*
* @param actionNodes - the disposition actions to execute
* @param actionNodes
* - the disposition actions to execute
*/
private void executeAction(final List<NodeRef> actionNodes)
{

View File

@@ -30,6 +30,9 @@ package org.alfresco.module.org_alfresco_module_rm.job;
import java.util.Date;
import java.util.List;
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.job.publish.PublishExecutor;
import org.alfresco.module.org_alfresco_module_rm.job.publish.PublishExecutorRegistry;
@@ -42,12 +45,9 @@ 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.cmr.repository.StoreRef;
import org.alfresco.service.cmr.search.QueryConsistency;
import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.SearchParameters;
import org.alfresco.service.cmr.search.SearchService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Job to publish any pending updates on marked node references.
@@ -75,7 +75,8 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
private BehaviourFilter behaviourFilter;
/**
* @param nodeService node service
* @param nodeService
* node service
*/
public void setNodeService(NodeService nodeService)
{
@@ -83,7 +84,8 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
}
/**
* @param searchService search service
* @param searchService
* search service
*/
public void setSearchService(SearchService searchService)
{
@@ -91,7 +93,8 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
}
/**
* @param publishExecutorRegistry public executor registry
* @param publishExecutorRegistry
* public executor registry
*/
public void setPublishExecutorRegistry(PublishExecutorRegistry publishExecutorRegistry)
{
@@ -99,7 +102,8 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
}
/**
* @param behaviourFilter behaviour filter
* @param behaviourFilter
* behaviour filter
*/
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
{
@@ -107,7 +111,8 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
}
/**
* @param dictionaryService dictionary service
* @param dictionaryService
* dictionary service
*/
public void setDictionaryService(DictionaryService dictionaryService)
{
@@ -124,8 +129,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
logger.debug("Job Starting");
}
AuthenticationUtil.runAs(new RunAsWork<Object>()
{
AuthenticationUtil.runAs(new RunAsWork<Object>() {
public Object doWork()
{
if (rmLoaded())
@@ -138,7 +142,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
{
if (nodeService.exists(nodeRef))
{
boolean publishing = ((Boolean)nodeService.getProperty(nodeRef, PROP_PUBLISH_IN_PROGRESS)).booleanValue();
boolean publishing = ((Boolean) nodeService.getProperty(nodeRef, PROP_PUBLISH_IN_PROGRESS)).booleanValue();
if (!publishing)
{
// Mark the update node as publishing in progress
@@ -156,7 +160,6 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
// Publish updates
publishUpdates(nodeRef);
if (logger.isDebugEnabled())
{
Date end = new Date();
@@ -207,13 +210,12 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
/**
* Get a list of the nodes with updates pending publish
*
* @return List<NodeRef> list of node refences with updates pending publication
*/
private List<NodeRef> getUpdatedNodes()
{
RetryingTransactionCallback<List<NodeRef>> execution =
new RetryingTransactionHelper.RetryingTransactionCallback<List<NodeRef>>()
{
RetryingTransactionCallback<List<NodeRef>> execution = new RetryingTransactionHelper.RetryingTransactionCallback<List<NodeRef>>() {
@Override
public List<NodeRef> execute()
{
@@ -268,15 +270,14 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
}
/**
* Mark the node as publish in progress. This is often used as a marker to prevent any further updates
* to a node.
* @param nodeRef node reference
* Mark the node as publish in progress. This is often used as a marker to prevent any further updates to a node.
*
* @param nodeRef
* node reference
*/
private void markPublishInProgress(final NodeRef nodeRef)
{
RetryingTransactionHelper.RetryingTransactionCallback<Void> execution =
new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
{
RetryingTransactionHelper.RetryingTransactionCallback<Void> execution = new RetryingTransactionHelper.RetryingTransactionCallback<Void>() {
@Override
public Void execute()
{
@@ -306,13 +307,13 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
/**
* Publish the updates made to the node.
* @param nodeRef node reference
*
* @param nodeRef
* node reference
*/
private void publishUpdates(final NodeRef nodeRef)
{
RetryingTransactionHelper.RetryingTransactionCallback<Void> execution =
new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
{
RetryingTransactionHelper.RetryingTransactionCallback<Void> execution = new RetryingTransactionHelper.RetryingTransactionCallback<Void>() {
@Override
public Void execute()
{
@@ -320,7 +321,7 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
try
{
// Get the update to value for the node
String updateTo = (String)nodeService.getProperty(nodeRef, PROP_UPDATE_TO);
String updateTo = (String) nodeService.getProperty(nodeRef, PROP_UPDATE_TO);
if (updateTo != null)
{
@@ -377,13 +378,13 @@ public class PublishUpdatesJobExecuter extends RecordsManagementJobExecuter
/**
* Unmark node as publish in progress, assuming publish failed.
* @param nodeRef node reference
*
* @param nodeRef
* node reference
*/
private void unmarkPublishInProgress(final NodeRef nodeRef)
{
RetryingTransactionHelper.RetryingTransactionCallback<Void> execution =
new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
{
RetryingTransactionHelper.RetryingTransactionCallback<Void> execution = new RetryingTransactionHelper.RetryingTransactionCallback<Void>() {
@Override
public Void execute()
{

View File

@@ -29,6 +29,12 @@ package org.alfresco.module.org_alfresco_module_rm.job;
import java.util.concurrent.atomic.AtomicBoolean;
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.error.AlfrescoRuntimeException;
import org.alfresco.repo.lock.JobLockService;
import org.alfresco.repo.lock.JobLockService.JobLockRefreshCallback;
@@ -37,11 +43,6 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
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.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
/**
* Base records management job implementation.
@@ -112,20 +113,29 @@ public class RecordsManagementJob implements Job
// get the job lock service
jobLockService = (JobLockService) context.getJobDetail().getJobDataMap().get("jobLockService");
if (jobLockService == null) { throw new AlfrescoRuntimeException("Job lock service has not been specified."); }
if (jobLockService == null)
{
throw new AlfrescoRuntimeException("Job lock service has not been specified.");
}
// get the job executer
jobExecuter = (RecordsManagementJobExecuter) context.getJobDetail().getJobDataMap().get("jobExecuter");
if (jobExecuter == null) { throw new AlfrescoRuntimeException("Job executer has not been specified."); }
if (jobExecuter == null)
{
throw new AlfrescoRuntimeException("Job executer has not been specified.");
}
// get the job name
jobName = (String) context.getJobDetail().getJobDataMap().get("jobName");
if (jobName == null) { throw new AlfrescoRuntimeException("Job name has not been specified."); }
if (jobName == null)
{
throw new AlfrescoRuntimeException("Job name has not been specified.");
}
if (jobName.compareTo("dispositionLifecycle") == 0)
{
//RM-3293 - set user for audit
// RM-3293 - set user for audit
if (jobExecuter instanceof DispositionLifecycleJobExecuter)
{
String auditUser = (String) context.getJobDetail().getJobDataMap().get("runAuditAs");
@@ -150,8 +160,7 @@ public class RecordsManagementJob implements Job
final LockCallback lockCallback = new LockCallback();
AuthenticationUtil.runAs(new RunAsWork<Void>()
{
AuthenticationUtil.runAs(new RunAsWork<Void>() {
public Void doWork()
{
// try and get the lock

View File

@@ -46,7 +46,8 @@ public abstract class RecordsManagementJobExecuter implements RecordsManagementM
protected RepositoryState repositoryState;
/**
* @param retryingTransactionHelper retrying transaction helper
* @param retryingTransactionHelper
* retrying transaction helper
*/
public void setRetryingTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
{
@@ -54,7 +55,8 @@ public abstract class RecordsManagementJobExecuter implements RecordsManagementM
}
/**
* @param repositoryState repository state helper component
* @param repositoryState
* repository state helper component
*/
public void setRepositoryState(RepositoryState repositoryState)
{

View File

@@ -39,7 +39,9 @@ public abstract class BasePublishExecutor implements PublishExecutor
/**
* Set publish executor registry
* @param registry publish executor registry
*
* @param registry
* publish executor registry
*/
public void setPublishExecutorRegistry(PublishExecutorRegistry registry)
{

View File

@@ -54,7 +54,9 @@ public class DispositionActionDefinitionPublishExecutor extends BasePublishExecu
/**
* Set node service
* @param nodeService node service
*
* @param nodeService
* node service
*/
public void setNodeService(NodeService nodeService)
{
@@ -63,7 +65,9 @@ public class DispositionActionDefinitionPublishExecutor extends BasePublishExecu
/**
* Set records management service
* @param rmActionService records management service
*
* @param rmActionService
* records management service
*/
public void setRmActionService(RecordsManagementActionService rmActionService)
{
@@ -86,11 +90,11 @@ public class DispositionActionDefinitionPublishExecutor extends BasePublishExecu
@Override
public void publish(NodeRef nodeRef)
{
List<QName> updatedProps = (List<QName>)nodeService.getProperty(nodeRef, RecordsManagementModel.PROP_UPDATED_PROPERTIES);
List<QName> updatedProps = (List<QName>) nodeService.getProperty(nodeRef, RecordsManagementModel.PROP_UPDATED_PROPERTIES);
if (updatedProps != null)
{
Map<String, Serializable> params = new HashMap<>();
params.put(BroadcastDispositionActionDefinitionUpdateAction.CHANGED_PROPERTIES, (Serializable)updatedProps);
params.put(BroadcastDispositionActionDefinitionUpdateAction.CHANGED_PROPERTIES, (Serializable) updatedProps);
rmActionService.executeRecordsManagementAction(nodeRef, BroadcastDispositionActionDefinitionUpdateAction.NAME, params);
}
}

View File

@@ -44,7 +44,8 @@ public interface PublishExecutor
/**
* Publish changes to node.
*
* @param nodeRef node reference
* @param nodeRef
* node reference
*/
void publish(NodeRef nodeRef);
}

View File

@@ -43,7 +43,8 @@ public class PublishExecutorRegistry
/**
* Register a publish executor
*
* @param publishExecutor publish executor
* @param publishExecutor
* publish executor
*/
public void register(PublishExecutor publishExecutor)
{
@@ -53,7 +54,8 @@ public class PublishExecutorRegistry
/**
* Get registered publish executor by name.
*
* @param name name
* @param name
* name
* @return {@link PublishExecutor}]
*/
public PublishExecutor get(String name)

View File

@@ -56,68 +56,73 @@ public interface FilePlanRoleService
/** System roles */
List<String> SYSTEM_ROLES = Arrays.asList(
ROLE_EXTENDED_READERS,
ROLE_EXTENDED_WRITERS
);
ROLE_EXTENDED_WRITERS);
/**
* Sets up the roles on a new file plan.
*
* @param filePlan file plan
* @param filePlan
* file plan
*/
void setupFilePlanRoles(NodeRef filePlan);
/**
* Tears down the roles on a file plan.
*
* @param filePlan file plan
* @param filePlan
* file plan
*/
void tearDownFilePlanRoles(NodeRef filePlan);
/**
* 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
*/
String getAllRolesContainerGroup(NodeRef filePlan);
/**
* Get all the available roles for the given records management root node
* (includes also the system roles)
* Get all the available roles for the given records management root node (includes also the system roles)
*
* @param filePlan file plan
* @param filePlan
* file plan
* @return
*/
Set<Role> getRoles(NodeRef filePlan);
/**
* Get all the available roles for the given records management root node.
* System roles can be filtered
* Get all the available roles for the given records management root node. System roles can be filtered
*
* @param filePlan file plan
* @param includeSystemRoles system roles
* @param filePlan
* file plan
* @param includeSystemRoles
* system roles
* @return
*/
Set<Role> getRoles(NodeRef filePlan, boolean includeSystemRoles);
/**
* Gets the roles for a given user
* (includes also the system roles)
* Gets the roles for a given user (includes also the system roles)
*
* @param filePlan file plan
* @param user user
* @param filePlan
* file plan
* @param user
* user
* @return
*/
Set<Role> getRolesByUser(NodeRef filePlan, String user);
/**
* Gets the roles for a given user.
* System roles can be filtered
* Gets the roles for a given user. System roles can be filtered
*
* @param filePlan file plan
* @param user user
* @param includeSystemRoles system roles
* @param filePlan
* file plan
* @param user
* user
* @param includeSystemRoles
* system roles
* @return
*/
Set<Role> getRolesByUser(NodeRef filePlan, String user, boolean includeSystemRoles);
@@ -125,16 +130,21 @@ public interface FilePlanRoleService
/**
* Get a role by name
*
* @param filePlan file plan
* @param role role
* @param filePlan
* file plan
* @param role
* role
* @return
*/
Role getRole(NodeRef filePlan, String role);
/**
* Indicate whether a role exists for a given records management root node
* @param filePlan file plan
* @param role role
*
* @param filePlan
* file plan
* @param role
* role
* @return
*/
boolean existsRole(NodeRef filePlan, String role);
@@ -142,8 +152,10 @@ public interface FilePlanRoleService
/**
* Determines whether the given user has the RM Admin role
*
* @param filePlan filePlan
* @param user user name to check
* @param filePlan
* filePlan
* @param user
* user name to check
* @return true if the user has the RM Admin role, false otherwise
*/
boolean hasRMAdminRole(NodeRef filePlan, String user);
@@ -151,7 +163,8 @@ public interface FilePlanRoleService
/**
* Create a new role
*
* @param filePlan file plan
* @param filePlan
* file plan
* @param role
* @param roleDisplayLabel
* @param capabilities
@@ -162,7 +175,8 @@ public interface FilePlanRoleService
/**
* Update an existing role
*
* @param filePlan file plan
* @param filePlan
* file plan
* @param role
* @param roleDisplayLabel
* @param capabilities
@@ -173,16 +187,20 @@ public interface FilePlanRoleService
/**
* Delete a role
*
* @param filePlan file plan
* @param role role
* @param filePlan
* file plan
* @param role
* role
*/
void deleteRole(NodeRef filePlan, String role);
/**
* Gets all the users that have been directly assigned to a role.
*
* @param filePlan file plan
* @param role role
* @param filePlan
* file plan
* @param role
* role
* @return {@link Set}&lt;{@link String}&gt; set of users
*/
Set<String> getUsersAssignedToRole(NodeRef filePlan, String role);
@@ -190,8 +208,10 @@ public interface FilePlanRoleService
/**
* Gets all the groups that have been directly assigned to a role.
*
* @param filePlan file plan
* @param role role
* @param filePlan
* file plan
* @param role
* role
* @return {@link Set}&lt;{@link String}&gt; set of groups
*/
Set<String> getGroupsAssignedToRole(NodeRef filePlan, String role);
@@ -199,8 +219,10 @@ public interface FilePlanRoleService
/**
* Gets all the groups and users that have been directly assigned to a role.
*
* @param filePlan file plan
* @param role role
* @param filePlan
* file plan
* @param role
* role
* @return {@link Set}&lt;{@link String}&gt; set of groups and users
*/
Set<String> getAllAssignedToRole(NodeRef filePlan, String role);
@@ -208,19 +230,24 @@ public interface FilePlanRoleService
/**
* Assign a role to an authority
*
* @param filePlan file plan
* @param role role
* @param authorityName authority name
* @param filePlan
* file plan
* @param role
* role
* @param authorityName
* authority name
*/
void assignRoleToAuthority(NodeRef filePlan, String role, String authorityName);
/**
* Unassign a role from an authority
*
* @param filePlan file plan
* @param role role
* @param authorityName authority name
* @param filePlan
* file plan
* @param role
* role
* @param authorityName
* authority name
*/
void unassignRoleFromAuthority(NodeRef filePlan, String role, String authorityName);
}

View File

@@ -35,6 +35,14 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.bootstrap.BootstrapImporterModuleComponent;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
@@ -54,13 +62,6 @@ import org.alfresco.service.cmr.security.AuthorityService;
import org.alfresco.service.cmr.security.AuthorityType;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.util.ParameterCheck;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* Role service implementation
@@ -109,7 +110,8 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
private static final String CONFIG_NODEID = "rm_config_folder";
/**
* @param capabilityService capability service
* @param capabilityService
* capability service
*/
public void setCapabilityService(CapabilityService capabilityService)
{
@@ -117,7 +119,8 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
}
/**
* @param authorityService authority service
* @param authorityService
* authority service
*/
public void setAuthorityService(AuthorityService authorityService)
{
@@ -125,7 +128,8 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
}
/**
* @param permissionService permission service
* @param permissionService
* permission service
*/
public void setPermissionService(PermissionService permissionService)
{
@@ -133,7 +137,8 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
}
/**
* @param nodeService node service
* @param nodeService
* node service
*/
public void setNodeService(NodeService nodeService)
{
@@ -141,7 +146,8 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
}
/**
* @param filePlanService file plan service
* @param filePlanService
* file plan service
*/
public void setFilePlanService(FilePlanService filePlanService)
{
@@ -164,7 +170,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
public void setupFilePlanRoles(final NodeRef filePlan)
{
// Do not execute behaviour if this has been created in the archive store
if(filePlan.getStoreRef().equals(StoreRef.STORE_REF_ARCHIVE_SPACESSTORE))
if (filePlan.getStoreRef().equals(StoreRef.STORE_REF_ARCHIVE_SPACESSTORE))
{
// This is not the spaces store - probably the archive store
return;
@@ -172,13 +178,12 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
if (nodeService.exists(filePlan))
{
List<NodeRef> systemContainers = AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<List<NodeRef>>()
{
List<NodeRef> systemContainers = AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<List<NodeRef>>() {
public List<NodeRef> doWork()
{
List<NodeRef> systemContainers = new ArrayList<>(3);
//In a multi tenant store we need to initialize the rm config if it has been done yet
// In a multi tenant store we need to initialize the rm config if it has been done yet
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, CONFIG_NODEID);
if (!nodeService.exists(nodeRef))
{
@@ -218,8 +223,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
@Override
public void tearDownFilePlanRoles(final NodeRef filePlan)
{
AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Object>()
{
AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Object>() {
public Object doWork()
{
// cascade delete the 'all' roles group for the site
@@ -251,13 +255,14 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
/**
* Bootstraps the default roles
*
* @param filePlan file plan
* @param systemContainers system containers
* @param filePlan
* file plan
* @param systemContainers
* system containers
*/
private void bootstrapDefaultRoles(final NodeRef filePlan, final List<NodeRef> systemContainers)
{
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
{
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>() {
public Object doWork()
{
try
@@ -298,7 +303,6 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
throw new AlfrescoRuntimeException("No name given to default bootstrap role. Check json configuration file.");
}
// Get the role's display label
String displayLabel = name;
if (object.has(JSON_DISPLAY_LABEL))
@@ -371,7 +375,8 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
/**
* Helper method to check whether the current authority is a system role or not
*
* @param roleAuthority The role to check
* @param roleAuthority
* The role to check
* @return Returns true if roleAuthority is a system role, false otherwise
*/
private boolean isSystemRole(String roleAuthority)
@@ -404,8 +409,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
@Override
public Set<Role> getRoles(final NodeRef rmRootNode, final boolean includeSystemRoles)
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<Role>>()
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<Role>>() {
public Set<Role> doWork()
{
Set<Role> result = new HashSet<>(13);
@@ -449,8 +453,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
@Override
public Set<Role> getRolesByUser(final NodeRef rmRootNode, final String user, final boolean includeSystemRoles)
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<Role>>()
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<Role>>() {
public Set<Role> doWork()
{
Set<Role> result = new HashSet<>(13);
@@ -520,8 +523,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
*/
public Role getRole(final NodeRef rmRootNode, final String role)
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Role>()
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Role>() {
public Role doWork()
{
Role result = null;
@@ -572,8 +574,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
*/
public boolean existsRole(final NodeRef rmRootNode, final String role)
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Boolean>()
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Boolean>() {
public Boolean doWork()
{
String fullRoleName = authorityService.getName(AuthorityType.GROUP, getFullRoleName(role, rmRootNode));
@@ -615,8 +616,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
*/
public Role createRole(final NodeRef filePlan, final String role, final String roleDisplayLabel, final Set<Capability> capabilities)
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Role>()
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Role>() {
public Role doWork()
{
String fullRoleName = getFullRoleName(role, filePlan);
@@ -666,15 +666,12 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
}, AuthenticationUtil.getSystemUserName());
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#updateRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String, java.util.Set)
*/
public Role updateRole(final NodeRef rmRootNode, final String role, final String roleDisplayLabel, final Set<Capability> capabilities)
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Role>()
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Role>() {
public Role doWork()
{
if (!existsRole(rmRootNode, role))
@@ -721,8 +718,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
throw new AlfrescoRuntimeException("'" + role + "' is a system role and cannot be deleted.");
}
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
{
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>() {
public Void doWork()
{
String roleAuthority = authorityService.getName(AuthorityType.GROUP, getFullRoleName(role, rmRootNode));
@@ -748,15 +744,17 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
/**
* Gets all the authorities of a given type directly assigned to the given role in the file plan.
*
* @param filePlan file plan
* @param roleName role name
* @param authorityType authority type
* @param filePlan
* file plan
* @param roleName
* role name
* @param authorityType
* authority type
* @return Set<String> directly assigned authorities
*/
private Set<String> getAuthoritiesAssignedToRole(final NodeRef filePlan, final String roleName, final AuthorityType authorityType)
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<String>>()
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Set<String>>() {
public Set<String> doWork()
{
Role role = getRole(filePlan, roleName);
@@ -802,8 +800,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
*/
public void assignRoleToAuthority(final NodeRef filePlan, final String role, final String authorityName)
{
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>()
{
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>() {
public Void doWork()
{
if (authorityService.authorityExists(authorityName) &&
@@ -831,8 +828,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
@Override
public void unassignRoleFromAuthority(final NodeRef filePlan, final String role, final String authorityName)
{
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>()
{
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>() {
public Void doWork()
{
String roleAuthority = authorityService.getName(AuthorityType.GROUP, getFullRoleName(role, filePlan));

View File

@@ -26,6 +26,8 @@
*/
package org.alfresco.module.org_alfresco_module_rm.util;
import java.util.Set;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.query.RecordsManagementQueryDAO;
import org.alfresco.repo.policy.BehaviourFilter;
@@ -34,10 +36,9 @@ import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.repository.NodeRef;
import java.util.Set;
/**
* Utility class to duplicate the content of a node without triggering the audit or versioning behaviours
*
* @author Ross Gale
* @since 2.7.2
*/
@@ -58,7 +59,9 @@ public class ContentBinDuplicationUtility extends ServiceBaseImpl
/**
* Setter for behaviour filter
* @param behaviourFilter BehaviourFilter
*
* @param behaviourFilter
* BehaviourFilter
*/
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
{
@@ -67,7 +70,9 @@ public class ContentBinDuplicationUtility extends ServiceBaseImpl
/**
* Setter for content service
* @param contentService ContentService
*
* @param contentService
* ContentService
*/
public void setContentService(ContentService contentService)
{
@@ -77,7 +82,8 @@ public class ContentBinDuplicationUtility extends ServiceBaseImpl
/**
* Setter for the Records Management QueryDAO
*
* @param recordsManagementQueryDAO The RM query DAO to set
* @param recordsManagementQueryDAO
* The RM query DAO to set
*/
public void setRecordsManagementQueryDAO(RecordsManagementQueryDAO recordsManagementQueryDAO)
{
@@ -85,9 +91,10 @@ public class ContentBinDuplicationUtility extends ServiceBaseImpl
}
/**
* Determines whether the bin file for a given node has at least one other reference to it
* Will return true if the binary exists and is referenced by at least one other node
* @param nodeRef Node with the binary in question
* Determines whether the bin file for a given node has at least one other reference to it Will return true if the binary exists and is referenced by at least one other node
*
* @param nodeRef
* Node with the binary in question
* @return boolean for if the bin has at least one other reference to it
*/
public boolean hasAtLeastOneOtherReference(NodeRef nodeRef)
@@ -106,24 +113,25 @@ public class ContentBinDuplicationUtility extends ServiceBaseImpl
/**
* Duplicate the content of a node without triggering the audit or versioning behaviours
*
* @param nodeRef The node with the content to duplicate
* @param nodeRef
* The node with the content to duplicate
*/
public void duplicate(NodeRef nodeRef)
{
//Adding fix for RM-6788 where too many duplicates are being made this is a workaround waiting on a full
// Adding fix for RM-6788 where too many duplicates are being made this is a workaround waiting on a full
// solution
if (!nodeService.hasAspect(nodeRef, ASPECT_ARCHIVED))
{
//disabling versioning and auditing
// disabling versioning and auditing
behaviourFilter.disableBehaviour();
try
{
//create a new content URL for the copy/original node
// create a new content URL for the copy/original node
updateContentProperty(nodeRef);
}
finally
{
//enable versioning and auditing
// enable versioning and auditing
behaviourFilter.enableBehaviour();
}
}
@@ -132,7 +140,8 @@ public class ContentBinDuplicationUtility extends ServiceBaseImpl
/**
* Helper to update the content property for the node
*
* @param nodeRef the node
* @param nodeRef
* the node
*/
private void updateContentProperty(NodeRef nodeRef)
{

View File

@@ -43,7 +43,8 @@ public class FileUtils
/**
* Helper method to convert a stream to a string.
*
* @param is input stream
* @param is
* input stream
* @return {@link String} string
* @throws IOException
*/

View File

@@ -47,7 +47,8 @@ public class NodeTypeUtility
private DictionaryService dictionaryService;
/**
* @param dictionaryService dictionary service
* @param dictionaryService
* dictionary service
*/
public void setDictionaryService(DictionaryService dictionaryService)
{
@@ -57,8 +58,10 @@ public class NodeTypeUtility
/**
* Utility method to quickly determine whether one class is equal to or sub of another.
*
* @param className class name
* @param ofClassName class name to check against
* @param className
* class name
* @param ofClassName
* class name to check against
* @return boolean true if equal to or sub, false otherwise
*/
public boolean instanceOf(QName className, QName ofClassName)
@@ -67,7 +70,6 @@ public class NodeTypeUtility
ParameterCheck.mandatory("ofClassName", ofClassName);
String key = className.toString() + "|" + ofClassName.toString();
return instanceOfCache.computeIfAbsent(key, k ->
(ofClassName.equals(className) || dictionaryService.isSubClass(className, ofClassName)));
return instanceOfCache.computeIfAbsent(key, k -> (ofClassName.equals(className) || dictionaryService.isSubClass(className, ofClassName)));
}
}

View File

@@ -54,13 +54,11 @@ public final class PoliciesUtil
*
* @param nodeRef
* the node we are interested in
* @return Returns a set of qualified names containing the node type and all
* the node aspects, or null if the node no longer exists
* @return Returns a set of qualified names containing the node type and all the node aspects, or null if the node no longer exists
*/
public static Set<QName> getTypeAndAspectQNames(final NodeService nodeService, final NodeRef nodeRef)
{
return AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Set<QName>>()
{
return AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Set<QName>>() {
public Set<QName> doWork()
{
Set<QName> qnames = null;

View File

@@ -67,7 +67,8 @@ public class PropertyModificationAllowedCheck
/**
* Setter for list of model URI's
*
* @param editableURIs List<String>
* @param editableURIs
* List<String>
*/
public void setEditableURIs(List<String> editableURIs)
{
@@ -77,7 +78,8 @@ public class PropertyModificationAllowedCheck
/**
* Setter for list of qnames
*
* @param whiteList List<QName>
* @param whiteList
* List<QName>
*/
public void setWhiteList(List<QName> whiteList)
{
@@ -88,10 +90,11 @@ public class PropertyModificationAllowedCheck
/**
* Compares the node properties with the requested update to make sure all potential updates are permitted
*
* @param before current node properties
* @param after updated properties for the node
* @return true - if all modified property keys are in the whitelist or
* in the list of model URI's for which the properties can be modified
* @param before
* current node properties
* @param after
* updated properties for the node
* @return true - if all modified property keys are in the whitelist or in the list of model URI's for which the properties can be modified
*/
public boolean check(Map<QName, Serializable> before, Map<QName, Serializable> after)
{
@@ -101,11 +104,11 @@ public class PropertyModificationAllowedCheck
{
final QName key = entry.getKey();
final Serializable beforeValue = entry.getValue();
//check if property has been updated
// check if property has been updated
final boolean modified = after.containsKey(key) && after.get(key) != null
&& !after.get(key).equals(beforeValue);
//check if the property has been emptied or removed
// check if the property has been emptied or removed
final boolean propertyRemovedEmptied = (after.get(key) == null && beforeValue != null)
|| !after.containsKey(key);
if (modified || propertyRemovedEmptied)
@@ -135,7 +138,8 @@ public class PropertyModificationAllowedCheck
/**
* Determines whether the property should be allowed to be updated or not.
*
* @param key property
* @param key
* property
* @return true if property update is allowed
*/
private boolean allowPropertyUpdate(QName key)

View File

@@ -38,12 +38,10 @@ import java.util.Map;
import java.util.Set;
import com.google.common.collect.ImmutableSet;
import org.apache.commons.collections.CollectionUtils;
/**
* Various common helper methods for Collections. This class is probably only appropriate for use with relatively
* small collections as it has not been optimised for dealing with large collections.
* Various common helper methods for Collections. This class is probably only appropriate for use with relatively small collections as it has not been optimised for dealing with large collections.
*
* @author Neil Mc Erlean
* @since 2.4.a
@@ -51,12 +49,16 @@ import org.apache.commons.collections.CollectionUtils;
// This class should all be moved to core Alfresco whenever possible and reused from there.
public final class RMCollectionUtils
{
private RMCollectionUtils() { /* Intentionally empty. */}
private RMCollectionUtils()
{ /* Intentionally empty. */}
/**
* Gets the list of duplicate elements contained within the specified list, if any.
* @param l the list in which to find duplicates.
* @param <T> the element type of the list.
*
* @param l
* the list in which to find duplicates.
* @param <T>
* the element type of the list.
* @return a list of duplicate elements. If there are no duplicates, returns an empty list.
*/
public static <T> List<T> getDuplicateElements(List<T> l)
@@ -64,11 +66,12 @@ public final class RMCollectionUtils
final Set<T> uniqueElems = new HashSet<>();
final List<T> duplicateElems = new ArrayList<>();
for (T elem: l)
for (T elem : l)
{
if (uniqueElems.contains(elem))
{
if (!duplicateElems.contains(elem)) duplicateElems.add(elem);
if (!duplicateElems.contains(elem))
duplicateElems.add(elem);
}
else
{
@@ -78,12 +81,16 @@ public final class RMCollectionUtils
return duplicateElems;
}
/** Returns the head (element at index 0) of the provided List.
/**
* Returns the head (element at index 0) of the provided List.
*
* @param l the list whose head is sought.
* @param <T> the type of the List.
* @param l
* the list whose head is sought.
* @param <T>
* the type of the List.
* @return the head element or {@code null} for the empty list.
* @throws NullPointerException if l is {@code null}
* @throws NullPointerException
* if l is {@code null}
*/
public static <T> T head(List<T> l)
{
@@ -91,14 +98,17 @@ public final class RMCollectionUtils
}
/**
* Returns the tail of the provided List i&#46;e&#46; the sublist which contains
* all elements of the given list except the {@link #head(List) head}.
* Returns the tail of the provided List i&#46;e&#46; the sublist which contains all elements of the given list except the {@link #head(List) head}.
*
* @param l the list whose tail is sought.
* @param <T> the type of the List.
* @param l
* the list whose tail is sought.
* @param <T>
* the type of the List.
* @return the tail sublist, which will be an empty list if the provided list had only a single element.
* @throws NullPointerException if l is {@code null}
* @throws UnsupportedOperationException if the provided list was empty.
* @throws NullPointerException
* if l is {@code null}
* @throws UnsupportedOperationException
* if the provided list was empty.
*/
public static <T> List<T> tail(List<T> l)
{
@@ -115,16 +125,17 @@ public final class RMCollectionUtils
/**
* Returns a Serializable List containing all of the provided elements.
*
* @param elements the elements to put in a list.
* @param <T> the element type.
* @param elements
* the elements to put in a list.
* @param <T>
* the element type.
* @return a Serializable List containing all the provided elements.
*/
@SuppressWarnings("unchecked")
@SafeVarargs
public static <T extends Serializable, LIST extends Serializable & List<T>>
LIST asSerializableList(T... elements)
public static <T extends Serializable, LIST extends Serializable & List<T>> LIST asSerializableList(T... elements)
{
final LIST l = (LIST)new ArrayList<T>(elements.length);
final LIST l = (LIST) new ArrayList<T>(elements.length);
for (T element : elements)
{
l.add(element);
@@ -133,11 +144,12 @@ public final class RMCollectionUtils
}
/**
* Returns a Set containing all of the provided elements. Duplicate elements will be removed as per the
* {@code Set} contract.
* Returns a Set containing all of the provided elements. Duplicate elements will be removed as per the {@code Set} contract.
*
* @param elements the elements to put in a Set.
* @param <T> the element type.
* @param elements
* the elements to put in a Set.
* @param <T>
* the element type.
* @return a Set containing all the provided elements (without duplicates).
*/
@SafeVarargs
@@ -152,12 +164,12 @@ public final class RMCollectionUtils
}
/**
* Returns a Set containing all of the elements in the provided collection.
* Duplicate elements will be removed as per the
* {@code Set} contract.
* Returns a Set containing all of the elements in the provided collection. Duplicate elements will be removed as per the {@code Set} contract.
*
* @param c the elements to put in a Set.
* @param <T> the element type.
* @param c
* the elements to put in a Set.
* @param <T>
* the element type.
* @return a Set containing all the provided elements (without duplicates).
*/
public static <T> HashSet<T> asSet(Collection<T> c)
@@ -174,43 +186,68 @@ public final class RMCollectionUtils
}
/**
* Determines the change in a Map entry between two Maps.
* Note that both maps must have the same types of key-value pair.
* Determines the change in a Map entry between two Maps. Note that both maps must have the same types of key-value pair.
*
* @param from the first collection.
* @param to the second collection.
* @param key the key identifying the entry.
* @param <K> the type of the key.
* @param <V> the type of the value.
* @param from
* the first collection.
* @param to
* the second collection.
* @param key
* the key identifying the entry.
* @param <K>
* the type of the key.
* @param <V>
* the type of the value.
* @return the {@link Difference}.
*
* @throws IllegalArgumentException if {@code key} is {@code null}.
* @throws IllegalArgumentException
* if {@code key} is {@code null}.
*/
public static <K, V> Difference diffKey(Map<K, V> from, Map<K, V> to, K key)
{
if (key == null) { throw new IllegalArgumentException("Key cannot be null."); }
if (key == null)
{
throw new IllegalArgumentException("Key cannot be null.");
}
if (from.containsKey(key))
{
if (to.containsKey(key))
{
if (nullSafeEquals(from.get(key), to.get(key))) { return Difference.UNCHANGED; }
else { return Difference.CHANGED; }
}
else { return Difference.REMOVED; }
if (nullSafeEquals(from.get(key), to.get(key)))
{
return Difference.UNCHANGED;
}
else
{
if (to.containsKey(key)) { return Difference.ADDED; }
else { return Difference.UNCHANGED; }
return Difference.CHANGED;
}
}
else
{
return Difference.REMOVED;
}
}
else
{
if (to.containsKey(key))
{
return Difference.ADDED;
}
else
{
return Difference.UNCHANGED;
}
}
}
/**
* Convert a collection to an immutable set. Any instances of null in the original collection will be removed.
*
* @param collection The original collection.
* @param <T> The type of the object in the collection.
* @param collection
* The original collection.
* @param <T>
* The type of the object in the collection.
* @return The immutable set.
*/
public static <T> ImmutableSet<T> toImmutableSet(Collection<T> collection)
@@ -230,11 +267,10 @@ public final class RMCollectionUtils
}
/**
* Check if a property is null or an empty collection. Note that this is the same as
* {org.apache.commons.collections.CollectionUtils.isEmpty(Collection)}, except that it takes a Serializable rather
* than a Collection. This avoids awkward casting exceptions when working with properties.
* Check if a property is null or an empty collection. Note that this is the same as {org.apache.commons.collections.CollectionUtils.isEmpty(Collection)}, except that it takes a Serializable rather than a Collection. This avoids awkward casting exceptions when working with properties.
*
* @param value The (probably Collection) value to check.
* @param value
* The (probably Collection) value to check.
* @return true if the supplied value is null or an empty collection.
*/
public static boolean isEmpty(Serializable value)

View File

@@ -37,16 +37,20 @@ import org.apache.commons.lang3.StringUtils;
public class RMParameterCheck
{
/**
* Checks that the string parameter with the given name is not blank i.e. it is not null, zero length or entirely
* composed of whitespace.
* Checks that the string parameter with the given name is not blank i.e. it is not null, zero length or entirely composed of whitespace.
*
* @param strParamName Name of parameter to check
* @param strParamValue Value of the parameter to check
* @param strParamName
* Name of parameter to check
* @param strParamValue
* Value of the parameter to check
*/
public static void checkNotBlank(final String strParamName, final String strParamValue)
throws IllegalArgumentException
{
if (StringUtils.isBlank(strParamValue)) { throw new IllegalArgumentException(strParamName
+ " is a mandatory parameter"); }
if (StringUtils.isBlank(strParamValue))
{
throw new IllegalArgumentException(strParamName
+ " is a mandatory parameter");
}
}
}

View File

@@ -30,6 +30,8 @@ package org.alfresco.module.org_alfresco_module_rm.util;
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.fileplan.FilePlanComponentKind;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
@@ -44,8 +46,6 @@ import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.ParameterCheck;
import org.alfresco.util.PropertyMap;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
/**
* Helper base class for service implementations.
@@ -92,7 +92,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
}
/**
* @param nodeService node service
* @param nodeService
* node service
*/
public void setNodeService(NodeService nodeService)
{
@@ -100,7 +101,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
}
/**
* @param service service
* @param service
* service
*/
public void setRenditionService(RenditionService service)
{
@@ -108,7 +110,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
}
/**
* @param dictionaryService dictionary service
* @param dictionaryService
* dictionary service
*/
public void setDictionaryService(DictionaryService dictionaryService)
{
@@ -116,7 +119,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
}
/**
* @param authenticationUtil authentication util helper
* @param authenticationUtil
* authentication util helper
*/
public void setAuthenticationUtil(AuthenticationUtil authenticationUtil)
{
@@ -124,7 +128,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
}
/**
* @param nodeTypeUtility node type utility
* @param nodeTypeUtility
* node type utility
*/
public void setNodeTypeUtility(NodeTypeUtility nodeTypeUtility)
{
@@ -132,7 +137,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
}
/**
* @param transactionalResourceHelper transactional resource helper
* @param transactionalResourceHelper
* transactional resource helper
*/
public void setTransactionalResourceHelper(TransactionalResourceHelper transactionalResourceHelper)
{
@@ -142,7 +148,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
/**
* Set the content service
*
* @param contentService content service
* @param contentService
* content service
*/
public void setContentService(ContentService contentService)
{
@@ -158,7 +165,7 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
{
if (internalNodeService == null)
{
internalNodeService = (NodeService)applicationContext.getBean("dbNodeService");
internalNodeService = (NodeService) applicationContext.getBean("dbNodeService");
}
return internalNodeService;
@@ -340,7 +347,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
* <p>
* Exposed in the RecordFolder service.
*
* @param nodeRef node reference
* @param nodeRef
* node reference
* @return boolean true if record folder, false otherwise
*/
public boolean isRecordFolder(NodeRef nodeRef)
@@ -352,7 +360,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
/**
* Indicates whether the given node reference is a record or not.
*
* @param nodeRef node reference
* @param nodeRef
* node reference
* @return boolean true if node reference is a record, false otherwise
*/
public boolean isRecord(NodeRef nodeRef)
@@ -367,7 +376,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
* <p>
* Exposed publicly in the {@link HoldService}
*
* @param nodeRef node reference
* @param nodeRef
* node reference
* @return boolean true if rma:hold or sub-type, false otherwise
*/
public boolean isHold(NodeRef nodeRef)
@@ -398,7 +408,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
/**
* Indicates whether the given node reference is an unfiled records container or not.
*
* @param nodeRef node reference
* @param nodeRef
* node reference
* @return boolean true if rma:unfiledRecordContainer or sub-type, false otherwise
*/
public boolean isUnfiledRecordsContainer(NodeRef nodeRef)
@@ -423,7 +434,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
/**
* Gets the file plan that a given file plan component resides within.
*
* @param nodeRef node reference
* @param nodeRef
* node reference
* @return {@link NodeRef} file plan, null if none
*/
public NodeRef getFilePlan(final NodeRef nodeRef)
@@ -438,7 +450,7 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
}
else
{
result = (NodeRef)getInternalNodeService().getProperty(nodeRef, PROP_ROOT_NODEREF);
result = (NodeRef) getInternalNodeService().getProperty(nodeRef, PROP_ROOT_NODEREF);
if (result == null || !instanceOf(result, TYPE_FILE_PLAN))
{
if (instanceOf(nodeRef, TYPE_FILE_PLAN))
@@ -469,8 +481,10 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
/**
* Utility method to safely and quickly determine if a node is a type (or sub-type) of the one specified.
*
* @param nodeRef node reference
* @param ofClassName class name to check
* @param nodeRef
* node reference
* @param ofClassName
* class name to check
*/
protected boolean instanceOf(NodeRef nodeRef, QName ofClassName)
{
@@ -483,8 +497,10 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
/**
* Utility method to quickly determine whether one class is equal to or sub of another.
*
* @param className class name
* @param ofClassName class name to check against
* @param className
* class name
* @param ofClassName
* class name to check against
* @return boolean true if equal to or sub, false otherwise
*/
protected boolean instanceOf(QName className, QName ofClassName)
@@ -497,7 +513,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
* <p>
* If the node is not already countable, then rma:countable is added and 0 returned.
*
* @param nodeRef node reference
* @param nodeRef
* node reference
* @return int next counter value
*/
protected int getNextCount(NodeRef nodeRef)
@@ -512,7 +529,7 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
}
else
{
Integer value = (Integer)this.nodeService.getProperty(nodeRef, PROP_COUNT);
Integer value = (Integer) this.nodeService.getProperty(nodeRef, PROP_COUNT);
if (value != null)
{
counter = value.intValue() + 1;
@@ -530,7 +547,8 @@ public class ServiceBaseImpl implements RecordsManagementModel, ApplicationConte
/**
* Helper method to get a set containing the node's type and all it's aspects
*
* @param nodeRef nodeRef
* @param nodeRef
* nodeRef
* @return Set<QName> set of qname's
*/
protected Set<QName> getTypeAndApsects(NodeRef nodeRef)

View File

@@ -84,7 +84,7 @@ public class TransactionalResourceHelper
/**
* @see org.alfresco.repo.transaction.TransactionalResourceHelper#getMap(Object)
*/
public <K,V> Map<K,V> getMap(Object resourceKey)
public <K, V> Map<K, V> getMap(Object resourceKey)
{
return org.alfresco.repo.transaction.TransactionalResourceHelper.getMap(resourceKey);
}

View File

@@ -31,6 +31,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionDefinition;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
@@ -38,8 +41,6 @@ import org.alfresco.repo.action.evaluator.ActionConditionEvaluator;
import org.alfresco.service.cmr.action.ActionConditionDefinition;
import org.alfresco.service.cmr.action.ActionDefinition;
import org.alfresco.service.cmr.repository.NodeRef;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
/**
* Extended action service implementation.
@@ -65,7 +66,8 @@ public class ExtendedActionServiceImpl extends ActionServiceImpl implements Appl
}
/**
* @param filePlanService file plan service
* @param filePlanService
* file plan service
*/
public void setFilePlanService(FilePlanService filePlanService)
{
@@ -117,7 +119,7 @@ public class ExtendedActionServiceImpl extends ActionServiceImpl implements Appl
{
if (kind != null)
{
Set<FilePlanComponentKind> applicableKinds = ((RecordsManagementActionDefinition)actionDefinition).getApplicableKinds();
Set<FilePlanComponentKind> applicableKinds = ((RecordsManagementActionDefinition) actionDefinition).getApplicableKinds();
if (applicableKinds == null || applicableKinds.size() == 0 || applicableKinds.contains(kind))
{
// an RM action can only act on a RM artifact

View File

@@ -32,9 +32,10 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.apache.commons.lang3.StringUtils;
/**
* Date parameter processor.
@@ -217,23 +218,23 @@ public class DateParameterProcessor extends ParameterProcessor implements Parame
*/
public void setMaximumNumberSuggestions(int maximumNumberSuggestions)
{
this.maximumNumberSuggestions = (maximumNumberSuggestions <= 0 ? DEFAULT_MAXIMUM_NUMBER_SUGGESTIONS: maximumNumberSuggestions);
this.maximumNumberSuggestions = (maximumNumberSuggestions <= 0 ? DEFAULT_MAXIMUM_NUMBER_SUGGESTIONS : maximumNumberSuggestions);
}
/* (non-Javadoc)
* @see org.alfresco.repo.action.parameter.ParameterSubstitutionSuggester#getSubstitutionSuggestions(java.lang.String)
*/
*
* @see org.alfresco.repo.action.parameter.ParameterSubstitutionSuggester#getSubstitutionSuggestions(java.lang.String) */
@Override
public List<String> getSubstitutionSuggestions(String substitutionFragment)
{
List<String> suggestions = new ArrayList<>();
String namePrefix = this.getName() + ".";
if(StringUtils.isBlank(substitutionFragment) || this.getName().toLowerCase().contains(substitutionFragment.toLowerCase()))
if (StringUtils.isBlank(substitutionFragment) || this.getName().toLowerCase().contains(substitutionFragment.toLowerCase()))
{
for(String field: ALL_FIELDS_FOR_SUBSTITUTION_QUERY)
for (String field : ALL_FIELDS_FOR_SUBSTITUTION_QUERY)
{
suggestions.add(namePrefix + field);
if(suggestions.size() >= maximumNumberSuggestions)
if (suggestions.size() >= maximumNumberSuggestions)
{
break;
}
@@ -241,13 +242,13 @@ public class DateParameterProcessor extends ParameterProcessor implements Parame
}
else
{
for(String field: ALL_FIELDS_FOR_SUBSTITUTION_QUERY)
for (String field : ALL_FIELDS_FOR_SUBSTITUTION_QUERY)
{
String prefixFieldName = namePrefix + field;
if(prefixFieldName.toLowerCase().contains(substitutionFragment.toLowerCase()))
if (prefixFieldName.toLowerCase().contains(substitutionFragment.toLowerCase()))
{
suggestions.add(namePrefix + field);
if(suggestions.size() >= maximumNumberSuggestions)
if (suggestions.size() >= maximumNumberSuggestions)
{
break;
}

View File

@@ -27,9 +27,10 @@
package org.alfresco.repo.action.parameter;
import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* Message parameter processor.

View File

@@ -35,6 +35,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang3.ArrayUtils;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService;
import org.alfresco.service.cmr.dictionary.ClassDefinition;
@@ -45,7 +47,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.apache.commons.lang3.ArrayUtils;
/**
* Node parameter processor.
@@ -56,8 +57,7 @@ import org.apache.commons.lang3.ArrayUtils;
public class NodeParameterProcessor extends ParameterProcessor implements ParameterSubstitutionSuggester
{
/** Supported data types */
private QName[] supportedDataTypes =
{
private QName[] supportedDataTypes = {
DataTypeDefinition.TEXT,
DataTypeDefinition.BOOLEAN,
DataTypeDefinition.DATE,
@@ -86,7 +86,8 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
private List<QName> suggestionDefinitions = null;
/**
* @param nodeService node service
* @param nodeService
* node service
*/
public void setNodeService(NodeService nodeService)
{
@@ -94,7 +95,8 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
}
/**
* @param namespaceService namespace service
* @param namespaceService
* namespace service
*/
public void setNamespaceService(NamespaceService namespaceService)
{
@@ -102,7 +104,8 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
}
/**
* @param dictionaryService dictionary service
* @param dictionaryService
* dictionary service
*/
public void setDictionaryService(DictionaryService dictionaryService)
{
@@ -110,7 +113,8 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
}
/**
* @param recordsManagementAdminService Records management admin service
* @param recordsManagementAdminService
* Records management admin service
*/
public void setRecordsManagementAdminService(RecordsManagementAdminService recordsManagementAdminService)
{
@@ -168,17 +172,18 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
*/
public void setMaximumNumberSuggestions(int maximumNumberSuggestions)
{
this.maximumNumberSuggestions = (maximumNumberSuggestions <= 0 ? DEFAULT_MAXIMUM_NUMBER_SUGGESTIONS: maximumNumberSuggestions);
this.maximumNumberSuggestions = (maximumNumberSuggestions <= 0 ? DEFAULT_MAXIMUM_NUMBER_SUGGESTIONS : maximumNumberSuggestions);
}
/**
* Add suggestion definition to the list used to get properties suggestions from.
*
* @param definition Type or aspect
* @param definition
* Type or aspect
*/
public void addSuggestionDefinition(QName definition)
{
if(this.suggestionDefinitions == null)
if (this.suggestionDefinitions == null)
{
this.suggestionDefinitions = Collections.synchronizedList(new ArrayList<>());
}
@@ -188,7 +193,8 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
/**
* Get a list of node substitution suggestions for the specified fragment.
*
* @param substitutionFragment The fragment to search for
* @param substitutionFragment
* The fragment to search for
* @returns A list of node substitution suggestions, for example 'node.cm:title'
*
* @see org.alfresco.repo.action.parameter.ParameterSubstitutionSuggester#getSubstitutionSuggestions(java.lang.String)
@@ -197,11 +203,11 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
public List<String> getSubstitutionSuggestions(String substitutionFragment)
{
Set<String> suggestionSet = Collections.synchronizedSet(new HashSet<>());
if(this.suggestionDefinitions != null)
if (this.suggestionDefinitions != null)
{
for(QName definition : this.suggestionDefinitions)
for (QName definition : this.suggestionDefinitions)
{
if(getSubstitutionSuggestions(definition, substitutionFragment.toLowerCase(), suggestionSet))
if (getSubstitutionSuggestions(definition, substitutionFragment.toLowerCase(), suggestionSet))
{
break;
}
@@ -216,23 +222,26 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
/**
* Get a list of node substitution suggestions for the given definition and specified fragment.
*
* @param definitionName Definition (aspect or type) to get properties of and the call this method for associated aspects
* @param substitutionFragment Substitution fragment to search for
* @param suggestions The current list of suggestions to which we will add newly found suggestions
* @param definitionName
* Definition (aspect or type) to get properties of and the call this method for associated aspects
* @param substitutionFragment
* Substitution fragment to search for
* @param suggestions
* The current list of suggestions to which we will add newly found suggestions
*/
private boolean getSubstitutionSuggestions(QName definitionName, String substitutionFragment, Set<String> suggestions)
{
boolean gotMaximumSuggestions = false;
ClassDefinition definition = this.dictionaryService.getAspect(definitionName);
if(definition == null)
if (definition == null)
{
definition = this.dictionaryService.getType(definitionName);
}
if(definition != null)
if (definition != null)
{
gotMaximumSuggestions = getSubstitutionSuggestionsForDefinition(definition, substitutionFragment, suggestions);
}
if(recordsManagementAdminService.isCustomisable(definitionName) && !gotMaximumSuggestions)
if (recordsManagementAdminService.isCustomisable(definitionName) && !gotMaximumSuggestions)
{
gotMaximumSuggestions = processPropertyDefinitions(recordsManagementAdminService.getCustomPropertyDefinitions(definitionName), substitutionFragment, suggestions);
}
@@ -240,22 +249,24 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
}
/**
* Get a list of node substitution suggestions for the given definition and specified fragment. Calls itself recursively for
* associated aspects.
* Get a list of node substitution suggestions for the given definition and specified fragment. Calls itself recursively for associated aspects.
*
* @param definition Definition (aspect or type) to get properties of and the call this method for associated aspects
* @param substitutionFragment Substitution fragment to search for
* @param suggestions The current list of suggestions to which we will add newly found suggestions
* @param definition
* Definition (aspect or type) to get properties of and the call this method for associated aspects
* @param substitutionFragment
* Substitution fragment to search for
* @param suggestions
* The current list of suggestions to which we will add newly found suggestions
*/
private boolean getSubstitutionSuggestionsForDefinition(ClassDefinition definition, String substitutionFragment, Set<String> suggestions)
{
boolean gotMaximumSuggestions = processPropertyDefinitions(definition.getProperties(), substitutionFragment, suggestions);
if(!gotMaximumSuggestions)
if (!gotMaximumSuggestions)
{
for(QName defaultAspect : definition.getDefaultAspectNames())
for (QName defaultAspect : definition.getDefaultAspectNames())
{
gotMaximumSuggestions = getSubstitutionSuggestions(defaultAspect, substitutionFragment, suggestions);
if(gotMaximumSuggestions)
if (gotMaximumSuggestions)
{
break;
}
@@ -267,9 +278,12 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
/**
* Process the supplied map of property definitions and add the ones that match the supplied fragment to the list of suggestions.
*
* @param definition Definition (aspect or type) to get properties of and the call this method for associated aspects
* @param substitutionFragment Substitution fragment to search for
* @param suggestions The current list of suggestions to which we will add newly found suggestions
* @param definition
* Definition (aspect or type) to get properties of and the call this method for associated aspects
* @param substitutionFragment
* Substitution fragment to search for
* @param suggestions
* The current list of suggestions to which we will add newly found suggestions
*/
private boolean processPropertyDefinitions(Map<QName, PropertyDefinition> properties, String substitutionFragment, Set<String> suggestions)
{
@@ -280,12 +294,12 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
{
PropertyDefinition propertyDefinition = entry.getValue();
QName type = propertyDefinition.getDataType().getName();
if(ArrayUtils.contains(supportedDataTypes, type))
if (ArrayUtils.contains(supportedDataTypes, type))
{
String suggestion = getName() + "." + entry.getKey().getPrefixString();
if(suggestion.toLowerCase().contains(substitutionFragment))
if (suggestion.toLowerCase().contains(substitutionFragment))
{
if(suggestions.size() < this.maximumNumberSuggestions)
if (suggestions.size() < this.maximumNumberSuggestions)
{
suggestions.add(suggestion);
}

View File

@@ -34,8 +34,7 @@ import org.alfresco.util.ParameterCheck;
/**
* Record metadata bootstrap bean.
* <p>
* This method of bootstrapping record metadata aspects into the RecordService deprecates the
* previous practice of extending rma:recordMetaData.
* This method of bootstrapping record metadata aspects into the RecordService deprecates the previous practice of extending rma:recordMetaData.
*
* @author Mark Hibbins
* @since 2.2
@@ -52,7 +51,8 @@ public class NodeParameterSuggesterBootstrap
private NodeParameterProcessor nodeParameterProcessor;
/**
* @param nodeParameterProcessorAspectsNames map of record metadata aspects against file plan types
* @param nodeParameterProcessorAspectsNames
* map of record metadata aspects against file plan types
*/
public void setNodeParameterProcessorAspects(String nodeParameterProcessorAspectsNames)
{
@@ -60,7 +60,8 @@ public class NodeParameterSuggesterBootstrap
}
/**
* @param namespaceService namespace service
* @param namespaceService
* namespace service
*/
public void setNamespaceService(NamespaceService namespaceService)
{
@@ -68,7 +69,8 @@ public class NodeParameterSuggesterBootstrap
}
/**
* @param nodeParameterProcessor Node parameter processor
* @param nodeParameterProcessor
* Node parameter processor
*/
public void setNodeParameterProcessor(NodeParameterProcessor nodeParameterProcessor)
{
@@ -87,7 +89,7 @@ public class NodeParameterSuggesterBootstrap
String[] aspectsNames = this.nodeParameterProcessorAspectsNames.split(",");
for (String name : aspectsNames)
{
if((name != null) && !"".equals(name.trim()))
if ((name != null) && !"".equals(name.trim()))
{
// convert to qname and save it
QName aspect = QName.createQName(name.trim(), namespaceService);

View File

@@ -52,7 +52,8 @@ public abstract class ParameterProcessor
}
/**
* @param name parameter processor name
* @param name
* parameter processor name
*/
public void setName(String name)
{
@@ -60,7 +61,8 @@ public abstract class ParameterProcessor
}
/**
* @param parameterProcessorComponent parameter processor component
* @param parameterProcessorComponent
* parameter processor component
*/
public void setParameterProcessorComponent(ParameterProcessorComponent parameterProcessorComponent)
{
@@ -78,8 +80,10 @@ public abstract class ParameterProcessor
/**
* Process the parameter value.
*
* @param value substitution value
* @param actionedUponNodeRef actioned upon node reference
* @param value
* substitution value
* @param actionedUponNodeRef
* actioned upon node reference
* @return String processed string, original string if subs string invalid
*/
public abstract String process(String value, NodeRef actionedUponNodeRef);
@@ -87,7 +91,8 @@ public abstract class ParameterProcessor
/**
* Strips the name of the processor from the subs value.
*
* @param value subs value
* @param value
* subs value
* @return String subs value with the name and '.' delimiter removed
*/
protected String stripName(String value)

View File

@@ -64,9 +64,9 @@ public class ParameterProcessorComponent implements ParameterSubstitutionSuggest
public void register(ParameterProcessor processor)
{
this.processors.put(processor.getName(), processor);
if(processor instanceof ParameterSubstitutionSuggester)
if (processor instanceof ParameterSubstitutionSuggester)
{
this.subtitutionSuggesterProcessors.add((ParameterSubstitutionSuggester)processor);
this.subtitutionSuggesterProcessors.add((ParameterSubstitutionSuggester) processor);
}
}
@@ -87,7 +87,7 @@ public class ParameterProcessorComponent implements ParameterSubstitutionSuggest
if (parameterValue instanceof String)
{
// set the updated parameter value
ruleItem.setParameterValue(parameterName, process((String)parameterValue, actionedUponNodeRef));
ruleItem.setParameterValue(parameterName, process((String) parameterValue, actionedUponNodeRef));
}
}
}
@@ -95,8 +95,10 @@ public class ParameterProcessorComponent implements ParameterSubstitutionSuggest
/**
* Process the value for substitution within the context of the provided node.
*
* @param value value
* @param nodeRef node reference
* @param value
* value
* @param nodeRef
* node reference
* @return String resulting value
*/
public String process(String value, NodeRef nodeRef)
@@ -137,7 +139,8 @@ public class ParameterProcessorComponent implements ParameterSubstitutionSuggest
/**
* Return a list of substitution suggestions for the passed string fragment.
*
* @param substitutionFragment Text fragment to search on.
* @param substitutionFragment
* Text fragment to search on.
* @return A list of substitutions that match the substitution fragment.
*/
public List<String> getSubstitutionSuggestions(final String substitutionFragment)

View File

@@ -27,8 +27,8 @@
package org.alfresco.repo.imap;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.module.org_alfresco_module_rm.util.AuthenticationUtil;
import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.site.SiteModel;
import org.alfresco.service.cmr.dictionary.DictionaryService;
@@ -75,13 +75,13 @@ public class ExtendedImapServiceImpl extends ImapServiceImpl
/**
* Overwrites the core functionality so we can list RM files in IMAP
*
* @see https://issues.alfresco.com/jira/browse/RM-3216
*/
@Override
public String getPathFromSites(final NodeRef ref)
{
return doAsSystem(new RunAsWork<String>()
{
return doAsSystem(new RunAsWork<String>() {
@Override
public String doWork() throws Exception
{

View File

@@ -33,6 +33,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
@@ -45,7 +47,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.rule.Rule;
import org.alfresco.service.namespace.QName;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* Extended rule service implementation.
@@ -76,7 +77,8 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
protected RecordService recordService;
/**
* @param nodeService node service
* @param nodeService
* node service
*/
public void setNodeService2(NodeService nodeService)
{
@@ -84,7 +86,8 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
}
/**
* @param filePlanService file plan service
* @param filePlanService
* file plan service
*/
public void setFilePlanService(FilePlanService filePlanService)
{
@@ -92,7 +95,8 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
}
/**
* @param recordService record service
* @param recordService
* record service
*/
public void setRecordService(RecordService recordService)
{
@@ -100,7 +104,8 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
}
/**
* @param runAsAdmin true if run rules as admin, false otherwise
* @param runAsAdmin
* true if run rules as admin, false otherwise
*/
public void setRunAsAdmin(boolean runAsAdmin)
{
@@ -143,12 +148,14 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
}
}
}
} catch (PatternSyntaxException ex)
}
catch (PatternSyntaxException ex)
{
throw new IntegrityException (I18NUtil.getMessage(MSG_RETENTION_PERIOD_NOT_VALID), null);
} catch (ClassCastException ex1)
throw new IntegrityException(I18NUtil.getMessage(MSG_RETENTION_PERIOD_NOT_VALID), null);
}
catch (ClassCastException ex1)
{
//do nothing, not a composite action for validation
// do nothing, not a composite action for validation
}
}
@@ -161,8 +168,7 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
validateWormLockRuleAction(rule);
if (filePlanService.isFilePlanComponent(nodeRef))
{
return AuthenticationUtil.runAsSystem(new RunAsWork<Rule>()
{
return AuthenticationUtil.runAsSystem(new RunAsWork<Rule>() {
@Override
public Rule doWork()
{
@@ -185,8 +191,7 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
{
if (filePlanService.isFilePlanComponent(nodeRef))
{
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
{
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() {
@Override
public Void doWork()
{
@@ -221,8 +226,7 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
{
if (runAsAdmin)
{
AuthenticationUtil.runAs(new RunAsWork<Void>()
{
AuthenticationUtil.runAs(new RunAsWork<Void>() {
@Override
public Void doWork()
{
@@ -249,7 +253,8 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
/**
* Indicates whether the rule is a file plan component
*
* @param rule rule
* @param rule
* rule
* @return boolean true if rule is set on a file plan component, false otherwise
*/
private boolean isFilePlanComponentRule(Rule rule)
@@ -259,7 +264,8 @@ public class ExtendedRuleServiceImpl extends RuleServiceImpl
}
/**
* @param typeQName type qname
* @param typeQName
* type qname
* @return boolean true if ignore type, false otherwise
*/
private boolean isIgnoredType(QName typeQName)

View File

@@ -29,6 +29,9 @@ package org.alfresco.repo.rule.ruletrigger;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.alfresco.repo.node.NodeServicePolicies;
import org.alfresco.repo.policy.Behaviour.NotificationFrequency;
import org.alfresco.repo.policy.JavaBehaviour;
@@ -37,8 +40,6 @@ import org.alfresco.service.cmr.repository.ChildAssociationRef;
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;
/**
* Prevent multiple triggering of outbound rules when moving records.

View File

@@ -44,7 +44,8 @@ public interface ExtendedPermissionService extends PermissionService
/**
* Get a set of all the authorities that have write access.
*
* @param aclId acl id
* @param aclId
* acl id
* @return {@link Set}&lt;{@link String}&gt; set of authorities with write access
*/
Set<String> getWriters(Long aclId);
@@ -54,10 +55,9 @@ public interface ExtendedPermissionService extends PermissionService
* <p>
* The writers list includes the owner for the node.
*
* @param nodeRef node reference
* @return Pair&lt;Set&lt;String&gt;, Set&lt;String&gt;&gt; first is a set containing all the authorities that have read permission on the
* document and second is a set containing all the authorities that have write
* permission on the document, including the owner.
* @param nodeRef
* node reference
* @return Pair&lt;Set&lt;String&gt;, Set&lt;String&gt;&gt; first is a set containing all the authorities that have read permission on the document and second is a set containing all the authorities that have write permission on the document, including the owner.
*
* @since 2.5
*/

View File

@@ -36,6 +36,9 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.ApplicationEvent;
import org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService;
import org.alfresco.module.org_alfresco_module_rm.audit.event.AuditEvent;
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
@@ -57,9 +60,6 @@ import org.alfresco.service.cmr.security.OwnableService;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.util.Pair;
import org.alfresco.util.PropertyCheck;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.ApplicationEvent;
/**
* Extends the core permission service implementation allowing the consideration of the read records permission.
@@ -81,8 +81,7 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
/**
* Configured Permission mapping.
* <p>
* This string comes from alfresco-global.properties and allows fine tuning of the how permissions are mapped.
* This was added as a fix for MNT-16852 to enhance compatibility with our Outlook Integration.
* This string comes from alfresco-global.properties and allows fine tuning of the how permissions are mapped. This was added as a fix for MNT-16852 to enhance compatibility with our Outlook Integration.
*/
protected List<String> configuredReadPermissions;
/**
@@ -106,8 +105,7 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
public void init()
{
super.init();
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
{
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() {
@Override
public Void doWork() throws Exception
{
@@ -131,7 +129,8 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
/**
* Sets the file plan service
*
* @param filePlanService the filePlanService to set
* @param filePlanService
* the filePlanService to set
*/
public void setFilePlanService(FilePlanService filePlanService)
{
@@ -141,7 +140,8 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
/**
* Sets the permission processor registry
*
* @param permissionProcessorRegistry the permissions processor registry
* @param permissionProcessorRegistry
* the permissions processor registry
*/
public void setPermissionProcessorRegistry(PermissionProcessorRegistry permissionProcessorRegistry)
{
@@ -151,7 +151,8 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
/**
* Set the RM audit service.
*
* @param recordsManagementAuditService The RM audit service.
* @param recordsManagementAuditService
* The RM audit service.
*/
public void setRecordsManagementAuditService(RecordsManagementAuditService recordsManagementAuditService)
{
@@ -172,7 +173,8 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
}
/**
* @param writersCache the writersCache to set
* @param writersCache
* the writersCache to set
*/
public void setWritersCache(SimpleCache<Serializable, Set<String>> writersCache)
{
@@ -180,10 +182,10 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
}
/**
* Maps the string from the properties file (rm.haspermissionmap.read)
* to the list used in the hasPermission method
* Maps the string from the properties file (rm.haspermissionmap.read) to the list used in the hasPermission method
*
* @param readMapping the mapping of permissions to ReadRecord
* @param readMapping
* the mapping of permissions to ReadRecord
*/
public void setConfiguredReadPermissions(String readMapping)
{
@@ -191,10 +193,10 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
}
/**
* Maps the string set in the properties file (rm.haspermissionmap.write)
* to the list used in the hasPermission method
* Maps the string set in the properties file (rm.haspermissionmap.write) to the list used in the hasPermission method
*
* @param fileMapping the mapping of permissions to FileRecord
* @param fileMapping
* the mapping of permissions to FileRecord
*/
public void setConfiguredFilePermissions(String fileMapping)
{
@@ -212,11 +214,9 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
}
/**
* Override to deal with the possibility of hard coded permission checks in core code. Note: Eventually we need to
* merge the RM permission model into the core to make this more robust.
* Override to deal with the possibility of hard coded permission checks in core code. Note: Eventually we need to merge the RM permission model into the core to make this more robust.
*
* @see org.alfresco.repo.security.permissions.impl.ExtendedPermissionService#hasPermission(org.alfresco.service.cmr.repository.NodeRef,
* java.lang.String)
* @see org.alfresco.repo.security.permissions.impl.ExtendedPermissionService#hasPermission(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Override
public AccessStatus hasPermission(NodeRef nodeRef, String perm)
@@ -232,7 +232,10 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
result = preProcessor.process(nodeRef, perm);
// veto if denied
if (AccessStatus.DENIED.equals(result)) { return result; }
if (AccessStatus.DENIED.equals(result))
{
return result;
}
}
// evaluate permission
@@ -254,8 +257,10 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
* <p>
* Separation also convenient for unit testing.
*
* @param nodeRef node reference
* @param perm permission
* @param nodeRef
* node reference
* @param perm
* permission
* @return {@link AccessStatus} access status result
*/
protected AccessStatus hasPermissionImpl(NodeRef nodeRef, String perm)
@@ -280,7 +285,10 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
for (String auth : aclReadersDenied)
{
if (authorities.contains(auth)) { return AccessStatus.DENIED; }
if (authorities.contains(auth))
{
return AccessStatus.DENIED;
}
}
}
@@ -290,7 +298,10 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
for (String auth : aclReaders)
{
if (authorities.contains(auth)) { return AccessStatus.ALLOWED; }
if (authorities.contains(auth))
{
return AccessStatus.ALLOWED;
}
}
return AccessStatus.DENIED;
@@ -303,10 +314,16 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
public Set<String> getReaders(Long aclId)
{
AccessControlList acl = aclDaoComponent.getAccessControlList(aclId);
if (acl == null) { return Collections.emptySet(); }
if (acl == null)
{
return Collections.emptySet();
}
Set<String> aclReaders = readersCache.get((Serializable) acl.getProperties());
if (aclReaders != null) { return aclReaders; }
if (aclReaders != null)
{
return aclReaders;
}
HashSet<String> assigned = new HashSet<>();
HashSet<String> readers = new HashSet<>();
@@ -343,9 +360,15 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
{
AccessControlList acl = aclDaoComponent.getAccessControlList(aclId);
if (acl == null) { return Collections.emptySet(); }
if (acl == null)
{
return Collections.emptySet();
}
Set<String> denied = readersDeniedCache.get(aclId);
if (denied != null) { return denied; }
if (denied != null)
{
return denied;
}
denied = new HashSet<>();
Set<String> assigned = new HashSet<>();
@@ -378,10 +401,16 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
public Set<String> getWriters(Long aclId)
{
AccessControlList acl = aclDaoComponent.getAccessControlList(aclId);
if (acl == null) { return Collections.emptySet(); }
if (acl == null)
{
return Collections.emptySet();
}
Set<String> aclWriters = writersCache.get((Serializable) acl.getProperties());
if (aclWriters != null) { return aclWriters; }
if (aclWriters != null)
{
return aclWriters;
}
HashSet<String> assigned = new HashSet<>();
HashSet<String> readers = new HashSet<>();
@@ -406,8 +435,7 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
}
/**
* @see org.alfresco.repo.security.permissions.impl.PermissionServiceImpl#setInheritParentPermissions(org.alfresco.service.cmr.repository.NodeRef,
* boolean)
* @see org.alfresco.repo.security.permissions.impl.PermissionServiceImpl#setInheritParentPermissions(org.alfresco.service.cmr.repository.NodeRef, boolean)
*/
@Override
public void setInheritParentPermissions(final NodeRef nodeRef, boolean inheritParentPermissions)
@@ -429,7 +457,8 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme
/**
* Helper method to the RM admin role scoped by the correct file plan.
*
* @param nodeRef node reference
* @param nodeRef
* node reference
* @return String RM admin role
*/
private String getAdminRole(NodeRef nodeRef)

View File

@@ -32,8 +32,7 @@ import java.lang.reflect.Method;
import org.alfresco.service.cmr.security.OwnableService;
/**
* This is a workaround to make RM 2.1 backwards compatible with the Community version 4.2.d.
* This class will be removed after Community 4.2.e has been released.
* This is a workaround to make RM 2.1 backwards compatible with the Community version 4.2.d. This class will be removed after Community 4.2.e has been released.
*
* @author Tuna Aksoy
* @since 2.1

View File

@@ -32,8 +32,6 @@ import java.util.List;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.AccessStatus;
/**
* Permission Post Processor.
*
@@ -45,9 +43,12 @@ public interface PermissionPostProcessor
/**
* Process permission.
*
* @param accessStatus current access status
* @param nodeRef node reference
* @param perm permission
* @param accessStatus
* current access status
* @param nodeRef
* node reference
* @param perm
* permission
*
* @return {@link AccessStatus}
*/

View File

@@ -30,7 +30,6 @@ package org.alfresco.repo.security.permissions.processor;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.security.AccessStatus;
/**
* Permission Veto Interface
*
@@ -42,8 +41,10 @@ public interface PermissionPreProcessor
/**
* Process permission.
*
* @param nodeRef node reference
* @param perm permission
* @param nodeRef
* node reference
* @param perm
* permission
* @return {@link AccessStatus}
*/
AccessStatus process(NodeRef nodeRef, String perm);

Some files were not shown because too many files have changed in this diff Show More