Compare commits

...

67 Commits

Author SHA1 Message Date
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
43 changed files with 3819 additions and 3736 deletions

View File

@@ -44,14 +44,14 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v8.2.0
with:
write-list-to-env: true
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Prepare maven cache and check compilation"
@@ -69,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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v8.2.0
continue-on-error: true
with:
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
@@ -92,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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v7.1.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"
@@ -142,9 +142,9 @@ jobs:
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.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\""
@@ -175,14 +175,14 @@ jobs:
testAttributes: "-Dtest=AllMmtUnitTestSuite"
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v7.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 }}
@@ -213,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -255,9 +255,9 @@ jobs:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -270,7 +270,7 @@ jobs:
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v7.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 }}
@@ -301,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -334,9 +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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: Run MariaDB ${{ matrix.version }} database
@@ -345,7 +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@v7.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 }}
@@ -376,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -405,9 +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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run MariaDB 10.6 database"
@@ -416,7 +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@v7.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 }}
@@ -447,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -476,9 +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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run MySQL 8 database"
@@ -487,7 +487,7 @@ jobs:
MYSQL_VERSION: 8
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v7.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 }}
@@ -518,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -546,9 +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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 13.12 database"
@@ -557,7 +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@v7.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 }}
@@ -588,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -616,9 +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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 14.9 database"
@@ -627,7 +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@v7.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 }}
@@ -658,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -686,9 +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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run PostgreSQL 15.4 database"
@@ -697,7 +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@v7.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 }}
@@ -728,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -754,16 +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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run ActiveMQ"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v7.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 }}
@@ -794,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -854,9 +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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Set transformers tag"
@@ -879,7 +879,7 @@ jobs:
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v7.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 }}
@@ -910,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -968,9 +968,9 @@ jobs:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -986,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@v7.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 }}
@@ -1024,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.tests.outcome }}
@@ -1050,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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Init"
run: bash ./scripts/ci/init.sh
- name: "Run Postgres 15.4 database"
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
- name: "Prepare Report Portal"
if: github.ref_name == 'master'
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v7.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 }}
@@ -1090,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -1124,9 +1124,9 @@ jobs:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -1134,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@v7.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 }}
@@ -1170,9 +1170,9 @@ jobs:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -1180,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@v7.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 }}
@@ -1212,9 +1212,9 @@ jobs:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v4
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
@@ -1228,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@v7.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 }}
@@ -1260,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@v7.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
id: rp-summarize
with:
tests-outcome: ${{ steps.run-tests.outcome }}
@@ -1302,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@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v7.1.0
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.2.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<modules>

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<modules>

View File

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

View File

@@ -3,8 +3,8 @@
#
# Version label
version.major=23
version.minor=4
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.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<build>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<modules>

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</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>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<dependencies>

View File

@@ -9,6 +9,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</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

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<modules>

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<organization>

View File

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

View File

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

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<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

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<properties>

35
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.4.0.67</version>
<version>25.1.0.10</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>4</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>
@@ -64,38 +64,39 @@
<dependency.cxf.version>4.0.5</dependency.cxf.version>
<dependency.opencmis.version>1.0.0-jakarta-1</dependency.opencmis.version>
<dependency.webscripts.version>9.4</dependency.webscripts.version>
<dependency.bouncycastle.version>1.78.1</dependency.bouncycastle.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>20240303</dependency.org-json.version>
<dependency.commons-dbcp.version>2.12.0</dependency.commons-dbcp.version>
<dependency.commons-io.version>2.17.0</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.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-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.16</dependency.slf4j.version>
<dependency.log4j.version>2.23.1</dependency.log4j.version>
<dependency.groovy.version>3.0.22</dependency.groovy.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.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.113.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.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>
@@ -154,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>23.4.0.67</tag>
<tag>25.1.0.10</tag>
</scm>
<distributionManagement>
@@ -371,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>
@@ -465,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>
@@ -703,7 +704,7 @@
<dependency>
<groupId>com.networknt</groupId>
<artifactId>json-schema-validator</artifactId>
<version>1.5.1</version>
<version>1.5.4</version>
</dependency>
<!-- upgrade dependency from TIKA -->
<dependency>
@@ -950,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>
@@ -1015,7 +1016,7 @@
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
@@ -1028,7 +1029,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<dependencies>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>4.0.2</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>

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)));
@@ -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

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>23.4.0.67</version>
<version>25.1.0.10</version>
</parent>
<dependencies>
@@ -397,7 +397,7 @@
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.5.16</version>
<version>3.5.17</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
@@ -850,12 +850,12 @@
</execution>
</executions>
<configuration>
<complianceLevel>1.8</complianceLevel>
<complianceLevel>17</complianceLevel>
<outxml>false</outxml>
<verbose>true</verbose>
<showWeaveInfo>true</showWeaveInfo>
<source>1.8</source>
<target>1.8</target>
<source>17</source>
<target>17</target>
<additionalCompilerArgs>
<arg>-parameters</arg>
</additionalCompilerArgs>

View File

