Compare commits

..

94 Commits

Author SHA1 Message Date
Travis CI User
611b89e544 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-27 12:23:04 +00:00
Travis CI User
9205486959 [maven-release-plugin][skip ci] prepare release 14.91 2022-01-27 12:23:02 +00:00
Denys Vuika
47e58e1303 ACS-2408 update rest-api-explorer to 7.2.0-M2 2022-01-27 11:31:13 +00:00
Travis CI User
398a03f3dd [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-26 22:25:51 +00:00
Travis CI User
4338693f81 [maven-release-plugin][skip ci] prepare release 14.90 2022-01-26 22:25:48 +00:00
alandavis
449fe34856 ATS-973 Bump t-core to 2.5.5 2022-01-26 21:30:09 +00:00
Travis CI User
930fbe4cda [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-25 18:09:14 +00:00
Travis CI User
e45d223124 [maven-release-plugin][skip ci] prepare release 14.89 2022-01-25 18:09:11 +00:00
mpichura
4e0e797d9f ACS-2104: Changing apache.camel and netty-codec-http dependency versions due to conflicts and vulnerabilities. (#908) 2022-01-25 18:15:39 +01:00
Travis CI User
5418c3936d [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-25 15:45:28 +00:00
Travis CI User
f876016bb9 [maven-release-plugin][skip ci] prepare release 14.88 2022-01-25 15:45:25 +00:00
Tom Page
00186e5594 ACS-2303 Include license report in share-services amp. (#907) 2022-01-25 14:51:44 +00:00
Travis CI User
d6c39cc990 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-25 14:30:22 +00:00
Travis CI User
5a2bb6db5b [maven-release-plugin][skip ci] prepare release 14.87 2022-01-25 14:30:19 +00:00
Tom Page
351c3ac73a ACS-2303 Gytheio is a first party library. (#906) 2022-01-25 13:40:28 +00:00
Travis CI User
62f72f92be [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-24 11:26:07 +00:00
Travis CI User
faa0ff0e40 [maven-release-plugin][skip ci] prepare release 14.86 2022-01-24 11:26:04 +00:00
dependabot[bot]
7d6037a85f Bump restapi from 1.67 to 1.68 (#904)
Bumps [restapi](https://github.com/Alfresco/alfresco-tas-restapi) from 1.67 to 1.68.
- [Release notes](https://github.com/Alfresco/alfresco-tas-restapi/releases)
- [Commits](https://github.com/Alfresco/alfresco-tas-restapi/compare/v1.67...v1.68)

---
updated-dependencies:
- dependency-name: org.alfresco.tas:restapi
  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>
2022-01-24 11:35:54 +01:00
Travis CI User
2aa5f162cc [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-18 10:28:37 +00:00
Travis CI User
13bdfe6ac3 [maven-release-plugin][skip ci] prepare release 14.85 2022-01-18 10:28:34 +00:00
Piotr Żurek
d0dbef04f4 PRODSEC-5799 Upgrade mybatis (#879) 2022-01-18 10:33:46 +01:00
Tom Page
d8f086640a ACS-2365 Include license report in AGS amp. (#899) 2022-01-18 08:57:42 +00:00
Travis CI User
452fa1d2d8 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-17 05:17:45 +00:00
Travis CI User
68e9d2bc7d [maven-release-plugin][skip ci] prepare release 14.84 2022-01-17 05:17:42 +00:00
Travis CI User
0e083bbf6b [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-14 13:00:50 +00:00
Travis CI User
3a17a30e8c [maven-release-plugin][skip ci] prepare release 14.83 2022-01-14 13:00:48 +00:00
dependabot[bot]
c65a56b945 Bump json from 20210307 to 20211205 (#828)
Bumps [json](https://github.com/douglascrockford/JSON-java) from 20210307 to 20211205.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](https://github.com/douglascrockford/JSON-java/commits)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-14 12:09:44 +00:00
Travis CI User
aa6c0fb2a9 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-14 11:34:06 +00:00
Travis CI User
235bef78a9 [maven-release-plugin][skip ci] prepare release 14.82 2022-01-14 11:34:03 +00:00
Alan Davis
f80767359f MNT-22696 Replace Rendition REST API (#880)
Code to reject zero byte renditions
Addition of:
DELETE /nodes/{nodeId}/renditions/{renditionId} 
DELETE /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId} end points

Co-authored-by: kmagdziarz <Kacper.Magdziarz@hyland.com>
2022-01-14 11:28:50 +01:00
dependabot[bot]
8cd843df9d Bump dependency.slf4j.version from 1.7.32 to 1.7.33 (#893)
Bumps `dependency.slf4j.version` from 1.7.32 to 1.7.33.

Updates `slf4j-api` from 1.7.32 to 1.7.33
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.32...v_1.7.33)

Updates `slf4j-log4j12` from 1.7.32 to 1.7.33
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.32...v_1.7.33)

---
updated-dependencies:
- dependency-name: org.slf4j:slf4j-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.slf4j:slf4j-log4j12
  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>
2022-01-14 10:03:18 +00:00
dependabot[bot]
ce30495376 Bump maven-jar-plugin from 3.2.1 to 3.2.2 (#887)
Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.1...maven-jar-plugin-3.2.2)

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

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

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

[skip ci] 1 more PR merge to follow
2022-01-14 10:02:13 +00:00
dependabot[bot]
5b73d52753 Bump jboss-logging from 3.4.2.Final to 3.4.3.Final (#886)
Bumps [jboss-logging](https://github.com/jboss-logging/jboss-logging) from 3.4.2.Final to 3.4.3.Final.
- [Release notes](https://github.com/jboss-logging/jboss-logging/releases)
- [Commits](https://github.com/jboss-logging/jboss-logging/compare/3.4.2.Final...3.4.3.Final)

---
updated-dependencies:
- dependency-name: org.jboss.logging:jboss-logging
  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>

[skip ci] 2 more PR merges to follow
2022-01-14 10:00:40 +00:00
dependabot[bot]
7bb829d756 Bump dependency.webscripts.version from 8.27 to 8.28 (#892)
Bumps `dependency.webscripts.version` from 8.27 to 8.28.

Updates `spring-surf-core-configservice` from 8.27 to 8.28

Updates `spring-webscripts` from 8.27 to 8.28
- [Release notes](https://github.com/Alfresco/surf-webscripts/releases)
- [Commits](https://github.com/Alfresco/surf-webscripts/compare/spring-surf-webscripts-parent-8.27...spring-surf-webscripts-parent-8.28)

Updates `spring-webscripts` from 8.27 to 8.28
- [Release notes](https://github.com/Alfresco/surf-webscripts/releases)
- [Commits](https://github.com/Alfresco/surf-webscripts/compare/spring-surf-webscripts-parent-8.27...spring-surf-webscripts-parent-8.28)

Updates `spring-webscripts-api` from 8.27 to 8.28

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-14 09:30:16 +00:00
dependabot[bot]
3bedfb2c33 Bump dependency.spring.version from 5.3.14 to 5.3.15 (#891)
Bumps `dependency.spring.version` from 5.3.14 to 5.3.15.

Updates `spring-aop` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-beans` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-context` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-context-support` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-core` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-expression` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-jdbc` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-jms` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-test` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-orm` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-tx` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-web` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

Updates `spring-webmvc` from 5.3.14 to 5.3.15
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.14...v5.3.15)

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

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

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

[skip ci] another PR is about to be merged
2022-01-14 09:25:31 +00:00
alandavis
9058b5923b Pick up T-Engines 2.5.5-A3 & T-Model 1.4.7
* Five fixes too many
2022-01-14 09:13:33 +00:00
alandavis
07084b22f9 Pick up T-Engines 2.5.5-A3 & T-Model 1.4.7
* More "Pangram, fox, dog, Gym class featuring" test fixes
2022-01-14 09:09:34 +00:00
kcichonczyk
5c884c8552 [PRODSEC-5657] Added netty-codec-http version 4.1.71.Final to fix vulnerability nested in camel-amqp dependency. (#890) 2022-01-14 10:03:13 +01:00
alandavis
becf46f58a Pick up T-Engines 2.5.5-A3 & T-Model 1.4.7
* Raw metadata "subject" change resulting in cm:description change
2022-01-14 07:48:58 +00:00
alandavis
839afbbc1c Pick up T-Engines 2.5.5-A3 & T-Model 1.4.7 [no downstream] 2022-01-13 23:15:29 +00:00
David Edwards
daacceebd2 ACS-2407 Upgrade rest-api-explorer to 7.2.0-A2 (#888) 2022-01-13 13:07:40 +00:00
Vítor Moreira
cc11c13e54 MNT-22563: bumped jdom2 version to 2.0.6.1 (#885)
* MNT-22563: bumped jdom2 version to 2.0.6.1
2022-01-13 12:37:14 +00:00
Travis CI User
9e1ece208f [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-13 12:03:24 +00:00
Travis CI User
82ba856d2c [maven-release-plugin][skip ci] prepare release 14.81 2022-01-13 12:03:22 +00:00
mpichura
8278c9ced2 ACS-2334 improve ArchivedIOException logging (#859)
* ACS-2234: Improving ArchivedIOException logging.

* ACS-2234: Improving ArchivedIOException logging.

* ACS-2234: Throw WebScriptException wit 412 status code when ArchivedIOException caught.

* ACS-2234: Fixing formatting and removing unused import.
2022-01-13 10:51:12 +01:00
Travis CI User
4e9f362482 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-12 12:24:47 +00:00
Travis CI User
68bc3c5391 [maven-release-plugin][skip ci] prepare release 14.80 2022-01-12 12:24:44 +00:00
alandavis
e484ede6c4 Upgrade to alfresco/alfresco-base-tomcat:9.0.54-java-11-centos-7 from alfresco/alfresco-base-tomcat:9.0.52-java-11-centos-7 2022-01-12 11:32:57 +00:00
Travis CI User
cecc517674 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-12 09:45:17 +00:00
Travis CI User
43224ade71 [maven-release-plugin][skip ci] prepare release 14.79 2022-01-12 09:45:14 +00:00
dependabot[bot]
5ec2d430e0 Bump icu4j from 68.2 to 70.1 (#783)
Bumps [icu4j](https://github.com/unicode-org/icu) from 68.2 to 70.1.
- [Release notes](https://github.com/unicode-org/icu/releases)
- [Commits](https://github.com/unicode-org/icu/commits)

---
updated-dependencies:
- dependency-name: com.ibm.icu:icu4j
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
[skip ci]
2022-01-12 08:15:33 +00:00
Travis CI User
b0ff60adba [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-12 08:07:55 +00:00
Travis CI User
7a7a9f0964 [maven-release-plugin][skip ci] prepare release 14.78 2022-01-12 08:07:51 +00:00
dependabot[bot]
720256159f Bump dependency.spring.version from 5.3.13 to 5.3.14 (#849)
Bumps `dependency.spring.version` from 5.3.13 to 5.3.14.

Updates `spring-aop` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-beans` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-context` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-context-support` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-core` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-expression` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-jdbc` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-jms` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-test` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-orm` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-tx` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-web` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

Updates `spring-webmvc` from 5.3.13 to 5.3.14
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.13...v5.3.14)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 18:30:57 +00:00
Stefan Kopf
cbc38c59c9 ACS-2180 solr shared secret (#883) 2022-01-11 18:46:34 +01:00
dependabot[bot]
b061dd4095 Bump jackson-databind from 2.13.0 to 2.13.1 (#857)
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  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>
2022-01-11 17:08:42 +00:00
Travis CI User
75bf1bff01 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-11 17:08:15 +00:00
Travis CI User
d85eecddef [maven-release-plugin][skip ci] prepare release 14.77 2022-01-11 17:08:12 +00:00
dependabot[bot]
96088f2643 Bump maven-jar-plugin from 3.2.0 to 3.2.1 (#882)
Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.0...maven-jar-plugin-3.2.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 16:14:13 +00:00
dependabot[bot]
b6c955f28d Bump dependency.cxf.version from 3.4.5 to 3.5.0 (#861)
Bumps `dependency.cxf.version` from 3.4.5 to 3.5.0.

Updates `cxf-rt-frontend-jaxws` from 3.4.5 to 3.5.0

Updates `cxf-rt-frontend-jaxrs` from 3.4.5 to 3.5.0

Updates `cxf-rt-rs-client` from 3.4.5 to 3.5.0

Updates `cxf-rt-transports-http` from 3.4.5 to 3.5.0

Updates `cxf-rt-ws-policy` from 3.4.5 to 3.5.0

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

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

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

[skip ci]
2022-01-11 16:13:57 +00:00
dependabot[bot]
b796441f8f Bump spring-security-core from 5.5.2 to 5.6.1 (#858)
Bumps [spring-security-core](https://github.com/spring-projects/spring-security) from 5.5.2 to 5.6.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/5.5.2...5.6.1)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-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>
2022-01-11 16:13:06 +00:00
dependabot[bot]
b3b6f72286 Bump dependency.tika.version from 2.1.0 to 2.2.1 (#865)
Bumps `dependency.tika.version` from 2.1.0 to 2.2.1.

Updates `tika-core` from 2.1.0 to 2.2.1
- [Release notes](https://github.com/apache/tika/releases)
- [Changelog](https://github.com/apache/tika/blob/main/CHANGES.txt)
- [Commits](https://github.com/apache/tika/commits)

Updates `tika-parsers-standard-package` from 2.1.0 to 2.2.1

---
updated-dependencies:
- dependency-name: org.apache.tika:tika-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.apache.tika:tika-parsers-standard-package
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 15:22:28 +00:00
montgolfiere
cec820bc88 ACS-2391: ACS-2391: StorageObjectProps - add version content specific endpoints (#881)
- fix blatant typo - thanks MP for detailed verification and feedback
- Note: e2e API sanity check will be added as part of ACS-2406
2022-01-11 10:24:20 +00:00
Travis CI User
49d7f5c2b1 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-10 14:42:36 +00:00
Travis CI User
1cc351b1d5 [maven-release-plugin][skip ci] prepare release 14.76 2022-01-10 14:42:33 +00:00
Tom Page
c6be5bc4da [skip tests] Add ability to build without updating AGS license year. 2022-01-10 14:29:26 +00:00
Travis CI User
054e6fccce [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-08 14:03:41 +00:00
Travis CI User
c31000d842 [maven-release-plugin][skip ci] prepare release 14.75 2022-01-08 14:03:39 +00:00
dependabot[bot]
e613b268f7 Bump dependency.alfresco-transform-model.version from 1.4.5 to 1.4.6 (#875)
Bumps `dependency.alfresco-transform-model.version` from 1.4.5 to 1.4.6.

Updates `alfresco-transform-model` from 1.4.5 to 1.4.6
- [Release notes](https://github.com/Alfresco/alfresco-transform-model/releases)
- [Commits](https://github.com/Alfresco/alfresco-transform-model/commits)

Updates `alfresco-transform-model` from 1.4.5 to 1.4.6
- [Release notes](https://github.com/Alfresco/alfresco-transform-model/releases)
- [Commits](https://github.com/Alfresco/alfresco-transform-model/commits)

---
updated-dependencies:
- dependency-name: org.alfresco:alfresco-transform-model
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.alfresco:alfresco-transform-model:tests
  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>
2022-01-08 13:11:59 +00:00
Travis CI User
d1d2cfb400 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-08 11:51:07 +00:00
Travis CI User
63770758ae [maven-release-plugin][skip ci] prepare release 14.74 2022-01-08 11:51:04 +00:00
dependabot[bot]
44280f1aee Bump rhino from 1.7.13 to 1.7.14 (#876)
Bumps [rhino](https://github.com/mozilla/rhino) from 1.7.13 to 1.7.14.
- [Release notes](https://github.com/mozilla/rhino/releases)
- [Changelog](https://github.com/mozilla/rhino/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/mozilla/rhino/commits)

---
updated-dependencies:
- dependency-name: org.mozilla:rhino
  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>
2022-01-08 10:56:41 +00:00
Travis CI User
50b9f67a32 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-07 19:06:46 +00:00
Travis CI User
0155cc8fb8 [maven-release-plugin][skip ci] prepare release 14.73 2022-01-07 19:06:43 +00:00
Alan Davis
b1ceace38f ACS-2412 Log files flooded with transformation option messages when config is misconfigured (#878)
Cron rate changed to be every minute rather every 10 seconds on startup or error state
    When a T-Engine/T-Router is down the log message now an ERROR rather than DEBUG
2022-01-07 18:13:34 +00:00
Tom Page
61db08cc87 ACS-2365 Ensure we run license reporting against all submodules by default. (#877)
* ACS-2365 Ensure we run license reporting against all submodules by default.

* Fix a couple of typos in comments.

* ACS-2365 Ignore all internal libraries.
2022-01-07 16:41:37 +00:00
alandavis
00f68e591e ACS-2002 put missing sourceNodeRef debug back when calling TransformService [skip ci] 2022-01-07 15:53:12 +00:00
Travis CI User
94f54b8c3b [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-07 11:40:26 +00:00
Travis CI User
34c216ec7e [maven-release-plugin][skip ci] prepare release 14.72 2022-01-07 11:40:23 +00:00
Alan Davis
13a1338ddd Start counting transforms from 1 rather than 0, like the t-router (#874) 2022-01-07 10:49:42 +00:00
Travis CI User
4dc88f70fe [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-06 00:16:56 +00:00
Travis CI User
1787f59c34 [maven-release-plugin][skip ci] prepare release 14.71 2022-01-06 00:16:53 +00:00
alandavis
18418872c3 ACS-2002 Enhance T-Router debug
* getRenditionName needs to be public
* Pick up t-engines 2.5.5-A1 for testing
2022-01-05 23:26:09 +00:00
Travis CI User
960033d776 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-05 22:41:44 +00:00
Travis CI User
06f6594d35 [maven-release-plugin][skip ci] prepare release 14.70 2022-01-05 22:41:41 +00:00
Alan Davis
451a9d1f60 ACS-2002 Enhance T-Router debug (#867)
Modifications to allow the enterprise repo to add transform debug from the t-router to the repo's log.

Addition of TransformerDebugTest
2022-01-05 21:46:41 +00:00
Tom Page
b83cc149ad ACS-2365 license plugin (#834)
* ACS-2303 Add text of licenses for libraries used by acs-packaging.

* ACS-2365 Use the latest third party license reporting settings.

* ACS-2358 Add license text for Brotli dec.

* ACS-2361 The Bouncy Castle license is exactly the MIT license.

* ACS-2363 Add OGC license for geoapi-3.0.1.jar.

* ACS-2365 Ensure we use the same version of the license plugin throughout the project.

Also remove failing; on warnings.
2022-01-05 15:45:29 +00:00
Travis CI User
3fabaf8cf8 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-05 11:44:41 +00:00
Travis CI User
24318ce09c [maven-release-plugin][skip ci] prepare release 14.69 2022-01-05 11:44:38 +00:00
Kacper Magdziarz
ae2fb449cc ACS-2242 Attempt to fix Initialization of SecureRandom in EncryptionTest (#872)
* ACS-2242 Initializing SecureRandom only once.

* ACS-2242 adjust requested changes.
2022-01-05 11:55:01 +01:00
Travis CI User
94a1c7a692 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-04 17:26:15 +00:00
Travis CI User
28fef14566 [maven-release-plugin][skip ci] prepare release 14.68 2022-01-04 17:26:12 +00:00
montgolfiere
53979f3357 ACS-2391: StorageObjectProps - add version content specific endpoints (#863)
* ACS-2391: StorageObjectProps - add version content specific endpoints

- GET /nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropQName}
- POST /nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropQName}/archive
- POST /nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropQName}/archive-restore

- since versioned content nodes are not in default workspace://SpaceStore ...
- updated existing ContentStorageInfomation (and related tests) to handle nodeRef instead of nodeId
- also fixed REST framework for operation/property for 2nd-level relationship (inc extra fix, eg. for "revert" version regression)

- update based on PR feedback (thanks SA) - also update lic header to 2022 for new/changed Java files

- update based on PR feedback (thanks MP) - minor: rename local variable (and similarly across codebase)
2022-01-04 16:23:13 +00:00
Travis CI User
cb0b77bd08 [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-04 13:19:55 +00:00
88 changed files with 2112 additions and 653 deletions

View File

@@ -60,7 +60,7 @@ jobs:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext02TestSuite"
@@ -75,7 +75,7 @@ jobs:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext04TestSuite"
@@ -83,7 +83,7 @@ jobs:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext05TestSuite"
@@ -102,7 +102,7 @@ jobs:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext06TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContextExtraTestSuite"
@@ -110,7 +110,7 @@ jobs:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - MiscContextTestSuite"
@@ -118,7 +118,7 @@ jobs:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
script: travis_wait 20 mvn -B test -pl repository -Dtest=MiscContextTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - SearchTestSuite"
@@ -241,7 +241,7 @@ jobs:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContext03TestSuite"
@@ -249,7 +249,7 @@ jobs:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContext04TestSuite"
@@ -257,7 +257,7 @@ jobs:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContextExtraTestSuite"

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<modules>
@@ -21,6 +21,7 @@
<license.update.dryrun>true</license.update.dryrun>
<license.verbose>false</license.verbose>
<license.failOnNotUptodateHeader>true</license.failOnNotUptodateHeader>
</properties>
<build>
@@ -46,50 +47,49 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.0.1.alfresco-1</version>
<configuration>
<verbose>${license.verbose}</verbose>
<addSvnKeyWords>false</addSvnKeyWords>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<!-- header configuration -->
<organizationName>Alfresco Software Limited</organizationName>
<descriptionTemplate>${project.parent.parent.basedir}/license/description.ftl</descriptionTemplate>
<canUpdateCopyright>true</canUpdateCopyright>
<canUpdateDescription>true</canUpdateDescription>
<!-- licence configuration -->
<licenseResolver>file:${project.parent.parent.basedir}/license</licenseResolver>
<!-- dry run options -->
<dryRun>${license.update.dryrun}</dryRun>
<failOnMissingHeader>true</failOnMissingHeader>
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
<!-- default root -->
<roots>
<root>src</root>
</roots>
<!-- exculsions -->
<excludes>
<exclude>**/package-info.java</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.json</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.html</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>first</id>
<goals>
<goal>update-file-header</goal>
</goals>
<phase>process-sources</phase>
<phase>none</phase>
<configuration>
<verbose>${license.verbose}</verbose>
<addSvnKeyWords>false</addSvnKeyWords>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<!-- header configuration -->
<organizationName>Alfresco Software Limited</organizationName>
<descriptionTemplate>${project.parent.parent.basedir}/license/description.ftl</descriptionTemplate>
<canUpdateCopyright>true</canUpdateCopyright>
<canUpdateDescription>true</canUpdateDescription>
<!-- license configuration -->
<licenseResolver>file:${project.parent.parent.basedir}/license</licenseResolver>
<!-- dry run options -->
<dryRun>${license.update.dryrun}</dryRun>
<failOnMissingHeader>true</failOnMissingHeader>
<failOnNotUptodateHeader>${license.failOnNotUptodateHeader}</failOnNotUptodateHeader>
<!-- default root -->
<roots>
<root>src</root>
</roots>
<!-- exclusions -->
<excludes>
<exclude>**/package-info.java</exclude>
<exclude>**/*.properties</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*.xml</exclude>
<exclude>**/*.json</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.html</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<modules>
@@ -37,6 +37,16 @@
<skipTests>${skip.automationtests}</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<executions>
<execution>
<id>third-party-licenses</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -7,20 +7,25 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<licenseName>alfresco_community</licenseName>
<licenseResolver>file:${project.parent.parent.basedir}/license</licenseResolver>
<descriptionTemplate>${project.parent.parent.basedir}/license/description.ftl</descriptionTemplate>
</configuration>
<executions>
<execution>
<id>first</id>
<phase>process-sources</phase>
<configuration>
<licenseName>alfresco_community</licenseName>
<licenseResolver>file:${project.parent.parent.basedir}/license</licenseResolver>
<descriptionTemplate>${project.parent.parent.basedir}/license/description.ftl</descriptionTemplate>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -40,7 +45,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.32</version>
<version>1.7.33</version>
<scope>test</scope>
</dependency>
<dependency>

View File

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

View File

@@ -1,4 +1,4 @@
TRANSFORMERS_TAG=2.5.4
SOLR6_TAG=2.0.2-RC1
TRANSFORMERS_TAG=2.5.5
SOLR6_TAG=2.0.2
POSTGRES_TAG=13.3
ACTIVEMQ_TAG=5.16.1

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<properties>
@@ -217,6 +217,7 @@
<fileset dir="${project.build.outputDirectory}/alfresco" />
</move>
<copy file="${project.build.directory}/${project.build.finalName}/config/alfresco/module/org_alfresco_module_rm/module.properties" todir="${project.build.directory}/${project.build.finalName}" />
<copy file="${project.build.directory}/generated-sources/license/THIRD-PARTY.txt" todir="${project.build.directory}/${project.build.finalName}/licenses/${artifactId}" />
</target>
</configuration>
</execution>
@@ -320,17 +321,23 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<licenseName>alfresco_community</licenseName>
<roots>
<root>source/java</root>
<root>unit-test/java</root>
<root>source/compatibility</root>
<root>config</root>
<root>test/java</root>
<root>test/resources</root>
</roots>
</configuration>
<executions>
<execution>
<id>first</id>
<phase>process-sources</phase>
<configuration>
<licenseName>alfresco_community</licenseName>
<roots>
<root>source/java</root>
<root>unit-test/java</root>
<root>source/compatibility</root>
<root>config</root>
<root>test/java</root>
<root>test/resources</root>
</roots>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

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

View File

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

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<properties>
@@ -168,6 +168,10 @@
<targetPath>../${project.build.finalName}</targetPath>
<filtering>true</filtering>
</resource>
<resource>
<directory>${project.build.directory}/generated-sources/license</directory>
<targetPath>../${project.build.finalName}/licenses/${artifactId}</targetPath>
</resource>
</resources>
<testResources>
<testResource>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<dependencies>
@@ -136,6 +136,10 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<properties>
@@ -21,6 +21,10 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jibx</groupId>
<artifactId>maven-jibx-plugin</artifactId>

View File

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

View File

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

View File

@@ -0,0 +1,41 @@
The code in this repository code was Written by Gil Tene, Michael Barker,
and Matt Warren, and released to the public domain, as explained at
http://creativecommons.org/publicdomain/zero/1.0/
For users of this code who wish to consume it under the "BSD" license
rather than under the public domain or CC0 contribution text mentioned
above, the code found under this directory is *also* provided under the
following license (commonly referred to as the BSD 2-Clause License). This
license does not detract from the above stated release of the code into
the public domain, and simply represents an additional license granted by
the Author.
-----------------------------------------------------------------------------
** Beginning of "BSD 2-Clause License" text. **
Copyright (c) 2012, 2013, 2014, 2015, 2016 Gil Tene
Copyright (c) 2014 Michael Barker
Copyright (c) 2014 Matt Warren
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,54 +0,0 @@
/*--
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the disclaimer that follows
these conditions in the documentation and/or other materials
provided with the distribution.
3. The name "JDOM" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact <request_AT_jdom_DOT_org>.
4. Products derived from this software may not be called "JDOM", nor
may "JDOM" appear in their name, without prior written permission
from the JDOM Project Management <request_AT_jdom_DOT_org>.
In addition, we request (but do not require) that you include in the
end-user documentation provided with the redistribution and/or in the
software itself an acknowledgement equivalent to the following:
"This product includes software developed by the
JDOM Project (http://www.jdom.org/)."
Alternatively, the acknowledgment may be graphical using the logos
available at http://www.jdom.org/images/logos.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
This software consists of voluntary contributions made by many
individuals on behalf of the JDOM Project and was originally
created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information
on the JDOM Project, please see <http://www.jdom.org/>.
*/

View File

@@ -0,0 +1,38 @@
* This code was Written by Gil Tene of Azul Systems, and released to the
* public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/
For users of this code who wish to consume it under the "BSD" license
rather than under the public domain or CC0 contribution text mentioned
above, the code found under this directory is *also* provided under the
following license (commonly referred to as the BSD 2-Clause License). This
license does not detract from the above stated release of the code into
the public domain, and simply represents an additional license granted by
the Author.
-----------------------------------------------------------------------------
** Beginning of "BSD 2-Clause License" text. **
Copyright (c) 2012, 2013, 2014 Gil Tene
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,26 @@
[The "BSD license"]
Copyright (c) 2011-2013 Terence Parr
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,28 @@
Copyright (c) 2005, Graph Builder
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
-Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
-Neither the name of Graph Builder nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,39 @@
Copyright (c) 2005 Sun Microsystems, Inc.
Copyright © 2010-2014 University of Manchester
Copyright © 2010-2015 Stian Soiland-Reyes
Copyright © 2015 Peter Hull
All Rights Reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistribution of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistribution in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
Neither the name of Sun Microsystems, Inc. or the names of
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
This software is provided "AS IS," without a warranty of any
kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL
NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF
USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR
ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR
INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
You acknowledge that this software is not designed or intended for
use in the design, construction, operation or maintenance of any
nuclear facility.

View File

@@ -0,0 +1,28 @@
Copyright (c) 2006, Wojciech Gradkowski
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the JMatIO nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,32 @@
Copyright 2008 Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.

View File

@@ -0,0 +1,29 @@
====
Units of Measurement API
Copyright (c) 2014-2016, Jean-Marie Dautelle, Werner Keil, V2COM.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of JSR-363 nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
====

View File

@@ -0,0 +1,52 @@
This software is copyright (c) 2005 Brian Goetz and Tim Peierls and is released under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.5). The official home for this software is http://www.jcip.net. Any republication or derived work distributed in source code form must include the copyright and license notice.
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
"Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
"Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
"Licensor" means the individual or entity that offers the Work under the terms of this License.
"Original Author" means the individual or entity who created the Work.
"Work" means the copyrightable work of authorship offered under the terms of this License.
"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
to create and reproduce Derivative Works;
to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
For the avoidance of doubt, where the work is a musical composition:
Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.
4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(b), as requested.
If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
8. Miscellaneous
Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.

View File

@@ -0,0 +1,12 @@
Eclipse Distribution License - v 1.0
Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the Eclipse Foundation, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,79 @@
Eclipse Public License - v 2.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution "originates" from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works.
"Contributor" means any person or entity that Distributes the Program.
"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions Distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors.
"Derivative Works" shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.
"Modified Works" shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof.
"Distribute" means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy.
"Source Code" means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Secondary License" means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3).
3. REQUIREMENTS
3.1 If a Contributor Distributes the Program in any form, then:
a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and
b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license:
i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and
iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3.
3.2 When the Program is Distributed as Source Code:
a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and
b) a copy of this Agreement must be included with each copy of the Program.
3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability ("notices") contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version.
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement.
Exhibit A - Form of Secondary Licenses Notice
"This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}."
Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses.
If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
You may add additional accurate notices of copyright ownership.

View File

@@ -0,0 +1,19 @@
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,22 @@
Checker Framework qualifiers
Copyright 2004-present by the Checker Framework developers
MIT License:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,20 @@
plist - An open source library to parse and generate property lists
Copyright (C) 2012 Keith Randall
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,19 @@
Copyright (c) 2010 Matthew J. Francis and Contributors of the jbzip2 Project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,24 @@
/*
The MIT License
Copyright (c) 2004-2021 Paul R. Holser, Jr.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

View File

@@ -0,0 +1,8 @@
The MIT License
Copyright © 2009 - 2021 Jonathan Hedley (https://jsoup.org/)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,35 @@
GeoAPI - Java interfaces for OGC/ISO standards
http://www.geoapi.org
Copyright (C) 2003-2011 Open Geospatial Consortium, Inc.
All Rights Reserved. http://www.opengeospatial.org/ogc/legal
This OGC work (including software, documents, or other related items) is being
provided by the copyright holders under the following license. By obtaining,
using and/or copying this work, you (the licensee) agree that you have read,
understood, and will comply with the following terms and conditions:
Permission to use, copy, and modify this software and its documentation, with
or without modification, for any purpose and without fee or royalty is hereby
granted, provided that you include the following on ALL copies of the software
and documentation or portions thereof, including modifications, that you make:
1. The full text of this NOTICE in a location viewable to users of the
redistributed or derivative work.
2. Notice of any changes or modifications to the OGC files, including the
date changes were made. (We recommend you provide URIs to the location
from which the code is derived.)
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
The name and trademarks of copyright holders may NOT be used in advertising or
publicity pertaining to the software without specific, written prior permission.
Title to copyright in this software and any associated documentation will at all
times remain with copyright holders.

View File

@@ -0,0 +1,40 @@
****** ***** ****** UnRAR - free utility for RAR archives
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
****** ******* ****** License for use and distribution of
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
** ** ** ** ** ** FREE portable version
~~~~~~~~~~~~~~~~~~~~~
The source code of UnRAR utility is freeware. This means:
1. All copyrights to RAR and the utility UnRAR are exclusively
owned by the author - Alexander Roshal.
2. The UnRAR sources may be used in any software to handle RAR
archives without limitations free of charge, but cannot be used
to re-create the RAR compression algorithm, which is proprietary.
Distribution of modified UnRAR sources in separate form or as a
part of other software is permitted, provided that it is clearly
stated in the documentation and source comments that the code may
not be used to develop a RAR (WinRAR) compatible archiver.
3. The UnRAR utility may be freely distributed. It is allowed
to distribute UnRAR inside of other software packages.
4. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED "AS IS".
NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT
YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS,
DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING
OR MISUSING THIS SOFTWARE.
5. Installing and using the UnRAR utility signifies acceptance of
these terms and conditions of the license.
6. If you don't agree with terms of the license you must remove
UnRAR files from your storage devices and cease to use the
utility.
Thank you for your interest in RAR and UnRAR.
Alexander L. Roshal

View File

@@ -1,6 +1,6 @@
# Fetch image based on Tomcat 9.0, Java 11 and Centos 8
# More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat
FROM alfresco/alfresco-base-tomcat:9.0.52-java-11-centos-7
FROM alfresco/alfresco-base-tomcat:9.0.54-java-11-centos-7
# Set default docker_context.
ARG resource_path=target

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
TRANSFORMERS_TAG=2.5.4
TRANSFORMERS_TAG=2.5.5
SOLR6_TAG=2.0.2
POSTGRES_TAG=13.3
ACTIVEMQ_TAG=5.16.1

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<properties>
@@ -198,21 +198,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<organizationName>Alfresco Software Limited</organizationName>
<failOnMissingHeader>true</failOnMissingHeader>
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
<licenseResolver>classpath://alfresco</licenseResolver>
<licenseName>${licenseName}</licenseName>
<roots>
<root>src</root>
</roots>
<includes>
<include>**/*.java</include>
<include>**/*.jsp</include>
</includes>
</configuration>
<executions>
<execution>
<id>check-licenses</id>
@@ -220,6 +205,21 @@
<goals>
<goal>check-file-header</goal>
</goals>
<configuration>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<organizationName>Alfresco Software Limited</organizationName>
<failOnMissingHeader>true</failOnMissingHeader>
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
<licenseResolver>classpath://alfresco</licenseResolver>
<licenseName>${licenseName}</licenseName>
<roots>
<root>src</root>
</roots>
<includes>
<include>**/*.java</include>
<include>**/*.jsp</include>
</includes>
</configuration>
</execution>
</executions>
<dependencies>
@@ -241,11 +241,6 @@
<source>${maven.build.sourceVersion}</source>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.0.1.alfresco-1</version>
</plugin>
</plugins>
</pluginManagement>
</build>

89
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>14.67</version>
<version>14.92-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -51,20 +51,20 @@
<dependency.alfresco-log-sanitizer.version>0.2</dependency.alfresco-log-sanitizer.version>
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
<dependency.activiti.version>5.23.0</dependency.activiti.version>
<dependency.alfresco-transform-model.version>1.4.3</dependency.alfresco-transform-model.version>
<dependency.alfresco-transform-model.version>1.4.7</dependency.alfresco-transform-model.version>
<dependency.alfresco-greenmail.version>6.2</dependency.alfresco-greenmail.version>
<dependency.acs-event-model.version>0.0.13</dependency.acs-event-model.version>
<dependency.spring.version>5.3.13</dependency.spring.version>
<dependency.spring.version>5.3.15</dependency.spring.version>
<dependency.antlr.version>3.5.2</dependency.antlr.version>
<dependency.jackson.version>2.13.0</dependency.jackson.version>
<dependency.jackson-databind.version>2.13.0</dependency.jackson-databind.version>
<dependency.cxf.version>3.4.5</dependency.cxf.version>
<dependency.jackson-databind.version>2.13.1</dependency.jackson-databind.version>
<dependency.cxf.version>3.5.0</dependency.cxf.version>
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
<dependency.webscripts.version>8.27</dependency.webscripts.version>
<dependency.webscripts.version>8.28</dependency.webscripts.version>
<dependency.bouncycastle.version>1.70</dependency.bouncycastle.version>
<dependency.mockito-core.version>3.11.2</dependency.mockito-core.version>
<dependency.org-json.version>20210307</dependency.org-json.version>
<dependency.org-json.version>20211205</dependency.org-json.version>
<dependency.commons-dbcp.version>1.4-DBCP330</dependency.commons-dbcp.version>
<dependency.commons-io.version>2.11.0</dependency.commons-io.version>
<dependency.gson.version>2.8.5</dependency.gson.version>
@@ -72,17 +72,17 @@
<dependency.httpcore.version>4.4.15</dependency.httpcore.version>
<dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version>
<dependency.xercesImpl.version>2.12.1</dependency.xercesImpl.version>
<dependency.slf4j.version>1.7.32</dependency.slf4j.version>
<dependency.slf4j.version>1.7.33</dependency.slf4j.version>
<dependency.gytheio.version>0.12</dependency.gytheio.version>
<dependency.groovy.version>3.0.9</dependency.groovy.version>
<dependency.tika.version>2.1.0</dependency.tika.version>
<dependency.spring-security.version>5.5.2</dependency.spring-security.version>
<dependency.tika.version>2.2.1</dependency.tika.version>
<dependency.spring-security.version>5.6.1</dependency.spring-security.version>
<dependency.truezip.version>7.7.10</dependency.truezip.version>
<dependency.poi.version>4.1.2</dependency.poi.version>
<dependency.ooxml-schemas.version>1.4</dependency.ooxml-schemas.version>
<dependency.keycloak.version>15.0.2</dependency.keycloak.version>
<dependency.jboss.logging.version>3.4.2.Final</dependency.jboss.logging.version>
<dependency.camel.version>3.7.4</dependency.camel.version>
<dependency.jboss.logging.version>3.4.3.Final</dependency.jboss.logging.version>
<dependency.camel.version>3.7.7</dependency.camel.version> <!-- when bumping this version, please keep track/sync with included netty.io dependencies (can cause dependency conflicts)-->
<dependency.activemq.version>5.16.1</dependency.activemq.version>
<dependency.apache-compress.version>1.21</dependency.apache-compress.version>
<dependency.apache.taglibs.version>1.2.5</dependency.apache.taglibs.version>
@@ -91,6 +91,7 @@
<dependency.swagger-parser.version>1.0.56</dependency.swagger-parser.version>
<dependency.maven-filtering.version>3.1.1</dependency.maven-filtering.version>
<dependency.maven-artifact.version>3.8.4</dependency.maven-artifact.version>
<dependency.jdom2.version>2.0.6.1</dependency.jdom2.version>
<dependency.jakarta-jaxb-api.version>2.3.3</dependency.jakarta-jaxb-api.version>
<dependency.jakarta-ws-api.version>2.3.3</dependency.jakarta-ws-api.version>
@@ -106,8 +107,10 @@
<alfresco.googledrive.version>3.2.1.3</alfresco.googledrive.version>
<alfresco.aos-module.version>1.4.0.1</alfresco.aos-module.version>
<alfresco.api-explorer.version>7.1.0.1</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
<alfresco.api-explorer.version>7.2.0-M2</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
<alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
<license-maven-plugin.version>2.0.1.alfresco-1</license-maven-plugin.version>
<dependency.postgresql.version>42.3.1</dependency.postgresql.version>
<dependency.mysql.version>8.0.27</dependency.mysql.version>
@@ -115,7 +118,7 @@
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
<dependency.tas-utility.version>3.0.47</dependency.tas-utility.version>
<dependency.rest-assured.version>3.3.0</dependency.rest-assured.version>
<dependency.tas-restapi.version>1.67</dependency.tas-restapi.version>
<dependency.tas-restapi.version>1.68</dependency.tas-restapi.version>
<dependency.tas-cmis.version>1.31</dependency.tas-cmis.version>
<dependency.tas-email.version>1.8</dependency.tas-email.version>
<dependency.tas-webdav.version>1.6</dependency.tas-webdav.version>
@@ -143,7 +146,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>14.67</tag>
<tag>HEAD</tag>
</scm>
<distributionManagement>
@@ -652,6 +655,12 @@
<artifactId>commons-csv</artifactId>
<version>1.9.0</version>
</dependency>
<!-- upgrade dependency from TIKA -->
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>${dependency.jdom2.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
@@ -781,6 +790,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
<version>4.1.72.Final</version>
</dependency>
<dependency>
<!-- If you are going to bump dependency.camel.version, please check if the netty-codec-http has higher version that the one above.-->
<groupId>org.apache.camel</groupId>
<artifactId>camel-amqp</artifactId>
<version>${dependency.camel.version}</version>
@@ -878,7 +893,7 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.2</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
@@ -909,7 +924,49 @@
<version>${alfresco.maven-plugin.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<executions>
<execution>
<id>third-party-licenses</id>
<goals>
<goal>add-third-party</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<failOnMissing>true</failOnMissing>
<excludedScopes>provided,test</excludedScopes>
<excludedGroups>^(org\.alfresco|com\.alfresco|org\.activiti|org\.gytheio).*</excludedGroups>
<failIfWarning>false</failIfWarning>
<includedLicenses>
https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/includedLicenses.txt
</includedLicenses>
<licenseMergesUrl>
https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/licenseMerges.txt
</licenseMergesUrl>
<overrideUrl>
https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/override-THIRD-PARTY.properties
</overrideUrl>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<skip>true</skip>
<skipDeploy>true</skipDeploy>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<dependencies>
@@ -176,15 +176,6 @@
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.0.1.alfresco-1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- Create a jar of test classes -->
<plugin>
@@ -271,21 +262,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<organizationName>Alfresco Software Limited</organizationName>
<failOnMissingHeader>true</failOnMissingHeader>
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
<licenseResolver>classpath://alfresco</licenseResolver>
<licenseName>${licenseName}</licenseName>
<roots>
<root>src</root>
</roots>
<includes>
<include>**/*.java</include>
<include>**/*.jsp</include>
</includes>
</configuration>
<executions>
<execution>
<id>check-licenses</id>
@@ -293,6 +269,21 @@
<goals>
<goal>check-file-header</goal>
</goals>
<configuration>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<organizationName>Alfresco Software Limited</organizationName>
<failOnMissingHeader>true</failOnMissingHeader>
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
<licenseResolver>classpath://alfresco</licenseResolver>
<licenseName>${licenseName}</licenseName>
<roots>
<root>src</root>
</roots>
<includes>
<include>**/*.java</include>
<include>**/*.jsp</include>
</includes>
</configuration>
</execution>
</executions>
<dependencies>

View File

@@ -47,6 +47,7 @@ import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.repo.transaction.TooBusyException;
import org.alfresco.repo.web.scripts.bean.LoginPost;
import org.alfresco.service.cmr.repository.ArchivedIOException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.TemplateService;
import org.alfresco.service.cmr.security.AuthorityService;
@@ -506,6 +507,10 @@ public class RepositoryContainer extends AbstractRuntimeContainer
return;
}
}
catch (ArchivedIOException e) // handle ArchivedIOException to lower log pollution
{
handleArchivedIOException(e);
}
catch (IOException e)
{
handleIOException(e);
@@ -606,6 +611,10 @@ public class RepositoryContainer extends AbstractRuntimeContainer
// Map TooBusyException to a 503 status code
throw new WebScriptException(HttpServletResponse.SC_SERVICE_UNAVAILABLE, e.getMessage(), e);
}
catch (ArchivedIOException e) // handle ArchivedIOException to lower log pollution
{
handleArchivedIOException(e);
}
// Ensure a response is always flushed after successful execution
if (bufferedRes != null)
@@ -615,6 +624,19 @@ public class RepositoryContainer extends AbstractRuntimeContainer
}
}
private void handleArchivedIOException(ArchivedIOException e)
{
if (logger.isDebugEnabled()) // log with stack trace at debug level
{
logger.debug("ArchivedIOException error ", e);
}
else if (logger.isInfoEnabled()) // log without stack trace at info level
{
logger.info("ArchivedIOException error. Message: " + e.getMessage());
}
throw new WebScriptException(HttpServletResponse.SC_PRECONDITION_FAILED, "Content is archived and not accessible.");
}
private static void handleIOException(final IOException ioe) throws IOException
{
Throwable socketException = ExceptionStackUtil.getCause(ioe, SocketException.class);

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -31,6 +31,7 @@ import org.alfresco.rest.api.model.ContentStorageInfo;
import org.alfresco.rest.api.model.RestoreArchivedContentRequest;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.service.Experimental;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* Storage information for content API.
@@ -44,34 +45,34 @@ public interface ContentStorageInformation
/**
* Note: Currently marked as experimental and subject to change.
*
* @param nodeId Identifier of the node
* @param nodeRef Node reference
* @param contentPropName Qualified name of content property (e.g. 'cm_content')
* @param parameters {@link Parameters} object to get the parameters passed into the request
* @return {@link ContentStorageInfo} object consisting of qualified name of content property and a map of storage properties
*/
@Experimental
ContentStorageInfo getStorageInfo(String nodeId, String contentPropName, Parameters parameters);
ContentStorageInfo getStorageInfo(NodeRef nodeRef, String contentPropName, Parameters parameters);
/**
* Note: Currently marked as experimental and subject to change.
*
* @param nodeId Identifier of the node
* @param nodeRef Node reference
* @param contentPropName Qualified name of content property (e.g. 'cm_content')
* @param archiveContentRequest {@link ArchiveContentRequest} object holding parameters for archive content request
* @return true when request successful, false when unsuccessful
*/
@Experimental
boolean requestArchiveContent(String nodeId, String contentPropName, ArchiveContentRequest archiveContentRequest);
boolean requestArchiveContent(NodeRef nodeRef, String contentPropName, ArchiveContentRequest archiveContentRequest);
/**
* Note: Currently marked as experimental and subject to change.
*
* @param nodeId Identifier of the node
* @param nodeRef Node reference
* @param contentPropName Qualified name of content property (e.g. 'cm_content')
* @param restoreArchivedContentRequest {@link RestoreArchivedContentRequest} object holding parameters for restore from archive request
* @return true when request successful, false when unsuccessful
*/
@Experimental
boolean requestRestoreContentFromArchive(String nodeId, String contentPropName,
boolean requestRestoreContentFromArchive(NodeRef nodeRef, String contentPropName,
RestoreArchivedContentRequest restoreArchivedContentRequest);
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -147,6 +147,25 @@ public interface Renditions
void createRenditions(NodeRef nodeRef, String versionId, List<Rendition> renditions, Parameters parameters)
throws NotFoundException, ConstraintViolatedException;
/**
* Delete the rendition node.
*
* @param nodeRef the source nodeRef, ie. live node
* @param renditionId the rendition id
* @param parameters the {@link Parameters} object to get the parameters passed into the request
*/
void deleteRendition(NodeRef nodeRef, String renditionId, Parameters parameters);
/**
* Delete the rendition node.
*
* @param nodeRef the source nodeRef, ie. live node
* @param versionId the version id (aka version label)
* @param renditionId the rendition id
* @param parameters the {@link Parameters} object to get the parameters passed into the request
*/
void deleteRendition(NodeRef nodeRef, String versionId, String renditionId, Parameters parameters);
/**
* Downloads rendition.
*

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -36,7 +36,6 @@ import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.service.Experimental;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
@@ -70,9 +69,8 @@ public class ContentStorageInformationImpl implements ContentStorageInformation
*/
@Override
@Experimental
public ContentStorageInfo getStorageInfo(String nodeId, String contentPropName, Parameters parameters)
public ContentStorageInfo getStorageInfo(NodeRef nodeRef, String contentPropName, Parameters parameters)
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
final QName propQName = getQName(contentPropName);
final Map<String, String> storageProperties = contentService.getStorageProperties(nodeRef, propQName);
final ContentStorageInfo storageInfo = new ContentStorageInfo();
@@ -85,10 +83,9 @@ public class ContentStorageInformationImpl implements ContentStorageInformation
* {@inheritDoc}
*/
@Override
public boolean requestArchiveContent(String nodeId, String contentPropName,
public boolean requestArchiveContent(NodeRef nodeRef, String contentPropName,
ArchiveContentRequest archiveContentRequest)
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
final QName propQName = getQName(contentPropName);
final Map<String, Serializable> archiveParams =
archiveContentRequest == null ? Collections.emptyMap() : archiveContentRequest.getArchiveParams();
@@ -99,10 +96,9 @@ public class ContentStorageInformationImpl implements ContentStorageInformation
* {@inheritDoc}
*/
@Override
public boolean requestRestoreContentFromArchive(String nodeId, String contentPropName,
public boolean requestRestoreContentFromArchive(NodeRef nodeRef, String contentPropName,
RestoreArchivedContentRequest restoreArchivedContentRequest)
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
final QName propQName = getQName(contentPropName);
final Map<String, Serializable> restoreParams =
(restoreArchivedContentRequest == null || restoreArchivedContentRequest.getRestorePriority() == null) ?

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software LimitedP
* Copyright (C) 2005 - 2022 Alfresco Software LimitedP
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -444,6 +444,31 @@ public class RenditionsImpl implements Renditions, ResourceLoaderAware
}
@Override
public void deleteRendition(NodeRef nodeRef, String renditionId, Parameters parameters)
{
deleteRendition(nodeRef, null, renditionId, parameters);
}
@Override
public void deleteRendition(NodeRef nodeRef, String versionId, String renditionId, Parameters parameters)
{
if (!renditionService2.isEnabled())
{
throw new DisabledServiceException("Rendition generation has been disabled.");
}
final NodeRef validatedNodeRef = validateNode(nodeRef.getStoreRef(), nodeRef.getId(), versionId, parameters);
NodeRef renditionNodeRef = getRenditionByName(validatedNodeRef, renditionId, parameters);
if (renditionNodeRef == null)
{
throw new NotFoundException(renditionId + " is not registered.");
}
renditionService2.clearRenditionContentDataInTransaction(renditionNodeRef);
}
private String getName(Rendition rendition)
{
String renditionName = rendition.getId();
@@ -676,8 +701,8 @@ public class RenditionsImpl implements Renditions, ResourceLoaderAware
{
try
{
Version v = vh.getVersion(versionLabelId);
nodeRef = VersionUtil.convertNodeRef(v.getFrozenStateNodeRef());
Version version = vh.getVersion(versionLabelId);
nodeRef = VersionUtil.convertNodeRef(version.getFrozenStateNodeRef());
}
catch (VersionDoesNotExistException vdne)
{

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -65,6 +65,7 @@ public class NodeRenditionsRelation implements RelationshipResourceAction.Read<R
RelationshipResourceAction.ReadById<Rendition>,
RelationshipResourceAction.Create<Rendition>,
RelationshipResourceBinaryAction.Read,
RelationshipResourceAction.Delete,
InitializingBean
{
@@ -110,6 +111,14 @@ public class NodeRenditionsRelation implements RelationshipResourceAction.Read<R
return null;
}
@WebApiDescription(title = "Delete rendition")
@Override
public void delete(String nodeId, String renditionId, Parameters parameters)
{
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
renditions.deleteRendition(nodeRef, renditionId, parameters);
}
@WebApiDescription(title = "Download rendition", description = "Download rendition")
@BinaryProperties({ "content" })
@Override

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -40,6 +40,8 @@ import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResou
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rest.framework.webscripts.WithResponse;
import org.alfresco.service.Experimental;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.util.PropertyCheck;
import org.springframework.beans.factory.InitializingBean;
@@ -63,6 +65,12 @@ public class NodeStorageInfoRelation implements RelationshipResourceAction.ReadB
this.storageInformation = storageInformation;
}
@Override
public void afterPropertiesSet() throws Exception
{
PropertyCheck.mandatory(this, "storageInformation", storageInformation);
}
@WebApiDescription(title = "Get storage properties",
description = "Retrieves storage properties for given node's content",
successStatus = HttpServletResponse.SC_OK)
@@ -70,13 +78,8 @@ public class NodeStorageInfoRelation implements RelationshipResourceAction.ReadB
public ContentStorageInfo readById(String nodeId, String contentPropName, Parameters parameters)
throws RelationshipResourceNotFoundException
{
return storageInformation.getStorageInfo(nodeId, contentPropName, parameters);
}
@Override
public void afterPropertiesSet() throws Exception
{
PropertyCheck.mandatory(this, "storageInformation", storageInformation);
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
return storageInformation.getStorageInfo(nodeRef, contentPropName, parameters);
}
@Experimental
@@ -89,7 +92,8 @@ public class NodeStorageInfoRelation implements RelationshipResourceAction.ReadB
public void requestArchiveContent(String nodeId, String contentPropName, ArchiveContentRequest archiveContentRequest, Parameters parameters,
WithResponse withResponse)
{
final boolean result = storageInformation.requestArchiveContent(nodeId, contentPropName, archiveContentRequest);
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
final boolean result = storageInformation.requestArchiveContent(nodeRef, contentPropName, archiveContentRequest);
if (result)
{
withResponse.setStatus(HttpServletResponse.SC_OK);
@@ -109,11 +113,13 @@ public class NodeStorageInfoRelation implements RelationshipResourceAction.ReadB
public void requestRestoreContentFromArchive(String nodeId, String contentPropName, RestoreArchivedContentRequest restoreArchivedContentRequest,
Parameters parameters, WithResponse withResponse)
{
final boolean result = storageInformation.requestRestoreContentFromArchive(nodeId, contentPropName, restoreArchivedContentRequest);
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
final boolean result = storageInformation.requestRestoreContentFromArchive(nodeRef, contentPropName, restoreArchivedContentRequest);
if (result)
{
withResponse.setStatus(HttpServletResponse.SC_ACCEPTED);
} else
}
else
{
withResponse.setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED);
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -48,10 +48,11 @@ import org.springframework.extensions.webscripts.Status;
*
* Node version renditions
*
* - GET /nodes/{nodeId}/versions/{versionId}/renditions
* - POST /nodes/{nodeId}/versions/{versionId}/renditions
* - GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}
* - GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content
* - GET /nodes/{nodeId}/versions/{versionId}/renditions
* - POST /nodes/{nodeId}/versions/{versionId}/renditions
* - GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}
* - DELETE /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}
* - GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content
*
* @author janv
*/
@@ -59,6 +60,7 @@ import org.springframework.extensions.webscripts.Status;
public class NodeVersionRenditionsRelation implements RelationshipResourceAction.Read<Rendition>,
RelationshipResourceAction.ReadById<Rendition>,
RelationshipResourceAction.Create<Rendition>,
RelationshipResourceAction.Delete,
RelationshipResourceBinaryAction.Read,
InitializingBean
{
@@ -115,4 +117,13 @@ public class NodeVersionRenditionsRelation implements RelationshipResourceAction
return renditions.getContent(nodeRef, versionId, renditionId, parameters);
}
@WebApiDescription(title = "Delete rendition")
@Override
public void delete(String nodeId, String versionId, Parameters parameters)
{
String renditionId = parameters.getRelationship2Id();
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
renditions.deleteRendition(nodeRef, versionId, renditionId, parameters);
}
}

View File

@@ -166,12 +166,12 @@ public class NodeVersionsRelation extends AbstractNodeRelation implements
@WebApiDescription(title="Get version node info", description = "Return metadata for a specific version node")
public Node readById(String nodeId, String versionId, Parameters parameters)
{
Version v = findVersion(nodeId, versionId);
Version version = findVersion(nodeId, versionId);
if (v != null)
if (version != null)
{
Node node = nodes.getFolderOrDocumentFullInfo(v.getFrozenStateNodeRef(), null, null, parameters, null);
mapVersionInfo(v, node);
Node node = nodes.getFolderOrDocumentFullInfo(version.getFrozenStateNodeRef(), null, null, parameters, null);
mapVersionInfo(version, node);
return node;
}
@@ -183,11 +183,11 @@ public class NodeVersionsRelation extends AbstractNodeRelation implements
@Override
public BinaryResource readProperty(String nodeId, String versionId, Parameters parameters)
{
Version v = findVersion(nodeId, versionId);
Version version = findVersion(nodeId, versionId);
if (v != null)
if (version != null)
{
NodeRef versionNodeRef = v.getFrozenStateNodeRef();
NodeRef versionNodeRef = version.getFrozenStateNodeRef();
return nodes.getContent(versionNodeRef, parameters, true); // TODO should we record version downloads ?
}
@@ -200,13 +200,13 @@ public class NodeVersionsRelation extends AbstractNodeRelation implements
successStatus = HttpServletResponse.SC_OK)
public Node revertById(String nodeId, String versionId, VersionOptions versionOptions, Parameters parameters, WithResponse withResponse)
{
Version v = findVersion(nodeId, versionId);
Version version = findVersion(nodeId, versionId);
if (v != null)
if (version != null)
{
CheckOutCheckInService cociService = sr.getCheckOutCheckInService();
NodeRef nodeRef = v.getVersionedNodeRef();
NodeRef nodeRef = version.getVersionedNodeRef();
String versionComment = versionOptions.getComment();
@@ -231,17 +231,17 @@ public class NodeVersionsRelation extends AbstractNodeRelation implements
}
// TODO review default for deep and/or whether we should make it an option
versionService.revert(nodeRef, v, false);
versionService.revert(nodeRef, version, false);
// Checkout/Checkin the node - to store the new version in version history
NodeRef wcNodeRef = cociService.checkout(nodeRef);
cociService.checkin(wcNodeRef, versionProperties);
// get latest version
v = versionService.getVersionHistory(nodeRef).getHeadVersion();
version = versionService.getVersionHistory(nodeRef).getHeadVersion();
Node node = nodes.getFolderOrDocumentFullInfo(v.getFrozenStateNodeRef(), null, null, parameters, null);
mapVersionInfo(v, node);
Node node = nodes.getFolderOrDocumentFullInfo(version.getFrozenStateNodeRef(), null, null, parameters, null);
mapVersionInfo(version, node);
return node;
}
@@ -252,17 +252,17 @@ public class NodeVersionsRelation extends AbstractNodeRelation implements
@WebApiDescription(title = "Delete version")
public void delete(String nodeId, String versionId, Parameters parameters)
{
Version v = findVersion(nodeId, versionId);
Version version = findVersion(nodeId, versionId);
// live (aka versioned) nodeRef
NodeRef nodeRef = v.getVersionedNodeRef();
NodeRef nodeRef = version.getVersionedNodeRef();
if (sr.getPermissionService().hasPermission(nodeRef, PermissionService.DELETE) != AccessStatus.ALLOWED)
{
throw new PermissionDeniedException("Cannot delete version");
}
versionService.deleteVersion(nodeRef, v);
versionService.deleteVersion(nodeRef, version);
Map<QName, Serializable> props = sr.getNodeService().getProperties(nodeRef);
if (props.get(ContentModel.PROP_VERSION_LABEL) == null)

View File

@@ -0,0 +1,153 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.api.nodes;
import org.alfresco.rest.api.ContentStorageInformation;
import org.alfresco.rest.api.model.ArchiveContentRequest;
import org.alfresco.rest.api.model.ContentStorageInfo;
import org.alfresco.rest.api.model.RestoreArchivedContentRequest;
import org.alfresco.rest.framework.Operation;
import org.alfresco.rest.framework.WebApiDescription;
import org.alfresco.rest.framework.WebApiParam;
import org.alfresco.rest.framework.core.ResourceParameter;
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
import org.alfresco.rest.framework.core.exceptions.RelationshipResourceNotFoundException;
import org.alfresco.rest.framework.resource.RelationshipResource;
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rest.framework.webscripts.WithResponse;
import org.alfresco.service.Experimental;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.version.Version;
import org.alfresco.util.PropertyCheck;
import org.springframework.beans.factory.InitializingBean;
import javax.servlet.http.HttpServletResponse;
/**
* Node Versions storage information.
*
* - GET /nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropQNameId}
*
* Note: Currently marked as experimental and subject to change.
*
* @author janv
*/
@Experimental
@RelationshipResource(name = "storage-info", entityResource = NodeVersionsRelation.class, title = "Node Version's content storage information")
public class NodeVersionsStorageInfoRelation implements RelationshipResourceAction.ReadById<ContentStorageInfo>, InitializingBean
{
private final ContentStorageInformation storageInformation;
private NodeVersionsRelation nodeVersions;
public NodeVersionsStorageInfoRelation(ContentStorageInformation storageInformation, NodeVersionsRelation nodeVersions)
{
this.storageInformation = storageInformation;
this.nodeVersions = nodeVersions;
}
@Override
public void afterPropertiesSet() throws Exception
{
PropertyCheck.mandatory(this, "storageInformation", storageInformation);
PropertyCheck.mandatory(this, "nodeVersions", nodeVersions);
}
@WebApiDescription(title = "Get storage properties",
description = "Retrieves storage properties for given node version content",
successStatus = HttpServletResponse.SC_OK)
@Override
public ContentStorageInfo readById(String nodeId, String versionId, Parameters parameters)
throws RelationshipResourceNotFoundException
{
String contentPropQNameId = parameters.getRelationship2Id();
NodeRef versionNodeRef = findVersionNodeRef(nodeId, versionId);
return storageInformation.getStorageInfo(versionNodeRef, contentPropQNameId, parameters);
}
@Experimental
@Operation("archive")
@WebApiParam(name = "archiveContentRequest", title = "Request for archive version content",
description = "Optional parameters for archive version content", kind = ResourceParameter.KIND.HTTP_BODY_OBJECT)
@WebApiDescription(title = "Request send version content to archive",
description = "Submits a request to send version content to archive",
successStatus = HttpServletResponse.SC_OK)
public void requestArchiveContent(String nodeId, String versionId, ArchiveContentRequest archiveContentRequest, Parameters parameters,
WithResponse withResponse)
{
String contentPropQNameId = parameters.getRelationship2Id();
NodeRef versionNodeRef = findVersionNodeRef(nodeId, versionId);
final boolean result = storageInformation.requestArchiveContent(versionNodeRef, contentPropQNameId, archiveContentRequest);
if (result)
{
withResponse.setStatus(HttpServletResponse.SC_OK);
}
else
{
withResponse.setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED);
}
}
@Experimental
@Operation("archive-restore")
@WebApiParam(name = "restoreArchivedContentRequest", title = "Request for restore version content from archive",
description = "Optional parameters for restore version content from archive", kind = ResourceParameter.KIND.HTTP_BODY_OBJECT)
@WebApiDescription(title = "Request restore version content from archive",
description = "Submits a request to restore version content from archive",
successStatus = HttpServletResponse.SC_ACCEPTED)
public void requestRestoreContentFromArchive(String nodeId, String versionId, RestoreArchivedContentRequest restoreArchivedContentRequest,
Parameters parameters, WithResponse withResponse)
{
String contentPropQNameId = parameters.getRelationship2Id();
NodeRef versionNodeRef = findVersionNodeRef(nodeId, versionId);
final boolean result = storageInformation.requestRestoreContentFromArchive(versionNodeRef, contentPropQNameId, restoreArchivedContentRequest);
if (result)
{
withResponse.setStatus(HttpServletResponse.SC_ACCEPTED);
}
else
{
withResponse.setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED);
}
}
private NodeRef findVersionNodeRef(String nodeId, String versionId)
{
Version version = nodeVersions.findVersion(nodeId, versionId);
if (version == null)
{
throw new EntityNotFoundException(nodeId+"-"+versionId);
}
return version.getFrozenStateNodeRef();
}
}

View File

@@ -227,13 +227,13 @@ public class ResultMapper
Map<QName, Serializable> properties = serviceRegistry.getNodeService().getProperties(aRow.getNodeRef());
NodeRef frozenNodeRef = ((NodeRef) properties.get(Version2Model.PROP_QNAME_FROZEN_NODE_REF));
String versionLabelId = (String) properties.get(Version2Model.PROP_QNAME_VERSION_LABEL);
Version v = null;
Version version = null;
try
{
if (frozenNodeRef != null && versionLabelId != null)
{
v = nodeVersions.findVersion(frozenNodeRef.getId(), versionLabelId);
aNode = nodes.getFolderOrDocument(v.getFrozenStateNodeRef(), null, null, params.getInclude(), mapUserInfo);
version = nodeVersions.findVersion(frozenNodeRef.getId(), versionLabelId);
aNode = nodes.getFolderOrDocument(version.getFrozenStateNodeRef(), null, null, params.getInclude(), mapUserInfo);
}
}
catch (EntityNotFoundException | InvalidNodeRefException e)
@@ -243,9 +243,9 @@ public class ResultMapper
+ " this is probably because the original node has been deleted.");
}
if (v != null && aNode != null)
if (version != null && aNode != null)
{
nodeVersions.mapVersionInfo(v, aNode, aRow.getNodeRef());
nodeVersions.mapVersionInfo(version, aNode, aRow.getNodeRef());
aNode.setNodeId(frozenNodeRef.getId());
aNode.setVersionLabel(versionLabelId);
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -188,6 +188,8 @@ public class Params implements Parameters
builder.append(this.entityId);
builder.append(", relationshipId=");
builder.append(this.relationshipId);
builder.append(", relationship2Id=");
builder.append(this.relationship2Id);
builder.append(", passedIn=");
builder.append(this.passedIn);
builder.append(", paging=");

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -68,6 +68,7 @@ public class ResourceWebScriptDelete extends AbstractResourceWebScript implement
final Map<String, String> resourceVars = locator.parseTemplateVars(req.getServiceMatch().getTemplateVars());
final String entityId = resourceVars.get(ResourceLocator.ENTITY_ID);
final String relationshipId = resourceVars.get(ResourceLocator.RELATIONSHIP_ID);
final String relationship2Id = resourceVars.get(ResourceLocator.RELATIONSHIP2_ID);
final Params.RecognizedParams params = getRecognizedParams(req);
@@ -78,7 +79,15 @@ public class ResourceWebScriptDelete extends AbstractResourceWebScript implement
return Params.valueOf(params, entityId, relationshipId, req);
case RELATIONSHIP:
// note: relationshipId can be null - when deleting a related set/collection
return Params.valueOf(params, entityId, relationshipId, req);
if (StringUtils.isNotBlank(relationship2Id))
{
return Params.valueOf(false, entityId, relationshipId, relationship2Id,
null, null, null, params, null, req);
}
else
{
return Params.valueOf(params, entityId, relationshipId, req);
}
case PROPERTY:
final String resourceName = resourceVars.get(ResourceLocator.RELATIONSHIP_RESOURCE);
final String propertyName = resourceVars.get(ResourceLocator.PROPERTY);

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -57,7 +57,7 @@ import org.springframework.http.HttpMethod;
/**
* Handles the HTTP POST for a Resource, equivalent to CRUD Create
*
* @author Gethin James
* @author Gethin James, janv
*/
public class ResourceWebScriptPost extends AbstractResourceWebScript implements ParamsExtractor,
RecognizedParamsExtractor, RequestReader
@@ -79,6 +79,7 @@ public class ResourceWebScriptPost extends AbstractResourceWebScript implements
final String operationName = resourceVars.get(ResourceLocator.RELATIONSHIP_RESOURCE);
final String propertyName = resourceVars.get(ResourceLocator.PROPERTY);
final String relationship2Id = resourceVars.get(ResourceLocator.RELATIONSHIP2_ID);
final RecognizedParams params = getRecognizedParams(req);
final ResourceOperation operation = resourceMeta.getOperation(HttpMethod.POST);
@@ -116,10 +117,10 @@ public class ResourceWebScriptPost extends AbstractResourceWebScript implements
if (StringUtils.isNotBlank(entityId) && StringUtils.isNotBlank(operationName))
{
Object postedObj = processRequest(resourceMeta, operation, req);
if (StringUtils.isNotBlank(propertyName))
{
return Params.valueOf(entityId, relationshipId, params, postedObj, req);
return Params.valueOf(false, entityId, relationshipId, relationship2Id, postedObj, null, propertyName, params, null, req);
}
else
{

View File

@@ -29,8 +29,12 @@ package org.alfresco.web.app.servlet;
import java.io.IOException;
import java.util.Properties;
import javax.servlet.ServletContext;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.httpclient.HttpClientFactory;
import org.alfresco.httpclient.HttpClientFactory.SecureCommsType;
import org.alfresco.web.scripts.servlet.X509ServletFilterBase;
import org.apache.commons.logging.Log;
@@ -46,40 +50,86 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
public class AlfrescoX509ServletFilter extends X509ServletFilterBase
{
private static final String BEAN_GLOBAL_PROPERTIES = "global-properties";
private static final String SECURE_COMMS = "solr.secureComms";
private SecureCommsType secureComms = SecureCommsType.HTTPS;
private String sharedSecret;
private String sharedSecretHeader = HttpClientFactory.DEFAULT_SHAREDSECRET_HEADER;
private static final String BEAN_GLOBAL_PROPERTIES = "global-properties";
private static final String PROP_SECURE_COMMS = "solr.secureComms";
private static final String PROP_SHARED_SECRET = "solr.sharedSecret";
private static final String PROP_SHARED_SECRET_HEADER = "solr.sharedSecret.header";
private static Log logger = LogFactory.getLog(AlfrescoX509ServletFilter.class);
public void init(FilterConfig config) throws ServletException
{
WebApplicationContext wc = WebApplicationContextUtils.getRequiredWebApplicationContext(config.getServletContext());
Properties globalProperties = (Properties) wc.getBean(BEAN_GLOBAL_PROPERTIES);
String secureCommsProp = globalProperties.getProperty(PROP_SECURE_COMMS);
if(secureCommsProp != null && !secureCommsProp.isEmpty()) {
secureComms = SecureCommsType.getType(secureCommsProp);
}
sharedSecret = globalProperties.getProperty(PROP_SHARED_SECRET);
sharedSecretHeader = globalProperties.getProperty(PROP_SHARED_SECRET_HEADER);
if(secureComms == SecureCommsType.SECRET)
{
if(sharedSecret == null || sharedSecret.length()==0)
{
logger.fatal("Missing value for solr.sharedSecret configuration property. If solr.secureComms is set to \"secret\", a value for solr.sharedSecret is required. See https://docs.alfresco.com/search-services/latest/install/options/");
throw new AlfrescoRuntimeException("Missing value for solr.sharedSecret configuration property");
}
if(sharedSecretHeader == null || sharedSecretHeader.length()==0)
{
throw new AlfrescoRuntimeException("Missing value for sharedSecretHeader");
}
}
/*
// TODO: Activate this part after OPSEXP-1163 got implemented
if(secureComms == SecureCommsType.NONE)
{
if(!"true".equalsIgnoreCase(config.getInitParameter("allow-unauthenticated-solr-endpoint")))
{
throw new AlfrescoRuntimeException("solr.secureComms=none is no longer supported. Please use https or secret");
}
}
*/
super.init(config);
}
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain) throws IOException, ServletException
{
HttpServletRequest httpRequest = (HttpServletRequest)request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
switch(secureComms) {
case HTTPS:
super.doFilter(request,response,chain);
return;
case SECRET:
if(sharedSecret.equals(httpRequest.getHeader(sharedSecretHeader)))
{
chain.doFilter(request, response);
}
else
{
httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "Authentication failure");
}
return;
case NONE:
chain.doFilter(request,response);
return;
default:
httpResponse.sendError(HttpServletResponse.SC_FORBIDDEN, "Authentication failure");
}
}
@Override
protected boolean checkEnforce(ServletContext servletContext) throws IOException
{
/*
* Get the secureComms setting from the global properties bean.
*/
WebApplicationContext wc = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
Properties globalProperties = (Properties) wc.getBean(BEAN_GLOBAL_PROPERTIES);
String prop = globalProperties.getProperty(SECURE_COMMS);
if(logger.isDebugEnabled())
{
logger.debug("secureComms:"+prop);
}
/*
* Return true or false based on the property. This will switch on/off X509 enforcement in the X509ServletFilterBase.
*/
if (prop == null ||
SecureCommsType.getType(prop) == SecureCommsType.NONE ||
SecureCommsType.getType(prop) == SecureCommsType.SECRET)
{
return false;
}
else
{
return true;
}
return secureComms == SecureCommsType.HTTPS;
}
}

View File

@@ -993,6 +993,11 @@
<constructor-arg name="storageInformation" ref="ContentStorageInformation" />
</bean>
<bean class="org.alfresco.rest.api.nodes.NodeVersionsStorageInfoRelation">
<constructor-arg name="storageInformation" ref="ContentStorageInformation" />
<constructor-arg name="nodeVersions" ref="nodeVersionsRelation" />
</bean>
<bean class="org.alfresco.rest.api.nodes.NodeSecondaryChildrenRelation" parent="baseNodeRelation"/>
<bean class="org.alfresco.rest.api.nodes.NodeParentsRelation" parent="baseNodeRelation"/>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -60,6 +60,8 @@ public class ContentStorageInformationImplTest
private static final String CONTENT_PROP_NAME = "cm:content";
private static final String STANDARD_PRIORITY = "Standard";
private static final NodeRef DUMMY_NODE_REF = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
@Mock
private ContentService contentService;
@Mock
@@ -71,15 +73,13 @@ public class ContentStorageInformationImplTest
@Test
public void shouldReturnStorageInfoResponseWithNonEmptyStorageProps()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final Map<String, String> storageProps = Map.of("x-amz-storage-class", "INTELLIGENT_TIERING", "x-alf-archived", "false");
when(contentService.getStorageProperties(eq(nodeRef), any())).thenReturn(storageProps);
when(contentService.getStorageProperties(eq(DUMMY_NODE_REF), any())).thenReturn(storageProps);
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
when(namespaceService.getPrefixes(NamespaceService.CONTENT_MODEL_1_0_URI))
.thenReturn(List.of(NamespaceService.CONTENT_MODEL_PREFIX));
final ContentStorageInfo storageInfo = objectUnderTest.getStorageInfo(DUMMY_NODE_ID, CONTENT_PROP_NAME, null);
final ContentStorageInfo storageInfo = objectUnderTest.getStorageInfo(DUMMY_NODE_REF, CONTENT_PROP_NAME, null);
assertEquals(storageProps, storageInfo.getStorageProperties());
assertEquals(CONTENT_PROP_NAME, storageInfo.getId());
@@ -88,14 +88,12 @@ public class ContentStorageInformationImplTest
@Test
public void shouldReturnStorageInfoResponseWithEmptyStorageProps()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
when(contentService.getStorageProperties(eq(nodeRef), any())).thenCallRealMethod();
when(contentService.getStorageProperties(eq(DUMMY_NODE_REF), any())).thenCallRealMethod();
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
when(namespaceService.getPrefixes(NamespaceService.CONTENT_MODEL_1_0_URI))
.thenReturn(List.of(NamespaceService.CONTENT_MODEL_PREFIX));
final ContentStorageInfo storageInfo = objectUnderTest.getStorageInfo(DUMMY_NODE_ID, CONTENT_PROP_NAME, null);
final ContentStorageInfo storageInfo = objectUnderTest.getStorageInfo(DUMMY_NODE_REF, CONTENT_PROP_NAME, null);
assertEquals(Collections.emptyMap(), storageInfo.getStorageProperties());
assertEquals(CONTENT_PROP_NAME, storageInfo.getId());
@@ -104,16 +102,15 @@ public class ContentStorageInformationImplTest
@Test
public void shouldSucceedOnArchiveContent()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final Map<String, Serializable> archiveProps = Collections.emptyMap();
final ArchiveContentRequest archiveParamsRequest = new ArchiveContentRequest();
archiveParamsRequest.setArchiveParams(archiveProps);
final boolean expectedResult = true;
when(contentService.requestSendContentToArchive(eq(nodeRef), any(QName.class), eq(archiveProps))).thenReturn(expectedResult);
when(contentService.requestSendContentToArchive(eq(DUMMY_NODE_REF), any(QName.class), eq(archiveProps))).thenReturn(expectedResult);
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
final boolean requestArchiveContent = objectUnderTest.requestArchiveContent(DUMMY_NODE_ID, CONTENT_PROP_NAME, archiveParamsRequest);
final boolean requestArchiveContent = objectUnderTest.requestArchiveContent(DUMMY_NODE_REF, CONTENT_PROP_NAME, archiveParamsRequest);
assertEquals(expectedResult, requestArchiveContent);
}
@@ -121,14 +118,13 @@ public class ContentStorageInformationImplTest
@Test
public void shouldSucceedOnArchiveContentWhenNoRequestBody()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final Map<String, Serializable> archiveProps = Collections.emptyMap();
final boolean expectedResult = true;
when(contentService.requestSendContentToArchive(eq(nodeRef), any(QName.class), eq(archiveProps))).thenReturn(expectedResult);
when(contentService.requestSendContentToArchive(eq(DUMMY_NODE_REF), any(QName.class), eq(archiveProps))).thenReturn(expectedResult);
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
final boolean requestArchiveContent = objectUnderTest.requestArchiveContent(DUMMY_NODE_ID, CONTENT_PROP_NAME, null);
final boolean requestArchiveContent = objectUnderTest.requestArchiveContent(DUMMY_NODE_REF, CONTENT_PROP_NAME, null);
assertEquals(expectedResult, requestArchiveContent);
}
@@ -136,16 +132,15 @@ public class ContentStorageInformationImplTest
@Test
public void shouldNotSucceedOnArchiveContent()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final Map<String, Serializable> archiveProps = Collections.emptyMap();
final ArchiveContentRequest archiveParamsRequest = new ArchiveContentRequest();
archiveParamsRequest.setArchiveParams(archiveProps);
final boolean expectedResult = false;
when(contentService.requestSendContentToArchive(eq(nodeRef), any(QName.class), eq(archiveProps))).thenReturn(expectedResult);
when(contentService.requestSendContentToArchive(eq(DUMMY_NODE_REF), any(QName.class), eq(archiveProps))).thenReturn(expectedResult);
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
final boolean requestArchiveContent = objectUnderTest.requestArchiveContent(DUMMY_NODE_ID, CONTENT_PROP_NAME, archiveParamsRequest);
final boolean requestArchiveContent = objectUnderTest.requestArchiveContent(DUMMY_NODE_REF, CONTENT_PROP_NAME, archiveParamsRequest);
assertEquals(expectedResult, requestArchiveContent);
}
@@ -153,31 +148,29 @@ public class ContentStorageInformationImplTest
@Test
public void shouldThrowExceptionOnArchiveContent()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final Map<String, Serializable> archiveProps = Collections.emptyMap();
final ArchiveContentRequest archiveParamsRequest = new ArchiveContentRequest();
archiveParamsRequest.setArchiveParams(archiveProps);
when(contentService.requestSendContentToArchive(eq(nodeRef), any(QName.class), eq(archiveProps))).thenCallRealMethod();
when(contentService.requestSendContentToArchive(eq(DUMMY_NODE_REF), any(QName.class), eq(archiveProps))).thenCallRealMethod();
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
assertThrows(UnsupportedOperationException.class,
() -> objectUnderTest.requestArchiveContent(DUMMY_NODE_ID, CONTENT_PROP_NAME, archiveParamsRequest));
() -> objectUnderTest.requestArchiveContent(DUMMY_NODE_REF, CONTENT_PROP_NAME, archiveParamsRequest));
}
@Test
public void shouldSucceedOnRestoreContentFromArchive()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final Map<String, Serializable> restoreParams = Map.of(ContentRestoreParams.RESTORE_PRIORITY.name(), STANDARD_PRIORITY);
final RestoreArchivedContentRequest restoreArchivedContentRequest = new RestoreArchivedContentRequest();
restoreArchivedContentRequest.setRestorePriority(STANDARD_PRIORITY);
final boolean expectedResult = true;
when(contentService.requestRestoreContentFromArchive(eq(nodeRef), any(QName.class), eq(restoreParams))).thenReturn(expectedResult);
when(contentService.requestRestoreContentFromArchive(eq(DUMMY_NODE_REF), any(QName.class), eq(restoreParams))).thenReturn(expectedResult);
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
final boolean requestArchiveContent = objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, restoreArchivedContentRequest);
final boolean requestArchiveContent = objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_REF, CONTENT_PROP_NAME, restoreArchivedContentRequest);
assertEquals(expectedResult, requestArchiveContent);
}
@@ -185,14 +178,13 @@ public class ContentStorageInformationImplTest
@Test
public void shouldSucceedOnRestoreContentFromArchiveWhenNoRequestBody()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final boolean expectedResult = true;
when(contentService.requestRestoreContentFromArchive(eq(nodeRef), any(QName.class), eq(Collections.emptyMap())))
when(contentService.requestRestoreContentFromArchive(eq(DUMMY_NODE_REF), any(QName.class), eq(Collections.emptyMap())))
.thenReturn(expectedResult);
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
final boolean requestArchiveContent = objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, null);
final boolean requestArchiveContent = objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_REF, CONTENT_PROP_NAME, null);
assertEquals(expectedResult, requestArchiveContent);
}
@@ -200,16 +192,15 @@ public class ContentStorageInformationImplTest
@Test
public void shouldNotSucceedOnRestoreContentFromArchive()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final Map<String, Serializable> restoreParams = Map.of(ContentRestoreParams.RESTORE_PRIORITY.name(), STANDARD_PRIORITY);
final RestoreArchivedContentRequest restoreArchivedContentRequest = new RestoreArchivedContentRequest();
restoreArchivedContentRequest.setRestorePriority(STANDARD_PRIORITY);
final boolean expectedResult = false;
when(contentService.requestRestoreContentFromArchive(eq(nodeRef), any(QName.class), eq(restoreParams))).thenReturn(expectedResult);
when(contentService.requestRestoreContentFromArchive(eq(DUMMY_NODE_REF), any(QName.class), eq(restoreParams))).thenReturn(expectedResult);
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
final boolean requestArchiveContent = objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, restoreArchivedContentRequest);
final boolean requestArchiveContent = objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_REF, CONTENT_PROP_NAME, restoreArchivedContentRequest);
assertEquals(expectedResult, requestArchiveContent);
}
@@ -217,30 +208,28 @@ public class ContentStorageInformationImplTest
@Test
public void shouldThrowExceptionRestoreContentFromArchive()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final Map<String, Serializable> restoreParams = Map.of(ContentRestoreParams.RESTORE_PRIORITY.name(), STANDARD_PRIORITY);
final RestoreArchivedContentRequest restoreArchivedContentRequest = new RestoreArchivedContentRequest();
restoreArchivedContentRequest.setRestorePriority(STANDARD_PRIORITY);
when(contentService.requestRestoreContentFromArchive(eq(nodeRef), any(QName.class), eq(restoreParams))).thenCallRealMethod();
when(contentService.requestRestoreContentFromArchive(eq(DUMMY_NODE_REF), any(QName.class), eq(restoreParams))).thenCallRealMethod();
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
assertThrows(UnsupportedOperationException.class,
() -> objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, restoreArchivedContentRequest));
() -> objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_REF, CONTENT_PROP_NAME, restoreArchivedContentRequest));
}
@Test
public void shouldThrowRestoreInProgressExceptionRestoreContentFromArchive()
{
final NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
final Map<String, Serializable> restoreParams = Map.of(ContentRestoreParams.RESTORE_PRIORITY.name(), STANDARD_PRIORITY);
final RestoreArchivedContentRequest restoreArchivedContentRequest = new RestoreArchivedContentRequest();
restoreArchivedContentRequest.setRestorePriority(STANDARD_PRIORITY);
when(contentService.requestRestoreContentFromArchive(eq(nodeRef), any(QName.class), eq(restoreParams))).thenThrow(new org.alfresco.service.cmr.repository.RestoreInProgressException("Error"));
when(contentService.requestRestoreContentFromArchive(eq(DUMMY_NODE_REF), any(QName.class), eq(restoreParams))).thenThrow(new org.alfresco.service.cmr.repository.RestoreInProgressException("Error"));
when(namespaceService.getNamespaceURI(NamespaceService.CONTENT_MODEL_PREFIX)).thenReturn(NamespaceService.CONTENT_MODEL_1_0_URI);
assertThrows(RestoreInProgressException.class,
() -> objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, restoreArchivedContentRequest));
() -> objectUnderTest.requestRestoreContentFromArchive(DUMMY_NODE_REF, CONTENT_PROP_NAME, restoreArchivedContentRequest));
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -33,6 +33,8 @@ import org.alfresco.rest.api.model.ContentStorageInfo;
import org.alfresco.rest.api.model.RestoreArchivedContentRequest;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rest.framework.webscripts.WithResponse;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -54,6 +56,7 @@ public class NodeStorageInfoRelationTest extends TestCase
{
private static final String DUMMY_NODE_ID = "dummy-node-id";
private static final String CONTENT_PROP_NAME = "cm:content";
private static final NodeRef DUMMY_NODE_REF = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, DUMMY_NODE_ID);
@Mock
private ContentStorageInformation storageInformation;
@@ -74,7 +77,7 @@ public class NodeStorageInfoRelationTest extends TestCase
expectedStorageInfo.setStorageProperties(storageProps);
expectedStorageInfo.setId(CONTENT_PROP_NAME);
when(storageInformation.getStorageInfo(DUMMY_NODE_ID, CONTENT_PROP_NAME, params)).thenReturn(expectedStorageInfo);
when(storageInformation.getStorageInfo(DUMMY_NODE_REF, CONTENT_PROP_NAME, params)).thenReturn(expectedStorageInfo);
final ContentStorageInfo storageInfo = objectUnderTest.readById(DUMMY_NODE_ID, CONTENT_PROP_NAME, params);
@@ -86,7 +89,7 @@ public class NodeStorageInfoRelationTest extends TestCase
public void shouldProperlyRequestArchiveContent()
{
final ArchiveContentRequest archiveContentRequest = new ArchiveContentRequest();
when(storageInformation.requestArchiveContent(DUMMY_NODE_ID, CONTENT_PROP_NAME, archiveContentRequest)).thenReturn(true);
when(storageInformation.requestArchiveContent(DUMMY_NODE_REF, CONTENT_PROP_NAME, archiveContentRequest)).thenReturn(true);
objectUnderTest.requestArchiveContent(DUMMY_NODE_ID, CONTENT_PROP_NAME, archiveContentRequest, params, withResponse);
@@ -97,7 +100,7 @@ public class NodeStorageInfoRelationTest extends TestCase
public void shouldFailsOnRequestArchiveContent()
{
final ArchiveContentRequest archiveContentRequest = new ArchiveContentRequest();
when(storageInformation.requestArchiveContent(DUMMY_NODE_ID, CONTENT_PROP_NAME, archiveContentRequest)).thenReturn(false);
when(storageInformation.requestArchiveContent(DUMMY_NODE_REF, CONTENT_PROP_NAME, archiveContentRequest)).thenReturn(false);
objectUnderTest.requestArchiveContent(DUMMY_NODE_ID, CONTENT_PROP_NAME, archiveContentRequest, params, withResponse);
@@ -108,7 +111,7 @@ public class NodeStorageInfoRelationTest extends TestCase
public void shouldThrowExceptionOnRequestArchiveContent()
{
final ArchiveContentRequest archiveContentRequest = new ArchiveContentRequest();
when(storageInformation.requestArchiveContent(DUMMY_NODE_ID, CONTENT_PROP_NAME, archiveContentRequest))
when(storageInformation.requestArchiveContent(DUMMY_NODE_REF, CONTENT_PROP_NAME, archiveContentRequest))
.thenThrow(UnsupportedOperationException.class);
assertThrows(UnsupportedOperationException.class,
@@ -121,11 +124,11 @@ public class NodeStorageInfoRelationTest extends TestCase
public void shouldProperlyRequestRestoreContentFromArchive()
{
final RestoreArchivedContentRequest restoreArchivedContentRequest = new RestoreArchivedContentRequest();
when(storageInformation.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, restoreArchivedContentRequest))
when(storageInformation.requestRestoreContentFromArchive(DUMMY_NODE_REF, CONTENT_PROP_NAME, restoreArchivedContentRequest))
.thenReturn(true);
objectUnderTest
.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, restoreArchivedContentRequest, params, withResponse);
.requestRestoreContentFromArchive(DUMMY_NODE_REF.getId(), CONTENT_PROP_NAME, restoreArchivedContentRequest, params, withResponse);
verify(withResponse, times(1)).setStatus(HttpServletResponse.SC_ACCEPTED);
}
@@ -134,11 +137,11 @@ public class NodeStorageInfoRelationTest extends TestCase
public void shouldFailsOnRequestRestoreContentFromArchive()
{
final RestoreArchivedContentRequest restoreArchivedContentRequest = new RestoreArchivedContentRequest();
when(storageInformation.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, restoreArchivedContentRequest))
when(storageInformation.requestRestoreContentFromArchive(DUMMY_NODE_REF, CONTENT_PROP_NAME, restoreArchivedContentRequest))
.thenReturn(false);
objectUnderTest
.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, restoreArchivedContentRequest, params, withResponse);
.requestRestoreContentFromArchive(DUMMY_NODE_REF.getId(), CONTENT_PROP_NAME, restoreArchivedContentRequest, params, withResponse);
verify(withResponse, times(1)).setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED);
}
@@ -147,7 +150,7 @@ public class NodeStorageInfoRelationTest extends TestCase
public void shouldThrowExceptionOnRequestRestoreContentFromArchive()
{
final RestoreArchivedContentRequest restoreArchivedContentRequest = new RestoreArchivedContentRequest();
when(storageInformation.requestRestoreContentFromArchive(DUMMY_NODE_ID, CONTENT_PROP_NAME, restoreArchivedContentRequest))
when(storageInformation.requestRestoreContentFromArchive(DUMMY_NODE_REF, CONTENT_PROP_NAME, restoreArchivedContentRequest))
.thenThrow(UnsupportedOperationException.class);
assertThrows(UnsupportedOperationException.class, () -> objectUnderTest

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -1035,6 +1035,16 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
return URL_NODES + "/" + nodeId + "/" + URL_RENDITIONS;
}
protected String getNodeRenditionIdUrl(String nodeId, String renditionID)
{
return URL_NODES + "/" + nodeId + "/" + URL_RENDITIONS + "/" + renditionID;
}
protected String getNodeVersionRenditionIdUrl(String nodeId, String versionId, String renditionID)
{
return URL_NODES + "/" + nodeId + "/" + URL_VERSIONS + "/" + versionId + "/" + URL_RENDITIONS + "/" + renditionID;
}
protected String getNodeVersionsUrl(String nodeId)
{
return URL_NODES + "/" + nodeId + "/" + URL_VERSIONS;

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -6366,5 +6366,92 @@ public class NodeApiTest extends AbstractSingleNetworkSiteTest
HttpResponse dauResponse = post(getRequestContentDirectUrl(contentNodeId), null, null, null, null, 501);
}
@Test
public void testRequestDeleteRendition() throws Exception
{
setRequestContext(networkOne.getId(), user1, null);
String myNodeId = getMyNodeId();
// Create multipart request - txt file
String renditionName = "pdf";
String fileName = "quick-1.txt";
File file = getResourceFile(fileName);
MultiPartRequest reqBody = MultiPartBuilder.create()
.setFileData(new FileData(fileName, file))
.setRenditions(Collections.singletonList(renditionName))
.build();
//Upload file to user home node
HttpResponse response = post(getNodeChildrenUrl(myNodeId), reqBody.getBody(), null, reqBody.getContentType(), 201);
Document document = RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
String contentNodeId = document.getId();
// wait and check that rendition is created ...
Rendition rendition = waitAndGetRendition(contentNodeId, null, renditionName);
assertNotNull(rendition);
assertEquals(Rendition.RenditionStatus.CREATED, rendition.getStatus());
//clean rendition
delete(getNodeRenditionIdUrl(contentNodeId, renditionName), null, null, null, null, 204);
//retry to double-check deletion
delete(getNodeRenditionIdUrl(contentNodeId, renditionName), null, null, null, null, 404);
//check if rendition was cleaned
HttpResponse getResponse = getSingle(getNodeRenditionIdUrl(contentNodeId, renditionName), null, 200);
Rendition renditionDeleted = RestApiUtil.parseRestApiEntry(getResponse.getJsonResponse(), Rendition.class);
assertNotNull(renditionDeleted);
assertEquals(Rendition.RenditionStatus.NOT_CREATED, renditionDeleted.getStatus());
}
@Test
public void testRequestVersionDeleteRendition() throws Exception
{
setRequestContext(networkOne.getId(), user1, null);
String myNodeId = getMyNodeId();
// Create multipart request - txt file
String renditionName = "pdf";
String fileName = "quick-1.txt";
File file = getResourceFile(fileName);
MultiPartRequest reqBody = MultiPartBuilder.create()
.setFileData(new FileData(fileName, file))
.setRenditions(Collections.singletonList(renditionName))
.build();
//Upload file to user home node
HttpResponse response = post(getNodeChildrenUrl(myNodeId), reqBody.getBody(), null, reqBody.getContentType(), 201);
Document document = RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
String contentNodeId = document.getId();
//Update file to newer version
String content = "The quick brown fox jumps over the lazy dog\n the lazy dog jumps over the quick brown fox";
Map<String, String> params = new HashMap<>();
params.put("comment", "my version ");
document = updateTextFile(contentNodeId, content, params);
assertTrue(document.getAspectNames().contains("cm:versionable"));
assertNotNull(document.getProperties());
assertEquals("1.1", document.getProperties().get("cm:versionLabel"));
// create rendition for old version and check that rendition is created ...
Rendition renditionUpdated = createAndGetRendition(contentNodeId, "1.0", renditionName);
assertNotNull(renditionUpdated);
assertEquals(Rendition.RenditionStatus.CREATED, renditionUpdated.getStatus());
//clean rendition
delete(getNodeVersionRenditionIdUrl(contentNodeId, "1.0", renditionName), null, null, null, null, 204);
//retry to double-check deletion
delete(getNodeVersionRenditionIdUrl(contentNodeId, "1.0", renditionName), null, null, null, null, 404);
//check if rendition was cleaned
HttpResponse getResponse = getSingle(getNodeVersionRenditionIdUrl(contentNodeId, "1.0", renditionName), null, 200);
Rendition renditionDeleted = RestApiUtil.parseRestApiEntry(getResponse.getJsonResponse(), Rendition.class);
assertNotNull(renditionDeleted);
assertEquals(Rendition.RenditionStatus.NOT_CREATED, renditionDeleted.getStatus());
}
}

View File

@@ -204,7 +204,7 @@ public class SharedLinkApiTest extends AbstractBaseApiTest
assertEquals(d1Id, resp.getNodeId());
assertEquals(fileName1, resp.getName());
assertEquals("The quick brown fox jumps over the lazy dog", resp.getTitle());
assertEquals("Gym class featuring a brown fox and lazy dog", resp.getDescription());
assertEquals("Pangram, fox, dog, Gym class featuring a brown fox and lazy dog", resp.getDescription());
assertEquals(file1_MimeType, resp.getContent().getMimeType());
assertEquals("Adobe PDF Document", resp.getContent().getMimeTypeName());
@@ -245,7 +245,7 @@ public class SharedLinkApiTest extends AbstractBaseApiTest
assertEquals(shared1Id, resp.getId());
assertEquals(fileName1, resp.getName());
assertEquals("The quick brown fox jumps over the lazy dog", resp.getTitle());
assertEquals("Gym class featuring a brown fox and lazy dog", resp.getDescription());
assertEquals("Pangram, fox, dog, Gym class featuring a brown fox and lazy dog", resp.getDescription());
assertEquals(d1Id, resp.getNodeId());
assertNull(resp.getAllowableOperations()); // include is ignored
assertNull(resp.getAllowableOperationsOnTarget()); // include is ignored
@@ -1319,7 +1319,7 @@ public class SharedLinkApiTest extends AbstractBaseApiTest
// Quick check that some extended info is present.
assertEquals("The quick brown fox jumps over the lazy dog", sharedLink.getTitle());
assertEquals("Gym class featuring a brown fox and lazy dog", sharedLink.getDescription());
assertEquals("Pangram, fox, dog, Gym class featuring a brown fox and lazy dog", sharedLink.getDescription());
});
}

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.67</version>
<version>14.92-SNAPSHOT</version>
</parent>
<dependencies>
@@ -122,7 +122,7 @@
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>68.2</version>
<version>70.1</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
@@ -138,7 +138,7 @@
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>1.7.13</version>
<version>1.7.14</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
@@ -427,12 +427,12 @@
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.3.0</version>
<version>3.5.9</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.5</version>
<version>2.0.6</version>
</dependency>
<!-- Activiti -->
@@ -988,21 +988,6 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<organizationName>Alfresco Software Limited</organizationName>
<failOnMissingHeader>true</failOnMissingHeader>
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
<licenseResolver>classpath://alfresco</licenseResolver>
<licenseName>${licenseName}</licenseName>
<roots>
<root>src</root>
</roots>
<includes>
<include>**/*.java</include>
<include>**/*.jsp</include>
</includes>
</configuration>
<executions>
<execution>
<id>check-licenses</id>
@@ -1010,6 +995,21 @@
<goals>
<goal>check-file-header</goal>
</goals>
<configuration>
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
<organizationName>Alfresco Software Limited</organizationName>
<failOnMissingHeader>true</failOnMissingHeader>
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
<licenseResolver>classpath://alfresco</licenseResolver>
<licenseName>${licenseName}</licenseName>
<roots>
<root>src</root>
</roots>
<includes>
<include>**/*.java</include>
<include>**/*.jsp</include>
</includes>
</configuration>
</execution>
</executions>
<dependencies>
@@ -1021,16 +1021,6 @@
</dependencies>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.0.1.alfresco-1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -28,6 +28,7 @@ package org.alfresco.ibatis;
import org.alfresco.metrics.db.DBMetricsReporter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ibatis.cursor.Cursor;
import org.apache.ibatis.executor.BatchResult;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.session.ResultContext;
@@ -246,6 +247,48 @@ public class SqlSessionMetricsWrapper implements SqlSession
}
}
@Override
public <T> Cursor<T> selectCursor(String statement)
{
long startTime = System.currentTimeMillis();
try
{
return this.sqlSession.selectCursor(statement);
}
finally
{
reportQueryExecuted(startTime, SELECT_LABEL, statement);
}
}
@Override
public <T> Cursor<T> selectCursor(String statement, Object parameter)
{
long startTime = System.currentTimeMillis();
try
{
return this.sqlSession.selectCursor(statement, parameter);
}
finally
{
reportQueryExecuted(startTime, SELECT_LABEL, statement);
}
}
@Override
public <T> Cursor<T> selectCursor(String statement, Object parameter, RowBounds rowBounds)
{
long startTime = System.currentTimeMillis();
try
{
return this.sqlSession.selectCursor(statement, parameter, rowBounds);
}
finally
{
reportQueryExecuted(startTime, SELECT_LABEL, statement);
}
}
@Override
public int insert(String statement)
{

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2019 Alfresco Software Limited
* Copyright (C) 2019 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -181,9 +181,9 @@ public abstract class AbstractLocalTransform implements LocalTransform
Set<String> allowedMimetypes = strictMimetypeExceptions.get(declaredMimetype);
if (allowedMimetypes != null && allowedMimetypes.contains(detectedMimetype))
{
String fileName = transformerDebug.getFileName(sourceNodeRef, true, 0);
String filename = transformerDebug.getFilename(sourceNodeRef, true);
String readerSourceMimetype = reader.getMimetype();
String message = "Transformation of ("+fileName+
String message = "Transformation of ("+filename+
") has not taken place because the declared mimetype ("+
readerSourceMimetype+") does not match the detected mimetype ("+
detectedMimetype+").";

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -26,29 +26,22 @@
package org.alfresco.repo.content.transform;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.metadata.AsynchronousExtractor;
import org.alfresco.service.cmr.repository.MimetypeService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.util.EqualsHelper;
import org.alfresco.util.LogTee;
import org.alfresco.util.PropertyCheck;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.util.ArrayDeque;
import java.util.Collection;
import java.util.Deque;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.StringJoiner;
import java.util.concurrent.atomic.AtomicInteger;
import static org.alfresco.repo.rendition2.RenditionDefinition2.SOURCE_ENCODING;
import static org.alfresco.repo.rendition2.RenditionDefinition2.SOURCE_NODE_REF;
import static org.alfresco.repo.rendition2.RenditionDefinition2.TARGET_ENCODING;
import static org.alfresco.repo.rendition2.RenditionDefinition2.TIMEOUT;
/**
* Debugs transformers selection and activity.<p>
*
@@ -60,16 +53,32 @@ import static org.alfresco.repo.rendition2.RenditionDefinition2.TIMEOUT;
*/
public class TransformerDebug
{
public static final String TIMEOUT = "timeout";
public static final String SOURCE_ENCODING = "sourceEncoding";
public static final String SOURCE_NODE_REF = "sourceNodeRef";
public static final String TARGET_ENCODING = "targetEncoding";
public static final String TRANSFORM_NAMESPACE = "transform:";
public static final String MIMETYPE_METADATA_EXTRACT = "alfresco-metadata-extract";
public static final String MIMETYPE_METADATA_EMBED = "alfresco-metadata-embed";
protected static final String FINISHED_IN = "Finished in ";
protected static final String NO_TRANSFORMERS = "No transformers";
protected static final String TRANSFORM_SERVICE_NAME = "TransformService";
private Log info;
protected Log logger;
private static final int REFERENCE_SIZE = 15;
protected ExtensionLookup extensionLookup;
private Log singleLineLog;
protected Log multiLineLog;
protected NodeService nodeService;
protected MimetypeService mimetypeService;
private final ThreadLocal<Integer> previousTransformId = ThreadLocal.withInitial(()->-1);
public interface ExtensionLookup
{
String getExtension(String mimetype);
}
protected enum Call
{
AVAILABLE,
@@ -92,12 +101,12 @@ public class TransformerDebug
private final Deque<String> isTransformableStack = new ArrayDeque<String>();
private boolean debugOutput = true;
private StringBuilder sb;
public static Deque<Frame> getStack()
{
return threadInfo.get().stack;
}
public static boolean getDebugOutput()
{
return threadInfo.get().debugOutput;
@@ -107,7 +116,7 @@ public class TransformerDebug
{
return threadInfo.get().isTransformableStack;
}
public static boolean setDebugOutput(boolean debugOutput)
{
ThreadInfo thisThreadInfo = threadInfo.get();
@@ -115,7 +124,7 @@ public class TransformerDebug
thisThreadInfo.debugOutput = debugOutput;
return orig;
}
public static StringBuilder getStringBuilder()
{
return threadInfo.get().sb;
@@ -129,7 +138,7 @@ public class TransformerDebug
protected static class Frame
{
private static final AtomicInteger uniqueId = new AtomicInteger(0);
private static final AtomicInteger uniqueId = new AtomicInteger(1);
private int id;
private final String fromUrl;
@@ -143,11 +152,10 @@ public class TransformerDebug
private Call callType;
private Frame parent;
private int childId;
protected Set<UnavailableTransformer> unavailableTransformers;
private String failureReason;
private long sourceSize;
private String transformerName;
private Frame(Frame parent, String transformerName, String fromUrl, String sourceMimetype, String targetMimetype,
long sourceSize, String renditionName, NodeRef sourceNodeRef, Call pushCall, boolean origDebugOutput)
{
@@ -164,13 +172,18 @@ public class TransformerDebug
this.origDebugOutput = origDebugOutput;
start = System.currentTimeMillis();
}
static void reset()
{
uniqueId.set(0);
}
private int getId()
{
if (id == -1)
{
id = parent == null ? uniqueId.getAndIncrement() : ++parent.childId;
}
}
return id;
}
@@ -210,65 +223,19 @@ public class TransformerDebug
}
}
@Deprecated
protected class UnavailableTransformer implements Comparable<UnavailableTransformer>
public void setExtensionLookup(ExtensionLookup extensionLookup)
{
protected final String name;
protected final String priority;
protected final long maxSourceSizeKBytes;
protected final transient boolean debug;
UnavailableTransformer(String name, String priority, long maxSourceSizeKBytes, boolean debug)
{
this.name = name;
this.priority = priority;
this.maxSourceSizeKBytes = maxSourceSizeKBytes;
this.debug = debug;
}
@Override
public int hashCode()
{
int hashCode = 37 * name.hashCode();
hashCode += 37 * maxSourceSizeKBytes;
return hashCode;
}
@Override
public boolean equals(Object obj)
{
if (this == obj)
{
return true;
}
else if (obj instanceof UnavailableTransformer)
{
UnavailableTransformer that = (UnavailableTransformer) obj;
return
EqualsHelper.nullSafeEquals(name, that.name) &&
maxSourceSizeKBytes == that.maxSourceSizeKBytes;
}
else
{
return false;
}
}
@Override
public int compareTo(UnavailableTransformer o)
{
return name.compareTo(o.name);
}
this.extensionLookup = extensionLookup;
}
public void setTransformerLog(Log transformerLog)
{
info = new LogTee(LogFactory.getLog(TransformerLog.class), transformerLog);
singleLineLog = new LogTee(LogFactory.getLog(TransformerLog.class), transformerLog);
}
public void setTransformerDebugLog(Log transformerDebugLog)
{
logger = new LogTee(LogFactory.getLog(TransformerDebug.class), transformerDebugLog);
multiLineLog = new LogTee(LogFactory.getLog(TransformerDebug.class), transformerDebugLog);
}
public void setNodeService(NodeService nodeService)
@@ -279,6 +246,7 @@ public class TransformerDebug
public void setMimetypeService(MimetypeService mimetypeService)
{
this.mimetypeService = mimetypeService;
setExtensionLookup(mimetype -> mimetypeService.getExtension(mimetype));
}
public void setPreviousTransformId(int id)
@@ -295,8 +263,8 @@ public class TransformerDebug
{
PropertyCheck.mandatory(this, "nodeService", nodeService);
PropertyCheck.mandatory(this, "mimetypeService", mimetypeService);
PropertyCheck.mandatory(this, "transformerLog", info);
PropertyCheck.mandatory(this, "transformerDebugLog", logger);
PropertyCheck.mandatory(this, "transformerLog", singleLineLog);
PropertyCheck.mandatory(this, "transformerDebugLog", multiLineLog);
}
public void pushTransform(String transformerName, String fromUrl, String sourceMimetype,
@@ -360,16 +328,16 @@ public class TransformerDebug
log(frame.fromUrl, false);
}
log(frame.sourceMimetype+' '+frame.targetMimetype, false);
String fileName = getFileName(frame.sourceNodeRef, firstLevel, sourceSize);
String filename = getFilename(frame.sourceNodeRef, firstLevel);
log(getSourceAndTargetExt(frame.sourceMimetype, frame.targetMimetype) +
((fileName != null) ? fileName+' ' : "")+
((filename != null) ? filename+' ' : "")+
((sourceSize >= 0) ? fileSize(sourceSize)+' ' : "") +
(firstLevel ? getRenditionName(renditionName) : "") + message);
if (firstLevel)
{
log(options);
String nodeRef = getNodeRef(frame.sourceNodeRef, firstLevel, sourceSize);
String nodeRef = getNodeRef(frame.sourceNodeRef);
if (!nodeRef.isEmpty())
{
log(nodeRef);
@@ -377,17 +345,6 @@ public class TransformerDebug
}
}
public void debug(String sourceMimetype, String targetMimetype, NodeRef sourceNodeRef, long sourceSize,
Map<String, String> options, String renditionName, String message)
{
String fileName = getFileName(sourceNodeRef, true, -1);
log(" "+ getSourceAndTargetExt(sourceMimetype, targetMimetype) +
((fileName != null) ? fileName+' ' : "")+
((sourceSize >= 0) ? fileSize(sourceSize)+' ' : "") +
(getRenditionName(renditionName)) + message);
log(options);
}
private void log(Map<String, String> options)
{
if (options != null)
@@ -450,16 +407,16 @@ public class TransformerDebug
String ms = ms(System.currentTimeMillis() - frame.start);
logInfo(frame, size, ms);
boolean firstLevel = size == 1;
if (!suppressFinish && (firstLevel || logger.isTraceEnabled()))
if (!suppressFinish && (firstLevel || multiLineLog.isTraceEnabled()))
{
log(FINISHED_IN + ms +
(frame.callType == Call.AVAILABLE && !suppressChecking? " Just checking if a transformer is available" : "") +
(firstLevel ? "\n" : ""),
(firstLevel ? "\n" : ""),
firstLevel);
}
setDebugOutput(frame.origDebugOutput);
ourStack.pop();
}
@@ -470,12 +427,12 @@ public class TransformerDebug
private void logInfo(Frame frame, int size, String ms)
{
if (info.isDebugEnabled())
if (singleLineLog.isDebugEnabled())
{
String failureReason = frame.getFailureReason();
boolean firstLevel = size == 1;
String sourceAndTargetExt = getSourceAndTargetExt(frame.sourceMimetype, frame.targetMimetype);
String fileName = getFileName(frame.sourceNodeRef, firstLevel, frame.sourceSize);
String filename = getFilename(frame.sourceNodeRef, firstLevel);
long sourceSize = frame.getSourceSize();
String transformerName = frame.getTransformerName();
String renditionName = frame.getRenditionName();
@@ -486,51 +443,31 @@ public class TransformerDebug
debug = firstLevel;
level = "INFO";
failureReason = NO_TRANSFORMERS;
// If trace and trace is disabled do nothing
if (debug || info.isTraceEnabled())
{
// Work out size reason that there are no transformers
if (frame.unavailableTransformers != null)
{
level = "WARN";
long smallestMaxSourceSizeKBytes = Long.MAX_VALUE;
for (UnavailableTransformer unavailable: frame.unavailableTransformers)
{
if (smallestMaxSourceSizeKBytes > unavailable.maxSourceSizeKBytes && unavailable.maxSourceSizeKBytes > 0)
{
smallestMaxSourceSizeKBytes = unavailable.maxSourceSizeKBytes;
}
}
smallestMaxSourceSizeKBytes = smallestMaxSourceSizeKBytes == Long.MAX_VALUE ? 0 : smallestMaxSourceSizeKBytes;
failureReason = "No transformers as file is > "+fileSize(smallestMaxSourceSizeKBytes*1024);
}
}
}
else if (frame.callType == Call.TRANSFORM)
{
level = failureReason == null || failureReason.length() == 0 ? "INFO" : "ERROR";
// Use TRACE logging for all but the first TRANSFORM
debug = size == 1 || (size == 2 && ThreadInfo.getStack().peekLast().callType != Call.TRANSFORM);
}
if (level != null)
{
infoLog(getReference(debug, false, false), sourceAndTargetExt, level, fileName, sourceSize,
infoLog(getReference(firstLevel, false, false), sourceAndTargetExt, level, filename, sourceSize,
transformerName, renditionName, failureReason, ms, debug);
}
}
}
private void infoLog(String reference, String sourceAndTargetExt, String level, String fileName,
private void infoLog(String reference, String sourceAndTargetExt, String level, String filename,
long sourceSize, String transformerName, String renditionName, String failureReason, String ms, boolean debug)
{
String message =
reference +
sourceAndTargetExt +
(level == null ? "" : level+' ') +
(fileName == null ? "" : fileName) +
(filename == null ? "" : filename) +
(sourceSize >= 0 ? ' '+fileSize(sourceSize) : "") +
(ms == null || ms.isEmpty() ? "" : ' '+ms)+
(transformerName == null ? "" : ' '+transformerName) +
@@ -538,11 +475,11 @@ public class TransformerDebug
(failureReason == null ? "" : ' '+failureReason.trim());
if (debug)
{
info.debug(message);
singleLineLog.debug(message);
}
else
{
info.trace(message);
singleLineLog.trace(message);
}
}
@@ -552,11 +489,11 @@ public class TransformerDebug
public boolean isEnabled()
{
// Don't check ThreadInfo.getDebugOutput() as availableTransformers() may upgrade from trace to debug.
return logger.isDebugEnabled() || info.isDebugEnabled() || ThreadInfo.getStringBuilder() != null;
return multiLineLog.isDebugEnabled() || singleLineLog.isDebugEnabled() || ThreadInfo.getStringBuilder() != null;
}
/**
* Enable or disable debug log output. Normally used to hide calls to
* Enable or disable debug log output. Normally used to hide calls to
* getTransformer as trace rather than debug level log messages. There
* are lots of these and it makes it hard to see what is going on.
* @param debugOutput if {@code true} both debug and trace is generated. Otherwise all output is trace.
@@ -616,8 +553,7 @@ public class TransformerDebug
{
log(message);
}
Deque<Frame> ourStack = ThreadInfo.getStack();
if (!ourStack.isEmpty())
{
@@ -635,7 +571,7 @@ public class TransformerDebug
t = cause;
cause = t.getCause();
}
String message = t.getMessage();
if (message == null || message.length() == 0)
{
@@ -648,7 +584,7 @@ public class TransformerDebug
{
log(message, true);
}
protected void log(String message, boolean debug)
{
log(message, null, debug);
@@ -661,13 +597,13 @@ public class TransformerDebug
private void log(String message, Throwable t, boolean debug, boolean usePreviousRef)
{
if (debug && ThreadInfo.getDebugOutput() && logger.isDebugEnabled())
if (debug && ThreadInfo.getDebugOutput() && multiLineLog.isDebugEnabled())
{
logger.debug(getReference(false, false, usePreviousRef)+message, t);
multiLineLog.debug(getReference(false, false, usePreviousRef)+message, t);
}
else if (logger.isTraceEnabled())
else if (multiLineLog.isTraceEnabled())
{
logger.trace(getReference(false, false, usePreviousRef)+message, t);
multiLineLog.trace(getReference(false, false, usePreviousRef)+message, t);
}
if (debug)
@@ -729,7 +665,7 @@ public class TransformerDebug
String ref = "";
if (id >= 0)
{
ref = Integer.toString(id)+spaces(13);
ref = Integer.toString(id)+spaces(REFERENCE_SIZE);
}
return ref;
}
@@ -775,77 +711,79 @@ public class TransformerDebug
}
else
{
sb.append(spaces(13-sb.length()+lengthOfFirstId)); // Try to pad to level 7
sb.append(spaces(REFERENCE_SIZE-sb.length()+lengthOfFirstId)); // Try to pad to level 7
}
}
return sb.toString();
}
public String getFileName(NodeRef sourceNodeRef, boolean firstLevel, long sourceSize)
public String getFilename(NodeRef sourceNodeRef, boolean firstLevel)
{
return getFileNameOrNodeRef(sourceNodeRef, firstLevel, sourceSize, true);
}
private String getNodeRef(NodeRef sourceNodeRef, boolean firstLevel, long sourceSize)
{
return getFileNameOrNodeRef(sourceNodeRef, firstLevel, sourceSize, false);
}
private String getFileNameOrNodeRef(NodeRef sourceNodeRef, boolean firstLevel, long sourceSize, boolean getName)
{
String result = getName ? null : "";
String result = null;
if (sourceNodeRef != null)
{
try
{
result = getName
? (String)nodeService.getProperty(sourceNodeRef, ContentModel.PROP_NAME)
: sourceNodeRef.toString()+" ";
result = (String)nodeService.getProperty(sourceNodeRef, ContentModel.PROP_NAME);
}
catch (RuntimeException e)
{
// ignore (normally InvalidNodeRefException) but we should ignore other RuntimeExceptions too
// ignore (InvalidNodeRefException/MalformedNodeRefException) but we should ignore other RuntimeExceptions too
}
}
if (result == null)
if (result == null && !firstLevel)
{
if (!firstLevel)
{
result = getName ? "<<TemporaryFile>>" : "";
}
else if (sourceSize < 0)
{
// fileName = "<<AnyFile>>"; commented out as it does not add to debug readability
}
result = "<<TemporaryFile>>";
}
return result;
}
private String getNodeRef(NodeRef sourceNodeRef)
{
return sourceNodeRef == null ? "" : sourceNodeRef.toString();
}
protected String getSourceAndTargetExt(String sourceMimetype, String targetMimetype)
{
String sourceExt = getMimetypeExt(sourceMimetype);
String targetExt = getMimetypeExt(targetMimetype);
targetExt = AsynchronousExtractor.getExtension(targetMimetype, sourceExt, targetExt);
targetExt = replaceWithMetadataExtensionIfEmbedOrExtract(targetMimetype, sourceExt, targetExt);
return sourceExt + targetExt + spaces(1+4-targetExt.length());
}
public static String replaceWithMetadataExtensionIfEmbedOrExtract(String targetMimetype, String sourceExtension, String targetExtension)
{
return isMetadataExtractMimetype(targetMimetype)
? "json"
: isMetadataEmbedMimetype(targetMimetype)
? sourceExtension
: targetExtension;
}
protected String getMimetypeExt(String mimetype)
{
StringBuilder sb = new StringBuilder("");
if (mimetypeService == null)
if (extensionLookup == null)
{
sb.append(mimetype);
}
else
{
String mimetypeExt = mimetypeService.getExtension(mimetype);
sb.append(mimetypeExt);
sb.append(spaces(4-mimetypeExt.length())); // Pad to normal max ext (4)
String mimetypeExt = extensionLookup.getExtension(mimetype);
if (mimetypeExt == null)
{
sb.append(mimetype);
}
else
{
sb.append(mimetypeExt);
sb.append(spaces(4 - mimetypeExt.length())); // Pad to normal max ext (4)
}
}
sb.append(' ');
return sb.toString();
}
protected String spaces(int i)
{
StringBuilder sb = new StringBuilder("");
@@ -855,12 +793,12 @@ public class TransformerDebug
}
return sb.toString();
}
public String ms(long time)
{
return String.format("%,d ms", time);
}
public String fileSize(long size)
{
if (size < 0)
@@ -876,7 +814,7 @@ public class TransformerDebug
for(int i = 0; i < units.length-1; i++)
{
long nextDivider = divider * 1024;
if(size < nextDivider)
if (size < nextDivider)
{
return fileSizeFormat(size, divider, units[i]);
}
@@ -884,12 +822,12 @@ public class TransformerDebug
}
return fileSizeFormat(size, divider, units[units.length-1]);
}
private String fileSizeFormat(long size, long divider, String unit)
{
size = size * 10 / divider;
int decimalPoint = (int) size % 10;
StringBuilder sb = new StringBuilder();
sb.append(size/10);
if (decimalPoint != 0)
@@ -907,7 +845,7 @@ public class TransformerDebug
* Debugs a request to the Transform Service
*/
public int debugTransformServiceRequest(String sourceMimetype, long sourceSize, NodeRef sourceNodeRef,
int contentHashcode, String fileName, String targetMimetype,
int contentHashcode, String filename, String targetMimetype,
Map<String, String> options, String renditionName)
{
if (isEnabled())
@@ -915,42 +853,90 @@ public class TransformerDebug
pushMisc();
String sourceAndTargetExt = getSourceAndTargetExt(sourceMimetype, targetMimetype);
debug(sourceAndTargetExt +
((fileName != null) ? fileName + ' ' : "") +
((filename != null) ? filename + ' ' : "") +
((sourceSize >= 0) ? fileSize(sourceSize) + ' ' : "") +
getRenditionName(renditionName) + " "+ TRANSFORM_SERVICE_NAME);
log(options);
log(sourceNodeRef.toString() + ' ' + contentHashcode);
String reference = getReference(true, false, false);
infoLog(reference, sourceAndTargetExt, null, fileName, sourceSize, TRANSFORM_SERVICE_NAME,
infoLog(reference, sourceAndTargetExt, null, filename, sourceSize, TRANSFORM_SERVICE_NAME,
renditionName, null, "", true);
}
return pop(Call.AVAILABLE, true, false);
}
private String getRenditionName(String renditionName)
public String getRenditionName(String renditionName)
{
return renditionName != null
? "-- "+ AsynchronousExtractor.getRenditionName(renditionName)+" -- "
: "";
? "-- "+ replaceWithMetadataRenditionNameIfEmbedOrExtract(renditionName)+" -- "
: "";
}
static String replaceWithMetadataRenditionNameIfEmbedOrExtract(String renditionName)
{
String transformName = getTransformName(renditionName);
return transformName != null && transformName.startsWith(MIMETYPE_METADATA_EXTRACT)
? "metadataExtract"
: transformName != null && transformName.startsWith(MIMETYPE_METADATA_EMBED)
? "metadataEmbed"
: renditionName;
}
static String getTransformName(String renditionName)
{
return renditionName == null || !renditionName.startsWith(TRANSFORM_NAMESPACE)
? null
: renditionName.substring(TRANSFORM_NAMESPACE.length());
}
public static boolean isMetadataExtractMimetype(String targetMimetype)
{
return MIMETYPE_METADATA_EXTRACT.equals(targetMimetype);
}
public static boolean isMetadataEmbedMimetype(String targetMimetype)
{
return MIMETYPE_METADATA_EMBED.equals(targetMimetype);
}
/**
* Debugs a response to the Transform Service
*/
public void debugTransformServiceResponse(NodeRef sourceNodeRef, int contentHashcode,
long requested, int id, String sourceExt, String targetExt, String msg)
public void debugTransformServiceResponse(long requested, int id, String msg, Collection<String> debugLines)
{
boolean suppressFinish = debugTransformServiceResponsePreConsume(requested, id, msg, debugLines);
debugTransformServiceResponsePostConsume(suppressFinish);
}
/**
* Debugs a response to the Transform Service
*/
public boolean debugTransformServiceResponsePreConsume(long requested, int id, String msg, Collection<String> debugLines)
{
pushMisc();
Frame frame = ThreadInfo.getStack().getLast();
frame.id = id;
boolean suppressFinish = id == -1 || requested == -1;
if (!suppressFinish)
if (isEnabled())
{
frame.start = requested;
pushMisc();
Frame frame = ThreadInfo.getStack().getLast();
frame.id = id;
if (!suppressFinish)
{
frame.start = requested;
}
debug(msg);
debugLines.forEach(line -> multiLineLog.debug(line));
}
return suppressFinish;
}
/**
* Debugs a response to the Transform Service
*/
public void debugTransformServiceResponsePostConsume(boolean suppressFinish)
{
if (isEnabled())
{
pop(Call.AVAILABLE, suppressFinish, true);
}
debug(msg);
debug(sourceNodeRef.toString() + ' ' +contentHashcode);
pop(Call.AVAILABLE, suppressFinish, true);
}
/**

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2018 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -112,6 +112,14 @@ public interface RenditionService2
@NotAuditable
ChildAssociationRef getRenditionByName(NodeRef sourceNodeRef, String renditionName);
/**
* This method clears source nodeRef rendition content and content hash code using supplied rendition name.
*
* @param renditionNode the rendition node
*/
@NotAuditable
void clearRenditionContentDataInTransaction(NodeRef renditionNode);
/**
* Indicates if renditions are enabled. Set using the {@code system.thumbnail.generate} value.
*/

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -38,6 +38,7 @@ import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.util.PostTxnCallbackScheduler;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -553,11 +554,21 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
contentWriter.setEncoding(DEFAULT_ENCODING);
ContentWriter renditionWriter = contentWriter;
renditionWriter.putContent(transformInputStream);
if (logger.isDebugEnabled())
ContentReader contentReader = renditionWriter.getReader();
long sizeOfRendition = contentReader.getSize();
if (sizeOfRendition > 0L)
{
logger.debug("Set rendition hashcode for " + renditionName);
if (logger.isDebugEnabled()) {
logger.debug("Set rendition hashcode for " + renditionName);
}
nodeService.setProperty(renditionNode, RenditionModel.PROP_RENDITION_CONTENT_HASH_CODE, transformContentHashCode);
}
else
{
logger.error("Transform was zero bytes for " + renditionName + " on " + sourceNodeRef);
clearRenditionContentData(renditionNode);
}
nodeService.setProperty(renditionNode, RenditionModel.PROP_RENDITION_CONTENT_HASH_CODE, transformContentHashCode);
}
catch (Exception e)
{
@@ -892,6 +903,17 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
}
}
@Override
public void clearRenditionContentDataInTransaction(NodeRef renditionNode)
{
AuthenticationUtil.runAsSystem((AuthenticationUtil.RunAsWork<Void>) () ->
transactionService.getRetryingTransactionHelper().doInTransaction(() ->
{
clearRenditionContentData(renditionNode);
return null;
}, false, true));
}
@Override
public boolean isEnabled()
{

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -107,7 +107,6 @@ public class CombinedConfig extends CombinedTransformConfig
String url = baseUrl + (baseUrl.endsWith("/") ? "" : "/") + "transform/config";
HttpGet httpGet = new HttpGet(url);
boolean successReadingConfig = true;
boolean logAsDebug = false;
try
{
try (CloseableHttpClient httpclient = HttpClients.createDefault())
@@ -160,7 +159,6 @@ public class CombinedConfig extends CombinedTransformConfig
}
catch (IOException e)
{
logAsDebug = true;
throw new AlfrescoRuntimeException("Failed to connect or to read the response from "+remoteType+
" on " + url, e);
}
@@ -172,15 +170,7 @@ public class CombinedConfig extends CombinedTransformConfig
}
catch (AlfrescoRuntimeException e)
{
String message = e.getMessage();
if (logAsDebug)
{
log.debug(message);
}
else
{
log.error(message);
}
log.error(e.getMessage());
successReadingConfig = false;
}
return successReadingConfig;

View File

@@ -49,12 +49,12 @@
<select id="select_Tenant" resultMap="result_Tenant">
select
tenant_domain as tenantDomain,
tenant_domain as tenant_domain,
version as version,
enabled as enabled,
tenant_name as tenantName,
content_root as contentRoot,
db_url as dbUrl
enabled enabled,
tenant_name tenant_name,
content_root content_root,
db_url db_url
from
alf_tenant
where
@@ -63,12 +63,12 @@
<select id="select_Tenants" parameterType="TenantQuery" resultMap="result_Tenant">
select
tenant_domain as tenantDomain,
version as version,
enabled as enabled,
tenant_name as tenantName,
content_root as contentRoot,
db_url as dbUrl
tenant_domain as tenant_domain,
version as version,
enabled as enabled,
tenant_name as tenant_name,
content_root as content_root,
db_url as db_url
from
alf_tenant
<where>

View File

@@ -15,7 +15,7 @@
</if>
</select>
<select id="select_ChildNodeIds_Limited" parameterType="Ids" resultMap="alfresco.node.result_ChildAssocIds" fetchSize="-2147483648">
<select id="select_ChildNodeIds_Limited" parameterType="ChildAssoc" resultMap="alfresco.node.result_ChildAssocIds" fetchSize="-2147483648">
<include refid="alfresco.node.select_ChildNodeIds_Limited_Snippet"/>
</select>

View File

@@ -979,21 +979,21 @@ people.search.honor.hint.useCQ=true
# Delays cron jobs after bootstrap to allow server to fully come up before jobs start
system.cronJob.startDelayMilliseconds=60000
# Schedule for reading mimetype config definitions dynamically. Initially checks every 10 seconds and then switches to
# Schedule for reading mimetype config definitions dynamically. Initially checks every minute and then switches to
# every hour after the configuration is read successfully. If there is a error later reading the config, the
# checks return to every 10 seconds.
# checks return to every minute.
mimetype.config.cronExpression=0 30 0/1 * * ?
mimetype.config.initialAndOnError.cronExpression=0/10 * * * * ?
mimetype.config.initialAndOnError.cronExpression=0 * * * * ?
# Optional property to specify an external file or directory that will be read for mimetype definitions from YAML
# files (possibly added to a volume via k8 ConfigMaps).
mimetype.config.dir=shared/classes/alfresco/extension/mimetypes
# Schedule for reading rendition config definitions dynamically. Initially checks every 10 seconds and then switches to
# Schedule for reading rendition config definitions dynamically. Initially checks every minute and then switches to
# every hour after the configuration is read successfully. If there is a error later reading the config, the
# checks return to every 10 seconds.
# checks return to every minute.
rendition.config.cronExpression=2 30 0/1 * * ?
rendition.config.initialAndOnError.cronExpression=0/10 * * * * ?
rendition.config.initialAndOnError.cronExpression=0 * * * * ?
# Optional property to specify an external file or directory that will be read for rendition definitions from YAML
# files (possibly added to a volume via k8 ConfigMaps).
@@ -1006,11 +1006,11 @@ local.transform.pipeline.config.dir=shared/classes/alfresco/extension/transform/
local.transform.service.enabled=true
# Schedule for reading local transform config, so that T-Engines and local pipeline config is dynamically
# picked up, or reintegrated after an outage. Initially checks every 10 seconds and then switches to every hour
# picked up, or reintegrated after an outage. Initially checks every minute and then switches to every hour
# after the configuration is read successfully. If there is a error later reading the config, the checks return to
# every 10 seconds.
# every minute.
local.transform.service.cronExpression=4 30 0/1 * * ?
local.transform.service.initialAndOnError.cronExpression=0/10 * * * * ?
local.transform.service.initialAndOnError.cronExpression=0 * * * * ?
#
# Check that the declared mimetype (of the Node) is the same as the derived

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -191,6 +191,7 @@ import org.junit.runners.Suite;
org.alfresco.service.cmr.repository.TransformationOptionLimitsTest.class,
org.alfresco.service.cmr.repository.TransformationOptionPairTest.class,
org.alfresco.repo.content.transform.TransformerConfigTestSuite.class,
org.alfresco.repo.content.transform.TransformerDebugTest.class,
org.alfresco.service.cmr.repository.TemporalSourceOptionsTest.class,
org.alfresco.repo.content.metadata.MetadataExtracterLimitsTest.class,
org.alfresco.repo.content.caching.quota.StandardQuotaStrategyMockTest.class,

View File

@@ -66,6 +66,7 @@ import org.springframework.context.ApplicationContext;
public class EncryptionTests extends TestCase
{
private static final String TEST_MODEL = "org/alfresco/encryption/reencryption_model.xml";
private static final SecureRandom SECURE_RANDOM = getSecureRandomInstance();
private static int NUM_PROPERTIES = 500;
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
@@ -148,6 +149,18 @@ public class EncryptionTests extends TestCase
bootstrap.setTenantService(tenantService);
bootstrap.bootstrap();
}
private static SecureRandom getSecureRandomInstance(){
try
{
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
random.setSeed(System.nanoTime());
return random;
} catch (NoSuchAlgorithmException e)
{
throw new AlfrescoRuntimeException(e.getMessage());
}
}
protected KeyProvider getKeyProvider(KeyStoreParameters keyStoreParameters)
{
@@ -195,12 +208,10 @@ public class EncryptionTests extends TestCase
}
}
public byte[] generateKeyData() throws NoSuchAlgorithmException
public byte[] generateKeyData()
{
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
random.setSeed(System.currentTimeMillis());
byte bytes[] = new byte[DESedeKeySpec.DES_EDE_KEY_LEN];
random.nextBytes(bytes);
byte[] bytes = new byte[DESedeKeySpec.DES_EDE_KEY_LEN];
SECURE_RANDOM.nextBytes(bytes);
return bytes;
}
@@ -208,8 +219,7 @@ public class EncryptionTests extends TestCase
{
DESedeKeySpec keySpec = new DESedeKeySpec(generateKeyData());
SecretKeyFactory kf = SecretKeyFactory.getInstance(keyAlgorithm);
SecretKey secretKey = kf.generateSecret(keySpec);
return secretKey;
return kf.generateSecret(keySpec);
}
public void testReEncrypt()
@@ -285,18 +295,11 @@ public class EncryptionTests extends TestCase
String test = "hello world";
final KeyMap keys = new KeyMap();
byte[] decrypted = null;
String test1 = null;
String testDecrypted = null;
secretKey1 = generateSecretKey("DESede");
keys.setKey("test", secretKey1);
KeyProvider keyProvider = new KeyProvider()
{
@Override
public Key getKey(String keyAlias)
{
return keys.getCachedKey(keyAlias).getKey();
}
};
KeyProvider keyProvider = keyAlias -> keys.getCachedKey(keyAlias).getKey();
encryptor = new DefaultEncryptor();
encryptor.setCipherAlgorithm("DESede/CBC/PKCS5Padding");
@@ -306,9 +309,9 @@ public class EncryptionTests extends TestCase
pair = encryptor.encrypt("test", null, test.getBytes("UTF-8"));
decrypted = encryptor.decrypt("test", pair.getSecond(), pair.getFirst());
test1 = new String(decrypted, "UTF-8");
testDecrypted = new String(decrypted, "UTF-8");
assertEquals("Expected encrypt,decrypt to end up with the original value", test, test1);
assertEquals("Expected encrypt,decrypt to end up with the original value", test, testDecrypted);
System.out.println("1:" + new String(decrypted, "UTF-8"));
secretKey2 = generateSecretKey("DESede");
@@ -320,7 +323,7 @@ public class EncryptionTests extends TestCase
try
{
decrypted = encryptor.decrypt("test", pair.getSecond(), pair.getFirst());
test1 = new String(decrypted, "UTF-8");
fail("Decryption should have failed");
}
catch(AlfrescoRuntimeException e)
{
@@ -338,7 +341,6 @@ public class EncryptionTests extends TestCase
testChangeKeysImpl(true);
}
@Category(FrequentlyFailingTests.class) // ACS-2242
public void testFailedEncryptionWithCachedCiphers() throws Throwable
{
Pair<byte[], AlgorithmParameters> pair = null;
@@ -348,18 +350,11 @@ public class EncryptionTests extends TestCase
String test = "hello world";
final KeyMap keys = new KeyMap();
byte[] decrypted = null;
String test1 = null;
String testDecrypted = null;
secretKey1 = generateSecretKey("DESede");
keys.setKey("test", secretKey1);
KeyProvider keyProvider = new KeyProvider()
{
@Override
public Key getKey(String keyAlias)
{
return keys.getCachedKey(keyAlias).getKey();
}
};
KeyProvider keyProvider = keyAlias -> keys.getCachedKey(keyAlias).getKey();
encryptor = new DefaultEncryptor();
encryptor.setCipherAlgorithm("DESede/CBC/PKCS5Padding");
@@ -377,7 +372,6 @@ public class EncryptionTests extends TestCase
try
{
decrypted = encryptor.decrypt("test", pair.getSecond(), pair.getFirst());
test1 = new String(decrypted, "UTF-8");
fail("Decryption should have failed");
}
catch(AlfrescoRuntimeException e)
@@ -389,7 +383,8 @@ public class EncryptionTests extends TestCase
try
{
decrypted = encryptor.decrypt("test", pair.getSecond(), pair.getFirst());
test1 = new String(decrypted, "UTF-8");
testDecrypted = new String(decrypted, "UTF-8");
assertEquals(test, testDecrypted);
}
catch(AlfrescoRuntimeException e)
{

View File

@@ -430,7 +430,7 @@ public class ActionServiceImpl2Test
{
public Void execute() throws Throwable
{
assertEquals("Gym class featuring a brown fox and lazy dog",
assertEquals("Pangram, fox, dog, Gym class featuring a brown fox and lazy dog",
nodeService.getProperty(testNode, ContentModel.PROP_DESCRIPTION));
return null;
}

View File

@@ -85,7 +85,7 @@ import java.util.Set;
public class ContentMetadataExtracterTest extends BaseSpringTest
{
protected static final String QUICK_TITLE = "The quick brown fox jumps over the lazy dog";
protected static final String QUICK_DESCRIPTION = "Gym class featuring a brown fox and lazy dog";
protected static final String QUICK_DESCRIPTION = "Pangram, fox, dog, Gym class featuring a brown fox and lazy dog";
protected static final String QUICK_CREATOR = "Nevin Nollop";
private NodeService nodeService;

View File

@@ -84,7 +84,7 @@ public abstract class AbstractMetadataExtracterTest extends TestCase
protected ApplicationContext ctx;
public static final String QUICK_TITLE = "The quick brown fox jumps over the lazy dog";
public static final String QUICK_DESCRIPTION = "Gym class featuring a brown fox and lazy dog";
public static final String QUICK_DESCRIPTION = "Pangram, fox, dog, Gym class featuring a brown fox and lazy dog";
public static final String QUICK_CREATOR = "Nevin Nollop";
public static final String QUICK_CREATOR_EMAIL = "nevin.nollop@alfresco.com";
public static final String QUICK_PREVIOUS_AUTHOR = "Derek Hulley";

View File

@@ -0,0 +1,392 @@
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.content.transform;
import com.google.common.collect.ImmutableMap;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.util.LogAdapter;
import org.apache.commons.logging.Log;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doReturn;
public class TransformerDebugTest
{
public static final String RENDITION_2B = "renditionName1";
public static final String TRANSFORMER_A2B = "transformerA2B";
public static final String TRANSFORMER_A2C = "transformerA2C";
public static final String TRANSFORMER_C2B = "transformerC2B";
private TransformerDebug transformerDebug;
public static final String MIMETYPE_A = "mimetypeA";
public static final String MIMETYPE_A_EXT = "a";
public static final String MIMETYPE_B = "mimetypeB";
public static final String MIMETYPE_B_EXT = "bbb";
public static final String MIMETYPE_C = "mimetypeC";
public static final String MIMETYPE_C_EXT = "ccc";
public static final String MIMETYPE_DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
public static final String MIMETYPE_DOCX_EXT = "docx";
public static final String MIMETYPE_LONGER = "mimetypeLonger";
public static final String MIMETYPE_LONGER_EXT = "longer";
private static final Map<String, String> testMimetypeService = ImmutableMap.of(
MIMETYPE_A, MIMETYPE_A_EXT,
MIMETYPE_B, MIMETYPE_B_EXT,
MIMETYPE_C, MIMETYPE_C_EXT,
MIMETYPE_DOCX, MIMETYPE_DOCX_EXT,
MIMETYPE_LONGER, MIMETYPE_LONGER_EXT);
private StringBuilder singleLine;
private StringBuilder multiLine;
private AtomicReference<LogLevel> singleLineLogLevel = new AtomicReference<>();
private AtomicReference<LogLevel> multiLineLogLevel = new AtomicReference<>();
private Map<String, String> options;
@Mock
private NodeService nodeService;
private NodeRef sourceNodeRef = new NodeRef("workspace://SpacesStore/parent");
@Before
public void setUp()
{
MockitoAnnotations.initMocks(this);
TransformerDebug.Frame.reset();
singleLine = new StringBuilder();
multiLine = new StringBuilder();
singleLineLogLevel.set(LogLevel.DEBUG);
multiLineLogLevel.set(LogLevel.DEBUG);
transformerDebug = new TransformerDebug();
transformerDebug.setExtensionLookup(mimetype -> testMimetypeService.get(mimetype));
transformerDebug.setTransformerDebugLog(new DummyLog(multiLine, multiLineLogLevel));
transformerDebug.setTransformerLog(new DummyLog(singleLine, singleLineLogLevel));
transformerDebug.setNodeService(nodeService);
options = ImmutableMap.of(
"option1", "value1",
"option2", "value2");
doReturn("filename1.a").when(nodeService).getProperty(sourceNodeRef, ContentModel.PROP_NAME);
}
private static String getSanitisedActual(StringBuilder debug)
{
return debug.toString()
.replaceAll(" [\\d,]+ ms", " nn ms"); // the time can change
}
@Test
public void testSingleLevelTransformDebug()
{
String expectedSingleLine =
"DEBUG 0 a bbb INFO filename1.a 1 KB nn ms transformerA2B -- renditionName1 -- ";
String expectedMultiLine =
"DEBUG 0 a bbb filename1.a 1 KB -- renditionName1 -- transformerA2B\n" +
"DEBUG 0 option1=\"value1\"\n" +
"DEBUG 0 option2=\"value2\"\n" +
"DEBUG 0 workspace://SpacesStore/parent\n" +
"DEBUG 0 Finished in nn ms\n";
testSingleLevelTransform(expectedSingleLine, expectedMultiLine);
}
@Test
public void testSingleLevelTransformTrace()
{
singleLineLogLevel.set(LogLevel.TRACE);
multiLineLogLevel.set(LogLevel.TRACE);
String expectedSingleLine =
"DEBUG 0 a bbb INFO filename1.a 1 KB nn ms transformerA2B -- renditionName1 -- ";
String expectedMultiLine =
"TRACE 0 fromUrl1\n" +
"TRACE 0 mimetypeA mimetypeB\n" +
"DEBUG 0 a bbb filename1.a 1 KB -- renditionName1 -- transformerA2B\n" +
"DEBUG 0 option1=\"value1\"\n" +
"DEBUG 0 option2=\"value2\"\n" +
"DEBUG 0 workspace://SpacesStore/parent\n" +
"DEBUG 0 Finished in nn ms\n";
testSingleLevelTransform(expectedSingleLine, expectedMultiLine);
}
@Test
public void testSingleLevelTransformInfo()
{
singleLineLogLevel.set(LogLevel.INFO);
multiLineLogLevel.set(LogLevel.INFO);
String expectedSingleLine = "";
String expectedMultiLine = "";
testSingleLevelTransform(expectedSingleLine, expectedMultiLine);
}
private void testSingleLevelTransform(String expectedSingleLine, String expectedMultiLine)
{
transformerDebug.pushTransform(TRANSFORMER_A2B, "fromUrl1", MIMETYPE_A, MIMETYPE_B,
1024, options, RENDITION_2B, sourceNodeRef);
transformerDebug.popTransform();
assertEquals(expectedSingleLine, getSanitisedActual(singleLine));
assertEquals(expectedMultiLine, getSanitisedActual(multiLine));
}
@Test
public void testMultiLevelTransformDebug()
{
String expectedSingleLine =
"DEBUG 0 a bbb INFO filename1.a 1 KB nn ms transformerA2B -- renditionName1 -- ";
String expectedMultiLine =
"DEBUG 0 a bbb filename1.a 1 KB -- renditionName1 -- transformerA2B\n" +
"DEBUG 0 option1=\"value1\"\n" +
"DEBUG 0 option2=\"value2\"\n" +
"DEBUG 0 workspace://SpacesStore/parent\n" +
"DEBUG 0.1 a ccc filename1.a 1 KB transformerA2C\n" +
"DEBUG 0.2 ccc bbb filename1.a 1 KB transformerC2B\n" +
"DEBUG 0 Finished in nn ms\n";
testMultiLevelTransform(expectedSingleLine, expectedMultiLine);
}
@Test
public void testMultiLevelTransformTrace()
{
singleLineLogLevel.set(LogLevel.TRACE);
multiLineLogLevel.set(LogLevel.TRACE);
String expectedSingleLine =
"TRACE 0.1 a ccc INFO filename1.a 1 KB nn ms transformerA2C -- renditionName1 -- \n" +
"TRACE 0.2 ccc bbb INFO filename1.a 1 KB nn ms transformerC2B -- renditionName1 -- \n" +
"DEBUG 0 a bbb INFO filename1.a 1 KB nn ms transformerA2B -- renditionName1 -- ";
String expectedMultiLine =
"TRACE 0 fromUrl1\n" +
"TRACE 0 mimetypeA mimetypeB\n" +
"DEBUG 0 a bbb filename1.a 1 KB -- renditionName1 -- transformerA2B\n" +
"DEBUG 0 option1=\"value1\"\n" +
"DEBUG 0 option2=\"value2\"\n" +
"DEBUG 0 workspace://SpacesStore/parent\n" +
"TRACE 0.1 fromUrl1\n" +
"TRACE 0.1 mimetypeA mimetypeC\n" +
"DEBUG 0.1 a ccc filename1.a 1 KB transformerA2C\n" +
"TRACE 0.1 Finished in nn ms\n" +
"TRACE 0.2 fromUrl1\n" +
"TRACE 0.2 mimetypeC mimetypeB\n" +
"DEBUG 0.2 ccc bbb filename1.a 1 KB transformerC2B\n" +
"TRACE 0.2 Finished in nn ms\n" +
"DEBUG 0 Finished in nn ms\n";
testMultiLevelTransform(expectedSingleLine, expectedMultiLine);
}
@Test
public void testMultiLevelTransformInfo()
{
singleLineLogLevel.set(LogLevel.INFO);
multiLineLogLevel.set(LogLevel.INFO);
String expectedSingleLine = "";
String expectedMultiLine = "";
testMultiLevelTransform(expectedSingleLine, expectedMultiLine);
}
private void testMultiLevelTransform(String expectedSingleLine, String expectedMultiLine)
{
transformerDebug.pushTransform(TRANSFORMER_A2B, "fromUrl1", MIMETYPE_A, MIMETYPE_B,
1024, options, RENDITION_2B, sourceNodeRef);
transformerDebug.pushTransform(TRANSFORMER_A2C, "fromUrl1", MIMETYPE_A, MIMETYPE_C,
1024, options, RENDITION_2B, sourceNodeRef);
transformerDebug.popTransform();
transformerDebug.pushTransform(TRANSFORMER_C2B, "fromUrl1", MIMETYPE_C, MIMETYPE_B,
1024, options, RENDITION_2B, sourceNodeRef);
transformerDebug.popTransform();
transformerDebug.popTransform();
assertEquals(expectedSingleLine, getSanitisedActual(singleLine));
assertEquals(expectedMultiLine, getSanitisedActual(multiLine));
}
@Test
public void testReplaceWithMetadataExtensionIfEmbedOrExtract()
{
assertEquals("json", transformerDebug.replaceWithMetadataExtensionIfEmbedOrExtract(
"alfresco-metadata-extract", "jpeg", "targetExtension"));
assertEquals("jpeg", transformerDebug.replaceWithMetadataExtensionIfEmbedOrExtract(
"alfresco-metadata-embed", "jpeg", "targetExtension"));
assertEquals(MIMETYPE_DOCX_EXT, transformerDebug.replaceWithMetadataExtensionIfEmbedOrExtract(
MIMETYPE_DOCX, "jpeg", MIMETYPE_DOCX_EXT));
}
@Test
public void testGetMimetypeExt()
{
assertEquals(MIMETYPE_A_EXT +" ", transformerDebug.getMimetypeExt(MIMETYPE_A));
assertEquals(MIMETYPE_B_EXT +" ", transformerDebug.getMimetypeExt(MIMETYPE_B));
assertEquals(MIMETYPE_DOCX_EXT +" ", transformerDebug.getMimetypeExt(MIMETYPE_DOCX));
assertEquals(MIMETYPE_LONGER_EXT+" ", transformerDebug.getMimetypeExt(MIMETYPE_LONGER)); // not padded to 4 spaces
assertEquals("unknown" +" ", transformerDebug.getMimetypeExt("unknown")); // not padded
assertEquals("x" +" ", transformerDebug.getMimetypeExt("x")); // not padded
}
@Test
public void testSpaces()
{
assertEquals("", transformerDebug.spaces(-1));
assertEquals("", transformerDebug.spaces(0));
assertEquals(" ", transformerDebug.spaces(1));
assertEquals(" ", transformerDebug.spaces(3));
assertEquals(" ", transformerDebug.spaces(5));
}
@Test
public void testMs()
{
assertEquals("-1 ms", transformerDebug.ms(-1));
assertEquals("0 ms", transformerDebug.ms(0));
assertEquals("1 ms", transformerDebug.ms(1));
assertEquals("2 ms", transformerDebug.ms(2));
assertEquals("123 ms", transformerDebug.ms(123));
assertEquals("1,234 ms", transformerDebug.ms(1234));
assertEquals("3,600,000 ms", transformerDebug.ms(3600000));
}
@Test
public void testFileSize()
{
assertEquals("unlimited", transformerDebug.fileSize(-1));
assertEquals("0 bytes", transformerDebug.fileSize(0));
assertEquals("1 byte", transformerDebug.fileSize(1));
assertEquals("2 bytes", transformerDebug.fileSize(2));
assertEquals("2 KB", transformerDebug.fileSize(2L*1024));
assertEquals("3 MB", transformerDebug.fileSize(3L*1024*1024));
assertEquals("4 GB", transformerDebug.fileSize(4L*1024*1024*1024));
assertEquals("5 TB", transformerDebug.fileSize(5L*1024*1024*1024*1024));
assertEquals("1.4 KB", transformerDebug.fileSize(1L*1024 + 511));
assertEquals("1.5 KB", transformerDebug.fileSize(1L*1024 + 512));
assertEquals("1.9 KB", transformerDebug.fileSize(2L*1024 - 1));
assertEquals("2.9 MB", transformerDebug.fileSize(3L*1024*1024 - 1));
assertEquals("3.9 GB", transformerDebug.fileSize(4L*1024*1024*1024 - 1));
assertEquals("4.9 TB", transformerDebug.fileSize(5L*1024*1024*1024*1024 - 1));
}
@Test
public void testGetRenditionName()
{
assertEquals("", transformerDebug.getRenditionName(null));
assertEquals("-- doclib -- ", transformerDebug.getRenditionName("doclib"));
assertEquals("-- metadataExtract -- ", transformerDebug.getRenditionName("transform:alfresco-metadata-extract"));
assertEquals("-- metadataEmbed -- ", transformerDebug.getRenditionName("transform:alfresco-metadata-embed"));
assertEquals("-- transform:customTransform -- ", transformerDebug.getRenditionName("transform:customTransform"));
}
@Test
public void testGetTransformName()
{
assertEquals(null, transformerDebug.getTransformName(null));
assertEquals(null, transformerDebug.getTransformName("doclib"));
assertEquals("alfresco-metadata-extract", transformerDebug.getTransformName("transform:alfresco-metadata-extract"));
assertEquals("alfresco-metadata-embed", transformerDebug.getTransformName("transform:alfresco-metadata-embed"));
assertEquals("customTransform", transformerDebug.getTransformName("transform:customTransform"));
}
private enum LogLevel
{
INFO, DEBUG, TRACE;
boolean isSet(LogLevel levelSet)
{
return levelSet != null && this.compareTo(levelSet) <= 0;
}
}
private class DummyLog extends LogAdapter
{
private final StringBuilder stringBuilder;
private final AtomicReference<LogLevel> logLevel;
public DummyLog(StringBuilder stringBuilder, AtomicReference<LogLevel> logLevel)
{
super(null);
this.stringBuilder = stringBuilder;
this.logLevel = logLevel;
}
@Override
public boolean isDebugEnabled()
{
return LogLevel.DEBUG.isSet(logLevel.get());
}
@Override
public boolean isTraceEnabled()
{
return LogLevel.TRACE.isSet(logLevel.get());
}
@Override
public void debug(Object message, Throwable throwable)
{
if (isDebugEnabled())
{
append(message, throwable, "DEBUG ");
}
}
@Override
public void trace(Object message, Throwable throwable)
{
if (isTraceEnabled())
{
append(message, throwable, "TRACE ");
}
}
private void append(Object message, Throwable throwable, String prefix)
{
if (stringBuilder.length() > 0)
{
stringBuilder.append('\n');
}
stringBuilder.append(prefix).append(message);
if (throwable != null)
{
stringBuilder.append("\n ").append(throwable.getMessage());
}
}
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -28,6 +28,8 @@ package org.alfresco.repo.rendition2;
import static org.alfresco.model.ContentModel.PROP_CONTENT;
import static org.junit.Assert.assertNotEquals;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.List;
import org.alfresco.model.ContentModel;
@@ -358,7 +360,25 @@ public class RenditionService2IntegrationTest extends AbstractRenditionIntegrati
* </p>
*/
@Test
public void testRenditionWithoutContentButWithContentHashCode()
public void testRenditionWithNullContentButWithContentHashCode()
{
testRenditionWithoutContentButWithContentHashCode(null);
}
/**
* Tests if a rendition without content (but with contentHashCode) can be generated again.
* <p>
* If the rendition consumption receives a zero length InputStream, the contentHashCode should be cleaned from the
* rendition node, allowing new requests to generate the rendition.
* </p>
*/
@Test
public void testRenditionWithZeroContentButWithContentHashCode()
{
testRenditionWithoutContentButWithContentHashCode(new ByteArrayInputStream(new byte[0]));
}
private void testRenditionWithoutContentButWithContentHashCode(InputStream transformInputStream)
{
// Create a node with an actual rendition
NodeRef sourceNodeRef = createSource(ADMIN, "quick.jpg");
@@ -379,7 +399,7 @@ public class RenditionService2IntegrationTest extends AbstractRenditionIntegrati
// This is explicitly called to prove that rendition hash code will be cleaned (as opposite to previous behavior)
RenditionDefinition2 renditionDefinition = renditionDefinitionRegistry2.getRenditionDefinition(DOC_LIB);
AuthenticationUtil.runAs(() -> {
renditionService2.consume(sourceNodeRef, null, renditionDefinition, contentHashCode);
renditionService2.consume(sourceNodeRef, transformInputStream, renditionDefinition, contentHashCode);
return null;
}, ADMIN);
waitForRendition(ADMIN, sourceNodeRef, DOC_LIB, false);

View File

@@ -2231,9 +2231,9 @@ public class VersionServiceImplTest extends BaseVersionStoreTest
VersionHistory versionHistory = versionService.getVersionHistory(versionableNode);
Version[] versions = versionHistory.getAllVersions().toArray(new Version[3]);
Version v = versions[1];
assertEquals("1.1", v.getVersionLabel());
versionService.deleteVersion(versionableNode, v);
Version version = versions[1];
assertEquals("1.1", version.getVersionLabel());
versionService.deleteVersion(versionableNode, version);
return null;
}
});
@@ -2258,9 +2258,9 @@ public class VersionServiceImplTest extends BaseVersionStoreTest
{
public Object execute() throws Exception
{
Version v = versionService.getCurrentVersion(versionableNode);
assertEquals("1.2", v.getVersionLabel());
versionService.deleteVersion(versionableNode, v);
Version version = versionService.getCurrentVersion(versionableNode);
assertEquals("1.2", version.getVersionLabel());
versionService.deleteVersion(versionableNode, version);
return null;
}
});