Compare commits

..

228 Commits

Author SHA1 Message Date
alfresco-build
d978b1cd68 [maven-release-plugin][skip ci] prepare release 23.3.0.13 2024-03-27 14:27:35 +00:00
Piotr Żurek
dce356fe74 MNT-23210 Fix audit min-max query (#2545) 2024-03-27 14:49:35 +01:00
alfresco-build
f965165894 [maven-release-plugin][skip ci] prepare for next development iteration 2024-03-24 00:06:39 +00:00
alfresco-build
2ac44c24a8 [maven-release-plugin][skip ci] prepare release 23.3.0.12 2024-03-24 00:06:37 +00:00
Alfresco CI User
a0dc5a0d70 [force] Force release for 2024-03-24. 2024-03-24 00:04:10 +00:00
alfresco-build
af94063bbb [maven-release-plugin][skip ci] prepare for next development iteration 2024-03-18 16:00:10 +00:00
alfresco-build
87b91b6cae [maven-release-plugin][skip ci] prepare release 23.3.0.11 2024-03-18 16:00:08 +00:00
mohit-singh4
6bdcaa9b10 [APPS-2576] fix for Security Web Vulnerability (#2516) 2024-03-18 20:54:04 +05:30
Maciej Pichura
86070d881c ACS-6884: Bump api-explorer version to 23.2.0 (GA) (#2480)
* ACS-6884: Bump api-explorer version to 23.2.0 (GA)

* Bump org.springframework.security:spring-security-bom (#2453)

Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 6.1.4 to 6.2.2.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/6.1.4...6.2.2)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-bom
  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>

* ACS-6931 Temporarily turn off SAST Scan (#2489)

ACS-6931 Temporarily turn off SAST Scan

* [maven-release-plugin][skip ci] prepare release 23.3.0.7

* [maven-release-plugin][skip ci] prepare for next development iteration

* [force] Force release for 2024-03-10.

* [maven-release-plugin][skip ci] prepare release 23.3.0.8

* [maven-release-plugin][skip ci] prepare for next development iteration

* MNT-24250: bump xalan version (#2497)

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* bump xalan

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: alfresco.3

* MNT-24250: alfresco.3

* MNT-24250: alfresco.3

* MNT-24250: alfresco.3

* MNT-24250: alfresco.3

* MNT-24250: 2.7.3 official

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco

* MNT-24250: 2.7.3-alfresco

* MNT-24250: 2.7.3-alfresco

* MNT-24250: 2.7.3-alfresco

* [maven-release-plugin][skip ci] prepare release 23.3.0.9

* [maven-release-plugin][skip ci] prepare for next development iteration

* [force] Force release for 2024-03-17.

* [maven-release-plugin][skip ci] prepare release 23.3.0.10

* [maven-release-plugin][skip ci] prepare for next development iteration

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mikolajbrzezinski <86791239+mikolajbrzezinski@users.noreply.github.com>
Co-authored-by: alfresco-build <8039454+alfresco-build@users.noreply.github.com>
Co-authored-by: Alfresco CI User <build@alfresco.com>
Co-authored-by: Paweł Rainer <62990104+Pawel-608@users.noreply.github.com>
2024-03-18 11:54:56 +01:00
alfresco-build
a82199967c [maven-release-plugin][skip ci] prepare for next development iteration 2024-03-17 00:06:51 +00:00
alfresco-build
f09266c081 [maven-release-plugin][skip ci] prepare release 23.3.0.10 2024-03-17 00:06:49 +00:00
Alfresco CI User
563f65825f [force] Force release for 2024-03-17. 2024-03-17 00:04:08 +00:00
alfresco-build
8bedeedfd5 [maven-release-plugin][skip ci] prepare for next development iteration 2024-03-14 10:11:22 +00:00
alfresco-build
a73cf6a71d [maven-release-plugin][skip ci] prepare release 23.3.0.9 2024-03-14 10:11:19 +00:00
Paweł Rainer
1bdd6c022c MNT-24250: bump xalan version (#2497)
* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* bump xalan

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: bump xalan version

* MNT-24250: alfresco.3

* MNT-24250: alfresco.3

* MNT-24250: alfresco.3

* MNT-24250: alfresco.3

* MNT-24250: alfresco.3

* MNT-24250: 2.7.3 official

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco.3

* MNT-24250: 2.7.3-alfresco

* MNT-24250: 2.7.3-alfresco

* MNT-24250: 2.7.3-alfresco

* MNT-24250: 2.7.3-alfresco
2024-03-14 10:34:09 +01:00
alfresco-build
1b553dbcaf [maven-release-plugin][skip ci] prepare for next development iteration 2024-03-10 00:06:19 +00:00
alfresco-build
5a3b4e1a0d [maven-release-plugin][skip ci] prepare release 23.3.0.8 2024-03-10 00:06:17 +00:00
Alfresco CI User
1a0156b1e5 [force] Force release for 2024-03-10. 2024-03-10 00:03:35 +00:00
alfresco-build
6ac9248262 [maven-release-plugin][skip ci] prepare for next development iteration 2024-03-06 12:46:46 +00:00
alfresco-build
70290c8f23 [maven-release-plugin][skip ci] prepare release 23.3.0.7 2024-03-06 12:46:43 +00:00
mikolajbrzezinski
7d135b9356 ACS-6931 Temporarily turn off SAST Scan (#2489)
ACS-6931 Temporarily turn off SAST Scan
2024-03-06 13:11:31 +01:00
dependabot[bot]
df4629b801 Bump org.springframework.security:spring-security-bom (#2453)
Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 6.1.4 to 6.2.2.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/6.1.4...6.2.2)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-bom
  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>
2024-03-05 12:02:56 +01:00
alfresco-build
df6f656b95 [maven-release-plugin][skip ci] prepare for next development iteration 2024-03-03 00:05:44 +00:00
alfresco-build
f27718c43b [maven-release-plugin][skip ci] prepare release 23.3.0.6 2024-03-03 00:05:42 +00:00
Alfresco CI User
cbf0aaaaa4 [force] Force release for 2024-03-03. 2024-03-03 00:03:20 +00:00
alfresco-build
2da78a94ad [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-26 08:21:03 +00:00
alfresco-build
3325e08d57 [maven-release-plugin][skip ci] prepare release 23.3.0.5 2024-02-26 08:21:01 +00:00
rrajoria
985205e78e Update google drive and aos GA Version 2024-02-26 13:16:08 +05:30
alfresco-build
5fd5e75bd2 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-25 00:06:12 +00:00
alfresco-build
279bc15aac [maven-release-plugin][skip ci] prepare release 23.3.0.4 2024-02-25 00:06:10 +00:00
Alfresco CI User
a3283b4521 [force] Force release for 2024-02-25. 2024-02-25 00:03:36 +00:00
alfresco-build
e09c9118b2 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-23 07:45:42 +00:00
alfresco-build
330256438b [maven-release-plugin][skip ci] prepare release 23.3.0.3 2024-02-23 07:45:40 +00:00
Kacper Magdziarz
2214f16e6e [ACS-6773] Propagate ATS-4.1.0 (#2469) 2024-02-23 08:10:12 +01:00
alfresco-build
2237a45e76 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-21 11:20:16 +00:00
alfresco-build
f71a003904 [maven-release-plugin][skip ci] prepare release 23.3.0.2 2024-02-21 11:20:13 +00:00
dependabot[bot]
10d55824f8 Bump org.apache.commons:commons-compress from 1.25.0 to 1.26.0 (#2454)
Bumps org.apache.commons:commons-compress from 1.25.0 to 1.26.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  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>
2024-02-21 11:36:18 +01:00
alfresco-build
69f8bda762 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-20 13:01:23 +00:00
alfresco-build
d8de1ba353 [maven-release-plugin][skip ci] prepare release 23.3.0.1 2024-02-20 13:01:21 +00:00
Damian Ujma
d4d8718f16 ACS-6601 Bump AOS to 3.0.0-A1 (#2459) 2024-02-20 13:17:35 +01:00
Krystian Dabrowski
859492ae1e ACS-6113: Fix secondary parents to never be set to null (#2460) 2024-02-20 12:47:28 +01:00
mpichura
6c08a60ce5 Updating master branch to 23.3.0 after 23.2.0 ACS release [skip ci] 2024-02-19 16:34:39 +01:00
alfresco-build
9cdc916189 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-19 06:44:58 +00:00
alfresco-build
8272347b71 [maven-release-plugin][skip ci] prepare release 23.2.0.51 2024-02-19 06:44:54 +00:00
rrajoria
cde7f0bba1 Update GoogleDrive Version 4.1.0-A1 2024-02-19 11:36:56 +05:30
alfresco-build
959678eb70 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-18 00:06:37 +00:00
alfresco-build
cf7bb499dc [maven-release-plugin][skip ci] prepare release 23.2.0.50 2024-02-18 00:06:34 +00:00
Alfresco CI User
a915a4246c [force] Force release for 2024-02-18. 2024-02-18 00:03:31 +00:00
Tom Page
89b5fa9e90 Merge pull request #2441 from AFaust/bugfix/nodesmetadata-childassoc-param-handling
Map includeChildAssociations request parameter
2024-02-15 10:37:45 +00:00
alfresco-build
03744ff5d5 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-15 08:53:33 +00:00
alfresco-build
965add646c [maven-release-plugin][skip ci] prepare release 23.2.0.49 2024-02-15 08:53:31 +00:00
Kacper Magdziarz
1c93cc7ca4 [ACS-6772] Propagate ATS-4.1.0-A1 (#2451) 2024-02-15 09:17:17 +01:00
alfresco-build
0564b27ece [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-14 10:38:03 +00:00
alfresco-build
b98fdf4ca9 [maven-release-plugin][skip ci] prepare release 23.2.0.48 2024-02-14 10:38:00 +00:00
mstrankowski
1aff1eab1e Update json-path to 2.9.0 2024-02-14 10:54:27 +01:00
alfresco-build
c3b82354c1 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-13 19:06:29 +00:00
alfresco-build
04215f84a6 [maven-release-plugin][skip ci] prepare release 23.2.0.47 2024-02-13 19:06:26 +00:00
MichalKinas
e6e05c8890 Merge pull request #2446 from Alfresco/feature/mkinas-ACS-5506-exception-fix
[ACS-5506] Fix string to node ref cast exception
2024-02-13 19:29:26 +01:00
alfresco-build
af69c12be3 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-13 18:23:24 +00:00
alfresco-build
eaf07ef88e [maven-release-plugin][skip ci] prepare release 23.2.0.46 2024-02-13 18:23:21 +00:00
Damian Ujma
c4714b19eb ACS-6601 Implement Repository OIDC Compliance (#2447)
* ACS-6677 Enhance OIDC Configuration Flexibility (#2426)

* ACS-6603 Implement OIDC Compliance (#2442)

* ACS-6677 Enhance OIDC Configuration Flexibility

* ACS-6677 Revert changing http header

* ACS-6677 Add unit test to suite

* ACS-6677 Rename var

* ACS-6677 Fix PMD issues

* ACS-6677 Fix PMD issues

* ACS-6677 Improve code

* ACS-6677 Fix compatibility

* ACS-6677 Add JwtAudienceValidator

* ACS-6677 Change domain

* ACS-6603 Oidc compliance

* ACS-6603 Add Auth0 test

* ACS-6603 Reformat

* ACS-6603 Enable User Info Endpoint test + Refactor

* ACS-6603 Change test condition

* ACS-6603 Add state parameter + reformat stream

* ACS-6603 Use enum type
2024-02-13 18:43:44 +01:00
MichalKinas
e3407e5a53 ACS-5506 Move NodeRef check to decide method 2024-02-13 13:22:51 +01:00
MichalKinas
8d978d6527 ACS-5506 Fix string to node ref cast exception 2024-02-13 11:33:20 +01:00
alfresco-build
de6b062f3e [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-11 00:06:10 +00:00
alfresco-build
98231782f6 [maven-release-plugin][skip ci] prepare release 23.2.0.45 2024-02-11 00:06:07 +00:00
Alfresco CI User
b4146744d2 [force] Force release for 2024-02-11. 2024-02-11 00:03:35 +00:00
alfresco-build
f9f3248229 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-08 13:10:27 +00:00
alfresco-build
9297fa5cf4 [maven-release-plugin][skip ci] prepare release 23.2.0.44 2024-02-08 13:10:25 +00:00
MichalKinas
3d1cc0924d Merge pull request #2035 from Alfresco/feature/ACS-5506-be-handling-a-description-of-the-group-and-flag-for-subgroups
ACS-5506 Add description and hasSubgroups to groups API
2024-02-08 13:35:24 +01:00
AFaust
3b574c56dc Map includeChildAssociations request parameter 2024-02-08 13:26:38 +01:00
MichalKinas
f737c3ef3c ACS-5506 Test fix 2024-02-08 11:39:17 +01:00
MichalKinas
5e85b8149b ACS-5506 Cleanup and test fixes 2024-02-08 11:12:30 +01:00
MichalKinas
11030f52fa ACS-5506 Add temporary logging 2024-02-06 21:15:14 +01:00
MichalKinas
c537166f68 ACS-5506 Add temporary logging 2024-02-06 20:36:42 +01:00
alfresco-build
448d2c9c2f [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-06 12:32:33 +00:00
alfresco-build
dd5703a51a [maven-release-plugin][skip ci] prepare release 23.2.0.43 2024-02-06 12:32:31 +00:00
MichalKinas
cfc0916c84 ACS-5506 Unit tests fixes 2024-02-06 13:04:31 +01:00
tiagosalvado10
71b69529c6 [MNT-24072] Retain users/groups (who are already exist and are part of AUTH.ALF zone) so parent associations can be created (#2414)
* [MNT-24072] Retain existent users and groups so parent associations can be created

* [MNT-24072] Using person/authority 'exists' methods instead

* [MNT-24072] Added code to rezone users/groups (who already exist and are part of AUTH.ALF zone) that have parent associations to create

* [MNT-24072] PMD scan changes

* [MNT-24072] Added a validation to prevent an authority from being added to zones where already is
2024-02-06 11:58:23 +00:00
MichalKinas
9ffe27f028 ACS-5506 Update properties correctly 2024-02-06 11:39:45 +01:00
alfresco-build
47a636997c [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-06 09:46:23 +00:00
alfresco-build
c97df2dbaa [maven-release-plugin][skip ci] prepare release 23.2.0.42 2024-02-06 09:46:21 +00:00
Manish Kumar
2734dcb107 Merge pull request #2429 from Alfresco/fix/ACS-6444-clientInjection
updated swagger-ui version to 4.1.3
2024-02-06 14:41:31 +05:30
MichalKinas
197acb3a7b ACS-5506 Add allowed methods 2024-02-05 12:55:37 +01:00
Manish Kumar
91019185d8 updated swagger-ui version to 4.1.3 2024-02-05 14:58:04 +05:30
alfresco-build
fb0c64b664 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-04 00:06:20 +00:00
alfresco-build
5f568179bd [maven-release-plugin][skip ci] prepare release 23.2.0.41 2024-02-04 00:06:18 +00:00
Alfresco CI User
0396bbebbc [force] Force release for 2024-02-04. 2024-02-04 00:03:36 +00:00
MichalKinas
12d1ecdefa ACS-5506 CR fixes applied 2024-02-02 18:22:14 +01:00
alfresco-build
ebdc62a421 [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-02 13:51:52 +00:00
alfresco-build
aea34e8149 [maven-release-plugin][skip ci] prepare release 23.2.0.40 2024-02-02 13:51:50 +00:00
Tom Page
6a5f378ce1 ACS-6113 Upgrade acs-events-model. 2024-02-02 13:15:15 +00:00
alfresco-build
e1de1c627d [maven-release-plugin][skip ci] prepare for next development iteration 2024-02-01 10:01:02 +00:00
alfresco-build
0209c8fc84 [maven-release-plugin][skip ci] prepare release 23.2.0.39 2024-02-01 10:01:00 +00:00
Domenico Sibilio
bb0c3ea207 ACS-6653 Bump Tika, POI, bouncycastle, commons-compress, xmlbeans (#2422)
* ACS-6653 Bump Tika, POI, commons-compress

* ACS-6653 Bump bouncycastle to jdk18on 1.77

* ACS-6653 Bump xmlbeans to 5.2.0
2024-02-01 10:23:08 +01:00
MichalKinas
605c3a6ccd ACS-5506 Add missing annotations, hasSubgroups not required 2024-01-31 00:51:45 +01:00
MichalKinas
d3c7342f05 ACS-5506 Description handling rework 2024-01-31 00:08:26 +01:00
alfresco-build
0eb7abb95b [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-30 16:07:40 +00:00
alfresco-build
a7925d54a6 [maven-release-plugin][skip ci] prepare release 23.2.0.38 2024-01-30 16:07:37 +00:00
Eva Vasques
dbd7ce1f48 MNT-24094 - error message logged in the logs when a webscript fails is not helpful as it should indicate what webscript triggers the error (#2421)
* Add WebScriptRequest to the methods that call the render exception so we can log more info on the request when an error occurs.
* Add request uri, user ans status code to the logging
* Always log on exception but only show stack trace on debug or on internal server exception
2024-01-30 15:32:41 +00:00
MichalKinas
ecfeb77fb0 ACS-5506 Add PMD fixes 2024-01-30 15:26:39 +01:00
MichalKinas
1f72faa90c ACS-5506 Add proper exception handling 2024-01-30 15:26:39 +01:00
MichalKinas
925a4f4a6a ACS-5506 Add properties to authority service 2024-01-30 15:26:39 +01:00
MichalKinas
4f4f7cc02f ACS-5506 Tests cleanup 2024-01-30 15:26:39 +01:00
MichalKinas
ef9d724ee9 ACS-5506 PMD fixes 2024-01-30 15:26:39 +01:00
MichalKinas
71cbb9e1ef ACS-5506 Tests cleanup 2024-01-30 15:26:39 +01:00
MichalKinas
effb697261 ACS-5506 Tests fixes 2024-01-30 15:26:39 +01:00
MichalKinas
0b753c23c2 ACS-5506 Tests cleanup 2024-01-30 15:26:39 +01:00
MichalKinas
05f0df1b2f ACS-5506 Proper Group serialization 2024-01-30 15:26:39 +01:00
MichalKinas
7a8cf67c2e ACS-5506 Test fixes 2024-01-30 15:26:39 +01:00
MichalKinas
da7f1877fd ACS-5506 Fix saving properties 2024-01-30 15:26:39 +01:00
MichalKinas
9a11075f41 ACS-5506 Proper description storage 2024-01-30 15:26:39 +01:00
MichalKinas
4d22931dfe ACS-5506 Correct Nodes bean 2024-01-30 15:26:39 +01:00
MichalKinas
d9fe82a2d2 ACS-5506 Add description and hasSubgroups to groups API 2024-01-30 15:26:39 +01:00
alfresco-build
60e42b4090 [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-28 00:06:18 +00:00
alfresco-build
824886ecdd [maven-release-plugin][skip ci] prepare release 23.2.0.37 2024-01-28 00:06:16 +00:00
Alfresco CI User
e2f0ebb015 [force] Force release for 2024-01-28. 2024-01-28 00:03:40 +00:00
alfresco-build
6872c3d683 [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-25 11:43:58 +00:00
alfresco-build
4d8a9e35b7 [maven-release-plugin][skip ci] prepare release 23.2.0.36 2024-01-25 11:43:56 +00:00
Domenico Sibilio
0cea265153 ACS-6650 Avoid running SAST scan on DependaBot PRs (#2418)
Skipping SAST scan on DependaBot PRs as it won't provide any additional insights and requires sharing more secrets with DependaBot than we're willing to.
2024-01-25 12:08:04 +01:00
alfresco-build
1ef7b5bea9 [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-23 12:14:57 +00:00
alfresco-build
0a9aac7332 [maven-release-plugin][skip ci] prepare release 23.2.0.35 2024-01-23 12:14:55 +00:00
mikolajbrzezinski
12e1506d01 ACS-6304 Add retry mechanism to completeRecordsCantBeUpdated test (#2405)
ACS-6304 Add retry mechanism to completeRecordsCantBeUpdated test
2024-01-23 12:39:21 +01:00
alfresco-build
2c5a745b50 [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-21 00:07:04 +00:00
alfresco-build
dd5f2a76ab [maven-release-plugin][skip ci] prepare release 23.2.0.34 2024-01-21 00:07:01 +00:00
Alfresco CI User
e7bd28180c [force] Force release for 2024-01-21. 2024-01-21 00:03:48 +00:00
alfresco-build
5bb8a621bf [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-18 10:19:34 +00:00
alfresco-build
28ed202c78 [maven-release-plugin][skip ci] prepare release 23.2.0.33 2024-01-18 10:19:31 +00:00
Eva Vasques
d62423f378 [MNT-24085] - Fixed ACL Updater job is updating the cm:modifier details (#2406)
* Disabled audibled and versionable behaviour on add and remove pending acl aspect and properties
* Added validations to the unit test to assert modification date is not changed
2024-01-18 09:36:30 +00:00
alfresco-build
fc7b2f9fbf [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-14 00:06:30 +00:00
alfresco-build
df93094d67 [maven-release-plugin][skip ci] prepare release 23.2.0.32 2024-01-14 00:06:27 +00:00
Alfresco CI User
e1db33ac7a [force] Force release for 2024-01-14. 2024-01-14 00:03:45 +00:00
alfresco-build
c319370d4e [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-07 00:06:52 +00:00
alfresco-build
5bfff49d5e [maven-release-plugin][skip ci] prepare release 23.2.0.31 2024-01-07 00:06:49 +00:00
Alfresco CI User
74d017c371 [force] Force release for 2024-01-07. 2024-01-07 00:03:57 +00:00
alfresco-build
c35de7aed3 [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-04 16:29:12 +00:00
alfresco-build
29d7f8d298 [maven-release-plugin][skip ci] prepare release 23.2.0.30 2024-01-04 16:29:10 +00:00
mstrankowski
20b0e3cf18 [skip tests] The difference of having/not having json-path library loaded here is only shown on the acs-packaging level, all the tests up to that point were green. I suspect that the issue stems from AIS amp 2024-01-04 17:25:21 +01:00
mstrankowski
fb6dcac85e Revert "Remove json-path dependency from repository module as it seems to only be used in test modules (#2397)"
This reverts commit 687b44b98a.
2024-01-04 17:22:18 +01:00
alfresco-build
98b9bf34ff [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-04 10:41:56 +00:00
alfresco-build
57da5fbdcd [maven-release-plugin][skip ci] prepare release 23.2.0.29 2024-01-04 10:41:53 +00:00
Marcin Strankowski
687b44b98a Remove json-path dependency from repository module as it seems to only be used in test modules (#2397) 2024-01-04 11:06:51 +01:00
alfresco-build
c83434a3f2 [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-03 17:26:01 +00:00
alfresco-build
6b030b489b [maven-release-plugin][skip ci] prepare release 23.2.0.28 2024-01-03 17:25:59 +00:00
Maciej Pichura
835aba686b ACS-6406: Bumping down version.schema to 19100 for ACS 23.2 (#2396) 2024-01-03 17:51:01 +01:00
alfresco-build
58f7699c05 [maven-release-plugin][skip ci] prepare for next development iteration 2024-01-02 17:22:36 +00:00
alfresco-build
de7ef52037 [maven-release-plugin][skip ci] prepare release 23.2.0.27 2024-01-02 17:22:34 +00:00
Suneet Gupta
eb5fd63839 [APPS-2544] updated license header for AGS (#2395) 2024-01-02 21:44:20 +05:30
alfresco-build
62399e7017 [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-31 00:06:27 +00:00
alfresco-build
383c6f0a1d [maven-release-plugin][skip ci] prepare release 23.2.0.26 2023-12-31 00:06:24 +00:00
Alfresco CI User
af1df82dd9 [force] Force release for 2023-12-31. 2023-12-31 00:03:49 +00:00
alfresco-build
028ff60748 [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-24 00:06:42 +00:00
alfresco-build
2b2fdba3b7 [maven-release-plugin][skip ci] prepare release 23.2.0.25 2023-12-24 00:06:39 +00:00
Alfresco CI User
f16a193b61 [force] Force release for 2023-12-24. 2023-12-24 00:03:24 +00:00
alfresco-build
873119f56e [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-21 11:06:01 +00:00
alfresco-build
2c41c0ead1 [maven-release-plugin][skip ci] prepare release 23.2.0.24 2023-12-21 11:05:59 +00:00
dependabot[bot]
c957f40a78 Bump org.springframework:spring-webmvc from 6.0.12 to 6.0.14 (#2346)
Bumps [org.springframework:spring-webmvc](https://github.com/spring-projects/spring-framework) from 6.0.12 to 6.0.14.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.12...v6.0.14)

---
updated-dependencies:
- dependency-name: org.springframework:spring-webmvc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-21 11:30:11 +01:00
alfresco-build
f8a8b5c8f3 [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-19 13:20:05 +00:00
alfresco-build
773d9ca9d9 [maven-release-plugin][skip ci] prepare release 23.2.0.23 2023-12-19 13:20:03 +00:00
Maciej Pichura
1af0b72257 ACS-6402: Add tests covering module compatibility check for new ACS versioning schema (#2379)
* ACS-6402: Add tests covering module compatibility check for new ACS versioning schema.

* ACS-6402: Ignoring false PMD issues.
2023-12-19 13:45:07 +01:00
alfresco-build
158fb067d0 [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-17 00:06:29 +00:00
alfresco-build
016c212c65 [maven-release-plugin][skip ci] prepare release 23.2.0.22 2023-12-17 00:06:26 +00:00
Alfresco CI User
c1bd8e71c4 [force] Force release for 2023-12-17. 2023-12-17 00:03:20 +00:00
alfresco-build
f68446b3e5 [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-14 11:06:04 +00:00
alfresco-build
9b26c66dec [maven-release-plugin][skip ci] prepare release 23.2.0.21 2023-12-14 11:06:01 +00:00
Damian Ujma
06c35ea379 MNT-23880 Integrate the Alfresco Admin Console with the IDS (#2362)
* MNT-23880 Integrate IDS with the Admin Console

* MNT-23880 Remove diamond expressions

* MNT-23880 Refactor

* MNT-23880 Move requesting authentication

* MNT-23880 Fix comment

* MNT-23880 Check if AdminConsoleAuthenticator is active

* MNT-23880 Fix DefaultAdminConsoleAuthenticator + PMD issues

* MNT-23880 Fix PMD issues

* MNT-23880 Refactor

* MNT-23880 Refactor RemoteUserAuthenticatorFactory
2023-12-14 11:30:53 +01:00
alfresco-build
5580609010 [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-13 12:23:44 +00:00
alfresco-build
e16a3759ad [maven-release-plugin][skip ci] prepare release 23.2.0.20 2023-12-13 12:23:41 +00:00
Domenico Sibilio
9cce8d54d8 ACS-5925 Switch from IDS 2.0.0 to Keycloak 21.1.2 (#2369) 2023-12-13 12:48:47 +01:00
alfresco-build
856bf011c5 [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-13 10:34:12 +00:00
alfresco-build
d46fc62cdb [maven-release-plugin][skip ci] prepare release 23.2.0.19 2023-12-13 10:34:09 +00:00
mikolajbrzezinski
eff41eef12 ACS-6304 Implement SAST Pipeline Scan (#2304)
ACS-6304 Implement SAST Pipeline Scan
2023-12-13 10:57:43 +01:00
alfresco-build
3d0185574d [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-10 00:06:22 +00:00
alfresco-build
5664b5de78 [maven-release-plugin][skip ci] prepare release 23.2.0.18 2023-12-10 00:06:19 +00:00
Alfresco CI User
82f44122bc [force] Force release for 2023-12-10. 2023-12-10 00:03:41 +00:00
alfresco-build
6c3740c2a6 [maven-release-plugin][skip ci] prepare for next development iteration 2023-12-03 00:06:05 +00:00
alfresco-build
ecdbf41291 [maven-release-plugin][skip ci] prepare release 23.2.0.17 2023-12-03 00:06:03 +00:00
Alfresco CI User
6abf01e083 [force] Force release for 2023-12-03. 2023-12-03 00:03:30 +00:00
alfresco-build
7671d3b7bc [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-30 12:27:33 +00:00
alfresco-build
a8a6b565a7 [maven-release-plugin][skip ci] prepare release 23.2.0.16 2023-11-30 12:27:30 +00:00
Damian Ujma
a660109b73 ACS-6303 Add seamless ACS JIT user provisioning (#2336)
* ACS-6303 Implement JIT User Provisioning

* ACS-6303 Fix AuthenticationsTest

* ACS-6303 Add IT test

* ACS-6303 Fix syntax

* ACS-6303 Revert local change

* ACS-6303 Update IDS version

* ACS-6303 Fix JITProvisioning IT test execution

* ACS-6303 Add new IT scenario

* ACS-6303 Remove AppContext05TestSuite-setup.sh + optimize calling UserInfoEndpoint

* ACS-6303 Fix PMD issues

* ACS-6303 Fix property name

* ACS-6303 Change getUserInfo return type

* Apply suggestions from code review

Co-authored-by: Domenico Sibilio <domenicosibilio@gmail.com>

* ACS-6303 Move var declaration + use lambda+diamond operator

* ACS-6303 Add a small optimisation

---------

Co-authored-by: Domenico Sibilio <domenicosibilio@gmail.com>
2023-11-30 12:50:24 +01:00
alfresco-build
11cc7fd2cb [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-26 00:06:04 +00:00
alfresco-build
fe356c6135 [maven-release-plugin][skip ci] prepare release 23.2.0.15 2023-11-26 00:06:01 +00:00
Alfresco CI User
8b75f4f961 [force] Force release for 2023-11-26. 2023-11-26 00:03:28 +00:00
alfresco-build
db9d6cc08c [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-20 15:54:34 +00:00
alfresco-build
975503bf88 [maven-release-plugin][skip ci] prepare release 23.2.0.14 2023-11-20 15:54:32 +00:00
Domenico Sibilio
9f4ec29f9c ACS-6329 Move generate-hazelcast-config.py to community-repo (#2328) 2023-11-20 16:20:08 +01:00
alfresco-build
5490228d71 [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-19 00:06:19 +00:00
alfresco-build
408800ba89 [maven-release-plugin][skip ci] prepare release 23.2.0.13 2023-11-19 00:06:16 +00:00
Alfresco CI User
773dd1d3e5 [force] Force release for 2023-11-19. 2023-11-19 00:03:26 +00:00
Kacper Magdziarz
0d8b6ef853 [ACS-6234] Fix: GetProcessesCoreTests::getProcessesOrderedByIdDESC test keeps failing (#2325) 2023-11-17 15:02:14 +01:00
Tom Page
63ef313ad5 ACS-5993 Add classpath support to PMD. (#2301) 2023-11-17 11:42:33 +00:00
alfresco-build
a63cfecbcc [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-17 11:18:14 +00:00
alfresco-build
d8e71ad38a [maven-release-plugin][skip ci] prepare release 23.2.0.12 2023-11-17 11:18:11 +00:00
Marcin Strankowski
d6bf9a5748 Extend waiting script to work with mtls tests (#2321) 2023-11-17 10:59:28 +01:00
alfresco-build
75a3e03dfa [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-16 19:12:20 +00:00
alfresco-build
e0239cd48f [maven-release-plugin][skip ci] prepare release 23.2.0.11 2023-11-16 19:12:17 +00:00
kcichonczyk
a490b8d437 bump ATS version (#2313) 2023-11-16 19:35:17 +01:00
alfresco-build
1c1a2183a3 [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-16 10:01:00 +00:00
alfresco-build
0f0c143c6f [maven-release-plugin][skip ci] prepare release 23.2.0.10 2023-11-16 10:00:57 +00:00
kcichonczyk
9d41373752 [PRODSEC-7375] activemq version bump, fixing CVE-2023-46604 2023-11-14 15:01:53 +01:00
alfresco-build
5d4471bbb3 [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-14 12:33:49 +00:00
alfresco-build
8451df09a8 [maven-release-plugin][skip ci] prepare release 23.2.0.9 2023-11-14 12:33:46 +00:00
dependabot[bot]
935fcf1c16 Bump org.apache.santuario:xmlsec from 3.0.2 to 3.0.3 in /remote-api (#2269)
Bumps org.apache.santuario:xmlsec from 3.0.2 to 3.0.3.

---
updated-dependencies:
- dependency-name: org.apache.santuario:xmlsec
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 12:33:13 +01:00
alfresco-build
f4a1cb5726 [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-13 10:07:12 +00:00
alfresco-build
7d8cc58063 [maven-release-plugin][skip ci] prepare release 23.2.0.8 2023-11-13 10:07:09 +00:00
kcichonczyk
2005aa0754 [ACS-6179] replace deprecated tag 2023-11-13 10:24:18 +01:00
alfresco-build
c4b5da9452 [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-12 00:06:50 +00:00
alfresco-build
c2bba964cb [maven-release-plugin][skip ci] prepare release 23.2.0.7 2023-11-12 00:06:48 +00:00
Alfresco CI User
4b42ecf000 [force] Force release for 2023-11-12. 2023-11-12 00:03:20 +00:00
alfresco-build
b042fbb3ca [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-08 16:15:44 +00:00
alfresco-build
617eb7bb93 [maven-release-plugin][skip ci] prepare release 23.2.0.6 2023-11-08 16:15:41 +00:00
Eva Vasques
a3ccafb035 MNT-23927 Handle JsonMappingException and JsonGenerationException (#2289)
* Throw JSON exceptions as IO exceptions to be properly handled
* Log null prop keys
* Fix test to have the mocked response different than null
2023-11-08 14:58:08 +00:00
alfresco-build
6065c6feec [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-08 13:22:17 +00:00
alfresco-build
4cacbf3829 [maven-release-plugin][skip ci] prepare release 23.2.0.5 2023-11-08 13:22:14 +00:00
Alfresco Build
19840563e4 ACS-6188 Remove usage of deprecated constructors (#2295)
* Apply org.openrewrite.staticanalysis.PrimitiveWrapperClassConstructorToValueOf recipe

* ACS-6188 Update copyright headers

* ACS-6188 Update copyright header

* ACS-6188 Clean-up

---------

Co-authored-by: dsibilio <24280982+dsibilio@users.noreply.github.com>
Co-authored-by: Domenico Sibilio <domenicosibilio@gmail.com>
2023-11-08 13:05:00 +01:00
alfresco-build
a386dacce1 [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-06 13:50:30 +00:00
alfresco-build
4f9ee4e522 [maven-release-plugin][skip ci] prepare release 23.2.0.4 2023-11-06 13:50:27 +00:00
tiagosalvado10
3bd3689d80 [MNT-23478] AsynchronousExtractor - Fix rendition obtaining (#2288)
* [MNT-23478] AsynchronousExtractor - Fix rendition obtaining

* [MNT-23478] Only use default options if no rendition is found. PMD scan change.
2023-11-06 13:06:52 +00:00
alfresco-build
7bf3611e9a [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-06 12:03:33 +00:00
alfresco-build
506a2b8e61 [maven-release-plugin][skip ci] prepare release 23.2.0.3 2023-11-06 12:03:30 +00:00
tiagosalvado10
964b09251b [MNT-23152] Changed the way how facet pivot value is parsed to prevent error and allow pivots to be built (#2290)
* [MNT-23152] Changed the way how facet pivot value is parsed to prevent error and allow pivots to be built
2023-11-06 10:56:51 +00:00
alfresco-build
78a996a663 [maven-release-plugin][skip ci] prepare for next development iteration 2023-11-05 00:05:58 +00:00
alfresco-build
0fa5d00c8b [maven-release-plugin][skip ci] prepare release 23.2.0.2 2023-11-05 00:05:56 +00:00
Alfresco CI User
79c316a05f [force] Force release for 2023-11-05. 2023-11-05 00:03:19 +00:00
alfresco-build
d7e0402733 [maven-release-plugin][skip ci] prepare for next development iteration 2023-10-31 19:31:39 +00:00
alfresco-build
40bd7b6ad3 [maven-release-plugin][skip ci] prepare release 23.2.0.1 2023-10-31 19:31:36 +00:00
mpichura
93bee49246 Update Master branch to 23.2.0 2023-10-31 19:37:12 +01:00
alfresco-build
8d51e9885a [maven-release-plugin][skip ci] prepare for next development iteration 2023-10-30 18:33:51 +00:00
236 changed files with 5007 additions and 3660 deletions

View File

@@ -26,6 +26,9 @@ env:
CI_WORKSPACE: ${{ github.workspace }}
TAS_ENVIRONMENT: ./packaging/tests/environment
TAS_SCRIPTS: ../alfresco-community-repo/packaging/tests/scripts
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_OIDC_ADMIN_CLIENT_ID }}
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_OIDC_CLIENT_SECRET }}
AUTH0_ADMIN_PASSWORD: ${{ secrets.AUTH0_OIDC_ADMIN_PASSWORD }}
jobs:
prepare:
@@ -35,18 +38,10 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: changed-files
uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v6.1.0
with:
write-list-to-env: true
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v6.1.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Prepare maven cache and check compilation"
@@ -54,28 +49,81 @@ jobs:
- name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh
veracode:
veracode_sca:
name: "Source Clear Scan (SCA)"
runs-on: ubuntu-latest
needs: [prepare]
if: >
((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request') &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.35.2
continue-on-error: true
with:
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
- name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh
# SEE: ACS-6931 Currently times out after an hour. TO BE RESTORED after resolving the issue with Veracode Support.
#
# veracode_sast:
# name: "Pipeline SAST Scan"
# runs-on: ubuntu-latest
# needs: [prepare]
# if: >
# (github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
# github.actor != 'dependabot[bot]' &&
# !contains(github.event.head_commit.message, '[skip tests]') &&
# !contains(github.event.head_commit.message, '[force')
# steps:
# - uses: actions/checkout@v3
# - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
# - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
# - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
# - uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v5.6.0
# with:
# token: ${{ secrets.BOT_GITHUB_TOKEN }}
# repository: "Alfresco/veracode-baseline-archive"
# file-path: "alfresco-community-repo/alfresco-community-repo-baseline.json"
# target: "baseline.json"
# - name: "Build"
# timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
# run: |
# bash ./scripts/ci/init.sh
# bash ./scripts/ci/build.sh
# - name: "Run SAST Scan"
# uses: veracode/Veracode-pipeline-scan-action@v1.0.10
# with:
# vid: ${{ secrets.VERACODE_API_ID }}
# vkey: ${{ secrets.VERACODE_API_KEY }}
# file: "packaging/war/target/alfresco.war"
# fail_build: true
# project_name: alfresco-community-repo
# issue_details: true
# veracode_policy_name: Alfresco Default
# summary_output: true
# summary_output_file: results.json
# summary_display: true
# baseline_file: baseline.json
# - name: Upload scan result
# if: success() || failure()
# run: zip readable_output.zip results.json
# - name: Upload Artifact
# if: success() || failure()
# uses: actions/upload-artifact@v3
# with:
# name: Veracode Pipeline-Scan Results (Human Readable)
# path: readable_output.zip
# - name: "Clean Maven cache"
# run: bash ./scripts/ci/cleanup_cache.sh
pmd_scan:
name: "PMD Scan"
runs-on: ubuntu-latest
@@ -86,10 +134,10 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: Alfresco/ya-pmd-scan@v4.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- uses: Alfresco/ya-pmd-scan@v3.0.0
with:
classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\""
@@ -102,10 +150,10 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run tests"
@@ -140,10 +188,10 @@ jobs:
env:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -152,7 +200,7 @@ jobs:
- name: "Set transformers tag"
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
- name: "Set up the environment"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Run tests"
run: mvn -B test -pl remote-api -Dtest=${{ matrix.testSuite }} -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
@@ -174,14 +222,14 @@ jobs:
matrix:
version: ['10.2.18', '10.4', '10.5']
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: Run MariaDB ${{ matrix.version }} database
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
env:
MARIADB_VERSION: ${{ matrix.version }}
- name: "Run tests"
@@ -201,14 +249,14 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run MariaDB 10.6 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
env:
MARIADB_VERSION: 10.6
- name: "Run tests"
@@ -228,14 +276,14 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run MySQL 8 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
env:
MYSQL_VERSION: 8
- name: "Run tests"
@@ -254,14 +302,14 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 13.12 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 13.12
- name: "Run tests"
@@ -280,14 +328,14 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 14.9 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 14.9
- name: "Run tests"
@@ -306,14 +354,14 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 15.4 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 15.4
- name: "Run tests"
@@ -330,21 +378,21 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run ActiveMQ"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=CamelRoutesTest,CamelComponentsTest -DfailIfNoTests=false
- name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh
repository_app_context_test_suites:
name: Repository - ${{ matrix.testSuite }}
name: Repository - ${{ matrix.testSuite }} ${{ matrix.idp }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
@@ -363,9 +411,14 @@ jobs:
compose-profile: with-transform-core-aio
- testSuite: AppContext04TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext05TestSuite
compose-profile: with-sso
mvn-options: '-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth -Dauthentication.chain=identity-service1:identity-service,alfrescoNtlm1:alfrescoNtlm'
idp: Keycloak
- testSuite: AppContext05TestSuite
compose-profile: default
mvn-options: '"-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth"'
mvn-options: '-Didentity-service.auth-server-url=https://dev-ps-alfresco.auth0.com/ -Dauthentication.chain=identity-service1:identity-service,alfrescoNtlm1:alfrescoNtlm -Didentity-service.audience=http://localhost:3000 -Didentity-service.resource=${AUTH0_CLIENT_ID} -Didentity-service.credentials.secret=${AUTH0_CLIENT_SECRET} -Didentity-service.public-client=false -Didentity-service.realm= -Didentity-service.client-id.validation.disabled=false -Dadmin.user=admin@alfresco.com -Dadmin.password=${AUTH0_ADMIN_PASSWORD} -Dauth0.enabled=true -Dauth0.admin.password=${AUTH0_ADMIN_PASSWORD} -Didentity-service.principal-attribute=nickname'
idp: Auth0
- testSuite: AppContext06TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContextExtraTestSuite
@@ -381,14 +434,16 @@ jobs:
disabledHostnameVerification: false
mvn-options: '-Dencryption.ssl.keystore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.keystore -Dencryption.ssl.truststore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.truststore'
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Set transformers tag"
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
- name: "Set the host IP"
run: echo "HOST_IP=$(hostname -I | cut -f1 -d' ')" >> $GITHUB_ENV
- name: "Generate Keystores and Truststores for Mutual TLS configuration"
if: ${{ matrix.mtls }}
run: |
@@ -401,11 +456,7 @@ jobs:
echo "HOSTNAME_VERIFICATION_DISABLED=false" >> "$GITHUB_ENV"
fi
- name: "Set up the environment"
run: |
if [ -e ./scripts/ci/tests/${{ matrix.testSuite }}-setup.sh ]; then
bash ./scripts/ci/tests/${{ matrix.testSuite }}-setup.sh
fi
docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=${{ matrix.testSuite }} -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco ${{ matrix.mvn-options }}
- name: "Clean Maven cache"
@@ -452,10 +503,10 @@ jobs:
env:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -490,14 +541,14 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run Postgres 15.4 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
- name: "Run tests"
run: mvn -B test -pl :alfresco-share-services -am -Dtest=ShareServicesTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
@@ -520,10 +571,10 @@ jobs:
env:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -552,10 +603,10 @@ jobs:
env:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -580,10 +631,10 @@ jobs:
env:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -600,7 +651,7 @@ jobs:
run: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags -Pall-tas-tests
- name: "Configure AWS credentials"
if: ${{ always() }}
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AGS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AGS_AWS_SECRET_ACCESS_KEY }}
@@ -626,10 +677,10 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |

View File

@@ -31,15 +31,15 @@ jobs:
!contains(github.event.head_commit.message, '[no release]') &&
github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.2
with:
username: ${{ env.GIT_USERNAME }}
email: ${{ env.GIT_EMAIL }}
@@ -60,15 +60,15 @@ jobs:
!contains(github.event.head_commit.message, '[no downstream]') &&
github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v7.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.2
with:
username: ${{ env.GIT_USERNAME }}
email: ${{ env.GIT_EMAIL }}

3
.gitignore vendored
View File

@@ -39,6 +39,9 @@ dependency-reduced-pom.xml
hs_err_pid*
# Development
repository/scripts/hazelcast-init/alfresco-hazelcast-config.xml
# Alfresco runtime
alf_data

View File

@@ -1,14 +0,0 @@
repos:
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline"]
- repo: local
hooks:
- id: check-format-and-headers
name: Check format and headers and fix if necessary
entry: ./scripts/hooks/check-format-and-headers.sh
language: script
files: ".*.java"
pass_filenames: false

File diff suppressed because it is too large Load Diff

View File

@@ -3,52 +3,6 @@ Thanks for your interest in contributing to this project!
The following is a set of guidelines for contributing to this library. Most of them will make the life of the reviewer easier and therefore decrease the time required for the patch be included in the next version.
The project uses [pre-commit](https://pre-commit.com/) to format code (with [Spotless](https://github.com/diffplug/spotless)), validate license headers and check for secrets (with [detect-secrets](https://github.com/Yelp/detect-secrets)). To install the pre-commit hooks then first install pre-commit and then run:
```shell
pre-commit install
```
When you make a commit then these hooks will run and check the modified files. If it makes changes then you can review them and then `git commit` again to accept the changes.
#### Code Quality
This project uses `spotless` that enforces `alfresco-formatter.xml` to ensure code quality.
To check code-style violations you can use:
```bash
mvn spotless:check
```
To reformat files you can use:
```bash
mvn spotless:apply
```
#### Secret Detection
We are using [detect-secrets](https://github.com/Yelp/detect-secrets) to try to avoid accidentally publishing secret keys.
If you have pre-commit installed then this should run automatically when making a commit. Usually there should be no issues,
but if it finds a potential issue (e.g. a high entropy string) then you will see the following:
```shell
Detect secrets...........................................................Failed
- hook id: detect-secrets
- exit code: 1
ERROR: Potential secrets about to be committed to git repo!
Secret Type: Secret Keyword
Location: test.txt:1
```
If this is a false positive and you actually want to commit the string then run these two commands:
```shell
detect-secrets scan --baseline .secrets.baseline
detect-secrets audit .secrets.baseline
```
This will update the baseline file to include your new code and then allow you to review the detected secret and mark it as a false positive.
Once you are finished then you can add `.secrets.baseline` to the staged changes and you should be able to create a commit.
Because this project forms a part of Alfresco Content Services, the guidelines are hosted in the [Alfresco Social Community](https://hub.alfresco.com/t5/alfresco-content-services-ecm/ct-p/ECM-software) where they can be referenced from multiple projects.
You can report an issue in the ALF project of the [Alfresco issue tracker](http://issues.alfresco.com).

View File

@@ -1,401 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="23">
<profile kind="CodeFormatterProfile" name="Spotless" version="23">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_record_components" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_annotations" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="2147483647"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="999"/>
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line" value="one_line_never"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_if_empty"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="999"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
</profiles>

View File

@@ -71,7 +71,7 @@ the _alfresco-internal_ repository:
</snapshots>
</repository>
```
For additional instructions you can check the official Maven documentation:
* [setting up repositories](https://maven.apache.org/guides/mini/guide-multiple-repositories.html)
@@ -227,7 +227,7 @@ If only the Community or Enterprise images need to be built than the same comman
The Docker images of the Repo can be started independently from Share running the following command in the rm-repo-enterprise or rm-repo-community folder which contains the Docker-compose.yml file:
```
docker compose up
docker-compose up
```
> Be aware of the fact that the Share images can not be started independently from Repo
@@ -237,5 +237,5 @@ e.g. In order to start an instance of rm-enterprise-repo and rm-enterprise-share
If you have a license for jRebel then this can be used from the rm-community-share or rm-enterprise-share directories with:
```
docker compose -f docker-compose.yml -f jrebel-docker-compose.yml --project-name agsdev up --build --force-recreate
docker-compose -f docker-compose.yml -f jrebel-docker-compose.yml --project-name agsdev up --build --force-recreate
```

View File

@@ -4,9 +4,9 @@ set -x
# Display running containers
docker ps
alfrescoContainerId=$(docker ps -a | grep '\-alfresco\-' | awk '{print $1}')
shareContainerId=$(docker ps -a | grep '\-share\-' | awk '{print $1}')
solrContainerId=$(docker ps -a | grep '\-search\-' | awk '{print $1}')
alfrescoContainerId=$(docker ps -a | grep '_alfresco_' | awk '{print $1}')
shareContainerId=$(docker ps -a | grep '_share_' | awk '{print $1}')
solrContainerId=$(docker ps -a | grep '_search_' | awk '{print $1}')
docker logs $alfrescoContainerId > alfresco.log
if [ -n "$shareContainerId" ]; then

View File

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

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<build>
@@ -96,11 +96,11 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15to18</artifactId>
<artifactId>bcprov-jdk18on</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15to18</artifactId>
<artifactId>bcpkix-jdk18on</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -124,7 +124,7 @@ public abstract class BaseAPI
/**
* Helper method to extract the property value for the given nodeRef and property name
*
*
* @param result
* @param nodeRef
* @param propertyName
@@ -152,7 +152,7 @@ public abstract class BaseAPI
return propertyValue;
}
/**
* Helper method to extract property values from request result and put them in map as a list that corresponds to a unique property value.
*

View File

@@ -61,7 +61,7 @@ public class FilePlanComponentFields
public static final String PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS = "rma:recordSearchDispositionEvents";
public static final String PROPERTIES_DECLASSIFICATION_REVIEW_COMPLETED_BY = "rma:declassificationReviewCompletedBy";
public static final String PROPERTIES_DECLASSIFICATION_REVIEW_COMPLETED_AT = "rma:declassificationReviewCompletedAt";
/** File plan properties */
public static final String PROPERTIES_COMPONENT_ID = "st:componentId";

View File

@@ -125,7 +125,7 @@ public class RecordProperties extends TestModel
@JsonProperty (required = true, value = PROPERTIES_ORIGINAL_NAME)
private String originalName;
@JsonProperty (PROPERTIES_CLASSIFICATION)
private List<String> classification;

View File

@@ -112,10 +112,10 @@ public class RecordCategoryChildProperties extends TestModel
@JsonProperty (PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE)
private Boolean recordSearchHasDispositionSchedule;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION)
private String recordSearchDispositionPeriodExpression;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY)
private String recordSearchDispositionAuthority;
@@ -136,7 +136,7 @@ public class RecordCategoryChildProperties extends TestModel
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS)
private List<String> recordSearchDispositionEvents;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;

View File

@@ -112,13 +112,13 @@ public class RecordFolderProperties extends TestModel
@JsonProperty (PROPERTIES_CLASSIFICATION)
private List<String> classification;
@JsonProperty (PROPERTIES_DESCRIPTION)
private String description;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;
@JsonProperty (PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD)
private String recordSearchVitalRecordReviewPeriod;

View File

@@ -28,7 +28,7 @@ package org.alfresco.rest.rm.community.model.user;
/**
* Constants for RM user capabilities
*
*
* @author Kristijan Conkas
* @since 2.6
*/

View File

@@ -38,7 +38,7 @@ import org.springframework.stereotype.Component;
/**
* The v0 REST API for nodes
*
*
* @author jcule
* @since 2.7EA1
*/
@@ -56,7 +56,7 @@ public class NodeAPI extends BaseAPI
/**
* Get the node metadata using the using the node data webscript: Document List v2 Component
*
*
* @param username
* @param password
* @param nodeId
@@ -70,5 +70,5 @@ public class NodeAPI extends BaseAPI
client.close();
return doGetRequest(username, password, requestURL);
}
}

View File

@@ -143,7 +143,7 @@ public class SearchAPI extends BaseAPI
/**
* Search as a user for nodes on site "rm" matching query, using SearchAPI.RM_DEFAULT_RECORD_FILTERS and sorted
* by sortby and returns the property value for the given nodeRef and property name
*
*
* @param username
* @param password
* @param query
@@ -157,9 +157,9 @@ public class SearchAPI extends BaseAPI
{
String searchFilterParamaters = MessageFormat.format(RM_DEFAULT_NODES_FILTERS, Boolean.toString(includeFolders),
Boolean.toString(includeCategories));
return getItemProperty(rmSearch(username, password, "rm", query, searchFilterParamaters, sortby), nodeRef, propertyName);
return getItemProperty(rmSearch(username, password, "rm", query, searchFilterParamaters, sortby), nodeRef, propertyName);
}
/**
* Generic faceted search.
* @param username
@@ -229,17 +229,17 @@ public class SearchAPI extends BaseAPI
/**
* Helper method to extract list of names from search result.
*
*
* @param searchResult
* @return list of document or record names in search result
* @throws FileNotFoundException
* @throws JsonSyntaxException
* @throws JsonIOException
* @throws FileNotFoundException
* @throws JsonSyntaxException
* @throws JsonIOException
* @throws RuntimeException for malformed search response
*/
/**
* Helper method to extract list of names from search result.
*
*
* @param searchResult
* @return
*/
@@ -247,10 +247,10 @@ public class SearchAPI extends BaseAPI
{
return getPropertyValues(searchResult, "name");
}
/**
* Helper method to extract list of property values from search result for the given nodeRef.
*
*
* @param searchResult
* @param nodeRef
* @param propertyName

View File

@@ -73,7 +73,7 @@ public class AuditLoginEventsTests extends BaseRMRestTest
assertTrue("The list of events is not filtered by " + LOGIN_UNSUCCESSFUL.event,
auditEntries.stream().allMatch(auditEntry -> auditEntry.getEvent().equals(LOGIN_UNSUCCESSFUL.eventDisplayName)));
}
/**
* Given I have tried to login using valid credentials
* When I view the RM audit filtered by Login successful event

View File

@@ -62,6 +62,7 @@ import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI;
import org.alfresco.rest.rm.community.utils.AlfrescoRetryAnalyzer;
import org.alfresco.rest.v0.service.RoleService;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.model.UserModel;
@@ -289,10 +290,11 @@ public class UpdateRecordsTests extends BaseRMRestTest
* </pre>
*/
@Test
(
dataProvider = "completeRecords",
description = "Complete records can't be updated"
)
(
dataProvider = "completeRecords",
description = "Complete records can't be updated",
retryAnalyzer = AlfrescoRetryAnalyzer.class
)
@AlfrescoTest(jira="RM-4362")
@Bug (id = "APPS-132")
public void completeRecordsCantBeUpdated(String electronicRecordId, String nonElectronicRecordId)

View File

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

View File

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

View File

@@ -1,3 +1,3 @@
SOLR6_TAG=2.0.11
SOLR6_TAG=2.0.8.1
POSTGRES_TAG=15.4
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8

View File

@@ -33,7 +33,7 @@ function main()
{
// Log debug message
logger.log("Record " + node.name + " has been superseded. Sending notification");
// Send notification
rmService.sendSupersededNotification(node);
}

View File

@@ -99,10 +99,10 @@ function main()
{
version = versionHistory[i];
p = getPerson(version.creator);
recordNodeRef = version.getVersionProperty("recordNodeRef");
isRecordedVersionDestroyed = version.getVersionProperty("RecordedVersionDestroyed");
versions[versions.length] =
{
nodeRef: version.node.nodeRef.toString(),

View File

@@ -26,19 +26,19 @@
*/
/**
* Delete the rm constraint list
*/
*/
function main()
{
// Get the shortname
var shortName = url.extension;
// Get the constraint
var constraint = caveatConfig.getConstraint(shortName);
if (constraint != null)
{
caveatConfig.deleteConstraintList(shortName);
// Pass the constraint name to the template
model.constraintName = shortName;
}

View File

@@ -26,15 +26,15 @@
*/
/**
* Get the detail of the rm constraint
*/
*/
function main()
{
// Get the shortname
var shortName = url.extension;
// Get the constraint
var constraint = caveatConfig.getConstraint(shortName);
if (constraint != null)
{
// Pass the constraint detail to the template

View File

@@ -26,14 +26,14 @@
*/
/**
* List the names of the rm constraints
*/
*/
function main()
{
var wel = true;
var withEmptyLists = args["withEmptyLists"];
// Pass the information to the template
if (withEmptyLists != null && withEmptyLists === 'false')
{
{
model.constraints = caveatConfig.constraintsWithoutEmptyList;
}
else

View File

@@ -26,15 +26,15 @@
*/
/**
* Get the detail of the rm constraint
*/
*/
function main()
{
var urlElements = url.extension.split("/");
var shortName = urlElements[0];
// Get the constraint
var constraint = caveatConfig.getConstraint(shortName);
if (constraint != null)
{
// Pass the constraint detail to the template

View File

@@ -26,33 +26,33 @@
*/
/**
* Update the details of a value in an rm constraint
*/
*/
function main()
{
var urlElements = url.extension.split("/");
var shortName = urlElements[0];
var values = null;
if (json.has("values"))
{
values = json.getJSONArray("values");
}
if (values == null)
{
status.setCode(status.STATUS_BAD_REQUEST, "Values missing");
return;
}
// Get the constraint
var constraint = caveatConfig.getConstraint(shortName);
if (constraint != null)
{
constraint.updateValues(values);
constraint.updateValues(values);
model.constraint = caveatConfig.getConstraint(shortName);
model.constraintName = shortName;
model.constraintName = shortName;
}
else
{

View File

@@ -26,13 +26,13 @@
*/
/**
* Delete the rm constraint list
*/
*/
function main()
{
var urlElements = url.extension.split("/");
var shortName = urlElements[0];
var authorityName = urlElements[1];
if (shortName == null)
{
status.setCode(status.STATUS_BAD_REQUEST, "shortName missing");
@@ -43,16 +43,16 @@ function main()
status.setCode(status.STATUS_BAD_REQUEST, "value missing");
return;
}
// Get the constraint
var constraint = caveatConfig.getConstraint(shortName);
if (constraint != null)
{
caveatConfig.deleteRMConstraintListValue(shortName, valueName);
var constraint = caveatConfig.getConstraint(shortName);
// Pass the constraint name to the template
model.constraint = constraint;
}

View File

@@ -26,28 +26,28 @@
*/
/**
* Get the detail of the rm constraint
*/
*/
function main()
{
var urlElements = url.extension.split("/");
var shortName = decodeURIComponent(urlElements[0]);
var valueName = decodeURIComponent(urlElements[2])
// Get the constraint
var constraint = caveatConfig.getConstraint(shortName);
if (constraint != null)
{
// Pass the constraint detail to the template
var value = constraint.getValue(valueName);
if(value == null)
{
// Return 404
status.setCode(404, "Constraint List: " + shortName + " value: " + valueName + "does not exist");
return;
}
model.value = value;
model.constraint = constraint;
}

View File

@@ -114,7 +114,7 @@ function getRecordSeries(seriesNode)
// Create Record Series object
var recordSerie = {
parentPath: "/",
name: seriesNode.name,
name: seriesNode.name,
identifier: seriesNode.properties["rma:identifier"],
description: seriesNode.properties["description"]
};
@@ -154,7 +154,7 @@ function getRecordCategory(categoryNode, parentPath)
name: categoryNode.name,
identifier: categoryNode.properties["rma:identifier"],
vitalRecordIndicator: categoryNode.properties["vitalRecordIndicator"],
dispositionAuthority: categoryNode.properties["dispositionAuthority"],
dispositionAuthority: categoryNode.properties["dispositionAuthority"],
recordFolders: [],
dispositionActions: []
};

View File

@@ -36,12 +36,12 @@ function main()
status.setCode(status.STATUS_NOT_FOUND, "Site not found: '" + siteId + "'");
return null;
}
var searchNode = siteNode.getContainer("Saved Searches");
if (searchNode != null)
{
var kids, ssNode;
if (bPublic == null || bPublic == "true")
{
// public searches are in the root of the folder
@@ -56,7 +56,7 @@ function main()
kids = userNode.children;
}
}
if (kids)
{
for (var i = 0, ii = kids.length; i < ii; i++)
@@ -73,7 +73,7 @@ function main()
}
}
}
model.savedSearches = savedSearches;
}

View File

@@ -40,7 +40,7 @@ function main()
status.setCode(status.STATUS_BAD_REQUEST, "nodeRef: '" + nodeRef + "' is not of type 'rma:transfer'");
return null;
}
model.transfer = transfer;
}

View File

@@ -33,7 +33,7 @@
/**
* Live Search Component
*
*
* Takes the following object as Input:
* params
* {
@@ -41,7 +41,7 @@
* term: search terms
* maxResults: maximum results to return
* };
*
*
* Outputs:
* items - Array of objects containing the search results
*/
@@ -53,7 +53,7 @@ const SURF_CONFIG_QNAMEPATH = "/cm:surf-config/";
/**
* Returns site information data structure.
* { shortName: siteId, title: title }
*
*
* Caches the data to avoid repeatedly querying the repository.
*/
var siteDataCache = {};
@@ -134,13 +134,13 @@ function getDocumentItem(container, node) {
}
}
}
return item;
}
/**
* Splits the qname path to a node.
*
*
* Returns container meta object containing the following properties:
* siteId
* containerId
@@ -151,7 +151,7 @@ function splitQNamePath(node) {
siteId: null,
containerId: null
};
if (path.match("^"+SITES_SPACE_QNAME_PATH) == SITES_SPACE_QNAME_PATH)
{
var tmp = path.substring(SITES_SPACE_QNAME_PATH.length),
@@ -167,13 +167,13 @@ function splitQNamePath(node) {
// strip container id from the path
var containerId = tmp.substring(0, pos);
containerId = containerId.substring(containerId.indexOf(":") + 1);
container.siteId = siteId;
container.containerId = containerId;
}
}
}
return container;
}
@@ -197,36 +197,36 @@ function liveSearch(params) {
/**
* Return Document Search results with the given search terms.
*
*
* "AND" is the default operator unless configured otherwise, OR, AND and NOT are also supported -
* as is any other valid fts-alfresco elements such as "quoted terms" and (bracket terms) and also
* propname:propvalue syntax.
*
*
* @param params Object containing search parameters - see API description above
*/
function getDocResults(params) {
// ensure a TYPE is specified
var ftsQuery = params.term + ' AND +TYPE:"cm:content"';
// site constraint
if (params.siteId !== null)
{
// use SITE syntax to restrict to specific site
ftsQuery += ' AND SITE:"' + params.siteId + '"';
}
// root node - generally used for overridden Repository root in Share
if (params.rootNode !== null)
{
ftsQuery = 'PATH:"' + rootNode.qnamePath + '//*" AND (' + ftsQuery + ')';
}
// main query construction
ftsQuery = '(' + ftsQuery + ') AND -TYPE:"cm:thumbnail" AND -TYPE:"cm:failedThumbnail" AND -TYPE:"cm:rating" AND -TYPE:"fm:post" AND -ASPECT:"sys:hidden" AND -ASPECT:"rma:savedSearch" AND -cm:creator:system';
if (logger.isLoggingEnabled())
logger.log("LiveQuery:\r\n" + ftsQuery);
// get default fts operator from the config
//
// TODO: common search lib - for both live and standard e.g. to get values like this...
@@ -237,7 +237,7 @@ function getDocResults(params) {
{
operator = cf.toString();
}
// perform fts-alfresco language query
var queryDef = {
query: ftsQuery,
@@ -254,10 +254,10 @@ function getDocResults(params) {
var rs = search.queryResultSet(queryDef);
nodes = rs.nodes,
results = [];
if (logger.isLoggingEnabled())
logger.log("Processing resultset of length: " + nodes.length);
for (var i=0, item; i<nodes.length && i<params.maxResults; i++)
{
// For each node we extract the site/container qname path and then
@@ -279,13 +279,13 @@ function getDocResults(params) {
}
}
}
return buildResults(results, params, rs.meta.hasMore);
}
/**
* Return Site Search results with the given search terms.
*
*
* @param params Object containing search parameters - see API description above
*/
function getSiteResults(params) {
@@ -297,7 +297,7 @@ function getSiteResults(params) {
/**
* Return People Search results with the given search terms.
*
*
* @param params Object containing search parameters - see API description above
*/
function getPeopleResults(params) {

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<properties>

View File

@@ -139,7 +139,7 @@ public class JSONConversionComponentTest extends BaseRMTestCase
Serializable value = stringValue;
if (type.equals("boolean"))
{
value = new Boolean(stringValue);
value = Boolean.valueOf(stringValue);
}
return value;
}

View File

@@ -4,8 +4,8 @@
# Version label
version.major=23
version.minor=1
version.revision=1
version.minor=3
version.revision=0
version.label=
# Edition label

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<dependencies>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
* Copyright (C) 2005-2023 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -55,11 +55,11 @@ public class CannedQueryTest extends TestCase
RESULTS_TWO = new ArrayList<Long>(10);
for (int i = 0; i < 10; i++)
{
RESULTS_TWO.add(new Long(i));
RESULTS_TWO.add(Long.valueOf(i));
}
ANTI_RESULTS = new HashSet<Object>();
ANTI_RESULTS.add("ONE_5");
ANTI_RESULTS.add(new Long(5));
ANTI_RESULTS.add(Long.valueOf(5));
}
@SuppressWarnings("rawtypes")

View File

@@ -25,6 +25,7 @@ import junit.framework.TestCase;
*
* @author Roy Wetherall
*/
@SuppressWarnings({"PMD.DetachedTestCase", "PMD.JUnit4TestShouldUseTestAnnotation"})
public class VersionNumberTest extends TestCase
{
public void testCreate()
@@ -136,4 +137,36 @@ public class VersionNumberTest extends TestCase
assertEquals(-1, version8.compareTo(version9));
assertEquals(-1, version9.compareTo(version10));
}
public void testCompareNewSchema() {
// module min/max repo version is 23, actual ACS version is 23.1.0 which is greater than module
VersionNumber repoVersionMin = new VersionNumber("23");
VersionNumber repoVerisionActual = new VersionNumber("23.1.0");
assertEquals(1, repoVerisionActual.compareTo(repoVersionMin));
// module min/max repo version is 23.2, actual ACS version is 23.1.1 which is lower than module
repoVersionMin = new VersionNumber("23.2");
repoVerisionActual = new VersionNumber("23.1.1");
assertEquals(-1, repoVerisionActual.compareTo(repoVersionMin));
// module min/max repo version is 7.4, actual ACS version is 23.1.0 which is greater than module
repoVersionMin = new VersionNumber("7.4");
repoVerisionActual = new VersionNumber("23.1.0");
assertEquals(1, repoVerisionActual.compareTo(repoVersionMin));
// module min/max repo version is 24, actual ACS version is 24.1.0 which is greater than module
repoVersionMin = new VersionNumber("24");
repoVerisionActual = new VersionNumber("24.1.0");
assertEquals(1, repoVerisionActual.compareTo(repoVersionMin));
// module min/max repo version is 24, actual ACS version is 23.2.0 which is lower than module
repoVersionMin = new VersionNumber("24");
repoVerisionActual = new VersionNumber("23.2.0");
assertEquals(-1, repoVerisionActual.compareTo(repoVersionMin));
// module min/max repo version is 24.2, actual ACS version is 24.2.0 which is equal to module
repoVersionMin = new VersionNumber("24.2");
repoVerisionActual = new VersionNumber("24.2.0");
assertEquals(0, repoVerisionActual.compareTo(repoVersionMin));
}
}

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<properties>
@@ -193,14 +193,6 @@
<artifactId>tika-parsers-standard-package</artifactId>
<version>${dependency.tika.version}</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15on</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
@@ -224,10 +216,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15to18</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -121,7 +121,7 @@ public class AssociationRef implements EntityRef, Serializable
String targetNodeRefStr = tokenizer.nextToken();
String assocTypeQNameStr = tokenizer.nextToken();
this.id = new Long(idStr);
this.id = Long.valueOf(idStr);
this.sourceRef = new NodeRef(sourceNodeRefStr);
this.targetRef = new NodeRef(targetNodeRefStr);
this.assocTypeQName = QName.createQName(assocTypeQNameStr);

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -391,7 +391,7 @@ public class DefaultTypeConverter extends TypeConverter
{
public Boolean convert(Number source)
{
return new Boolean(source.longValue() > 0);
return Boolean.valueOf(source.longValue() > 0);
}
});
addConverter(Number.class, Byte.class, new TypeConverter.Converter<Number, Byte>()
@@ -549,8 +549,8 @@ public class DefaultTypeConverter extends TypeConverter
//
// Boolean ->
//
final Long LONG_FALSE = new Long(0L);
final Long LONG_TRUE = new Long(1L);
final Long LONG_FALSE = Long.valueOf(0L);
final Long LONG_TRUE = Long.valueOf(1L);
addConverter(Boolean.class, Long.class, new TypeConverter.Converter<Boolean, Long>()
{
public Long convert(Boolean source)

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -190,7 +190,7 @@ public class Duration implements Comparable, Serializable
{
if (token == StreamTokenizer.TT_NUMBER)
{
nval = new Double(tok.nval);
nval = Double.valueOf(tok.nval);
}
else if (token == StreamTokenizer.TT_EOF)
{

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -57,8 +57,8 @@ public class DefaultTypeConverterTest extends TestCase
public void testPrimitives()
{
assertEquals(Boolean.valueOf(false), DefaultTypeConverter.INSTANCE.convert(Boolean.class, false));
assertEquals(Boolean.valueOf(true), DefaultTypeConverter.INSTANCE.convert(Boolean.class, true));
assertEquals(Boolean.FALSE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, false));
assertEquals(Boolean.TRUE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, true));
assertEquals(Character.valueOf('a'), DefaultTypeConverter.INSTANCE.convert(Character.class, 'a'));
assertEquals(Byte.valueOf("3"), DefaultTypeConverter.INSTANCE.convert(Byte.class, (byte) 3));
assertEquals(Short.valueOf("4"), DefaultTypeConverter.INSTANCE.convert(Short.class, (short) 4));
@@ -70,8 +70,8 @@ public class DefaultTypeConverterTest extends TestCase
public void testNoConversion()
{
assertEquals(Boolean.valueOf(false), DefaultTypeConverter.INSTANCE.convert(Boolean.class, Boolean.valueOf(false)));
assertEquals(Boolean.valueOf(true), DefaultTypeConverter.INSTANCE.convert(Boolean.class, Boolean.valueOf(true)));
assertEquals(Boolean.FALSE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, Boolean.FALSE));
assertEquals(Boolean.TRUE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, Boolean.TRUE));
assertEquals(Character.valueOf('w'), DefaultTypeConverter.INSTANCE.convert(Character.class, Character.valueOf('w')));
assertEquals(Byte.valueOf("3"), DefaultTypeConverter.INSTANCE.convert(Byte.class, Byte.valueOf("3")));
assertEquals(Short.valueOf("4"), DefaultTypeConverter.INSTANCE.convert(Short.class, Short.valueOf("4")));
@@ -90,8 +90,8 @@ public class DefaultTypeConverterTest extends TestCase
public void testToString()
{
assertEquals("true", DefaultTypeConverter.INSTANCE.convert(String.class, new Boolean(true)));
assertEquals("false", DefaultTypeConverter.INSTANCE.convert(String.class, new Boolean(false)));
assertEquals("true", DefaultTypeConverter.INSTANCE.convert(String.class, Boolean.TRUE));
assertEquals("false", DefaultTypeConverter.INSTANCE.convert(String.class, Boolean.FALSE));
assertEquals("v", DefaultTypeConverter.INSTANCE.convert(String.class, Character.valueOf('v')));
assertEquals("3", DefaultTypeConverter.INSTANCE.convert(String.class, Byte.valueOf("3")));
assertEquals("4", DefaultTypeConverter.INSTANCE.convert(String.class, Short.valueOf("4")));
@@ -132,8 +132,8 @@ public class DefaultTypeConverterTest extends TestCase
public void testFromString()
{
assertEquals(Boolean.valueOf(true), DefaultTypeConverter.INSTANCE.convert(Boolean.class, "True"));
assertEquals(Boolean.valueOf(false), DefaultTypeConverter.INSTANCE.convert(Boolean.class, "woof"));
assertEquals(Boolean.TRUE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, "True"));
assertEquals(Boolean.FALSE, DefaultTypeConverter.INSTANCE.convert(Boolean.class, "woof"));
assertEquals(Character.valueOf('w'), DefaultTypeConverter.INSTANCE.convert(Character.class, "w"));
assertEquals(Byte.valueOf("3"), DefaultTypeConverter.INSTANCE.convert(Byte.class, "3"));
assertEquals(Short.valueOf("4"), DefaultTypeConverter.INSTANCE.convert(Short.class, "4"));
@@ -316,8 +316,8 @@ public class DefaultTypeConverterTest extends TestCase
private ArrayList<Object> makeList()
{
ArrayList<Object> list = new ArrayList<Object>();
list.add(Boolean.valueOf(true));
list.add(Boolean.valueOf(false));
list.add(Boolean.TRUE);
list.add(Boolean.FALSE);
list.add(Character.valueOf('q'));
list.add(Byte.valueOf("1"));
list.add(Short.valueOf("2"));

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<dependencies>
@@ -29,7 +29,7 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15to18</artifactId>
<artifactId>bcprov-jdk18on</artifactId>
</dependency>
<dependency>
<groupId>de.schlichtherle.truezip</groupId>

View File

@@ -9,6 +9,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
</project>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<modules>

View File

@@ -1,3 +1,3 @@
SOLR6_TAG=2.0.11
SOLR6_TAG=2.0.8.1
POSTGRES_TAG=15.4
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<modules>

View File

@@ -27,8 +27,8 @@ fi
# The second parameter can be used to avoid doing a clean up if we are doing a restart test.
if [ "$CLEAN_UP" != "no-clean-up" ]
then
docker compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") kill
docker compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") rm -f
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") kill
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") rm -f
export GENERATED_IMAGES=$(docker images | grep '^environment_' | awk '{ print $3 }')
if [ -n "$GENERATED_IMAGES" ]
@@ -43,7 +43,7 @@ export TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-tra
export TRANSFORM_ROUTER_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-service.version -q -DforceStdout)
# .env files are picked up from project directory correctly on docker-compose 1.23.0+
docker compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
if [ $? -eq 0 ]
then

View File

@@ -10,8 +10,8 @@ fi
echo "Killing ACS stack in ${DOCKER_COMPOSE_PATH}"
docker compose --file ${DOCKER_COMPOSE_PATH} ps
docker-compose --file ${DOCKER_COMPOSE_PATH} ps
# logs for debug
docker compose --file ${DOCKER_COMPOSE_PATH} logs --no-color -t alfresco
docker compose --file ${DOCKER_COMPOSE_PATH} kill
docker compose --file ${DOCKER_COMPOSE_PATH} rm -fv
docker-compose --file ${DOCKER_COMPOSE_PATH} logs --no-color -t alfresco
docker-compose --file ${DOCKER_COMPOSE_PATH} kill
docker-compose --file ${DOCKER_COMPOSE_PATH} rm -fv

View File

@@ -9,13 +9,27 @@ then
exit 1
fi
# If MTLS enabled configure keystore/truststore for curl command
if [[ $ALFRESCO_URL == https* ]]; then
KEYSTORE_TRUSTSTORE_PATH="${CI_WORKSPACE}/keystores/testClient"
KEYSTORE_PASSWORD="password"
ADDITIONAL_MTLS_CONFIG="--key $KEYSTORE_TRUSTSTORE_PATH/client-key.pem --cert $KEYSTORE_TRUSTSTORE_PATH/client-cert.pem:$KEYSTORE_PASSWORD --cacert $KEYSTORE_TRUSTSTORE_PATH/testClient_truststore.pem"
if [[ ${HOSTNAME_VERIFICATION_DISABLED} == true ]]; then
ADDITIONAL_MTLS_CONFIG=$ADDITIONAL_MTLS_CONFIG" -k"
fi
else
ADDITIONAL_MTLS_CONFIG=""
fi
WAIT_INTERVAL=1
COUNTER=0
TIMEOUT=300
t0=$(date +%s)
echo "Waiting for alfresco to start"
until $(curl --output /dev/null --silent --head --fail ${ALFRESCO_URL}) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
echo curl --output /dev/null --silent --head --fail ${ADDITIONAL_MTLS_CONFIG} ${ALFRESCO_URL}
until $(curl --output /dev/null --silent --head --fail ${ADDITIONAL_MTLS_CONFIG} ${ALFRESCO_URL}) || [ "$COUNTER" -eq "$TIMEOUT" ]; do
printf '.'
sleep $WAIT_INTERVAL
COUNTER=$(($COUNTER+$WAIT_INTERVAL))
@@ -37,7 +51,7 @@ else
echo "Alfresco Could not start in time."
echo "All started containers:"
docker ps -a
ALFCONTAINER=`docker ps -a | grep '\-alfresco' | awk '{ print $1 }'`
ALFCONTAINER=`docker ps -a | grep _alfresco | awk '{ print $1 }'`
echo "Last 200 lines from alfresco.log on container $ALFCONTAINER:"
docker logs --tail=200 $ALFCONTAINER
exit 1

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<organization>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<developers>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<properties>

View File

@@ -25,7 +25,7 @@
*/
package org.alfresco.rest.model;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -38,13 +38,17 @@ public class RestGroupsModel extends TestModel implements IRestModel<RestGroupsM
private String id;
@JsonProperty(required = true)
private String displayName;
@JsonProperty()
private String description;
@JsonProperty(required = true)
private Boolean isRoot;
@JsonProperty()
private Boolean hasSubgroups;
@JsonProperty("parentIds")
private ArrayList<String> parentIds;
private List<String> parentIds;
@JsonProperty("zones")
private ArrayList<String> zones;
private List<String> zones;
@JsonProperty(value = "entry")
RestGroupsModel model;
@@ -75,6 +79,22 @@ public class RestGroupsModel extends TestModel implements IRestModel<RestGroupsM
this.displayName = displayName;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Boolean getHasSubgroups() {
return hasSubgroups;
}
public void setHasSubgroups(Boolean hasSubgroups) {
this.hasSubgroups = hasSubgroups;
}
public Boolean getIsRoot()
{
return isRoot;
@@ -85,22 +105,22 @@ public class RestGroupsModel extends TestModel implements IRestModel<RestGroupsM
this.isRoot = isRoot;
}
public ArrayList<String> getParentIds()
public List<String> getParentIds()
{
return parentIds;
}
public void setParentIds(ArrayList<String> parentIds)
public void setParentIds(List<String> parentIds)
{
this.parentIds = parentIds;
}
public ArrayList<String> getZones()
public List<String> getZones()
{
return zones;
}
public void setZones(ArrayList<String> zones)
public void setZones(List<String> zones)
{
this.zones = zones;
}

View File

@@ -31,44 +31,73 @@ public class GroupsTests extends RestTest
@Test(groups = { TestGroup.REST_API, TestGroup.GROUPS, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.NODES }, executionType = ExecutionType.SANITY,
description = "Verify creation, listing, updating and deletion of groups.")
public void createListUpdateAndDeleteGroup() throws Exception
public void createListUpdateAndDeleteGroup()
{
String groupName = "ZtestGroup" + UUID.randomUUID().toString();
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).build();
String groupName = "ZtestGroup" + UUID.randomUUID();
String subGroupName = "ZtestSubgroup" + UUID.randomUUID();
String groupDescription = "ZtestGroup description" + UUID.randomUUID();
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).add("description", groupDescription).build();
JsonObject subgroupBody = Json.createObjectBuilder().add("id", subGroupName).add("displayName", subGroupName).build();
String groupBodyCreate = groupBody.toString();
String subgroupBodyCreate = subgroupBody.toString();
//GroupCreation:
//-ve
restClient.authenticateUser(userModel).withCoreAPI().usingGroups().createGroup(groupBodyCreate);
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);
//+ve
restClient.authenticateUser(adminUser).withCoreAPI().usingParams("include=zones").usingGroups().createGroup(groupBodyCreate)
restClient.authenticateUser(adminUser).withCoreAPI().usingParams("include=zones,hasSubgroups,description").usingGroups().createGroup(groupBodyCreate)
.assertThat().field("zones").contains("APP.DEFAULT")
.and().field("isRoot").is(true)
.and().field("displayName").is(groupName);
.and().field("displayName").is(groupName)
.and().field("description").is(groupDescription)
.and().field("hasSubgroups").is(false);
restClient.assertStatusCodeIs(HttpStatus.CREATED);
//AddChildGroup
restClient.authenticateUser(adminUser).withCoreAPI().usingParams("include=zones").usingGroups().createGroup(subgroupBodyCreate);
restClient.assertStatusCodeIs(HttpStatus.CREATED);
//LinkChildGroupToParent
JsonObject groupMembershipGroupBody = Json.createObjectBuilder().add("id", "GROUP_"+subGroupName).add("memberType", "GROUP").build();
String groupMembershipGroupBodyCreate = groupMembershipGroupBody.toString();
restClient.authenticateUser(adminUser).withCoreAPI().usingGroups().createGroupMembership("GROUP_"+groupName, groupMembershipGroupBodyCreate);
restClient.assertStatusCodeIs(HttpStatus.CREATED);
//ListGroups:
restClient.withCoreAPI().usingParams("orderBy=displayName DESC&maxItems=10").usingGroups().listGroups()
.assertThat().entriesListContains("id", "GROUP_"+groupName)
.and().entriesListContains("id", "GROUP_"+subGroupName)
.and().entriesListDoesNotContain("zones")
.and().paginationField("maxItems").is("10");
restClient.assertStatusCodeIs(HttpStatus.OK);
groupBody = Json.createObjectBuilder().add("displayName", "Z"+groupName).build();
groupBody = Json.createObjectBuilder().add("displayName", "Z"+groupName).add("description", "Z"+groupDescription).build();
String groupBodyUpdate = groupBody.toString();
//UpdateGroup:
restClient.withCoreAPI().usingGroups().updateGroupDetails("GROUP_"+groupName, groupBodyUpdate)
restClient.withCoreAPI().usingParams("include=description").usingGroups().updateGroupDetails("GROUP_"+groupName, groupBodyUpdate)
.assertThat().field("displayName").is("Z"+groupName)
.and().field("description").is("Z"+groupDescription)
.and().field("id").is("GROUP_"+groupName)
.and().field("zones").isNull();
restClient.assertStatusCodeIs(HttpStatus.OK);
//GetGroupDetails:
restClient.withCoreAPI().usingParams("include=zones").usingGroups().getGroupDetail("GROUP_"+groupName)
restClient.withCoreAPI().usingParams("include=zones,hasSubgroups").usingGroups().getGroupDetail("GROUP_"+groupName)
.assertThat().field("id").is("GROUP_"+groupName)
.and().field("zones").contains("APP.DEFAULT")
.and().field("isRoot").is(true);
.and().field("isRoot").is(true)
.and().field("hasSubgroups").is(true);
restClient.assertStatusCodeIs(HttpStatus.OK);
//DeleteChildGroup:
restClient.authenticateUser(adminUser).withCoreAPI().usingGroups().deleteGroup("GROUP_"+subGroupName);
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
//VerifyIfParentHasNoSubgroups:
restClient.withCoreAPI().usingParams("include=zones,hasSubgroups").usingGroups().getGroupDetail("GROUP_"+groupName)
.assertThat().field("id").is("GROUP_"+groupName)
.and().field("hasSubgroups").is(false);
restClient.assertStatusCodeIs(HttpStatus.OK);
//DeleteGroup:
@@ -83,9 +112,9 @@ public class GroupsTests extends RestTest
@Test(groups = { TestGroup.REST_API, TestGroup.GROUPS, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.NODES }, executionType = ExecutionType.SANITY,
description = "Verify creation, listing(only for person) and deletion of group memberships. ")
public void createListDeleteGroupMembership() throws Exception
public void createListDeleteGroupMembership()
{
String groupName = "ZtestGroup" + UUID.randomUUID().toString();
String groupName = "ZtestGroup" + UUID.randomUUID();
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).build();
String groupBodyCreate = groupBody.toString();
@@ -95,6 +124,7 @@ public class GroupsTests extends RestTest
JsonObject groupMembershipBody = Json.createObjectBuilder().add("id", userModel.getUsername()).add("memberType", "PERSON").build();
String groupMembershipBodyCreate = groupMembershipBody.toString();
//MembershipCreation:
//-ve
restClient.authenticateUser(userModel).withCoreAPI().usingGroups().createGroupMembership("GROUP_"+groupName, groupMembershipBodyCreate);
@@ -127,7 +157,7 @@ public class GroupsTests extends RestTest
description = "Verify listing of group memberships.")
public void listGroupMembership() throws Exception
{
String groupName = "testGroup" + UUID.randomUUID().toString();
String groupName = "testGroup" + UUID.randomUUID();
JsonObject groupBody = Json.createObjectBuilder().add("id", groupName).add("displayName", groupName).build();
String groupBodyCreate = groupBody.toString();
@@ -146,12 +176,10 @@ public class GroupsTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.CREATED);
//ListGroupMembership
RetryOperation op = new RetryOperation(){
public void execute() throws Exception{
restClient.withCoreAPI().usingGroups().listGroupMemberships("GROUP_"+groupName)
.assertThat().entriesListContains("id", userModel.getUsername());
restClient.assertStatusCodeIs(HttpStatus.OK);
}
RetryOperation op = () -> {
restClient.withCoreAPI().usingGroups().listGroupMemberships("GROUP_"+groupName)
.assertThat().entriesListContains("id", userModel.getUsername());
restClient.assertStatusCodeIs(HttpStatus.OK);
};
Utility.sleep(500, 35000, op);// Allow indexing to complete.
}

View File

@@ -4,18 +4,14 @@ import org.alfresco.dataprep.CMISUtil.DocumentType;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.RestProcessDefinitionModel;
import org.alfresco.rest.model.RestProcessModel;
import org.alfresco.rest.model.RestProcessModelsCollection;
import org.alfresco.utility.model.*;
import org.alfresco.utility.testrail.ExecutionType;
import org.alfresco.utility.testrail.annotation.TestRail;
import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Ignore;
import org.testng.annotations.Test;
import java.util.List;
/**
*
* @author Cristina Axinte
@@ -48,18 +44,16 @@ public class GetProcessesCoreTests extends RestTest
@TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW,TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION,
description = "Verify user gets all processes started by him ordered descending by id")
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.REGRESSION }, enabled = false)
@Ignore("Until ACS-6234 is done")
@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.REGRESSION })
public void getProcessesOrderedByIdDESC()
{
RestProcessModelsCollection processes = restClient.authenticateUser(userWhoStartsTask).withParams("orderBy=id DESC")
.withWorkflowAPI().getProcesses();
restClient.assertStatusCodeIs(HttpStatus.OK);
processes.assertThat().entriesListIsNotEmpty();
List<RestProcessModel> processesList = processes.getEntries();
processesList.get(0).onModel().assertThat().field("id").is(process3.getId());
processesList.get(1).onModel().assertThat().field("id").is(task2.getProcessId());
processesList.get(2).onModel().assertThat().field("id").is(task1.getProcessId());
processes.assertThat().entriesListIsNotEmpty()
.and().entriesListIsSortedDescBy("id")
.and().entrySetContains("id", task1.getProcessId(), task2.getProcessId(), process3.getId());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW,TestGroup.PROCESSES }, executionType = ExecutionType.REGRESSION,

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<developers>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<properties>

85
pom.xml
View File

@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -24,8 +24,8 @@
<properties>
<acs.version.major>23</acs.version.major>
<acs.version.minor>1</acs.version.minor>
<acs.version.revision>1</acs.version.revision>
<acs.version.minor>3</acs.version.minor>
<acs.version.revision>0</acs.version.revision>
<acs.version.label />
<amp.min.version>${acs.version.major}.0.0</amp.min.version>
@@ -51,20 +51,20 @@
<dependency.alfresco-server-root.version>7.0.1</dependency.alfresco-server-root.version>
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
<dependency.activiti.version>5.23.0</dependency.activiti.version>
<dependency.alfresco-transform-core.version>5.1.3</dependency.alfresco-transform-core.version>
<dependency.alfresco-transform-service.version>4.1.3</dependency.alfresco-transform-service.version>
<dependency.alfresco-transform-core.version>5.1.0</dependency.alfresco-transform-core.version>
<dependency.alfresco-transform-service.version>4.1.0</dependency.alfresco-transform-service.version>
<dependency.alfresco-greenmail.version>7.0</dependency.alfresco-greenmail.version>
<dependency.acs-event-model.version>0.0.24</dependency.acs-event-model.version>
<dependency.acs-event-model.version>0.0.27</dependency.acs-event-model.version>
<dependency.aspectj.version>1.9.20.1</dependency.aspectj.version>
<dependency.spring.version>6.0.12</dependency.spring.version>
<dependency.spring-security.version>6.1.4</dependency.spring-security.version>
<dependency.spring.version>6.0.17</dependency.spring.version>
<dependency.spring-security.version>6.2.2</dependency.spring-security.version>
<dependency.antlr.version>3.5.3</dependency.antlr.version>
<dependency.jackson.version>2.15.2</dependency.jackson.version>
<dependency.cxf.version>4.0.2</dependency.cxf.version>
<dependency.opencmis.version>1.0.0-jakarta-1</dependency.opencmis.version>
<dependency.webscripts.version>9.0</dependency.webscripts.version>
<dependency.bouncycastle.version>1.76</dependency.bouncycastle.version>
<dependency.bouncycastle.version>1.77</dependency.bouncycastle.version>
<dependency.mockito-core.version>5.4.0</dependency.mockito-core.version>
<dependency.assertj.version>3.24.2</dependency.assertj.version>
<dependency.org-json.version>20231013</dependency.org-json.version>
@@ -81,17 +81,16 @@
<dependency.slf4j.version>2.0.9</dependency.slf4j.version>
<dependency.log4j.version>2.20.0</dependency.log4j.version>
<dependency.groovy.version>3.0.19</dependency.groovy.version>
<dependency.tika.version>2.4.1</dependency.tika.version>
<dependency.tika.version>2.9.1</dependency.tika.version>
<dependency.truezip.version>7.7.10</dependency.truezip.version>
<dependency.poi.version>5.2.2</dependency.poi.version>
<dependency.poi-ooxml-lite.version>5.2.3</dependency.poi-ooxml-lite.version>
<dependency.poi.version>5.2.5</dependency.poi.version>
<dependency.jboss.logging.version>3.5.0.Final</dependency.jboss.logging.version>
<dependency.camel.version>4.0.0</dependency.camel.version> <!-- when bumping this version, please keep track/sync with included netty.io dependencies -->
<dependency.netty.version>4.1.96.Final</dependency.netty.version> <!-- must be in sync with camels transitive dependencies, e.g.: netty-common -->
<dependency.activemq.version>5.18.3</dependency.activemq.version>
<dependency.apache-compress.version>1.24.0</dependency.apache-compress.version>
<dependency.apache-compress.version>1.26.0</dependency.apache-compress.version>
<dependency.awaitility.version>4.2.0</dependency.awaitility.version>
<dependency.swagger-ui.version>3.38.0</dependency.swagger-ui.version>
<dependency.swagger-ui.version>4.1.3</dependency.swagger-ui.version>
<dependency.swagger-parser.version>1.0.67</dependency.swagger-parser.version>
<dependency.maven-filtering.version>3.1.1</dependency.maven-filtering.version>
<dependency.maven-artifact.version>3.8.6</dependency.maven-artifact.version>
@@ -111,17 +110,14 @@
<dependency.java-ee-activation.version>1.2.0</dependency.java-ee-activation.version>
<dependency.jakarta-ee-json-api.version>2.1.2</dependency.jakarta-ee-json-api.version>
<dependency.jakarta-ee-json-impl.version>1.1.4</dependency.jakarta-ee-json-impl.version>
<dependency.jakarta-json-path.version>2.8.0</dependency.jakarta-json-path.version>
<dependency.jakarta-json-path.version>2.9.0</dependency.jakarta-json-path.version>
<dependency.json-smart.version>2.5.0</dependency.json-smart.version>
<alfresco.googledrive.version>4.0.0</alfresco.googledrive.version>
<alfresco.aos-module.version>2.0.0</alfresco.aos-module.version>
<alfresco.api-explorer.version>23.1.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
<alfresco.googledrive.version>4.1.0</alfresco.googledrive.version>
<alfresco.aos-module.version>3.0.0</alfresco.aos-module.version>
<alfresco.api-explorer.version>23.2.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
<alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
<license-maven-plugin.version>2.0.1</license-maven-plugin.version>
<spotless-plugin.version>2.43.0</spotless-plugin.version>
<!-- Do not match any files by default, but this can be overridden from the command line. -->
<spotless-include-list>NO_AUTOMATED_FORMATTING</spotless-include-list>
<dependency.postgresql.version>42.6.0</dependency.postgresql.version>
<dependency.mysql.version>8.0.30</dependency.mysql.version>
@@ -155,7 +151,7 @@
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-community-repo</url>
<tag>HEAD</tag>
<tag>23.3.0.13</tag>
</scm>
<distributionManagement>
@@ -332,7 +328,7 @@
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.2-alfresco</version>
<version>2.7.3-alfresco</version>
<exclusions>
<!-- [ACS-544] Excluded to avoid conflict in JDK9+ as it includes javax.xml and w3c.org -->
<exclusion>
@@ -465,7 +461,7 @@
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>5.1.1</version>
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
@@ -653,17 +649,17 @@
<!-- Enforce newer version -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15to18</artifactId>
<artifactId>bcprov-jdk18on</artifactId>
<version>${dependency.bouncycastle.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15to18</artifactId>
<artifactId>bcmail-jdk18on</artifactId>
<version>${dependency.bouncycastle.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15to18</artifactId>
<artifactId>bcpkix-jdk18on</artifactId>
<version>${dependency.bouncycastle.version}</version>
</dependency>
<dependency>
@@ -1039,10 +1035,9 @@
</goals>
<phase>generate-resources</phase>
<configuration>
<failOnMissing>true</failOnMissing>
<excludedScopes>provided,test</excludedScopes>
<excludedGroups>^(org\.alfresco|com\.alfresco|org\.activiti).*</excludedGroups>
<failIfWarning>true</failIfWarning>
<failOnMissing>true</failOnMissing>
<includedLicenses>
https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/includedLicenses.txt
</includedLicenses>
@@ -1115,10 +1110,10 @@
<exclude>com.sun.xml.bind</exclude>
</excludes>
<includes>
<include>org.bouncycastle:bcprov-jdk15to18:[1.74,)</include>
<include>org.bouncycastle:bcmail-jdk15to18:[1.74,)</include>
<include>org.bouncycastle:bcpkix-jdk15to18:[1.74,)</include>
<include>org.bouncycastle:bcutil-jdk15to18:[1.74,)</include>
<include>org.bouncycastle:bcprov-jdk18on:[1.77,)</include>
<include>org.bouncycastle:bcmail-jdk18on:[1.77,)</include>
<include>org.bouncycastle:bcpkix-jdk18on:[1.77,)</include>
<include>org.bouncycastle:bcutil-jdk18on:[1.77,)</include>
</includes>
</bannedDependencies>
</rules>
@@ -1127,26 +1122,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-plugin.version}</version>
<configuration>
<java>
<includes>
${spotless-include-list}
</includes>
<eclipse>
<file>alfresco-formatter.xml</file>
</eclipse>
<importOrder>
<order>\#java|\#javax|\#jakarta,\#,\#org.alfresco,java|javax|jakarta,,org.alfresco</order>
</importOrder>
<removeUnusedImports />
<formatAnnotations />
</java>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
@@ -1158,10 +1133,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.1.1.13-SNAPSHOT</version>
<version>23.3.0.13</version>
</parent>
<dependencies>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</dependency>
<!-- newer version, see REPO-3133 -->
<dependency>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -57,7 +57,7 @@ public class ServerStatusWebScript extends AbstractWebScript implements Applicat
// hence providing ability for subsystem to be disabled (whilst still supporting ability to check status and/or dynamically start via JMX)
String isEnabled = (String)subsystem.getProperty("imap.server.enabled");
if (new Boolean(isEnabled).booleanValue())
if (Boolean.valueOf(isEnabled).booleanValue())
{
res.getWriter().write("enabled");
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -109,7 +109,7 @@ public class KeywordSearch extends DeclarativeWebScript
int startPage = 1;
try
{
startPage = new Integer(startPageArg);
startPage = Integer.valueOf(startPageArg);
}
catch(NumberFormatException e)
{
@@ -119,7 +119,7 @@ public class KeywordSearch extends DeclarativeWebScript
int itemsPerPage = DEFAULT_ITEMS_PER_PAGE;
try
{
itemsPerPage = new Integer(itemsPerPageArg);
itemsPerPage = Integer.valueOf(itemsPerPageArg);
}
catch(NumberFormatException e)
{

View File

@@ -133,7 +133,7 @@ public class QuickShareThumbnailContentGet extends QuickShareContentGet
String phString = req.getParameter("ph");
if (phString != null)
{
ph = new Boolean(phString);
ph = Boolean.valueOf(phString);
}
Scriptable scope = new BaseScopableProcessorExtension().getScope(); // note: required for ValueConverter (collection)

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -149,7 +149,7 @@ public class PatchThumbnailsAsRenditionsGet extends DeclarativeWebScript
}
Map<String, Object> model = new HashMap<String, Object>();
model.put("patchedNodeCount", new Long(patchedNodeRefs));
model.put("patchedNodeCount", Long.valueOf(patchedNodeRefs));
return model;
}

View File

@@ -34,6 +34,7 @@ import org.alfresco.repo.management.subsystems.ActivateableBean;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.external.AdminConsoleAuthenticator;
import org.alfresco.repo.security.authentication.external.RemoteUserMapper;
import org.alfresco.repo.web.auth.AuthenticationListener;
import org.alfresco.repo.web.auth.TicketCredentials;
@@ -67,16 +68,18 @@ import java.util.Set;
*/
public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactory
{
private static Log logger = LogFactory.getLog(RemoteUserAuthenticatorFactory.class);
private static final Log LOGGER = LogFactory.getLog(RemoteUserAuthenticatorFactory.class);
public static final long GET_REMOTE_USER_TIMEOUT_MILLISECONDS_DEFAULT = 10000L; // 10 sec
protected RemoteUserMapper remoteUserMapper;
protected AuthenticationComponent authenticationComponent;
protected AdminConsoleAuthenticator adminConsoleAuthenticator;
private boolean alwaysAllowBasicAuthForAdminConsole = true;
List<String> adminConsoleScriptFamilies;
long getRemoteUserTimeoutMilliseconds = GET_REMOTE_USER_TIMEOUT_MILLISECONDS_DEFAULT;
public void setRemoteUserMapper(RemoteUserMapper remoteUserMapper)
{
this.remoteUserMapper = remoteUserMapper;
@@ -117,6 +120,12 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
this.getRemoteUserTimeoutMilliseconds = getRemoteUserTimeoutMilliseconds;
}
public void setAdminConsoleAuthenticator(
AdminConsoleAuthenticator adminConsoleAuthenticator)
{
this.adminConsoleAuthenticator = adminConsoleAuthenticator;
}
@Override
public Authenticator create(WebScriptServletRequest req, WebScriptServletResponse res)
{
@@ -140,36 +149,46 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
{
boolean authenticated = false;
if (logger.isTraceEnabled())
if (LOGGER.isTraceEnabled())
{
logger.trace("Authenticate level required: " + required + " is guest: " + isGuest);
LOGGER.trace("Authenticate level required: " + required + " is guest: " + isGuest);
}
String userId = null;
if (isRemoteUserMapperActive())
{
if (isAlwaysAllowBasicAuthForAdminConsole())
{
final boolean useTimeoutForAdminAccessingAdminConsole = shouldUseTimeoutForAdminAccessingAdminConsole(required, isGuest);
if (useTimeoutForAdminAccessingAdminConsole && isBasicAuthHeaderPresentForAdmin())
{
return callBasicAuthForAdminConsoleAccess(required, isGuest);
}
try
{
userId = getRemoteUserWithTimeout(useTimeoutForAdminAccessingAdminConsole);
}
catch (AuthenticationTimeoutException e)
{
//return basic auth challenge
return false;
}
}
else
if (servletReq.getServiceMatch() != null &&
isAdminConsoleWebScript(servletReq.getServiceMatch().getWebScript()) && isAdminConsoleAuthenticatorActive())
{
// retrieve the remote user if configured and available - authenticate that user directly
userId = getRemoteUser();
userId = getAdminConsoleUser();
}
if (userId == null)
{
if (isAlwaysAllowBasicAuthForAdminConsole())
{
final boolean useTimeoutForAdminAccessingAdminConsole = shouldUseTimeoutForAdminAccessingAdminConsole(required, isGuest);
if (useTimeoutForAdminAccessingAdminConsole && isBasicAuthHeaderPresentForAdmin())
{
return callBasicAuthForAdminConsoleAccess(required, isGuest);
}
try
{
userId = getRemoteUserWithTimeout(useTimeoutForAdminAccessingAdminConsole);
}
catch (AuthenticationTimeoutException e)
{
//return basic auth challenge
return false;
}
}
else
{
// retrieve the remote user if configured and available - authenticate that user directly
userId = getRemoteUser();
}
}
}
@@ -208,9 +227,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
{
// Validate the ticket for the current SessionUser
authenticationService.validate(user.getTicket());
if (logger.isDebugEnabled())
if (LOGGER.isDebugEnabled())
{
logger.debug("Ticket is valid. Retaining cached user in session.");
LOGGER.debug("Ticket is valid. Retaining cached user in session.");
}
listener.userAuthenticated(new TicketCredentials(user.getTicket()));
authenticated = true;
@@ -222,9 +241,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
}
catch (AuthenticationException authErr)
{
if (logger.isDebugEnabled())
if (LOGGER.isDebugEnabled())
{
logger.debug("An Authentication error occur. Removing User session.", authErr);
LOGGER.debug("An Authentication error occur. Removing User session.", authErr);
}
session.removeAttribute(AuthenticationDriver.AUTHENTICATION_USER);
session.invalidate();
@@ -236,15 +255,20 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
authenticated = super.authenticate(required, isGuest);
}
}
if(!authenticated && servletReq.getServiceMatch() != null &&
isAdminConsoleWebScript(servletReq.getServiceMatch().getWebScript()) && isAdminConsoleAuthenticatorActive())
{
adminConsoleAuthenticator.requestAuthentication(this.servletReq.getHttpServletRequest(), this.servletRes.getHttpServletResponse());
}
return authenticated;
}
private boolean callBasicAuthForAdminConsoleAccess(RequiredAuthentication required, boolean isGuest)
{
// return REST call, after a timeout/basic auth challenge
if (logger.isTraceEnabled())
if (LOGGER.isTraceEnabled())
{
logger.trace("An Admin Console request has come in with Basic Auth headers present for an admin user.");
LOGGER.trace("An Admin Console request has come in with Basic Auth headers present for an admin user.");
}
// In order to prompt for another password, in case it was not entered correctly,
// the output of this method should be returned by the calling "authenticate" method;
@@ -258,9 +282,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
boolean useTimeoutForAdminAccessingAdminConsole = RequiredAuthentication.admin.equals(required) && !isGuest &&
servletReq.getServiceMatch() != null && isAdminConsoleWebScript(servletReq.getServiceMatch().getWebScript());
if (logger.isTraceEnabled())
if (LOGGER.isTraceEnabled())
{
logger.trace("Should ensure that the admins can login with basic auth: " + useTimeoutForAdminAccessingAdminConsole);
LOGGER.trace("Should ensure that the admins can login with basic auth: " + useTimeoutForAdminAccessingAdminConsole);
}
return useTimeoutForAdminAccessingAdminConsole;
}
@@ -270,6 +294,11 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
return remoteUserMapper != null && (!(remoteUserMapper instanceof ActivateableBean) || ((ActivateableBean) remoteUserMapper).isActive());
}
private boolean isAdminConsoleAuthenticatorActive()
{
return adminConsoleAuthenticator != null && (!(adminConsoleAuthenticator instanceof ActivateableBean) || ((ActivateableBean) adminConsoleAuthenticator).isActive());
}
protected boolean isAdminConsoleWebScript(WebScript webScript)
{
if (webScript == null || adminConsoleScriptFamilies == null || webScript.getDescription() == null
@@ -278,9 +307,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
return false;
}
if (logger.isTraceEnabled())
if (LOGGER.isTraceEnabled())
{
logger.trace("WebScript: " + webScript + " has these families: " + webScript.getDescription().getFamilys());
LOGGER.trace("WebScript: " + webScript + " has these families: " + webScript.getDescription().getFamilys());
}
// intersect the "family" sets defined
@@ -288,9 +317,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
families.retainAll(adminConsoleScriptFamilies);
final boolean isAdminConsole = !families.isEmpty();
if (logger.isTraceEnabled() && isAdminConsole)
if (LOGGER.isTraceEnabled() && isAdminConsole)
{
logger.trace("Detected an Admin Console webscript: " + webScript );
LOGGER.trace("Detected an Admin Console webscript: " + webScript);
}
return isAdminConsole;
@@ -316,7 +345,7 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
}
catch (Exception e)
{
logger.warn("Exception trying to get the remote user: " + e.getMessage(), e);
LOGGER.warn("Exception trying to get the remote user: " + e.getMessage(), e);
}
returnedRemoteUser = getRemoteUserRunnable.getReturnedRemoteUser();
@@ -330,9 +359,9 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
final String message = "Could not get the remote user in a reasonable time: " + getRemoteUserTimeoutMilliseconds + " milliseconds. "
+ "Adjust the timeout property 'authentication.getRemoteUserTimeoutMilliseconds' if required.";
if (logger.isWarnEnabled())
if (LOGGER.isWarnEnabled())
{
logger.warn("Returning basic auth challenge for Admin Console. Cause: " + message);
LOGGER.warn("Returning basic auth challenge for Admin Console. Cause: " + message);
}
HttpServletResponse res = servletRes.getHttpServletResponse();
res.setStatus(401);
@@ -379,15 +408,29 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
private void logRemoteUserID(String userId)
{
if (logger.isDebugEnabled())
if (LOGGER.isDebugEnabled())
{
String message = (userId == null) ?
"No external user ID in request." :
"Extracted external user ID from request: " + AuthenticationUtil.maskUsername(userId);
logger.debug(message);
LOGGER.debug(message);
}
}
protected String getAdminConsoleUser()
{
String userId = null;
if (isRemoteUserMapperActive())
{
userId = adminConsoleAuthenticator.getAdminConsoleUser(this.servletReq.getHttpServletRequest(), this.servletRes.getHttpServletResponse());
}
logRemoteUserID(userId);
return userId;
}
class GetRemoteUserRunnable implements Runnable
{
private volatile String returnedRemoteUser;

View File

@@ -175,6 +175,10 @@ public class NodesMetaDataGet extends DeclarativeWebScript
{
filter.setIncludeChildIds(o.getBoolean("includeChildIds"));
}
if(o.has("includeChildAssociations"))
{
filter.setIncludeChildAssociations(o.getBoolean("includeChildAssociations"));
}
if(o.has("includeTxnId"))
{
filter.setIncludeTxnId(o.getBoolean("includeTxnId"));

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -165,7 +165,7 @@ public class Paging
{
try
{
pageNo = new Integer(strPageNo);
pageNo = Integer.valueOf(strPageNo);
}
catch(NumberFormatException e) {};
}
@@ -177,7 +177,7 @@ public class Paging
{
try
{
pageSize = new Integer(strPageSize);
pageSize = Integer.valueOf(strPageSize);
}
catch(NumberFormatException e) {};
}
@@ -189,7 +189,7 @@ public class Paging
{
try
{
skipCount = new Integer(strSkipCount);
skipCount = Integer.valueOf(strSkipCount);
}
catch(NumberFormatException e) {};
}
@@ -201,7 +201,7 @@ public class Paging
{
try
{
maxItems = new Integer(strMaxItems);
maxItems = Integer.valueOf(strMaxItems);
}
catch(NumberFormatException e) {};
}

View File

@@ -351,7 +351,7 @@ public class WebDAV
}
else if (davPropName.equals(WebDAV.XML_GET_CONTENT_LENGTH))
{
value = new Long(contentData.getSize());
value = Long.valueOf(contentData.getSize());
}
}
return value;

View File

@@ -40,8 +40,10 @@ public interface Groups
{
String PARAM_ID = "id";
String PARAM_DISPLAY_NAME = "displayName";
String PARAM_INCLUDE_DESCRIPTION = "description";
String PARAM_INCLUDE_PARENT_IDS = "parentIds";
String PARAM_INCLUDE_ZONES = "zones";
String PARAM_INCLUDE_HAS_SUBGROUPS = "hasSubgroups";
String PARAM_IS_ROOT = "isRoot";
String PARAM_CASCADE = "cascade";
String PARAM_MEMBER_TYPE = "memberType";

View File

@@ -109,11 +109,11 @@ public class NetworkWebScriptGet extends ApiWebScript implements ResponseWriter
}
catch (ApiException | WebScriptException apiException)
{
renderException(apiException, res, assistant);
renderException(apiException, res, req, assistant);
}
catch (RuntimeException runtimeException)
{
renderException(runtimeException, res, assistant);
renderException(runtimeException, res, req, assistant);
}
}
}

View File

@@ -118,11 +118,11 @@ public class NetworksWebScriptGet extends ApiWebScript implements RecognizedPara
}
catch (ApiException | WebScriptException apiException)
{
renderException(apiException, res, assistant);
renderException(apiException, res, req, assistant);
}
catch (RuntimeException runtimeException)
{
renderException(runtimeException, res, assistant);
renderException(runtimeException, res, req, assistant);
}
}
}

View File

@@ -143,7 +143,7 @@ public class PublicApiTenantWebScriptServletRuntime extends TenantWebScriptServl
else
{
try {
renderException((Exception)exception, response, apiAssistant);
renderException((Exception)exception, response, request, apiAssistant);
} catch (IOException e) {
logger.error("Internal error", e);
throw new WebScriptException("Internal error", e);

View File

@@ -27,6 +27,7 @@ package org.alfresco.rest.api.impl;
import static org.alfresco.repo.security.authentication.AuthenticationUtil.runAsSystem;
import java.io.Serializable;
import java.text.Collator;
import java.util.AbstractList;
import java.util.ArrayList;
@@ -40,6 +41,7 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.alfresco.model.ContentModel;
import org.alfresco.query.CannedQueryPageDetails;
import org.alfresco.query.EmptyPagingResults;
import org.alfresco.query.PagingRequest;
@@ -71,8 +73,10 @@ import org.alfresco.rest.workflow.api.impl.MapBasedQueryWalkerOrSupported;
import org.alfresco.service.cmr.security.AuthorityService;
import org.alfresco.service.cmr.security.AuthorityType;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.AlfrescoCollator;
import org.alfresco.util.Pair;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.extensions.surf.util.I18NUtil;
@@ -101,9 +105,9 @@ public class GroupsImpl implements Groups
}
// List groups filtering (via where clause)
private final static Set<String> LIST_GROUPS_EQUALS_QUERY_PROPERTIES = new HashSet<>(Arrays.asList(new String[] { PARAM_IS_ROOT }));
private final static Set<String> LIST_GROUPS_EQUALS_QUERY_PROPERTIES = new HashSet<>(List.of(PARAM_IS_ROOT));
private final static Set<String> LIST_GROUP_MEMBERS_QUERY_PROPERTIES = new HashSet<>(Arrays.asList(new String[] { PARAM_MEMBER_TYPE }));
private final static Set<String> LIST_GROUP_MEMBERS_QUERY_PROPERTIES = new HashSet<>(List.of(PARAM_MEMBER_TYPE));
protected AuthorityService authorityService;
private AuthorityDAO authorityDAO;
@@ -142,7 +146,12 @@ public class GroupsImpl implements Groups
authorityDisplayName = group.getDisplayName();
}
String authority = authorityService.createAuthority(AuthorityType.GROUP, group.getId(), authorityDisplayName, authorityZones);
Map<QName, Serializable> props = new HashMap<>();
if (group.getDescription() != null)
{
props.put(ContentModel.PROP_DESCRIPTION, group.getDescription());
}
String authority = authorityService.createAuthority(AuthorityType.GROUP, group.getId(), authorityDisplayName, authorityZones, props);
// Set a given child authority to be included by the given parent
// authorities.
@@ -161,7 +170,14 @@ public class GroupsImpl implements Groups
try
{
authorityService.setAuthorityDisplayName(groupId, group.getDisplayName());
if (group.getDescription() != null)
{
authorityService.setAuthorityDisplayNameAndDescription(groupId, group.getDisplayName(), group.getDescription());
}
else
{
authorityService.setAuthorityDisplayName(groupId, group.getDisplayName());
}
}
catch (AuthorityException ae)
{
@@ -173,10 +189,10 @@ public class GroupsImpl implements Groups
public Group getGroup(String groupId, Parameters parameters) throws EntityNotFoundException
{
AuthorityInfo authorityInfo = getAuthorityInfo(groupId);
final List<String> includeParam = parameters.getInclude();
AuthorityInfo authorityInfo = getAuthorityInfo(groupId, includeParam.contains(PARAM_INCLUDE_DESCRIPTION));
final Set<String> rootAuthorities = getAllRootAuthorities(AuthorityType.GROUP);
final List<String> includeParam = parameters.getInclude();
return getGroup(authorityInfo, includeParam, rootAuthorities);
}
@@ -196,7 +212,7 @@ public class GroupsImpl implements Groups
PagingResults<AuthorityInfo> pagingResult;
try
{
pagingResult = getAuthoritiesInfo(authorityType, groupsFilters, rootAuthorities, sortProp, paging);
pagingResult = getAuthoritiesInfo(authorityType, groupsFilters, rootAuthorities, sortProp, paging, parameters.getInclude().contains(PARAM_INCLUDE_DESCRIPTION));
}
catch (UnknownAuthorityException e)
{
@@ -213,7 +229,7 @@ public class GroupsImpl implements Groups
private List<Group> createGroupsResponse(final List<AuthorityInfo> page, final List<String> includeParam, final Set<String> rootAuthorities)
{
List<Group> groups = new AbstractList<Group>()
List<Group> groups = new AbstractList<>()
{
@Override
public Group get(int index)
@@ -336,7 +352,7 @@ public class GroupsImpl implements Groups
filter(a -> a.startsWith(AuthorityType.GROUP.getPrefixString())).
filter(a -> isRootPredicate(finalIsRootParam, rootAuthorities, a)).
filter(a -> zonePredicate(a, finalZoneFilter)).
map(this::getAuthorityInfo).
map(a -> getAuthorityInfo(a, includeParam.contains(PARAM_INCLUDE_DESCRIPTION))).
sorted(new AuthorityInfoComparator(sortProp.getFirst(), sortProp.getSecond())).
collect(Collectors.toList());
@@ -355,23 +371,25 @@ public class GroupsImpl implements Groups
}
private PagingResults<AuthorityInfo> getAuthoritiesInfo(AuthorityType authorityType, GroupsFilter groupsFilter, Set<String> rootAuthorities,
Pair<String, Boolean> sortProp, Paging paging)
Pair<String, Boolean> sortProp, Paging paging, boolean includeDescription)
{
Boolean isRootParam = groupsFilter.getIsRoot();
String zoneFilter = groupsFilter.getZoneFilter();
String displayNameFilter = groupsFilter.getDisplayNameFilter();
PagingResults<AuthorityInfo> pagingResult;
if (isRootParam != null || displayNameFilter != null)
// Don't use canned queries when fetching authorities with description
// if better performance is requested for loading descriptions we can add canned queries in the future
if (isRootParam != null || displayNameFilter != null || includeDescription)
{
List<AuthorityInfo> groupList;
if (isRootParam != null && isRootParam)
if ((isRootParam != null && isRootParam) || includeDescription)
{
// Limit the post processing work by using the already loaded
// list of root authorities.
List<AuthorityInfo> authorities = rootAuthorities.stream().
map(this::getAuthorityInfo).
map(auth -> getAuthorityInfo(auth, includeDescription)).
filter(auth -> zonePredicate(auth.getAuthorityName(), zoneFilter)).
filter(auth -> displayNamePredicate(auth.getAuthorityDisplayName(), displayNameFilter)).
collect(Collectors.toList());
@@ -526,9 +544,9 @@ public class GroupsImpl implements Groups
* The authority name.
* @return The authority info.
*/
private AuthorityInfo getAuthorityInfo(String id)
private AuthorityInfo getAuthorityInfo(String id, boolean includeDescription)
{
return getAuthorityInfo(id, false);
return getAuthorityInfo(id, includeDescription, false);
}
/**
@@ -537,11 +555,13 @@ public class GroupsImpl implements Groups
*
* @param id
* The authority name.
* @param includeDescription
* True if description should be loaded
* @param defaultDisplayNameIfNull
* True if we would like to get a default value (e.g. shortName of the authority) if the authority display name is null.
* @return The authority info.
*/
private AuthorityInfo getAuthorityInfo(String id, boolean defaultDisplayNameIfNull)
private AuthorityInfo getAuthorityInfo(String id, boolean includeDescription, boolean defaultDisplayNameIfNull)
{
if (id == null || id.isEmpty())
{
@@ -554,9 +574,20 @@ public class GroupsImpl implements Groups
throw new EntityNotFoundException(id);
}
String authorityDisplayName = getAuthorityDisplayName(id, defaultDisplayNameIfNull);
String authorityDisplayName;
String description = null;
return new AuthorityInfo(null, authorityDisplayName, id);
if (includeDescription)
{
Pair<String, String> displayNameAndDescription = getAuthorityDisplayNameAndDescription(id, defaultDisplayNameIfNull);
authorityDisplayName = displayNameAndDescription.getFirst();
description = displayNameAndDescription.getSecond();
}
else
{
authorityDisplayName = getAuthorityDisplayName(id, defaultDisplayNameIfNull);
}
return new AuthorityInfo(null, authorityDisplayName, id, description);
}
private String getAuthorityDisplayName(String id, boolean defaultDisplayNameIfNull)
@@ -564,6 +595,11 @@ public class GroupsImpl implements Groups
return defaultDisplayNameIfNull ? authorityService.getAuthorityDisplayName(id) : authorityDAO.getAuthorityDisplayName(id);
}
private Pair<String, String> getAuthorityDisplayNameAndDescription(String id, boolean defaultDisplayNameIfNull)
{
return defaultDisplayNameIfNull ? authorityService.getAuthorityDisplayNameAndDescription(id) : authorityDAO.getAuthorityDisplayNameAndDescription(id);
}
private Group getGroup(AuthorityInfo authorityInfo, List<String> includeParam, Set<String> rootAuthorities)
{
if (authorityInfo == null)
@@ -576,13 +612,23 @@ public class GroupsImpl implements Groups
// REPO-1743
String authorityDisplayName = authorityInfo.getAuthorityDisplayName();
String description = authorityInfo.getDescription();
if (authorityDisplayName == null || authorityDisplayName.isEmpty())
{
authorityDisplayName = authorityService.getAuthorityDisplayName(authorityInfo.getAuthorityName());
if (includeParam != null && includeParam.contains(PARAM_INCLUDE_DESCRIPTION))
{
Pair<String, String> displayNameAndDescription = authorityService.getAuthorityDisplayNameAndDescription(authorityInfo.getAuthorityName());
authorityDisplayName = displayNameAndDescription.getFirst();
description = displayNameAndDescription.getSecond();
}
else
{
authorityDisplayName = authorityService.getAuthorityDisplayName(authorityInfo.getAuthorityName());
}
}
group.setDisplayName(authorityDisplayName);
group.setDescription(description);
group.setIsRoot(isRootAuthority(rootAuthorities, authorityInfo.getAuthorityName()));
// Optionally include
@@ -606,6 +652,19 @@ public class GroupsImpl implements Groups
Set<String> authorityZones = authorityService.getAuthorityZones(authorityInfo.getAuthorityName());
group.setZones(authorityZones);
}
if (includeParam.contains(PARAM_INCLUDE_HAS_SUBGROUPS))
{
Set<String> containedAuthorities;
try
{
containedAuthorities = authorityService.getContainedAuthorities(AuthorityType.GROUP, authorityInfo.getAuthorityName(), true);
} catch (UnknownAuthorityException e)
{
containedAuthorities = Collections.emptySet();
}
group.setHasSubgroups(CollectionUtils.isNotEmpty(containedAuthorities));
}
}
return group;
@@ -621,7 +680,7 @@ public class GroupsImpl implements Groups
Pair<String, Boolean> sortProp;
List<SortColumn> sortCols = parameters.getSorting();
if ((sortCols != null) && (sortCols.size() > 0))
if (sortCols != null && !sortCols.isEmpty())
{
if (sortCols.size() > 1)
{
@@ -636,7 +695,7 @@ public class GroupsImpl implements Groups
throw new InvalidArgumentException("Invalid sort field: " + sortCol.column);
}
sortProp = new Pair<>(sortPropName, (sortCol.asc ? Boolean.TRUE : Boolean.FALSE));
sortProp = new Pair<>(sortPropName, sortCol.asc ? Boolean.TRUE : Boolean.FALSE);
}
else
{
@@ -851,7 +910,6 @@ public class GroupsImpl implements Groups
validateGroupMemberId(groupMemberId);
// Verify if groupMemberId is member of groupId
AuthorityType authorityType = AuthorityType.getAuthorityType(groupMemberId);
Set<String> parents = authorityService.getContainingAuthorities(AuthorityType.GROUP, groupMemberId, true);
if (!parents.contains(groupId))
{
@@ -894,7 +952,7 @@ public class GroupsImpl implements Groups
}
List<AuthorityInfo> authorityInfoList = new ArrayList<>(authorities.size());
authorityInfoList.addAll(authorities.stream().map(this::getAuthorityInfo).collect(Collectors.toList()));
authorityInfoList.addAll(authorities.stream().map(auth -> getAuthorityInfo(auth, false)).collect(Collectors.toList()));
// Post process sorting - this should be moved to service
// layer. It is done here because sorting is not supported at
@@ -943,7 +1001,7 @@ public class GroupsImpl implements Groups
private GroupMember getGroupMember(String authorityId)
{
AuthorityInfo authorityInfo = getAuthorityInfo(authorityId);
AuthorityInfo authorityInfo = getAuthorityInfo(authorityId, false);
return getGroupMember(authorityInfo);
}
@@ -1014,6 +1072,10 @@ public class GroupsImpl implements Groups
{
throw new InvalidArgumentException("Group update does not support field: zones");
}
if (group.wasSet(Group.HAS_SUBGROUPS))
{
throw new InvalidArgumentException("Group update does not support field: hasSubgroups");
}
}
}
@@ -1054,7 +1116,7 @@ public class GroupsImpl implements Groups
{
String name = inferPrefix ? authorityService.getName(authorityType, authorityName) : authorityName;
return (name != null && authorityService.authorityExists(name));
return name != null && authorityService.authorityExists(name);
}
private boolean isGroupAuthority(String authorityName)

View File

@@ -42,7 +42,9 @@ public class Group implements Comparable<Group>
protected String id; // group id (aka authority name)
protected String displayName;
protected String description;
protected Boolean isRoot;
protected Boolean hasSubgroups;
protected Set<String> parentIds;
protected Set<String> zones;
@@ -50,7 +52,9 @@ public class Group implements Comparable<Group>
public static final String ID = "id";
public static final String DISPLAY_NAME = "displayName";
public static final String DESCRIPTION = "description";
public static final String IS_ROOT = "isRoot";
public static final String HAS_SUBGROUPS = "hasSubgroups";
public static final String PARENT_IDS = "parentIds";
public static final String ZONES = "zones";
@@ -81,6 +85,14 @@ public class Group implements Comparable<Group>
setFields.put(DISPLAY_NAME, true);
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Boolean getIsRoot()
{
return isRoot;
@@ -92,6 +104,14 @@ public class Group implements Comparable<Group>
setFields.put(IS_ROOT, true);
}
public Boolean getHasSubgroups() {
return hasSubgroups;
}
public void setHasSubgroups(Boolean hasSubgroups) {
this.hasSubgroups = hasSubgroups;
}
public Set<String> getParentIds()
{
return parentIds;
@@ -154,12 +174,13 @@ public class Group implements Comparable<Group>
@Override
public String toString()
{
return "Group [id=" + id + ", displayName=" + displayName + ", isRoot=" + isRoot + "]";
return "Group [id=" + id + ", displayName=" + displayName + ", description=" + description
+ ", isRoot=" + isRoot + ", hasSubgroups=" + hasSubgroups + "]";
}
public boolean wasSet(String fieldName)
{
Boolean b = setFields.get(fieldName);
return (b != null ? b : false);
return b != null && b;
}
}

View File

@@ -108,7 +108,7 @@ public class SearchApiWebscript extends AbstractWebScript implements RecognizedP
renderJsonResponse(webScriptResponse, toRender, assistant.getJsonHelper());
} catch (Exception exception) {
renderException(exception,webScriptResponse,assistant);
renderException(exception,webScriptResponse,webScriptRequest,assistant);
}
}

View File

@@ -102,11 +102,11 @@ public class SearchSQLApiWebscript extends AbstractWebScript implements Recogniz
{
if (exception instanceof QueryParserException)
{
renderException(exception,res,assistant);
renderException(exception,res,webScriptRequest,assistant);
}
else
{
renderException(new WebScriptException(400, exception.getMessage()), res, assistant);
renderException(new WebScriptException(400, exception.getMessage()), res, webScriptRequest, assistant);
}
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -56,7 +56,7 @@ public class SearchSQLQuery
this.stmt = stmt;
this.format = format != null ? format : "default";
this.locales = locales != null ? locales : Collections.emptyList();
this.itemLimit = itemLimit == null || itemLimit < 1 ? new Integer(1000) : itemLimit;
this.itemLimit = itemLimit == null || itemLimit < 1 ? Integer.valueOf(1000) : itemLimit;
this.includeMetadata = includeMetadata;
this.timezone = timezone;
this.filterQueries = filterQueries != null ? filterQueries : Collections.emptyList();

View File

@@ -104,13 +104,9 @@ public class JacksonHelper implements InitializingBean
JsonGenerator generator = objectMapper.getFactory().createGenerator(outStream, encoding);
writer.writeContents(generator, objectMapper);
}
catch (JsonMappingException error)
catch (JsonMappingException | JsonGenerationException error)
{
logger.error("Failed to write Json output", error);
}
catch (JsonGenerationException generror)
{
logger.error("Failed to write Json output", generror);
throw new IOException("Failed to write Json output", error);
}
}

View File

@@ -26,37 +26,34 @@
package org.alfresco.rest.framework.tools;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.alfresco.rest.framework.Api;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.rest.framework.core.exceptions.DefaultExceptionResolver;
import org.alfresco.rest.framework.core.exceptions.ErrorResponse;
import org.alfresco.rest.framework.core.exceptions.UnsupportedResourceOperationException;
import org.alfresco.rest.framework.jacksonextensions.BeanPropertiesFilter;
import org.alfresco.rest.framework.jacksonextensions.ExecutionResult;
import org.alfresco.rest.framework.jacksonextensions.JacksonHelper;
import org.alfresco.rest.framework.resource.SerializablePagedCollection;
import org.alfresco.rest.framework.resource.content.BinaryResource;
import org.alfresco.rest.framework.resource.content.ContentInfo;
import org.alfresco.rest.framework.resource.content.ContentInfoImpl;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Params;
import org.alfresco.rest.framework.webscripts.WithResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.simple.JSONObject;
import org.springframework.beans.BeanUtils;
import org.springframework.extensions.surf.util.I18NUtil;
import org.springframework.extensions.webscripts.*;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Description;
import org.springframework.extensions.webscripts.Format;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.springframework.extensions.webscripts.WrappingWebScriptResponse;
import org.springframework.extensions.webscripts.servlet.WebScriptServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
/*
* Writes to the response
@@ -193,24 +190,52 @@ public interface ResponseWriter
default void renderErrorResponse(final ErrorResponse errorResponse, final WebScriptResponse res, final JacksonHelper jsonHelper)
throws IOException
{
renderErrorResponse(errorResponse, res, null, jsonHelper);
}
String logId = "";
if (Status.STATUS_INTERNAL_SERVER_ERROR == errorResponse.getStatusCode() || resWriterLogger().isDebugEnabled())
{
logId = org.alfresco.util.GUID.generate();
resWriterLogger().error(logId + " : " + errorResponse.getStackTrace());
}
/**
* Renders a JSON error response
*
* @param errorResponse The error
* @param res web script response
* @param req web script request
* @throws IOException
*/
default void renderErrorResponse(final ErrorResponse errorResponse, final WebScriptResponse res, final WebScriptRequest req,
final JacksonHelper jsonHelper) throws IOException
{
String stackMessage = I18NUtil.getMessage(DefaultExceptionResolver.STACK_MESSAGE_ID);
String logId = org.alfresco.util.GUID.generate();
final ErrorResponse errorToWrite = new ErrorResponse(errorResponse.getErrorKey(), errorResponse.getStatusCode(),
errorResponse.getBriefSummary(), stackMessage, logId, errorResponse.getAdditionalState(), DefaultExceptionResolver.ERROR_URL);
errorResponse.getBriefSummary(), stackMessage, logId, errorResponse.getAdditionalState(),
DefaultExceptionResolver.ERROR_URL);
String reqUrl = (req != null) ? req.getURL() : "unknown";
String userName = AuthenticationUtil.getFullyAuthenticatedUser() != null ? AuthenticationUtil.getFullyAuthenticatedUser()
: "unauthenticated user";
// If internal server error or class in debug then print the stack trace
if (Status.STATUS_INTERNAL_SERVER_ERROR == errorResponse.getStatusCode() || resWriterLogger().isDebugEnabled())
{
resWriterLogger().error("Exception " + errorToWrite.getLogId() + ". Request " + reqUrl + " executed by " + userName
+ " returned status code " + errorResponse.getStatusCode() + " with message: "
+ errorResponse.getBriefSummary() + " - Stack Trace: " + errorResponse.getStackTrace());
}
else
{
resWriterLogger().error("Exception " + errorToWrite.getLogId() + ". Request " + reqUrl + " executed by user "
+ userName + " returned status code " + errorResponse.getStatusCode() + " with message: "
+ errorResponse.getBriefSummary() + " - Increase logging on " + this.getClass().getName()
+ " for stack trace.");
}
setContentInfoOnResponse(res, DEFAULT_JSON_CONTENT);
// Status must be set before the response is written by Jackson (which will by default close and commit the response).
// In a r/w txn, web script buffered responses ensure that it doesn't really matter but for r/o txns this is important.
// Status must be set before the response is written by Jackson (which will by default close and commit the
// response).
// In a r/w txn, web script buffered responses ensure that it doesn't really matter but for r/o txns this is
// important.
res.setStatus(errorToWrite.getStatusCode());
jsonHelper.withWriter(res.getOutputStream(), new JacksonHelper.Writer()
@@ -218,7 +243,7 @@ public interface ResponseWriter
@SuppressWarnings("unchecked")
@Override
public void writeContents(JsonGenerator generator, ObjectMapper objectMapper)
throws JsonGenerationException, JsonMappingException, IOException
throws JsonGenerationException, JsonMappingException, IOException
{
JSONObject obj = new JSONObject();
obj.put("error", errorToWrite);
@@ -236,7 +261,21 @@ public interface ResponseWriter
*/
default void renderException(final Exception exception, final WebScriptResponse response, final ApiAssistant assistant) throws IOException
{
renderErrorResponse(assistant.resolveException(exception), response, assistant.getJsonHelper());
renderException(exception, response, null, assistant);
}
/**
* Renders an exception to the output stream as Json.
*
* @param exception
* @param response
* @param request
* @throws IOException
*/
default void renderException(final Exception exception, final WebScriptResponse response, final WebScriptRequest request,
final ApiAssistant assistant) throws IOException
{
renderErrorResponse(assistant.resolveException(exception), response, request, assistant.getJsonHelper());
}
/**

View File

@@ -180,15 +180,15 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
}
catch (ContentIOException cioe)
{
handleContentIOException(res, cioe);
handleContentIOException(res, req, cioe);
}
catch (AlfrescoRuntimeException | ApiException | WebScriptException xception )
{
renderException(xception, res, assistant);
renderException(xception, res, req, assistant);
}
catch (RuntimeException runtimeException)
{
renderException(runtimeException, res, assistant);
renderException(runtimeException, res, req, assistant);
}
finally
{
@@ -224,17 +224,17 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
return toReturn;
}
private void handleContentIOException(final WebScriptResponse res, ContentIOException exception) throws IOException
private void handleContentIOException(final WebScriptResponse res, final WebScriptRequest req, ContentIOException exception) throws IOException
{
// If the Content-Length is not set back to -1 any client will expect to receive binary and will hang until it times out
res.setHeader(HEADER_CONTENT_LENGTH, String.valueOf(-1));
if (exception instanceof ArchivedIOException)
{
renderException(new ArchivedContentException(exception.getMsgId(), exception), res, assistant);
renderException(new ArchivedContentException(exception.getMsgId(), exception), res, req, assistant);
}
else
{
renderException(exception, res, assistant);
renderException(exception, res, req, assistant);
}
}

View File

@@ -72,7 +72,7 @@ public class CORSContextListener implements ServletContextListener
WebApplicationContext wc = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
Properties gP = (Properties) wc.getBean(BEAN_GLOBAL_PROPERTIES);
Boolean corsEnabled = new Boolean(gP.getProperty(CORS_ENABLED));
Boolean corsEnabled = Boolean.valueOf(gP.getProperty(CORS_ENABLED));
if(logger.isDebugEnabled())
{

View File

@@ -213,6 +213,7 @@
<property name="authenticationComponent" ref="authenticationComponent" />
<property name="authenticationListener" ref="webScriptAuthenticationListener"/>
<property name="remoteUserMapper" ref="RemoteUserMapper" />
<property name="adminConsoleAuthenticator" ref="AdminConsoleAuthenticator" />
<property name="alwaysAllowBasicAuthForAdminConsole">
<value>${authentication.alwaysAllowBasicAuthForAdminConsole.enabled}</value>
</property>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -146,7 +146,7 @@ public class AdminWebScriptTest extends BaseWebScriptTest
RepoUsage usage = usageStatus.getUsage();
LicenseDescriptor licenseDescriptor = descriptorService.getLicenseDescriptor();
Date validUntil = (licenseDescriptor == null) ? null : licenseDescriptor.getValidUntil(); // might be null
Integer checkLevel = new Integer(usageStatus.getLevel().ordinal());
Integer checkLevel = Integer.valueOf(usageStatus.getLevel().ordinal());
String url = "/api/admin/usage";
TestWebScriptServer.GetRequest req = new TestWebScriptServer.GetRequest(url);

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -445,7 +445,7 @@ public class AuditWebScriptTest extends BaseWebScriptTest
Thread.sleep(1000);
}
assertTrue("Expected at least one entry", jsonEntries.length() > 0);
assertEquals("Entry count and physical count don't match", new Long(jsonEntries.length()), entryCount);
assertEquals("Entry count and physical count don't match", Long.valueOf(jsonEntries.length()), entryCount);
JSONObject jsonEntry = jsonEntries.getJSONObject(0);
Long entryId = jsonEntry.getLong(AbstractAuditWebScript.JSON_KEY_ENTRY_ID);
assertNotNull("No entry ID", entryId);
@@ -483,7 +483,7 @@ public class AuditWebScriptTest extends BaseWebScriptTest
assertTrue("Should have found entries", jsonEntries.length() > 0);
// Now login with failure using a GUID and ensure that we can find it
String missingUser = new Long(System.currentTimeMillis()).toString();
String missingUser = Long.valueOf(System.currentTimeMillis()).toString();
// Query for event that has not happened
url = "/api/audit/query/" + APP_REPOTEST_NAME + "/repositorytest/login/error/user" + "?value=" + missingUser;

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -147,7 +147,7 @@ public class QuickShareRestApiTest extends BaseWebScriptTest
userOneHome = repositoryHelper.getUserHome(personService.getPerson(USER_ONE));
// no pun intended
quickFile = AbstractContentTransformerTest.loadQuickTestFile("jpg");
TEST_CONTENT = new byte[new Long(quickFile.length()).intValue()];
TEST_CONTENT = new byte[Long.valueOf(quickFile.length()).intValue()];
new FileInputStream(quickFile).read(TEST_CONTENT);
testNode = createTestFile(userOneHome, TEST_NAME, quickFile);

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -913,8 +913,8 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
{
String[] parts = currentVersionLabel.split("\\.");
int majorVer = new Integer(parts[0]).intValue();
int minorVer = new Integer(parts[1]).intValue();
int majorVer = Integer.valueOf(parts[0]).intValue();
int minorVer = Integer.valueOf(parts[1]).intValue();
Map<String, String> params = new HashMap<>();
params.put(Nodes.PARAM_OVERWRITE, "true");

View File

@@ -523,13 +523,13 @@ public class AuthenticationsTest extends AbstractSingleNetworkSiteTest
private RemoteUserMapper createRemoteUserMapperToUseForTheTest(boolean useIdentityService)
{
PersonService personServiceLocal = (PersonService) applicationContext.getBean("PersonService");
RemoteUserMapper remoteUserMapper;
if (useIdentityService)
{
InterceptingIdentityRemoteUserMapper interceptingRemoteUserMapper = new InterceptingIdentityRemoteUserMapper();
interceptingRemoteUserMapper.setActive(true);
interceptingRemoteUserMapper.setPersonService(personServiceLocal);
interceptingRemoteUserMapper.setIdentityServiceFacade(null);
interceptingRemoteUserMapper.setJitProvisioningHandler(null);
interceptingRemoteUserMapper.setUserIdToReturn(user2);
remoteUserMapper = interceptingRemoteUserMapper;
}

View File

@@ -43,17 +43,20 @@ import org.alfresco.service.cmr.security.AuthorityService;
import org.alfresco.service.cmr.security.AuthorityType;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.util.GUID;
import org.alfresco.util.testing.category.LuceneTests;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.mockito.Mock;
import jakarta.servlet.http.HttpServletResponse;
import java.util.*;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
/**
@@ -69,13 +72,13 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
protected AuthorityService authorityService;
private String rootGroupName = null;
private Group rootGroup = null;
private Group groupA = null;
private Group groupB = null;
private GroupMember groupMemberA = null;
private GroupMember groupMemberB = null;
private GroupMember personMember = null;
private String rootGroupName;
private Group rootGroup;
private Group groupA;
private Group groupB;
private GroupMember groupMemberA;
private GroupMember groupMemberB;
private GroupMember personMember;
@Mock
private ResultSetRow groupAResultSetRow;
@Mock
@@ -670,6 +673,7 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
// Optionally included.
assertNull(group.getParentIds());
assertNull(group.getZones());
assertNull(group.getHasSubgroups());
}
}
@@ -956,7 +960,7 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
expected.retainAll(respPostProcess.getList());
// If this assertion fails, then the tests aren't providing any value - change them!
assertTrue("List doesn't contain enough items for test to be conclusive.", expected.size() > 0);
assertTrue("List doesn't contain enough items for test to be conclusive.", !expected.isEmpty());
checkList(expected, respPostProcess.getPaging(), respPostProcess);
}
@@ -977,7 +981,7 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
expected.retainAll(respPostProcess.getList());
// If this assertion fails, then the tests aren't providing any value - change them!
assertTrue("List doesn't contain enough items for test to be conclusive.", expected.size() > 0);
assertTrue("List doesn't contain enough items for test to be conclusive.", !expected.isEmpty());
checkList(expected, respPostProcess.getPaging(), respPostProcess);
}
@@ -1154,7 +1158,6 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
// -ve test: invalid zones clause
{
Paging paging = getPaging(0, Integer.MAX_VALUE);
Map<String, String> otherParams = new HashMap<>();
otherParams.put("include", org.alfresco.rest.api.Groups.PARAM_INCLUDE_ZONES);
@@ -1418,16 +1421,17 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
setRequestContext(networkOne.getId(), networkAdmin, DEFAULT_ADMIN_PWD);
Map<String, String> otherParams = new HashMap<>();
otherParams.put("include", org.alfresco.rest.api.Groups.PARAM_INCLUDE_PARENT_IDS);
otherParams.put("include", org.alfresco.rest.api.Groups.PARAM_INCLUDE_HAS_SUBGROUPS);
Group group = generateGroup();
Group createdGroup01 = groupsProxy.createGroup(group, null, HttpServletResponse.SC_CREATED);
Group createdGroup01 = groupsProxy.createGroup(group, otherParams, HttpServletResponse.SC_CREATED);
assertNotNull(createdGroup01);
assertNotNull(createdGroup01.getId());
assertTrue(createdGroup01.getIsRoot());
assertNull(createdGroup01.getParentIds());
assertFalse(createdGroup01.getHasSubgroups());
Set<String> subGroup01Parents = new HashSet<>();
subGroup01Parents.add(createdGroup01.getId());
@@ -1435,12 +1439,18 @@ public class GroupsTest extends AbstractSingleNetworkSiteTest
Group subGroup01 = generateGroup();
subGroup01.setParentIds(subGroup01Parents);
otherParams.put("include", org.alfresco.rest.api.Groups.PARAM_INCLUDE_PARENT_IDS + "," + org.alfresco.rest.api.Groups.PARAM_INCLUDE_HAS_SUBGROUPS);
Group createdSubGroup01 = groupsProxy.createGroup(subGroup01, otherParams, HttpServletResponse.SC_CREATED);
assertNotNull(createdSubGroup01);
assertNotNull(createdSubGroup01.getId());
assertFalse(createdSubGroup01.getIsRoot());
assertNotNull(createdSubGroup01.getParentIds());
assertEquals(subGroup01Parents, createdSubGroup01.getParentIds());
assertFalse(createdSubGroup01.getHasSubgroups());
//validate if parent group now has any subgroup
Group group01 = groupsProxy.getGroup(createdGroup01.getId(), otherParams, HttpServletResponse.SC_OK);
assertTrue(group01.getHasSubgroups());
}
// Group id is missing.

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