@@ -46,7 +46,7 @@ public interface AuditComponent
/**
* Determines whether audit is globally enabled or disabled.
*
* @return Returns <code>true</code> if audit is enabled
* @return Returns <code>true</code> if audit is enabled
*
* @since 3.3
*/
@@ -55,14 +55,16 @@ public interface AuditComponent
/**
* Switch auditing on or off
*
* @param enable <tt>true</tt> to enable auditing or <tt>false</tt> to disable
* @param enable
* <tt>true</tt> to enable auditing or <tt>false</tt> to disable
*
* @since 3.4
*/
public void setAuditEnabled(boolean enable);
/**
* @param userAuditFilter UserAuditFilter
* @param userAuditFilter
* UserAuditFilter
*
* @since 4.2
*/
@@ -71,36 +73,28 @@ public interface AuditComponent
/**
* Get all registered audit applications, whether active or not.
*
* @return Returns a map of registered audit applications keyed by name
* @return Returns a map of registered audit applications keyed by name
*
* @since 3.4
*/
public Map<String, AuditApplication> getAuditApplications();
/**
* Determine whether the audit infrastructure expects audit values to be passed in.
* This is a helper method to allow optimizations in the client code. Reasons why
* this method might return <tt>false</tt> are: auditing is disabled; no audit applications
* have been registered. Sometimes, depending on the log level, this method may always
* return <tt>true</tt>.
* Determine whether the audit infrastructure expects audit values to be passed in. This is a helper method to allow optimizations in the client code. Reasons why this method might return <tt>false</tt> are: auditing is disabled; no audit applications have been registered. Sometimes, depending on the log level, this method may always return <tt>true</tt>.
*
*
* @return Returns <code>true</code> if the calling code (data producers)
* should go ahead and generate the data for
* {@link #recordAuditValues(String, Map) recording}.
* @return Returns <code>true</code> if the calling code (data producers) should go ahead and generate the data for {@link #recordAuditValues(String, Map) recording}.
*
* @since 3.3
*/
public boolean areAuditValuesRequired();
/**
* Determines if audit values are required based on whether there are any audit applications
* registered to record data for the given path. This helper method gives data producers a
* shortcut in the event that nothing would be recorded in any event.
* Determines if audit values are required based on whether there are any audit applications registered to record data for the given path. This helper method gives data producers a shortcut in the event that nothing would be recorded in any event.
*
* @param path the audit path
* @return Returns <tt>true</tt> if there is at least one audit application
* registered to handle the given path.
* @param path
* the audit path
* @return Returns <tt>true</tt> if there is at least one audit application registered to handle the given path.
*
* @since 3.4
*/
@@ -109,10 +103,13 @@ public interface AuditComponent
/**
* Delete audit entries for the given application and time range
*
* @param applicationName the name of the application
* @param fromTime the start time of entries to remove (inclusive and optional)
* @param toTime the end time of entries to remove (exclusive and optional)
* @return Returns the number of entries deleted
* @param applicationName
* the name of the application
* @param fromTime
* the start time of entries to remove (inclusive and optional)
* @param toTime
* the end time of entries to remove (exclusive and optional)
* @return Returns the number of entries deleted
*
* @since 3.2
*/
@@ -121,10 +118,13 @@ public interface AuditComponent
/**
* Delete audit entries for the given application and id range
*
* @param applicationName the name of the application
* @param fromId the start time of entries to remove (inclusive and optional)
* @param toId the end time of entries to remove (exclusive and optional)
* @return Returns the number of entries deleted
* @param applicationName
* the name of the application
* @param fromId
* the start time of entries to remove (inclusive and optional)
* @param toId
* the end time of entries to remove (exclusive and optional)
* @return Returns the number of entries deleted
*
* @since 5.2.2
*/
@@ -133,95 +133,79 @@ public interface AuditComponent
/**
* Delete a discrete list of audit entries based on ID
*
* @param auditEntryIds the audit entry IDs to delete
* @return Returns the number of entries deleted
* @param auditEntryIds
* the audit entry IDs to delete
* @return Returns the number of entries deleted
*/
int deleteAuditEntries(List<Long> auditEntryIds);
/**
* Check if an audit path is enabled. The path will be disabled if it or any higher
* path has been explicitly disabled. Any disabled path will not be processed when
* data is audited.
* Check if an audit path is enabled. The path will be disabled if it or any higher path has been explicitly disabled. Any disabled path will not be processed when data is audited.
*
* @param applicationName the name of the application being logged to
* @param path the audit path to check or <tt>null</tt> to assume the
* application's root path
* @return Returns <tt>true</tt> if the audit path has been disabled
* @param applicationName
* the name of the application being logged to
* @param path
* the audit path to check or <tt>null</tt> to assume the application's root path
* @return Returns <tt>true</tt> if the audit path has been disabled
*
* @since 3.2
*/
boolean isAuditPathEnabled(String applicationName, String path);
/**
* Enable auditing (if it is not already enabled) for all paths that contain the given path.
* The path is the path as originally logged and
* not the path that the generated data may contain - although this would be similarly
* enabled.
* Enable auditing (if it is not already enabled) for all paths that contain the given path. The path is the path as originally logged and not the path that the generated data may contain - although this would be similarly enabled.
* <p>
* If the enabled
*
* @param applicationName the name of the application being logged to
* @param path the audit path to check or <tt>null</tt> to assume the
* application's root path
* @param applicationName
* the name of the application being logged to
* @param path
* the audit path to check or <tt>null</tt> to assume the application's root path
*
* @since 3.2
*/
void enableAudit(String applicationName, String path);
/**
* Disable auditing (if it is not already disabled) for all paths that contain the given path.
* The path is the path as originally logged and
* not the path that the generated data may contain - although this would be similarly
* disabled.
* Disable auditing (if it is not already disabled) for all paths that contain the given path. The path is the path as originally logged and not the path that the generated data may contain - although this would be similarly disabled.
* <p>
* If the path is <b>/x/y</b> then any data paths that start with <b>/x/y</b> will be stripped
* out <u>before</u> data generators and data recorders are applied. If the path represents
* the root path of the application, then auditing for that application is effectively disabled.
* If the path is <b>/x/y</b> then any data paths that start with <b>/x/y</b> will be stripped out <u>before</u> data generators and data recorders are applied. If the path represents the root path of the application, then auditing for that application is effectively disabled.
*
* @param applicationName the name of the application being logged to
* @param path the audit path to check or <tt>null</tt> to assume the
* application's root path
* @param applicationName
* the name of the application being logged to
* @param path
* the audit path to check or <tt>null</tt> to assume the application's root path
*
* @since 3.2
*/
void disableAudit(String applicationName, String path);
/**
* Remove all disabled paths i.e. enable all per-path based auditing. Auditing may still be
* disabled globally. This is primarily for test purposes; applications should know which
* paths need {@link #enableAudit(String, String) enabling} or
* {@link #disableAudit(String, String) disabled}.
* Remove all disabled paths i.e. enable all per-path based auditing. Auditing may still be disabled globally. This is primarily for test purposes; applications should know which paths need {@link #enableAudit(String, String) enabling} or {@link #disableAudit(String, String) disabled}.
*
* @param applicationName the name of the application
* @param applicationName
* the name of the application
*
* @since 3.2
*/
void resetDisabledPaths(String applicationName);
/**
* Create an audit entry for the given map of values. The map key is a path - starting with '/'
* ({@link AuditApplication#AUDIT_PATH_SEPARATOR}) - relative to the root path provided.
* Create an audit entry for the given map of values. The map key is a path - starting with '/' ({@link AuditApplication#AUDIT_PATH_SEPARATOR}) - relative to the root path provided.
* <p/>
* The root path and value keys are combined to produce a map of data keyed by full path. This
* fully-pathed map is then passed through the
* {@link AuditModelRegistry#getAuditPathMapper() audit path mapper}. The result may yield data
* destined for several different
* {@link AuditModelRegistry#getAuditApplicationByKey(String) audit applications}. depending on
* the data extraction and generation defined in the applications, values (or derived values) may
* be recorded against several audit entries (one per application represented).
* The root path and value keys are combined to produce a map of data keyed by full path. This fully-pathed map is then passed through the {@link AuditModelRegistry#getAuditPathMapper() audit path mapper}. The result may yield data destined for several different {@link AuditModelRegistry#getAuditApplicationByKey(String) audit applications}. depending on the data extraction and generation defined in the applications, values (or derived values) may be recorded against several audit entries (one per application represented).
* <p/>
* The return values reflect what was actually persisted and is controlled by the data extractors
* defined in the audit configuration.
* The return values reflect what was actually persisted and is controlled by the data extractors defined in the audit configuration.
* <p/>
* A new read-write transaction is started if there are values to write that there is not a viable
* transaction present.
* A new read-write transaction is started if there are values to write that there is not a viable transaction present.
*
* @param rootPath a base path of {@link AuditPath} key entries concatenated with the path separator
* '/' ({@link AuditApplication#AUDIT_PATH_SEPARATOR})
* @param values the values to audit mapped by {@link AuditPath} key relative to root path
* (may be <tt>null</tt>)
* @return Returns the values that were actually persisted, keyed by their full path.
* @throws IllegalStateException if the transaction state could not be determined
* @param rootPath
* a base path of {@link AuditPath} key entries concatenated with the path separator '/' ({@link AuditApplication#AUDIT_PATH_SEPARATOR})
* @param values
* the values to audit mapped by {@link AuditPath} key relative to root path (may be <tt>null</tt>)
* @return Returns the values that were actually persisted, keyed by their full path.
* @throws IllegalStateException
* if the transaction state could not be determined
*
* @since 3.2
*/
@@ -230,24 +214,30 @@ public interface AuditComponent
/**
* The same as {@link AuditComponent#recordAuditValues(String, Map)}, but with controlled usage of userFilter
*
* @param rootPath a base path of {@link AuditPath} key entries concatenated with the path separator
* '/' ({@link AuditApplication#AUDIT_PATH_SEPARATOR})
* @param values the values to audit mapped by {@link AuditPath} key relative to root path
* (may be <tt>null</tt>)
* @param useUserFilter if <tt>false</tt> the user filter is disabled.
* @return Returns the values that were actually persisted, keyed by their full path.
* @throws IllegalStateException if the transaction state could not be determined
* @param rootPath
* a base path of {@link AuditPath} key entries concatenated with the path separator '/' ({@link AuditApplication#AUDIT_PATH_SEPARATOR})
* @param values
* the values to audit mapped by {@link AuditPath} key relative to root path (may be <tt>null</tt>)
* @param useUserFilter
* if <tt>false</tt> the user filter is disabled.
* @return Returns the values that were actually persisted, keyed by their full path.
* @throws IllegalStateException
* if the transaction state could not be determined
*/
Map<String, Serializable> recordAuditValuesWithUserFilter(String rootPath, Map<String, Serializable> values, boolean useUserFilter);
/**
* Find audit entries using the given parameters
*
* @param callback the data callback per entry
* @param parameters the parameters for the query (may not be <tt>null</tt>)
* @param maxResults the maximum number of results to retrieve (must be greater than 0)
* @param callback
* the data callback per entry
* @param parameters
* the parameters for the query (may not be <tt>null</tt>)
* @param maxResults
* the maximum number of results to retrieve (must be greater than 0)
*
* @throws IllegalArgumentException if maxResults less or equal to zero
* @throws IllegalArgumentException
* if maxResults less or equal to zero
*
* @since 3.2
*/
@@ -256,17 +246,20 @@ public interface AuditComponent
/**
* Issue an audit query to retrieve min / max audit record id for a given application.
*
* @param applicationName the name of the application
* @param extremes a list containing min/max or both
* @return a map containing min/max and the associated value
* @param applicationName
* the name of the application
* @param extremes
* a list containing min/max or both
* @return a map containing min/max and the associated value
*/
HashMap<String, Long> getAuditMinMaxByApp(String applicationName, List<String> extremes);
/**
* Issue an audit query to retrieve count of records for a given application.
*
* @param applicationName the name of the application
* @return a map containing min/max and the associated value
* @param applicationName
* the name of the application
* @return a map containing min/max and the associated value
*/
default int getAuditEntriesCountByApp(String applicationName)
{
@@ -276,10 +269,13 @@ public interface AuditComponent
/**
* Issue an audit query to retrieve count of records for a given application and properties
*
* @param parameters audit parameters provided by the <code>where</code> clause on the ReST API
* @return a map containing min/max and the associated value
* @param applicationName
* the name of the application
* @param parameters
* audit parameters provided by the <code>where</code> clause on the ReST API
* @return a map containing min/max and the associated value
*/
default int getAuditEntriesCountByAppAndProperties(AuditQueryParameters parameters)
default int getAuditEntriesCountByAppAndProperties(String applicationName, AuditQueryParameters parameters)
{
return -1;
}

View File

@@ -34,13 +34,17 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.surf.util.ParameterCheck;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.audit.extractor.DataExtractor;
import org.alfresco.repo.audit.generator.DataGenerator;
import org.alfresco.repo.audit.model.AuditApplication;
import org.alfresco.repo.audit.model.AuditApplication.DataExtractorDefinition;
import org.alfresco.repo.audit.model.AuditModelRegistry;
import org.alfresco.repo.audit.model.AuditModelRegistryImpl;
import org.alfresco.repo.audit.model.AuditApplication.DataExtractorDefinition;
import org.alfresco.repo.domain.audit.AuditDAO;
import org.alfresco.repo.domain.propval.PropertyValueDAO;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
@@ -53,9 +57,6 @@ import org.alfresco.service.cmr.audit.AuditQueryParameters;
import org.alfresco.service.cmr.audit.AuditService.AuditQueryCallback;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.PathMapper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.surf.util.ParameterCheck;
/**
* Component that records audit values as well as providing the query implementation.
@@ -86,11 +87,11 @@ public class AuditComponentImpl implements AuditComponent
* Default constructor
*/
public AuditComponentImpl()
{
}
{}
/**
* Set the registry holding the audit models
*
* @since 3.2
*/
public void setAuditModelRegistry(AuditModelRegistryImpl auditModelRegistry)
@@ -100,6 +101,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* Set the DAO for manipulating property values
*
* @since 3.2
*/
public void setPropertyValueDAO(PropertyValueDAO propertyValueDAO)
@@ -109,6 +111,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* Set the DAO for accessing audit data
*
* @since 3.2
*/
public void setAuditDAO(AuditDAO auditDAO)
@@ -139,6 +142,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* {@inheritDoc}
*
* @since 3.2
*/
public int deleteAuditEntries(String applicationName, Long fromTime, Long toTime)
@@ -155,13 +159,14 @@ public class AuditComponentImpl implements AuditComponent
{
logger.debug(
"Delete audit " + deleted + " entries for " + applicationName +
" (" + fromTime + " to " + toTime);
" (" + fromTime + " to " + toTime);
}
return deleted;
}
/**
* {@inheritDoc}
*
* @since 5.2.2
*/
public int deleteAuditEntriesByIdRange(String applicationName, Long fromId, Long toId)
@@ -203,6 +208,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* {@inheritDoc}
*
* @since 3.2
*/
@Override
@@ -217,8 +223,9 @@ public class AuditComponentImpl implements AuditComponent
}
/**
* @param application the audit application object
* @return Returns a copy of the set of disabled paths associated with the application
* @param application
* the audit application object
* @return Returns a copy of the set of disabled paths associated with the application
*/
@SuppressWarnings("unchecked")
private Set<String> getDisabledPaths(AuditApplication application)
@@ -239,6 +246,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* {@inheritDoc}
*
* @since 3.2
*/
public boolean isAuditEnabled()
@@ -248,6 +256,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* {@inheritDoc}
*
* @since 3.4
*/
@Override
@@ -259,14 +268,15 @@ public class AuditComponentImpl implements AuditComponent
// It is changing
auditModelRegistry.stop();
auditModelRegistry.setProperty(
AuditModelRegistry.AUDIT_PROPERTY_AUDIT_ENABLED,
Boolean.toString(enable).toLowerCase());
AuditModelRegistry.AUDIT_PROPERTY_AUDIT_ENABLED,
Boolean.toString(enable).toLowerCase());
auditModelRegistry.start();
}
}
/**
* {@inheritDoc}
*
* @since 3.4
*/
public Map<String, AuditApplication> getAuditApplications()
@@ -277,8 +287,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* {@inheritDoc}
* <p/>
* Note that if DEBUG is on for the the {@link #INBOUND_LOGGER}, then <tt>true</tt>
* will always be returned.
* Note that if DEBUG is on for the the {@link #INBOUND_LOGGER}, then <tt>true</tt> will always be returned.
*
* @since 3.2
*/
@@ -291,8 +300,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* {@inheritDoc}
* <p/>
* Note that if DEBUG is on for the the {@link #INBOUND_LOGGER}, then <tt>true</tt>
* will always be returned.
* Note that if DEBUG is on for the the {@link #INBOUND_LOGGER}, then <tt>true</tt> will always be returned.
*
* @since 3.4
*/
@@ -306,6 +314,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* {@inheritDoc}
*
* @since 3.2
*/
public boolean isAuditPathEnabled(String applicationName, String path)
@@ -336,7 +345,8 @@ public class AuditComponentImpl implements AuditComponent
Set<String> disabledPaths = getDisabledPaths(application);
// Check if there are any entries that match or supercede the given path
String disablingPath = null;;
String disablingPath = null;
;
for (String disabledPath : disabledPaths)
{
if (path.startsWith(disabledPath))
@@ -350,15 +360,16 @@ public class AuditComponentImpl implements AuditComponent
{
logger.debug(
"Audit path enabled check: \n" +
" Application: " + applicationName + "\n" +
" Path: " + path + "\n" +
" Disabling Path: " + disablingPath);
" Application: " + applicationName + "\n" +
" Path: " + path + "\n" +
" Disabling Path: " + disablingPath);
}
return disablingPath == null;
}
/**
* {@inheritDoc}
*
* @since 3.2
*/
public void enableAudit(String applicationName, String path)
@@ -409,8 +420,8 @@ public class AuditComponentImpl implements AuditComponent
{
logger.debug(
"Audit disabled paths updated: \n" +
" Application: " + applicationName + "\n" +
" Disabled: " + disabledPaths);
" Application: " + applicationName + "\n" +
" Disabled: " + disabledPaths);
}
}
// Done
@@ -418,6 +429,7 @@ public class AuditComponentImpl implements AuditComponent
/**
* {@inheritDoc}
*
* @since 3.2
*/
public void disableAudit(String applicationName, String path)
@@ -455,7 +467,7 @@ public class AuditComponentImpl implements AuditComponent
{
logger.debug(
"Audit disable path already present: \n" +
" Path: " + path);
" Path: " + path);
}
return;
}
@@ -477,8 +489,8 @@ public class AuditComponentImpl implements AuditComponent
{
logger.debug(
"Audit disable path superceded: \n" +
" Path: " + path + "\n" +
" Superceded by: " + disabledPath);
" Path: " + path + "\n" +
" Superceded by: " + disabledPath);
}
return;
}
@@ -492,13 +504,14 @@ public class AuditComponentImpl implements AuditComponent
{
logger.debug(
"Audit disabled paths updated: \n" +
" Application: " + applicationName + "\n" +
" Disabled: " + disabledPaths);
" Application: " + applicationName + "\n" +
" Disabled: " + disabledPaths);
}
}
/**
* {@inheritDoc}
*
* @since 3.2
*/
public void resetDisabledPaths(String applicationName)
@@ -546,9 +559,9 @@ public class AuditComponentImpl implements AuditComponent
// Log inbound values
if (loggerInbound.isDebugEnabled())
{
StringBuilder sb = new StringBuilder(values.size()*64);
StringBuilder sb = new StringBuilder(values.size() * 64);
sb.append("\n")
.append("Inbound audit values:");
.append("Inbound audit values:");
for (Map.Entry<String, Serializable> entry : values.entrySet())
{
String pathElement = entry.getKey();
@@ -576,16 +589,14 @@ public class AuditComponentImpl implements AuditComponent
return mappedValues;
}
// We have something to record. Start a transaction, if necessary
// We have something to record. Start a transaction, if necessary
TxnReadState txnState = AlfrescoTransactionSupport.getTransactionReadState();
switch (txnState)
{
case TXN_NONE:
case TXN_READ_ONLY:
// New transaction
RetryingTransactionCallback<Map<String, Serializable>> callback =
new RetryingTransactionCallback<Map<String,Serializable>>()
{
RetryingTransactionCallback<Map<String, Serializable>> callback = new RetryingTransactionCallback<Map<String, Serializable>>() {
public Map<String, Serializable> execute() throws Throwable
{
return recordAuditValuesImpl(mappedValues);
@@ -607,7 +618,7 @@ public class AuditComponentImpl implements AuditComponent
public Map<String, Serializable> recordAuditValuesImpl(Map<String, Serializable> mappedValues)
{
// Group the values by root path
Map<String, Map<String, Serializable>> mappedValuesByRootKey = new HashMap<String, Map<String,Serializable>>();
Map<String, Map<String, Serializable>> mappedValuesByRootKey = new HashMap<String, Map<String, Serializable>>();
for (Map.Entry<String, Serializable> entry : mappedValues.entrySet())
{
String path = entry.getKey();
@@ -621,7 +632,7 @@ public class AuditComponentImpl implements AuditComponent
rootKeyMappedValues.put(path, entry.getValue());
}
Map<String, Serializable> allAuditedValues = new HashMap<String, Serializable>(mappedValues.size()*2+1);
Map<String, Serializable> allAuditedValues = new HashMap<String, Serializable>(mappedValues.size() * 2 + 1);
// Now audit for each of the root keys
for (Map.Entry<String, Map<String, Serializable>> entry : mappedValuesByRootKey.entrySet())
{
@@ -646,8 +657,8 @@ public class AuditComponentImpl implements AuditComponent
{
logger.debug(
"Audit values root path has been excluded by disabled paths: \n" +
" Application: " + application + "\n" +
" Root Path: " + AuditApplication.buildPath(rootKey));
" Application: " + application + "\n" +
" Root Path: " + AuditApplication.buildPath(rootKey));
}
continue;
}
@@ -660,12 +671,15 @@ public class AuditComponentImpl implements AuditComponent
}
/**
* Audit values for a given application. No path checking is done.
* Audit values for a given application. No path checking is done.
*
* @param application the audit application to audit to
* @param disabledPaths the application's disabled paths
* @param values the values to store keyed by <b>full paths</b>.
* @return Returns all values as audited
* @param application
* the audit application to audit to
* @param disabledPaths
* the application's disabled paths
* @param values
* the values to store keyed by <b>full paths</b>.
* @return Returns all values as audited
*/
private Map<String, Serializable> audit(
final AuditApplication application,
@@ -686,8 +700,8 @@ public class AuditComponentImpl implements AuditComponent
{
logger.debug(
"Audit values have all been excluded by disabled paths: \n" +
" Application: " + application + "\n" +
" Values: " + values);
" Application: " + application + "\n" +
" Values: " + values);
}
return Collections.emptyMap();
}
@@ -695,7 +709,7 @@ public class AuditComponentImpl implements AuditComponent
Set<String> generatorKeys = values.keySet();
// Eliminate any paths that have been disabled
Iterator<String> generatorKeysIterator = generatorKeys.iterator();
while(generatorKeysIterator.hasNext())
while (generatorKeysIterator.hasNext())
{
String generatorKey = generatorKeysIterator.next();
for (String disabledPath : disabledPaths)
@@ -713,8 +727,7 @@ public class AuditComponentImpl implements AuditComponent
Map<String, Serializable> auditData = generateData(generators);
// Now extract values
Map<String, Serializable> extractedData = AuthenticationUtil.runAs(new RunAsWork<Map<String, Serializable>>()
{
Map<String, Serializable> extractedData = AuthenticationUtil.runAs(new RunAsWork<Map<String, Serializable>>() {
public Map<String, Serializable> doWork() throws Exception
{
return extractData(application, values);
@@ -757,9 +770,9 @@ public class AuditComponentImpl implements AuditComponent
StringBuilder sb = new StringBuilder();
sb.append(
((justGatherPreCallData) ? "\nPreCallData: \n" : "\nNew audit entry: \n") +
"\tApplication ID: " + applicationId + "\n" +
((justGatherPreCallData) ? "" : "\tEntry ID: " + entryId + "\n") +
"\tValues: " + "\n");
"\tApplication ID: " + applicationId + "\n" +
((justGatherPreCallData) ? "" : "\tEntry ID: " + entryId + "\n") +
"\tValues: " + "\n");
for (Map.Entry<String, Serializable> entry : values.entrySet())
{
sb.append("\t\t").append(entry).append("\n");
@@ -780,9 +793,9 @@ public class AuditComponentImpl implements AuditComponent
StringBuilder sb = new StringBuilder();
sb.append(
"\nNothing audited: \n" +
"\tApplication ID: " + applicationId + "\n" +
"\tEntry ID: " + entryId + "\n" +
"\tValues: " + "\n");
"\tApplication ID: " + applicationId + "\n" +
"\tEntry ID: " + entryId + "\n" +
"\tValues: " + "\n");
for (Map.Entry<String, Serializable> entry : values.entrySet())
{
sb.append("\t\t").append(entry).append("\n");
@@ -797,9 +810,11 @@ public class AuditComponentImpl implements AuditComponent
/**
* Extracts data from a given map using data extractors from the given application.
*
* @param application the application providing the data extractors
* @param values the data values from which to generate data
* @return Returns a map of derived data keyed by full path
* @param application
* the application providing the data extractors
* @param values
* the data values from which to generate data
* @return Returns a map of derived data keyed by full path
*
* @since 3.2
*/
@@ -820,13 +835,13 @@ public class AuditComponentImpl implements AuditComponent
// Check if it is triggered
if (!values.containsKey(triggerPath))
{
continue; // It is not triggered
continue; // It is not triggered
}
// We observe the key, not the actual value
if (!values.containsKey(sourcePath))
{
continue; // There is no data to extract
continue; // There is no data to extract
}
Serializable value = values.get(sourcePath);
@@ -846,9 +861,9 @@ public class AuditComponentImpl implements AuditComponent
{
throw new AlfrescoRuntimeException(
"Failed to extract audit data: \n" +
" Path: " + sourcePath + "\n" +
" Raw value: " + value + "\n" +
" Extractor: " + extractor,
" Path: " + sourcePath + "\n" +
" Raw value: " + value + "\n" +
" Extractor: " + extractor,
e);
}
// Add it to the map
@@ -860,8 +875,8 @@ public class AuditComponentImpl implements AuditComponent
StringBuilder sb = new StringBuilder();
sb.append(
"\nExtracted audit data: \n" +
"\tApplication: " + application + "\n" +
"\tValues: " + "\n");
"\tApplication: " + application + "\n" +
"\tValues: " + "\n");
for (Map.Entry<String, Serializable> entry : values.entrySet())
{
sb.append("\t\t").append(entry).append("\n");
@@ -877,8 +892,9 @@ public class AuditComponentImpl implements AuditComponent
}
/**
* @param generators the data generators
* @return Returns a map of generated data keyed by full path
* @param generators
* the data generators
* @return Returns a map of generated data keyed by full path
*
* @since 3.2
*/
@@ -898,8 +914,8 @@ public class AuditComponentImpl implements AuditComponent
{
throw new AlfrescoRuntimeException(
"Failed to generate audit data: \n" +
" Path: " + path + "\n" +
" Generator: " + generator,
" Path: " + path + "\n" +
" Generator: " + generator,
e);
}
// Add it to the map
@@ -947,6 +963,7 @@ public class AuditComponentImpl implements AuditComponent
{
// Get the id for the application
AuditApplication app = auditModelRegistry.getAuditApplicationByName(applicationName);
Long applicationId = app.getApplicationId();
if (applicationId == null)
{
@@ -956,8 +973,9 @@ public class AuditComponentImpl implements AuditComponent
return auditDAO.getAuditEntriesCountByApp(applicationId);
}
@Override public int getAuditEntriesCountByAppAndProperties(AuditQueryParameters parameters)
@Override
public int getAuditEntriesCountByAppAndProperties(String applicationName, AuditQueryParameters parameters)
{
return auditDAO.getAuditEntriesCountByAppAndProperties(parameters);
return auditDAO.getAuditEntriesCountByAppAndProperties(applicationName, parameters);
}
}

View File

@@ -55,6 +55,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.4
*/
public boolean isAuditEnabled()
@@ -64,6 +65,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.4
*/
@Override
@@ -74,6 +76,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.4
*/
@Override
@@ -95,6 +98,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.2
*/
public boolean isAuditEnabled(String applicationName, String path)
@@ -104,6 +108,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.2
*/
public void enableAudit(String applicationName, String path)
@@ -113,6 +118,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.2
*/
public void disableAudit(String applicationName, String path)
@@ -122,6 +128,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.2
*/
public int clearAudit(String applicationName)
@@ -132,6 +139,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.4
*/
@Override
@@ -143,6 +151,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 5.2.2
*/
@Override
@@ -153,6 +162,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.4
*/
@Override
@@ -163,6 +173,7 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*
* @since 3.3
*/
public void auditQuery(AuditQueryCallback callback, AuditQueryParameters parameters, int maxResults)
@@ -190,8 +201,10 @@ public class AuditServiceImpl implements AuditService
/**
* {@inheritDoc}
*/
@Override public int getAuditEntriesCountByAppAndProperties(AuditQueryParameters parameters)
@Override
public int getAuditEntriesCountByAppAndProperties(String applicationName, AuditQueryParameters parameters)
{
return auditComponent.getAuditEntriesCountByAppAndProperties(parameters);
return auditComponent.getAuditEntriesCountByAppAndProperties(applicationName, parameters);
}
}

View File

@@ -33,6 +33,9 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.cache.SimpleCache;
import org.alfresco.service.cmr.repository.ContentIOException;
@@ -40,12 +43,9 @@ import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.util.GUID;
import org.alfresco.util.Pair;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* A store providing support for content store implementations that provide
* routing of content read and write requests based on context.
* A store providing support for content store implementations that provide routing of content read and write requests based on context.
*
* @see ContentContext
*
@@ -69,7 +69,8 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
/**
* @param storesCache cache of stores used to access URLs
* @param storesCache
* cache of stores used to access URLs
*/
public void setStoresCache(SimpleCache<Pair<String, String>, ContentStore> storesCache)
{
@@ -77,27 +78,25 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
/**
* @return Returns a list of all possible stores available for reading or writing
* @return Returns a list of all possible stores available for reading or writing
*/
protected abstract List<ContentStore> getAllStores();
/**
* Get a content store based on the context provided. The applicability of the
* context and even the types of context allowed are up to the implementation, but
* normally there should be a fallback case for when the parameters are not adequate
* to make a decision.
* Get a content store based on the context provided. The applicability of the context and even the types of context allowed are up to the implementation, but normally there should be a fallback case for when the parameters are not adequate to make a decision.
*
* @param ctx the context to use to make the choice
* @return Returns the store most appropriate for the given context and
* <b>never <tt>null</tt></b>
* @param ctx
* the context to use to make the choice
* @return Returns the store most appropriate for the given context and <b>never <tt>null</tt></b>
*/
protected abstract ContentStore selectWriteStore(ContentContext ctx);
/**
* Checks the cache for the store and ensures that the URL is in the store.
*
* @param contentUrl the content URL to search for
* @return Returns the store matching the content URL
* @param contentUrl
* the content URL to search for
* @return Returns the store matching the content URL
*/
private ContentStore selectReadStore(String contentUrl)
{
@@ -122,12 +121,12 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
catch (UnsupportedContentUrlException e)
{
// This is odd. The store that previously supported the content URL
// no longer does so. I can't think of a reason why that would be.
// This is odd. The store that previously supported the content URL
// no longer does so. I can't think of a reason why that would be.
throw new AlfrescoRuntimeException(
"Found a content store that previously supported a URL, but no longer does: \n" +
" Store: " + store + "\n" +
" Content URL: " + contentUrl);
" Store: " + store + "\n" +
" Content URL: " + contentUrl);
}
}
}
@@ -148,8 +147,8 @@ public abstract class AbstractRoutingContentStore implements ContentStore
{
logger.debug(
"Found mapped store for content URL: \n" +
" Content URL: " + contentUrl + "\n" +
" Store: " + store);
" Content URL: " + contentUrl + "\n" +
" Store: " + store);
}
return store;
}
@@ -195,8 +194,8 @@ public abstract class AbstractRoutingContentStore implements ContentStore
{
logger.debug(
"Mapped content URL to store for reading: \n" +
" Content URL: " + contentUrl + "\n" +
" Store: " + store);
" Content URL: " + contentUrl + "\n" +
" Store: " + store);
}
return store;
}
@@ -207,7 +206,7 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
/**
* @return Returns <tt>true</tt> if the URL is supported by any of the stores.
* @return Returns <tt>true</tt> if the URL is supported by any of the stores.
*/
public boolean isContentUrlSupported(String contentUrl)
{
@@ -230,7 +229,7 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
/**
* @return Returns <tt>true</tt> if write is supported by any of the stores.
* @return Returns <tt>true</tt> if write is supported by any of the stores.
*/
public boolean isWriteSupported()
{
@@ -253,7 +252,7 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
/**
* @return Returns <b>.</b> always
* @return Returns <b>.</b> always
*/
public String getRootLocation()
{
@@ -261,7 +260,7 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
/**
* @return Returns <tt>-1</tt> always
* @return Returns <tt>-1</tt> always
*/
@Override
public long getSpaceFree()
@@ -270,7 +269,7 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
/**
* @return Returns <tt>-1</tt> always
* @return Returns <tt>-1</tt> always
*/
@Override
public long getSpaceTotal()
@@ -288,8 +287,7 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
/**
* @return Returns a valid reader from one of the stores otherwise
* a {@link EmptyContentReader} is returned.
* @return Returns a valid reader from one of the stores otherwise a {@link EmptyContentReader} is returned.
*/
public ContentReader getReader(String contentUrl) throws ContentIOException
{
@@ -335,13 +333,7 @@ public abstract class AbstractRoutingContentStore implements ContentStore
{
throw new ContentExistsException(this, contentUrl);
}
/*
* We could go further and check each store for the existence of the URL,
* but that would be overkill. The main problem we need to prevent is
* the simultaneous access of the same store. The router represents
* a single store and therefore if the URL is present in any of the stores,
* it is effectively present in all of them.
*/
/* We could go further and check each store for the existence of the URL, but that would be overkill. The main problem we need to prevent is the simultaneous access of the same store. The router represents a single store and therefore if the URL is present in any of the stores, it is effectively present in all of them. */
}
finally
{
@@ -355,15 +347,15 @@ public abstract class AbstractRoutingContentStore implements ContentStore
{
throw new NullPointerException(
"Unable to find a writer. 'selectWriteStore' may not return null: \n" +
" Router: " + this + "\n" +
" Chose: " + store);
" Router: " + this + "\n" +
" Chose: " + store);
}
else if (!store.isWriteSupported())
{
throw new AlfrescoRuntimeException(
"A write store was chosen that doesn't support writes: \n" +
" Router: " + this + "\n" +
" Chose: " + store);
" Router: " + this + "\n" +
" Chose: " + store);
}
ContentWriter writer = store.getWriter(context);
String newContentUrl = writer.getContentUrl();
@@ -383,9 +375,9 @@ public abstract class AbstractRoutingContentStore implements ContentStore
{
logger.debug(
"Got writer and cache URL from store: \n" +
" Context: " + context + "\n" +
" Writer: " + writer + "\n" +
" Store: " + store);
" Context: " + context + "\n" +
" Writer: " + writer + "\n" +
" Store: " + store);
}
return writer;
}
@@ -396,8 +388,7 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
/**
* This operation has to be performed on all the stores in order to maintain the
* {@link ContentStore#exists(String)} contract.
* This operation has to be performed on all the stores in order to maintain the {@link ContentStore#exists(String)} contract.
*/
public boolean delete(String contentUrl) throws ContentIOException
{
@@ -470,7 +461,7 @@ public abstract class AbstractRoutingContentStore implements ContentStore
}
final String message = "Restoring content from archive: ";
logExecution(contentUrl, contentStore, message);
return ContentStore.super.requestRestoreContentFromArchive(contentUrl, restoreParams);
return contentStore.requestRestoreContentFromArchive(contentUrl, restoreParams);
}
private void logExecution(final String contentUrl, final ContentStore contentStore, final String message)

View File

@@ -42,27 +42,21 @@ public class CrcHelper
public static final String EMPTY_STRING = ".empty";
/**
* Calculate a persistable, unique pair of values that can be persisted in a database unique
* key and guarantee correct case-sensitivity.
* Calculate a persistable, unique pair of values that can be persisted in a database unique key and guarantee correct case-sensitivity.
* <p>
* While the short-string version of the value is always lowercase, the CRC is
* calculated from the virgin string if case-sensitivity is enforced; in the case-insensitive
* case, the CRC is calculated from a lowercase version of the string.
* While the short-string version of the value is always lowercase, the CRC is calculated from the virgin string if case-sensitivity is enforced; in the case-insensitive case, the CRC is calculated from a lowercase version of the string.
* <p>
* If the value is an empty string, then {@link #EMPTY_STRING} is used instead. This ensures
* that persisted values don't fall foul of the Oracle empty string comparison "behaviour" i.e
* you should never persist an empty string in Oracle as it equates to a SQL <b>NULL</b>.
* If the value is an empty string, then {@link #EMPTY_STRING} is used instead. This ensures that persisted values don't fall foul of the Oracle empty string comparison "behaviour" i.e you should never persist an empty string in Oracle as it equates to a SQL <b>NULL</b>.
*
* @param value the raw value that will be persisted
* @param dataLength the maximum number of characters that can be persisted
* @param useCharsFromStart <tt>true</tt> if the shortened string value must be made from
* the first characters of the string or <tt>false</tt> to use
* characters from the end of the string.
* @param caseSensitive <tt>true</tt> if the resulting pair must be case-sensitive or
* <tt>false</tt> if the pair must be case-insensitive.
* @return Return the persistable pair. The result will never be <tt>null</tt>,
* but the individual pair values will be <tt>null</tt> if the
* value given is <tt>null</tt>
* @param value
* the raw value that will be persisted
* @param dataLength
* the maximum number of characters that can be persisted
* @param useCharsFromStart
* <tt>true</tt> if the shortened string value must be made from the first characters of the string or <tt>false</tt> to use characters from the end of the string.
* @param caseSensitive
* <tt>true</tt> if the resulting pair must be case-sensitive or <tt>false</tt> if the pair must be case-insensitive.
* @return Return the persistable pair. The result will never be <tt>null</tt>, but the individual pair values will be <tt>null</tt> if the value given is <tt>null</tt>
*/
public static Pair<String, Long> getStringCrcPair(
String value,
@@ -101,22 +95,22 @@ public class CrcHelper
catch (UnsupportedEncodingException e)
{
throw new RuntimeException("UTF-8 encoding is not supported");
}
// Crc Value will change based on the case-sensitive, So we need to get the short value based on case-sensitive
// Get the short value (case-sensitive or not)
String valueShort = null;
String currentValue = caseSensitive ? value : valueLowerCase;
int valueLen = currentValue.length();
int valueLen = valueLowerCase.length();
if (valueLen < dataLength)
{
valueShort = currentValue;
valueShort = valueLowerCase;
}
else if (useCharsFromStart)
{
valueShort = currentValue.substring(0, dataLength - 1);
valueShort = valueLowerCase.substring(0, dataLength - 1);
}
else
{
valueShort = currentValue.substring(valueLen - dataLength);
valueShort = valueLowerCase.substring(valueLen - dataLength);
}
return new Pair<String, Long>(valueShort, valueCrc);
}

View File

@@ -39,17 +39,14 @@ import org.alfresco.util.Pair;
/**
* DAO services for <b>alf_audit_XXX</b> tables.
* <p>
* The older methods are supported by a different implementation and will eventually
* be deprecated and phased out.
* The older methods are supported by a different implementation and will eventually be deprecated and phased out.
*
* @author Derek Hulley
* @since 3.2
*/
public interface AuditDAO
{
/*
* V3.2 methods after here only, please
*/
/* V3.2 methods after here only, please */
/**
* Information about the audit application to be passed in an out of the interface.
@@ -69,11 +66,11 @@ public interface AuditDAO
{
StringBuilder sb = new StringBuilder();
sb.append("AuditApplicationInfo ")
.append("[ id=").append(id)
.append(", name=").append(name)
.append(", modelId=").append(modelId)
.append(", disabledPathsId=").append(disabledPathsId)
.append("]");
.append("[ id=").append(id)
.append(", name=").append(name)
.append(", modelId=").append(modelId)
.append(", disabledPathsId=").append(disabledPathsId)
.append("]");
return sb.toString();
}
@@ -81,30 +78,37 @@ public interface AuditDAO
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public String getName()
{
return name;
}
public void setname(String name)
{
this.name = name;
}
public Long getModelId()
{
return modelId;
}
public void setModelId(Long modelId)
{
this.modelId = modelId;
}
public Long getDisabledPathsId()
{
return disabledPathsId;
}
public void setDisabledPathsId(Long disabledPathsId)
{
this.disabledPathsId = disabledPathsId;
@@ -114,9 +118,9 @@ public interface AuditDAO
/**
* Creates a new audit model entry or finds an existing one
*
* @param url the URL of the configuration
* @return Returns the ID of the config matching the input stream and the
* content storage details
* @param url
* the URL of the configuration
* @return Returns the ID of the config matching the input stream and the content storage details
* @since 3.2
*/
Pair<Long, ContentData> getOrCreateAuditModel(URL url);
@@ -124,40 +128,45 @@ public interface AuditDAO
/**
* Get the audit application details.
*
* @param applicationName the name of the application
* @return Returns details of an existing application or <tt>null</tt> if it doesn't exist
* @param applicationName
* the name of the application
* @return Returns details of an existing application or <tt>null</tt> if it doesn't exist
*
* @since 3.2
*/
AuditApplicationInfo getAuditApplication(String applicationName);
/**
* Creates a new audit application. The application name must be unique.
* Creates a new audit application. The application name must be unique.
*
* @param application the name of the application
* @param modelId the ID of the model configuration
* @param application
* the name of the application
* @param modelId
* the ID of the model configuration
*
* @since 3.2
*/
AuditApplicationInfo createAuditApplication(String application, Long modelId);
/**
* Update the audit application to refer to a new model.
* If the model did not change, then nothing will be done.
* Update the audit application to refer to a new model. If the model did not change, then nothing will be done.
*
* @param id the ID of the audit application
* @param modelId the ID of the new model
* @param id
* the ID of the audit application
* @param modelId
* the ID of the new model
*
* @since 3.2
*/
void updateAuditApplicationModel(Long id, Long modelId);
/**
* Update the audit application to hold a new set of disabled paths.
* If the value did not change, then nothing will be done.
* Update the audit application to hold a new set of disabled paths. If the value did not change, then nothing will be done.
*
* @param id the ID of the audit application
* @param disabledPaths the new disabled paths
* @param id
* the ID of the audit application
* @param disabledPaths
* the new disabled paths
*
* @since 3.2
*/
@@ -166,10 +175,13 @@ public interface AuditDAO
/**
* Delete audit entries for the application, possibly limiting the time range.
*
* @param applicationId an existing audit application ID
* @param fromTime the minimum entry time (inclusive, optional)
* @param toTime the maximum entry time (exclusive, optional)
* @return Returns the number of entries deleted
* @param applicationId
* an existing audit application ID
* @param fromTime
* the minimum entry time (inclusive, optional)
* @param toTime
* the maximum entry time (exclusive, optional)
* @return Returns the number of entries deleted
*
* @since 3.2
*/
@@ -178,34 +190,39 @@ public interface AuditDAO
/**
* Delete audit entries for the application for given id range.
*
* @param applicationId an existing audit application ID
* @param fromId the minimum fromId (inclusive, optional)
* @param toId the maximum toId (exclusive, optional)
* @return Returns the number of entries deleted
* @param applicationId
* an existing audit application ID
* @param fromId
* the minimum fromId (inclusive, optional)
* @param toId
* the maximum toId (exclusive, optional)
* @return Returns the number of entries deleted
*
* @since 5.2.2
*/
int deleteAuditEntriesByIdRange(Long applicationId, Long fromId, Long toId);
/**
* Delete a discrete list of audit entries. Duplicate entries are collapsed
* and the number of entries deleted will match the count of unique IDs in
* the list; otherwise a concurrency condition has occured and an exception
* will be generated.
* Delete a discrete list of audit entries. Duplicate entries are collapsed and the number of entries deleted will match the count of unique IDs in the list; otherwise a concurrency condition has occured and an exception will be generated.
*
* @param auditEntryIds the IDs of all audit entries to delete
* @return Returns the number of entries deleted
* @param auditEntryIds
* the IDs of all audit entries to delete
* @return Returns the number of entries deleted
*/
int deleteAuditEntries(List<Long> auditEntryIds);
/**
* Create a new audit entry with the given map of values.
*
* @param applicationId an existing audit application ID
* @param time the time (ms since epoch) to log the entry against
* @param username the authenticated user (<tt>null</tt> if not present)
* @param values the values to record
* @return Returns the unique entry ID
* @param applicationId
* an existing audit application ID
* @param time
* the time (ms since epoch) to log the entry against
* @param username
* the authenticated user (<tt>null</tt> if not present)
* @param values
* the values to record
* @return Returns the unique entry ID
*
* @since 3.2
*/
@@ -214,11 +231,15 @@ public interface AuditDAO
/**
* Find audit entries using the given parameters, any of which may be null
*
* @param callback the data callback per entry
* @param parameters the parameters for the query (may not be <tt>null</tt>)
* @param maxResults the maximum number of results to retrieve (must be greater than 0)
* @param callback
* the data callback per entry
* @param parameters
* the parameters for the query (may not be <tt>null</tt>)
* @param maxResults
* the maximum number of results to retrieve (must be greater than 0)
*
* @throws IllegalArgumentException if maxResults less or equal to zero
* @throws IllegalArgumentException
* if maxResults less or equal to zero
*/
void findAuditEntries(
AuditQueryCallback callback,
@@ -228,17 +249,20 @@ public interface AuditDAO
/**
* Issue an audit query to retrieve min / max audit record id for a given application.
*
* @param appId the database id of the application
* @param extremes a list containing min/max or both
* @return a map containing min/max and the associated value
* @param appId
* the database id of the application
* @param extremes
* a list containing min/max or both
* @return a map containing min/max and the associated value
*/
HashMap<String, Long> getAuditMinMaxByApp(long appId, List<String> extremes);
/**
* Issue an audit query to retrieve count of records for a given application.
*
* @param applicationId the database id of the application
* @return a map containing min/max and the associated value
* @param applicationId
* the database id of the application
* @return a map containing min/max and the associated value
*/
default int getAuditEntriesCountByApp(long applicationId)
{
@@ -248,10 +272,13 @@ public interface AuditDAO
/**
* Issue an audit query to retrieve count of records for a given application and properties
*
* @param parameters audit parameters provided by the <code>where</code> clause on the ReST API
* @return a map containing min/max and the associated value
* @param applicationName
* name of the application to be queried
* @param parameters
* audit parameters provided by the <code>where</code> clause on the ReST API
* @return a map containing min/max and the associated value
*/
default int getAuditEntriesCountByAppAndProperties(org.alfresco.service.cmr.audit.AuditQueryParameters parameters)
default int getAuditEntriesCountByAppAndProperties(String applicationName, org.alfresco.service.cmr.audit.AuditQueryParameters parameters)
{
return -1;
}

View File

@@ -32,6 +32,10 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.ibatis.session.RowBounds;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.dao.ConcurrencyFailureException;
import org.alfresco.repo.domain.audit.AbstractAuditDAOImpl;
import org.alfresco.repo.domain.audit.AuditApplicationEntity;
import org.alfresco.repo.domain.audit.AuditDeleteParameters;
@@ -41,9 +45,6 @@ import org.alfresco.repo.domain.audit.AuditQueryParameters;
import org.alfresco.repo.domain.audit.AuditQueryResult;
import org.alfresco.repo.domain.propval.PropertyValueDAO.PropertyFinderCallback;
import org.alfresco.util.Pair;
import org.apache.ibatis.session.RowBounds;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.dao.ConcurrencyFailureException;
/**
* iBatis-specific implementation of the DAO for <b>alf_audit_XXX</b> tables.
@@ -146,7 +147,7 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
protected AuditApplicationEntity createAuditApplication(Long appNameId, Long modelId, Long disabledPathsId)
{
AuditApplicationEntity entity = new AuditApplicationEntity();
entity.setVersion((short)0);
entity.setVersion((short) 0);
entity.setApplicationNameId(appNameId);
entity.setAuditModelId(modelId);
entity.setDisabledPathsId(disabledPathsId);
@@ -237,7 +238,7 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
}
@Override
public int getAuditEntriesCountByAppAndProperties(org.alfresco.service.cmr.audit.AuditQueryParameters parameters)
public int getAuditEntriesCountByAppAndProperties(String applicationName, org.alfresco.service.cmr.audit.AuditQueryParameters parameters)
{
AuditQueryParameters dbParameters = convertFromRestAuditQueryParameters(parameters);
@@ -254,18 +255,17 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
org.alfresco.service.cmr.audit.AuditQueryParameters restParameters)
{
AuditQueryParameters params = convertFromRestAuditQueryParameters(restParameters);
if (params==null)
if (params == null)
{
return;
}
if (maxResults > 0)
{
// Query without getting the values. We gather all the results and batch-fetch the audited
// Query without getting the values. We gather all the results and batch-fetch the audited
// values afterwards.
final Map<Long, AuditQueryResult> resultsByValueId = new HashMap<Long, AuditQueryResult>(173);
PropertyFinderCallback propertyFinderCallback = new PropertyFinderCallback()
{
PropertyFinderCallback propertyFinderCallback = new PropertyFinderCallback() {
public void handleProperty(Long id, Serializable value)
{
// get the row
@@ -287,7 +287,7 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
resultsByValueId.put(row.getAuditValuesId(), row);
if (resultsByValueId.size() >= 100)
{
// Fetch values for the results. The treemap is ordered.
// Fetch values for the results. The treemap is ordered.
List<Long> valueIds = new ArrayList<Long>(resultsByValueId.keySet());
propertyValueDAO.getPropertiesByIds(valueIds, propertyFinderCallback);
// Clear and continue
@@ -297,7 +297,7 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
// Process any remaining results
if (resultsByValueId.size() > 0)
{
// Fetch values for the results. The treemap is ordered.
// Fetch values for the results. The treemap is ordered.
List<Long> valueIds = new ArrayList<Long>(resultsByValueId.keySet());
propertyValueDAO.getPropertiesByIds(valueIds, propertyFinderCallback);
}
@@ -313,4 +313,3 @@ public class AuditDAOImpl extends AbstractAuditDAOImpl
}
}
}

View File

@@ -44,11 +44,9 @@ public class PropertyStringValueEntity
private String stringValue;
private String stringEndLower;
private Long stringCrc;
private String stringLower;
public PropertyStringValueEntity()
{
}
{}
@Override
public int hashCode()
@@ -79,9 +77,9 @@ public class PropertyStringValueEntity
{
StringBuilder sb = new StringBuilder(512);
sb.append("PropertyStringValueEntity")
.append("[ ID=").append(id)
.append(", stringValue=").append(stringValue)
.append("]");
.append("[ ID=").append(id)
.append(", stringValue=").append(stringValue)
.append("]");
return sb.toString();
}
@@ -116,9 +114,7 @@ public class PropertyStringValueEntity
Pair<String, Long> crcPair = CrcHelper.getStringCrcPair(value, 16, false, true);
stringEndLower = crcPair.getFirst();
stringCrc = crcPair.getSecond();
// Calculate the crc value with case-insensitive
Pair<String, Long> crcPairWithCaseInSensitive = CrcHelper.getStringCrcPair(value, 16, false, false);
stringLower = crcPairWithCaseInSensitive.getFirst();
}
public Long getId()
@@ -160,14 +156,4 @@ public class PropertyStringValueEntity
{
this.stringCrc = stringCrc;
}
public String getStringLower()
{
return stringLower;
}
public void setStringLower(String stringLower)
{
this.stringLower = stringLower;
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* 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
@@ -37,6 +37,12 @@ import java.util.Deque;
import java.util.Iterator;
import java.util.LinkedList;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.UnicodeExtraFieldPolicy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
@@ -51,12 +57,6 @@ import org.alfresco.service.cmr.view.ExporterContext;
import org.alfresco.service.cmr.view.ExporterException;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.UnicodeExtraFieldPolicy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Handler for exporting node content to a ZIP file
@@ -93,18 +93,31 @@ public class ZipDownloadExporter extends BaseExporter
/**
* Construct
*
* @param zipFile File
* @param checkOutCheckInService CheckOutCheckInService
* @param nodeService NodeService
* @param transactionHelper RetryingTransactionHelper
* @param updateService DownloadStatusUpdateService
* @param downloadStorage DownloadStorage
* @param dictionaryService DictionaryService
* @param downloadNodeRef NodeRef
* @param total long
* @param totalFileCount long
* @param zipFile
* File
* @param checkOutCheckInService
* CheckOutCheckInService
* @param nodeService
* NodeService
* @param transactionHelper
* RetryingTransactionHelper
* @param updateService
* DownloadStatusUpdateService
* @param downloadStorage
* DownloadStorage
* @param dictionaryService
* DictionaryService
* @param downloadNodeRef
* NodeRef
* @param total
* long
* @param totalFileCount
* long
*/
public ZipDownloadExporter(File zipFile, CheckOutCheckInService checkOutCheckInService, NodeService nodeService, RetryingTransactionHelper transactionHelper, DownloadStatusUpdateService updateService, DownloadStorage downloadStorage, DictionaryService dictionaryService, NodeRef downloadNodeRef, long total, long totalFileCount)
public ZipDownloadExporter(File zipFile, CheckOutCheckInService checkOutCheckInService, NodeService nodeService,
RetryingTransactionHelper transactionHelper, DownloadStatusUpdateService updateService,
DownloadStorage downloadStorage, DictionaryService dictionaryService,
NodeRef downloadNodeRef, long total, long totalFileCount)
{
super(checkOutCheckInService, nodeService);
try
@@ -130,7 +143,7 @@ public class ZipDownloadExporter extends BaseExporter
{
zipStream = new ZipArchiveOutputStream(outputStream);
// NOTE: This encoding allows us to workaround bug...
// http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4820807
// http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_id=4820807
zipStream.setEncoding("UTF-8");
zipStream.setCreateUnicodeExtraFields(UnicodeExtraFieldPolicy.ALWAYS);
zipStream.setUseLanguageEncodingFlag(true);
@@ -140,9 +153,9 @@ public class ZipDownloadExporter extends BaseExporter
@Override
public void startNode(NodeRef nodeRef)
{
this.currentName = (String)nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
this.zipTimestampCreated = (Date)nodeService.getProperty(nodeRef, ContentModel.PROP_CREATED);
this.zipTimestampModified = (Date)nodeService.getProperty(nodeRef, ContentModel.PROP_MODIFIED);
this.currentName = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
this.zipTimestampCreated = (Date) nodeService.getProperty(nodeRef, ContentModel.PROP_CREATED);
this.zipTimestampModified = (Date) nodeService.getProperty(nodeRef, ContentModel.PROP_MODIFIED);
path.push(new Pair<String, NodeRef>(currentName, nodeRef));
if (dictionaryService.isSubClass(nodeService.getType(nodeRef), ContentModel.TYPE_FOLDER))
{
@@ -169,6 +182,8 @@ public class ZipDownloadExporter extends BaseExporter
// if the content stream to output is empty, then just return content descriptor as is
if (content == null)
{
log.info("Archiving content has been removed or modified for the specified NodeReference: " + nodeRef
+ ", and the size of the content is " + contentData.getSize());
return;
}
@@ -176,10 +191,11 @@ public class ZipDownloadExporter extends BaseExporter
{
if (log.isDebugEnabled())
{
log.debug("Archiving content for nodeRef: "+nodeRef+" with contentURL: "+contentData.getContentUrl());
log.debug("Archiving content for nodeRef: " + nodeRef + " with contentURL: "
+ contentData.getContentUrl());
}
// ALF-2016
ZipArchiveEntry zipEntry=new ZipArchiveEntry(getPath());
ZipArchiveEntry zipEntry = new ZipArchiveEntry(getPath());
zipEntry.setTime(zipTimestampCreated.getTime());
zipEntry.setCreationTime(FileTime.fromMillis(zipTimestampCreated.getTime()));
zipEntry.setLastModifiedTime(FileTime.fromMillis(zipTimestampModified.getTime()));
@@ -243,15 +259,16 @@ public class ZipDownloadExporter extends BaseExporter
/**
* Copy input stream to output stream
*
* @param output output stream
* @param in input stream
* @param output
* output stream
* @param in
* input stream
* @throws IOException
*/
private void copyStream(OutputStream output, InputStream in)
throws IOException
private void copyStream(OutputStream output, InputStream in) throws IOException
{
byte[] buffer = new byte[2048 * 10];
int read = in.read(buffer, 0, 2048 *10);
int read = in.read(buffer, 0, 2048 * 10);
int i = 0;
while (read != -1)
{
@@ -259,20 +276,19 @@ public class ZipDownloadExporter extends BaseExporter
done = done + read;
// ALF-16289 - only update the status every 10MB
if (i++%500 == 0)
if (i++ % 500 == 0)
{
updateStatus();
checkCancelled();
}
read = in.read(buffer, 0, 2048 *10);
read = in.read(buffer, 0, 2048 * 10);
}
}
private void checkCancelled()
{
boolean downloadCancelled = transactionHelper.doInTransaction(new RetryingTransactionCallback<Boolean>()
{
boolean downloadCancelled = transactionHelper.doInTransaction(new RetryingTransactionCallback<Boolean>() {
@Override
public Boolean execute() throws Throwable
{
@@ -280,7 +296,7 @@ public class ZipDownloadExporter extends BaseExporter
}
}, true, true);
if ( downloadCancelled == true)
if (downloadCancelled == true)
{
log.debug("Download cancelled");
throw new DownloadCancelledException();
@@ -289,8 +305,7 @@ public class ZipDownloadExporter extends BaseExporter
private void updateStatus()
{
transactionHelper.doInTransaction(new RetryingTransactionCallback<Object>()
{
transactionHelper.doInTransaction(new RetryingTransactionCallback<Object>() {
@Override
public Object execute() throws Throwable
{

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* 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
@@ -25,14 +25,15 @@
*/
package org.alfresco.repo.site;
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.query.CannedQuerySortDetails;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.util.Pair;
import java.util.Comparator;
import java.util.List;
/**
* Conveys information for a member of a site.
*
@@ -52,7 +53,7 @@ public class SiteMembership extends AbstractSiteMembership
public SiteMembership(SiteInfo siteInfo, String id, String firstName, String lastName,
String role)
{
super(siteInfo,id, role);
super(siteInfo, id, role);
if (firstName == null)
{
throw new java.lang.IllegalArgumentException(
@@ -76,13 +77,8 @@ public class SiteMembership extends AbstractSiteMembership
throw new java.lang.IllegalArgumentException(
"FirstName required building site membership of " + siteInfo.getShortName());
}
if (lastName == null)
{
throw new java.lang.IllegalArgumentException(
"LastName required building site membership of " + siteInfo.getShortName());
}
this.firstName = firstName;
this.lastName = lastName;
this.lastName = Optional.ofNullable(lastName).orElse("");
this.isMemberOfGroup = isMemberOfGroup;
}
@@ -164,7 +160,6 @@ public class SiteMembership extends AbstractSiteMembership
", isMemberOfGroup = " + isMemberOfGroup + "]";
}
static int compareTo(List<Pair<? extends Object, CannedQuerySortDetails.SortOrder>> sortPairs, SiteMembership o1, SiteMembership o2)
{
String personId1 = o1.getPersonId();

View File

@@ -38,7 +38,7 @@ import java.util.Map;
public interface AuditService
{
/**
* @return Returns <tt>true</tt> if auditing is globally enabled
* @return Returns <tt>true</tt> if auditing is globally enabled
*
* @since 3.4
*/
@@ -47,7 +47,8 @@ public interface AuditService
/**
* Enable or disable the global auditing state
*
* @param enable <tt>true</tt> to enable auditing globally or <tt>false</tt> to disable
* @param enable
* <tt>true</tt> to enable auditing globally or <tt>false</tt> to disable
*
* @since 3.4
*/
@@ -64,6 +65,7 @@ public interface AuditService
private final String name;
private final String key;
private final boolean enabled;
/**
* Constructor for final variables
*/
@@ -73,14 +75,17 @@ public interface AuditService
this.key = key;
this.enabled = enabled;
}
public String getName()
{
return name;
}
public String getKey()
{
return key;
}
public boolean isEnabled()
{
return enabled;
@@ -90,16 +95,18 @@ public interface AuditService
/**
* Get all registered audit applications
*
* @return Returns a map of audit applications keyed by their name
* @return Returns a map of audit applications keyed by their name
*
* @since 3.4
*/
Map<String, AuditApplication> getAuditApplications();
/**
* @param applicationName the name of the application to check
* @param path the path to check
* @return Returns <tt>true</tt> if auditing is enabled for the given path
* @param applicationName
* the name of the application to check
* @param path
* the path to check
* @return Returns <tt>true</tt> if auditing is enabled for the given path
*
* @since 3.2
*/
@@ -108,8 +115,10 @@ public interface AuditService
/**
* Enable auditing for an application path
*
* @param applicationName the name of the application to check
* @param path the path to enable
* @param applicationName
* the name of the application to check
* @param path
* the path to enable
*
* @since 3.2
*/
@@ -118,8 +127,10 @@ public interface AuditService
/**
* Disable auditing for an application path
*
* @param applicationName the name of the application to check
* @param path the path to disable
* @param applicationName
* the name of the application to check
* @param path
* the path to disable
*
* @since 3.2
*/
@@ -128,24 +139,26 @@ public interface AuditService
/**
* Remove all audit entries for the given application
*
* @param applicationName the name of the application for which to remove entries
* @return Returns the number of audit entries deleted
* @param applicationName
* the name of the application for which to remove entries
* @return Returns the number of audit entries deleted
*
* @since 3.2
*
* @deprecated Use {@link #clearAudit(String, Long, Long)}
* @deprecated Use {@link #clearAudit(String, Long, Long)}
*/
int clearAudit(String applicationName);
/**
* Remove audit entries for the given application between the time ranges. If no start
* time is given then entries are deleted as far back as they exist. If no end time is
* given then entries are deleted up until the current time.
* Remove audit entries for the given application between the time ranges. If no start time is given then entries are deleted as far back as they exist. If no end time is given then entries are deleted up until the current time.
*
* @param applicationName the name of the application for which to remove entries
* @param fromTime the start time of entries to remove (inclusive and optional)
* @param toTime the end time of entries to remove (exclusive and optional)
* @return Returns the number of audit entries deleted
* @param applicationName
* the name of the application for which to remove entries
* @param fromTime
* the start time of entries to remove (inclusive and optional)
* @param toTime
* the end time of entries to remove (exclusive and optional)
* @return Returns the number of audit entries deleted
*
* @since 3.4
*/
@@ -154,10 +167,13 @@ public interface AuditService
/**
* Remove audit entries for the given application between the audit entry ids.
*
* @param applicationName the name of the application for which to remove entries
* @param fromId the start time of entries to remove (inclusive and optional)
* @param toId the end time of entries to remove (exclusive and optional)
* @return Returns the number of audit entries deleted
* @param applicationName
* the name of the application for which to remove entries
* @param fromId
* the start time of entries to remove (inclusive and optional)
* @param toId
* the end time of entries to remove (exclusive and optional)
* @return Returns the number of audit entries deleted
*
* @since 5.2.2
*/
@@ -166,11 +182,11 @@ public interface AuditService
/**
* Delete a discrete list of audit entries.
* <p/>
* This method should not be called <i>while</i> processing
* {@link #auditQuery(AuditQueryCallback, AuditQueryParameters, int) query results}.
* This method should not be called <i>while</i> processing {@link #auditQuery(AuditQueryCallback, AuditQueryParameters, int) query results}.
*
* @param auditEntryIds the IDs of all audit entries to delete
* @return Returns the number of audit entries deleted
* @param auditEntryIds
* the IDs of all audit entries to delete
* @return Returns the number of audit entries deleted
*
* @since 3.4
*/
@@ -184,8 +200,7 @@ public interface AuditService
public static interface AuditQueryCallback
{
/**
* Determines whether this callback requires the values argument to be populated when {@link #handleAuditEntry}
* is called.
* Determines whether this callback requires the values argument to be populated when {@link #handleAuditEntry} is called.
*
* @return <code>true</code> if this callback requires the values argument to be populated
*/
@@ -194,12 +209,17 @@ public interface AuditService
/**
* Handle a row of audit entry data.
*
* @param entryId the unique audit entry ID
* @param applicationName the name of the application
* @param user the user that logged the entry
* @param time the time of the entry
* @param values the values map as created
* @return Return <tt>true</tt> to continue processing rows or <tt>false</tt> to stop
* @param entryId
* the unique audit entry ID
* @param applicationName
* the name of the application
* @param user
* the user that logged the entry
* @param time
* the time of the entry
* @param values
* the values map as created
* @return Return <tt>true</tt> to continue processing rows or <tt>false</tt> to stop
*/
boolean handleAuditEntry(
Long entryId,
@@ -211,23 +231,29 @@ public interface AuditService
/**
* Handle audit entry failures
*
* @param entryId the entry ID
* @param errorMsg the error message
* @param error the exception causing the error (may be <tt>null</tt>)
* @return Return <tt>true</tt> to continue processing rows or <tt>false</tt> to stop
* @param entryId
* the entry ID
* @param errorMsg
* the error message
* @param error
* the exception causing the error (may be <tt>null</tt>)
* @return Return <tt>true</tt> to continue processing rows or <tt>false</tt> to stop
*/
boolean handleAuditEntryError(Long entryId, String errorMsg, Throwable error);
}
/**
* Issue an audit query using the given parameters and consuming results in the callback.
* Results are returned in entry order, corresponding to time order.
* Issue an audit query using the given parameters and consuming results in the callback. Results are returned in entry order, corresponding to time order.
*
* @param callback the callback that will handle results
* @param parameters the parameters for the query (may not be <tt>null</tt>)
* @param maxResults the maximum number of results to retrieve (must be greater than 0)
* @param callback
* the callback that will handle results
* @param parameters
* the parameters for the query (may not be <tt>null</tt>)
* @param maxResults
* the maximum number of results to retrieve (must be greater than 0)
*
* @throws IllegalArgumentException if maxResults less or equal to zero
* @throws IllegalArgumentException
* if maxResults less or equal to zero
*
* @since 3.3
*/
@@ -236,17 +262,20 @@ public interface AuditService
/**
* Issue an audit query to retrieve min / max audit record id for a given application.
*
* @param applicationName the name of the application
* @param extremes a list containing min/max or both
* @return a map containing min/max and the associated value
* @param applicationName
* the name of the application
* @param extremes
* a list containing min/max or both
* @return a map containing min/max and the associated value
*/
HashMap<String, Long> getAuditMinMaxByApp(String applicationName, List<String> extremes);
/**
* Issue an audit query to retrieve min / max audit record id for a given application.
*
* @param applicationName the name of the application
* @return a map containing min/max and the associated value
* @param applicationName
* the name of the application
* @return a map containing min/max and the associated value
*/
default int getAuditEntriesCountByApp(String applicationName)
{
@@ -256,11 +285,15 @@ public interface AuditService
/**
* Issue an audit query to retrieve min / max audit record id for a given application and properties
*
* @param parameters audit parameters provided by the <code>where</code> clause on the ReST API
* @return a map containing min/max and the associated value
* @param applicationName
* the name of the application
* @param parameters
* audit parameters provided by the <code>where</code> clause on the ReST API
* @return a map containing min/max and the associated value
*/
default int getAuditEntriesCountByAppAndProperties(AuditQueryParameters parameters)
default int getAuditEntriesCountByAppAndProperties(String applicationName, AuditQueryParameters parameters)
{
return -1;
}
}

View File

@@ -3,7 +3,7 @@
repository.name=Main Repository
# Schema number
version.schema=19300
version.schema=20000
# Directory configuration

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* 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
@@ -29,11 +29,12 @@ import static org.junit.Assert.assertEquals;
import java.util.UUID;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteVisibility;
import org.junit.Before;
import org.junit.Test;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteVisibility;
/**
* Test Membership constructor logs. Based on REPO-2520
*
@@ -56,10 +57,10 @@ public class SiteMembershipTest
@Before
public void createSite()
{
String sitePreset = "testSiteMembershipPreset";
String shortName = "testSiteMembershipShortName";
String title = "testSiteMembershipTile";
String description = "testSiteMembershipDescription";
var sitePreset = "testSiteMembershipPreset";
var shortName = "testSiteMembershipShortName";
var title = "testSiteMembershipTile";
var description = "testSiteMembershipDescription";
siteInfo = new SiteInfoImpl(sitePreset, shortName, title, description,
SiteVisibility.PUBLIC, null);
}