Compare commits

...

402 Commits

Author SHA1 Message Date
alfresco-build
e0a3b843f2 [maven-release-plugin][skip ci] prepare release 25.1.0.16 2024-12-15 00:08:12 +00:00
Alfresco CI User
2889b1a8a3 [force] Force release for 2024-12-15. 2024-12-15 00:05:05 +00:00
alfresco-build
22aa1f2725 [maven-release-plugin][skip ci] prepare for next development iteration 2024-12-13 09:51:47 +00:00
alfresco-build
77ab7d83fe [maven-release-plugin][skip ci] prepare release 25.1.0.15 2024-12-13 09:51:45 +00:00
Damian Ujma
a8faa94d15 ACS-9074 Bump log4j to 2.24.2 (#3087)
* ACS-9023 Bump log4j to 2.24.2

* ACS-9074 Update license header
2024-12-13 10:11:04 +01:00
alfresco-build
baafbbbeb2 [maven-release-plugin][skip ci] prepare for next development iteration 2024-12-12 10:30:47 +00:00
alfresco-build
ed061f2287 [maven-release-plugin][skip ci] prepare release 25.1.0.14 2024-12-12 10:30:45 +00:00
Piotr Żurek
6e435e1a8c ACS-9047 Use Keycloak 26 (#3079) 2024-12-12 10:46:48 +01:00
alfresco-build
05f6b90df8 [maven-release-plugin][skip ci] prepare for next development iteration 2024-12-10 10:27:39 +00:00
alfresco-build
0550dcd4f7 [maven-release-plugin][skip ci] prepare release 25.1.0.13 2024-12-10 10:27:37 +00:00
Cezary Witkowski
e137c91152 Revert "Bump dependency.log4j.version from 2.23.1 to 2.24.2 (#3064)" (#3080)
This reverts commit 933aced67c.
2024-12-10 10:48:12 +01:00
Damian Ujma
5a1c8334c8 ACS-9023 Implement PUT method - Preferences API (#3075)
* ACS-9023 Implement PUT method - Preferences API

* ACS-9023 Fix testUserPreferences

* ACS-9023 Add override

* ACS-9023 Update license header
2024-12-10 09:51:56 +01:00
alfresco-build
c7bbb1f74b [maven-release-plugin][skip ci] prepare for next development iteration 2024-12-09 12:49:37 +00:00
alfresco-build
49a34c4fe3 [maven-release-plugin][skip ci] prepare release 25.1.0.12 2024-12-09 12:49:35 +00:00
Cezary Witkowski
70af2ea3ad [ACS-9025] Use acs-event-model 1.0.2 (#3059)
* [ACS-9025] Use acs-event-model 1.0.0

* [ACS-9025] Debugging tests, show more lines

* [ACS-9025] Debugging tests, show all lines

* [ACS-9025] Use acs-event-model 1.0.2

* [ACS-9025] Restore wait-for-alfresco-start.sh script
2024-12-09 13:08:10 +01:00
alfresco-build
ab6c5feba7 [maven-release-plugin][skip ci] prepare for next development iteration 2024-12-08 00:08:15 +00:00
alfresco-build
cb3cbb553a [maven-release-plugin][skip ci] prepare release 25.1.0.11 2024-12-08 00:08:13 +00:00
Alfresco CI User
9470c27f3d [force] Force release for 2024-12-08. 2024-12-08 00:04:52 +00:00
alfresco-build
edf263c43f [maven-release-plugin][skip ci] prepare for next development iteration 2024-12-06 11:52:48 +00:00
alfresco-build
69bb9a308a [maven-release-plugin][skip ci] prepare release 25.1.0.10 2024-12-06 11:52:47 +00:00
SathishK-T
853d1bdc1b [APPS-3130] reverting changes of MNT-24137 (#3076)
* [APPS-3130] reverting changes of MNT-24137

* reverting

* reverting the change of mnt-24137

* reverting the change of mnt-24137

* reverting the change of mnt-24137

* reverting the changes of mnt-24137

* reverting the changes of mnt-24137

* reverting the changes of mnt-24137

* [APPS-3130] reverting changes of MNT-24137

---------

Co-authored-by: Sathish Kumar <ST28@ford.com>
2024-12-06 16:40:38 +05:30
alfresco-build
f7d1bbcec3 [maven-release-plugin][skip ci] prepare for next development iteration 2024-12-05 15:46:52 +00:00
alfresco-build
731d580f7e [maven-release-plugin][skip ci] prepare release 25.1.0.9 2024-12-05 15:46:49 +00:00
dependabot[bot]
ad4126ffea Bump org.mybatis:mybatis from 3.5.16 to 3.5.17 (#3062)
Bumps [org.mybatis:mybatis](https://github.com/mybatis/mybatis-3) from 3.5.16 to 3.5.17.
- [Release notes](https://github.com/mybatis/mybatis-3/releases)
- [Commits](https://github.com/mybatis/mybatis-3/compare/mybatis-3.5.16...mybatis-3.5.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-05 09:33:04 +01:00
dependabot[bot]
933aced67c Bump dependency.log4j.version from 2.23.1 to 2.24.2 (#3064)
Bumps `dependency.log4j.version` from 2.23.1 to 2.24.2.

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

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

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-05 09:31:49 +01:00
mohit-singh4
de0ba15a91 [Fix/MNT-24209] logging for download restapi (#3065)
* [fix/MNT-24209] Adding loggers in ACS download restApi

* [fix/MNT-24209] Adding loggers in ACS download restApi

* [fix/MNT-24209] Adding loggers in ACS download restApi

* Update ZipDownloadExporter.java

* [fix/MNT-24209-logging-for-download-restapi] Adding loggers in downloads RestAPI

* Revert "Update ZipDownloadExporter.java"

This reverts commit 2d97b34959.

* resolved Pre commit error

* resolved Pre commit error

* Bump io.swagger:swagger-parser from 1.0.71 to 1.0.72 (#3044)

Bumps [io.swagger:swagger-parser](https://github.com/swagger-api/swagger-parser) from 1.0.71 to 1.0.72.
- [Release notes](https://github.com/swagger-api/swagger-parser/releases)
- [Commits](https://github.com/swagger-api/swagger-parser/compare/v1.0.71...v1.0.72)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

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

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

* Update the SiteMembership Class

* Update the SiteMembership Class

* Update the SiteMembership Class

* Revert "Update the SiteMembership Class"

This reverts commit 15045f9612.

* Update the SiteMembership Class

* Update the SiteMembership Class

* Update the license i SiteMembership

* Revert "Update the license i SiteMembership"

This reverts commit ee8f3bec18.

* Update the license SiteMembership

* Fix Precommit

* Fix Precommit

* Fix Precommit

* Update the SiteMembership

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

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

* Revert "Bump dependency.log4j.version from 2.23.1 to 2.24.2 (#3051)"

This reverts commit 748be1f4a0.

* [fix/MNT-24209-logging-for-download-restapi] Adding loggers in downloads RestAPI

* resolved Pre commit error

* resolved Pre commit error

* reformatting ZipDownloadExporter file

* [fix/MNT-24209-logging-for-download-restapi] Adding loggers in downloads RestAPI

* [fix/MNT-24209-logging-for-download-restapi] Adding loggers in downloads RestAPI

* [fix/MNT-24209-logging-for-download-restapi] Adding loggers in downloads RestAPI

* [fix/MNT-24209-logging-for-download-restapi] Adding loggers in downloads RestAPI

* [fix/MNT-24209-logging-for-download-restapi] Adding loggers in downloads RestAPI

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: mohit-singh4 <mohit.singh@contractors.hyland.com>
Co-authored-by: MohinishSah <88024811+MohinishSah@users.noreply.github.com>
Co-authored-by: Mohinish Sah <Mohinish.Sah@contractors.onbase.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: alfresco-build <8039454+alfresco-build@users.noreply.github.com>
Co-authored-by: varapathijanakiram <172787912+varapathijanakiram@users.noreply.github.com>
Co-authored-by: vjanakiram <varapathi.janakiram@hyland.com>
Co-authored-by: rrajoria <88024787+rrajoria@users.noreply.github.com>
Co-authored-by: Cezary Witkowski <cezary.witkowski@hyland.com>
2024-12-04 14:24:43 +05:30
alfresco-build
00c36251d4 [maven-release-plugin][skip ci] prepare for next development iteration 2024-12-02 15:05:20 +00:00
alfresco-build
ea9ce0c0c2 [maven-release-plugin][skip ci] prepare release 25.1.0.8 2024-12-02 15:05:18 +00:00
Eva Vasques
37231e50a2 MNT-24753 Restore from Archive when we have multiple content stores (#3066)
* Pre-commit changes
* Method requestRestoreContentFromArchive needs to use injected ContentStore
2024-12-02 14:22:51 +00:00
alfresco-build
26d8c7dcbe [maven-release-plugin][skip ci] prepare for next development iteration 2024-12-01 00:09:27 +00:00
alfresco-build
6ea97033d3 [maven-release-plugin][skip ci] prepare release 25.1.0.7 2024-12-01 00:09:23 +00:00
Alfresco CI User
cd0b2ffd24 [force] Force release for 2024-12-01. 2024-12-01 00:05:05 +00:00
alfresco-build
a14cbacb68 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-29 07:34:35 +00:00
alfresco-build
fc0b9863d4 [maven-release-plugin][skip ci] prepare release 25.1.0.6 2024-11-29 07:34:33 +00:00
Cezary Witkowski
29dc42d445 Merge pull request #3063 from Alfresco/revert-3051-dependabot/maven/dependency.log4j.version-2.24.2
Revert "Bump dependency.log4j.version from 2.23.1 to 2.24.2"
2024-11-28 15:26:55 +01:00
Cezary Witkowski
39da968d76 Revert "Bump dependency.log4j.version from 2.23.1 to 2.24.2 (#3051)"
This reverts commit 748be1f4a0.
2024-11-28 14:36:47 +01:00
alfresco-build
6a4fecd46e [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-28 11:36:08 +00:00
alfresco-build
e083d4fcc2 [maven-release-plugin][skip ci] prepare release 25.1.0.5 2024-11-28 11:36:06 +00:00
varapathijanakiram
53e8a06a6e Merge pull request #3058 from Alfresco/fix/MNT-24571-Site-Membership-API
Fix/MNT-24571-Site Membership API
2024-11-28 16:23:20 +05:30
alfresco-build
c80e1fa94b [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-28 09:56:23 +00:00
alfresco-build
675c6f7aa1 [maven-release-plugin][skip ci] prepare release 25.1.0.4 2024-11-28 09:56:21 +00:00
dependabot[bot]
44d67847da Bump io.swagger:swagger-parser from 1.0.71 to 1.0.72 (#3044)
Bumps [io.swagger:swagger-parser](https://github.com/swagger-api/swagger-parser) from 1.0.71 to 1.0.72.
- [Release notes](https://github.com/swagger-api/swagger-parser/releases)
- [Commits](https://github.com/swagger-api/swagger-parser/compare/v1.0.71...v1.0.72)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-27 18:51:51 +01:00
vjanakiram
d405043c5d Update the SiteMembership 2024-11-27 12:38:50 +05:30
rrajoria
da50f6271c Fix Precommit 2024-11-27 11:20:04 +05:30
rrajoria
a5e713c176 Fix Precommit 2024-11-27 11:11:41 +05:30
rrajoria
2dcd2788b2 Fix Precommit 2024-11-27 11:02:51 +05:30
vjanakiram
6b738342c1 Update the license SiteMembership 2024-11-27 10:59:13 +05:30
vjanakiram
ba5f5418ab Revert "Update the license i SiteMembership"
This reverts commit ee8f3bec18.
2024-11-27 10:58:40 +05:30
vjanakiram
ee8f3bec18 Update the license i SiteMembership 2024-11-27 10:47:56 +05:30
vjanakiram
39395af528 Update the SiteMembership Class 2024-11-26 17:49:12 +05:30
vjanakiram
e6f9d88779 Update the SiteMembership Class 2024-11-26 17:27:33 +05:30
vjanakiram
70f70c6ed3 Revert "Update the SiteMembership Class"
This reverts commit 15045f9612.
2024-11-26 17:26:44 +05:30
vjanakiram
15045f9612 Update the SiteMembership Class 2024-11-26 17:25:23 +05:30
dependabot[bot]
c50c7c6a7e Bump org.apache.activemq:activemq-client-jakarta from 5.18.3 to 5.18.6 (#2962) 2024-11-26 11:19:23 +00:00
dependabot[bot]
60199141f5 Bump org.apache.httpcomponents.client5:httpclient5 from 5.2.1 to 5.4.1 (#3015) 2024-11-26 11:19:14 +00:00
vjanakiram
b5e023950d Update the SiteMembership Class 2024-11-26 16:48:11 +05:30
varapathijanakiram
d4591acf2c Update the SiteMembership Class 2024-11-26 16:31:47 +05:30
dependabot[bot]
f34f2849dd Bump org.eclipse.jetty:jetty-server in /remote-api (#2995) 2024-11-26 09:37:26 +00:00
dependabot[bot]
52f2be49f3 Bump com.networknt:json-schema-validator from 1.5.3 to 1.5.4 (#3054) 2024-11-26 09:15:25 +00:00
dependabot[bot]
748be1f4a0 Bump dependency.log4j.version from 2.23.1 to 2.24.2 (#3051) 2024-11-26 09:14:44 +00:00
alfresco-build
52f1af2da6 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-25 10:35:23 +00:00
alfresco-build
626a97ff45 [maven-release-plugin][skip ci] prepare release 25.1.0.3 2024-11-25 10:35:21 +00:00
Damian Ujma
4a91132226 ACS-5371 Exclude xpp3 dependency to avoid conflict in JDK9+ (#3049)
* ACS-5371 Exclude xpp3 dependency

* ACS-5371 Set compiler compliance to 17

* ACS-5371 Update xmlpull version

* ACS-5371 Update xmlpull version

* ACS-5371 Use kxml2

* ACS-5371 Refactor
2024-11-25 09:49:47 +01:00
Piotr Żurek
b6fb8725ce Revert "Bump org.springframework.security:spring-security-bom (#3048)"
This reverts commit aacef0c949.
2024-11-25 09:44:21 +01:00
alfresco-build
5fc0d9edde [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-24 00:10:05 +00:00
alfresco-build
44d394b1a0 [maven-release-plugin][skip ci] prepare release 25.1.0.2 2024-11-24 00:10:03 +00:00
Alfresco CI User
c1d62cca4d [force] Force release for 2024-11-24. 2024-11-24 00:05:36 +00:00
Piotr Żurek
24ae4ce57c Revert "Bump dependency.spring.version from 6.1.14 to 6.2.0 (#3038)"
This reverts commit b8f2ec252d.
2024-11-22 15:07:03 +01:00
dependabot[bot]
b8f2ec252d Bump dependency.spring.version from 6.1.14 to 6.2.0 (#3038)
Bumps `dependency.spring.version` from 6.1.14 to 6.2.0.

Updates `org.springframework:spring-aop` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-beans` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-context` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-context-support` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-core` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-expression` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-jdbc` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-jms` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-test` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-orm` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-tx` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-web` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

Updates `org.springframework:spring-webmvc` from 6.1.14 to 6.2.0
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.14...v6.2.0)

---
updated-dependencies:
- dependency-name: org.springframework:spring-aop
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-beans
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-context
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-context-support
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-expression
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-jms
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-test
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-orm
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-tx
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-web
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.springframework:spring-webmvc
  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-11-22 14:22:19 +01:00
dependabot[bot]
ae721c86f6 Bump commons-io:commons-io from 2.17.0 to 2.18.0 (#3046)
Bumps commons-io:commons-io from 2.17.0 to 2.18.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  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-11-22 14:19:59 +01:00
dependabot[bot]
aacef0c949 Bump org.springframework.security:spring-security-bom (#3048)
Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 6.3.4 to 6.4.1.
- [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.3.4...6.4.1)

---
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-11-22 14:19:15 +01:00
dependabot[bot]
e4edceda75 Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.5.1 to 3.5.2 (#3019) 2024-11-22 12:41:46 +00:00
dependabot[bot]
09ec6688c6 Bump org.quartz-scheduler:quartz from 2.3.2 to 2.5.0 (#3035) 2024-11-22 12:41:36 +00:00
dependabot[bot]
14025f00de Bump org.projectlombok:lombok from 1.18.34 to 1.18.36 (#3042) 2024-11-22 12:41:16 +00:00
dependabot[bot]
22c5a5e134 Bump dependency.bouncycastle.version from 1.78.1 to 1.79 (#3016) 2024-11-22 12:39:42 +00:00
dependabot[bot]
154cad1ff8 Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.1 to 3.11.1 (#3021) 2024-11-22 12:39:40 +00:00
dependabot[bot]
7749b89e2b Bump org.apache.santuario:xmlsec from 4.0.2 to 4.0.3 (#3023) 2024-11-22 12:39:35 +00:00
dependabot[bot]
bbb45e667b Bump org.codehaus.groovy:groovy from 3.0.22 to 3.0.23 (#3030) 2024-11-22 12:39:04 +00:00
dependabot[bot]
a5f01e0d94 Bump Alfresco/alfresco-build-tools from 7.1.0 to 8.2.0 (#3018) 2024-11-22 12:39:02 +00:00
dependabot[bot]
0c6d455ec4 Bump com.networknt:json-schema-validator from 1.5.1 to 1.5.3 (#3017) 2024-11-22 12:38:58 +00:00
dependabot[bot]
5e86f5163e Bump org.apache.xmlbeans:xmlbeans from 5.2.1 to 5.2.2 (#3024) 2024-11-22 12:38:23 +00:00
alfresco-build
4981be1564 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-20 15:49:36 +00:00
alfresco-build
9a30fbb75a [maven-release-plugin][skip ci] prepare release 25.1.0.1 2024-11-20 15:49:34 +00:00
Piotr Żurek
9c86fdb8b5 Trigger CI 2024-11-20 15:42:59 +01:00
Kacper Magdziarz
c52f74832d Updating master branch to 25.1.0 after 23.4.0 ACS release [skip ci] 2024-11-20 13:36:19 +01:00
alfresco-build
70dd7642f4 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-19 09:48:20 +00:00
alfresco-build
0cf3eec834 [maven-release-plugin][skip ci] prepare release 23.4.0.67 2024-11-19 09:48:12 +00:00
MohinishSah
dfd855440d bumped aos version 2024-11-19 14:38:12 +05:30
alfresco-build
88d46884c4 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-17 00:08:12 +00:00
alfresco-build
e6444a1c7a [maven-release-plugin][skip ci] prepare release 23.4.0.66 2024-11-17 00:08:10 +00:00
Alfresco CI User
e215038230 [force] Force release for 2024-11-17. 2024-11-17 00:04:44 +00:00
alfresco-build
a5f8034725 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-15 09:54:37 +00:00
alfresco-build
c7dd659268 [maven-release-plugin][skip ci] prepare release 23.4.0.65 2024-11-15 09:54:35 +00:00
Sara
ffae77169e ACS-8937 Bump IE/SS to 2.0.13 (#3040) 2024-11-15 09:12:11 +00:00
alfresco-build
3bcfaf256e [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-14 18:30:28 +00:00
alfresco-build
0e8d56d7b2 [maven-release-plugin][skip ci] prepare release 23.4.0.64 2024-11-14 18:30:25 +00:00
Piotr Żurek
ef9e8d574f ACS-8935 Use GA dependencies (#3037) 2024-11-14 18:47:51 +01:00
alfresco-build
a17712b501 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-14 14:03:54 +00:00
alfresco-build
fce6d1d7eb [maven-release-plugin][skip ci] prepare release 23.4.0.63 2024-11-14 14:03:52 +00:00
mohit-singh4
867af27a96 Fix/apps 2894 node size details automation sample test file (#3036)
* Adding the test case for calculating the NodeSize.

* Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationSampleTestFile] Updating sample testfile which being used for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationSampleTestFile] Updating sample testfile which being used for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationSampleTestFile] Updating sample testfile which being used for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationSampleTestFile] Updating sample testfile which being used for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationSampleTestFile] Updating sample testfile which being used for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationSampleTestFile] Updating sample testfile which being used for calculating the NodeSize.

---------

Co-authored-by: kshah <kavit.shah@hyland.com>
Co-authored-by: mohit-singh4 <mohit.singh@contractors.hyland.com>
2024-11-14 18:53:27 +05:30
alfresco-build
3de74456ae [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-13 10:46:53 +00:00
alfresco-build
919880e363 [maven-release-plugin][skip ci] prepare release 23.4.0.62 2024-11-13 10:46:52 +00:00
mohit-singh4
e6ac2875b9 Fix/apps 2894 node size details automation test (#3032)
* Adding the test case for calculating the NodeSize.

* Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

* [fix/APPS-2894_NodeSizeDetails_AutomationTest] Adding the test case for calculating the NodeSize.

---------

Co-authored-by: kshah <kavit.shah@hyland.com>
Co-authored-by: mohit-singh4 <mohit.singh@contractors.hyland.com>
2024-11-13 15:32:54 +05:30
alfresco-build
4250167a28 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-10 00:07:40 +00:00
alfresco-build
312463b5e0 [maven-release-plugin][skip ci] prepare release 23.4.0.61 2024-11-10 00:07:38 +00:00
Alfresco CI User
c09f5f7cb0 [force] Force release for 2024-11-10. 2024-11-10 00:04:32 +00:00
alfresco-build
6284e9724e [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-08 14:28:59 +00:00
alfresco-build
dcf391faea [maven-release-plugin][skip ci] prepare release 23.4.0.60 2024-11-08 14:28:57 +00:00
kavitshah-gl
475f345909 Bump api explorer to 23.4.0-A1 2024-11-08 18:28:44 +05:30
alfresco-build
f42e033e40 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-08 10:48:14 +00:00
alfresco-build
546f37eded [maven-release-plugin][skip ci] prepare release 23.4.0.59 2024-11-08 10:48:12 +00:00
mohit-singh4
a35673d44f [MNT-24127] Added Endpoint To Calculate Folder Size (#2709)
* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [MNT-24127] Added Endpoint to Calculate Size of the folder with Integration Test Cases [ags][tas]

* [feature/MNT-24127] EndpointToCalculateFolderSize

* [feature/MNT-24127] EndpointToCalculateFolderSize

* [feature/MNT-24127] EndpointToCalculateFolderSize

* [feature/MNT-24127] EndpointToCalculateFolderSize

* [feature/MNT-24127] EndpointToCalculateFolderSize

* [feature/MNT-24127] EndpointToCalculateFolderSize

* [feature/MNT-24127] EndpointToCalculateFolderSize

* [feature/MNT-24127] Endpoint Added To Calculate Folder Size

* [feature/MNT-24127] Endpoint Added To Calculate Folder Size

* [feature/MNT-24127] Endpoint Added To Calculate Folder Size

* [feature/MNT-24127] Endpoint Added To Calculate Folder Size

* [feature/MNT-24127] Endpoint Added To Calculate Folder Size

* [feature/MNT-24127] Endpoint Added To Calculate Folder Size

* Some Optimization for NodeSize Calculation.

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added Endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoint to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding performance test case

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoints implementation to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoints implementation to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoints implementation to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Added endpoints implementation to calculate folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding endpoints to calculate and retrieve folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding endpoints to calculate and retrieve folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding endpoints to calculate and retrieve folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding endpoints to calculate and retrieve folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding endpoints to calculate and retrieve folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Adding endpoints to calculate and retrieve folder size

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* Changes as per the Relationship Api Framework implementation.

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Updated endpoints flow to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments related to calculate and retrieve folder size details

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments and refactoring files

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments and refactoring files

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments and refactoring files

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments and refactoring files

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments regarding Integeration testcases

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments regarding Integeration testcases

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Addressing review comments

* [feature/MNT-24127-EndpointToCalculateFolderSize] Creating Integeration test cases

* [feature/MNT-24127-EndpointToCalculateFolderSize] Creating Integeration test cases

* [feature/MNT-24127-EndpointToCalculateFolderSize] Creating Integeration test cases

* [feature/MNT-24127-EndpointToCalculateFolderSize] Creating Integeration test cases

* [feature/MNT-24127-EndpointToCalculateFolderSize] Creating Integeration test cases

* [feature/MNT-24127-EndpointToCalculateFolderSize] Creating Integeration test cases

* [feature/MNT-24127-EndpointToCalculateFolderSize] Some Changes in NodeSizeDetailsTests

* [feature/MNT-24127-EndpointToCalculateFolderSize] Some Changes in NodeSizeDetailsTests

* [feature/MNT-24127-EndpointToCalculateFolderSize] Some Changes in NodeSizeDetailsTests

* [feature/MNT-24127-EndpointToCalculateFolderSize] Some Changes in NodeSizeDetailsTests

* [feature/MNT-24127-EndpointToCalculateFolderSize] Checking size-details feature for solr6 subsystem

* [feature/MNT-24127-EndpointToCalculateFolderSize] Checking size-details feature for solr6 subsystem

---------

Co-authored-by: kshah <kavit.shah@globallogic.com>
Co-authored-by: mohit-singh4 <mohit.singh@contractors.hyland.com>
Co-authored-by: kshah <kavit.shah@hyland.com>
2024-11-08 15:37:27 +05:30
alfresco-build
25e9bdbdb6 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-08 06:37:38 +00:00
alfresco-build
33ab26e52b [maven-release-plugin][skip ci] prepare release 23.4.0.58 2024-11-08 06:37:36 +00:00
rrajoria
7e35abfdc8 Update aos version to 3.2.0-A2 2024-11-08 10:28:04 +05:30
alfresco-build
634e591264 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-07 18:44:42 +00:00
alfresco-build
86f66c86da [maven-release-plugin][skip ci] prepare release 23.4.0.57 2024-11-07 18:44:40 +00:00
Eva Vasques
2904535d40 MNT-24708 - Set messagesCache and loadedBundlesCache as local (#3026)
* In a cluster env these caches were always invalidating the other nodes loaded bundles, forcing them to reload
* Only resourceBundlesNamesCache should be invalidating to be able to force the cache reset if a bundle is added, removed or reloaded dynamically
* On unregister of a resource bundle, the cache wasn't being explicitly updated, so it was not invalidating the cache on the other nodes.
2024-11-07 18:03:52 +00:00
alfresco-build
e99905efbd [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-07 13:09:09 +00:00
alfresco-build
ce65de0f10 [maven-release-plugin][skip ci] prepare release 23.4.0.56 2024-11-07 13:09:07 +00:00
Piotr Żurek
29b19d4245 ACS-8936 Propagate latest Search Service (#3025) 2024-11-07 12:54:06 +01:00
alfresco-build
4eea43bddf [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-05 23:04:52 +00:00
alfresco-build
4c9282790a [maven-release-plugin][skip ci] prepare release 23.4.0.55 2024-11-05 23:04:50 +00:00
Sara
39a74e42b6 ACS-8934 Bump ATS 4.1.5-A3 (#3022) 2024-11-05 18:57:01 +00:00
alfresco-build
a298c0dcb9 [maven-release-plugin][skip ci] prepare for next development iteration 2024-11-03 00:07:36 +00:00
alfresco-build
9ee56a5d08 [maven-release-plugin][skip ci] prepare release 23.4.0.54 2024-11-03 00:07:34 +00:00
Alfresco CI User
6b80a2c39c [force] Force release for 2024-11-03. 2024-11-03 00:04:31 +00:00
alfresco-build
f6569edde1 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-28 13:55:04 +00:00
alfresco-build
5ab9aa8cf2 [maven-release-plugin][skip ci] prepare release 23.4.0.53 2024-10-28 13:55:02 +00:00
Damian Ujma
8a171d09b5 ACS-8915 Propagate latest ATS/AIS (#3012) 2024-10-28 14:15:03 +01:00
alfresco-build
3e423a1543 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-27 00:07:40 +00:00
alfresco-build
6351782c1d [maven-release-plugin][skip ci] prepare release 23.4.0.52 2024-10-27 00:07:38 +00:00
Alfresco CI User
4c92868efb [force] Force release for 2024-10-27. 2024-10-27 00:04:27 +00:00
alfresco-build
2cca9ea11b [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-25 11:06:31 +00:00
alfresco-build
e12001e4d1 [maven-release-plugin][skip ci] prepare release 23.4.0.51 2024-10-25 11:06:29 +00:00
dependabot[bot]
a57607f728 Bump org.springframework:spring-context from 6.1.13 to 6.1.14 (#3002)
Bumps [org.springframework:spring-context](https://github.com/spring-projects/spring-framework) from 6.1.13 to 6.1.14.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.1.13...v6.1.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-25 10:49:56 +02:00
dependabot[bot]
a79af2cac0 Bump org.springframework.security:spring-security-bom (#3004)
Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 6.3.3 to 6.3.4.
- [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.3.3...6.3.4)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-25 10:14:37 +02:00
alfresco-build
be807c5b19 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-24 11:58:56 +00:00
alfresco-build
ae03e7076e [maven-release-plugin][skip ci] prepare release 23.4.0.50 2024-10-24 11:58:54 +00:00
Damian Ujma
26e394c398 ACS-6670 Change nodesSharedCache to fully-distributed (#3007) 2024-10-24 13:00:04 +02:00
alfresco-build
200aa95784 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-20 00:07:31 +00:00
alfresco-build
4eeabb3dbd [maven-release-plugin][skip ci] prepare release 23.4.0.49 2024-10-20 00:07:29 +00:00
Alfresco CI User
227bbe4fd8 [force] Force release for 2024-10-20. 2024-10-20 00:04:38 +00:00
alfresco-build
1461a04a3d [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-16 13:08:10 +00:00
alfresco-build
52008dc139 [maven-release-plugin][skip ci] prepare release 23.4.0.48 2024-10-16 13:08:09 +00:00
rrajoria
f2a10052e4 Bump aos version 3.2.0-A1 (#2999) 2024-10-16 17:57:11 +05:30
alfresco-build
add64e0cb6 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-13 00:07:36 +00:00
alfresco-build
14511e2621 [maven-release-plugin][skip ci] prepare release 23.4.0.47 2024-10-13 00:07:34 +00:00
Alfresco CI User
42e0c93121 [force] Force release for 2024-10-13. 2024-10-13 00:04:33 +00:00
alfresco-build
715bc273ee [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-11 12:42:44 +00:00
alfresco-build
812541870e [maven-release-plugin][skip ci] prepare release 23.4.0.46 2024-10-11 12:42:39 +00:00
dependabot[bot]
9aa5051826 Bump commons-io:commons-io from 2.16.1 to 2.17.0 (#2928)
Bumps commons-io:commons-io from 2.16.1 to 2.17.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  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-10-11 14:00:02 +02:00
alfresco-build
54580b4aeb [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-10 09:55:40 +00:00
alfresco-build
2b1b6091a3 [maven-release-plugin][skip ci] prepare release 23.4.0.45 2024-10-10 09:55:37 +00:00
Aleksandra Onych
74a147ab3f [ACS-8862] Bump Keycloak to 25.0.6 (#2983) 2024-10-10 11:13:08 +02:00
alfresco-build
07f0595f5a [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-09 16:57:03 +00:00
alfresco-build
e3422ea6a5 [maven-release-plugin][skip ci] prepare release 23.4.0.44 2024-10-09 16:57:00 +00:00
Eva Vasques
f4103c242f MNT-24641 Avoid duplicate key error on content upload (#2984)
MNT-24641
* On createOrGetByValue in EntityLookupCache, also cache by value
* Created getCachedEntityByValue that attempt to retrieve the value only from cache
* On attempt to create content URL, first check cache before attempting to create in the database avoiding a duplicate key
2024-10-09 17:07:10 +01:00
alfresco-build
34fb5e9dd9 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-09 07:03:55 +00:00
alfresco-build
f6cf0670c1 [maven-release-plugin][skip ci] prepare release 23.4.0.43 2024-10-09 07:03:53 +00:00
rrajoria
c7bd036030 Update aos version (#2982)
Update aos version to 4.0.0-A1 with Spring 6.1 upgrade
2024-10-09 11:53:51 +05:30
alfresco-build
b20c573040 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-08 15:11:21 +00:00
alfresco-build
6568885c10 [maven-release-plugin][skip ci] prepare release 23.4.0.42 2024-10-08 15:11:17 +00:00
dependabot[bot]
31237135c5 Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.5.0 to 3.5.1 (#2979)
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.0...surefire-3.5.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-08 16:30:28 +02:00
alfresco-build
d528ed1e97 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-06 00:07:53 +00:00
alfresco-build
bb207340fd [maven-release-plugin][skip ci] prepare release 23.4.0.41 2024-10-06 00:07:51 +00:00
Alfresco CI User
314e1aeb64 [force] Force release for 2024-10-06. 2024-10-06 00:04:26 +00:00
alfresco-build
9846f7b04f [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-04 18:40:05 +00:00
alfresco-build
6e442e93b8 [maven-release-plugin][skip ci] prepare release 23.4.0.40 2024-10-04 18:40:03 +00:00
Tom Page
fb3c57aab4 Merge pull request #2969 from Alfresco/feature/MNT-24637_IncludeAspectNames
MNT-24637 Add include=aspectNames to favourites API.
2024-10-04 18:59:35 +01:00
Tom Page
093b3281fb MNT-24637 PMD fixes. 2024-10-04 15:54:57 +01:00
Tom Page
3b027c6c36 MNT-24637 Include aspectNames in TAS model. 2024-10-04 15:45:54 +01:00
Tom Page
f193309e4c MNT-24637 Add include=aspectNames to favourites API. 2024-10-04 15:22:38 +01:00
Tom Page
7668849a59 MNT-24637 Pre-commit formatting. 2024-10-04 15:21:53 +01:00
alfresco-build
1350e68c29 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-04 13:13:41 +00:00
alfresco-build
ea63cf76e5 [maven-release-plugin][skip ci] prepare release 23.4.0.39 2024-10-04 13:13:39 +00:00
Piotr Żurek
674fa8d7e0 ACS-8843 Investigate Java 21 compatibility (#2960)
* [ACS-8843] Delegate creation of proxy to one place

Co-authored-by: Kacper Magdziarz <kacper.magdziarz@hyland.com>
2024-10-04 14:31:56 +02:00
alfresco-build
60a31112ea [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-04 06:24:17 +00:00
alfresco-build
67d8807529 [maven-release-plugin][skip ci] prepare release 23.4.0.38 2024-10-04 06:24:15 +00:00
MohinishSah
dda1fd6ea3 Merge pull request #2968 from Alfresco/fix/APPS-3046
Update surf-webscript version to 9.4
2024-10-04 11:11:30 +05:30
rrajoria
7a937f1e51 Update surf-webscript version to 9.4 2024-10-03 18:10:40 +05:30
alfresco-build
187e9138da [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-03 11:33:20 +00:00
alfresco-build
b8c9605ae6 [maven-release-plugin][skip ci] prepare release 23.4.0.37 2024-10-03 11:33:18 +00:00
Piotr Żurek
8a1d8dba94 ACS-8870 Propagate latest ATS/AIS (#2967) 2024-10-03 12:53:17 +02:00
mikolajbrzezinski
b2c87aa22d ACS-8867 Add time-out to "Set up the environment" steps (#2955)
* ACS-8867 Add time-out to set up steps
2024-10-03 12:05:59 +02:00
alfresco-build
3748482f51 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-03 08:34:12 +00:00
alfresco-build
1f558e4c58 [maven-release-plugin][skip ci] prepare release 23.4.0.36 2024-10-03 08:34:10 +00:00
dependabot[bot]
a7d31b9811 Bump org.alfresco:acs-event-model from 0.0.27 to 0.0.33 (#2966)
Bumps [org.alfresco:acs-event-model](https://github.com/Alfresco/acs-event-model) from 0.0.27 to 0.0.33.
- [Commits](https://github.com/Alfresco/acs-event-model/compare/acs-event-model-0.0.27...acs-event-model-0.0.33)

---
updated-dependencies:
- dependency-name: org.alfresco:acs-event-model
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-03 08:53:25 +01:00
alfresco-build
42cc7f16c2 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-02 15:50:17 +00:00
alfresco-build
c0ca7cc27f [maven-release-plugin][skip ci] prepare release 23.4.0.35 2024-10-02 15:50:16 +00:00
Krystian Dabrowski
27962726b4 ACS-8871: Bump Spring from 6.0.19 to 6.1.13 (#2947)
* ACS-8871: Bump Spring from 6.0.19 to 6.1.13
2024-10-02 17:09:36 +02:00
Damian Ujma
aeebd3dcc6 ACS-8832 Fix Event Outbox shutdown (#2959)
* ACS-8832 Add destroy method in EventSender

* ACS-8832 Rename

* ACS-8832 Reformat
2024-10-02 16:32:53 +02:00
alfresco-build
dde8dc90e6 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-02 13:42:45 +00:00
alfresco-build
aa1ec3cf35 [maven-release-plugin][skip ci] prepare release 23.4.0.34 2024-10-02 13:42:43 +00:00
Krystian Dabrowski
30ce0a1f01 ACS-6256: Move logic related with managing folders and categories (#2320)
* ACS-6256: Move logic related with managing folders and categories for TAS tests from acs-packaging to community-repo
2024-10-02 14:53:57 +02:00
alfresco-build
291684f3d8 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-02 09:13:16 +00:00
alfresco-build
0fed714674 [maven-release-plugin][skip ci] prepare release 23.4.0.33 2024-10-02 09:13:14 +00:00
Tom Page
f2752929ce Revert "Bump dependency.log4j.version from 2.23.1 to 2.24.1 (#2950)"
This is causing issues in ent-repo.

This reverts commit 4197d9d5c7.
2024-10-02 09:33:12 +01:00
alfresco-build
cf66b63817 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-02 08:11:10 +00:00
alfresco-build
e387ae39cc [maven-release-plugin][skip ci] prepare release 23.4.0.32 2024-10-02 08:11:08 +00:00
dependabot[bot]
e3483507d0 Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.7.0 to 3.10.1 (#2958)
Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.7.0 to 3.10.1.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.7.0...maven-javadoc-plugin-3.10.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 09:30:26 +02:00
alfresco-build
55c6eacf95 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-01 16:58:17 +00:00
alfresco-build
2ff97bfe83 [maven-release-plugin][skip ci] prepare release 23.4.0.31 2024-10-01 16:58:15 +00:00
Tom Page
88874ef191 Merge pull request #2954 from Alfresco/feature/ACS-8850_IE2.0.12-A1
ACS-8850 Update to IE 2.0.12-A1.
2024-10-01 17:17:00 +01:00
alfresco-build
74af4484da [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-01 16:06:44 +00:00
alfresco-build
c24812dc20 [maven-release-plugin][skip ci] prepare release 23.4.0.30 2024-10-01 16:06:42 +00:00
Tom Page
0e78b61f4c ACS-8850 Update to IE 2.0.12. 2024-10-01 15:56:48 +01:00
dependabot[bot]
97353e1ee9 Bump com.google.guava:guava from 33.3.0-jre to 33.3.1-jre (#2941)
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.0-jre to 33.3.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 16:25:47 +02:00
alfresco-build
024ad00229 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-01 13:48:57 +00:00
alfresco-build
c2da1838da [maven-release-plugin][skip ci] prepare release 23.4.0.29 2024-10-01 13:48:50 +00:00
dependabot[bot]
93d4e603ed Bump Alfresco/alfresco-build-tools from 6.1.0 to 7.1.0 (#2952)
Bumps [Alfresco/alfresco-build-tools](https://github.com/alfresco/alfresco-build-tools) from 6.1.0 to 7.1.0.
- [Release notes](https://github.com/alfresco/alfresco-build-tools/releases)
- [Commits](https://github.com/alfresco/alfresco-build-tools/compare/v6.1.0...v7.1.0)

---
updated-dependencies:
- dependency-name: Alfresco/alfresco-build-tools
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 15:08:49 +02:00
dependabot[bot]
4197d9d5c7 Bump dependency.log4j.version from 2.23.1 to 2.24.1 (#2950)
Bumps `dependency.log4j.version` from 2.23.1 to 2.24.1.

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.23.1 to 2.24.1

Updates `org.apache.logging.log4j:log4j-api` from 2.23.1 to 2.24.1

Updates `org.apache.logging.log4j:log4j-core` from 2.23.1 to 2.24.1

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 14:31:22 +02:00
dependabot[bot]
a323e56a5a Bump org.mockito:mockito-core from 5.13.0 to 5.14.1 (#2948)
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.13.0 to 5.14.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.13.0...v5.14.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 14:01:44 +02:00
alfresco-build
6f2100e072 [maven-release-plugin][skip ci] prepare for next development iteration 2024-10-01 10:25:57 +00:00
alfresco-build
a2dcb0ebd7 [maven-release-plugin][skip ci] prepare release 23.4.0.28 2024-10-01 10:25:55 +00:00
Tom Page
ef2019d844 Merge pull request #2940 from Alfresco/dependabot/maven/org.alfresco.tas-utility-5.0.2
Bump org.alfresco.tas:utility from 5.0.1 to 5.0.2
2024-10-01 10:44:10 +01:00
Tom Page
a5adc32d79 Merge pull request #2953 from Alfresco/dependabot/github_actions/Alfresco/ya-pmd-scan-4.1.0
Bump Alfresco/ya-pmd-scan from 4.0.0 to 4.1.0
2024-10-01 10:43:22 +01:00
dependabot[bot]
a5f8e80bcc Bump Alfresco/ya-pmd-scan from 4.0.0 to 4.1.0
Bumps [Alfresco/ya-pmd-scan](https://github.com/alfresco/ya-pmd-scan) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/alfresco/ya-pmd-scan/releases)
- [Commits](https://github.com/alfresco/ya-pmd-scan/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: Alfresco/ya-pmd-scan
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 00:20:33 +00:00
Tom Page
de3dfc1265 ACS-8850 Update to IE 2.0.12-A1. 2024-09-30 16:01:24 +01:00
alfresco-build
487dc56e3c [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-29 00:07:50 +00:00
alfresco-build
fd4e630f0f [maven-release-plugin][skip ci] prepare release 23.4.0.27 2024-09-29 00:07:48 +00:00
Alfresco CI User
008b33efbd [force] Force release for 2024-09-29. 2024-09-29 00:04:25 +00:00
alfresco-build
f3e0c43f3b [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-25 14:43:46 +00:00
alfresco-build
9f6ef99ef5 [maven-release-plugin][skip ci] prepare release 23.4.0.26 2024-09-25 14:43:44 +00:00
Tom Page
5e9d7f39d3 Merge pull request #2943 from Alfresco/feature/IncludeAGSTAS
Include AGS and TAS in pre-commit scan.
2024-09-25 15:01:50 +01:00
Maciej Pichura
0f6950a72e MNT-24346 Fix "0" return status code when SORL unavailable (#2942)
* MNT-24346: Fix 0 status code in Search API when Solr is unavailable.

* MNT-24346: Fixing PMD issues.

* MNT-24346: Fixing formatting.

* MNT-24346: Reverting accidental method name change.

* MNT-24346: Fixing spotless issues.

* MNT-24346: Fixing spotless issues.

* MNT-24346: Fixing spotless issues.

* MNT-24346 Fix line endings.

---------

Co-authored-by: Tom Page <tom.page@alfresco.com>
2024-09-25 15:27:06 +02:00
Tom Page
87bba8e381 Include AGS and TAS in pre-commit scan. 2024-09-25 14:16:27 +01:00
Maciej Pichura
837fb0cccd MNT-24346: Fix "0" return status code in Search API when Solr is unavailable. (#2939)
* MNT-24346: Fix 0 status code in Search API when Solr is unavailable.

* MNT-24346: Fixing PMD issues.

* MNT-24346: Fixing formatting.

* MNT-24346: Reverting accidental method name change.
2024-09-25 12:47:06 +02:00
Tom Page
0b511e0b55 Unify checkout action. 2024-09-25 11:33:31 +01:00
alfresco-build
67aa6ac5fc [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-25 10:25:28 +00:00
alfresco-build
6805ce85c8 [maven-release-plugin][skip ci] prepare release 23.4.0.25 2024-09-25 10:25:26 +00:00
Tom Page
b00e11cb6f Add precommit for secret scanning, formatting and license header checking. (#2938)
* Add precommit for secret scanning, formatting and license header checking.

* Turn off bash debug logging.

* Skip precommit checks that apply to all files.

There are too many violations to run against all files.
2024-09-25 10:35:39 +01:00
dependabot[bot]
3d9b58ea76 Bump org.alfresco.tas:utility from 5.0.1 to 5.0.2
Bumps [org.alfresco.tas:utility](https://github.com/Alfresco/alfresco-tas-utility) from 5.0.1 to 5.0.2.
- [Changelog](https://github.com/Alfresco/alfresco-tas-utility/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/Alfresco/alfresco-tas-utility/compare/utility-5.0.1...utility-5.0.2)

---
updated-dependencies:
- dependency-name: org.alfresco.tas:utility
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-24 22:06:14 +00:00
alfresco-build
02254b2ac4 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-22 00:08:50 +00:00
alfresco-build
7df8281358 [maven-release-plugin][skip ci] prepare release 23.4.0.24 2024-09-22 00:08:48 +00:00
Alfresco CI User
3f2a143343 [force] Force release for 2024-09-22. 2024-09-22 00:04:27 +00:00
alfresco-build
c8bfc18f83 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-19 19:00:03 +00:00
alfresco-build
8b3bd59d73 [maven-release-plugin][skip ci] prepare release 23.4.0.23 2024-09-19 19:00:01 +00:00
Tiago Salvado
a6e915371f [MNT-24282] Obtain site manager authority as system and keep site manager permissions when inheritance flag is disabled (#2914)
* [MNT-24282] Obtain site manager authority as system

* [MNT-24282] Add unit test

* [MNT-24282] Do not remove site manager permissions from local set when inheritance flag is disabled

* [MNT-24282] PMD scan changes
2024-09-19 19:22:30 +01:00
alfresco-build
f5f1106506 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-19 16:39:33 +00:00
alfresco-build
5b0c31154e [maven-release-plugin][skip ci] prepare release 23.4.0.22 2024-09-19 16:39:31 +00:00
Suneet Gupta
70a90c3870 [MNT-23264] Added fix for running job as system user (#2926)
* [MNT-23264] Added fix for running job as system user

* [MNT-23264] Added fix for running job as system user

* [MNT-23264] Added fix for running job as system user

* [MNT-23264] Added fix for running job as system user

* [MNT-23264] Added fix for running job as system user
2024-09-19 21:03:37 +05:30
alfresco-build
a10ab896df [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-19 09:24:58 +00:00
alfresco-build
5bc0c3975b [maven-release-plugin][skip ci] prepare release 23.4.0.21 2024-09-19 09:24:56 +00:00
dependabot[bot]
6e20330424 Bump org.springframework.security:spring-security-bom (#2864)
Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 6.3.1 to 6.3.3.
- [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.3.1...6.3.3)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-19 10:48:04 +02:00
Tiago Salvado
1c1c9704a1 [MNT-24555] Set download node name on node creation (#2901)
* [MNT-24555] Set download node name on node creation

* [MNT-24555] PMD scan changes
2024-09-19 09:28:52 +01:00
alfresco-build
b7642b5813 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-18 22:09:42 +00:00
alfresco-build
69583721da [maven-release-plugin][skip ci] prepare release 23.4.0.20 2024-09-18 22:09:40 +00:00
Tiago Salvado
d17c11b8ad [MNT-24590] Bump spring-webscripts to 9.3 (#2922)
* [MNT-24590] Bump spring-webscripts to 9.3

* Removed duplicated property: dependency.webscripts.version
2024-09-18 22:32:30 +01:00
alfresco-build
57daaa24da [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-18 15:25:06 +00:00
alfresco-build
da96fd52ca [maven-release-plugin][skip ci] prepare release 23.4.0.19 2024-09-18 15:25:04 +00:00
Eva Vasques
0fd088fc59 MNT-24441 Transaction Retries From A Behavior Can Fail During REST API Calls (#2921)
* Reset the buffered request at the beginning of the transaction
2024-09-18 15:46:53 +01:00
alfresco-build
dea78f5d30 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-18 09:42:05 +00:00
alfresco-build
aa02febb3f [maven-release-plugin][skip ci] prepare release 23.4.0.18 2024-09-18 09:42:03 +00:00
Maciej Pichura
84e1c90745 Revert "Bump dependency.log4j.version from 2.23.1 to 2.24.0 (#2904)" (#2920)
This reverts commit 22b6131f93.
2024-09-18 11:06:41 +02:00
alfresco-build
7ce2349edc [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-18 07:50:32 +00:00
alfresco-build
6d02269164 [maven-release-plugin][skip ci] prepare release 23.4.0.17 2024-09-18 07:50:29 +00:00
Maciej Pichura
ba323979ff Revert "Bump dependency.spring.version from 6.0.19 to 6.1.13 (#2909)" (#2919)
This reverts commit b4c18c9902.
2024-09-18 09:13:40 +02:00
alfresco-build
b1cf324289 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-17 11:15:23 +00:00
alfresco-build
acb34b7861 [maven-release-plugin][skip ci] prepare release 23.4.0.16 2024-09-17 11:15:21 +00:00
dependabot[bot]
ab1cce1fec Bump joda-time:joda-time from 2.12.7 to 2.13.0 (#2917)
Bumps [joda-time:joda-time](https://github.com/JodaOrg/joda-time) from 2.12.7 to 2.13.0.
- [Release notes](https://github.com/JodaOrg/joda-time/releases)
- [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt)
- [Commits](https://github.com/JodaOrg/joda-time/compare/v2.12.7...v2.13.0)

---
updated-dependencies:
- dependency-name: joda-time:joda-time
  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-09-17 12:37:22 +02:00
alfresco-build
7550799a26 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-16 15:43:57 +00:00
alfresco-build
6238485d2b [maven-release-plugin][skip ci] prepare release 23.4.0.15 2024-09-16 15:43:55 +00:00
dependabot[bot]
8059ccad53 Bump org.owasp.encoder:encoder from 1.2.3 to 1.3.1 (#2865)
Bumps [org.owasp.encoder:encoder](https://github.com/owasp/owasp-java-encoder) from 1.2.3 to 1.3.1.
- [Release notes](https://github.com/owasp/owasp-java-encoder/releases)
- [Commits](https://github.com/owasp/owasp-java-encoder/compare/v1.2.3...v1.3.1)

---
updated-dependencies:
- dependency-name: org.owasp.encoder:encoder
  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-09-16 16:42:13 +02:00
dependabot[bot]
3896979b6c Bump dependency.webscripts.version from 9.0 to 9.2 (#2910)
Bumps `dependency.webscripts.version` from 9.0 to 9.2.

Updates `org.alfresco.surf:spring-surf-core-configservice` from 9.0 to 9.2

Updates `org.alfresco.surf:spring-webscripts` from 9.0 to 9.2
- [Commits](https://github.com/Alfresco/surf-webscripts/compare/spring-surf-webscripts-parent-9.0...spring-surf-webscripts-parent-9.2)

Updates `org.alfresco.surf:spring-webscripts-api` from 9.0 to 9.2

---
updated-dependencies:
- dependency-name: org.alfresco.surf:spring-surf-core-configservice
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.alfresco.surf:spring-webscripts
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.alfresco.surf:spring-webscripts-api
  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-09-16 16:08:45 +02:00
alfresco-build
98a978a4d1 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-16 14:03:45 +00:00
alfresco-build
cb333d1c20 [maven-release-plugin][skip ci] prepare release 23.4.0.14 2024-09-16 14:03:43 +00:00
dependabot[bot]
ee1d33cb41 Bump org.apache.maven.plugins:maven-dependency-plugin (#2868)
Bumps [org.apache.maven.plugins:maven-dependency-plugin](https://github.com/apache/maven-dependency-plugin) from 3.7.1 to 3.8.0.
- [Release notes](https://github.com/apache/maven-dependency-plugin/releases)
- [Commits](https://github.com/apache/maven-dependency-plugin/compare/maven-dependency-plugin-3.7.1...maven-dependency-plugin-3.8.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-dependency-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 15:27:24 +02:00
dependabot[bot]
1e16f74292 Bump org.apache.maven.plugins:maven-failsafe-plugin from 2.22.2 to 3.5.0 (#2885)
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 2.22.2 to 3.5.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-2.22.2...surefire-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 14:26:12 +02:00
alfresco-build
8d72d662a0 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-16 12:06:28 +00:00
alfresco-build
f346992500 [maven-release-plugin][skip ci] prepare release 23.4.0.13 2024-09-16 12:06:26 +00:00
dependabot[bot]
5399fed53b Bump org.apache.httpcomponents.core5:httpcore5 from 5.2.5 to 5.3 (#2911)
Bumps [org.apache.httpcomponents.core5:httpcore5](https://github.com/apache/httpcomponents-core) from 5.2.5 to 5.3.
- [Changelog](https://github.com/apache/httpcomponents-core/blob/master/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-core/compare/rel/v5.2.5...rel/v5.3)

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.core5:httpcore5
  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-09-16 13:27:40 +02:00
alfresco-build
1766ac749d [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-16 11:23:36 +00:00
alfresco-build
5b31b22840 [maven-release-plugin][skip ci] prepare release 23.4.0.12 2024-09-16 11:23:33 +00:00
dependabot[bot]
b4c18c9902 Bump dependency.spring.version from 6.0.19 to 6.1.13 (#2909)
* Bump dependency.spring.version from 6.0.19 to 6.1.13

Bumps `dependency.spring.version` from 6.0.19 to 6.1.13.

Updates `org.springframework:spring-aop` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-beans` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-context` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-context-support` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-core` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-expression` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-jdbc` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-jms` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-test` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-orm` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-tx` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-web` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

Updates `org.springframework:spring-webmvc` from 6.0.19 to 6.1.13
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v6.0.19...v6.1.13)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Remove deprecated usage of notNull(Object)

* ACS-8413: Fixing SPeL for List property.

* Revert "[MNT-23264] script execution error (#2900)" (#2912)

This reverts commit 58bad96724.

* ACS-8413: Changing keycloak setup in docker-compose.

* ACS-8413: Revert: Changing keycloak setup in docker-compose.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Domenico Sibilio <domenicosibilio@gmail.com>
Co-authored-by: mpichura <maciej.pichura@hyland.com>
Co-authored-by: Manish Kumar <110275771+code4uuuu@users.noreply.github.com>
2024-09-16 12:45:24 +02:00
alfresco-build
7491ba5156 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-16 10:11:46 +00:00
alfresco-build
57d8f4bab7 [maven-release-plugin][skip ci] prepare release 23.4.0.11 2024-09-16 10:11:44 +00:00
Tom Page
6c0b29ec3d Revert "Bump org.apache.httpcomponents.client5:httpclient5 from 5.2.1 to 5.3.1 (#2416)"
This reverts commit ef878fe20f.
2024-09-16 10:18:25 +01:00
alfresco-build
91adfe22d7 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-15 00:08:45 +00:00
alfresco-build
40036caae4 [maven-release-plugin][skip ci] prepare release 23.4.0.10 2024-09-15 00:08:42 +00:00
Alfresco CI User
5a0aadb425 [force] Force release for 2024-09-15. 2024-09-15 00:04:24 +00:00
dependabot[bot]
d4a8ef2442 Bump dependency.poi.version from 5.2.5 to 5.3.0 (#2825)
Bumps `dependency.poi.version` from 5.2.5 to 5.3.0.

Updates `org.apache.poi:poi` from 5.2.5 to 5.3.0

Updates `org.apache.poi:poi-ooxml` from 5.2.5 to 5.3.0

Updates `org.apache.poi:poi-scratchpad` from 5.2.5 to 5.3.0

---
updated-dependencies:
- dependency-name: org.apache.poi:poi
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.poi:poi-ooxml
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.poi:poi-scratchpad
  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-09-13 16:06:46 +01:00
dependabot[bot]
5555ee6871 Bump com.networknt:json-schema-validator from 1.5.0 to 1.5.1 (#2829)
Bumps [com.networknt:json-schema-validator](https://github.com/networknt/json-schema-validator) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/networknt/json-schema-validator/releases)
- [Changelog](https://github.com/networknt/json-schema-validator/blob/master/CHANGELOG.md)
- [Commits](https://github.com/networknt/json-schema-validator/compare/1.5.0...1.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 16:06:25 +01:00
dependabot[bot]
1ba62b2a4c Bump org.mybatis:mybatis-spring from 3.0.3 to 3.0.4 (#2851)
Bumps [org.mybatis:mybatis-spring](https://github.com/mybatis/spring) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/mybatis/spring/releases)
- [Commits](https://github.com/mybatis/spring/compare/mybatis-spring-3.0.3...mybatis-spring-3.0.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 16:05:58 +01:00
dependabot[bot]
8abf1c3d36 Bump org.apache.commons:commons-compress from 1.26.2 to 1.27.1 (#2863)
Bumps org.apache.commons:commons-compress from 1.26.2 to 1.27.1.

---
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-09-13 16:05:40 +01:00
dependabot[bot]
22b6131f93 Bump dependency.log4j.version from 2.23.1 to 2.24.0 (#2904)
Bumps `dependency.log4j.version` from 2.23.1 to 2.24.0.

Updates `org.apache.logging.log4j:log4j-slf4j2-impl` from 2.23.1 to 2.24.0

Updates `org.apache.logging.log4j:log4j-api` from 2.23.1 to 2.24.0

Updates `org.apache.logging.log4j:log4j-core` from 2.23.1 to 2.24.0

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-13 16:04:53 +01:00
Manish Kumar
8a731dce40 Revert "[MNT-23264] script execution error (#2900)" (#2912)
This reverts commit 58bad96724.
2024-09-13 11:21:41 +05:30
dependabot[bot]
a18861a4f6 Bump dependency.webscripts.version from 9.0 to 9.2 (#2569)
Bumps `dependency.webscripts.version` from 9.0 to 9.2.

Updates `org.alfresco.surf:spring-surf-core-configservice` from 9.0 to 9.2

Updates `org.alfresco.surf:spring-webscripts` from 9.0 to 9.2
- [Commits](https://github.com/Alfresco/surf-webscripts/compare/spring-surf-webscripts-parent-9.0...spring-surf-webscripts-parent-9.2)

Updates `org.alfresco.surf:spring-webscripts-api` from 9.0 to 9.2

---
updated-dependencies:
- dependency-name: org.alfresco.surf:spring-surf-core-configservice
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.alfresco.surf:spring-webscripts
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.alfresco.surf:spring-webscripts-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Page <tpage-alfresco@users.noreply.github.com>
2024-09-12 15:26:07 +01:00
dependabot[bot]
87f31c5a3a Bump jakarta.annotation:jakarta.annotation-api from 2.1.1 to 3.0.0 (#2574)
Bumps [jakarta.annotation:jakarta.annotation-api](https://github.com/jakartaee/common-annotations-api) from 2.1.1 to 3.0.0.
- [Commits](https://github.com/jakartaee/common-annotations-api/compare/2.1.1...3.0.0)

---
updated-dependencies:
- dependency-name: jakarta.annotation:jakarta.annotation-api
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 12:43:29 +01:00
dependabot[bot]
ef878fe20f Bump org.apache.httpcomponents.client5:httpclient5 from 5.2.1 to 5.3.1 (#2416)
Bumps [org.apache.httpcomponents.client5:httpclient5](https://github.com/apache/httpcomponents-client) from 5.2.1 to 5.3.1.
- [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.3.1/RELEASE_NOTES.txt)
- [Commits](https://github.com/apache/httpcomponents-client/compare/rel/v5.2.1...rel/v5.3.1)

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents.client5:httpclient5
  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-09-12 12:43:19 +01:00
alfresco-build
168aae1a3d [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-12 11:35:29 +00:00
alfresco-build
ed706aa5d3 [maven-release-plugin][skip ci] prepare release 23.4.0.9 2024-09-12 11:35:27 +00:00
dependabot[bot]
fe5a1d8436 Bump org.apache.santuario:xmlsec from 3.0.3 to 4.0.2 (#2468)
Bumps org.apache.santuario:xmlsec from 3.0.3 to 4.0.2.

---
updated-dependencies:
- dependency-name: org.apache.santuario:xmlsec
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 11:48:02 +01:00
dependabot[bot]
54d122ccc1 Bump org.apache.commons:commons-lang3 from 3.14.0 to 3.17.0 (#2888)
Bumps org.apache.commons:commons-lang3 from 3.14.0 to 3.17.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  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-09-12 11:44:21 +01:00
dependabot[bot]
945fe52df9 Bump io.netty:netty-bom from 4.1.110.Final to 4.1.113.Final (#2899)
Bumps [io.netty:netty-bom](https://github.com/netty/netty) from 4.1.110.Final to 4.1.113.Final.
- [Commits](https://github.com/netty/netty/compare/netty-4.1.110.Final...netty-4.1.113.Final)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 11:35:44 +01:00
dependabot[bot]
f1d9203430 Bump org.eclipse.jetty:jetty-webapp from 11.0.22 to 11.0.24 (#2896)
Bumps org.eclipse.jetty:jetty-webapp from 11.0.22 to 11.0.24.

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-webapp
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 11:35:29 +01:00
dependabot[bot]
1dc0720582 Bump org.codehaus.mojo:buildnumber-maven-plugin from 3.2.0 to 3.2.1 (#2895)
Bumps [org.codehaus.mojo:buildnumber-maven-plugin](https://github.com/mojohaus/buildnumber-maven-plugin) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/mojohaus/buildnumber-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/buildnumber-maven-plugin/compare/3.2.0...3.2.1)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:buildnumber-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 11:35:10 +01:00
dependabot[bot]
8dcc19cc63 Bump org.yaml:snakeyaml from 2.2 to 2.3 (#2892)
Bumps [org.yaml:snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) from 2.2 to 2.3.
- [Commits](https://bitbucket.org/snakeyaml/snakeyaml/branches/compare/snakeyaml-2.3..snakeyaml-2.2)

---
updated-dependencies:
- dependency-name: org.yaml:snakeyaml
  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-09-12 11:34:55 +01:00
dependabot[bot]
d4883af0d0 Bump org.mockito:mockito-core from 5.12.0 to 5.13.0 (#2884)
Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.12.0 to 5.13.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.12.0...v5.13.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 11:34:06 +01:00
dependabot[bot]
4cb220de66 Bump org.postgresql:postgresql from 42.7.3 to 42.7.4 (#2869)
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.7.3 to 42.7.4.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.7.3...REL42.7.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 11:33:49 +01:00
Tom Page
97bcd725ee Merge pull request #2861 from Alfresco/dependabot/maven/com.google.guava-guava-33.3.0-jre
Bump com.google.guava:guava from 33.2.1-jre to 33.3.0-jre
2024-09-12 11:33:22 +01:00
Tom Page
38259f9b39 Merge pull request #2852 from Alfresco/dependabot/maven/org.slf4j-slf4j-api-2.0.16
Bump org.slf4j:slf4j-api from 2.0.13 to 2.0.16
2024-09-12 11:32:56 +01:00
Tom Page
9b1f0d78a5 Merge pull request #2833 from Alfresco/dependabot/maven/org.eclipse.parsson-parsson-1.1.7
Bump org.eclipse.parsson:parsson from 1.1.6 to 1.1.7
2024-09-12 11:32:23 +01:00
Tom Page
95d7dbc5fc Merge pull request #2845 from Alfresco/dependabot/maven/org.awaitility-awaitility-4.2.2
Bump org.awaitility:awaitility from 4.2.1 to 4.2.2
2024-09-12 11:31:58 +01:00
Tom Page
920366d287 Merge pull request #2821 from Alfresco/dependabot/maven/org.apache.maven.plugins-maven-war-plugin-3.4.0
Bump org.apache.maven.plugins:maven-war-plugin from 3.3.2 to 3.4.0
2024-09-12 11:28:34 +01:00
Tom Page
14e26c46fc Merge pull request #2820 from Alfresco/dependabot/maven/org.codehaus.mojo-license-maven-plugin-2.4.0
Bump org.codehaus.mojo:license-maven-plugin from 2.0.1 to 2.4.0
2024-09-12 11:28:21 +01:00
Tom Page
c934f556cd Merge pull request #2818 from Alfresco/dependabot/maven/org.apache.maven.plugins-maven-enforcer-plugin-3.5.0
Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.3.0 to 3.5.0
2024-09-12 11:27:59 +01:00
Tom Page
73901303c5 Merge pull request #2815 from Alfresco/dependabot/maven/org.mybatis-mybatis-3.5.16
Bump org.mybatis:mybatis from 3.5.13 to 3.5.16
2024-09-12 11:27:43 +01:00
Tom Page
bbb22a79eb Merge pull request #2784 from Alfresco/dependabot/maven/commons-codec-commons-codec-1.17.1
Bump commons-codec:commons-codec from 1.17.0 to 1.17.1
2024-09-12 11:27:21 +01:00
Tom Page
099b072a47 Merge pull request #2780 from Alfresco/dependabot/maven/dependency.jackson.version-2.17.2
Bump dependency.jackson.version from 2.15.2 to 2.17.2
2024-09-12 11:26:57 +01:00
Tom Page
0bf3c078cf Merge pull request #2774 from Alfresco/dependabot/maven/com.github.docker-java-docker-java-3.4.0
Bump com.github.docker-java:docker-java from 3.3.6 to 3.4.0
2024-09-12 11:26:35 +01:00
Tom Page
9b45f75b48 Merge pull request #2731 from Alfresco/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2024-09-12 11:25:10 +01:00
Tom Page
52914459ea Merge pull request #2710 from Alfresco/dependabot/maven/com.fasterxml.woodstox-woodstox-core-7.0.0
Bump com.fasterxml.woodstox:woodstox-core from 6.5.1 to 7.0.0
2024-09-12 11:24:55 +01:00
Tom Page
446b08aa03 Merge pull request #2686 from Alfresco/dependabot/maven/jakarta.servlet-jakarta.servlet-api-6.1.0
Bump jakarta.servlet:jakarta.servlet-api from 6.0.0 to 6.1.0
2024-09-12 11:22:53 +01:00
Tom Page
08fbc569fe Merge pull request #2652 from Alfresco/dependabot/maven/jakarta.xml.soap-jakarta.xml.soap-api-3.0.2
Bump jakarta.xml.soap:jakarta.xml.soap-api from 2.0.1 to 3.0.2
2024-09-12 11:21:05 +01:00
Tom Page
a8f50416a3 Merge pull request #2487 from Alfresco/dependabot/maven/org.json-json-20240303
Bump org.json:json from 20231013 to 20240303
2024-09-12 11:11:31 +01:00
Tom Page
c5122ddca0 Merge pull request #2431 from Alfresco/dependabot/maven/joda-time-joda-time-2.12.7
Bump joda-time:joda-time from 2.12.5 to 2.12.7
2024-09-12 11:10:01 +01:00
Tom Page
1d93bcbb0d Merge pull request #2329 from Alfresco/dependabot/maven/com.drewnoakes-metadata-extractor-2.19.0
Bump com.drewnoakes:metadata-extractor from 2.18.0 to 2.19.0
2024-09-12 11:02:12 +01:00
alfresco-build
c34f9af62d [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-11 15:58:00 +00:00
alfresco-build
112875fbfd [maven-release-plugin][skip ci] prepare release 23.4.0.8 2024-09-11 15:57:58 +00:00
Tom Page
2d21456342 Merge pull request #2905 from Alfresco/feature/ACS-8754_FixStatusCode
ACS-8754 Return 405 status code when calling /entity/id/relationship against a resource that only supports ReadById.
2024-09-11 16:19:55 +01:00
Tom Page
0363cab870 ACS-8754 Return 405 status code when calling /entity/id/relationship against a resource that only supports ReadById. 2024-09-11 15:27:33 +01:00
alfresco-build
1f708ad712 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-09 09:53:32 +00:00
alfresco-build
475894525d [maven-release-plugin][skip ci] prepare release 23.4.0.7 2024-09-09 09:53:30 +00:00
Manish Kumar
58bad96724 [MNT-23264] script execution error (#2900)
* [MNT-23264] fix script execution error

* [MNT-23264]

* [MNT-23264] fix formatting issue

* [MNT-23264] fix formatting issue
2024-09-09 14:40:33 +05:30
alfresco-build
02486a432a [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-08 00:07:09 +00:00
alfresco-build
6de21cca78 [maven-release-plugin][skip ci] prepare release 23.4.0.6 2024-09-08 00:07:07 +00:00
Alfresco CI User
185f7ebeb6 [force] Force release for 2024-09-08. 2024-09-08 00:04:21 +00:00
alfresco-build
1b55aa9691 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-03 11:11:42 +00:00
alfresco-build
51aa490439 [maven-release-plugin][skip ci] prepare release 23.4.0.5 2024-09-03 11:11:39 +00:00
Aleksandra Onych
4cf2e76430 ACS-8670 Deal with upcoming GitHub Actions deprecations (#2870)
Co-authored-by: Domenico Sibilio <domenicosibilio@gmail.com>
2024-09-03 12:34:31 +02:00
alfresco-build
9e34ae3df8 [maven-release-plugin][skip ci] prepare for next development iteration 2024-09-01 00:08:51 +00:00
alfresco-build
6a4f82deae [maven-release-plugin][skip ci] prepare release 23.4.0.4 2024-09-01 00:08:49 +00:00
Alfresco CI User
0e3173a573 [force] Force release for 2024-09-01. 2024-09-01 00:04:37 +00:00
alfresco-build
2744561346 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-28 10:25:33 +00:00
alfresco-build
9b8ae96c2e [maven-release-plugin][skip ci] prepare release 23.4.0.3 2024-08-28 10:25:29 +00:00
Domenico Sibilio
adb8913b56 PRODDEL-8304 Bump API Explorer to 23.3.0 (#2881) 2024-08-28 11:45:17 +02:00
alfresco-build
02237bd280 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-28 07:55:13 +00:00
alfresco-build
78001ed22c [maven-release-plugin][skip ci] prepare release 23.4.0.2 2024-08-28 07:55:11 +00:00
mohit-singh4
a568aeda17 [MNT- 24124] Adding node references in DownloadStorage and ZipDownloadExporter files. (#2880)
* [MNT-24124]: Adding nodeReferences in loggers

* [MNT-24124]: Adding nodeReferences in loggers

* [fix/MNT-24124] Adding-nodeReferences-inLogger

---------

Co-authored-by: Mohit Singh <mohit.singh4@globallogic.com>
Co-authored-by: mohit-singh4 <mohit.singh@contractors.hyland.com>
2024-08-28 12:47:47 +05:30
alfresco-build
f890e9f995 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-28 06:08:52 +00:00
alfresco-build
0ddeac79bb [maven-release-plugin][skip ci] prepare release 23.4.0.1 2024-08-28 06:08:50 +00:00
Piotr Żurek
67ca73820b ACS-8323 Allow sending events in a transaction (#2782) 2024-08-28 07:00:33 +02:00
mpichura
1df8702e16 Updating master branch to 23.4.0 after 23.3.0 ACS release [skip ci] 2024-08-26 08:55:10 +02:00
alfresco-build
12c4481ac2 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-25 00:07:27 +00:00
alfresco-build
0f572ec21a [maven-release-plugin][skip ci] prepare release 23.3.0.99 2024-08-25 00:07:25 +00:00
Alfresco CI User
9c121743d9 [force] Force release for 2024-08-25. 2024-08-25 00:04:05 +00:00
alfresco-build
c754eaeb93 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-22 10:03:32 +00:00
alfresco-build
1f3e08f439 [maven-release-plugin][skip ci] prepare release 23.3.0.98 2024-08-22 10:03:30 +00:00
Kacper Magdziarz
5efa236cfe [ACS-8521] Bump ATS 4.1.4 (#2867) 2024-08-22 11:26:57 +02:00
alfresco-build
df658371cd [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-22 08:36:50 +00:00
alfresco-build
65f6d0ee45 [maven-release-plugin][skip ci] prepare release 23.3.0.97 2024-08-22 08:36:48 +00:00
rrajoria
275c42014e Bump AOS Version 3.1.0 2024-08-22 13:27:20 +05:30
dependabot[bot]
b9e76970f9 Bump com.google.guava:guava from 33.2.1-jre to 33.3.0-jre
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.2.1-jre to 33.3.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 22:44:12 +00:00
alfresco-build
d0135e4b76 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-19 12:27:22 +00:00
alfresco-build
d405be6273 [maven-release-plugin][skip ci] prepare release 23.3.0.96 2024-08-19 12:27:20 +00:00
Paweł Rainer
b7862932e6 MNT-24126: add support for rendition service 2 (#2853) 2024-08-19 13:46:09 +02:00
alfresco-build
970bca464f [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-18 00:07:10 +00:00
alfresco-build
f76d43eced [maven-release-plugin][skip ci] prepare release 23.3.0.95 2024-08-18 00:07:08 +00:00
Alfresco CI User
e07c452cf0 [force] Force release for 2024-08-18. 2024-08-18 00:04:14 +00:00
alfresco-build
64899ca358 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-13 08:28:39 +00:00
alfresco-build
de498664b6 [maven-release-plugin][skip ci] prepare release 23.3.0.94 2024-08-13 08:28:35 +00:00
Marcin Strankowski
46031feb52 [skip tests] Retry push 2024-08-13 10:24:15 +02:00
dependabot[bot]
a93686acd5 Bump org.postgresql:postgresql from 42.6.0 to 42.7.3 (#2512) 2024-08-13 07:29:49 +00:00
dependabot[bot]
0a46ec0ab2 Bump org.slf4j:slf4j-api from 2.0.13 to 2.0.16
Bumps org.slf4j:slf4j-api from 2.0.13 to 2.0.16.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 22:14:19 +00:00
alfresco-build
aa86d07738 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-08 10:47:46 +00:00
alfresco-build
553a8aae1c [maven-release-plugin][skip ci] prepare release 23.3.0.93 2024-08-08 10:47:43 +00:00
rrajoria
f1bf73c269 Update AOS Alpha version 2024-08-08 13:38:53 +05:30
dependabot[bot]
ce39a66934 Bump org.awaitility:awaitility from 4.2.1 to 4.2.2
Bumps [org.awaitility:awaitility](https://github.com/awaitility/awaitility) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/awaitility/awaitility/blob/master/changelog.txt)
- [Commits](https://github.com/awaitility/awaitility/compare/awaitility-4.2.1...awaitility-4.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 23:03:14 +00:00
alfresco-build
64fa671f33 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-07 17:58:45 +00:00
alfresco-build
70c1da0213 [maven-release-plugin][skip ci] prepare release 23.3.0.92 2024-08-07 17:58:42 +00:00
Sara
283fffef00 ACS-8520 Bump t-core to 5.1.4-A3, ATS 4.1.4-A2 (#2843) 2024-08-07 18:09:42 +01:00
alfresco-build
e99e3d69ba [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-07 10:57:05 +00:00
alfresco-build
f826b08b2b [maven-release-plugin][skip ci] prepare release 23.3.0.91 2024-08-07 10:57:03 +00:00
Damian Ujma
3bd57adeef ACS-8370 Switch to new tags for tomcat base images in Dockerfiles (#2841)
* ACS-8370 Switch to new tags for tomcat base images in Dockerfiles

* ACS-8370 Update fontconfig package

* ACS-8370 Update tomcat image SHA
2024-08-07 12:15:29 +02:00
alfresco-build
a4f8b8d4b9 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-06 07:36:20 +00:00
alfresco-build
6363c9e17a [maven-release-plugin][skip ci] prepare release 23.3.0.90 2024-08-06 07:36:18 +00:00
dependabot[bot]
b8a94ff310 Bump io.fabric8:docker-maven-plugin from 0.43.4 to 0.45.0 (#2831)
Bumps [io.fabric8:docker-maven-plugin](https://github.com/fabric8io/docker-maven-plugin) from 0.43.4 to 0.45.0.
- [Release notes](https://github.com/fabric8io/docker-maven-plugin/releases)
- [Changelog](https://github.com/fabric8io/docker-maven-plugin/blob/master/doc/changelog.md)
- [Commits](https://github.com/fabric8io/docker-maven-plugin/compare/v0.43.4...v0.45.0)

---
updated-dependencies:
- dependency-name: io.fabric8:docker-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-06 08:57:54 +02:00
alfresco-build
fd9e279715 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-05 14:21:04 +00:00
alfresco-build
6210ca95f9 [maven-release-plugin][skip ci] prepare release 23.3.0.89 2024-08-05 14:21:01 +00:00
Igor Białas
7edba79f69 Improve README (#2834) 2024-08-05 15:41:41 +02:00
alfresco-build
1eb24d2d85 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-04 00:06:56 +00:00
alfresco-build
3305eb91e5 [maven-release-plugin][skip ci] prepare release 23.3.0.88 2024-08-04 00:06:55 +00:00
Alfresco CI User
0994545c65 [force] Force release for 2024-08-04. 2024-08-04 00:04:06 +00:00
alfresco-build
94377f1e30 [maven-release-plugin][skip ci] prepare for next development iteration 2024-08-02 14:09:28 +00:00
alfresco-build
9c9d3dbbd5 [maven-release-plugin][skip ci] prepare release 23.3.0.87 2024-08-02 14:09:26 +00:00
Domenico Sibilio
7b4c210773 ACS-8421 Bump Transform Core to 5.1.4-A1 + Service to 4.1.4-A1 (#2839) 2024-08-02 15:30:46 +02:00
dependabot[bot]
d098508e53 Bump org.eclipse.parsson:parsson from 1.1.6 to 1.1.7
Bumps [org.eclipse.parsson:parsson](https://github.com/eclipse-ee4j/parsson) from 1.1.6 to 1.1.7.
- [Release notes](https://github.com/eclipse-ee4j/parsson/releases)
- [Commits](https://github.com/eclipse-ee4j/parsson/compare/1.1.6...1.1.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 22:46:07 +00:00
dependabot[bot]
738a77301a Bump org.apache.maven.plugins:maven-war-plugin from 3.3.2 to 3.4.0
Bumps [org.apache.maven.plugins:maven-war-plugin](https://github.com/apache/maven-war-plugin) from 3.3.2 to 3.4.0.
- [Commits](https://github.com/apache/maven-war-plugin/compare/maven-war-plugin-3.3.2...maven-war-plugin-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-war-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 22:37:59 +00:00
dependabot[bot]
be0ea5b247 Bump org.codehaus.mojo:license-maven-plugin from 2.0.1 to 2.4.0
Bumps [org.codehaus.mojo:license-maven-plugin](https://github.com/mojohaus/license-maven-plugin) from 2.0.1 to 2.4.0.
- [Release notes](https://github.com/mojohaus/license-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/license-maven-plugin/compare/2.0.1...2.4.0)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:license-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 22:37:57 +00:00
dependabot[bot]
d33dc8e1d4 Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.3.0 to 3.5.0
Bumps [org.apache.maven.plugins:maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.3.0 to 3.5.0.
- [Release notes](https://github.com/apache/maven-enforcer/releases)
- [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.3.0...enforcer-3.5.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-enforcer-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 22:37:49 +00:00
dependabot[bot]
d72b8c411a Bump org.mybatis:mybatis from 3.5.13 to 3.5.16
Bumps [org.mybatis:mybatis](https://github.com/mybatis/mybatis-3) from 3.5.13 to 3.5.16.
- [Release notes](https://github.com/mybatis/mybatis-3/releases)
- [Commits](https://github.com/mybatis/mybatis-3/compare/mybatis-3.5.13...mybatis-3.5.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 22:36:30 +00:00
dependabot[bot]
01c347673d Bump dependency.jackson.version from 2.15.2 to 2.17.2
Bumps `dependency.jackson.version` from 2.15.2 to 2.17.2.

Updates `com.fasterxml.jackson.core:jackson-core` from 2.15.2 to 2.17.2
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.15.2...jackson-core-2.17.2)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.15.2 to 2.17.2
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.datatype:jackson-datatype-joda` from 2.15.2 to 2.17.2
- [Commits](https://github.com/FasterXML/jackson-datatype-joda/compare/jackson-datatype-joda-2.15.2...jackson-datatype-joda-2.17.2)

Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` from 2.15.2 to 2.17.2
- [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.15.2...jackson-dataformats-text-2.17.2)

Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.15.2 to 2.17.2
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.module:jackson-module-jaxb-annotations` from 2.15.2 to 2.17.2
- [Commits](https://github.com/FasterXML/jackson-modules-base/compare/jackson-modules-base-2.15.2...jackson-modules-base-2.17.2)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-joda
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.core:jackson-annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.module:jackson-module-jaxb-annotations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-19 08:24:02 +00:00
dependabot[bot]
dcc6f23548 Bump commons-codec:commons-codec from 1.17.0 to 1.17.1
Bumps [commons-codec:commons-codec](https://github.com/apache/commons-codec) from 1.17.0 to 1.17.1.
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.17.0...rel/commons-codec-1.17.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 22:42:49 +00:00
dependabot[bot]
22c94284ec Bump com.github.docker-java:docker-java from 3.3.6 to 3.4.0
Bumps [com.github.docker-java:docker-java](https://github.com/docker-java/docker-java) from 3.3.6 to 3.4.0.
- [Release notes](https://github.com/docker-java/docker-java/releases)
- [Changelog](https://github.com/docker-java/docker-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/docker-java/docker-java/compare/3.3.6...3.4.0)

---
updated-dependencies:
- dependency-name: com.github.docker-java:docker-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-11 22:47:24 +00:00
dependabot[bot]
9f1956b632 Bump org.json:json from 20231013 to 20240303
Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20231013 to 20240303.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

---
updated-dependencies:
- dependency-name: org.json:json
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-10 14:51:51 +00:00
dependabot[bot]
740bce8c80 Bump com.drewnoakes:metadata-extractor from 2.18.0 to 2.19.0
Bumps [com.drewnoakes:metadata-extractor](https://github.com/drewnoakes/metadata-extractor) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/drewnoakes/metadata-extractor/releases)
- [Commits](https://github.com/drewnoakes/metadata-extractor/compare/2.18.0...2.19.0)

---
updated-dependencies:
- dependency-name: com.drewnoakes:metadata-extractor
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-10 13:44:00 +00:00
dependabot[bot]
801b526b4a Bump joda-time:joda-time from 2.12.5 to 2.12.7
Bumps [joda-time:joda-time](https://github.com/JodaOrg/joda-time) from 2.12.5 to 2.12.7.
- [Release notes](https://github.com/JodaOrg/joda-time/releases)
- [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt)
- [Commits](https://github.com/JodaOrg/joda-time/compare/v2.12.5...v2.12.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-10 13:43:15 +00:00
dependabot[bot]
fde025ad88 Bump jakarta.servlet:jakarta.servlet-api from 6.0.0 to 6.1.0
Bumps [jakarta.servlet:jakarta.servlet-api](https://github.com/eclipse-ee4j/servlet-api) from 6.0.0 to 6.1.0.
- [Commits](https://github.com/eclipse-ee4j/servlet-api/commits)

---
updated-dependencies:
- dependency-name: jakarta.servlet:jakarta.servlet-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-10 13:28:11 +00:00
dependabot[bot]
ba61253c94 Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 01:06:14 +00:00
dependabot[bot]
bf5032675f Bump com.fasterxml.woodstox:woodstox-core from 6.5.1 to 7.0.0
Bumps [com.fasterxml.woodstox:woodstox-core](https://github.com/FasterXML/woodstox) from 6.5.1 to 7.0.0.
- [Commits](https://github.com/FasterXML/woodstox/compare/woodstox-core-6.5.1...woodstox-core-7.0.0)

---
updated-dependencies:
- dependency-name: com.fasterxml.woodstox:woodstox-core
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 22:55:03 +00:00
dependabot[bot]
cce8ef50ef Bump jakarta.xml.soap:jakarta.xml.soap-api from 2.0.1 to 3.0.2
Bumps [jakarta.xml.soap:jakarta.xml.soap-api](https://github.com/jakartaee/saaj-api) from 2.0.1 to 3.0.2.
- [Release notes](https://github.com/jakartaee/saaj-api/releases)
- [Commits](https://github.com/jakartaee/saaj-api/compare/2.0.1...3.0.2)

---
updated-dependencies:
- dependency-name: jakarta.xml.soap:jakarta.xml.soap-api
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-16 22:52:29 +00:00
151 changed files with 19915 additions and 11418 deletions

View File

@@ -42,9 +42,16 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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
with:
fetch-depth: 0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- id: changed-files
uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v8.2.0
with:
write-list-to-env: true
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Prepare maven cache and check compilation"
@@ -62,12 +69,12 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v8.2.0
continue-on-error: true
with:
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
@@ -85,10 +92,10 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@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
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v8.2.0
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
repository: "Alfresco/veracode-baseline-archive"
@@ -118,7 +125,7 @@ jobs:
run: zip readable_output.zip results.json
- name: Upload Artifact
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Veracode Pipeline-Scan Results (Human Readable)
path: readable_output.zip
@@ -135,10 +142,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@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@v4.0.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- uses: Alfresco/ya-pmd-scan@v4.1.0
with:
classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\""
@@ -168,14 +175,14 @@ jobs:
testAttributes: "-Dtest=AllMmtUnitTestSuite"
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testModule }}
@@ -206,7 +213,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -248,9 +255,9 @@ jobs:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -259,10 +266,11 @@ jobs:
- name: "Set transformers tag"
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
- name: "Set up the environment"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }}
@@ -283,7 +291,7 @@ jobs:
env:
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
run: |
eval "args=($RP_OPTS)"
eval "args=($RP_OPTS)"
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 "${args[@]}"
continue-on-error: true
- name: "Update GitHub Step Summary"
@@ -293,7 +301,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -326,9 +334,9 @@ jobs:
version: ['10.2.18', '10.4', '10.5']
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: Run MariaDB ${{ matrix.version }} database
@@ -337,7 +345,7 @@ jobs:
MARIADB_VERSION: ${{ matrix.version }}
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.version }}
@@ -368,7 +376,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -397,9 +405,9 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run MariaDB 10.6 database"
@@ -408,7 +416,7 @@ jobs:
MARIADB_VERSION: 10.6
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -439,7 +447,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -468,9 +476,9 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run MySQL 8 database"
@@ -479,7 +487,7 @@ jobs:
MYSQL_VERSION: 8
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -500,7 +508,7 @@ jobs:
env:
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
run: |
eval "args=($RP_OPTS)"
eval "args=($RP_OPTS)"
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
continue-on-error: true
- name: "Update GitHub Step Summary"
@@ -510,7 +518,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -538,9 +546,9 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 13.12 database"
@@ -549,7 +557,7 @@ jobs:
POSTGRES_VERSION: 13.12
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -570,7 +578,7 @@ jobs:
env:
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
run: |
eval "args=($RP_OPTS)"
eval "args=($RP_OPTS)"
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
continue-on-error: true
- name: "Update GitHub Step Summary"
@@ -580,7 +588,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -608,9 +616,9 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 14.9 database"
@@ -619,7 +627,7 @@ jobs:
POSTGRES_VERSION: 14.9
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -640,7 +648,7 @@ jobs:
env:
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
run: |
eval "args=($RP_OPTS)"
eval "args=($RP_OPTS)"
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
continue-on-error: true
- name: "Update GitHub Step Summary"
@@ -650,7 +658,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -678,9 +686,9 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 15.4 database"
@@ -689,7 +697,7 @@ jobs:
POSTGRES_VERSION: 15.4
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -710,7 +718,7 @@ jobs:
env:
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
run: |
eval "args=($RP_OPTS)"
eval "args=($RP_OPTS)"
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
continue-on-error: true
- name: "Update GitHub Step Summary"
@@ -720,7 +728,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -746,16 +754,16 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run ActiveMQ"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.13.1
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -786,7 +794,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.13.1
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -846,9 +854,9 @@ jobs:
mvn-options: '-Dencryption.ssl.keystore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.keystore -Dencryption.ssl.truststore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.truststore'
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Set transformers tag"
@@ -867,10 +875,11 @@ jobs:
echo "HOSTNAME_VERIFICATION_DISABLED=false" >> "$GITHUB_ENV"
fi
- name: "Set up the environment"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }} ${{ matrix.idp }}
@@ -901,7 +910,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -959,15 +968,16 @@ jobs:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Set up the environment"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
@@ -976,7 +986,7 @@ jobs:
run: mvn install -pl :alfresco-community-repo-integration-test -am -DskipTests -Pall-tas-tests
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.test-name }}
@@ -1014,7 +1024,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.tests.outcome }}
@@ -1040,16 +1050,16 @@ jobs:
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run Postgres 15.4 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -1080,7 +1090,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -1114,9 +1124,9 @@ jobs:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -1124,7 +1134,7 @@ jobs:
bash ./scripts/ci/build.sh
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (PostgreSQL) ${{ matrix.test-name }}
@@ -1160,9 +1170,9 @@ jobs:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -1170,7 +1180,7 @@ jobs:
bash ./scripts/ci/build.sh
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (MySQL) ${{ matrix.test-name }}
@@ -1202,9 +1212,9 @@ jobs:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -1218,7 +1228,7 @@ jobs:
mvn -B install -pl :alfresco-governance-services-automation-community-rest-api -am -Pags -Pall-tas-tests -DskipTests
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
id: rp-prepare
with:
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
@@ -1250,7 +1260,7 @@ jobs:
continue-on-error: true
- name: "Summarize Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v5.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -1265,7 +1275,7 @@ jobs:
exit 1
- name: "Configure AWS credentials"
if: ${{ always() }}
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AGS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AGS_AWS_SECRET_ACCESS_KEY }}
@@ -1292,9 +1302,9 @@ jobs:
!contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v4
- 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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |

View File

@@ -34,12 +34,12 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.2.0
with:
username: ${{ env.GIT_USERNAME }}
email: ${{ env.GIT_EMAIL }}
@@ -63,12 +63,12 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@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/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.35.2
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.2.0
with:
username: ${{ env.GIT_USERNAME }}
email: ${{ env.GIT_EMAIL }}

14
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,14 @@
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

1892
.secrets.baseline Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,52 @@ 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

@@ -2,38 +2,57 @@
[![Build Status](https://github.com/Alfresco/alfresco-community-repo/actions/workflows/master_release.yml/badge.svg?branch=master)](https://github.com/Alfresco/alfresco-community-repo/actions/workflows/master_release.yml)
#### Alfresco Core
## Table of Contents
1. [Content](#content)
2. [Artifacts](#artifacts)
3. [Setup](#setting-up-and-building-your-development-environment)
4. [Branches](#branches)
5. [Contributing](#contributing-guide)
6. [Helpful links](#helpful-links)
## Content
Alfresco Community Repository contains following libraries:
### Alfresco Core
Core is a library packaged as a jar file which contains the following:
Alfresco Core is a library packaged as a jar file which contains the following:
* Various helpers and utils
* Canned queries interface and supporting classes
* Generic encryption supporting classes
#### Alfresco Data Model
Data model is a library packaged as a jar file which contains the following:
### Alfresco Data Model
Data Model is a library packaged as a jar file which contains the following:
* Dictionary, Repository and Search Services interfaces
* Models for data types and Dictionary implementation
* Parsers
#### Alfresco Repository
### Alfresco Repository
Repository is a library packaged as a jar file which contains the following:
* DAOs and SQL scripts
* Various Service implementations
* Utility classes
#### Alfresco Remote API
### Alfresco Remote API
Remote API is a library packaged as a jar file which contains the following:
* REST API framework
* WebScript implementations including [V1 REST APIs](https://hub.alfresco.com/t5/alfresco-content-services-blog/v1-rest-api-10-things-you-should-know/ba-p/287692)
* [OpenCMIS](https://chemistry.apache.org/java/opencmis.html) implementations
#### Artifacts
## Artifacts
The artifacts can be obtained by:
* downloading from [Alfresco maven repository](https://artifacts.alfresco.com/nexus/content/groups/public)
* downloading from [Alfresco maven repository](https://artifacts.alfresco.com/nexus/#browse/browse:public)
* as Maven dependency by adding the dependency to your pom file:
~~~
~~~xml
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-core</artifactId>
@@ -64,34 +83,46 @@ The artifacts can be obtained by:
<version>version</version>
<type>war</type>
</dependency>
~~~
and Alfresco maven repository:
~~~
~~~xml
<repository>
<id>alfresco-maven-repo</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
~~~
The SNAPSHOT versions of the artifact are not published.
## Setting up and building your development environment
See the [Development Tomcat Environment](https://github.com/Alfresco/acs-community-packaging/tree/master/dev/README.md)
page which will show you how to try out your repository changes in a local tomcat instance.
If you wish to use Docker images, take a look at the aliases ending in `D` and the docker-compose files in this
project's test modules.
See the [**Development Tomcat Environment**](https://github.com/Alfresco/acs-community-packaging/tree/master/dev/README.md)
page which will show you how to try out your repository changes in a local Tomcat instance or using Docker containers.
## Branches
This project has a branch for each ACS release. For example the code in ACS 6.2.1 is a
branch called `releases/6.2.2`. In addition to the original 6.2.2 release it will also contain Hot Fixes
added later. The latest unreleased code is on the `master` branch. There are also `.N` branches, such as
`releases/7.1.N` on which we gather unreleased fixes for future service pack releases. They do not indicate
This project has a branch for each ACS release. For example the code in ACS 6.2.2 is a
branch called **`release/6.2.2`**. In addition to the original 6.2.2 release it will also contain Hot Fixes
added later. The latest unreleased code is on the **`master`** branch. There are also **`.N`** branches, such as
**`release/7.1.N`** on which we gather unreleased fixes for future service pack releases. They do not indicate
that one is planned.
For historic reasons the version of artifacts created on each branch do not match the ACS version.
For example artifact in ACS 7.2.0 will be `14.<something>`.
For example artifact in ACS 7.2.0 will be **`14.<something>`**.
The enterprise projects which extend the `alfresco-community-repo` use the same branch names and leading
The enterprise projects which extend the **`alfresco-community-repo`** use the same branch names and leading
artifact version number.
### Contributing guide
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
## Contributing guide
Please use [**this guide**](CONTRIBUTING.md) to make a contribution to the project.
## Helpful links
- [Alfresco Content Services Documentation](https://docs.alfresco.com/content-services/latest/)
- [Alfresco Platform](https://www.hyland.com/en/products/alfresco-platform)

401
alfresco-formatter.xml Normal file
View File

@@ -0,0 +1,401 @@
<?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

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

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>23.3.0.87-SNAPSHOT</version>
<version>25.1.0.16</version>
</parent>
<build>
@@ -98,7 +98,7 @@
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>3.3.6</version>
<version>3.4.0</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>

View File

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

View File

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

View File

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

View File

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

View File

@@ -33,14 +33,15 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.alfresco.module.org_alfresco_module_rm.query.RecordsManagementQueryDAO;
import org.alfresco.repo.domain.propval.PropertyStringValueEntity;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.alfresco.module.org_alfresco_module_rm.query.RecordsManagementQueryDAO;
import org.alfresco.repo.domain.propval.PropertyStringValueEntity;
/**
* RM V3.3 Hold audit entries values patch unit test
*
@@ -55,7 +56,6 @@ public class RMv33HoldAuditEntryValuesPatchUnitTest
@InjectMocks
private RMv33HoldAuditEntryValuesPatch patch;
@Before
public void setUp()
{
@@ -93,15 +93,15 @@ public class RMv33HoldAuditEntryValuesPatchUnitTest
verify(mockedRecordsManagementQueryDAO, times(1)).updatePropertyStringValueEntity(deleteHoldPropertyStringValueEntity);
assertEquals("Add To Hold", addToHoldPropertyStringValueEntity.getStringValue());
assertEquals("add to hold", addToHoldPropertyStringValueEntity.getStringLower());
assertEquals("add to hold", addToHoldPropertyStringValueEntity.getStringEndLower());
assertEquals(Long.valueOf(770_786_109L), addToHoldPropertyStringValueEntity.getStringCrc());
assertEquals("Remove From Hold", removeFromHoldPropertyStringValueEntity.getStringValue());
assertEquals("remove from hold", removeFromHoldPropertyStringValueEntity.getStringLower());
assertEquals("remove from hold", removeFromHoldPropertyStringValueEntity.getStringEndLower());
assertEquals(Long.valueOf(2_967_613_012L), removeFromHoldPropertyStringValueEntity.getStringCrc());
assertEquals("Delete Hold", deleteHoldPropertyStringValueEntity.getStringValue());
assertEquals("delete hold", deleteHoldPropertyStringValueEntity.getStringLower());
assertEquals("delete hold", deleteHoldPropertyStringValueEntity.getStringEndLower());
assertEquals(Long.valueOf(132_640_810L), deleteHoldPropertyStringValueEntity.getStringCrc());
}
@@ -123,5 +123,3 @@ public class RMv33HoldAuditEntryValuesPatchUnitTest
verify(mockedRecordsManagementQueryDAO, times(0)).updatePropertyStringValueEntity(any());
}
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -27,4 +27,9 @@ public class HttpClientException extends AlfrescoRuntimeException
{
super(msgId);
}
public HttpClientException(String msgId, Throwable cause)
{
super(msgId, cause);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2023 Alfresco Software Limited.
* Copyright (C) 2005-2024 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -67,4 +67,14 @@ public interface TransactionListener
* be used only for cleaning up resources after a rollback has occurred.
*/
void afterRollback();
/**
* Allows to provide a custom listener's order.
* See {@link org.alfresco.repo.transaction.AlfrescoTransactionSupport#COMMIT_ORDER_NORMAL}
* @return custom order or null for the default one
*/
default Integer getCustomOrder()
{
return null;
}
}

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.3.0.87-SNAPSHOT</version>
<version>25.1.0.16</version>
</parent>
<properties>
@@ -118,6 +118,18 @@
<groupId>org.jibx</groupId>
<artifactId>jibx-run</artifactId>
<version>1.4.2</version>
<exclusions>
<!-- [ACS-5371] Excluded to avoid conflict in JDK9+ as it includes javax.xml-->
<exclusion>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sf.kxml</groupId>
<artifactId>kxml2</artifactId>
<version>${dependency.kxml2.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
@@ -132,7 +144,7 @@
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>6.5.1</version>
<version>7.0.0</version>
</dependency>
<!-- the cxf libs were updated, see dependencyManagement section -->

View File

@@ -238,6 +238,17 @@ public interface CustomModelService
*/
public NodeRef createDownloadNode(String modelName, boolean withAssociatedForm);
/**
* Creates a downloadable archive file containing the custom model file and
* if specified, its associated Share extension module file.
*
* @param modelName the model name to be exported
* @param withAssociatedForm whether Share extension module file should be
* included or not
* @return reference to the node which will contain the archive file
*/
NodeRef createDownloadNode(String modelName, boolean withAssociatedForm, String downloadNodeName);
/**
* Compiles the {@link M2Model}.
*

View File

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

View File

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

View File

@@ -146,6 +146,7 @@ libgif http://giflib.sourceforge.net/
libfreetype http://www.freetype.org/
PostgreSQL http://www.postgresql.org/
PostgreSQL JDBC Driver http://www.postgresql.org/
kXML 2 http://kxml.sourceforge.net/
=== CDDL 1.0 ===

View File

@@ -1,6 +1,5 @@
# Fetch image based on Tomcat 9.0, Java 17 and Rocky Linux 8
# More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat
FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux8-202306291245
FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux9@sha256:395664f9d9be0c9f73d3b722a58fd559ee7231609b263dfe19502617652740e3
# Set default docker_context.
ARG resource_path=target
@@ -14,6 +13,9 @@ ARG USERID=33000
# Set default environment args
ARG TOMCAT_DIR=/usr/local/tomcat
# Needed for installation but make sure another USER directive is added after
# this with a non-root user
USER root
# Create prerequisite to store tools and properties
RUN mkdir -p ${TOMCAT_DIR}/shared/classes/alfresco/extension/mimetypes && \
@@ -61,13 +63,7 @@ RUN sed -i -e "s_appender.rolling.fileName\=alfresco.log_appender.rolling.fileNa
sed -i -e "\$a\grant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/alfresco\/-\" \{\n\ permission\ java.security.AllPermission\;\n\};\ngrant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/_vti_bin\/-\" \{\n\ permission\ java.security.AllPermission\;\n\};\ngrant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/ROOT\/-\" \{\n\ permission org.apache.catalina.security.DeployXmlPermission \"ROOT\";\n\};" ${TOMCAT_DIR}/conf/catalina.policy
# fontconfig is required by Activiti worflow diagram generator
# installing pinned dependencies as well
RUN yum install -y fontconfig-2.13.1-4.el8 \
dejavu-fonts-common-2.35-7.el8 \
fontpackages-filesystem-1.44-22.el8 \
freetype-2.9.1-9.el8 \
libpng-1.6.34-5.el8 \
dejavu-sans-fonts-2.35-7.el8 && \
RUN yum install -y fontconfig-2.14.0-2.el9_1 && \
yum clean all
# The standard configuration is to have all Tomcat files owned by root with group GROUPNAME and whilst owner has read/write privileges,

View File

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

View File

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

View File

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

View File

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

View File

@@ -55,4 +55,4 @@ else
echo "Last 200 lines from alfresco.log on container $ALFCONTAINER:"
docker logs --tail=200 $ALFCONTAINER
exit 1
fi
fi

View File

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

View File

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

View File

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

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.3.0.87-SNAPSHOT</version>
<version>25.1.0.16</version>
</parent>
<properties>
@@ -17,7 +17,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<rest.api.explorer.branch>master</rest.api.explorer.branch>
<httpclient-osgi-version>4.5.6</httpclient-osgi-version>
<commons-lang3.version>3.14.0</commons-lang3.version>
<commons-lang3.version>3.17.0</commons-lang3.version>
<scribejava-apis.version>8.3.3</scribejava-apis.version>
<java.version>17</java.version>
</properties>
@@ -171,7 +171,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>3.0.22</version>
<version>3.0.23</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->

View File

@@ -36,22 +36,22 @@ public class RestPersonFavoritesModel extends TestModel implements IRestModel<Re
{
@JsonProperty(value = "entry")
RestPersonFavoritesModel model;
@Override
public RestPersonFavoritesModel onModel()
{
return model;
public RestPersonFavoritesModel onModel()
{
return model;
}
private String targetGuid;
private String createdAt;
private List<String> aspectNames;
private List<String> allowableOperations;
private RestTargetModel target;
public RestPersonFavoritesModel()
{
}
{}
public RestPersonFavoritesModel(String targetGuid, String createdAt)
{
@@ -69,7 +69,7 @@ public class RestPersonFavoritesModel extends TestModel implements IRestModel<Re
{
this.targetGuid = targetGuid;
}
public RestTargetModel getTarget()
{
return target;
@@ -90,11 +90,23 @@ public class RestPersonFavoritesModel extends TestModel implements IRestModel<Re
this.createdAt = createdAt;
}
public List<String> getAllowableOperations() {
public List<String> getAspectNames()
{
return aspectNames;
}
public void setAspectNames(List<String> aspectNames)
{
this.aspectNames = aspectNames;
}
public List<String> getAllowableOperations()
{
return allowableOperations;
}
public void setAllowableOperations(List<String> allowableOperations) {
public void setAllowableOperations(List<String> allowableOperations)
{
this.allowableOperations = allowableOperations;
}
}

View File

@@ -0,0 +1,141 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import java.util.Date;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
public class RestSizeDetailsModel extends TestModel implements IRestModel<RestSizeDetailsModel>
{
@JsonProperty(value = "entry")
RestSizeDetailsModel model;
private String id;
private Long sizeInBytes;
private Date calculatedAt;
private Integer numberOfFiles;
private String jobId;
private STATUS status;
public enum STATUS
{
NOT_INITIATED, PENDING, IN_PROGRESS, COMPLETED, FAILED
}
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public Long getSizeInBytes()
{
return sizeInBytes;
}
public void setSizeInBytes(Long sizeInBytes)
{
this.sizeInBytes = sizeInBytes;
}
public Date getCalculatedAt()
{
return calculatedAt;
}
public void setCalculatedAt(Date calculatedAt)
{
this.calculatedAt = calculatedAt;
}
public Integer getNumberOfFiles()
{
return numberOfFiles;
}
public void setNumberOfFiles(Integer numberOfFiles)
{
this.numberOfFiles = numberOfFiles;
}
public String getJobId()
{
return jobId;
}
public void setJobId(String jobId)
{
this.jobId = jobId;
}
public STATUS getStatus()
{
return status;
}
public void setStatus(STATUS status)
{
this.status = status;
}
@Override
public RestSizeDetailsModel onModel()
{
return model;
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
RestSizeDetailsModel that = (RestSizeDetailsModel) o;
return Objects.equals(id, that.id) && Objects.equals(sizeInBytes, that.sizeInBytes) && Objects.equals(
calculatedAt, that.calculatedAt) && Objects.equals(numberOfFiles, that.numberOfFiles)
&& Objects.equals(jobId, that.jobId) && status == that.status;
}
@Override
public int hashCode()
{
return Objects.hash(id, sizeInBytes, calculatedAt, numberOfFiles, jobId, status);
}
}

View File

@@ -0,0 +1,97 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.model.RestCategoryModel;
import org.alfresco.rest.repo.resource.cache.MultiKeyResourceMap;
import org.alfresco.rest.repo.resource.category.RepoCategoryCreator;
import org.alfresco.rest.repo.resource.category.RepoCategoryModifier;
import org.alfresco.rest.repo.resource.general.Modifier;
import org.alfresco.rest.repo.resource.general.Specifier;
import org.alfresco.utility.data.DataUser;
import org.alfresco.utility.model.UserModel;
/**
* Helper class simplifying things related with repository categories management.
*/
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class Categories implements ResourceManager<RestCategoryModel, Specifier.CategoriesSpecifier, Modifier.CategoryModifier>
{
public static final String CATEGORY_NAME_PREFIX = "category";
private static final String ROOT_CATEGORY_ID = "-root-";
public static final RestCategoryModel ROOT_CATEGORY = RestCategoryModel.builder().id(ROOT_CATEGORY_ID).create();
private final RestWrapper restClient;
private final UserModel user;
private final Map<String, RestCategoryModel> categoriesCache = new MultiKeyResourceMap<>(RestCategoryModel::getId, RestCategoryModel::getName);
public Categories(RestWrapper restClient, UserModel user)
{
this.restClient = restClient;
this.user = user;
}
@Autowired
public Categories(RestWrapper restClient, DataUser dataUser)
{
this(restClient, dataUser.getAdminUser());
}
@Override
public Specifier.CategoriesSpecifier add()
{
return (Specifier.CategoriesSpecifier) new RepoCategoryCreator(restClient, categoriesCache)
.underCategory(ROOT_CATEGORY).asUser(user);
}
@Override
public RestCategoryModel get(String key)
{
return categoriesCache.get(key);
}
@Override
public Modifier.CategoryModifier modify(RestCategoryModel category)
{
return new RepoCategoryModifier(restClient, category, categoriesCache).asUser(user);
}
@Override
public void delete(RestCategoryModel category)
{
new RepoCategoryModifier(restClient, category, categoriesCache).asUser(user).delete();
}
}

View File

@@ -0,0 +1,105 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.repo.resource.cache.MultiKeyResourceMap;
import org.alfresco.rest.repo.resource.content.PlainFileCreator;
import org.alfresco.rest.repo.resource.content.PlainFileModifier;
import org.alfresco.rest.repo.resource.general.Modifier;
import org.alfresco.rest.repo.resource.general.Specifier;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.data.DataSite;
import org.alfresco.utility.data.DataUser;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.UserModel;
/**
* Helper class simplifying things related with repository files management.
*/
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class Files implements ResourceManager<FileModel, Specifier.FileSpecifier, Modifier.FileModifier>
{
public static final String FILE_NAME_PREFIX = "file";
private final DataContent dataContent;
private final RestWrapper restClient;
private final SiteModel site;
private final UserModel user;
private final Map<String, FileModel> filesCache = new MultiKeyResourceMap<>(FileModel::getNodeRef, FileModel::getName);
public Files(DataContent dataContent, RestWrapper restClient, UserModel user, SiteModel site)
{
this.dataContent = dataContent;
this.restClient = restClient;
this.user = user;
this.site = site;
}
public Files(DataContent dataContent, RestWrapper restClient, DataUser dataUser)
{
this(dataContent, restClient, dataUser.getAdminUser(), null);
}
@Autowired
public Files(DataContent dataContent, RestWrapper restClient, DataUser dataUser, DataSite dataSite)
{
this(dataContent, restClient, dataUser.getAdminUser(), dataSite.usingUser(dataUser.getAdminUser()).createPrivateRandomSite());
}
@Override
public Specifier.FileSpecifier add()
{
return (Specifier.FileSpecifier) new PlainFileCreator(dataContent, filesCache).withinSite(site).asUser(user);
}
@Override
public FileModel get(String id)
{
return filesCache.get(id);
}
@Override
public Modifier.FileModifier modify(FileModel file)
{
return new PlainFileModifier(dataContent, restClient, file, filesCache).withinSite(site).asUser(user);
}
@Override
public void delete(FileModel file)
{
new PlainFileModifier(dataContent, restClient, file, filesCache).withinSite(site).asUser(user).delete();
}
}

View File

@@ -0,0 +1,113 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.repo.resource.cache.MultiKeyResourceMap;
import org.alfresco.rest.repo.resource.content.RepoFolderCreator;
import org.alfresco.rest.repo.resource.content.RepoFolderModifier;
import org.alfresco.rest.repo.resource.general.Modifier;
import org.alfresco.rest.repo.resource.general.Specifier;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.data.DataSite;
import org.alfresco.utility.data.DataUser;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.UserModel;
/**
* Helper class simplifying things related with repository folders management.
*/
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class Folders implements ResourceManager<FolderModel, Specifier.FolderSpecifier, Modifier.FolderModifier>
{
public static final String FOLDER_NAME_PREFIX = "folder";
private final DataContent dataContent;
private final RestWrapper restClient;
private final SiteModel site;
private final UserModel user;
private final Files files;
private final Map<String, FolderModel> foldersCache = new MultiKeyResourceMap<>(FolderModel::getNodeRef, FolderModel::getName);
public Folders(DataContent dataContent, RestWrapper restClient, UserModel user, SiteModel site, Files files)
{
this.dataContent = dataContent;
this.restClient = restClient;
this.site = site;
this.user = user;
this.files = files;
}
public Folders(DataContent dataContent, RestWrapper restClient, UserModel user, SiteModel site)
{
this(dataContent, restClient, user, site, new Files(dataContent, restClient, user, site));
}
public Folders(DataContent dataContent, RestWrapper restClient, DataUser dataUser)
{
this(dataContent, restClient, dataUser.getAdminUser(), null);
}
@Autowired
public Folders(DataContent dataContent, RestWrapper restClient, DataUser dataUser, DataSite dataSite)
{
this(dataContent, restClient, dataUser.getAdminUser(), dataSite.usingUser(dataUser.getAdminUser()).createPrivateRandomSite());
}
@Override
public Specifier.FolderSpecifier add()
{
return (Specifier.FolderSpecifier) new RepoFolderCreator(dataContent, foldersCache).withinSite(site).asUser(user);
}
@Override
public FolderModel get(String key)
{
return foldersCache.get(key);
}
@Override
public Modifier.FolderModifier modify(FolderModel folder)
{
return new RepoFolderModifier(dataContent, restClient, folder, files, foldersCache).withinSite(site).asUser(user);
}
@Override
public void delete(FolderModel folder)
{
new RepoFolderModifier(dataContent, restClient, folder, files, foldersCache).withinSite(site).asUser(user).delete();
}
}

View File

@@ -0,0 +1,61 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource;
import org.alfresco.rest.repo.resource.general.Modifier;
import org.alfresco.rest.repo.resource.general.ResourceIntroducer;
import org.alfresco.rest.repo.resource.general.Specifier;
import org.alfresco.utility.model.TestModel;
/**
* Declares operations introducing new, or allowing to manage repository resources like: folders, files, categories, associations, etc.
*
* @param <RESOURCE>>
* repository resource, e.g. folder, file, category, etc.
* @param <SPECIFIER>
* repository resource specifier, see {@link Specifier}
* @param <MODIFIER>>
* repository resource modifier, see {@link Modifier}
*/
public interface ResourceManager<RESOURCE extends TestModel, SPECIFIER extends Specifier, MODIFIER extends Modifier<RESOURCE, ?>>
extends ResourceIntroducer<SPECIFIER>
{
RESOURCE get(String id);
MODIFIER modify(RESOURCE resource);
default MODIFIER modify(String id)
{
return modify(get(id));
}
void delete(RESOURCE resource);
default void delete(String id)
{
delete(get(id));
}
}

View File

@@ -0,0 +1,129 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.cache;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.alfresco.utility.model.TestModel;
/**
* Allows to store data in map and find it using three keys - id, name and alias.
*
* @param <RESOURCE>
* repository resource, e.g. folder, category, etc.
*/
public class MultiKeyResourceMap<RESOURCE extends TestModel> extends HashMap<String, RESOURCE>
{
private static final String UUID_PATTERN = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$";
private final Map<String, String> keys = new HashMap<>();
private final Function<RESOURCE, String> idSupplier;
private final Function<RESOURCE, String> nameSupplier;
public MultiKeyResourceMap(Function<RESOURCE, String> idSupplier, Function<RESOURCE, String> nameSupplier)
{
super();
this.idSupplier = idSupplier;
this.nameSupplier = nameSupplier;
}
@Override
public RESOURCE put(String alias, RESOURCE resource)
{
String id = idSupplier.apply(resource);
String name = nameSupplier.apply(resource);
if (StringUtils.isEmpty(id))
{
throw new IllegalArgumentException("ID of entity with name: " + name + " and alias: " + alias + " cannot be empty!");
}
if (StringUtils.isEmpty(name))
{
throw new IllegalArgumentException("Name of entity with ID: " + id + " and alias: " + alias + " cannot be empty!");
}
if (StringUtils.isNotEmpty(alias))
{
if (keys.containsKey(alias))
{
throw new IllegalStateException("Entity with alias: " + alias + " already exists in cache!");
}
keys.put(alias, id);
}
if (StringUtils.isNotEmpty(name))
{
keys.put(name, id);
}
return super.put(id, resource);
}
@Override
public RESOURCE get(Object key)
{
return super.get(findKey(key));
}
@Override
public RESOURCE remove(Object key)
{
RESOURCE resource = this.get(key);
if (resource == null)
{
return null;
}
String id = idSupplier.apply(resource);
findKeysFor(id).forEach(keys::remove);
return super.remove(id);
}
private Object findKey(Object key)
{
Object realKey = key;
if (key instanceof String k && (!Pattern.compile(UUID_PATTERN).matcher(k).matches() || !super.containsKey(k)))
{
realKey = keys.getOrDefault(k, k);
}
return realKey;
}
public Set<String> findKeysFor(Object id)
{
return keys.entrySet()
.stream()
.filter(entry -> id.equals(entry.getValue()))
.map(Entry::getKey)
.collect(Collectors.toSet());
}
}

View File

@@ -0,0 +1,64 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.category;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.model.RestCategoryModel;
public class NestedCategoriesCreator extends SerialCategoriesCreator
{
public NestedCategoriesCreator(RestWrapper restClient, Map<String, RestCategoryModel> categories)
{
super(restClient, categories);
}
@Override
public List<RestCategoryModel> create()
{
return createNestedCategories(parent, names, 0);
}
private List<RestCategoryModel> createNestedCategories(RestCategoryModel parent, List<String> categoryNames, int index)
{
List<RestCategoryModel> createdCategories = new ArrayList<>();
categoryNames.stream().findFirst().ifPresent(categoryName -> {
RestCategoryModel createdCategory = createCategory(categoryName, getOrNull(aliases, index), parent);
createdCategories.add(createdCategory);
List<String> remainingNames = categoryNames.stream().skip(1).toList();
if (!remainingNames.isEmpty())
{
createdCategories.addAll(createNestedCategories(createdCategory, remainingNames, index + 1));
}
});
return createdCategories;
}
}

View File

@@ -0,0 +1,154 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.category;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.alfresco.rest.repo.resource.Categories.CATEGORY_NAME_PREFIX;
import static org.alfresco.rest.repo.resource.Categories.ROOT_CATEGORY;
import java.util.Map;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.model.RestCategoryModel;
import org.alfresco.rest.repo.resource.general.Creator;
import org.alfresco.rest.repo.resource.general.MultiCreator;
import org.alfresco.rest.repo.resource.general.ResourceCreator;
import org.alfresco.rest.repo.resource.general.Specifier;
public class RepoCategoryCreator
extends ResourceCreator<RestCategoryModel, Creator.CategoryCreator>
implements Creator.CategoryCreator, Specifier.CategoriesSpecifier
{
private final RestWrapper restClient;
private RestCategoryModel parent = ROOT_CATEGORY;
private final Map<String, RestCategoryModel> categoriesCache;
public RepoCategoryCreator(RestWrapper restClient, Map<String, RestCategoryModel> categoriesCache)
{
super();
this.restClient = restClient;
this.categoriesCache = categoriesCache;
}
@Override
protected CategoryCreator self()
{
return this;
}
@Override
public CategoryCreator category(String name)
{
return this.withName(name);
}
@Override
public CategoryCreator randomCategory()
{
return this.withRandomName();
}
@Override
public CategoryCreator randomCategory(String prefix)
{
return this.withRandomName(prefix);
}
@Override
public MultiCreator.CategoriesCreator categories(String... names)
{
return new SerialCategoriesCreator(restClient, categoriesCache).withNames(names).underCategory(parent).asUser(user);
}
@Override
public MultiCreator.CategoriesCreator randomCategories(String... prefixes)
{
return new SerialCategoriesCreator(restClient, categoriesCache).withRandomNames(prefixes).underCategory(parent).asUser(user);
}
@Override
public MultiCreator.CategoriesCreator randomCategories(int quantity)
{
return new SerialCategoriesCreator(restClient, categoriesCache).withRandomNames(quantity).underCategory(parent).asUser(user);
}
@Override
public MultiCreator.CategoriesCreator nestedCategories(String... names)
{
return new NestedCategoriesCreator(restClient, categoriesCache).withNames(names).underCategory(parent).asUser(user);
}
@Override
public MultiCreator.CategoriesCreator nestedRandomCategories(String... prefixes)
{
return new NestedCategoriesCreator(restClient, categoriesCache).withRandomNames(prefixes).underCategory(parent).asUser(user);
}
@Override
public MultiCreator.CategoriesCreator nestedRandomCategories(int depth)
{
return new NestedCategoriesCreator(restClient, categoriesCache).withRandomNames(depth).underCategory(parent).asUser(user);
}
@Override
public CategoryCreator withRandomName(String prefix)
{
withAlias(prefix);
return super.withRandomName(prefix);
}
@Override
public CategoryCreator underCategory(RestCategoryModel parent)
{
this.parent = parent;
return this;
}
@Override
public RestCategoryModel create()
{
RestCategoryModel category = restClient.authenticateUser(user).withCoreAPI().usingCategory(parent)
.createSingleCategory(RestCategoryModel.builder().name(name).create());
categoriesCache.put(alias, category);
return category;
}
@Override
protected String generateRandomName()
{
return this.generateRandomNameWith(EMPTY);
}
@Override
protected String generateRandomNameWith(String prefix)
{
return super.generateRandomNameWith(CATEGORY_NAME_PREFIX + prefix + "_");
}
}

View File

@@ -0,0 +1,85 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.category;
import java.util.Map;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.model.RestCategoryModel;
import org.alfresco.rest.repo.resource.general.Modifier;
import org.alfresco.rest.repo.resource.general.ResourceModifier;
import org.alfresco.rest.repo.resource.general.Specifier;
import org.alfresco.utility.model.UserModel;
public class RepoCategoryModifier
extends ResourceModifier<RestCategoryModel, Modifier.CategoryModifier>
implements Modifier.CategoryModifier
{
private final RestWrapper restClient;
private final RestCategoryModel category;
private final Map<String, RestCategoryModel> categoriesCache;
public RepoCategoryModifier(RestWrapper restClient, RestCategoryModel category, Map<String, RestCategoryModel> categoriesCache)
{
super();
this.restClient = restClient;
this.category = category;
this.categoriesCache = categoriesCache;
}
@Override
protected CategoryModifier self()
{
return this;
}
@Override
public Specifier.CategoriesSpecifier add()
{
return (Specifier.CategoriesSpecifier) new RepoCategoryCreator(restClient, categoriesCache)
.underCategory(category).asUser(user);
}
@Override
public RestCategoryModel get(String id)
{
return buildCategoryRestRequest(restClient, user, RestCategoryModel.builder().id(id).create())
.getCategory();
}
@Override
public void delete()
{
categoriesCache.remove(category.getId());
buildCategoryRestRequest(restClient, user, category).deleteCategory();
}
private static org.alfresco.rest.requests.Categories buildCategoryRestRequest(RestWrapper restClient, UserModel user, RestCategoryModel category)
{
return restClient.authenticateUser(user).withCoreAPI().usingCategory(category);
}
}

View File

@@ -0,0 +1,111 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.category;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.alfresco.rest.repo.resource.Categories.CATEGORY_NAME_PREFIX;
import static org.alfresco.rest.repo.resource.Categories.ROOT_CATEGORY;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.model.RestCategoryModel;
import org.alfresco.rest.repo.resource.general.MultiCreator;
import org.alfresco.rest.repo.resource.general.MultipleResourcesCreator;
public class SerialCategoriesCreator
extends MultipleResourcesCreator<RestCategoryModel, MultiCreator.CategoriesCreator>
implements MultiCreator.CategoriesCreator
{
private final RestWrapper restClient;
protected RestCategoryModel parent = ROOT_CATEGORY;
private final Map<String, RestCategoryModel> categoriesCache;
public SerialCategoriesCreator(RestWrapper restClient, Map<String, RestCategoryModel> categoriesCache)
{
super();
this.restClient = restClient;
this.categoriesCache = categoriesCache;
}
@Override
protected CategoriesCreator self()
{
return this;
}
@Override
public CategoriesCreator underCategory(RestCategoryModel parent)
{
this.parent = parent;
return this;
}
@Override
public List<RestCategoryModel> create()
{
return createRawCategories(parent, names);
}
@Override
protected String generateRandomName()
{
return this.generateRandomNameWith(EMPTY);
}
@Override
protected String generateRandomNameWith(String prefix)
{
return super.generateRandomNameWith(CATEGORY_NAME_PREFIX + prefix + "_");
}
private List<RestCategoryModel> createRawCategories(RestCategoryModel parent, List<String> categoryNames)
{
List<RestCategoryModel> createdCategories = new ArrayList<>();
AtomicInteger i = new AtomicInteger();
categoryNames.forEach(categoryName -> {
RestCategoryModel createdCategory = createCategory(categoryName, getOrNull(aliases, i.getAndIncrement()), parent);
createdCategories.add(createdCategory);
});
return createdCategories;
}
protected RestCategoryModel createCategory(String name, String alias, RestCategoryModel parent)
{
return new RepoCategoryCreator(restClient, this.categoriesCache)
.withAlias(alias)
.withName(name)
.underCategory(parent)
.asUser(user)
.create();
}
}

View File

@@ -0,0 +1,111 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.content;
import java.util.Map;
import java.util.stream.Stream;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.model.RestTagModel;
import org.alfresco.rest.repo.resource.Files;
import org.alfresco.rest.repo.resource.general.MultiCreator;
import org.alfresco.rest.repo.resource.general.Specifier;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.ContentModel;
import org.alfresco.utility.model.FolderModel;
public class MultiContentCreator extends RepoFolderCreator implements Specifier.MultiContentSpecifier
{
private final RestWrapper restClient;
private final Files files;
protected MultiContentCreator(DataContent dataContent, RestWrapper restClient, Files files, Map<String, FolderModel> folders)
{
super(dataContent, folders);
this.files = files;
this.restClient = restClient;
}
@Override
public FileCreator file(String name)
{
return files.add().file(name).underFolder(parent).withinSite(site).asUser(user);
}
@Override
public FileCreator randomFile()
{
return files.add().randomFile().underFolder(parent).withinSite(site).asUser(user);
}
@Override
public FileCreator randomFile(String prefix)
{
return files.add().randomFile(prefix).underFolder(parent).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FilesCreator files(String... names)
{
return files.add().files(names).underFolder(parent).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FilesCreator randomFiles(String... prefixes)
{
return files.add().randomFiles(prefixes).underFolder(parent).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FilesCreator randomFiles(int quantity)
{
return files.add().randomFiles(quantity).underFolder(parent).withinSite(site).asUser(user);
}
@Override
public void secondaryContent(ContentModel content)
{
buildNodeRestRequest(restClient, parent).addSecondaryChild(content);
}
@Override
public void secondaryContent(ContentModel... contents)
{
buildNodeRestRequest(restClient, parent).addSecondaryChildren(contents);
}
@Override
public void tag(RestTagModel tag)
{
buildNodeRestRequest(restClient, parent).addTag(tag.getTag());
}
@Override
public void tags(RestTagModel... tags)
{
buildNodeRestRequest(restClient, parent).addTags(Stream.of(tags).map(RestTagModel::getTag).toArray(String[]::new));
}
}

View File

@@ -0,0 +1,65 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.content;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.FolderModel;
public class NestedFoldersCreator extends SerialFoldersCreator
{
public NestedFoldersCreator(DataContent dataContent, Map<String, FolderModel> folders)
{
super(dataContent, folders);
}
@Override
public List<FolderModel> create()
{
verifyDataConsistency();
return createNestedFoldersUnder(parent, names, 0);
}
private List<FolderModel> createNestedFoldersUnder(FolderModel parent, List<String> folderNames, int index)
{
List<FolderModel> createdFolders = new ArrayList<>();
folderNames.stream().findFirst().ifPresent(folderName -> {
FolderModel createdFolder = createFolder(folderName, getOrNull(titles, index), getOrNull(descriptions, index), parent, getOrNull(aliases, index));
createdFolders.add(createdFolder);
List<String> remainingNames = folderNames.stream().skip(1).toList();
if (!remainingNames.isEmpty())
{
createdFolders.addAll(createNestedFoldersUnder(createdFolder, remainingNames, index + 1));
}
});
return createdFolders;
}
}

View File

@@ -0,0 +1,142 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.content;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.alfresco.rest.repo.resource.Files.FILE_NAME_PREFIX;
import java.util.Map;
import org.alfresco.rest.repo.resource.general.ContentCreator;
import org.alfresco.rest.repo.resource.general.Creator;
import org.alfresco.rest.repo.resource.general.MultiCreator;
import org.alfresco.rest.repo.resource.general.Specifier;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FileType;
public class PlainFileCreator
extends ContentCreator<FileModel, Creator.FileCreator>
implements Creator.FileCreator, Specifier.FileSpecifier
{
private final DataContent dataContent;
private final Map<String, FileModel> filesCache;
public PlainFileCreator(DataContent dataContent, Map<String, FileModel> filesCache)
{
super(new FileModel());
this.dataContent = dataContent;
this.filesCache = filesCache;
this.contentModel.setFileType(FileType.TEXT_PLAIN);
}
@Override
protected FileCreator self()
{
return this;
}
@Override
public FileCreator withRandomName(String prefix)
{
withAlias(prefix);
return super.withRandomName(prefix);
}
@Override
public FileCreator file(String name)
{
return this.withName(name);
}
@Override
public FileCreator randomFile()
{
return this.withRandomName();
}
@Override
public FileCreator randomFile(String prefix)
{
return this.withRandomName(prefix);
}
@Override
public MultiCreator.FilesCreator files(String... names)
{
return new SerialFilesCreator(dataContent, filesCache).withNames(names).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FilesCreator randomFiles(String... prefixes)
{
return new SerialFilesCreator(dataContent, filesCache).withRandomNames(prefixes).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FilesCreator randomFiles(int quantity)
{
return new SerialFilesCreator(dataContent, filesCache).withRandomNames(quantity).withinSite(site).asUser(user);
}
@Override
public FileCreator ofType(FileType fileType)
{
contentModel.setFileType(fileType);
return this;
}
@Override
public FileCreator withContent(String fileContent)
{
contentModel.setContent(fileContent);
return this;
}
@Override
public FileModel create()
{
contentModel.setName(contentModel.getName() + "." + contentModel.getFileType().extension);
FileModel createdFile = create(dataContent, dataContent::createContent);
filesCache.put(alias, createdFile);
return createdFile;
}
@Override
protected String generateRandomName()
{
return this.generateRandomNameWith(EMPTY);
}
@Override
protected String generateRandomNameWith(String prefix, String suffix)
{
return super.generateRandomNameWith(FILE_NAME_PREFIX + prefix + "_", suffix);
}
}

View File

@@ -0,0 +1,73 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.content;
import java.util.Map;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.repo.resource.general.ContentModifier;
import org.alfresco.rest.repo.resource.general.Modifier;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
public class PlainFileModifier
extends ContentModifier<FileModel, Modifier.FileModifier>
implements Modifier.FileModifier
{
private final Map<String, FileModel> filesCache;
public PlainFileModifier(DataContent dataContent, RestWrapper restClient, FileModel file, Map<String, FileModel> filesCache)
{
super(dataContent, restClient, file);
this.filesCache = filesCache;
}
@Override
protected FileModifier self()
{
return this;
}
@Override
public FileModel get(String id)
{
return super.get(id, FileModel::new);
}
@Override
public FileModel copyTo(FolderModel target)
{
return super.copyTo(target, FileModel::new);
}
@Override
public void delete()
{
filesCache.remove(contentModel.getNodeRef());
super.delete();
}
}

View File

@@ -0,0 +1,143 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.content;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.alfresco.rest.repo.resource.Folders.FOLDER_NAME_PREFIX;
import java.util.Map;
import org.alfresco.rest.repo.resource.general.ContentCreator;
import org.alfresco.rest.repo.resource.general.Creator;
import org.alfresco.rest.repo.resource.general.MultiCreator;
import org.alfresco.rest.repo.resource.general.Specifier;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.FolderModel;
public class RepoFolderCreator
extends ContentCreator<FolderModel, Creator.FolderCreator>
implements Creator.FolderCreator, Specifier.FolderSpecifier
{
private final DataContent dataContent;
private final Map<String, FolderModel> foldersCache;
public RepoFolderCreator(DataContent dataContent, Map<String, FolderModel> foldersCache)
{
super(new FolderModel());
this.dataContent = dataContent;
this.foldersCache = foldersCache;
}
@Override
protected RepoFolderCreator self()
{
return this;
}
@Override
public FolderCreator folder(String name)
{
return this.withName(name);
}
@Override
public FolderCreator randomFolder()
{
return this.withRandomName();
}
@Override
public FolderCreator randomFolder(String prefix)
{
return this.withRandomName(prefix);
}
@Override
public MultiCreator.FoldersCreator folders(String... names)
{
return new SerialFoldersCreator(dataContent, foldersCache).withNames(names).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FoldersCreator randomFolders(String... prefixes)
{
return new SerialFoldersCreator(dataContent, foldersCache).withRandomNames(prefixes).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FoldersCreator randomFolders(int quantity)
{
return new SerialFoldersCreator(dataContent, foldersCache).withRandomNames(quantity).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FoldersCreator nestedFolders(String... names)
{
return new NestedFoldersCreator(dataContent, foldersCache).withNames(names).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FoldersCreator nestedRandomFolders(String... prefixes)
{
return new NestedFoldersCreator(dataContent, foldersCache).withRandomNames(prefixes).withinSite(site).asUser(user);
}
@Override
public MultiCreator.FoldersCreator nestedRandomFolders(int depth)
{
return new NestedFoldersCreator(dataContent, foldersCache).withRandomNames(depth).withinSite(site).asUser(user);
}
@Override
public FolderCreator withRandomName(String prefix)
{
withAlias(prefix);
return super.withRandomName(prefix);
}
@Override
public FolderModel create()
{
FolderModel createdFolder = create(dataContent, dataContent::createFolder);
foldersCache.put(alias, createdFolder);
return createdFolder;
}
@Override
protected String generateRandomName()
{
return this.generateRandomNameWith(EMPTY);
}
@Override
protected String generateRandomNameWith(String prefix)
{
return super.generateRandomNameWith(FOLDER_NAME_PREFIX + prefix + "_");
}
}

View File

@@ -0,0 +1,108 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.content;
import java.util.Map;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.model.RestTagModel;
import org.alfresco.rest.repo.resource.Files;
import org.alfresco.rest.repo.resource.general.ContentModifier;
import org.alfresco.rest.repo.resource.general.Modifier;
import org.alfresco.rest.repo.resource.general.Specifier;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.ContentModel;
import org.alfresco.utility.model.FolderModel;
public class RepoFolderModifier
extends ContentModifier<FolderModel, Modifier.FolderModifier>
implements Modifier.FolderModifier
{
private final RestWrapper restClient;
private final DataContent dataContent;
private final Files files;
private final Map<String, FolderModel> foldersCache;
public RepoFolderModifier(DataContent dataContent, RestWrapper restClient, FolderModel folder, Files files, Map<String, FolderModel> foldersCache)
{
super(dataContent, restClient, folder);
this.dataContent = dataContent;
this.restClient = restClient;
this.files = files;
this.foldersCache = foldersCache;
}
@Override
protected FolderModifier self()
{
return this;
}
@Override
public Specifier.MultiContentSpecifier add()
{
return (Specifier.MultiContentSpecifier) new MultiContentCreator(dataContent, restClient, files, foldersCache)
.underFolder(contentModel).withinSite(site).asUser(user);
}
@Override
public Specifier.AssociationSpecifier remove()
{
return new Specifier.AssociationSpecifier() {
@Override
public void secondaryContent(ContentModel content)
{
buildNodeRestRequest(restClient, contentModel).removeSecondaryChild(content);
}
@Override
public void tag(RestTagModel tag)
{
buildNodeRestRequest(restClient, contentModel).deleteTag(tag);
}
};
}
@Override
public FolderModel get(String id)
{
return super.get(id, FolderModel::new);
}
@Override
public FolderModel copyTo(FolderModel target)
{
return super.copyTo(target, FolderModel::new);
}
@Override
public void delete()
{
foldersCache.remove(contentModel.getName());
super.delete();
}
}

View File

@@ -0,0 +1,156 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.content;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.alfresco.rest.repo.resource.Files.FILE_NAME_PREFIX;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.alfresco.rest.repo.resource.general.MultiCreator;
import org.alfresco.rest.repo.resource.general.MultipleContentsCreator;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FileType;
import org.alfresco.utility.model.FolderModel;
public class SerialFilesCreator
extends MultipleContentsCreator<FileModel, MultiCreator.FilesCreator>
implements MultiCreator.FilesCreator
{
private final DataContent dataContent;
private List<FileType> fileTypes;
private List<String> filesContents;
private final Map<String, FileModel> filesCache;
public SerialFilesCreator(DataContent dataContent, Map<String, FileModel> filesCache)
{
super();
this.dataContent = dataContent;
this.filesCache = filesCache;
}
@Override
protected FilesCreator self()
{
return this;
}
@Override
public FilesCreator ofTypes(FileType... fileTypes)
{
this.fileTypes = List.of(fileTypes);
return this;
}
@Override
public FilesCreator withContents(List<String> filesContents)
{
this.filesContents = filesContents;
return this;
}
@Override
public FilesCreator withRandomContents(int wordsCount, int wordsMaxLength)
{
return withContents(
IntStream.of(0, names.size())
.mapToObj(i -> IntStream.range(0, wordsCount)
.mapToObj(j -> RandomStringUtils.randomAlphanumeric(1, wordsMaxLength))
.collect(Collectors.joining(" ")))
.collect(Collectors.toList()));
}
@Override
public List<FileModel> create()
{
verifyDataConsistency();
return createRawFilesUnder(parent, names);
}
@Override
protected void verifyDataConsistency()
{
super.verifyDataConsistency();
if (CollectionUtils.isEmpty(fileTypes) || fileTypes.size() < names.size())
{
throw new IllegalArgumentException("Provided file types size is different from created files amount");
}
if (CollectionUtils.isEmpty(filesContents) || filesContents.size() < names.size())
{
throw new IllegalArgumentException("Provided file contents size is different from created files amount");
}
}
@Override
protected String generateRandomName()
{
return this.generateRandomNameWith(EMPTY);
}
@Override
protected String generateRandomNameWith(String prefix)
{
return super.generateRandomNameWith(FILE_NAME_PREFIX + prefix + "_");
}
protected FileModel createFile(String fileName, FileType fileType, String title, String description, String fileContent, FolderModel parent, String alias)
{
return new PlainFileCreator(dataContent, filesCache)
.withAlias(alias)
.withName(fileName)
.ofType(fileType)
.withTitle(title)
.withDescription(description)
.withContent(fileContent)
.underFolder(parent)
.withinSite(site)
.asUser(user)
.create();
}
private List<FileModel> createRawFilesUnder(FolderModel parent, List<String> fileNames)
{
List<FileModel> createdFiles = new ArrayList<>();
AtomicInteger i = new AtomicInteger(0);
fileNames.forEach(fileName -> {
createdFiles.add(createFile(fileName, getOrNull(fileTypes, i.get()), getOrNull(titles, i.get()), getOrNull(descriptions, i.get()),
getOrNull(filesContents, i.get()), parent, getOrNull(aliases, i.get())));
i.getAndIncrement();
});
return createdFiles;
}
}

View File

@@ -0,0 +1,107 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.content;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import static org.alfresco.rest.repo.resource.Folders.FOLDER_NAME_PREFIX;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import org.alfresco.rest.repo.resource.general.MultiCreator;
import org.alfresco.rest.repo.resource.general.MultipleContentsCreator;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.FolderModel;
public class SerialFoldersCreator
extends MultipleContentsCreator<FolderModel, MultiCreator.FoldersCreator>
implements MultiCreator.FoldersCreator
{
private final DataContent dataContent;
private final Map<String, FolderModel> foldersCache;
public SerialFoldersCreator(DataContent dataContent, Map<String, FolderModel> foldersCache)
{
super();
this.dataContent = dataContent;
this.foldersCache = foldersCache;
}
@Override
protected SerialFoldersCreator self()
{
return this;
}
@Override
public List<FolderModel> create()
{
verifyDataConsistency();
return createRawFoldersUnder(parent, names);
}
@Override
protected String generateRandomName()
{
return this.generateRandomNameWith(EMPTY);
}
@Override
protected String generateRandomNameWith(String prefix)
{
return super.generateRandomNameWith(FOLDER_NAME_PREFIX + prefix + "_");
}
protected FolderModel createFolder(String folderName, String title, String description, FolderModel parent, String alias)
{
return new RepoFolderCreator(dataContent, foldersCache)
.withAlias(alias)
.withName(folderName)
.withTitle(title)
.withDescription(description)
.underFolder(parent)
.withinSite(site)
.asUser(user)
.create();
}
private List<FolderModel> createRawFoldersUnder(FolderModel parent, List<String> folderNames)
{
List<FolderModel> createdFolders = new ArrayList<>();
AtomicInteger i = new AtomicInteger();
folderNames.forEach(folderName -> {
FolderModel createdFolder = createFolder(folderName, getOrNull(titles, i.get()), getOrNull(descriptions, i.get()), parent, getOrNull(aliases, i.get()));
createdFolders.add(createdFolder);
i.getAndIncrement();
});
return createdFolders;
}
}

View File

@@ -0,0 +1,105 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import java.util.function.Function;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.ContentModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
public abstract class ContentCreator<CONTENT extends ContentModel, SELF extends Creator.ContentCreator<CONTENT, ?>>
extends ResourceCreator<CONTENT, SELF>
implements Creator.ContentCreator<CONTENT, SELF>
{
private static final FolderModel DOCUMENT_LIBRARY = null;
protected SiteModel site;
protected final CONTENT contentModel;
protected FolderModel parent = DOCUMENT_LIBRARY;
public ContentCreator(CONTENT contentModel)
{
super();
this.contentModel = contentModel;
}
protected abstract SELF self();
@Override
public SELF withName(String name)
{
contentModel.setName(name);
return self();
}
@Override
public SELF withTitle(String title)
{
contentModel.setTitle(title);
return self();
}
@Override
public SELF withDescription(String description)
{
contentModel.setDescription(description);
return self();
}
@Override
public <FOLDER extends FolderModel> SELF underFolder(FOLDER parent)
{
this.parent = parent;
return self();
}
@Override
public <SITE extends SiteModel> SELF withinSite(SITE site)
{
this.site = site;
return self();
}
protected CONTENT create(DataContent dataContent, Function<CONTENT, CONTENT> creator)
{
if (site != null)
{
dataContent.usingSite(site);
}
if (parent != null)
{
dataContent.usingResource(parent);
}
if (user != null)
{
dataContent.usingUser(user);
}
return creator.apply(contentModel);
}
}

View File

@@ -0,0 +1,177 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.model.RestCategoryLinkBodyModel;
import org.alfresco.rest.model.RestCategoryModel;
import org.alfresco.rest.model.RestNodeBodyMoveCopyModel;
import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.model.ContentModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
public abstract class ContentModifier<CONTENT extends ContentModel, SELF extends Modifier.ContentModifier<CONTENT, ?>>
extends ResourceModifier<CONTENT, SELF>
implements Modifier.ContentModifier<CONTENT, SELF>
{
protected SiteModel site;
private final DataContent dataContent;
private final RestWrapper restClient;
protected final CONTENT contentModel;
protected ContentModifier(DataContent dataContent, RestWrapper restClient, CONTENT contentModel)
{
super();
this.dataContent = dataContent;
this.restClient = restClient;
this.contentModel = contentModel;
}
public <SITE extends SiteModel> SELF withinSite(SITE site)
{
this.site = site;
return self();
}
protected CONTENT get(String id, Supplier<CONTENT> contentSupplier)
{
ContentModel getNodeModel = new ContentModel();
getNodeModel.setNodeRef(id);
RestNodeModel node = buildNodeRestRequest(restClient, getNodeModel).getNode();
CONTENT content = contentSupplier.get();
content.setName(node.getName());
content.setNodeRef(node.getId());
content.setCmisLocation(getCmisLocation(node.getPath(), node.getName()));
return content;
}
@Override
public <FOLDER extends FolderModel> void moveTo(FOLDER target)
{
RestNodeBodyMoveCopyModel moveModel = new RestNodeBodyMoveCopyModel();
moveModel.setTargetParentId(target.getNodeRef());
moveModel.setName(contentModel.getName());
RestNodeModel movedNode = buildNodeRestRequest(restClient, contentModel).includePath().move(moveModel);
contentModel.setCmisLocation(getCmisLocation(movedNode.getPath(), movedNode.getName()));
}
protected CONTENT copyTo(FolderModel target, Function<CONTENT, CONTENT> contentSupplier)
{
RestNodeBodyMoveCopyModel copyModel = new RestNodeBodyMoveCopyModel();
copyModel.setTargetParentId(target.getNodeRef());
copyModel.setName(contentModel.getName());
RestNodeModel nodeCopy = buildNodeRestRequest(restClient, contentModel).includePath().copy(copyModel);
CONTENT contentCopy = contentSupplier.apply(contentModel);
contentCopy.setName(nodeCopy.getName());
contentCopy.setNodeRef(nodeCopy.getId());
contentCopy.setCmisLocation(getCmisLocation(nodeCopy.getPath(), nodeCopy.getName()));
return contentCopy;
}
@Override
public void delete()
{
dataContent.usingUser(user).usingResource(contentModel).deleteContent();
}
@Override
public <FOLDER extends FolderModel> void linkTo(FOLDER secondaryParent)
{
buildNodeRestRequest(restClient, secondaryParent).addSecondaryChild(contentModel);
}
@Override
@SafeVarargs
public final <FOLDER extends FolderModel> void linkTo(FOLDER... secondaryParents)
{
Stream.of(secondaryParents).forEach(secondaryParent -> buildNodeRestRequest(restClient, secondaryParent).addSecondaryChildren(contentModel));
}
@Override
public <FOLDER extends FolderModel> void unlinkFrom(FOLDER secondaryParent)
{
buildNodeRestRequest(restClient, secondaryParent).removeSecondaryChild(contentModel);
}
@Override
public <CATEGORY extends RestCategoryModel> void linkTo(CATEGORY category)
{
buildNodeRestRequest(restClient, contentModel).linkToCategory(
RestCategoryLinkBodyModel.builder().categoryId(category.getId()).create());
}
@Override
@SafeVarargs
public final <CATEGORY extends RestCategoryModel> void linkTo(CATEGORY... categories)
{
buildNodeRestRequest(restClient, contentModel).linkToCategories(
Stream.of(categories)
.map(category -> RestCategoryLinkBodyModel.builder().categoryId(category.getId()).create())
.collect(Collectors.toList()));
}
@Override
public <CATEGORY extends RestCategoryModel> void unlinkFrom(CATEGORY category)
{
buildNodeRestRequest(restClient, contentModel).unlinkFromCategory(category.getId());
}
private static String getCmisLocation(Object pathMap, String name)
{
return Stream.concat(
Stream.of(pathMap)
.filter(Objects::nonNull)
.filter(path -> path instanceof Map)
.map(Map.class::cast)
.map(path -> path.get("elements"))
.filter(Objects::nonNull)
.filter(elements -> elements instanceof List)
.map(List.class::cast)
.flatMap(elements -> (Stream<?>) elements.stream())
.skip(1)
.filter(element -> element instanceof Map)
.map(Map.class::cast)
.map(element -> element.get("name"))
.filter(Objects::nonNull)
.filter(elementName -> elementName instanceof String)
.map(String.class::cast),
Stream.of(name))
.collect(Collectors.joining("/", "/", "/"));
}
}

View File

@@ -0,0 +1,107 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import java.util.random.RandomGenerator;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.apache.commons.lang3.RandomStringUtils;
import org.alfresco.rest.model.RestCategoryModel;
import org.alfresco.utility.model.ContentModel;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FileType;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.TestModel;
import org.alfresco.utility.model.UserModel;
/**
* Declares operations, which can be performed to create repository resource.
*
* @param <RESOURCE>
* repository resource, e.g. folder, category, etc.
* @param <SELF>
* return type - this interface extension or implementation
*/
public interface Creator<RESOURCE extends TestModel, SELF extends Creator<RESOURCE, ?>>
{
SELF withName(String name);
<USER extends UserModel> SELF asUser(USER user);
RESOURCE create();
interface ContentCreator<CONTENT extends ContentModel, SELF extends ContentCreator<CONTENT, ?>>
extends Creator<CONTENT, SELF>
{
SELF withTitle(String title);
default SELF withRandomTitle()
{
return withTitle(RandomStringUtils.randomAlphanumeric(10));
}
SELF withDescription(String description);
default SELF withRandomDescription()
{
return withDescription(RandomStringUtils.randomAlphanumeric(20));
}
<FOLDER extends FolderModel> SELF underFolder(FOLDER parent);
<SITE extends SiteModel> SELF withinSite(SITE site);
}
interface FolderCreator extends ContentCreator<FolderModel, FolderCreator>
{}
interface FileCreator extends ContentCreator<FileModel, FileCreator>
{
FileCreator ofType(FileType fileType);
FileCreator withContent(String fileContent);
default FileCreator withRandomContent()
{
return withRandomContent(RandomGenerator.getDefault().nextInt(30, 70), 10);
}
default FileCreator withRandomContent(int wordsNumber, int wordsMaxLength)
{
return withContent(IntStream.range(0, wordsNumber)
.mapToObj(i -> RandomStringUtils.randomAlphanumeric(1, wordsMaxLength))
.collect(Collectors.joining(" ")));
}
}
interface CategoryCreator extends Creator<RestCategoryModel, CategoryCreator>
{
<CATEGORY extends RestCategoryModel> CategoryCreator underCategory(CATEGORY parent);
}
}

View File

@@ -0,0 +1,84 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import org.alfresco.rest.model.RestCategoryModel;
import org.alfresco.utility.model.ContentModel;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.TestModel;
import org.alfresco.utility.model.UserModel;
/**
* Declares operations, which can be performed on repository resource.
*
* @param <RESOURCE>
* repository resource, e.g. folder, category, etc.
* @param <SELF>
* return type - this interface extension or implementation
*/
public interface Modifier<RESOURCE extends TestModel, SELF extends Modifier<RESOURCE, ?>>
{
RESOURCE get(String id);
<USER extends UserModel> SELF asUser(USER user);
void delete();
interface ContentModifier<CONTENT extends ContentModel, SELF extends Modifier<CONTENT, ?>>
extends Modifier<CONTENT, SELF>
{
<FOLDER extends FolderModel> void moveTo(FOLDER target);
<FOLDER extends FolderModel> CONTENT copyTo(FOLDER target);
<FOLDER extends FolderModel> void linkTo(FOLDER secondaryParent);
<FOLDER extends FolderModel> void linkTo(FOLDER... secondaryParents);
<FOLDER extends FolderModel> void unlinkFrom(FOLDER secondaryParent);
<CATEGORY extends RestCategoryModel> void linkTo(CATEGORY category);
<CATEGORY extends RestCategoryModel> void linkTo(CATEGORY... categories);
<CATEGORY extends RestCategoryModel> void unlinkFrom(CATEGORY category);
<SITE extends SiteModel> SELF withinSite(SITE site);
}
interface FolderModifier extends ContentModifier<FolderModel, FolderModifier>,
ResourceIntroducer<Specifier.MultiContentSpecifier>, ResourceRemover<Specifier.AssociationSpecifier>
{}
interface FileModifier extends ContentModifier<FileModel, FileModifier>
{}
interface CategoryModifier extends Modifier<RestCategoryModel, CategoryModifier>,
ResourceIntroducer<Specifier.CategoriesSpecifier>
{}
}

View File

@@ -0,0 +1,92 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import java.util.List;
import java.util.random.RandomGenerator;
import org.alfresco.rest.model.RestCategoryModel;
import org.alfresco.utility.model.ContentModel;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FileType;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.TestModel;
import org.alfresco.utility.model.UserModel;
/**
* Declares actions, which can be performed to create multiple repository resources.
*
* @param <RESOURCE>
* repository resource, e.g. folder, category, etc.
* @param <SELF>
* return type - this interface extension or implementation
*/
public interface MultiCreator<RESOURCE extends TestModel, SELF extends MultiCreator<RESOURCE, ?>>
{
SELF withNames(String... names);
<USER extends UserModel> SELF asUser(USER user);
List<RESOURCE> create();
interface ContentsCreator<MODEL extends ContentModel, SELF extends ContentsCreator<MODEL, ?>> extends MultiCreator<MODEL, SELF>
{
SELF withTitles(String... titles);
SELF withRandomTitles();
SELF withDescriptions(String... descriptions);
SELF withRandomDescriptions();
<FOLDER extends FolderModel> SELF underFolder(FOLDER parent);
<SITE extends SiteModel> SELF withinSite(SITE site);
}
interface FoldersCreator extends ContentsCreator<FolderModel, FoldersCreator>
{}
interface FilesCreator extends ContentsCreator<FileModel, FilesCreator>
{
FilesCreator ofTypes(FileType... fileTypes);
FilesCreator withContents(List<String> filesContents);
default FilesCreator withRandomContents()
{
return withRandomContents(RandomGenerator.getDefault().nextInt(30, 70), 10);
}
FilesCreator withRandomContents(int wordsCount, int wordsMaxLength);
}
interface CategoriesCreator extends MultiCreator<RestCategoryModel, CategoriesCreator>
{
<CATEGORY extends RestCategoryModel> CategoriesCreator underCategory(CATEGORY parent);
}
}

View File

@@ -0,0 +1,106 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.alfresco.utility.model.ContentModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.UserModel;
public abstract class MultipleContentsCreator<CONTENT extends ContentModel, SELF extends MultiCreator.ContentsCreator<CONTENT, ?>>
extends MultipleResourcesCreator<CONTENT, SELF>
implements MultiCreator.ContentsCreator<CONTENT, SELF>
{
protected FolderModel parent;
protected SiteModel site;
protected UserModel user;
protected List<String> titles = new ArrayList<>();
protected List<String> descriptions = new ArrayList<>();
public SELF withTitles(String... titles)
{
this.titles = Stream.of(titles).collect(Collectors.toList());
return self();
}
public SELF withRandomTitles()
{
this.titles = IntStream.range(0, names.size()).mapToObj(i -> RandomStringUtils.randomAlphanumeric(10)).collect(Collectors.toList());
return self();
}
public SELF withDescriptions(String... descriptions)
{
this.descriptions = Stream.of(descriptions).collect(Collectors.toList());
return self();
}
public SELF withRandomDescriptions()
{
this.descriptions = IntStream.range(0, names.size()).mapToObj(i -> RandomStringUtils.randomAlphanumeric(20)).collect(Collectors.toList());
return self();
}
public <FOLDER extends FolderModel> SELF underFolder(FOLDER parent)
{
this.parent = parent;
return self();
}
public <SITE extends SiteModel> SELF withinSite(SITE site)
{
this.site = site;
return self();
}
protected void verifyDataConsistency()
{
if (CollectionUtils.isEmpty(names))
{
throw new IllegalArgumentException("Names of files/folders to create needs to be provided");
}
if (CollectionUtils.isNotEmpty(titles) && titles.size() < names.size())
{
throw new IllegalArgumentException("Provided titles size is different from created files/folders amount");
}
if (CollectionUtils.isNotEmpty(descriptions) && descriptions.size() < names.size())
{
throw new IllegalArgumentException("Provided descriptions size is different from created files/folders amount");
}
}
}

View File

@@ -0,0 +1,129 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.requests.Node;
import org.alfresco.utility.model.RepoTestModel;
import org.alfresco.utility.model.TestModel;
import org.alfresco.utility.model.UserModel;
public abstract class MultipleResourcesCreator<RESOURCE extends TestModel, SELF extends MultiCreator<RESOURCE, ?>>
implements MultiCreator<RESOURCE, SELF>
{
protected UserModel user;
protected List<String> names;
protected List<String> aliases;
protected abstract SELF self();
public SELF withNames(String... names)
{
this.names = Stream.of(names).collect(Collectors.toList());
return self();
}
public SELF withRandomNames(String... prefixes)
{
this.aliases = Stream.of(prefixes).toList();
return withNames(Stream.of(prefixes).map(this::generateRandomNameWith).toArray(String[]::new));
}
public SELF withRandomNames(List<String> prefixes, List<String> suffixes)
{
this.aliases = prefixes;
if (CollectionUtils.isEmpty(prefixes) || CollectionUtils.isEmpty(suffixes) || prefixes.size() != suffixes.size())
{
throw new IllegalArgumentException("Provided suffixes size is different from prefixes size");
}
AtomicInteger i = new AtomicInteger();
return withNames(prefixes.stream()
.map(this::generateRandomNameWith)
.map(name -> name + suffixes.get(i.getAndIncrement()))
.toArray(String[]::new));
}
public SELF withRandomNames(int namesCount)
{
return withNames(IntStream.range(0, namesCount).mapToObj(i -> generateRandomName()).toArray(String[]::new));
}
@Override
public <USER extends UserModel> SELF asUser(USER user)
{
this.user = user;
return self();
}
protected String generateRandomName()
{
return generateRandomNameWith(RandomStringUtils.randomAlphanumeric(5) + "_");
}
protected String generateRandomNameWith(String prefix)
{
return generateRandomNameWith(prefix, EMPTY);
}
protected String generateRandomNameWith(String prefix, String suffix)
{
return prefix + UUID.randomUUID() + suffix;
}
protected Node buildNodeRestRequest(RestWrapper restClient, RepoTestModel node)
{
return restClient.authenticateUser(user).withCoreAPI().usingNode(node);
}
protected <T> T getOrNull(List<T> list, int index)
{
if (CollectionUtils.isEmpty(list))
{
return null;
}
if (index < 0 || index >= list.size())
{
return null;
}
return list.get(index);
}
}

View File

@@ -0,0 +1,104 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import static org.apache.commons.lang3.StringUtils.EMPTY;
import java.util.UUID;
import org.apache.commons.lang3.RandomStringUtils;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.requests.Node;
import org.alfresco.utility.model.RepoTestModel;
import org.alfresco.utility.model.TestModel;
import org.alfresco.utility.model.UserModel;
public abstract class ResourceCreator<RESOURCE extends TestModel, SELF extends Creator<RESOURCE, ?>>
implements Creator<RESOURCE, SELF>
{
protected UserModel user;
protected String name;
protected String alias;
protected abstract SELF self();
@Override
public SELF withName(String name)
{
this.name = name;
return self();
}
public SELF withAlias(String alias)
{
this.alias = alias;
return self();
}
public SELF withRandomName()
{
return withName(generateRandomName());
}
public SELF withRandomName(String prefix)
{
return withName(generateRandomNameWith(prefix));
}
public SELF withRandomName(String prefix, String suffix)
{
return withName(generateRandomNameWith(prefix, suffix));
}
@Override
public <USER extends UserModel> SELF asUser(USER user)
{
this.user = user;
return self();
}
protected String generateRandomName()
{
return generateRandomNameWith(RandomStringUtils.randomAlphanumeric(5) + "_");
}
protected String generateRandomNameWith(String prefix)
{
return generateRandomNameWith(prefix, EMPTY);
}
protected String generateRandomNameWith(String prefix, String suffix)
{
return prefix + UUID.randomUUID() + suffix;
}
protected Node buildNodeRestRequest(RestWrapper restClient, RepoTestModel node)
{
return restClient.authenticateUser(user).withCoreAPI().usingNode(node);
}
}

View File

@@ -0,0 +1,37 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
/**
* Declares an action introducing new repository resource like: folder, file, category, association, etc.
*
* @param <SPECIFIER>
* repository resource specifier, see {@link Specifier}
*/
public interface ResourceIntroducer<SPECIFIER extends Specifier>
{
SPECIFIER add();
}

View File

@@ -0,0 +1,53 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.requests.Node;
import org.alfresco.utility.model.RepoTestModel;
import org.alfresco.utility.model.TestModel;
import org.alfresco.utility.model.UserModel;
public abstract class ResourceModifier<RESOURCE extends TestModel, SELF extends Modifier<RESOURCE, ?>>
implements Modifier<RESOURCE, SELF>
{
protected UserModel user;
protected abstract SELF self();
@Override
public SELF asUser(UserModel user)
{
this.user = user;
return self();
}
protected Node buildNodeRestRequest(RestWrapper restClient, RepoTestModel node)
{
return restClient.authenticateUser(user).withCoreAPI().usingNode(node);
}
}

View File

@@ -0,0 +1,37 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
/**
* Declares an action, which removes repository resource like association.
*
* @param <SPECIFIER>
* repository resource specifier, see {@link Specifier}
*/
public interface ResourceRemover<SPECIFIER extends Specifier>
{
SPECIFIER remove();
}

View File

@@ -0,0 +1,106 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.repo.resource.general;
import org.alfresco.rest.model.RestTagModel;
import org.alfresco.utility.model.ContentModel;
/**
* Specifies repository resource to perform an operation on, like: add, modify, remove.
*/
public interface Specifier
{
interface FolderSpecifier extends Specifier
{
Creator.FolderCreator folder(String name);
Creator.FolderCreator randomFolder();
Creator.FolderCreator randomFolder(String prefix);
MultiCreator.FoldersCreator folders(String... names);
MultiCreator.FoldersCreator randomFolders(String... prefixes);
MultiCreator.FoldersCreator randomFolders(int quantity);
MultiCreator.FoldersCreator nestedFolders(String... names);
MultiCreator.FoldersCreator nestedRandomFolders(String... prefixes);
MultiCreator.FoldersCreator nestedRandomFolders(int depth);
}
interface FileSpecifier extends Specifier
{
Creator.FileCreator file(String name);
Creator.FileCreator randomFile();
Creator.FileCreator randomFile(String prefix);
MultiCreator.FilesCreator files(String... names);
MultiCreator.FilesCreator randomFiles(String... prefixes);
MultiCreator.FilesCreator randomFiles(int quantity);
}
interface AssociationSpecifier extends Specifier
{
<CONTENT extends ContentModel> void secondaryContent(CONTENT content);
<TAG extends RestTagModel> void tag(TAG tag);
}
interface MultiContentSpecifier extends FolderSpecifier, FileSpecifier, AssociationSpecifier
{
<CONTENT extends ContentModel> void secondaryContent(CONTENT... contents);
<TAG extends RestTagModel> void tags(TAG... tags);
}
interface CategoriesSpecifier extends Specifier
{
Creator.CategoryCreator category(String name);
Creator.CategoryCreator randomCategory();
Creator.CategoryCreator randomCategory(String prefix);
MultiCreator.CategoriesCreator categories(String... names);
MultiCreator.CategoriesCreator randomCategories(String... prefixes);
MultiCreator.CategoriesCreator randomCategories(int quantity);
MultiCreator.CategoriesCreator nestedCategories(String... names);
MultiCreator.CategoriesCreator nestedRandomCategories(String... prefixes);
MultiCreator.CategoriesCreator nestedRandomCategories(int depth);
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* alfresco-tas-restapi
* %%
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* 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
@@ -26,59 +26,34 @@
package org.alfresco.rest.requests;
import static org.alfresco.rest.core.JsonBodyGenerator.arrayToJson;
import static org.alfresco.rest.requests.RuleSettings.IS_INHERITANCE_ENABLED;
import static org.springframework.http.HttpMethod.PUT;
import jakarta.json.JsonArrayBuilder;
import static org.alfresco.rest.core.JsonBodyGenerator.arrayToJson;
import static org.alfresco.rest.requests.RuleSettings.IS_INHERITANCE_ENABLED;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.List;
import java.util.stream.Stream;
import jakarta.json.JsonArrayBuilder;
import io.restassured.http.ContentType;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.testng.reporters.Files;
import org.alfresco.rest.core.JsonBodyGenerator;
import org.alfresco.rest.core.RestRequest;
import org.alfresco.rest.core.RestResponse;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.exception.JsonToModelConversionException;
import org.alfresco.rest.model.RestActionDefinitionModelsCollection;
import org.alfresco.rest.model.RestCategoryLinkBodyModel;
import org.alfresco.rest.model.RestCategoryModel;
import org.alfresco.rest.model.RestCategoryModelsCollection;
import org.alfresco.rest.model.RestCommentModel;
import org.alfresco.rest.model.RestCommentModelsCollection;
import org.alfresco.rest.model.RestNodeAssocTargetModel;
import org.alfresco.rest.model.RestNodeAssociationModel;
import org.alfresco.rest.model.RestNodeAssociationModelCollection;
import org.alfresco.rest.model.RestNodeAssociationTypeModel;
import org.alfresco.rest.model.RestNodeBodyModel;
import org.alfresco.rest.model.RestNodeBodyMoveCopyModel;
import org.alfresco.rest.model.RestNodeChildAssocModelCollection;
import org.alfresco.rest.model.RestNodeChildAssociationModel;
import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.rest.model.RestNodeModelsCollection;
import org.alfresco.rest.model.RestRatingModel;
import org.alfresco.rest.model.RestRatingModelsCollection;
import org.alfresco.rest.model.RestRenditionInfoModel;
import org.alfresco.rest.model.RestRenditionInfoModelCollection;
import org.alfresco.rest.model.RestRuleExecutionModel;
import org.alfresco.rest.model.RestRuleSetLinkModel;
import org.alfresco.rest.model.RestRuleSetModel;
import org.alfresco.rest.model.RestRuleSetModelsCollection;
import org.alfresco.rest.model.RestTagModel;
import org.alfresco.rest.model.RestTagModelsCollection;
import org.alfresco.rest.model.RestVersionModel;
import org.alfresco.rest.model.RestVersionModelsCollection;
import org.alfresco.rest.model.*;
import org.alfresco.rest.model.body.RestNodeLockBodyModel;
import org.alfresco.rest.model.builder.NodesBuilder;
import org.alfresco.utility.Utility;
import org.alfresco.utility.model.RepoTestModel;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.testng.reporters.Files;
/**
* Declares all Rest API under the /nodes path
@@ -294,6 +269,7 @@ public class Node extends ModelRequest<Node>
/**
*
* Get fivestar rating of a document using GET call on "nodes/{nodeId}/ratings/{ratingId}"
*
* @return
*/
public RestRatingModel getFiveStarRating()
@@ -336,7 +312,6 @@ public class Node extends ModelRequest<Node>
return restWrapper.processModels(RestTagModelsCollection.class, request);
}
/**
* Deletes a tag for a specific content node using DELETE call on nodes/{nodeId}/tags/{tagId}
*
@@ -381,6 +356,7 @@ public class Node extends ModelRequest<Node>
* You need to specify first the multipart call {@link RestWrapper#usingMultipartFile(java.io.File)}
*
* <code>usingMultipartFile(new File("your-local-file.txt")).withCoreAPI().usingNode(ContentModel.my()).createNode();</code>
*
* @return
*/
public RestNodeModel createNode()
@@ -415,7 +391,8 @@ public class Node extends ModelRequest<Node>
/**
* Create node rendition using POST call on '/nodes/{nodeId}/renditions'
*
* @param renditionId id of rendition to be created
* @param renditionId
* id of rendition to be created
* @return
*/
public void createNodeRendition(String renditionId)
@@ -428,8 +405,10 @@ public class Node extends ModelRequest<Node>
/**
* Create node version rendition using POST call on '/nodes/{nodeId}/versions/{versionId}/renditions'
*
* @param renditionId id of rendition to be created
* @param versionId version id of node
* @param renditionId
* id of rendition to be created
* @param versionId
* version id of node
* @return
*/
public void createNodeVersionRendition(String renditionId, String versionId)
@@ -442,10 +421,10 @@ public class Node extends ModelRequest<Node>
}
/**
* Check if specified rendition exists and if not
* create node rendition using POST call on '/nodes/{nodeId}/renditions'
* Check if specified rendition exists and if not create node rendition using POST call on '/nodes/{nodeId}/renditions'
*
* @param renditionId id of rendition to be created
* @param renditionId
* id of rendition to be created
* @return
*/
public void createNodeRenditionIfNotExists(String renditionId)
@@ -460,9 +439,10 @@ public class Node extends ModelRequest<Node>
}
/**
* Get node rendition using GET call on '/nodes/{nodeId}/renditions/{renditionId}
* Get node rendition using GET call on '/nodes/{nodeId}/renditions/{renditionId}
*
* @param renditionId id of rendition to be retrieved
* @param renditionId
* id of rendition to be retrieved
* @return
*/
public RestRenditionInfoModel getNodeRendition(String renditionId)
@@ -474,8 +454,10 @@ public class Node extends ModelRequest<Node>
/**
* Get node version rendition using GET call on '/nodes/{nodeId}/versions/{versionId}renditions/{renditionId}
*
* @param renditionId id of rendition to be retrieved
* @param versionId versionId of the node
* @param renditionId
* id of rendition to be retrieved
* @param versionId
* versionId of the node
* @return
*/
public RestRenditionInfoModel getNodeVersionRendition(String renditionId, String versionId)
@@ -487,8 +469,7 @@ public class Node extends ModelRequest<Node>
}
/**
* Get node rendition using GET call on 'nodes/{nodeId}/renditions/{renditionId} Please note that it retries to get
* the renditions response several times because on the alfresco server the rendition can take a while to be created.
* Get node rendition using GET call on 'nodes/{nodeId}/renditions/{renditionId} Please note that it retries to get the renditions response several times because on the alfresco server the rendition can take a while to be created.
*
* @return
*/
@@ -510,8 +491,7 @@ public class Node extends ModelRequest<Node>
}
/**
* Get node version rendition using GET call on 'nodes/{nodeId}/versions/{versionId}/renditions/{renditionId} Please note that it retries to get
* the renditions response several times because on the alfresco server the rendition can take a while to be created.
* Get node version rendition using GET call on 'nodes/{nodeId}/versions/{versionId}/renditions/{renditionId} Please note that it retries to get the renditions response several times because on the alfresco server the rendition can take a while to be created.
*
* @return
*/
@@ -533,10 +513,7 @@ public class Node extends ModelRequest<Node>
}
/**
* Get node rendition content using GET call on
* 'nodes/{nodeId}/renditions/{renditionId}/content Please note that it
* retries to get the renditions response several times because on the
* alfresco server the rendition can take a while to be created.
* Get node rendition content using GET call on 'nodes/{nodeId}/renditions/{renditionId}/content Please note that it retries to get the renditions response several times because on the alfresco server the rendition can take a while to be created.
*
* @return
*/
@@ -546,7 +523,7 @@ public class Node extends ModelRequest<Node>
renditionId);
RestResponse response = restWrapper.process(request);
int retry = 0;
//Multiplied by '8' because AI rendition test cases need more time (~30 seconds) - see ACS-2158
// Multiplied by '8' because AI rendition test cases need more time (~30 seconds) - see ACS-2158
while (!Integer.valueOf(response.getStatusCode()).equals(HttpStatus.OK.value()) && retry < (8 * Utility.retryCountSeconds))
{
Utility.waitToLoopTime(1);
@@ -558,10 +535,7 @@ public class Node extends ModelRequest<Node>
}
/**
* Get node version rendition content using GET call on
* 'nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content Please note that it
* retries to get the renditions response several times because on the
* alfresco server the rendition can take a while to be created.
* Get node version rendition content using GET call on 'nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content Please note that it retries to get the renditions response several times because on the alfresco server the rendition can take a while to be created.
*
* @return
*/
@@ -582,8 +556,7 @@ public class Node extends ModelRequest<Node>
}
/**
* Get node rendition content using GET call on
* 'nodes/{nodeId}/renditions/{renditionId}/content
* Get node rendition content using GET call on 'nodes/{nodeId}/renditions/{renditionId}/content
*
* @return
*/
@@ -595,8 +568,7 @@ public class Node extends ModelRequest<Node>
}
/**
* Get node version rendition content using GET call on
* 'nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content
* Get node version rendition content using GET call on 'nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content
*
* @return
*/
@@ -608,8 +580,8 @@ public class Node extends ModelRequest<Node>
}
/**
* Get rendition information for available renditions for the node using GET call on
* 'nodes/{nodeId}/renditions'
* Get rendition information for available renditions for the node using GET call on 'nodes/{nodeId}/renditions'
*
* @return
*/
public RestRenditionInfoModelCollection getNodeRenditionsInfo()
@@ -620,8 +592,8 @@ public class Node extends ModelRequest<Node>
}
/**
* Get rendition information for available renditions for the node version using GET call on
* 'nodes/{nodeId}/versions/{versionId}/renditions'
* Get rendition information for available renditions for the node version using GET call on 'nodes/{nodeId}/versions/{versionId}/renditions'
*
* @return
*/
public RestRenditionInfoModelCollection getNodeVersionRenditionsInfo(String versionId)
@@ -631,11 +603,11 @@ public class Node extends ModelRequest<Node>
return restWrapper.processModels(RestRenditionInfoModelCollection.class, request);
}
/**
* Delete the rendition identified by renditionId using DELETE call on "/nodes/{nodeId}/renditions/{renditionId}"
*
* @param renditionId id of rendition to delete
* @param renditionId
* id of rendition to delete
*/
public void deleteNodeRendition(String renditionId)
{
@@ -657,7 +629,8 @@ public class Node extends ModelRequest<Node>
/**
* Move a node to a target folder
*
* @param moveBody a {@link RestNodeBodyMoveCopyModel} containing at least the target parent id
* @param moveBody
* a {@link RestNodeBodyMoveCopyModel} containing at least the target parent id
* @return the moved node's new information
*/
public RestNodeModel move(RestNodeBodyMoveCopyModel moveBody)
@@ -669,7 +642,8 @@ public class Node extends ModelRequest<Node>
/**
* Copy a node to a target folder
*
* @param copyBody a {@link RestNodeBodyMoveCopyModel} containing at least the target parent id
* @param copyBody
* a {@link RestNodeBodyMoveCopyModel} containing at least the target parent id
* @return the moved node's new information
*/
public RestNodeModel copy(RestNodeBodyMoveCopyModel copyBody)
@@ -679,7 +653,6 @@ public class Node extends ModelRequest<Node>
return restWrapper.processModel(RestNodeModel.class, request);
}
/**
* Lock a specific node using POST call on "nodes/{nodeId}/lock"
*
@@ -747,8 +720,7 @@ public class Node extends ModelRequest<Node>
}
/**
* Delete a target for a specific node using DELETE call on
* nodes/{nodeId}/targets/{targetId}
* Delete a target for a specific node using DELETE call on nodes/{nodeId}/targets/{targetId}
*
* @param target
*/
@@ -830,7 +802,8 @@ public class Node extends ModelRequest<Node>
/**
* Creates a secondary child association using POST call to: 'nodes/{nodeId}/secondary-children'.
*
* @param secondaryChild - node, which should become a secondary child
* @param secondaryChild
* - node, which should become a secondary child
* @return a node's parent-child association
*/
public RestNodeChildAssociationModel addSecondaryChild(RepoTestModel secondaryChild)
@@ -841,8 +814,10 @@ public class Node extends ModelRequest<Node>
/**
* Creates a secondary child association using POST call to: 'nodes/{nodeId}/secondary-children'.
*
* @param associationType - type of secondary parent-child relationship association
* @param secondaryChild - node, which should become a secondary child
* @param associationType
* - type of secondary parent-child relationship association
* @param secondaryChild
* - node, which should become a secondary child
* @return a node's parent-child association
*/
public RestNodeChildAssociationModel addSecondaryChild(String associationType, RepoTestModel secondaryChild)
@@ -853,7 +828,8 @@ public class Node extends ModelRequest<Node>
/**
* Creates a secondary child association using POST call to: 'nodes/{nodeId}/secondary-children'.
*
* @param secondaryChildAssociation - node's secondary parent-child association model
* @param secondaryChildAssociation
* - node's secondary parent-child association model
* @return a node's parent-child association
*/
public RestNodeChildAssociationModel addSecondaryChild(RestNodeChildAssociationModel secondaryChildAssociation)
@@ -865,7 +841,8 @@ public class Node extends ModelRequest<Node>
/**
* Creates a secondary children association using POST call to: 'nodes/{nodeId}/secondary-children'.
*
* @param secondaryChildren - nodes, which should become secondary children
* @param secondaryChildren
* - nodes, which should become secondary children
* @return a collection of node's parent-child associations
*/
public RestNodeChildAssocModelCollection addSecondaryChildren(RepoTestModel... secondaryChildren)
@@ -876,21 +853,24 @@ public class Node extends ModelRequest<Node>
/**
* Creates a secondary children association using POST call to: 'nodes/{nodeId}/secondary-children'.
*
* @param associationType - type of secondary parent-child relationship association
* @param secondaryChildren - nodes, which should become secondary children
* @param associationType
* - type of secondary parent-child relationship association
* @param secondaryChildren
* - nodes, which should become secondary children
* @return a collection of node's parent-child associations
*/
public RestNodeChildAssocModelCollection addSecondaryChildren(String associationType, RepoTestModel... secondaryChildren)
{
return addSecondaryChildren(Stream.of(secondaryChildren)
.map(child -> new RestNodeChildAssociationModel(child.getNodeRef(), associationType))
.toArray(RestNodeChildAssociationModel[]::new));
.map(child -> new RestNodeChildAssociationModel(child.getNodeRef(), associationType))
.toArray(RestNodeChildAssociationModel[]::new));
}
/**
* Creates a secondary children association using POST call to: 'nodes/{nodeId}/secondary-children'.
*
* @param secondaryChildrenAssociations - node's secondary parent-child association models
* @param secondaryChildrenAssociations
* - node's secondary parent-child association models
* @return a collection of node's parent-child associations
*/
public RestNodeChildAssocModelCollection addSecondaryChildren(RestNodeChildAssociationModel... secondaryChildrenAssociations)
@@ -903,7 +883,8 @@ public class Node extends ModelRequest<Node>
/**
* Removes secondary child association using DELETE call 'nodes/{nodeId}/secondary-children/{childId}'.
*
* @param secondaryChild - node, which should NOT be a secondary child anymore
* @param secondaryChild
* - node, which should NOT be a secondary child anymore
*/
public void removeSecondaryChild(RepoTestModel secondaryChild)
{
@@ -913,8 +894,10 @@ public class Node extends ModelRequest<Node>
/**
* Removes secondary child association using DELETE call 'nodes/{nodeId}/secondary-children/{childId}'.
*
* @param associationType - type of secondary parent-child relationship association
* @param secondaryChild - node, which should NOT be a secondary child anymore
* @param associationType
* - type of secondary parent-child relationship association
* @param secondaryChild
* - node, which should NOT be a secondary child anymore
*/
public void removeSecondaryChild(String associationType, RepoTestModel secondaryChild)
{
@@ -932,13 +915,12 @@ public class Node extends ModelRequest<Node>
/**
* Removes secondary child association using DELETE call 'nodes/{nodeId}/secondary-children/{childId}'.
*
* @param secondaryChildAssociation - node's secondary parent-child association to remove
* @param secondaryChildAssociation
* - node's secondary parent-child association to remove
*/
public void removeSecondaryChild(RestNodeAssociationModel secondaryChildAssociation)
{
String parameters = StringUtils.isNotEmpty(secondaryChildAssociation.getAssociation().getAssocType()) ?
"assocType=" + secondaryChildAssociation.getAssociation().getAssocType() + "&" + restWrapper.getParameters() :
restWrapper.getParameters();
String parameters = StringUtils.isNotEmpty(secondaryChildAssociation.getAssociation().getAssocType()) ? "assocType=" + secondaryChildAssociation.getAssociation().getAssocType() + "&" + restWrapper.getParameters() : restWrapper.getParameters();
RestRequest request = RestRequest.simpleRequest(HttpMethod.DELETE, "nodes/{nodeId}/secondary-children/{childId}?{parameters}", repoModel.getNodeRef(), secondaryChildAssociation.getId(), parameters);
restWrapper.processEmptyModel(request);
}
@@ -1013,7 +995,6 @@ public class Node extends ModelRequest<Node>
deleteNode(nodeModel.getId());
}
/**
* Delete a specific node using DELETE call on nodes/{nodeId}
*
@@ -1035,6 +1016,7 @@ public class Node extends ModelRequest<Node>
/**
* Get Direct Access URL for a node
*
* @param postBody
* @return
*/
@@ -1055,6 +1037,7 @@ public class Node extends ModelRequest<Node>
/**
* Get Direct Access URL for a specific node rendition E.g "pdf"
*
* @param renditionId
* @return
*/
@@ -1067,6 +1050,7 @@ public class Node extends ModelRequest<Node>
/**
* Get Direct Access URL for a specific node version. E.g "1.1"
*
* @param versionId
* @return
*/
@@ -1079,6 +1063,7 @@ public class Node extends ModelRequest<Node>
/**
* Get Direct Access URL for a specific node version rendition. E.g ("1.1", "pdf")
*
* @param versionId
* @param renditionId
* @return
@@ -1132,7 +1117,8 @@ public class Node extends ModelRequest<Node>
/**
* Get the specified rule set from a folder.
*
* @param ruleSetId The id of the rule set.
* @param ruleSetId
* The id of the rule set.
* @return The specified rule set.
*/
public RestRuleSetModel getRuleSet(String ruleSetId)
@@ -1145,7 +1131,8 @@ public class Node extends ModelRequest<Node>
/**
* Update a rule set on this folder - for example to reorder the rules.
*
* @param ruleSet The updated rule set.
* @param ruleSet
* The updated rule set.
* @return The updated rule set returned by the server.
*/
public RestRuleSetModel updateRuleSet(RestRuleSetModel ruleSet)
@@ -1188,7 +1175,8 @@ public class Node extends ModelRequest<Node>
/**
* Try to delete a ruleset link performing a DELETE call on "/nodes/{folderNodeId}/rule-set-links/{rulesetId}"
*
* @param ruleSetId the id of the ruleset to be unlinked from the folder
* @param ruleSetId
* the id of the ruleset to be unlinked from the folder
* @return
*/
public void unlinkRuleSet(String ruleSetId)
@@ -1200,7 +1188,8 @@ public class Node extends ModelRequest<Node>
/**
* Trigger rules on a folder performing POST call on "/nodes/{folderNodeId}/rule-executions"
*
* @param body - rules execution request
* @param body
* - rules execution request
* @return execution result
*/
public RestRuleExecutionModel executeRules(RestRuleExecutionModel body)
@@ -1223,7 +1212,8 @@ public class Node extends ModelRequest<Node>
/**
* Link content to category performing POST call on "/nodes/{nodeId}/category-links"
*
* @param categoryLink - contains category ID
* @param categoryLink
* - contains category ID
* @return linked to category
*/
public RestCategoryModel linkToCategory(RestCategoryLinkBodyModel categoryLink)
@@ -1235,7 +1225,8 @@ public class Node extends ModelRequest<Node>
/**
* Link content to many categories performing POST call on "/nodes/{nodeId}/category-links"
*
* @param categoryLinks - contains categories IDs
* @param categoryLinks
* - contains categories IDs
* @return linked to categories
*/
public RestCategoryModelsCollection linkToCategories(List<RestCategoryLinkBodyModel> categoryLinks)
@@ -1247,11 +1238,34 @@ public class Node extends ModelRequest<Node>
/**
* Unlink content from a category performing a DELETE call on "nodes/{nodeId}/category-links/{categoryId}"
*
* @param categoryId the id of the category to be unlinked from content
* @param categoryId
* the id of the category to be unlinked from content
*/
public void unlinkFromCategory(String categoryId)
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.DELETE, "nodes/{nodeId}/category-links/{categoryId}", repoModel.getNodeRef(), categoryId);
restWrapper.processEmptyModel(request);
}
/**
* In order to retrieve folder size details using POST call on "nodes/{nodeId}/size-details"
*
* @return
*/
public RestSizeDetailsModel executeSizeDetails()
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/size-details", repoModel.getNodeRef());
return restWrapper.processModel(RestSizeDetailsModel.class, request);
}
/**
* Getting Folder size details using GET call on "nodes/{nodeId}/size-details/{jobId}"
*
* @return
*/
public RestSizeDetailsModel getSizeDetails(String jobId)
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, "nodes/{nodeId}/size-details/{jobId}", repoModel.getNodeRef(), jobId);
return restWrapper.processModel(RestSizeDetailsModel.class, request);
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* alfresco-tas-restapi
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* 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
@@ -29,6 +29,12 @@ import static io.restassured.RestAssured.given;
import java.io.File;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import io.restassured.response.ValidatableResponse;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.alfresco.rest.core.JsonBodyGenerator;
import org.alfresco.rest.core.RestRequest;
import org.alfresco.rest.core.RestResponse;
@@ -56,12 +62,6 @@ import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.UserModel;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import io.restassured.response.ValidatableResponse;
/**
* Declares all Rest API under the /people path
@@ -97,9 +97,7 @@ public class People extends ModelRequest<People>
}
/**
* Retrieve list of activities for a specific person using GET call on "people/{personId}/activities"
* Please note that it retries to get the list of activities several times before returning the empty list. The list of activities are not displayed as
* they are created.
* Retrieve list of activities for a specific person using GET call on "people/{personId}/activities" Please note that it retries to get the list of activities several times before returning the empty list. The list of activities are not displayed as they are created.
*/
public RestActivityModelsCollection getPersonActivitiesUntilEntriesCountIs(int expectedNoOfEntries)
{
@@ -173,6 +171,15 @@ public class People extends ModelRequest<People>
return restWrapper.processModel(RestPreferenceModel.class, request);
}
/**
* Updates a specific preference of a specific person using PUT call on "people/{personId}/preferences/{preferenceName}"
*/
public RestPreferenceModel updatePersonPreferenceInformation(String preferenceName, RestPreferenceModel preferenceModel)
{
RestRequest request = RestRequest.requestWithBody(HttpMethod.PUT, preferenceModel.toJson(), "people/{personId}/preferences/{preferenceName}", this.person.getUsername(), preferenceName);
return restWrapper.processModel(RestPreferenceModel.class, request);
}
/**
* Remove a specific site from favorite sites list of a person using DELETE call on "people/{personId}/favorite-sites/{siteId}"
*/
@@ -334,7 +341,7 @@ public class People extends ModelRequest<People>
*/
public RestWrapper deleteSiteFromFavorites(SiteModel site)
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.DELETE, "people/{personId}/favorites/{favoriteId}", this.person.getUsername(), site.getGuid());
RestRequest request = RestRequest.simpleRequest(HttpMethod.DELETE, "people/{personId}/favorites/{favoriteId}", this.person.getUsername(), site.getGuid());
restWrapper.processEmptyModel(request);
return restWrapper;
}
@@ -379,7 +386,7 @@ public class People extends ModelRequest<People>
public RestNetworkModel getNetwork(UserModel tenant)
{
Utility.checkObjectIsInitialized(tenant.getDomain(), "tenant.getDomain()");
String personId = tenant.getUsername().contains("-me-@")? "-me-" : tenant.getUsername();
String personId = tenant.getUsername().contains("-me-@") ? "-me-" : tenant.getUsername();
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, "people/{personId}/networks/{networkId}?{parameters}", personId, tenant.getDomain(), restWrapper.getParameters());
return restWrapper.processModel(RestNetworkModel.class, request);
}
@@ -410,10 +417,9 @@ public class People extends ModelRequest<People>
RestRequest request = RestRequest.requestWithBody(HttpMethod.POST, newPerson.toJson(), "people");
return restWrapper.processModel(RestPersonModel.class, request);
}
/**
* Get people avatar image using GET call on '/people/{personId}/avatar Please note that it retries to get the
* renditions response several times because on the alfresco server the rendition can take a while to be created.
* Get people avatar image using GET call on '/people/{personId}/avatar Please note that it retries to get the renditions response several times because on the alfresco server the rendition can take a while to be created.
*/
public RestResponse downloadAvatarContent()
{
@@ -456,17 +462,8 @@ public class People extends ModelRequest<People>
return new WhereClause(this);
}
/**
* Construct the Where clause of getFavorites
* You can use the where parameter to restrict the list in the response to entries of a specific kind. The where parameter takes a value. The value is a
* single predicate that can include one or more EXISTS conditions. The EXISTS condition uses a single operand to limit the list to include entries that
* include that one property. The property values are:-
* target/file
* target/folder
* target/site
* Usage:
* where.. targetFileExist().or().targetSiteExist().filterAnd().getFavorites(...)
* At this point this method is working only with @link {@link RestFavoritesApi#getFavorites(UserModel) method.
/**
* Construct the Where clause of getFavorites You can use the where parameter to restrict the list in the response to entries of a specific kind. The where parameter takes a value. The value is a single predicate that can include one or more EXISTS conditions. The EXISTS condition uses a single operand to limit the list to include entries that include that one property. The property values are:- target/file target/folder target/site Usage: where.. targetFileExist().or().targetSiteExist().filterAnd().getFavorites(...) At this point this method is working only with @link {@link RestFavoritesApi#getFavorites(UserModel) method.
*
* @author paul.brodner
*/

View File

@@ -2,6 +2,11 @@ package org.alfresco.rest.favorites;
import java.util.List;
import org.hamcrest.Matchers;
import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.alfresco.dataprep.CMISUtil.DocumentType;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.model.RestErrorModel;
@@ -20,14 +25,11 @@ import org.alfresco.utility.model.TestGroup;
import org.alfresco.utility.model.UserModel;
import org.alfresco.utility.testrail.ExecutionType;
import org.alfresco.utility.testrail.annotation.TestRail;
import org.hamcrest.Matchers;
import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public class GetFavoritesTests extends RestTest
{
private static final String ALLOWABLE_OPERATIONS = "allowableOperations";
private static final String ASPECT_NAMES = "aspectNames";
private UserModel adminUserModel, userModel;
private SiteModel firstSiteModel;
private SiteModel secondSiteModel;
@@ -56,7 +58,7 @@ public class GetFavoritesTests extends RestTest
firstSiteUsers = dataUser.addUsersWithRolesToSite(firstSiteModel, UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer,
UserRole.SiteContributor);
secondSiteUsers = dataUser.addUsersWithRolesToSite(secondSiteModel, UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer,
UserRole.SiteContributor);
UserRole.SiteContributor);
restClient.authenticateUser(userModel);
restClient.withCoreAPI().usingUser(userModel).addSiteToFavorites(firstSiteModel);
@@ -64,9 +66,9 @@ public class GetFavoritesTests extends RestTest
restClient.withCoreAPI().usingUser(userModel).addSiteToFavorites(thirdSiteModel);
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.SANITY,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.SANITY,
description = "Verify Manager user gets favorites with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.SANITY })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.SANITY})
public void managerIsAbleToRetrieveFavorites()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteManager));
@@ -79,10 +81,10 @@ public class GetFavoritesTests extends RestTest
.assertThat().entriesListContains("targetGuid", secondSiteModel.getGuid());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.SANITY,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.SANITY,
description = "Verify user gets status code 401 if authentication call fails")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.SANITY })
// @Bug(id = "MNT-16904", description = "It fails only on environment with tenants")
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.SANITY})
// @Bug(id = "MNT-16904", description = "It fails only on environment with tenants")
public void userIsNotAbleToRetrieveFavoritesIfAuthenticationFails()
{
UserModel siteManager = firstSiteUsers.getOneUserWithRole(UserRole.SiteManager);
@@ -91,44 +93,44 @@ public class GetFavoritesTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.UNAUTHORIZED);
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify Admin user gets favorites sites with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void adminIsAbleToRetrieveFavoritesSites()
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addSiteToFavorites(firstSiteModel);
restClient.withCoreAPI().usingUser(adminUserModel).addSiteToFavorites(secondSiteModel);
userFavorites = restClient.withCoreAPI()
.usingAuthUser().where().targetSiteExist().getFavorites();
restClient.assertStatusCodeIs(HttpStatus.OK);
userFavorites.assertThat().entriesListContains("targetGuid", firstSiteModel.getGuid())
.and().entriesListContains("targetGuid", secondSiteModel.getGuid());
.and().entriesListContains("targetGuid", secondSiteModel.getGuid());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify Admin user gets favorites folders with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void adminIsAbleToRetrieveFavoritesFolders()
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addFolderToFavorites(firstFolderModel);
restClient.withCoreAPI().usingUser(adminUserModel).addFolderToFavorites(secondFolderModel);
userFavorites = restClient.withCoreAPI()
.usingAuthUser().where().targetFolderExist().getFavorites();
restClient.assertStatusCodeIs(HttpStatus.OK);
userFavorites.assertThat().entriesListContains("targetGuid", firstFolderModel.getNodeRef())
.and().entriesListContains("targetGuid", secondFolderModel.getNodeRef());
.and().entriesListContains("targetGuid", secondFolderModel.getNodeRef());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify Admin user gets favorites files with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void adminIsAbleToRetrieveFavoritesFiles()
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(adminUserModel).addFileToFavorites(firstFileModel);
restClient.withCoreAPI().usingUser(adminUserModel).addFileToFavorites(secondFileModel);
userFavorites = restClient.withCoreAPI()
.usingAuthUser().where().targetFileExist().getFavorites();
restClient.assertStatusCodeIs(HttpStatus.OK);
@@ -136,87 +138,87 @@ public class GetFavoritesTests extends RestTest
.and().entriesListContains("targetGuid", secondFileModel.getNodeRefWithoutVersion());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify Collaborator user gets favorites with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void collaboratorIsAbleToRetrieveFavorites()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator))
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(secondSiteModel);
userFavorites = restClient.withCoreAPI().usingAuthUser().getFavorites();
restClient.assertStatusCodeIs(HttpStatus.OK);
userFavorites.assertThat().entriesListContains("targetGuid", firstSiteModel.getGuid())
.and().entriesListContains("targetGuid", secondSiteModel.getGuid());
.and().entriesListContains("targetGuid", secondSiteModel.getGuid());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify Contributor user gets favorites with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void contributorIsAbleToRetrieveFavorites()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteContributor))
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(secondSiteModel);
userFavorites = restClient.withCoreAPI().usingAuthUser().getFavorites();
restClient.assertStatusCodeIs(HttpStatus.OK);
userFavorites.assertThat().entriesListContains("targetGuid", firstSiteModel.getGuid()).and()
.entriesListContains("targetGuid", secondSiteModel.getGuid());
.entriesListContains("targetGuid", secondSiteModel.getGuid());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify Consumer user gets favorites with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void consumerIsAbleToRetrieveFavorites()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer))
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
.withCoreAPI().usingAuthUser().addSiteToFavorites(firstSiteModel);
restClient.withCoreAPI().usingAuthUser().addSiteToFavorites(secondSiteModel);
userFavorites = restClient.withCoreAPI().usingAuthUser().getFavorites();
restClient.assertStatusCodeIs(HttpStatus.OK);
userFavorites.assertThat().entriesListContains("targetGuid", firstSiteModel.getGuid())
.assertThat().entriesListContains("targetGuid", secondSiteModel.getGuid());
.assertThat().entriesListContains("targetGuid", secondSiteModel.getGuid());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify user doesn't have permission to get favorites of another user with Rest API and status code is 404")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsNotAbleToRetrieveFavoritesOfAnotherUser()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer))
.withCoreAPI().usingUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator)).getFavorites();
.withCoreAPI().usingUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator)).getFavorites();
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND)
.assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator).getUsername()));
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify user doesn't have permission to get favorites of admin user with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsNotAbleToRetrieveFavoritesOfAdminUser()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer)).withCoreAPI()
.usingUser(adminUserModel).getFavorites();
.usingUser(adminUserModel).getFavorites();
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND)
.assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, adminUserModel.getUsername()));
.assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, adminUserModel.getUsername()));
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify admin user doesn't have permission to get favorites of another user with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void adminIsNotAbleToRetrieveFavoritesOfAnotherUser()
{
restClient.authenticateUser(adminUserModel).withCoreAPI().usingUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator))
.getFavorites();
.getFavorites();
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND)
.assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator).getUsername()));
.assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator).getUsername()));
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify User gets only favorites sites with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToRetrieveOnlyFavoritesSites()
{
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteManager));
@@ -232,9 +234,9 @@ public class GetFavoritesTests extends RestTest
.and().entriesListDoesNotContain("targetGuid", firstFolderModel.getNodeRef());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify User gets only favorites files with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToRetrieveOnlyFavoritesFiles()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -250,9 +252,9 @@ public class GetFavoritesTests extends RestTest
.and().entriesListDoesNotContain("targetGuid", firstFolderModel.getNodeRef());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify User gets only favorites folders with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToRetrieveOnlyFavoritesFolders()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -268,9 +270,9 @@ public class GetFavoritesTests extends RestTest
.and().entriesListDoesNotContain("targetGuid", firstFileModel.getNodeRefWithoutVersion());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify User gets only favorites files or folders with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToRetrieveFavoritesFilesOrFolders()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer));
@@ -289,9 +291,9 @@ public class GetFavoritesTests extends RestTest
.and().entriesListDoesNotContain("targetGuid", firstSiteModel.getGuid());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify User gets only favorites files or sites with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToRetrieveFavoritesFilesOrSites()
{
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteManager));
@@ -310,9 +312,9 @@ public class GetFavoritesTests extends RestTest
.and().entriesListDoesNotContain("targetGuid", firstFolderModel.getNodeRef());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify User gets only favorites folders or sites with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToRetrieveFavoritesFoldersOrSites()
{
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteManager));
@@ -331,9 +333,9 @@ public class GetFavoritesTests extends RestTest
.and().entriesListDoesNotContain("targetGuid", firstFileModel.getNodeRefWithoutVersion());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify User gets all favorites with Rest API and status code is 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToRetrieveAllFavorites()
{
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteCollaborator));
@@ -362,9 +364,9 @@ public class GetFavoritesTests extends RestTest
.and().entriesListDoesNotContain("targetGuid", secondFileModel.getNodeRefWithoutVersion());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify request for a user with no favorites returns status 200")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userHasNoFavorites()
{
restClient.authenticateUser(secondSiteUsers.getOneUserWithRole(UserRole.SiteContributor));
@@ -374,9 +376,9 @@ public class GetFavoritesTests extends RestTest
userFavorites.assertThat().entriesListIsEmpty().and().paginationField("totalItems").is("0");
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify request using invalid where parameter returns status 400")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void getFavoritesUsingInvalidWhereParameter()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteConsumer));
@@ -390,9 +392,9 @@ public class GetFavoritesTests extends RestTest
.assertLastError().containsSummary(String.format(RestErrorModel.INVALID_ARGUMENT, "WHERE query"));
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify User gets correct favorites after deleting a favorite")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void checkFavoriteFolderIsRemoved()
{
restClient.authenticateUser(firstSiteUsers.getOneUserWithRole(UserRole.SiteManager));
@@ -408,9 +410,9 @@ public class GetFavoritesTests extends RestTest
.and().paginationField("totalItems").is("2");
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify get favorites specifying -me- string in place of <personid> for request")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToGetFavoritesWhenUsingMeAsUsername()
{
userFavorites = restClient.authenticateUser(userModel).withCoreAPI().usingMe().getFavorites();
@@ -418,9 +420,9 @@ public class GetFavoritesTests extends RestTest
userFavorites.assertThat().entriesListContains("targetGuid", firstSiteModel.getGuid()).and().entriesListContains("targetGuid", secondSiteModel.getGuid());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify get favorites using empty for where parameter for request")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToGetFavoritesWhenUsingEmptyWhereParameter()
{
userFavorites = restClient.authenticateUser(adminUserModel).withCoreAPI().usingAuthUser().where().getFavorites();
@@ -428,27 +430,27 @@ public class GetFavoritesTests extends RestTest
.assertLastError().containsSummary(String.format(RestErrorModel.INVALID_ARGUMENT, "WHERE query"));
}
@TestRail(section = { TestGroup.REST_API,TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify that for invalid maxItems parameter status code returned is 400.")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void checkInvalidMaxItemsStatusCode()
{
restClient.authenticateUser(adminUserModel).withParams("maxItems=AB").withCoreAPI().usingUser(adminUserModel).getFavorites();
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary("Invalid paging parameter");
}
@TestRail(section = { TestGroup.REST_API,TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify that for invalid skipCount parameter status code returned is 400.")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void checkInvalidSkipCountStatusCode()
{
restClient.authenticateUser(adminUserModel).withParams("skipCount=AB").withCoreAPI().usingUser(adminUserModel).getFavorites();
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary("Invalid paging parameter");
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify get favorites when using invalid network id for non-tenant user")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void getFavoritesWhenNetworkIdIsInvalid()
{
UserModel networkUserModel = dataUser.createRandomTestUser();
@@ -457,9 +459,9 @@ public class GetFavoritesTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND).assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, networkUserModel.getUsername()));
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify get favorites using AND instead of OR in where parameter for request")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsNotAbleToGetFavoritesWhenUsingANDInWhereParameter()
{
userFavorites = restClient.withCoreAPI().usingAuthUser().where().targetFolderExist().invalidWhereParameter("AND").targetFileExist().getFavorites();
@@ -467,9 +469,9 @@ public class GetFavoritesTests extends RestTest
.assertLastError().containsSummary(String.format(RestErrorModel.INVALID_ARGUMENT, "WHERE query"));
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify get favorites using wrong name instead of EXISTS in where parameter for request")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsNotAbleToGetFavoritesWhenUsingWrongWhereParameter()
{
userFavorites = restClient.withCoreAPI().usingAuthUser().where().invalidWhereParameter("EXIST((target/site))").targetFileExist().getFavorites();
@@ -477,9 +479,9 @@ public class GetFavoritesTests extends RestTest
.assertLastError().containsSummary(String.format(RestErrorModel.INVALID_ARGUMENT, "WHERE query"));
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify get favorites except the first one for request")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToGetFavoritesExceptTheFirstOne()
{
userFavorites = restClient.authenticateUser(userModel).withParams("skipCount=1").withCoreAPI().usingUser(userModel).getFavorites();
@@ -490,9 +492,9 @@ public class GetFavoritesTests extends RestTest
.and().entriesListDoesNotContain("targetGuid", thirdSiteModel.getGuid());
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify get first two favorites sites")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToGetFirstTwoFavorites()
{
userFavorites = restClient.authenticateUser(userModel).withParams("maxItems=2").withCoreAPI().usingUser(userModel).getFavorites();
@@ -506,9 +508,9 @@ public class GetFavoritesTests extends RestTest
.and().field("count").is("2");
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify get favorites sites when using empty values for skipCount and maxItems")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToGetFavoritesWhenSkipCountAndMaxItemsAreEmpty()
{
restClient.authenticateUser(userModel).withParams("skipCount= ").withCoreAPI().usingUser(userModel).getFavorites();
@@ -518,9 +520,9 @@ public class GetFavoritesTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST).assertLastError().containsSummary(String.format(RestErrorModel.INVALID_MAXITEMS, " "));
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify the get favorites request for a high value for skipCount parameter")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToGetFavoritesWithHighSkipCount()
{
userFavorites = restClient.authenticateUser(userModel).withParams("skipCount=999999999").withCoreAPI().usingUser(userModel).getFavorites();
@@ -529,9 +531,9 @@ public class GetFavoritesTests extends RestTest
userFavorites.assertThat().entriesListIsEmpty().assertThat().paginationField("skipCount").is("999999999");
}
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION,
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify the get favorites request with properties parameter applied")
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void userIsAbleToGetFavoritesWithPropertiesParamApplied()
{
userFavorites = restClient.authenticateUser(userModel).withParams("properties=targetGuid").withCoreAPI().usingUser(userModel).getFavorites();
@@ -541,8 +543,8 @@ public class GetFavoritesTests extends RestTest
restPersonFavoritesModel.assertThat().field("targetGuid").is(thirdSiteModel.getGuid()).and().field("createdAt").isNull();
}
@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.REGRESSION, description = "Verify entry details for get favorites response with Rest API")
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION, description = "Verify entry details for get favorites response with Rest API")
public void checkResponseSchemaForGetFavorites()
{
userFavorites = restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser().getFavorites();
@@ -564,8 +566,7 @@ public class GetFavoritesTests extends RestTest
description = "Verify if get favorites response returns allowableOperations object when requested")
public void checkResponsesForGetFavoritesWithAllowableOperations()
{
final RestPersonFavoritesModelsCollection adminFavorites =
restClient.authenticateUser(adminUserModel).withCoreAPI().usingAuthUser().include(ALLOWABLE_OPERATIONS).getFavorites();
final RestPersonFavoritesModelsCollection adminFavorites = restClient.authenticateUser(adminUserModel).withCoreAPI().usingAuthUser().include(ALLOWABLE_OPERATIONS).getFavorites();
restClient.assertStatusCodeIs(HttpStatus.OK);
adminFavorites.getEntries().stream()
@@ -576,18 +577,30 @@ public class GetFavoritesTests extends RestTest
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify the get favorites request with properties parameter applied")
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
public void checkSearchResponseContainsIsFavoriteWhenRequested() throws InterruptedException {
public void checkSearchResponseContainsIsFavoriteWhenRequested() throws InterruptedException
{
final SearchRequest query = new SearchRequest();
final RestRequestQueryModel queryReq = new RestRequestQueryModel();
queryReq.setQuery(firstFileModel.getName());
query.setQuery(queryReq);
query.setInclude(List.of("isFavorite"));
Utility.sleep(500, 60000, () ->
{
restClient.authenticateUser(adminUserModel).withSearchAPI().search(query);
restClient.onResponse().assertThat().body("list.entries.entry[0].isFavorite", Matchers.notNullValue());
}
);
Utility.sleep(500, 60000, () -> {
restClient.authenticateUser(adminUserModel).withSearchAPI().search(query);
restClient.onResponse().assertThat().body("list.entries.entry[0].isFavorite", Matchers.notNullValue());
});
}
@Test(groups = {TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.FAVORITES}, executionType = ExecutionType.REGRESSION,
description = "Verify if get favorites response returns aspectNames when requested")
public void checkResponsesForGetFavoritesWithAspectNames()
{
final RestPersonFavoritesModelsCollection adminFavorites = restClient.authenticateUser(adminUserModel).withCoreAPI().usingAuthUser().include(ASPECT_NAMES).getFavorites();
restClient.assertStatusCodeIs(HttpStatus.OK);
adminFavorites.getEntries().stream()
.map(RestPersonFavoritesModel::onModel)
.forEach(m -> m.assertThat().field(ASPECT_NAMES).isNotEmpty());
}
}

View File

@@ -0,0 +1,380 @@
package org.alfresco.rest.nodes;
import static java.util.Objects.requireNonNull;
import static org.alfresco.utility.report.log.Step.STEP;
import java.io.IOException;
import java.io.InputStream;
import java.time.Duration;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.IntStream;
import org.apache.commons.lang3.RandomStringUtils;
import org.awaitility.Awaitility;
import org.awaitility.Durations;
import org.springframework.http.HttpStatus;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.alfresco.dataprep.CMISUtil.DocumentType;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.model.RestSizeDetailsModel;
import org.alfresco.utility.Utility;
import org.alfresco.utility.model.*;
import org.alfresco.utility.testrail.ExecutionType;
import org.alfresco.utility.testrail.annotation.TestRail;
public class NodeSizeDetailsTests extends RestTest
{
private UserModel user1;
private SiteModel siteModel;
private FolderModel folder;
private String jobId;
private FileModel sampleFileToCreate;
private long sampleFileSize;
@BeforeClass(alwaysRun = true)
public void dataPreparation() throws IOException
{
user1 = dataUser.createRandomTestUser("User-1");
siteModel = dataSite.usingUser(user1).createPublicRandomSite();
folder = dataContent.usingUser(user1).usingSite(siteModel).createFolder(FolderModel.getRandomFolderModel());
String fileName = "sampleLargeContent.txt";
final byte[] sampleFileContent = getSampleFileContent(fileName);
sampleFileSize = sampleFileContent.length;
sampleFileToCreate = new FileModel(fileName, FileType.TEXT_PLAIN, new String(sampleFileContent));
}
/**
* calculateNodeSizeForSingleFile testcase
*/
@TestRail(section = {TestGroup.REST_API, TestGroup.NODES}, executionType = ExecutionType.SANITY)
@Test(groups = {TestGroup.REST_API, TestGroup.NODES, TestGroup.SANITY})
public void calculateNodeSizeForSingleFile() throws Exception
{
STEP("1. Create a folder in the test site.");
folder = dataContent.usingUser(user1).usingSite(siteModel).createFolder(FolderModel.getRandomFolderModel());
STEP("2. Upload a text document to the folder.");
dataContent.usingUser(user1)
.usingSite(siteModel)
.usingResource(folder)
.createContent(sampleFileToCreate);
STEP("3. Wait for 30 seconds so that the content is indexed in Search Service.");
Utility.waitToLoopTime(30);
RestSizeDetailsModel restSizeDetailsModel = restClient.authenticateUser(user1).withCoreAPI().usingNode(folder).executeSizeDetails();
restClient.assertStatusCodeIs(HttpStatus.ACCEPTED);
restSizeDetailsModel.assertThat().field("jobId").isNotEmpty();
jobId = restSizeDetailsModel.getJobId();
STEP("4. Wait for 5 seconds for the processing to complete.");
Awaitility
.await()
.atMost(Duration.ofSeconds(5))
.pollInterval(Durations.ONE_SECOND)
.ignoreExceptions()
.untilAsserted(() -> {
RestSizeDetailsModel sizeDetailsModel = restClient.authenticateUser(user1)
.withCoreAPI()
.usingNode(folder)
.getSizeDetails(jobId);
restClient.assertStatusCodeIs(HttpStatus.OK);
sizeDetailsModel.assertThat()
.field("sizeInBytes")
.isNotEmpty();
Assert.assertEquals(sizeDetailsModel.getSizeInBytes(), sampleFileSize,
"Value of sizeInBytes " + sizeDetailsModel.getSizeInBytes()
+ " is not equal to " + sampleFileSize);
});
}
/**
* checkJobIdPresentInCache testcase
*/
@TestRail(section = {TestGroup.REST_API, TestGroup.NODES}, executionType = ExecutionType.SANITY)
@Test(groups = {TestGroup.REST_API, TestGroup.NODES, TestGroup.SANITY})
public void checkJobIdPresentInCache() throws Exception
{
STEP("1. Verifying that same JobId is coming or not");
RestSizeDetailsModel restSizeDetailsModel = restClient.authenticateUser(user1).withCoreAPI().usingNode(folder).executeSizeDetails();
restClient.assertStatusCodeIs(HttpStatus.ACCEPTED);
restSizeDetailsModel.assertThat().field("jobId").isNotEmpty();
Assert.assertEquals(restSizeDetailsModel.getJobId(), jobId, "jobId should be present in cache, actual :" + restSizeDetailsModel.getJobId() + " expected: " + jobId);
}
/**
* checkSizeDetailsWithInvalidJobId testcase
*/
@TestRail(section = {TestGroup.REST_API, TestGroup.NODES}, executionType = ExecutionType.SANITY)
@Test(groups = {TestGroup.REST_API, TestGroup.NODES, TestGroup.SANITY})
public void checkSizeDetailsWithInvalidJobId() throws Exception
{
STEP("1. Create a folder in the test site.");
folder = dataContent.usingUser(user1).usingSite(siteModel).createFolder(FolderModel.getRandomFolderModel());
STEP("2. Upload a text document to the folder.");
dataContent.usingUser(user1)
.usingSite(siteModel)
.usingResource(folder)
.createContent(sampleFileToCreate);
STEP("3. Wait for 30 seconds so that the content is indexed in Search Service.");
Utility.waitToLoopTime(30);
RestSizeDetailsModel restSizeDetailsModel = restClient.authenticateUser(user1).withCoreAPI().usingNode(folder).executeSizeDetails();
restClient.assertStatusCodeIs(HttpStatus.ACCEPTED);
restSizeDetailsModel.assertThat().field("jobId").isNotEmpty();
jobId = restSizeDetailsModel.getJobId();
STEP("4. Adding random content to jobId ");
jobId += RandomStringUtils.randomAlphanumeric(2);
STEP("5. Wait for 10 seconds for the processing to complete.");
Awaitility
.await()
.atMost(Duration.ofSeconds(10))
.pollInterval(Durations.ONE_SECOND)
.ignoreExceptions()
.untilAsserted(() -> {
restClient.authenticateUser(user1)
.withCoreAPI()
.usingNode(folder)
.getSizeDetails(jobId);
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND);
});
}
/**
* checkSizeDetailsWithoutExecuteSizeDetails testcase
*/
@TestRail(section = {TestGroup.REST_API, TestGroup.NODES}, executionType = ExecutionType.SANITY)
@Test(groups = {TestGroup.REST_API, TestGroup.NODES, TestGroup.SANITY})
public void checkSizeDetailsWithoutExecuteSizeDetails() throws Exception
{
STEP("1. Create a folder in the test site.");
folder = dataContent.usingUser(user1).usingSite(siteModel).createFolder(FolderModel.getRandomFolderModel());
STEP("2. Upload a text document to the folder.");
String status = "NOT_INITIATED";
FileModel fileModel = dataContent.usingUser(user1)
.usingSite(siteModel)
.usingResource(folder)
.createContent(sampleFileToCreate);
Assert.assertNotNull(fileModel, "fileModel should not be null");
STEP("3. Wait for 30 seconds so that the content is indexed in Search Service.");
Awaitility
.await()
.atMost(Duration.ofSeconds(30))
.pollInterval(Durations.ONE_SECOND)
.ignoreExceptions()
.untilAsserted(() -> {
RestSizeDetailsModel sizeDetailsModel = restClient.authenticateUser(user1)
.withCoreAPI()
.usingNode(folder)
.getSizeDetails(jobId);
restClient.assertStatusCodeIs(HttpStatus.OK);
sizeDetailsModel.assertThat().field("status").isNotEmpty();
Assert.assertEquals(sizeDetailsModel.getStatus().toString(), status, "Value of status should be same, actual :" + sizeDetailsModel.getStatus().toString() + " expected: " + status);
});
}
/**
* Unauthenticated user not able to execute POST /nodes/{nodeId}/size-details: 401 STATUS CODE
*/
@TestRail(section = {TestGroup.REST_API, TestGroup.NODES}, executionType = ExecutionType.SANITY)
@Test(groups = {TestGroup.REST_API, TestGroup.NODES, TestGroup.SANITY})
public void unauthenticatedUserIsNotAbleGetSizeDetails()
{
restClient.authenticateUser(new UserModel("random user", "random password"));
restClient.withCoreAPI().usingNode(folder).executeSizeDetails();
restClient.assertStatusCodeIs(HttpStatus.UNAUTHORIZED);
}
/**
* Node Id Not Exist: 404 STATUS CODE
*/
@TestRail(section = {TestGroup.REST_API, TestGroup.NODES}, executionType = ExecutionType.SANITY)
@Test(groups = {TestGroup.REST_API, TestGroup.NODES, TestGroup.SANITY})
public void nodeIdNotExist()
{
folder.setNodeRef(RandomStringUtils.randomAlphanumeric(20));
restClient.authenticateUser(user1).withCoreAPI().usingNode(folder).executeSizeDetails();
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND);
}
/**
* Value of nodeId is invalid: 422 STATUS CODE
*/
@TestRail(section = {TestGroup.REST_API, TestGroup.NODES}, executionType = ExecutionType.SANITY)
@Test(groups = {TestGroup.REST_API, TestGroup.NODES, TestGroup.SANITY})
public void nodeIdNotValid()
{
FileModel document = dataContent.usingSite(siteModel).usingUser(user1).createContent(DocumentType.TEXT_PLAIN);
restClient.authenticateUser(user1).withCoreAPI().usingNode(document).executeSizeDetails();
restClient.assertStatusCodeIs(HttpStatus.UNPROCESSABLE_ENTITY);
}
/**
*
* calculateNodeSizeForMultipleFiles testCase
*/
@TestRail(section = {TestGroup.REST_API, TestGroup.NODES}, executionType = ExecutionType.SANITY)
@Test(groups = {TestGroup.REST_API, TestGroup.NODES, TestGroup.SANITY})
public void calculateNodeSizeForMultipleFiles() throws InterruptedException
{
STEP("1. Create a parent folder in the test site.");
FolderModel folder = dataContent.usingUser(user1).usingSite(siteModel).createFolder(FolderModel.getRandomFolderModel());
STEP("2. Creating a 5 nested folders in the folder-1");
AtomicLong fileSize = new AtomicLong(0);
IntStream.rangeClosed(1, 5).forEach(i -> {
String folder0Name = "childFolder" + i + RandomStringUtils.randomAlphanumeric(2);
FolderModel folderModel = new FolderModel();
folderModel.setName(folder0Name);
FolderModel childFolder = dataContent.usingUser(user1)
.usingSite(siteModel)
.usingResource(folder)
.createFolder(folderModel);
STEP("3. Upload a text document to the childFolders.");
dataContent.usingUser(user1)
.usingSite(siteModel)
.usingResource(childFolder)
.createContent(sampleFileToCreate);
fileSize.addAndGet(sampleFileSize);
});
STEP("4. Wait for 30 seconds so that the content is indexed in Search Service.");
Utility.waitToLoopTime(30);
RestSizeDetailsModel restSizeDetailsModel = restClient
.authenticateUser(user1)
.withCoreAPI()
.usingNode(folder)
.executeSizeDetails();
restClient.assertStatusCodeIs(HttpStatus.ACCEPTED);
restSizeDetailsModel.assertThat().field("jobId").isNotEmpty();
String jobId = restSizeDetailsModel.getJobId();
STEP("5. Wait for 5 seconds for the processing to complete.");
Awaitility
.await()
.atMost(Duration.ofSeconds(5))
.pollInterval(Durations.ONE_SECOND)
.ignoreExceptions()
.untilAsserted(() -> {
RestSizeDetailsModel sizeDetailsModel = restClient.authenticateUser(user1)
.withCoreAPI()
.usingNode(folder)
.getSizeDetails(jobId);
restClient.assertStatusCodeIs(HttpStatus.OK);
sizeDetailsModel.assertThat()
.field("sizeInBytes")
.isNotEmpty();
Assert.assertEquals(sizeDetailsModel.getSizeInBytes(), fileSize.get(),
"Value of sizeInBytes " + sizeDetailsModel.getSizeInBytes()
+ " is not equal to " + fileSize.get());
});
}
/**
*
* checkNumberOfFiles testCase
*/
@TestRail(section = {TestGroup.REST_API, TestGroup.NODES}, executionType = ExecutionType.SANITY)
@Test(groups = {TestGroup.REST_API, TestGroup.NODES, TestGroup.SANITY})
public void checkNumberOfFiles() throws InterruptedException
{
STEP("1. Create a parent folder in the test site.");
FolderModel folder = dataContent.usingUser(user1).usingSite(siteModel).createFolder(FolderModel.getRandomFolderModel());
STEP("2. Creating a 10 nested folders in the folder-1");
IntStream.rangeClosed(1, 10).forEach(i -> {
String folder0Name = "childFolder" + i + RandomStringUtils.randomAlphanumeric(2);
FolderModel folderModel = new FolderModel();
folderModel.setName(folder0Name);
FolderModel childFolder = dataContent.usingUser(user1)
.usingSite(siteModel)
.usingResource(folder)
.createFolder(folderModel);
STEP("3. Upload a text document to the childFolders.");
dataContent.usingUser(user1)
.usingSite(siteModel)
.usingResource(childFolder)
.createContent(sampleFileToCreate);
});
STEP("4. Wait for 30 seconds so that the content is indexed in Search Service.");
Utility.waitToLoopTime(30);
RestSizeDetailsModel restSizeDetailsModel = restClient
.authenticateUser(user1)
.withCoreAPI()
.usingNode(folder)
.executeSizeDetails();
restClient.assertStatusCodeIs(HttpStatus.ACCEPTED);
restSizeDetailsModel.assertThat().field("jobId").isNotEmpty();
String jobId = restSizeDetailsModel.getJobId();
STEP("5. Wait for 10 seconds for the processing to complete.");
Awaitility
.await()
.atMost(Duration.ofSeconds(10))
.pollInterval(Durations.ONE_SECOND)
.ignoreExceptions()
.untilAsserted(() -> {
RestSizeDetailsModel sizeDetailsModel = restClient.authenticateUser(user1)
.withCoreAPI()
.usingNode(folder)
.getSizeDetails(jobId);
restClient.assertStatusCodeIs(HttpStatus.OK);
sizeDetailsModel.assertThat().field("numberOfFiles").isNotEmpty();
Assert.assertEquals(sizeDetailsModel.getNumberOfFiles(), 10, "Value of NumberOfFiles " + sizeDetailsModel.getNumberOfFiles() + " is not equal to " + 10);
});
}
private byte[] getSampleFileContent(String fileName) throws IOException
{
final String fileClasspathLocation = "/shared-resources/testdata/" + fileName;
try (InputStream fileStream = getClass().getResourceAsStream(fileClasspathLocation))
{
requireNonNull(fileStream, "Couldn't locate `" + fileClasspathLocation + "`");
return fileStream.readAllBytes();
}
}
@AfterClass(alwaysRun = true)
public void cleanup() throws Exception
{
dataSite.usingUser(user1).deleteSite(siteModel);
}
}

View File

@@ -1,5 +1,11 @@
package org.alfresco.rest.people.preferences;
import java.nio.file.Paths;
import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.model.RestErrorModel;
import org.alfresco.rest.model.RestPreferenceModel;
@@ -9,11 +15,6 @@ import org.alfresco.utility.model.*;
import org.alfresco.utility.report.Bug;
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.Test;
import java.nio.file.Paths;
public class GetPeoplePreferenceFullTests extends RestTest
{
@@ -29,53 +30,53 @@ public class GetPeoplePreferenceFullTests extends RestTest
dataSite.usingUser(userModel).usingSite(siteModel).addSiteToFavorites();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Check that properties parameter is applied")
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Check that properties parameter is applied")
public void propertiesParameterIsAppliedWhenRetrievingPreference() throws Exception
{
restPreferenceModel = restClient.authenticateUser(userModel).withParams("properties=id").withCoreAPI().usingUser(userModel)
.getPersonPreferenceInformation(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()));
restClient.assertStatusCodeIs(HttpStatus.OK);
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()))
.and().field("value").isNull();
.and().field("value").isNull();
restPreferenceModel = restClient.authenticateUser(userModel).withParams("properties=id,value").withCoreAPI().usingUser(userModel)
.getPersonPreferenceInformation(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()));
restClient.assertStatusCodeIs(HttpStatus.OK);
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()))
.and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Validate ID element in get site preference response")
.and().field("value").is("true");
}
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Validate ID element in get site preference response")
public void validateIdElementInGetSitePreferenceResponse() throws Exception
{
restPreferenceModel = restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()));
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()))
.and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Validate ID element in get folder preference response")
.and().field("value").is("true");
}
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Validate ID element in get folder preference response")
public void validateIdElementInGetFolderPreferenceResponse() throws Exception
{
FolderModel folderFavorite = new FolderModel("favoriteFolder");
folderFavorite = dataContent.usingSite(siteModel).createFolder(folderFavorite);
dataContent.getContentActions().setFolderAsFavorite(userModel.getUsername(), userModel.getPassword(), siteModel.getId(), folderFavorite.getName());
restPreferenceModel = restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(PreferenceName.FOLDERS_FAVORITES_PREFIX.toString());
restPreferenceModel.assertThat().field("id").is(PreferenceName.FOLDERS_FAVORITES_PREFIX)
.and().field("value").is(Utility.removeLastSlash(Utility.buildPath("workspace://SpacesStore", folderFavorite.getNodeRef())));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Validate ID element in get file preference response")
.and().field("value").is(Utility.removeLastSlash(Utility.buildPath("workspace://SpacesStore", folderFavorite.getNodeRef())));
}
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Validate ID element in get file preference response")
public void validateIdElementInGetFilePreferenceResponse() throws Exception
{
FileModel fileFavorite = new FileModel("favoriteFile", FileType.TEXT_PLAIN);
@@ -85,86 +86,86 @@ public class GetPeoplePreferenceFullTests extends RestTest
restPreferenceModel = restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(PreferenceName.DOCUMENTS_FAVORITES_PREFIX.toString());
restPreferenceModel.assertThat().field("id").is(PreferenceName.DOCUMENTS_FAVORITES_PREFIX)
.and().field("value").is(Utility.removeLastSlash(Utility.buildPath("workspace://SpacesStore", fileFavorite.getNodeRefWithoutVersion())));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Get preference of an user that has no preferences")
.and().field("value").is(Utility.removeLastSlash(Utility.buildPath("workspace://SpacesStore", fileFavorite.getNodeRefWithoutVersion())));
}
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Get preference of an user that has no preferences")
public void getPreferenceForUserWithoutPreferences() throws Exception
{
UserModel newUser = dataUser.createRandomTestUser();
restPreferenceModel = restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(PreferenceName.DOCUMENTS_FAVORITES_PREFIX.toString());
restClient.assertLastError().containsSummary(
String.format("The relationship resource was not found for the" + " entity with id: %s and a relationship id of %s", newUser.getUsername(),
PreferenceName.DOCUMENTS_FAVORITES_PREFIX.toString()));
restPreferenceModel = restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(PreferenceName.FOLDERS_FAVORITES_PREFIX.toString());
restClient.assertLastError().containsSummary(
String.format("The relationship resource was not found for the" + " entity with id: %s and a relationship id of %s", newUser.getUsername(),
PreferenceName.FOLDERS_FAVORITES_PREFIX.toString()));
restPreferenceModel = restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(PreferenceName.SITES_FAVORITES_PREFIX.toString());
restClient.assertLastError().containsSummary(
String.format("The relationship resource was not found for the" + " entity with id: %s and a relationship id of %s", newUser.getUsername(),
PreferenceName.SITES_FAVORITES_PREFIX.toString()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Change one preference for an user then perform get call")
}
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Change one preference for an user then perform get call")
@Bug(id = "REPO-1922")
public void changePreferenceThenPerformGetPreferenceCall() throws Exception
{
UserModel newUser = dataUser.createRandomTestUser();
SiteModel site = dataSite.usingUser(newUser).createPublicRandomSite();
dataSite.usingUser(newUser).usingSite(site).addSiteToFavorites();
FileModel fileFavorite = new FileModel("favoriteFile", FileType.TEXT_PLAIN);
fileFavorite = dataContent.usingSite(site).createContent(fileFavorite);
dataContent.getContentActions().setFileAsFavorite(newUser.getUsername(), newUser.getPassword(), site.getId(), String.format("%s.%s", fileFavorite.getName(), fileFavorite.getFileType().extension));
FolderModel folderFavorite = new FolderModel("favoriteFolder");
folderFavorite = dataContent.usingSite(site).createFolder(folderFavorite);
dataContent.getContentActions().setFolderAsFavorite(newUser.getUsername(), newUser.getPassword(), site.getId(), folderFavorite.getName());
dataSite.usingUser(newUser).usingSite(site).removeSiteFromFavorites();
dataContent.getContentActions().removeFavorite(newUser.getUsername(), newUser.getPassword(), site.getId(), folderFavorite.getName());
dataContent.getContentActions().removeFavorite(newUser.getUsername(), newUser.getPassword(), site.getId(), Paths.get(fileFavorite.getCmisLocation()).getFileName().toString());
restPreferenceModel = restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(PreferenceName.FOLDERS_FAVORITES_PREFIX.toString());
restClient.assertLastError().containsSummary(
String.format("The relationship resource was not found for the" + " entity with id: %s and a relationship id of %s", newUser.getUsername(),
PreferenceName.FOLDERS_FAVORITES_PREFIX.toString()));
restPreferenceModel = restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(PreferenceName.SITES_FAVORITES_PREFIX.toString());
restClient.assertLastError().containsSummary(
String.format("The relationship resource was not found for the" + " entity with id: %s and a relationship id of %s", newUser.getUsername(),
PreferenceName.SITES_FAVORITES_PREFIX.toString()));
restPreferenceModel = restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(PreferenceName.DOCUMENTS_FAVORITES_PREFIX.toString());
restClient.assertLastError().containsSummary(
String.format("The relationship resource was not found for the" + " entity with id: %s and a relationship id of %s", newUser.getUsername(),
PreferenceName.DOCUMENTS_FAVORITES_PREFIX.toString()));
restPreferenceModel = restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(PreferenceName.FOLDERS_FAVORITES_PREFIX.toString());
restClient.assertLastError().containsSummary(
String.format("The relationship resource was not found for the" + " entity with id: %s and a relationship id of %s", newUser.getUsername(),
PreferenceName.FOLDERS_FAVORITES_PREFIX.toString()));
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Verify admin is able to get preference of another user")
}
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Verify admin is able to get preference of another user")
public void adminIsAbleToGetOtherUserPreference() throws Exception
{
restPreferenceModel = restClient.authenticateUser(dataUser.getAdminUser()).withCoreAPI().usingUser(userModel)
@@ -172,18 +173,62 @@ public class GetPeoplePreferenceFullTests extends RestTest
restClient.assertStatusCodeIs(HttpStatus.OK);
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId())).and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.REGRESSION,
description = "Verify regular user is not able to get preference of admin user")
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Verify regular user is not able to get preference of admin user")
public void regularUserIsNotAbleToGetAdminPreference() throws Exception
{
SiteModel newSite = dataSite.usingUser(dataUser.getAdminUser()).createPublicRandomSite();
dataSite.usingUser(dataUser.getAdminUser()).usingSite(newSite).addSiteToFavorites();
restClient.authenticateUser(userModel).withCoreAPI().usingUser(dataUser.getAdminUser())
.getPersonPreferenceInformation(PreferenceName.SITES_FAVORITES_PREFIX + newSite.getId());
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);
restClient.assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED);
}
}
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Verify regular user is able to change own preferences")
public void regularUserIsAbleToChangeOwnPreference() throws Exception
{
var newUser = dataUser.createRandomTestUser();
var newSite = dataSite.usingUser(newUser).createPublicRandomSite();
var preferenceId = String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), newSite.getId());
var updatedPreferenceModel = new RestPreferenceModel();
updatedPreferenceModel.setId(preferenceId);
updatedPreferenceModel.setValue("");
dataSite.usingUser(newUser).usingSite(newSite).addSiteToFavorites();
restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(preferenceId);
restClient.assertStatusCodeIs(HttpStatus.OK);
restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser().updatePersonPreferenceInformation(preferenceId, updatedPreferenceModel);
restClient.assertStatusCodeIs(HttpStatus.OK);
var personPreferences = restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser().getPersonPreferences();
personPreferences.assertThat().entriesListDoesNotContain("id", preferenceId);
}
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.REGRESSION})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.REGRESSION,
description = "Verify admin is not able to change regular user preferences")
public void adminIsNotAbleToChangeRegularUserPreference() throws Exception
{
var newUser = dataUser.createRandomTestUser();
var newSite = dataSite.usingUser(newUser).createPublicRandomSite();
var preferenceId = String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), newSite.getId());
var updatedPreferenceModel = new RestPreferenceModel();
updatedPreferenceModel.setId(preferenceId);
updatedPreferenceModel.setValue("");
dataSite.usingUser(newUser).usingSite(newSite).addSiteToFavorites();
restClient.authenticateUser(newUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(preferenceId);
restClient.assertStatusCodeIs(HttpStatus.OK);
restClient.authenticateUser(dataUser.getAdminUser()).withCoreAPI().usingUser(newUser).updatePersonPreferenceInformation(preferenceId, updatedPreferenceModel);
restClient.assertStatusCodeIs(HttpStatus.NOT_FOUND);
}
}

View File

@@ -1,7 +1,10 @@
package org.alfresco.rest.people.preferences;
import org.springframework.http.HttpStatus;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.model.RestErrorModel;
import org.alfresco.rest.model.RestPreferenceModel;
import org.alfresco.utility.constants.PreferenceName;
import org.alfresco.utility.constants.UserRole;
@@ -10,9 +13,6 @@ import org.alfresco.utility.model.TestGroup;
import org.alfresco.utility.model.UserModel;
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.Test;
/**
* Tests for Get a Peference (/people/{personId}/preferences/{preferenceName}) RestAPI call
@@ -33,8 +33,8 @@ public class GetPeoplePreferenceSanityTests extends RestTest
siteModel = dataSite.usingUser(userModel).createPublicRandomSite();
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.SANITY, description = "Verify manager user gets a specific preference with Rest API and response is successful (200)")
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.SANITY, description = "Verify manager user gets a specific preference with Rest API and response is successful (200)")
public void managerUserGetsAPreferenceWithSuccess() throws Exception
{
UserModel managerUser = dataUser.usingAdmin().createRandomTestUser();
@@ -47,8 +47,8 @@ public class GetPeoplePreferenceSanityTests extends RestTest
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId())).and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets a specific preference with Rest API and response is successful (200)")
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets a specific preference with Rest API and response is successful (200)")
public void collaboratorUserGetsAPreferenceWithSuccess() throws Exception
{
UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser();
@@ -61,8 +61,24 @@ public class GetPeoplePreferenceSanityTests extends RestTest
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId())).and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets a specific preference with Rest API and response is successful (200)")
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets a specific preference with Rest API and response is successful (200)")
public void collaboratorUserUpdatesAPreferenceWithSuccess() throws Exception
{
UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser();
var updatedRestPreferenceModel = new RestPreferenceModel();
updatedRestPreferenceModel.setId("user.preference");
updatedRestPreferenceModel.setValue("user.value");
restPreferenceModel = restClient.authenticateUser(collaboratorUser).withCoreAPI().usingAuthUser()
.updatePersonPreferenceInformation(updatedRestPreferenceModel.getId(), updatedRestPreferenceModel);
restClient.assertStatusCodeIs(HttpStatus.OK);
restPreferenceModel.assertThat().field("id").is("user.preference").and().field("value").is("user.value");
}
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.SANITY, description = "Verify contributor user gets a specific preference with Rest API and response is successful (200)")
public void contributorUserGetsAPreferenceWithSuccess() throws Exception
{
UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser();
@@ -75,8 +91,8 @@ public class GetPeoplePreferenceSanityTests extends RestTest
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId())).and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE, TestGroup.PREFERENCES }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets a specific preference with Rest API and response is successful (200)")
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.SANITY, description = "Verify consumer user gets a specific preference with Rest API and response is successful (200)")
public void consumerUserGetsAPreferenceWithSuccess() throws Exception
{
UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser();
@@ -84,13 +100,13 @@ public class GetPeoplePreferenceSanityTests extends RestTest
dataSite.usingUser(consumerUser).usingSite(siteModel).addSiteToFavorites();
restPreferenceModel = restClient.authenticateUser(consumerUser).withCoreAPI().usingAuthUser()
.getPersonPreferenceInformation(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(),siteModel.getId()));
.getPersonPreferenceInformation(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId()));
restClient.assertStatusCodeIs(HttpStatus.OK);
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(),siteModel.getId())).and().field("value").is("true");
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId())).and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.SANITY, description = "Verify admin user gets a specific preference with Rest API and response is successful (200)")
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.SANITY, description = "Verify admin user gets a specific preference with Rest API and response is successful (200)")
public void adminUserGetsAPreferenceWithSuccess() throws Exception
{
UserModel adminUser = dataUser.getAdminUser();
@@ -102,9 +118,9 @@ public class GetPeoplePreferenceSanityTests extends RestTest
restPreferenceModel.assertThat().field("id").is(String.format(PreferenceName.SITES_FAVORITES_PREFIX.toString(), siteModel.getId())).and().field("value").is("true");
}
@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY })
@TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE,TestGroup.PREFERENCES }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to get a specific preference with Rest API when authentication fails (401)")
// @Bug(id = "MNT-16904", description = "fails only on environment with tenants")
@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES, TestGroup.SANITY})
@TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.PREFERENCES}, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to get a specific preference with Rest API when authentication fails (401)")
// @Bug(id = "MNT-16904", description = "fails only on environment with tenants")
public void managerUserNotAuthorizedFailsToGetsAPreference() throws Exception
{
UserModel managerUser = dataUser.usingAdmin().createRandomTestUser();

View File

@@ -0,0 +1,600 @@
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.
Sample text.

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.3.0.87-SNAPSHOT</version>
<version>25.1.0.16</version>
</parent>
<properties>
@@ -113,7 +113,7 @@
<dependency>
<groupId>org.owasp.encoder</groupId>
<artifactId>encoder</artifactId>
<version>1.2.3</version>
<version>1.3.1</version>
</dependency>
</dependencies>
@@ -140,7 +140,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.1</version>
<executions>
<execution>
<phase>validate</phase>

128
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.3.0.87-SNAPSHOT</version>
<version>25.1.0.16</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -23,8 +23,8 @@
</modules>
<properties>
<acs.version.major>23</acs.version.major>
<acs.version.minor>3</acs.version.minor>
<acs.version.major>25</acs.version.major>
<acs.version.minor>1</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,57 +51,58 @@
<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.5</dependency.alfresco-transform-core.version>
<dependency.alfresco-transform-service.version>4.1.5</dependency.alfresco-transform-service.version>
<dependency.alfresco-greenmail.version>7.0</dependency.alfresco-greenmail.version>
<dependency.acs-event-model.version>0.0.27</dependency.acs-event-model.version>
<dependency.acs-event-model.version>1.0.2</dependency.acs-event-model.version>
<dependency.aspectj.version>1.9.22.1</dependency.aspectj.version>
<dependency.spring.version>6.0.19</dependency.spring.version>
<dependency.spring-security.version>6.3.1</dependency.spring-security.version>
<dependency.spring.version>6.1.14</dependency.spring.version>
<dependency.spring-security.version>6.3.4</dependency.spring-security.version>
<dependency.antlr.version>3.5.3</dependency.antlr.version>
<dependency.jackson.version>2.15.2</dependency.jackson.version>
<dependency.jackson.version>2.17.2</dependency.jackson.version>
<dependency.cxf.version>4.0.5</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.78.1</dependency.bouncycastle.version>
<dependency.mockito-core.version>5.12.0</dependency.mockito-core.version>
<dependency.webscripts.version>9.4</dependency.webscripts.version>
<dependency.bouncycastle.version>1.79</dependency.bouncycastle.version>
<dependency.mockito-core.version>5.14.1</dependency.mockito-core.version>
<dependency.assertj.version>3.26.3</dependency.assertj.version>
<dependency.org-json.version>20231013</dependency.org-json.version>
<dependency.org-json.version>20240303</dependency.org-json.version>
<dependency.commons-dbcp.version>2.12.0</dependency.commons-dbcp.version>
<dependency.commons-io.version>2.16.1</dependency.commons-io.version>
<dependency.commons-io.version>2.18.0</dependency.commons-io.version>
<dependency.gson.version>2.11.0</dependency.gson.version>
<dependency.guava.version>33.2.1-jre</dependency.guava.version>
<dependency.guava.version>33.3.1-jre</dependency.guava.version>
<dependency.httpclient.version>4.5.14</dependency.httpclient.version>
<dependency.httpcore.version>4.4.16</dependency.httpcore.version>
<dependency.httpcomponents-httpclient5.version>5.2.1</dependency.httpcomponents-httpclient5.version>
<dependency.httpcomponents-httpcore5.version>5.2.5</dependency.httpcomponents-httpcore5.version>
<dependency.httpcomponents-httpclient5.version>5.4.1</dependency.httpcomponents-httpclient5.version>
<dependency.httpcomponents-httpcore5.version>5.3</dependency.httpcomponents-httpcore5.version>
<dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version>
<dependency.xercesImpl.version>2.12.2</dependency.xercesImpl.version>
<dependency.slf4j.version>2.0.13</dependency.slf4j.version>
<dependency.log4j.version>2.23.1</dependency.log4j.version>
<dependency.groovy.version>3.0.22</dependency.groovy.version>
<dependency.slf4j.version>2.0.16</dependency.slf4j.version>
<dependency.log4j.version>2.24.2</dependency.log4j.version>
<dependency.groovy.version>3.0.23</dependency.groovy.version>
<dependency.tika.version>2.9.2</dependency.tika.version>
<dependency.truezip.version>7.7.10</dependency.truezip.version>
<dependency.poi.version>5.2.5</dependency.poi.version>
<dependency.poi.version>5.3.0</dependency.poi.version>
<dependency.jboss.logging.version>3.5.0.Final</dependency.jboss.logging.version>
<dependency.camel.version>4.6.0</dependency.camel.version> <!-- when bumping this version, please keep track/sync with included netty.io dependencies -->
<dependency.netty.version>4.1.110.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.26.2</dependency.apache-compress.version>
<dependency.awaitility.version>4.2.1</dependency.awaitility.version>
<dependency.netty.version>4.1.113.Final</dependency.netty.version> <!-- must be in sync with camels transitive dependencies, e.g.: netty-common -->
<dependency.activemq.version>5.18.6</dependency.activemq.version>
<dependency.apache-compress.version>1.27.1</dependency.apache-compress.version>
<dependency.awaitility.version>4.2.2</dependency.awaitility.version>
<dependency.swagger-ui.version>4.1.3</dependency.swagger-ui.version>
<dependency.swagger-parser.version>1.0.71</dependency.swagger-parser.version>
<dependency.swagger-parser.version>1.0.72</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>
<dependency.jdom2.version>2.0.6.1</dependency.jdom2.version>
<dependency.pooled-jms.version>3.1.6</dependency.pooled-jms.version>
<dependency.kxml2.version>2.3.0</dependency.kxml2.version>
<dependency.jakarta-ee-jaxb-api.version>4.0.2</dependency.jakarta-ee-jaxb-api.version>
<dependency.jakarta-ee-jaxb-impl.version>4.0.5</dependency.jakarta-ee-jaxb-impl.version>
<dependency.jakarta-ws-api.version>3.0.1</dependency.jakarta-ws-api.version>
<dependency.jakarta-soap-api.version>2.0.1</dependency.jakarta-soap-api.version>
<dependency.jakarta-annotation-api.version>2.1.1</dependency.jakarta-annotation-api.version>
<dependency.jakarta-soap-api.version>3.0.2</dependency.jakarta-soap-api.version>
<dependency.jakarta-annotation-api.version>3.0.0</dependency.jakarta-annotation-api.version>
<dependency.jakarta-transaction-api.version>2.0.1</dependency.jakarta-transaction-api.version>
<dependency.jakarta-jws-api.version>3.0.0</dependency.jakarta-jws-api.version>
<dependency.jakarta-ee-mail.version>2.0.1</dependency.jakarta-ee-mail.version>
@@ -109,21 +110,24 @@
<dependency.jakarta-ee-jms.version>3.1.0</dependency.jakarta-ee-jms.version>
<dependency.java-ee-activation.version>1.2.0</dependency.java-ee-activation.version>
<dependency.jakarta-ee-json-api.version>2.1.3</dependency.jakarta-ee-json-api.version>
<dependency.jakarta-ee-json-impl.version>1.1.6</dependency.jakarta-ee-json-impl.version>
<dependency.jakarta-ee-json-impl.version>1.1.7</dependency.jakarta-ee-json-impl.version>
<dependency.jakarta-json-path.version>2.9.0</dependency.jakarta-json-path.version>
<dependency.json-smart.version>2.5.1</dependency.json-smart.version>
<alfresco.googledrive.version>4.1.0</alfresco.googledrive.version>
<alfresco.aos-module.version>3.1.0-A1</alfresco.aos-module.version>
<alfresco.api-explorer.version>23.2.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
<alfresco.aos-module.version>3.2.0</alfresco.aos-module.version>
<alfresco.api-explorer.version>23.4.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>
<license-maven-plugin.version>2.4.0</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.postgresql.version>42.7.4</dependency.postgresql.version>
<dependency.mysql.version>8.0.30</dependency.mysql.version>
<dependency.mysql-image.version>8</dependency.mysql-image.version>
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
<dependency.tas-utility.version>5.0.1</dependency.tas-utility.version>
<dependency.tas-utility.version>5.0.2</dependency.tas-utility.version>
<dependency.rest-assured.version>5.5.0</dependency.rest-assured.version>
<dependency.tas-email.version>2.0.0</dependency.tas-email.version>
<dependency.tas-webdav.version>1.21</dependency.tas-webdav.version>
@@ -151,7 +155,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>25.1.0.16</tag>
</scm>
<distributionManagement>
@@ -368,7 +372,7 @@
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.3.2</version>
<version>2.5.0</version>
<!-- exclude c3p0 -->
<!-- see https://issues.alfresco.com/jira/browse/REPO-3447 -->
<exclusions>
@@ -411,7 +415,7 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.17.0</version>
<version>1.17.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
@@ -462,7 +466,7 @@
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>5.2.1</version>
<version>5.2.2</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
@@ -573,7 +577,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
@@ -689,7 +693,7 @@
<dependency>
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</dependency>
<!-- upgrade dependency from TIKA -->
<dependency>
@@ -700,7 +704,7 @@
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator</artifactId>
<version>1.5.0</version>
<version>1.5.4</version>
</dependency>
<!-- upgrade dependency from TIKA -->
<dependency>
@@ -790,14 +794,14 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.12.5</version>
<version>2.13.0</version>
</dependency>
<!-- provided dependencies -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -947,7 +951,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
<version>1.18.36</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -1004,7 +1008,7 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.43.4</version>
<version>0.45.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
@@ -1012,7 +1016,7 @@
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<version>3.5.2</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
@@ -1020,12 +1024,12 @@
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.7.0</version>
<version>3.11.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -1035,7 +1039,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.7.1</version>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
@@ -1090,7 +1094,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.3.0</version>
<version>3.5.0</version>
<executions>
<execution>
<id>enforce-banned-dependencies</id>
@@ -1146,6 +1150,26 @@
</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>
@@ -1157,6 +1181,10 @@
<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.3.0.87-SNAPSHOT</version>
<version>25.1.0.16</version>
</parent>
<dependencies>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>3.0.3</version>
<version>4.0.3</version>
</dependency>
<!-- newer version, see REPO-3133 -->
<dependency>
@@ -119,7 +119,7 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>11.0.15</version>
<version>11.0.24</version>
<scope>test</scope>
<exclusions>
<exclusion>
@@ -137,7 +137,7 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>11.0.22</version>
<version>11.0.24</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@@ -25,15 +25,24 @@
*/
package org.alfresco.repo.web.scripts.content;
import static java.util.Optional.ofNullable;
import static java.util.function.Predicate.not;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jakarta.servlet.ServletContext;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.springframework.web.context.ServletContextAware;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.web.scripts.MimeTypeUtil;
import org.alfresco.service.cmr.dictionary.DictionaryService;
@@ -42,13 +51,6 @@ import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.webscripts.WebScriptException;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.springframework.web.context.ServletContextAware;
/**
* Content Retrieval Service
@@ -62,7 +64,7 @@ public class ContentGet extends StreamContent implements ServletContextAware
// Logger
@SuppressWarnings("unused")
private static final Log logger = LogFactory.getLog(ContentGet.class);
// Component dependencies
private ServletContext servletContext;
private DictionaryService dictionaryService;
@@ -72,18 +74,19 @@ public class ContentGet extends StreamContent implements ServletContextAware
private List<String> nonAttachContentTypes = Collections.emptyList();
/**
* @param nonAttachContentTypes List<String>
* @param nonAttachContentTypes
* List<String>
*/
public void setNonAttachContentTypes(List<String> nonAttachContentTypes)
{
if (nonAttachContentTypes != null && !nonAttachContentTypes.isEmpty())
{
this.nonAttachContentTypes = nonAttachContentTypes;
}
this.nonAttachContentTypes = ofNullable(nonAttachContentTypes)
.map(types -> types.stream().filter(not(String::isBlank)).toList())
.orElse(Collections.emptyList());
}
/**
* @param servletContext ServletContext
* @param servletContext
* ServletContext
*/
public void setServletContext(ServletContext servletContext)
{
@@ -91,23 +94,26 @@ public class ContentGet extends StreamContent implements ServletContextAware
}
/**
* @param dictionaryService DictionaryService
* @param dictionaryService
* DictionaryService
*/
public void setDictionaryService(DictionaryService dictionaryService)
{
this.dictionaryService = dictionaryService;
this.dictionaryService = dictionaryService;
}
/**
* @param namespaceService NamespaceService
* @param namespaceService
* NamespaceService
*/
public void setNamespaceService(NamespaceService namespaceService)
{
this.namespaceService = namespaceService;
this.namespaceService = namespaceService;
}
/**
* @param contentService ContentService
* @param contentService
* ContentService
*/
public void setContentService(ContentService contentService)
{
@@ -118,7 +124,7 @@ public class ContentGet extends StreamContent implements ServletContextAware
* @see org.springframework.extensions.webscripts.WebScript#execute(WebScriptRequest, WebScriptResponse)
*/
public void execute(WebScriptRequest req, WebScriptResponse res)
throws IOException
throws IOException
{
// create map of args
String[] names = req.getParameterNames();
@@ -127,10 +133,10 @@ public class ContentGet extends StreamContent implements ServletContextAware
{
args.put(name, req.getParameter(name));
}
// create map of template vars
Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();
// create object reference from url
ObjectReference reference = createObjectReferenceFromUrl(args, templateVars);
NodeRef nodeRef = reference.getNodeRef();
@@ -139,7 +145,6 @@ public class ContentGet extends StreamContent implements ServletContextAware
throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, "Unable to find " + reference.toString());
}
// render content
QName propertyQName = ContentModel.PROP_CONTENT;
String contentPart = templateVars.get("property");
@@ -186,7 +191,7 @@ public class ContentGet extends StreamContent implements ServletContextAware
if (attach && rfc5987Supported)
{
String name = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
// maintain the original name of the node during the download - do not modify it - see MNT-16510
streamContent(req, res, nodeRef, propertyQName, attach, name, model);
}
@@ -195,4 +200,4 @@ public class ContentGet extends StreamContent implements ServletContextAware
streamContent(req, res, nodeRef, propertyQName, attach, null, model);
}
}
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* 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
@@ -23,14 +23,17 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.api;
import org.alfresco.rest.api.model.Preference;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Paging;
public interface Preferences
{
public Preference getPreference(String personId, String preferenceName);
public CollectionWithPagingInfo<Preference> getPreferences(String personId, Paging paging);
}
package org.alfresco.rest.api;
import org.alfresco.rest.api.model.Preference;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Paging;
public interface Preferences
{
Preference getPreference(String personId, String preferenceName);
CollectionWithPagingInfo<Preference> getPreferences(String personId, Paging paging);
Preference updatePreference(String personId, Preference preference);
}

View File

@@ -0,0 +1,36 @@
/*
* #%L
* Alfresco Remote API
* %%
* 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.api;
import org.alfresco.repo.node.sizedetails.NodeSizeDetailsServiceImpl.NodeSizeDetails;
public interface SizeDetails
{
NodeSizeDetails generateNodeSizeDetailsRequest(String nodeId);
NodeSizeDetails getNodeSizeDetails(String nodeId, String jobId);
}

View File

@@ -85,7 +85,7 @@ public class AuditImpl implements Audit
// list of equals filter's auditEntry (via where clause)
private final static Set<String> LIST_AUDIT_ENTRY_EQUALS_QUERY_PROPERTIES = new HashSet<>(
Arrays.asList(new String[] { CREATED_BY_USER, VALUES_KEY, VALUES_VALUE }));
Arrays.asList(new String[]{CREATED_BY_USER, VALUES_KEY, VALUES_VALUE}));
// map of sort parameters for the moment one createdAt
private final static Map<String, String> SORT_PARAMS_TO_NAMES;
@@ -295,23 +295,29 @@ public class AuditImpl implements Audit
}
else
{
if (hasMoreItems) {
if (q != null) {
if (hasMoreItems)
{
if (q != null)
{
// filtering via "where" clause
AuditEntryQueryWalker propertyWalker = new AuditEntryQueryWalker();
QueryHelper.walk(q, propertyWalker);
totalItems = getAuditEntriesCountByAppAndProperties(auditApplication, propertyWalker);
} else {
}
else
{
totalItems = getAuditEntriesCountByApp(auditApplication);
}
} else {
}
else
{
totalItems = totalRetrievedItems;
}
}
entriesAudit = (skipCount >= totalRetrievedItems)
? Collections.emptyList()
: entriesAudit.subList(skipCount, end);
? Collections.emptyList()
: entriesAudit.subList(skipCount, end);
return CollectionWithPagingInfo.asPaged(paging, entriesAudit, hasMoreItems, totalItems);
}
@@ -475,8 +481,7 @@ public class AuditImpl implements Audit
final Map<String, UserInfo> mapUserInfo = new HashMap<>(10);
// create the callback for auditQuery method
final AuditQueryCallback callback = new AuditQueryCallback()
{
final AuditQueryCallback callback = new AuditQueryCallback() {
public boolean valuesRequired()
{
return ((includeParam != null) && (includeParam.contains(PARAM_INCLUDE_VALUES)));
@@ -532,7 +537,7 @@ public class AuditImpl implements Audit
params.setApplicationName(auditApplication.getName());
params.setFromId(auditEntryId);
params.setToId(auditEntryId + 1);
List<String> includeParam = new ArrayList<>();
if (parameters != null)
{
@@ -545,8 +550,7 @@ public class AuditImpl implements Audit
final List<AuditEntry> results = new ArrayList<>();
// create the callback for auditQuery method
final AuditQueryCallback callback = new AuditQueryCallback()
{
final AuditQueryCallback callback = new AuditQueryCallback() {
public boolean valuesRequired()
{
return ((includeParam != null) && (includeParam.contains(PARAM_INCLUDE_VALUES)));
@@ -710,8 +714,7 @@ public class AuditImpl implements Audit
@Override
public CollectionWithPagingInfo<AuditEntry> listAuditEntriesByNodeId(String nodeId, Parameters parameters)
{
AuthenticationUtil.runAs(new RunAsWork<Void>()
{
AuthenticationUtil.runAs(new RunAsWork<Void>() {
public Void doWork() throws Exception
{
checkEnabled();
@@ -772,8 +775,7 @@ public class AuditImpl implements Audit
final List<AuditEntry> results = new ArrayList<>();
String auditAppId = "alfresco-access";
String auditApplicationName = AuthenticationUtil.runAs(new RunAsWork<String>()
{
String auditApplicationName = AuthenticationUtil.runAs(new RunAsWork<String>() {
public String doWork() throws Exception
{
return findAuditAppByIdOr404(auditAppId).getName();
@@ -781,8 +783,7 @@ public class AuditImpl implements Audit
}, AuthenticationUtil.getSystemUserName());
// create the callback for auditQuery method
final AuditQueryCallback callback = new AuditQueryCallback()
{
final AuditQueryCallback callback = new AuditQueryCallback() {
public boolean valuesRequired()
{
return ((includeParam != null) && (includeParam.contains(PARAM_INCLUDE_VALUES)));
@@ -808,8 +809,7 @@ public class AuditImpl implements Audit
Long toTime = propertyWalker.getToTime();
validateWhereBetween(nodeRef.getId(), fromTime, toTime);
AuthenticationUtil.runAs(new RunAsWork<Object>()
{
AuthenticationUtil.runAs(new RunAsWork<Object>() {
public Object doWork() throws Exception
{
// QueryParameters
@@ -820,7 +820,7 @@ public class AuditImpl implements Audit
pathParams.setFromTime(fromTime);
pathParams.setToTime(toTime);
pathParams.setApplicationName(auditApplicationName);
pathParams.addSearchKey("/"+auditAppId+"/transaction/path", nodePath);
pathParams.addSearchKey("/" + auditAppId + "/transaction/path", nodePath);
auditService.auditQuery(callback, pathParams, limit);
AuditQueryParameters copyFromPathParams = new AuditQueryParameters();
@@ -830,7 +830,7 @@ public class AuditImpl implements Audit
copyFromPathParams.setFromTime(fromTime);
copyFromPathParams.setToTime(toTime);
copyFromPathParams.setApplicationName(auditApplicationName);
copyFromPathParams.addSearchKey("/"+auditAppId+"/transaction/copy/from/path", nodePath);
copyFromPathParams.addSearchKey("/" + auditAppId + "/transaction/copy/from/path", nodePath);
auditService.auditQuery(callback, copyFromPathParams, limit);
AuditQueryParameters moveFromPathParams = new AuditQueryParameters();
@@ -840,7 +840,7 @@ public class AuditImpl implements Audit
moveFromPathParams.setFromTime(fromTime);
moveFromPathParams.setToTime(toTime);
moveFromPathParams.setApplicationName(auditApplicationName);
moveFromPathParams.addSearchKey("/"+auditAppId+"/transaction/move/from/path", nodePath);
moveFromPathParams.addSearchKey("/" + auditAppId + "/transaction/move/from/path", nodePath);
auditService.auditQuery(callback, moveFromPathParams, limit);
return null;
@@ -857,7 +857,7 @@ public class AuditImpl implements Audit
public AuditEntriesByNodeIdQueryWalker()
{
super(new HashSet<>(Arrays.asList(new String[] { CREATED_BY_USER })), null);
super(new HashSet<>(Arrays.asList(new String[]{CREATED_BY_USER})), null);
}
@Override
@@ -904,19 +904,22 @@ public class AuditImpl implements Audit
public int getAuditEntriesCountByApp(AuditService.AuditApplication auditApplication)
{
final String applicationName = auditApplication.getKey().substring(1);
return auditService.getAuditEntriesCountByApp(applicationName);
}
public int getAuditEntriesCountByAppAndProperties(AuditService.AuditApplication auditApplication, AuditEntryQueryWalker propertyWalker)
{
final String applicationName = auditApplication.getKey().substring(1);
AuditQueryParameters parameters = new AuditQueryParameters();
parameters.setApplicationName(auditApplication.getName());
parameters.setApplicationName(applicationName);
parameters.setFromTime(propertyWalker.getFromTime());
parameters.setToTime(propertyWalker.getToTime());
parameters.setFromId(propertyWalker.getFromId());
parameters.setToId(propertyWalker.getToId());
parameters.setUser(propertyWalker.getCreatedByUser());
return auditService.getAuditEntriesCountByAppAndProperties(parameters);
return auditService.getAuditEntriesCountByAppAndProperties(applicationName, parameters);
}
}

View File

@@ -712,8 +712,7 @@ public class CustomModelsImpl implements CustomModels
boolean withForm = Boolean.valueOf(propName);
try
{
NodeRef nodeRef = customModelService.createDownloadNode(modelName, withForm);
nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, modelName + DownloadsImpl.DEFAULT_ARCHIVE_EXTENSION);
NodeRef nodeRef = customModelService.createDownloadNode(modelName, withForm, modelName + DownloadsImpl.DEFAULT_ARCHIVE_EXTENSION);
return new CustomModelDownload(nodeRef);
}
catch (Exception ex)

View File

@@ -1,460 +1,460 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2019 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.api.impl;
import static org.alfresco.rest.api.Nodes.PARAM_INCLUDE_ALLOWABLEOPERATIONS;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.query.PagingResults;
import org.alfresco.repo.favourites.PersonFavourite;
import org.alfresco.repo.site.SiteDoesNotExistException;
import org.alfresco.repo.site.SiteModel;
import org.alfresco.rest.api.Favourites;
import org.alfresco.rest.api.Nodes;
import org.alfresco.rest.api.People;
import org.alfresco.rest.api.Sites;
import org.alfresco.rest.api.model.Document;
import org.alfresco.rest.api.model.DocumentTarget;
import org.alfresco.rest.api.model.Favourite;
import org.alfresco.rest.api.model.Folder;
import org.alfresco.rest.api.model.FolderTarget;
import org.alfresco.rest.api.model.Node;
import org.alfresco.rest.api.model.PathInfo;
import org.alfresco.rest.api.model.Site;
import org.alfresco.rest.api.model.SiteTarget;
import org.alfresco.rest.api.model.Target;
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
import org.alfresco.rest.framework.core.exceptions.RelationshipResourceNotFoundException;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Paging;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rest.framework.resource.parameters.Params;
import org.alfresco.rest.framework.resource.parameters.SortColumn;
import org.alfresco.rest.framework.resource.parameters.where.QueryHelper;
import org.alfresco.rest.framework.resource.parameters.where.QueryHelper.WalkerCallbackAdapter;
import org.alfresco.service.cmr.favourites.FavouritesService;
import org.alfresco.service.cmr.favourites.FavouritesService.SortFields;
import org.alfresco.service.cmr.favourites.FavouritesService.Type;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Public REST API: Centralises access to favourites functionality and maps between representations repository and api representations.
*
* @author steveglover
* @since publicapi1.0
*/
public class FavouritesImpl implements Favourites
{
private static final Log logger = LogFactory.getLog(FavouritesImpl.class);
private static final List<String> ALLOWED_INCLUDES = List.of(PARAM_INCLUDE_PROPERTIES, PARAM_INCLUDE_ALLOWABLEOPERATIONS);
private People people;
private Sites sites;
private Nodes nodes;
private FavouritesService favouritesService;
private SiteService siteService;
private NamespaceService namespaceService;
// additional exclude properties for favourites as these can be already top-level properties
private static final List<QName> EXCLUDED_PROPS = Arrays.asList(
ContentModel.PROP_TITLE,
ContentModel.PROP_DESCRIPTION,
SiteModel.PROP_SITE_VISIBILITY,
SiteModel.PROP_SITE_PRESET
);
public void setPeople(People people)
{
this.people = people;
}
public void setSites(Sites sites)
{
this.sites = sites;
}
public void setNodes(Nodes nodes)
{
this.nodes = nodes;
}
public void setFavouritesService(FavouritesService favouritesService)
{
this.favouritesService = favouritesService;
}
public void setSiteService(SiteService siteService)
{
this.siteService = siteService;
}
public void setNamespaceService(NamespaceService namespaceService)
{
this.namespaceService = namespaceService;
}
private Target getTarget(PersonFavourite personFavourite, Parameters parameters)
{
Target target = null;
NodeRef nodeRef = personFavourite.getNodeRef();
Type type = personFavourite.getType();
if(type.equals(Type.FILE))
{
Document document = nodes.getDocument(nodeRef);
setPathInfo(document, parameters.getInclude());
target = new DocumentTarget(document);
}
else if(type.equals(Type.FOLDER))
{
Folder folder = nodes.getFolder(nodeRef);
setPathInfo(folder, parameters.getInclude());
target = new FolderTarget(folder);
}
else if(type.equals(Type.SITE))
{
SiteInfo siteInfo = siteService.getSite(nodeRef);
String role = sites.getSiteRole(siteInfo.getShortName());
Site site = new Site(siteInfo, role);
target = new SiteTarget(site);
}
else
{
throw new AlfrescoRuntimeException("Unexpected favourite target type: " + type);
}
return target;
}
private Favourite getFavourite(PersonFavourite personFavourite, Parameters parameters)
{
Favourite fav = new Favourite();
fav.setTargetGuid(personFavourite.getNodeRef().getId());
fav.setCreatedAt(personFavourite.getCreatedAt());
Target target = getTarget(personFavourite, parameters);
fav.setTarget(target);
// REPO-1147 allow retrieving additional properties
final List<String> paramsInclude = parameters.getInclude();
if (!Collections.disjoint(paramsInclude, ALLOWED_INCLUDES))
{
final List<String> includes = ALLOWED_INCLUDES.stream().filter(a -> paramsInclude.contains(a)).collect(Collectors.toList());
// get node representation with only properties included
Node node = nodes.getFolderOrDocument(personFavourite.getNodeRef(), null, null, includes, null);
// Create a map from node properties excluding properties already in this Favorite
Map<String, Object> filteredNodeProperties = filterProps(node.getProperties(), EXCLUDED_PROPS);
if(filteredNodeProperties.size() > 0 && paramsInclude.contains(PARAM_INCLUDE_PROPERTIES))
{
fav.setProperties(filteredNodeProperties);
}
final List<String> allowableOperations = node.getAllowableOperations();
if (CollectionUtils.isNotEmpty(allowableOperations) && paramsInclude.contains(PARAM_INCLUDE_ALLOWABLEOPERATIONS))
{
fav.setAllowableOperations(allowableOperations);
}
}
return fav;
}
private Map<String, Object> filterProps(Map<String, Object> properties, List<QName> toRemove)
{
Map<String, Object> filteredProps = properties == null ? new HashMap<>() : new HashMap<>(properties);
List<String> propsToRemove = toRemove.stream().map(e -> e.toPrefixString(namespaceService)).collect(Collectors.toList());
filteredProps.keySet().removeAll(propsToRemove);
return filteredProps;
}
private CollectionWithPagingInfo<Favourite> wrap(Paging paging, PagingResults<PersonFavourite> personFavourites, Parameters parameters)
{
final List<PersonFavourite> page = personFavourites.getPage();
final List<Favourite> list = new AbstractList<Favourite>()
{
@Override
public Favourite get(int index)
{
PersonFavourite personFavourite = page.get(index);
Favourite fav = getFavourite(personFavourite, parameters);
return fav;
}
@Override
public int size()
{
return page.size();
}
};
Pair<Integer, Integer> pair = personFavourites.getTotalResultCount();
Integer total = null;
if(pair.getFirst().equals(pair.getSecond()))
{
total = pair.getFirst();
}
return CollectionWithPagingInfo.asPaged(paging, list, personFavourites.hasMoreItems(), total);
}
@Override
public Favourite addFavourite(String personId, Favourite favourite)
{
Parameters parameters = getDefaultParameters(personId, null);
return addFavourite(personId, favourite, parameters);
}
@Override
public Favourite addFavourite(String personId, Favourite favourite, Parameters parameters)
{
Favourite ret = null;
personId = people.validatePerson(personId, true);
Target target = favourite.getTarget();
if(target == null)
{
throw new InvalidArgumentException("target is missing");
}
else if(target instanceof SiteTarget)
{
SiteTarget siteTarget = (SiteTarget)target;
String guid = siteTarget.getSite().getGuid();
SiteInfo siteInfo = sites.validateSite(new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, guid));
NodeRef siteNodeRef = siteInfo.getNodeRef();
String siteId = siteInfo.getShortName();
try
{
PersonFavourite personFavourite = favouritesService.addFavourite(personId, siteNodeRef);
ret = getFavourite(personFavourite, parameters);
}
catch(SiteDoesNotExistException e)
{
throw new RelationshipResourceNotFoundException(personId, siteId);
}
}
else if(target instanceof DocumentTarget)
{
DocumentTarget documentTarget = (DocumentTarget)target;
NodeRef nodeRef = documentTarget.getFile().getGuid();
if(!nodes.nodeMatches(nodeRef, Collections.singleton(ContentModel.TYPE_CONTENT), null))
{
throw new RelationshipResourceNotFoundException(personId, nodeRef.getId());
}
PersonFavourite personFavourite = favouritesService.addFavourite(personId, nodeRef);
ret = getFavourite(personFavourite, parameters);
}
else if(target instanceof FolderTarget)
{
FolderTarget folderTarget = (FolderTarget)target;
NodeRef nodeRef = folderTarget.getFolder().getGuid();
if(!nodes.nodeMatches(nodeRef, Collections.singleton(ContentModel.TYPE_FOLDER), Collections.singleton(SiteModel.TYPE_SITE)))
{
throw new RelationshipResourceNotFoundException(personId, nodeRef.getId());
}
PersonFavourite personFavourite = favouritesService.addFavourite(personId, nodeRef);
ret = getFavourite(personFavourite, parameters);
}
return ret;
}
@Override
public void removeFavourite(String personId, String id)
{
personId = people.validatePerson(personId, true);
NodeRef nodeRef = nodes.validateNode(id);
boolean exists = false;
Type type = favouritesService.getType(nodeRef);
if(type.equals(Type.SITE))
{
SiteInfo siteInfo = siteService.getSite(nodeRef);
if(siteInfo == null)
{
// shouldn't happen because the type implies it's a site
throw new AlfrescoRuntimeException("Unable to find site with nodeRef " + nodeRef);
}
exists = favouritesService.removeFavourite(personId, siteInfo.getNodeRef());
}
else if(type.equals(Type.FILE))
{
exists = favouritesService.removeFavourite(personId, nodeRef);
}
else if(type.equals(Type.FOLDER))
{
exists = favouritesService.removeFavourite(personId, nodeRef);
}
if(!exists)
{
throw new RelationshipResourceNotFoundException(personId, id);
}
}
@Override
public Favourite getFavourite(String personId, String favouriteId)
{
Parameters parameters = getDefaultParameters(personId, favouriteId);
return getFavourite(personId, favouriteId, parameters);
}
@Override
public Favourite getFavourite(String personId, String favouriteId, Parameters parameters)
{
NodeRef nodeRef = nodes.validateNode(favouriteId);
personId = people.validatePerson(personId, true);
PersonFavourite personFavourite = favouritesService.getFavourite(personId, nodeRef);
if(personFavourite != null)
{
Favourite favourite = getFavourite(personFavourite, parameters);
return favourite;
}
else
{
throw new RelationshipResourceNotFoundException(personId, favouriteId);
}
}
@Override
public CollectionWithPagingInfo<Favourite> getFavourites(String personId, final Parameters parameters)
{
personId = people.validatePerson(personId, true);
Paging paging = parameters.getPaging();
List<Pair<FavouritesService.SortFields, Boolean>> sortProps = getSortProps(parameters);
final Set<Type> filteredByClientQuery = new HashSet<Type>();
Set<Type> filterTypes = FavouritesService.Type.ALL_FILTER_TYPES; //Default all
// filterType is of the form 'target.<site|file|folder>'
QueryHelper.walk(parameters.getQuery(), new WalkerCallbackAdapter()
{
@Override
public void or() {
//OR is supported but exists() will be called for each EXISTS so we don't
//need to do anything here. If we don't override it then it will be assumed
//that OR in the grammar is not supported.
}
@Override
public void exists(String filteredByClient, boolean negated) {
if(filteredByClient != null)
{
int idx = filteredByClient.lastIndexOf("/");
if(idx == -1 || idx == filteredByClient.length())
{
throw new InvalidArgumentException();
}
else
{
String filtertype = filteredByClient.substring(idx + 1).toUpperCase();
filteredByClientQuery.add(Type.valueOf(filtertype));
}
}
}
});
if (filteredByClientQuery.size() > 0)
{
filterTypes = filteredByClientQuery;
}
final PagingResults<PersonFavourite> favourites = favouritesService.getPagedFavourites(personId, filterTypes, sortProps, Util.getPagingRequest(paging));
return wrap(paging, favourites, parameters);
}
private void setPathInfo(Node node, List<String> includeParam)
{
if (includeParam.contains(PARAM_INCLUDE_PATH))
{
PathInfo pathInfo = nodes.lookupPathInfo(node.getNodeRef(), null);
node.setPath(pathInfo);
}
}
/**
* Returns a {@code {@link Parameters} object where almost all of its values are null.
* the non-null value is the {@literal include} and whatever value is passed for {@code personId} and {@code favouriteId}
*/
private Parameters getDefaultParameters(String personId, String favouriteId)
{
Params.RecognizedParams recognizedParams = new Params.RecognizedParams(null, null, null, null, Collections.emptyList(), null, null, null,
false);
Parameters parameters = Params.valueOf(recognizedParams, personId, favouriteId, null);
return parameters;
}
private List<Pair<FavouritesService.SortFields, Boolean>> getSortProps(Parameters parameters)
{
List<Pair<FavouritesService.SortFields, Boolean>> sortProps = new ArrayList<>();
List<SortColumn> sortCols = parameters.getSorting();
if ((sortCols != null) && (sortCols.size() > 0))
{
for (SortColumn sortCol : sortCols)
{
SortFields sortField;
try
{
sortField = SortFields.valueOf(sortCol.column);
}
catch (Exception e)
{
throw new InvalidArgumentException("Invalid sort field: " + sortCol.column);
}
sortProps.add(new Pair<>(sortField, (sortCol.asc ? Boolean.TRUE : Boolean.FALSE)));
}
}
else
{
// default sort order
sortProps = FavouritesService.DEFAULT_SORT_PROPS;
}
return sortProps;
}
}
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2019 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.api.impl;
import static org.alfresco.rest.api.Nodes.PARAM_INCLUDE_ALLOWABLEOPERATIONS;
import static org.alfresco.rest.api.Nodes.PARAM_INCLUDE_ASPECTNAMES;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.query.PagingResults;
import org.alfresco.repo.favourites.PersonFavourite;
import org.alfresco.repo.site.SiteDoesNotExistException;
import org.alfresco.repo.site.SiteModel;
import org.alfresco.rest.api.Favourites;
import org.alfresco.rest.api.Nodes;
import org.alfresco.rest.api.People;
import org.alfresco.rest.api.Sites;
import org.alfresco.rest.api.model.Document;
import org.alfresco.rest.api.model.DocumentTarget;
import org.alfresco.rest.api.model.Favourite;
import org.alfresco.rest.api.model.Folder;
import org.alfresco.rest.api.model.FolderTarget;
import org.alfresco.rest.api.model.Node;
import org.alfresco.rest.api.model.PathInfo;
import org.alfresco.rest.api.model.Site;
import org.alfresco.rest.api.model.SiteTarget;
import org.alfresco.rest.api.model.Target;
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
import org.alfresco.rest.framework.core.exceptions.RelationshipResourceNotFoundException;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Paging;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rest.framework.resource.parameters.Params;
import org.alfresco.rest.framework.resource.parameters.SortColumn;
import org.alfresco.rest.framework.resource.parameters.where.QueryHelper;
import org.alfresco.rest.framework.resource.parameters.where.QueryHelper.WalkerCallbackAdapter;
import org.alfresco.service.cmr.favourites.FavouritesService;
import org.alfresco.service.cmr.favourites.FavouritesService.SortFields;
import org.alfresco.service.cmr.favourites.FavouritesService.Type;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
/**
* Public REST API: Centralises access to favourites functionality and maps between representations repository and api representations.
*
* @author steveglover
* @since publicapi1.0
*/
public class FavouritesImpl implements Favourites
{
private static final List<String> ALLOWED_INCLUDES = List.of(PARAM_INCLUDE_PROPERTIES, PARAM_INCLUDE_ASPECTNAMES, PARAM_INCLUDE_ALLOWABLEOPERATIONS);
private People people;
private Sites sites;
private Nodes nodes;
private FavouritesService favouritesService;
private SiteService siteService;
private NamespaceService namespaceService;
// additional exclude properties for favourites as these can be already top-level properties
private static final List<QName> EXCLUDED_PROPS = Arrays.asList(
ContentModel.PROP_TITLE,
ContentModel.PROP_DESCRIPTION,
SiteModel.PROP_SITE_VISIBILITY,
SiteModel.PROP_SITE_PRESET);
public void setPeople(People people)
{
this.people = people;
}
public void setSites(Sites sites)
{
this.sites = sites;
}
public void setNodes(Nodes nodes)
{
this.nodes = nodes;
}
public void setFavouritesService(FavouritesService favouritesService)
{
this.favouritesService = favouritesService;
}
public void setSiteService(SiteService siteService)
{
this.siteService = siteService;
}
public void setNamespaceService(NamespaceService namespaceService)
{
this.namespaceService = namespaceService;
}
private Target getTarget(PersonFavourite personFavourite, Parameters parameters)
{
Target target;
NodeRef nodeRef = personFavourite.getNodeRef();
Type type = personFavourite.getType();
if (type.equals(Type.FILE))
{
Document document = nodes.getDocument(nodeRef);
setPathInfo(document, parameters.getInclude());
target = new DocumentTarget(document);
}
else if (type.equals(Type.FOLDER))
{
Folder folder = nodes.getFolder(nodeRef);
setPathInfo(folder, parameters.getInclude());
target = new FolderTarget(folder);
}
else if (type.equals(Type.SITE))
{
SiteInfo siteInfo = siteService.getSite(nodeRef);
String role = sites.getSiteRole(siteInfo.getShortName());
Site site = new Site(siteInfo, role);
target = new SiteTarget(site);
}
else
{
throw new AlfrescoRuntimeException("Unexpected favourite target type: " + type);
}
return target;
}
private Favourite getFavourite(PersonFavourite personFavourite, Parameters parameters)
{
Favourite fav = new Favourite();
fav.setTargetGuid(personFavourite.getNodeRef().getId());
fav.setCreatedAt(personFavourite.getCreatedAt());
Target target = getTarget(personFavourite, parameters);
fav.setTarget(target);
// REPO-1147 allow retrieving additional properties
final List<String> paramsInclude = parameters.getInclude();
if (!Collections.disjoint(paramsInclude, ALLOWED_INCLUDES))
{
final List<String> includes = ALLOWED_INCLUDES.stream().filter(paramsInclude::contains).collect(Collectors.toList());
// get node representation with only properties included
Node node = nodes.getFolderOrDocument(personFavourite.getNodeRef(), null, null, includes, null);
// Create a map from node properties excluding properties already in this Favorite
Map<String, Object> filteredNodeProperties = filterProps(node.getProperties(), EXCLUDED_PROPS);
if (!filteredNodeProperties.isEmpty() && paramsInclude.contains(PARAM_INCLUDE_PROPERTIES))
{
fav.setProperties(filteredNodeProperties);
}
if (paramsInclude.contains(PARAM_INCLUDE_ASPECTNAMES))
{
fav.setAspectNames(node.getAspectNames());
}
final List<String> allowableOperations = node.getAllowableOperations();
if (CollectionUtils.isNotEmpty(allowableOperations) && paramsInclude.contains(PARAM_INCLUDE_ALLOWABLEOPERATIONS))
{
fav.setAllowableOperations(allowableOperations);
}
}
return fav;
}
private Map<String, Object> filterProps(Map<String, Object> properties, List<QName> toRemove)
{
Map<String, Object> filteredProps = properties == null ? new HashMap<>() : new HashMap<>(properties);
List<String> propsToRemove = toRemove.stream().map(e -> e.toPrefixString(namespaceService)).collect(Collectors.toList());
filteredProps.keySet().removeAll(propsToRemove);
return filteredProps;
}
private CollectionWithPagingInfo<Favourite> wrap(Paging paging, PagingResults<PersonFavourite> personFavourites, Parameters parameters)
{
final List<PersonFavourite> page = personFavourites.getPage();
final List<Favourite> list = new AbstractList<>() {
@Override
public Favourite get(int index)
{
PersonFavourite personFavourite = page.get(index);
Favourite fav = getFavourite(personFavourite, parameters);
return fav;
}
@Override
public int size()
{
return page.size();
}
};
Pair<Integer, Integer> pair = personFavourites.getTotalResultCount();
Integer total = null;
if (pair.getFirst().equals(pair.getSecond()))
{
total = pair.getFirst();
}
return CollectionWithPagingInfo.asPaged(paging, list, personFavourites.hasMoreItems(), total);
}
@Override
public Favourite addFavourite(String personId, Favourite favourite)
{
Parameters parameters = getDefaultParameters(personId, null);
return addFavourite(personId, favourite, parameters);
}
@Override
public Favourite addFavourite(String personId, Favourite favourite, Parameters parameters)
{
Favourite ret = null;
personId = people.validatePerson(personId, true);
Target target = favourite.getTarget();
if (target == null)
{
throw new InvalidArgumentException("target is missing");
}
else if (target instanceof SiteTarget)
{
SiteTarget siteTarget = (SiteTarget) target;
String guid = siteTarget.getSite().getGuid();
SiteInfo siteInfo = sites.validateSite(new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, guid));
NodeRef siteNodeRef = siteInfo.getNodeRef();
String siteId = siteInfo.getShortName();
try
{
PersonFavourite personFavourite = favouritesService.addFavourite(personId, siteNodeRef);
ret = getFavourite(personFavourite, parameters);
}
catch (SiteDoesNotExistException e)
{
throw new RelationshipResourceNotFoundException(personId, siteId);
}
}
else if (target instanceof DocumentTarget)
{
DocumentTarget documentTarget = (DocumentTarget) target;
NodeRef nodeRef = documentTarget.getFile().getGuid();
if (!nodes.nodeMatches(nodeRef, Collections.singleton(ContentModel.TYPE_CONTENT), null))
{
throw new RelationshipResourceNotFoundException(personId, nodeRef.getId());
}
PersonFavourite personFavourite = favouritesService.addFavourite(personId, nodeRef);
ret = getFavourite(personFavourite, parameters);
}
else if (target instanceof FolderTarget)
{
FolderTarget folderTarget = (FolderTarget) target;
NodeRef nodeRef = folderTarget.getFolder().getGuid();
if (!nodes.nodeMatches(nodeRef, Collections.singleton(ContentModel.TYPE_FOLDER), Collections.singleton(SiteModel.TYPE_SITE)))
{
throw new RelationshipResourceNotFoundException(personId, nodeRef.getId());
}
PersonFavourite personFavourite = favouritesService.addFavourite(personId, nodeRef);
ret = getFavourite(personFavourite, parameters);
}
return ret;
}
@Override
public void removeFavourite(String personId, String id)
{
personId = people.validatePerson(personId, true);
NodeRef nodeRef = nodes.validateNode(id);
boolean exists = false;
Type type = favouritesService.getType(nodeRef);
if (type.equals(Type.SITE))
{
SiteInfo siteInfo = siteService.getSite(nodeRef);
if (siteInfo == null)
{
// shouldn't happen because the type implies it's a site
throw new AlfrescoRuntimeException("Unable to find site with nodeRef " + nodeRef);
}
exists = favouritesService.removeFavourite(personId, siteInfo.getNodeRef());
}
else if (type.equals(Type.FILE))
{
exists = favouritesService.removeFavourite(personId, nodeRef);
}
else if (type.equals(Type.FOLDER))
{
exists = favouritesService.removeFavourite(personId, nodeRef);
}
if (!exists)
{
throw new RelationshipResourceNotFoundException(personId, id);
}
}
@Override
public Favourite getFavourite(String personId, String favouriteId)
{
Parameters parameters = getDefaultParameters(personId, favouriteId);
return getFavourite(personId, favouriteId, parameters);
}
@Override
public Favourite getFavourite(String personId, String favouriteId, Parameters parameters)
{
NodeRef nodeRef = nodes.validateNode(favouriteId);
personId = people.validatePerson(personId, true);
PersonFavourite personFavourite = favouritesService.getFavourite(personId, nodeRef);
if (personFavourite != null)
{
Favourite favourite = getFavourite(personFavourite, parameters);
return favourite;
}
else
{
throw new RelationshipResourceNotFoundException(personId, favouriteId);
}
}
@Override
public CollectionWithPagingInfo<Favourite> getFavourites(String personId, final Parameters parameters)
{
personId = people.validatePerson(personId, true);
Paging paging = parameters.getPaging();
List<Pair<FavouritesService.SortFields, Boolean>> sortProps = getSortProps(parameters);
final Set<Type> filteredByClientQuery = new HashSet<>();
Set<Type> filterTypes = FavouritesService.Type.ALL_FILTER_TYPES; // Default all
// filterType is of the form 'target.<site|file|folder>'
QueryHelper.walk(parameters.getQuery(), new WalkerCallbackAdapter() {
@Override
public void or()
{
// OR is supported but exists() will be called for each EXISTS so we don't
// need to do anything here. If we don't override it then it will be assumed
// that OR in the grammar is not supported.
}
@Override
public void exists(String filteredByClient, boolean negated)
{
if (filteredByClient != null)
{
int idx = filteredByClient.lastIndexOf('/');
if (idx == -1 || idx == filteredByClient.length())
{
throw new InvalidArgumentException();
}
else
{
String filtertype = filteredByClient.substring(idx + 1).toUpperCase();
filteredByClientQuery.add(Type.valueOf(filtertype));
}
}
}
});
if (!filteredByClientQuery.isEmpty())
{
filterTypes = filteredByClientQuery;
}
final PagingResults<PersonFavourite> favourites = favouritesService.getPagedFavourites(personId, filterTypes, sortProps, Util.getPagingRequest(paging));
return wrap(paging, favourites, parameters);
}
private void setPathInfo(Node node, List<String> includeParam)
{
if (includeParam.contains(PARAM_INCLUDE_PATH))
{
PathInfo pathInfo = nodes.lookupPathInfo(node.getNodeRef(), null);
node.setPath(pathInfo);
}
}
/**
* Returns a {@code {@link Parameters} object where almost all of its values are null. the non-null value is the {@literal include} and whatever value is passed for {@code personId} and {@code favouriteId}
*/
private Parameters getDefaultParameters(String personId, String favouriteId)
{
Params.RecognizedParams recognizedParams = new Params.RecognizedParams(null, null, null, null, Collections.emptyList(), null, null, null,
false);
Parameters parameters = Params.valueOf(recognizedParams, personId, favouriteId, null);
return parameters;
}
private List<Pair<FavouritesService.SortFields, Boolean>> getSortProps(Parameters parameters)
{
List<Pair<FavouritesService.SortFields, Boolean>> sortProps = new ArrayList<>();
List<SortColumn> sortCols = parameters.getSorting();
if (sortCols != null && !sortCols.isEmpty())
{
for (SortColumn sortCol : sortCols)
{
SortFields sortField;
try
{
sortField = SortFields.valueOf(sortCol.column);
}
catch (Exception e)
{
throw new InvalidArgumentException("Invalid sort field: " + sortCol.column);
}
sortProps.add(new Pair<>(sortField, sortCol.asc ? Boolean.TRUE : Boolean.FALSE));
}
}
else
{
// default sort order
sortProps = FavouritesService.DEFAULT_SORT_PROPS;
}
return sortProps;
}
}

View File

@@ -2401,6 +2401,8 @@ public class NodesImpl implements Nodes
NodePermissions nodePerms = nodeInfo.getPermissions();
if (nodePerms != null)
{
String siteManagerAuthority = getSiteManagerAuthority(nodeRef);
// Cannot set inherited permissions, only direct (locally set) permissions can be set
if ((nodePerms.getInherited() != null) && (nodePerms.getInherited().size() > 0))
{
@@ -2411,7 +2413,7 @@ public class NodesImpl implements Nodes
if (nodePerms.getIsInheritanceEnabled() != null)
{
// If inheritance flag is being disabled, the site manager needs to have permission
setSiteManagerPermission(nodeRef, nodePerms);
setSiteManagerPermission(nodeRef, nodePerms, siteManagerAuthority);
if (nodePerms.getIsInheritanceEnabled() != permissionService.getInheritParentPermissions(nodeRef))
{
@@ -2510,8 +2512,19 @@ public class NodesImpl implements Nodes
}
// remove any remaining direct perms
boolean isInheritanceEnabled = permissionService.getInheritParentPermissions(nodeRef);
for (AccessPermission accessPerm : directPerms)
{
// prevents deletion of site manager permissions when inheritance is disabled
boolean isSiteManagerAuthority = siteManagerAuthority != null && siteManagerAuthority.equals(accessPerm.getAuthority());
if (!isInheritanceEnabled && isSiteManagerAuthority)
{
if (logger.isDebugEnabled())
{
logger.debug("Site manager permissions will be kept since inheritance flag is disabled: " + nodeRef.getId());
}
continue;
}
permissionService.deletePermission(nodeRef, accessPerm.getAuthority(), accessPerm.getPermission());
}
}
@@ -2776,25 +2789,29 @@ public class NodesImpl implements Nodes
return updateExistingFile(null, nodeRef, fileName, contentInfo, stream, parameters, versionMajor, versionComment);
}
private void setSiteManagerPermission(NodeRef nodeRef, NodePermissions nodePerms)
private String getSiteManagerAuthority(NodeRef nodeRef) {
return AuthenticationUtil.runAsSystem(() -> {
SiteInfo containingSite = siteService.getSite(nodeRef);
if (containingSite != null)
{
String thisSiteGroupPrefix = siteService.getSiteGroup(containingSite.getShortName());
return thisSiteGroupPrefix + "_" + SiteModel.SITE_MANAGER;
}
return null;
});
}
private void setSiteManagerPermission(NodeRef nodeRef, NodePermissions nodePerms, String siteManagerAuthority)
{
if (nodeRef != null && nodePerms != null)
if (nodeRef != null && nodePerms != null && nodePerms.getIsInheritanceEnabled() != null && siteManagerAuthority != null)
{
try
{
if (nodePerms.getIsInheritanceEnabled() != null && !nodePerms.getIsInheritanceEnabled())
if (!nodePerms.getIsInheritanceEnabled())
{
SiteInfo containingSite = siteService.getSite(nodeRef);
if (containingSite != null)
{
String thisSiteGroupPrefix = siteService.getSiteGroup(containingSite.getShortName());
final String siteManagerAuthority = thisSiteGroupPrefix + "_" + SiteModel.SITE_MANAGER;
AuthenticationUtil.runAsSystem(() -> {
permissionService.setPermission(nodeRef, siteManagerAuthority, SiteModel.SITE_MANAGER, true);
return null;
});
}
permissionService.setPermission(nodeRef, siteManagerAuthority, SiteModel.SITE_MANAGER, true);
}
}
catch (Exception e)

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* 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
@@ -23,69 +23,92 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.api.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.query.PagingResults;
import org.alfresco.rest.api.People;
import org.alfresco.rest.api.Preferences;
import org.alfresco.rest.api.model.Preference;
import org.alfresco.rest.framework.core.exceptions.RelationshipResourceNotFoundException;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Paging;
import org.alfresco.service.cmr.preference.PreferenceService;
import org.alfresco.util.Pair;
/**
* Centralises access to preference services and maps between representations.
*
* @author steveglover
* @since publicapi1.0
*/
public class PreferencesImpl implements Preferences
{
private People people;
private PreferenceService preferenceService;
public void setPeople(People people)
{
this.people = people;
}
public void setPreferenceService(PreferenceService preferenceService)
{
this.preferenceService = preferenceService;
}
public Preference getPreference(String personId, String preferenceName)
{
personId = people.validatePerson(personId);
Serializable preferenceValue = preferenceService.getPreference(personId, preferenceName);
if(preferenceValue != null)
{
return new Preference(preferenceName, preferenceValue);
}
else
{
throw new RelationshipResourceNotFoundException(personId, preferenceName);
}
}
public CollectionWithPagingInfo<Preference> getPreferences(String personId, Paging paging)
{
personId = people.validatePerson(personId);
PagingResults<Pair<String, Serializable>> preferences = preferenceService.getPagedPreferences(personId, null, Util.getPagingRequest(paging));
List<Preference> ret = new ArrayList<Preference>(preferences.getPage().size());
for(Pair<String, Serializable> prefEntity : preferences.getPage())
{
Preference pref = new Preference(prefEntity.getFirst(), prefEntity.getSecond());
ret.add(pref);
}
return CollectionWithPagingInfo.asPaged(paging, ret, preferences.hasMoreItems(), preferences.getTotalResultCount().getFirst());
}
}
package org.alfresco.rest.api.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.alfresco.query.PagingResults;
import org.alfresco.rest.api.People;
import org.alfresco.rest.api.Preferences;
import org.alfresco.rest.api.model.Preference;
import org.alfresco.rest.framework.core.exceptions.RelationshipResourceNotFoundException;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Paging;
import org.alfresco.service.cmr.preference.PreferenceService;
import org.alfresco.util.Pair;
/**
* Centralises access to preference services and maps between representations.
*
* @author steveglover
* @since publicapi1.0
*/
public class PreferencesImpl implements Preferences
{
private People people;
private PreferenceService preferenceService;
public void setPeople(People people)
{
this.people = people;
}
public void setPreferenceService(PreferenceService preferenceService)
{
this.preferenceService = preferenceService;
}
@Override
public Preference getPreference(String personId, String preferenceName)
{
personId = people.validatePerson(personId);
Serializable preferenceValue = preferenceService.getPreference(personId, preferenceName);
if (preferenceValue != null)
{
return new Preference(preferenceName, preferenceValue);
}
else
{
throw new RelationshipResourceNotFoundException(personId, preferenceName);
}
}
@Override
public CollectionWithPagingInfo<Preference> getPreferences(String personId, Paging paging)
{
personId = people.validatePerson(personId);
PagingResults<Pair<String, Serializable>> preferences = preferenceService.getPagedPreferences(personId, null, Util.getPagingRequest(paging));
List<Preference> ret = new ArrayList<>(preferences.getPage().size());
for (Pair<String, Serializable> prefEntity : preferences.getPage())
{
Preference pref = new Preference(prefEntity.getFirst(), prefEntity.getSecond());
ret.add(pref);
}
return CollectionWithPagingInfo.asPaged(paging, ret, preferences.hasMoreItems(), preferences.getTotalResultCount().getFirst());
}
@Override
public Preference updatePreference(String personId, Preference preference)
{
personId = people.validatePerson(personId, true);
final Map<String, Serializable> preferencesToSet;
if (preference.getValue() == null || "".equals(preference.getValue()))
{
preferencesToSet = new HashMap<>(1);
preferencesToSet.put(preference.getName(), null);
}
else
{
preferencesToSet = Map.of(preference.getName(), preference.getValue());
}
preferenceService.setPreferences(personId, preferencesToSet);
return new Preference(preference.getName(), preferenceService.getPreference(personId, preference.getName()));
}
}

View File

@@ -0,0 +1,119 @@
/*
* #%L
* Alfresco Remote API
* %%
* 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.api.impl;
import java.util.Optional;
import org.springframework.beans.factory.InitializingBean;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.node.sizedetails.NodeSizeDetailsService;
import org.alfresco.repo.node.sizedetails.NodeSizeDetailsServiceImpl.NodeSizeDetails;
import org.alfresco.repo.node.sizedetails.NodeSizeDetailsServiceImpl.NodeSizeDetails.STATUS;
import org.alfresco.rest.api.Nodes;
import org.alfresco.rest.api.SizeDetails;
import org.alfresco.rest.framework.core.exceptions.InvalidNodeTypeException;
import org.alfresco.rest.framework.core.exceptions.NotFoundException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.util.GUID;
import org.alfresco.util.ParameterCheck;
public class SizeDetailsImpl implements SizeDetails, InitializingBean
{
private final Nodes nodes;
private final NodeSizeDetailsService nodeSizeDetailsService;
public SizeDetailsImpl(Nodes nodes, NodeSizeDetailsService nodeSizeDetailsService)
{
this.nodes = nodes;
this.nodeSizeDetailsService = nodeSizeDetailsService;
}
/**
* generateNodeSizeDetailsRequest : providing HTTP STATUS 202 with jobId.
*/
@Override
public NodeSizeDetails generateNodeSizeDetailsRequest(String nodeId)
{
NodeRef nodeRef = nodes.validateOrLookupNode(nodeId);
validateType(nodeRef);
Optional<NodeSizeDetails> nodeSizeDetails = nodeSizeDetailsService.getSizeDetails(nodeId);
String actionId = nodeSizeDetails.map(NodeSizeDetails::getJobId)
.orElseGet(() -> executeSizeDetails(nodeRef));
return new NodeSizeDetails(actionId);
}
/**
* getNodeSizeDetails : providing HTTP STATUS 200 with NodeSizeDetails data from cache.
*/
@Override
public NodeSizeDetails getNodeSizeDetails(final String nodeId, final String jobId)
{
NodeRef nodeRef = nodes.validateOrLookupNode(nodeId);
validateType(nodeRef);
Optional<NodeSizeDetails> optionalDetails = nodeSizeDetailsService.getSizeDetails(nodeId);
return optionalDetails.map(details -> {
String cachedJobId = details.getJobId();
if (cachedJobId != null && !jobId.equalsIgnoreCase(cachedJobId))
{
throw new NotFoundException("jobId does not exist");
}
return details;
})
.orElseGet(() -> new NodeSizeDetails(nodeId, STATUS.NOT_INITIATED));
}
/**
* Executing Asynchronously.
*/
private String executeSizeDetails(NodeRef nodeRef)
{
String jobId = GUID.generate();
NodeSizeDetails nodeSizeDetails = new NodeSizeDetails(nodeRef.getId(), jobId, STATUS.PENDING);
nodeSizeDetailsService.putSizeDetails(nodeRef.getId(), nodeSizeDetails);
nodeSizeDetailsService.invokeSizeDetailsExecutor(nodeRef, jobId);
return jobId;
}
private void validateType(NodeRef nodeRef) throws InvalidNodeTypeException
{
if (!nodes.isSubClass(nodeRef, ContentModel.TYPE_FOLDER, false))
{
throw new InvalidNodeTypeException("Node id " + nodeRef.getId() + " does not represent a folder.");
}
}
@Override
public void afterPropertiesSet() throws Exception
{
ParameterCheck.mandatory("nodes", this.nodes);
ParameterCheck.mandatory("nodeSizeDetailsServiceImpl", this.nodeSizeDetailsService);
}
}

View File

@@ -23,43 +23,65 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.api.model;
/**
* A document target favourite.
*
* @author steveglover
*
*/
public class DocumentTarget extends Target
{
private Document file;
public DocumentTarget()
{
super();
}
public DocumentTarget(Document file)
{
super();
this.file = file;
}
public void setDocument(Document file)
{
this.file = file;
}
public Document getFile()
{
return file;
}
@Override
public String toString()
{
return "DocumentTarget [file=" + file + "]";
}
}
package org.alfresco.rest.api.model;
import java.util.Objects;
/**
* A document target favourite.
*
* @author steveglover
*
*/
public class DocumentTarget extends Target
{
private Document file;
public DocumentTarget()
{
super();
}
public DocumentTarget(Document file)
{
super();
this.file = file;
}
public void setDocument(Document file)
{
this.file = file;
}
public Document getFile()
{
return file;
}
@Override
public String toString()
{
return "DocumentTarget [file=" + file + "]";
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
DocumentTarget that = (DocumentTarget) o;
return Objects.equals(file, that.file);
}
@Override
public int hashCode()
{
return Objects.hashCode(file);
}
}

View File

@@ -1,103 +1,144 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 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.api.model;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.alfresco.rest.framework.resource.UniqueId;
/**
* Representation of a favourite (document, folder, site, ...).
*
* @author steveglover
*
*/
public class Favourite
{
private String targetGuid;
private Date createdAt;
private Target target;
private Map<String, Object> properties;
private List<String> allowableOperations;
public Date getCreatedAt()
{
return createdAt;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
@UniqueId(name="targetGuid")
public String getTargetGuid()
{
return targetGuid;
}
public void setTargetGuid(String targetGuid)
{
this.targetGuid = targetGuid;
}
public Target getTarget()
{
return target;
}
public void setTarget(Target target)
{
this.target = target;
}
public Map<String, Object> getProperties()
{
return properties;
}
public void setProperties(Map<String, Object> properties)
{
this.properties = properties;
}
public List<String> getAllowableOperations() {
return allowableOperations;
}
public void setAllowableOperations(List<String> allowableOperations) {
this.allowableOperations = allowableOperations;
}
@Override
public String toString()
{
return "Favourite [targetGuid=" + targetGuid
+ ", createdAt=" + createdAt + ", target=" + target + ", properties=" + properties + "]";
}
}
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 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.api.model;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.alfresco.rest.framework.resource.UniqueId;
/**
* Representation of a favourite (document, folder, site, ...).
*
* @author steveglover
*
*/
public class Favourite
{
private String targetGuid;
private Date createdAt;
private Target target;
private Map<String, Object> properties;
private List<String> aspectNames;
private List<String> allowableOperations;
public Date getCreatedAt()
{
return createdAt;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
@UniqueId(name = "targetGuid")
public String getTargetGuid()
{
return targetGuid;
}
public void setTargetGuid(String targetGuid)
{
this.targetGuid = targetGuid;
}
public Target getTarget()
{
return target;
}
public void setTarget(Target target)
{
this.target = target;
}
public Map<String, Object> getProperties()
{
return properties;
}
public void setProperties(Map<String, Object> properties)
{
this.properties = properties;
}
public List<String> getAspectNames()
{
return aspectNames;
}
public void setAspectNames(List<String> aspectNames)
{
this.aspectNames = aspectNames;
}
public List<String> getAllowableOperations()
{
return allowableOperations;
}
public void setAllowableOperations(List<String> allowableOperations)
{
this.allowableOperations = allowableOperations;
}
@Override
public String toString()
{
return "Favourite{" +
"targetGuid='" + targetGuid + '\'' +
", createdAt=" + createdAt +
", target=" + target +
", properties=" + properties +
", aspectNames=" + aspectNames +
", allowableOperations=" + allowableOperations +
'}';
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
Favourite favourite = (Favourite) o;
return Objects.equals(targetGuid, favourite.targetGuid) && Objects.equals(createdAt, favourite.createdAt) && Objects.equals(target, favourite.target) && Objects.equals(properties, favourite.properties) && Objects.equals(aspectNames, favourite.aspectNames) && Objects.equals(allowableOperations, favourite.allowableOperations);
}
@Override
public int hashCode()
{
return Objects.hash(targetGuid, createdAt, target, properties, aspectNames, allowableOperations);
}
}

View File

@@ -0,0 +1,84 @@
/*
* #%L
* Alfresco Remote API
* %%
* 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.api.nodes;
import java.util.List;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.extensions.webscripts.Status;
import org.alfresco.repo.node.sizedetails.NodeSizeDetailsServiceImpl.NodeSizeDetails;
import org.alfresco.rest.api.SizeDetails;
import org.alfresco.rest.framework.WebApiDescription;
import org.alfresco.rest.framework.WebApiParam;
import org.alfresco.rest.framework.WebApiParameters;
import org.alfresco.rest.framework.core.ResourceParameter;
import org.alfresco.rest.framework.core.exceptions.RelationshipResourceNotFoundException;
import org.alfresco.rest.framework.resource.RelationshipResource;
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.util.ParameterCheck;
@RelationshipResource(name = "size-details", entityResource = NodesEntityResource.class, title = "Node Size Details")
public class NodeSizeDetailsRelation implements RelationshipResourceAction.ReadById<NodeSizeDetails>,
RelationshipResourceAction.Create<NodeSizeDetails>, InitializingBean
{
private SizeDetails sizeDetails;
public void setSizeDetails(SizeDetails sizeDetails)
{
this.sizeDetails = sizeDetails;
}
@Override
public void afterPropertiesSet()
{
ParameterCheck.mandatory("sizeDetails", this.sizeDetails);
}
@WebApiDescription(title = "Create node-size details request", successStatus = Status.STATUS_ACCEPTED)
@WebApiParam(name = "nodeSizeEntity", title = "Node Size Details Request",
description = "Request for processing Node Size.", kind = ResourceParameter.KIND.HTTP_BODY_OBJECT,
allowMultiple = false)
@Override
public List<NodeSizeDetails> create(String nodeId, List<NodeSizeDetails> nodeSizeEntity, Parameters parameters)
{
return List.of(sizeDetails.generateNodeSizeDetailsRequest(nodeId));
}
@WebApiDescription(title = "Get Node Size Details", description = "Get the Node Size Details")
@WebApiParameters({@WebApiParam(name = "nodeId", title = "The unique id of the Node being addressed",
description = "A single Node id"),
@WebApiParam(name = "jobId", title = "Job Id to get the NodeSizeDetails", description = "JobId")})
@Override
public NodeSizeDetails readById(String nodeId, String jobId, Parameters parameters)
throws RelationshipResourceNotFoundException
{
return sizeDetails.getNodeSizeDetails(nodeId, jobId);
}
}

View File

@@ -1,93 +1,105 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 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.api.people;
import org.alfresco.rest.api.Preferences;
import org.alfresco.rest.api.model.Preference;
import org.alfresco.rest.framework.WebApiDescription;
import org.alfresco.rest.framework.resource.RelationshipResource;
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.util.ParameterCheck;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
@RelationshipResource(name = "preferences", entityResource = PeopleEntityResource.class, title = "Person Preferences")
public class PersonPreferencesRelation implements RelationshipResourceAction.Read<Preference>, RelationshipResourceAction.ReadById<Preference>, InitializingBean
{
private static final Log logger = LogFactory.getLog(PersonPreferencesRelation.class);
private Preferences preferences;
public void setPreferences(Preferences preferences)
{
this.preferences = preferences;
}
@Override
public void afterPropertiesSet()
{
ParameterCheck.mandatory("preferences", this.preferences);
}
/**
* Returns a paged list of preferences for the user personId.
*
* If personId does not exist, NotFoundException (status 404).
*
* @see org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction.Read#readAll(java.lang.String, org.alfresco.rest.framework.resource.parameters.Parameters)
*/
@Override
@WebApiDescription(title = "A paged list of the persons preferences.")
public CollectionWithPagingInfo<Preference> readAll(String personId, Parameters parameters)
{
return preferences.getPreferences(personId, parameters.getPaging());
}
/**
* Returns information regarding the preference 'preferenceName' for user personId.
*
* If personId does not exist, NotFoundException (status 404).
*
* @see org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction.ReadById#readById(String, String, org.alfresco.rest.framework.resource.parameters.Parameters)
*/
@Override
@WebApiDescription(title = "Preference value for preference 'preferenceName' for person 'personId'.")
public Preference readById(String personId, String preferenceName, Parameters parameters)
{
// fix for REPO-855
String url = parameters.getRequest().getURL();
if(url.matches(".*workspace://SpacesStore/.*")){
preferenceName += url.substring(url.indexOf("//SpacesStore/"));
}
//
return preferences.getPreference(personId, preferenceName);
}
}
/*
* #%L
* Alfresco Remote API
* %%
* 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.api.people;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import org.alfresco.rest.api.Preferences;
import org.alfresco.rest.api.model.Preference;
import org.alfresco.rest.framework.WebApiDescription;
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
import org.alfresco.rest.framework.resource.RelationshipResource;
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.util.ParameterCheck;
@RelationshipResource(name = "preferences", entityResource = PeopleEntityResource.class, title = "Person Preferences")
public class PersonPreferencesRelation implements RelationshipResourceAction.Read<Preference>, RelationshipResourceAction.ReadById<Preference>, RelationshipResourceAction.Update<Preference>, InitializingBean
{
private static final Log logger = LogFactory.getLog(PersonPreferencesRelation.class);
private Preferences preferences;
public void setPreferences(Preferences preferences)
{
this.preferences = preferences;
}
@Override
public void afterPropertiesSet()
{
ParameterCheck.mandatory("preferences", this.preferences);
}
/**
* Returns a paged list of preferences for the user personId.
*
* If personId does not exist, NotFoundException (status 404).
*
* @see org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction.Read#readAll(java.lang.String, org.alfresco.rest.framework.resource.parameters.Parameters)
*/
@Override
@WebApiDescription(title = "A paged list of the persons preferences.")
public CollectionWithPagingInfo<Preference> readAll(String personId, Parameters parameters)
{
return preferences.getPreferences(personId, parameters.getPaging());
}
/**
* Returns information regarding the preference 'preferenceName' for user personId.
*
* If personId does not exist, NotFoundException (status 404).
*
* @see org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction.ReadById#readById(String, String, org.alfresco.rest.framework.resource.parameters.Parameters)
*/
@Override
@WebApiDescription(title = "Preference value for preference 'preferenceName' for person 'personId'.")
public Preference readById(String personId, String preferenceName, Parameters parameters)
{
// fix for REPO-855
String url = parameters.getRequest().getURL();
if (url.matches(".*workspace://SpacesStore/.*"))
{
preferenceName += url.substring(url.indexOf("//SpacesStore/"));
}
//
return preferences.getPreference(personId, preferenceName);
}
@Override
public Preference update(String personId, Preference preference, Parameters parameters)
{
if (preference.getName() == null || preference.getName().isBlank())
{
throw new InvalidArgumentException();
}
return preferences.updatePreference(personId, preference);
}
}

View File

@@ -110,22 +110,10 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
@Override
public Object execute() throws Throwable
{
try
{
final Params params = paramsExtractor.extractParams(resource.getMetaData(), req);
return AbstractResourceWebScript.this.execute(resource, params, res, isReadOnly);
}
catch (Exception e)
{
if (req instanceof BufferedRequest)
{
// Reset the request in case of a transaction retry
((BufferedRequest) req).reset();
}
// re-throw original exception for retry
throw e;
}
// Reset the request so that it can be read again in case of retry
resetRequest(req);
final Params params = paramsExtractor.extractParams(resource.getMetaData(), req);
return AbstractResourceWebScript.this.execute(resource, params, res, isReadOnly);
}
};
@@ -238,6 +226,15 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
}
}
protected void resetRequest(WebScriptRequest req)
{
if (req instanceof BufferedRequest)
{
BufferedRequest bufferedRequest = (BufferedRequest) req;
bufferedRequest.reset();
}
}
protected RetryingTransactionHelper getTransactionHelper(String api)
{
RetryingTransactionHelper transHelper = transactionService.getRetryingTransactionHelper();

View File

@@ -244,6 +244,10 @@ public class ResourceWebScriptGet extends AbstractResourceWebScript implements P
{
throw new DeletedResourceException("(GET) "+resource.getMetaData().getUniqueId());
}
if (!RelationshipResourceAction.ReadWithResponse.class.isAssignableFrom(resource.getResource().getClass()))
{
throw new UnsupportedResourceOperationException();
}
RelationshipResourceAction.ReadWithResponse<?> relationGetter = (RelationshipResourceAction.ReadWithResponse<?>) resource.getResource();
CollectionWithPagingInfo<?> relations = relationGetter.readAll(params.getEntityId(),params,withResponse);
return relations;

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* 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
@@ -30,6 +30,15 @@ import java.io.InputStream;
import java.util.Locale;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WrappingWebScriptRequest;
import org.springframework.extensions.webscripts.servlet.WebScriptServletRequest;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.rest.framework.core.ResourceLocator;
import org.alfresco.rest.framework.core.ResourceMetadata;
@@ -47,14 +56,7 @@ import org.alfresco.rest.framework.resource.parameters.Params;
import org.alfresco.rest.framework.resource.parameters.Params.RecognizedParams;
import org.alfresco.rest.framework.tools.RecognizedParamsExtractor;
import org.alfresco.rest.framework.tools.RequestReader;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WrappingWebScriptRequest;
import org.springframework.extensions.webscripts.servlet.WebScriptServletRequest;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
/**
* Handles the HTTP PUT for a Resource, equivalent to CRUD Update
*
@@ -64,15 +66,15 @@ public class ResourceWebScriptPut extends AbstractResourceWebScript implements P
RecognizedParamsExtractor, RequestReader
{
private static Log logger = LogFactory.getLog(ResourceWebScriptPut.class);
private static final Log logger = LogFactory.getLog(ResourceWebScriptPut.class);
public ResourceWebScriptPut()
{
super();
setHttpMethod(HttpMethod.PUT);
setParamsExtractor(this);
super();
setHttpMethod(HttpMethod.PUT);
setParamsExtractor(this);
}
@Override
public Params extractParams(ResourceMetadata resourceMeta, WebScriptRequest req)
{
@@ -86,81 +88,87 @@ public class ResourceWebScriptPut extends AbstractResourceWebScript implements P
switch (resourceMeta.getType())
{
case ENTITY:
if (StringUtils.isBlank(entityId))
{
throw new UnsupportedResourceOperationException("PUT is executed against the instance URL");
} else
{
case ENTITY:
if (StringUtils.isBlank(entityId))
{
throw new UnsupportedResourceOperationException("PUT is executed against the instance URL");
}
else
{
Object putEnt = extractJsonContent(req, assistant.getJsonHelper(), resourceMeta.getObjectType(operation));
return Params.valueOf(entityId,params,putEnt, req);
}
case RELATIONSHIP:
if (StringUtils.isBlank(relationshipId))
Object putEnt = extractJsonContent(req, assistant.getJsonHelper(), resourceMeta.getObjectType(operation));
return Params.valueOf(entityId, params, putEnt, req);
}
case RELATIONSHIP:
if (StringUtils.isBlank(relationshipId))
{
throw new UnsupportedResourceOperationException("PUT is executed against the instance URL");
}
Object putRel = extractJsonContent(req, assistant.getJsonHelper(), resourceMeta.getObjectType(operation));
if (StringUtils.isNotBlank(relationship2Id))
{
ResourceWebScriptHelper.setUniqueId(putRel, relationship2Id);
return Params.valueOf(false, entityId, relationshipId, relationship2Id,
putRel, null, null, params, null, req);
}
else
{
ResourceWebScriptHelper.setUniqueId(putRel, relationshipId);
return Params.valueOf(entityId, relationshipId, params, putRel, req);
}
case PROPERTY:
final String resourceName = resourceVars.get(ResourceLocator.RELATIONSHIP_RESOURCE);
final String propertyName = resourceVars.get(ResourceLocator.PROPERTY);
if (StringUtils.isNotBlank(entityId) && StringUtils.isNotBlank(resourceName))
{
if (StringUtils.isNotBlank(propertyName))
{
throw new UnsupportedResourceOperationException("PUT is executed against the instance URL");
}
Object putRel = extractJsonContent(req, assistant.getJsonHelper(), resourceMeta.getObjectType(operation));
if (StringUtils.isNotBlank(relationship2Id))
{
ResourceWebScriptHelper.setUniqueId(putRel, relationship2Id);
return Params.valueOf(false, entityId, relationshipId, relationship2Id,
putRel, null, null, params, null, req);
return Params.valueOf(entityId, relationshipId, null, getStream(req), propertyName, params, getContentInfo(req), req);
}
else
{
ResourceWebScriptHelper.setUniqueId(putRel,relationshipId);
return Params.valueOf(entityId, params, putRel, req);
return Params.valueOf(entityId, null, null, getStream(req), resourceName, params, getContentInfo(req), req);
}
case PROPERTY:
final String resourceName = resourceVars.get(ResourceLocator.RELATIONSHIP_RESOURCE);
final String propertyName = resourceVars.get(ResourceLocator.PROPERTY);
if (StringUtils.isNotBlank(entityId) && StringUtils.isNotBlank(resourceName))
{
if (StringUtils.isNotBlank(propertyName))
{
return Params.valueOf(entityId, relationshipId, null, getStream(req), propertyName, params, getContentInfo(req), req);
}
else
{
return Params.valueOf(entityId, null, null, getStream(req), resourceName, params, getContentInfo(req), req);
}
}
//Fall through to unsupported.
default:
throw new UnsupportedResourceOperationException("PUT not supported for this request.");
}
// Fall through to unsupported.
default:
throw new UnsupportedResourceOperationException("PUT not supported for this request.");
}
}
/**
/**
* Returns the basic content info from the request.
* @param req WebScriptRequest
*
* @param req
* WebScriptRequest
* @return BasicContentInfo
*/
private BasicContentInfo getContentInfo(WebScriptRequest req) {
String encoding = "UTF-8";
String contentType = MimetypeMap.MIMETYPE_BINARY;
if (StringUtils.isNotEmpty(req.getContentType()))
{
MediaType media = MediaType.parseMediaType(req.getContentType());
contentType = media.getType()+'/'+media.getSubtype();
if (media.getCharset() != null)
{
encoding = media.getCharset().toString();
}
}
private BasicContentInfo getContentInfo(WebScriptRequest req)
{
String encoding = "UTF-8";
String contentType = MimetypeMap.MIMETYPE_BINARY;
if (StringUtils.isNotEmpty(req.getContentType()))
{
MediaType media = MediaType.parseMediaType(req.getContentType());
contentType = media.getType() + '/' + media.getSubtype();
if (media.getCharset() != null)
{
encoding = media.getCharset().toString();
}
}
return new ContentInfoImpl(contentType, encoding, -1, Locale.getDefault());
}
}
/**
/**
* Returns the input stream for the request
* @param req WebScriptRequest
*
* @param req
* WebScriptRequest
* @return InputStream
*/
private InputStream getStream(WebScriptRequest req)
@@ -186,11 +194,14 @@ public class ResourceWebScriptPut extends AbstractResourceWebScript implements P
return null;
}
/**
* Executes the action on the resource
* @param resource ResourceWithMetadata
* @param params parameters to use
*
* @param resource
* ResourceWithMetadata
* @param params
* parameters to use
* @return anObject the result of the execute
*/
@Override
@@ -198,87 +209,87 @@ public class ResourceWebScriptPut extends AbstractResourceWebScript implements P
{
switch (resource.getMetaData().getType())
{
case ENTITY:
if (EntityResourceAction.Update.class.isAssignableFrom(resource.getResource().getClass()))
case ENTITY:
if (EntityResourceAction.Update.class.isAssignableFrom(resource.getResource().getClass()))
{
if (resource.getMetaData().isDeleted(EntityResourceAction.Update.class))
{
if (resource.getMetaData().isDeleted(EntityResourceAction.Update.class))
{
throw new DeletedResourceException("(UPDATE) "+resource.getMetaData().getUniqueId());
}
EntityResourceAction.Update<Object> updateEnt = (EntityResourceAction.Update<Object>) resource.getResource();
Object result = updateEnt.update(params.getEntityId(), params.getPassedIn(), params);
return result;
throw new DeletedResourceException("(UPDATE) " + resource.getMetaData().getUniqueId());
}
else
EntityResourceAction.Update<Object> updateEnt = (EntityResourceAction.Update<Object>) resource.getResource();
Object result = updateEnt.update(params.getEntityId(), params.getPassedIn(), params);
return result;
}
else
{
if (resource.getMetaData().isDeleted(EntityResourceAction.UpdateWithResponse.class))
{
if (resource.getMetaData().isDeleted(EntityResourceAction.UpdateWithResponse.class))
{
throw new DeletedResourceException("(UPDATE) "+resource.getMetaData().getUniqueId());
}
EntityResourceAction.UpdateWithResponse<Object> updateEnt = (EntityResourceAction.UpdateWithResponse<Object>) resource.getResource();
Object result = updateEnt.update(params.getEntityId(), params.getPassedIn(), params, withResponse);
return result;
throw new DeletedResourceException("(UPDATE) " + resource.getMetaData().getUniqueId());
}
case RELATIONSHIP:
if (RelationshipResourceAction.UpdateWithResponse.class.isAssignableFrom(resource.getResource().getClass()))
EntityResourceAction.UpdateWithResponse<Object> updateEnt = (EntityResourceAction.UpdateWithResponse<Object>) resource.getResource();
Object result = updateEnt.update(params.getEntityId(), params.getPassedIn(), params, withResponse);
return result;
}
case RELATIONSHIP:
if (RelationshipResourceAction.UpdateWithResponse.class.isAssignableFrom(resource.getResource().getClass()))
{
if (resource.getMetaData().isDeleted(RelationshipResourceAction.UpdateWithResponse.class))
{
if (resource.getMetaData().isDeleted(RelationshipResourceAction.UpdateWithResponse.class))
{
throw new DeletedResourceException("(UPDATE) "+resource.getMetaData().getUniqueId());
}
RelationshipResourceAction.UpdateWithResponse<Object> relationUpdater = (RelationshipResourceAction.UpdateWithResponse<Object>) resource.getResource();
Object relResult = relationUpdater.update(params.getEntityId(), params.getPassedIn(), params, withResponse);
return relResult;
throw new DeletedResourceException("(UPDATE) " + resource.getMetaData().getUniqueId());
}
else
RelationshipResourceAction.UpdateWithResponse<Object> relationUpdater = (RelationshipResourceAction.UpdateWithResponse<Object>) resource.getResource();
Object relResult = relationUpdater.update(params.getEntityId(), params.getPassedIn(), params, withResponse);
return relResult;
}
else
{
if (resource.getMetaData().isDeleted(RelationshipResourceAction.Update.class))
{
if (resource.getMetaData().isDeleted(RelationshipResourceAction.Update.class))
{
throw new DeletedResourceException("(UPDATE) "+resource.getMetaData().getUniqueId());
}
RelationshipResourceAction.Update<Object> relationUpdater = (RelationshipResourceAction.Update<Object>) resource.getResource();
Object relResult = relationUpdater.update(params.getEntityId(), params.getPassedIn(), params);
return relResult;
throw new DeletedResourceException("(UPDATE) " + resource.getMetaData().getUniqueId());
}
case PROPERTY:
if (BinaryResourceAction.Update.class.isAssignableFrom(resource.getResource().getClass()))
RelationshipResourceAction.Update<Object> relationUpdater = (RelationshipResourceAction.Update<Object>) resource.getResource();
Object relResult = relationUpdater.update(params.getEntityId(), params.getPassedIn(), params);
return relResult;
}
case PROPERTY:
if (BinaryResourceAction.Update.class.isAssignableFrom(resource.getResource().getClass()))
{
if (resource.getMetaData().isDeleted(BinaryResourceAction.Update.class))
{
if (resource.getMetaData().isDeleted(BinaryResourceAction.Update.class))
{
throw new DeletedResourceException("(UPDATE) "+resource.getMetaData().getUniqueId());
}
BinaryResourceAction.Update<Object> binUpdater = (BinaryResourceAction.Update<Object>) resource.getResource();
return binUpdater.updateProperty(params.getEntityId(), params.getContentInfo(), params.getStream(), params);
throw new DeletedResourceException("(UPDATE) " + resource.getMetaData().getUniqueId());
}
if (BinaryResourceAction.UpdateWithResponse.class.isAssignableFrom(resource.getResource().getClass()))
BinaryResourceAction.Update<Object> binUpdater = (BinaryResourceAction.Update<Object>) resource.getResource();
return binUpdater.updateProperty(params.getEntityId(), params.getContentInfo(), params.getStream(), params);
}
if (BinaryResourceAction.UpdateWithResponse.class.isAssignableFrom(resource.getResource().getClass()))
{
if (resource.getMetaData().isDeleted(BinaryResourceAction.UpdateWithResponse.class))
{
if (resource.getMetaData().isDeleted(BinaryResourceAction.UpdateWithResponse.class))
{
throw new DeletedResourceException("(UPDATE) "+resource.getMetaData().getUniqueId());
}
BinaryResourceAction.UpdateWithResponse<Object> binUpdater = (BinaryResourceAction.UpdateWithResponse<Object>) resource.getResource();
return binUpdater.updateProperty(params.getEntityId(), params.getContentInfo(), params.getStream(), params, withResponse);
throw new DeletedResourceException("(UPDATE) " + resource.getMetaData().getUniqueId());
}
if (RelationshipResourceBinaryAction.Update.class.isAssignableFrom(resource.getResource().getClass()))
BinaryResourceAction.UpdateWithResponse<Object> binUpdater = (BinaryResourceAction.UpdateWithResponse<Object>) resource.getResource();
return binUpdater.updateProperty(params.getEntityId(), params.getContentInfo(), params.getStream(), params, withResponse);
}
if (RelationshipResourceBinaryAction.Update.class.isAssignableFrom(resource.getResource().getClass()))
{
if (resource.getMetaData().isDeleted(RelationshipResourceBinaryAction.Update.class))
{
if (resource.getMetaData().isDeleted(RelationshipResourceBinaryAction.Update.class))
{
throw new DeletedResourceException("(UPDATE) "+resource.getMetaData().getUniqueId());
}
RelationshipResourceBinaryAction.Update<Object> binUpdater = (RelationshipResourceBinaryAction.Update<Object>) resource.getResource();
return binUpdater.updateProperty(params.getEntityId(), params.getRelationshipId(), params.getContentInfo(), params.getStream(), params);
throw new DeletedResourceException("(UPDATE) " + resource.getMetaData().getUniqueId());
}
if (RelationshipResourceBinaryAction.UpdateWithResponse.class.isAssignableFrom(resource.getResource().getClass()))
RelationshipResourceBinaryAction.Update<Object> binUpdater = (RelationshipResourceBinaryAction.Update<Object>) resource.getResource();
return binUpdater.updateProperty(params.getEntityId(), params.getRelationshipId(), params.getContentInfo(), params.getStream(), params);
}
if (RelationshipResourceBinaryAction.UpdateWithResponse.class.isAssignableFrom(resource.getResource().getClass()))
{
if (resource.getMetaData().isDeleted(RelationshipResourceBinaryAction.UpdateWithResponse.class))
{
if (resource.getMetaData().isDeleted(RelationshipResourceBinaryAction.UpdateWithResponse.class))
{
throw new DeletedResourceException("(UPDATE) "+resource.getMetaData().getUniqueId());
}
RelationshipResourceBinaryAction.UpdateWithResponse<Object> binUpdater = (RelationshipResourceBinaryAction.UpdateWithResponse<Object>) resource.getResource();
return binUpdater.updateProperty(params.getEntityId(), params.getRelationshipId(), params.getContentInfo(), params.getStream(), params, withResponse);
throw new DeletedResourceException("(UPDATE) " + resource.getMetaData().getUniqueId());
}
default:
throw new UnsupportedResourceOperationException("PUT not supported for Actions");
RelationshipResourceBinaryAction.UpdateWithResponse<Object> binUpdater = (RelationshipResourceBinaryAction.UpdateWithResponse<Object>) resource.getResource();
return binUpdater.updateProperty(params.getEntityId(), params.getRelationshipId(), params.getContentInfo(), params.getStream(), params, withResponse);
}
default:
throw new UnsupportedResourceOperationException("PUT not supported for Actions");
}
}

View File

@@ -996,6 +996,25 @@
</property>
</bean>
<bean id="sizeDetailsImpl" class="org.alfresco.rest.api.impl.SizeDetailsImpl">
<constructor-arg name="nodes" ref="nodes" />
<constructor-arg name="nodeSizeDetailsService" ref="NodeSizeDetailsService" />
</bean>
<bean id="sizeDetails" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.rest.api.SizeDetails</value>
</property>
<property name="target">
<ref bean="sizeDetailsImpl" />
</property>
<property name="interceptorNames">
<list>
<idref bean="legacyExceptionInterceptor" />
</list>
</property>
</bean>
<bean class="org.alfresco.rest.api.rules.NodeRuleSettingsRelation">
<property name="ruleSettings" ref="RuleSettings" />
</bean>
@@ -1770,4 +1789,8 @@
</list>
</property>
</bean>
<bean class="org.alfresco.rest.api.nodes.NodeSizeDetailsRelation">
<property name="sizeDetails" ref="sizeDetails" />
</bean>
</beans>

View File

@@ -250,7 +250,7 @@
<property name="delegate" ref="webscript.content.streamer" />
<property name="contentService" ref="contentService" />
<property name="repository" ref="repositoryHelper" />
<property name="nonAttachContentTypes" value="#{T(java.util.Arrays).asList('${content.nonAttach.mimetypes}')}" />
<property name="nonAttachContentTypes" value="#{'${content.nonAttach.mimetypes}'.split(',')}" />
</bean>
<!-- Content Info -->

View File

@@ -4,21 +4,21 @@
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
@@ -71,7 +71,7 @@ import org.junit.runners.Suite;
org.alfresco.rest.api.tests.TestPublicApiCaching.class,
org.alfresco.rest.api.tests.TestUserPreferences.class,
org.alfresco.rest.api.tests.WherePredicateApiTest.class,
org.alfresco.rest.api.tests.TestRemovePermissions.class,
org.alfresco.rest.api.tests.TestRemovePermissions.class,
org.alfresco.rest.api.tests.TempOutputStreamTest.class,
org.alfresco.rest.api.tests.BufferedResponseTest.class,
org.alfresco.rest.workflow.api.tests.DeploymentWorkflowApiTest.class,

View File

@@ -2,83 +2,83 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* 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
* 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;
import org.alfresco.repo.web.scripts.TestWebScriptRepoServer;
import org.alfresco.util.testing.category.DBTests;
import org.alfresco.util.testing.category.NonBuildTests;
import org.junit.experimental.categories.Categories;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.alfresco.repo.web.scripts.TestWebScriptRepoServer;
import org.alfresco.util.testing.category.DBTests;
import org.alfresco.util.testing.category.NonBuildTests;
@RunWith(Categories.class)
@Categories.ExcludeCategory({DBTests.class, NonBuildTests.class})
@Suite.SuiteClasses({
// [classpath:alfresco/application-context.xml, classpath:alfresco/web-scripts-application-context-test.xml,
// classpath:alfresco/web-scripts-application-context.xml]
org.alfresco.repo.web.scripts.quickshare.QuickShareRestApiTest.class,
org.alfresco.repo.web.scripts.admin.AdminWebScriptTest.class,
org.alfresco.repo.web.scripts.audit.AuditWebScriptTest.class,
org.alfresco.repo.web.scripts.blogs.BlogServiceTest.class,
org.alfresco.repo.web.scripts.dictionary.DictionaryRestApiTest.class,
org.alfresco.repo.web.scripts.discussion.DiscussionRestApiTest.class,
org.alfresco.repo.web.scripts.activities.feed.control.FeedControlTest.class,
org.alfresco.repo.web.scripts.forms.FormRestApiGet_Test.class,
org.alfresco.repo.web.scripts.forms.FormRestApiJsonPost_Test.class,
org.alfresco.repo.web.scripts.groups.GroupsTest.class,
org.alfresco.repo.web.scripts.invitation.InvitationWebScriptTest.class,
org.alfresco.repo.web.scripts.invite.InviteServiceTest.class,
org.alfresco.repo.web.scripts.LoginTest.class,
org.alfresco.repo.web.scripts.search.PersonSearchTest.class,
org.alfresco.repo.web.scripts.person.PersonServiceTest.class,
org.alfresco.repo.web.scripts.preference.PreferenceServiceTest.class,
org.alfresco.repo.web.scripts.rating.RatingRestApiTest.class,
org.alfresco.repo.web.scripts.replication.ReplicationRestApiTest.class,
org.alfresco.repo.web.scripts.RepositoryContainerTest.class,
org.alfresco.repo.web.scripts.rule.RuleServiceTest.class,
org.alfresco.repo.web.scripts.action.RunningActionRestApiTest.class,
org.alfresco.repo.web.scripts.site.SiteServiceTest.class,
org.alfresco.repo.web.scripts.tagging.TaggingServiceTest.class,
org.alfresco.repo.web.scripts.thumbnail.ThumbnailServiceTest.class,
org.alfresco.repo.web.scripts.transfer.TransferWebScriptTest.class,
org.alfresco.repo.web.scripts.workflow.ActivitiWorkflowRestApiTest.class,
org.alfresco.repo.web.scripts.solr.SOLRWebScriptTest.class,
org.alfresco.repo.web.scripts.subscriptions.SubscriptionServiceRestApiTest.class,
org.alfresco.repo.web.scripts.facet.FacetRestApiTest.class,
org.alfresco.repo.web.scripts.comment.CommentsApiTest.class,
org.alfresco.repo.web.scripts.content.ContentGetTest.class,
org.alfresco.repo.web.scripts.XssVulnerabilityTest.class,
org.alfresco.repo.web.scripts.links.LinksRestApiTest.class,
org.alfresco.repo.model.filefolder.RemoteFileFolderLoaderTest.class,
org.alfresco.repo.web.scripts.ReadOnlyTransactionInGetRestApiTest.class,
org.alfresco.repo.web.scripts.custommodel.CustomModelImportTest.class,
org.alfresco.repo.web.scripts.site.SurfConfigTest.class,
org.alfresco.repo.web.scripts.node.NodeWebScripTest.class,
org.alfresco.rest.api.impl.CommentsImplUnitTest.class,
org.alfresco.rest.api.impl.DownloadsImplCheckArchiveStatusUnitTest.class,
org.alfresco.rest.api.impl.RestApiDirectUrlConfigUnitTest.class
})
// [classpath:alfresco/application-context.xml, classpath:alfresco/web-scripts-application-context-test.xml,
// classpath:alfresco/web-scripts-application-context.xml]
org.alfresco.repo.web.scripts.quickshare.QuickShareRestApiTest.class,
org.alfresco.repo.web.scripts.admin.AdminWebScriptTest.class,
org.alfresco.repo.web.scripts.audit.AuditWebScriptTest.class,
org.alfresco.repo.web.scripts.blogs.BlogServiceTest.class,
org.alfresco.repo.web.scripts.dictionary.DictionaryRestApiTest.class,
org.alfresco.repo.web.scripts.discussion.DiscussionRestApiTest.class,
org.alfresco.repo.web.scripts.activities.feed.control.FeedControlTest.class,
org.alfresco.repo.web.scripts.forms.FormRestApiGet_Test.class,
org.alfresco.repo.web.scripts.forms.FormRestApiJsonPost_Test.class,
org.alfresco.repo.web.scripts.groups.GroupsTest.class,
org.alfresco.repo.web.scripts.invitation.InvitationWebScriptTest.class,
org.alfresco.repo.web.scripts.invite.InviteServiceTest.class, org.alfresco.repo.web.scripts.LoginTest.class,
org.alfresco.repo.web.scripts.search.PersonSearchTest.class,
org.alfresco.repo.web.scripts.person.PersonServiceTest.class,
org.alfresco.repo.web.scripts.preference.PreferenceServiceTest.class,
org.alfresco.repo.web.scripts.rating.RatingRestApiTest.class,
org.alfresco.repo.web.scripts.replication.ReplicationRestApiTest.class,
org.alfresco.repo.web.scripts.RepositoryContainerTest.class,
org.alfresco.repo.web.scripts.rule.RuleServiceTest.class,
org.alfresco.repo.web.scripts.action.RunningActionRestApiTest.class,
org.alfresco.repo.web.scripts.site.SiteServiceTest.class,
org.alfresco.repo.web.scripts.tagging.TaggingServiceTest.class,
org.alfresco.repo.web.scripts.thumbnail.ThumbnailServiceTest.class,
org.alfresco.repo.web.scripts.transfer.TransferWebScriptTest.class,
org.alfresco.repo.web.scripts.workflow.ActivitiWorkflowRestApiTest.class,
org.alfresco.repo.web.scripts.solr.SOLRWebScriptTest.class,
org.alfresco.repo.web.scripts.subscriptions.SubscriptionServiceRestApiTest.class,
org.alfresco.repo.web.scripts.facet.FacetRestApiTest.class,
org.alfresco.repo.web.scripts.comment.CommentsApiTest.class,
org.alfresco.repo.web.scripts.content.ContentGetTest.class,
org.alfresco.repo.web.scripts.XssVulnerabilityTest.class,
org.alfresco.repo.web.scripts.links.LinksRestApiTest.class,
org.alfresco.repo.model.filefolder.RemoteFileFolderLoaderTest.class,
org.alfresco.repo.web.scripts.ReadOnlyTransactionInGetRestApiTest.class,
org.alfresco.repo.web.scripts.custommodel.CustomModelImportTest.class,
org.alfresco.repo.web.scripts.site.SurfConfigTest.class,
org.alfresco.repo.web.scripts.node.NodeWebScripTest.class,
org.alfresco.rest.api.impl.CommentsImplUnitTest.class,
org.alfresco.rest.api.impl.DownloadsImplCheckArchiveStatusUnitTest.class,
org.alfresco.rest.api.impl.RestApiDirectUrlConfigUnitTest.class,
org.alfresco.rest.api.impl.SizeDetailsImplTest.class})
public class AppContext04TestSuite
{
public AppContext04TestSuite()

View File

@@ -0,0 +1,134 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2020 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.api.impl;
import static java.util.Collections.singleton;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.openMocks;
import static org.alfresco.model.ContentModel.TYPE_CONTENT;
import static org.alfresco.service.cmr.favourites.FavouritesService.Type.FILE;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.alfresco.repo.favourites.PersonFavourite;
import org.alfresco.rest.api.Nodes;
import org.alfresco.rest.api.People;
import org.alfresco.rest.api.model.Document;
import org.alfresco.rest.api.model.DocumentTarget;
import org.alfresco.rest.api.model.Favourite;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.service.cmr.favourites.FavouritesService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespaceService;
/**
* Unit tests for {@link FavouritesImpl} class.
*/
public class FavouritesImplUnitTest
{
static final String NODE_ID = "12345678";
static final NodeRef NODE_REF = new NodeRef("favourite://node/" + NODE_ID);
static final String PERSON_ID = "personId";
static final String ASPECT_NAME = "some:aspect";
@InjectMocks
FavouritesImpl favouritesImpl;
@Mock
People people;
@Mock
Nodes nodes;
@Mock
FavouritesService favouritesService;
@Mock
NamespaceService namespaceService;
@Mock
Favourite favourite;
@Mock
Document document;
@Mock
PersonFavourite personFavourite;
@Before
public void setUp()
{
openMocks(this);
when(nodes.getDocument(NODE_REF)).thenReturn(document);
when(nodes.nodeMatches(NODE_REF, singleton(TYPE_CONTENT), null)).thenReturn(true);
when(document.getGuid()).thenReturn(NODE_REF);
when(people.validatePerson(PERSON_ID, true)).thenReturn(PERSON_ID);
when(personFavourite.getNodeRef()).thenReturn(NODE_REF);
when(personFavourite.getType()).thenReturn(FILE);
when(favouritesService.addFavourite(PERSON_ID, NODE_REF)).thenReturn(personFavourite);
when(namespaceService.getPrefixes(anyString())).thenReturn(List.of("prefix"));
}
@Test
public void testAddFavourite()
{
DocumentTarget documentTarget = new DocumentTarget(document);
when(favourite.getTarget()).thenReturn(documentTarget);
Favourite response = favouritesImpl.addFavourite(PERSON_ID, favourite);
Favourite expected = new Favourite();
expected.setTarget(documentTarget);
expected.setTargetGuid(NODE_ID);
assertEquals(expected, response);
}
@Test
public void testAddFavouriteIncludeAspectNames()
{
List<String> includes = List.of("aspectNames");
DocumentTarget documentTarget = new DocumentTarget(document);
when(favourite.getTarget()).thenReturn(documentTarget);
when(nodes.getFolderOrDocument(NODE_REF, null, null, includes, null)).thenReturn(document);
when(document.getAspectNames()).thenReturn(List.of(ASPECT_NAME));
Parameters parameters = mock(Parameters.class);
when(parameters.getInclude()).thenReturn(includes);
Favourite response = favouritesImpl.addFavourite(PERSON_ID, favourite, parameters);
Favourite expected = new Favourite();
expected.setTarget(documentTarget);
expected.setTargetGuid(NODE_ID);
expected.setAspectNames(List.of(ASPECT_NAME));
assertEquals(expected, response);
}
}

View File

@@ -0,0 +1,107 @@
/*
* #%L
* Alfresco Remote API
* %%
* 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.api.impl;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.io.Serializable;
import java.util.Optional;
import java.util.concurrent.ThreadPoolExecutor;
import org.junit.Before;
import org.junit.Test;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.cache.SimpleCache;
import org.alfresco.repo.node.sizedetails.NodeSizeDetailsServiceImpl;
import org.alfresco.repo.node.sizedetails.NodeSizeDetailsServiceImpl.NodeSizeDetails;
import org.alfresco.rest.api.Nodes;
import org.alfresco.rest.api.model.Node;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.namespace.QName;
/**
* Unit tests for {@link SizeDetailsImpl} class.
*/
public class SizeDetailsImplTest
{
private static final String NAMESPACE = "http://www.alfresco.org/test/NodeSizeDetailsTest";
private static final QName TYPE_FOLDER = QName.createQName(NAMESPACE, "folder");
private SizeDetailsImpl sizeDetailsImpl;
private Nodes nodes;
private NodeSizeDetailsServiceImpl nodeSizeDetailsServiceImpl;
private NodeSizeDetails nodeSizeDetails;
@Before
public void setUp() throws Exception
{
nodes = mock(Nodes.class);
SearchService searchService = mock(SearchService.class);
nodeSizeDetailsServiceImpl = mock(NodeSizeDetailsServiceImpl.class);
ThreadPoolExecutor threadPoolExecutor = mock(ThreadPoolExecutor.class);
SimpleCache<Serializable, NodeSizeDetails> simpleCache = mock(SimpleCache.class);
nodeSizeDetails = mock(NodeSizeDetails.class);
nodeSizeDetailsServiceImpl.setSearchService(searchService);
nodeSizeDetailsServiceImpl.setDefaultItems(1000);
nodeSizeDetailsServiceImpl.setSimpleCache(simpleCache);
verify(nodeSizeDetailsServiceImpl).setSimpleCache(simpleCache);
nodeSizeDetailsServiceImpl.setThreadPoolExecutor(threadPoolExecutor);
sizeDetailsImpl = new SizeDetailsImpl(nodes, nodeSizeDetailsServiceImpl);
}
@Test
public void calculateNodeSizeDetails()
{
String nodeName = "folderNode";
String nodeId = "node-id";
String jobId = "job-id";
NodeRef nodeRef = new NodeRef("protocol", "identifier", nodeId);
Node node = new Node();
node.setIsFolder(true);
node.setNodeRef(nodeRef);
node.setName(nodeName);
node.setNodeType(TYPE_FOLDER.getLocalName());
node.setNodeId(nodeRef.getId());
when(nodes.validateOrLookupNode(nodeId)).thenReturn(nodeRef);
when(nodes.isSubClass(nodeRef, ContentModel.TYPE_FOLDER, false)).thenReturn(true);
when(nodeSizeDetailsServiceImpl.getSizeDetails(nodeId)).thenReturn(Optional.ofNullable(nodeSizeDetails));
NodeSizeDetails requestSizeDetails = sizeDetailsImpl.generateNodeSizeDetailsRequest(nodeId);
assertNotNull("After executing POST/size-details, it will provide with 202 status code", requestSizeDetails);
NodeSizeDetails nodeSizeDetails = sizeDetailsImpl.getNodeSizeDetails(nodeId, jobId);
assertNotNull("After executing GET/size-details, it will provide with 200 status code", nodeSizeDetails);
}
}

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