Compare commits

...

305 Commits

Author SHA1 Message Date
dsaini
f0478515e6 check push test 2021-11-17 09:33:36 +05:30
Travis CI User
868672e7ea [maven-release-plugin][skip ci] prepare for next development iteration 2021-11-09 19:48:38 +00:00
Travis CI User
e712d188fe [maven-release-plugin][skip ci] prepare release 14.27 2021-11-09 19:48:35 +00:00
Nithin Nambiar
bdedc23c95 ACS-2238 Added missing BatchProcessWorkProvider implemenations (#793) 2021-11-09 16:41:21 +00:00
Travis CI User
aff84374c4 [maven-release-plugin][skip ci] prepare for next development iteration 2021-11-01 22:02:33 +00:00
Travis CI User
779731018d [maven-release-plugin][skip ci] prepare release 14.26 2021-11-01 22:02:30 +00:00
Alan Davis
e242f5db98 PRODSEC-4343 Build the MMT tool in alfreaco-community-repo so it picks up the latest libraries (#785)
The code form MMT comes from this project anyway
2021-11-01 18:45:45 +00:00
alandavis
68cde24419 Tidy up of README files on how to build projects [skip ci] 2021-10-29 13:53:28 +01:00
Travis CI User
7daef9ee21 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-28 16:15:22 +00:00
Travis CI User
db52b87849 [maven-release-plugin][skip ci] prepare release 14.25 2021-10-28 16:15:19 +00:00
Damian Ujma
cf379f3baa Feature/acs 2129 setup agent (#781)
* ACS-2129 Setup agent scanning

* ACS-2129 Run agent scanning only for master and release branches

* ACS-2129 Fix source_clear.sh
2021-10-28 15:59:23 +02:00
Travis CI User
de04ce6944 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-28 10:08:09 +00:00
Travis CI User
caf5fdede4 [maven-release-plugin][skip ci] prepare release 14.24 2021-10-28 10:08:06 +00:00
mpichura
2d4140ea64 ACS-2147 renaming method which gets storage props (#778)
* ACS-2147: Adding missing ContentStore implementation, switching some logging
to trace.

* ACS-2147: Renaming getObjectStorageProperties to getStorageProperties

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

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

* Fix/mnt 21506 sanitation create people (#756)

* MNT-21506: sanitize username on nodeBrowser Repo

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

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

* ACS-2148: Adding get StorageObjectProps to ContentService (#773)

* ACS-2148: Adding get StorageObjectProps to ContentService and implementation.

* ACS-2148: Adding propertyQName param to get storage property method.

* ACS-2148: Security config for added method.

* ACS-2148: Renaming getObjectStorageProperties to getStorageProperties

* ACS-2148: Javadoc fix

* ACS-2148: Fixing security context after method renaming.

* ACS-2148: ContentService with new method names.

* ACS-2147: Adding missing ContentStore implementation, switching some logging
to trace.

* ACS-2147: Renaming getObjectStorageProperties to getStorageProperties

* ACS-2148: ContentService with new method names.

* ACS-2148: Small fixes after code review.
2021-10-27 13:35:11 +02:00
Travis CI User
3c928a4928 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-27 00:30:21 +00:00
Travis CI User
599f5727a0 [maven-release-plugin][skip ci] prepare release 14.23 2021-10-27 00:30:18 +00:00
Lev Belava
7ac5cb1807 ACS-2121 Alfresco repo migration from Mockito 1 to Mockito 3 (#770) 2021-10-26 23:55:03 +01:00
Travis CI User
d311ef2c5f [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-26 12:39:10 +00:00
Travis CI User
6f820e2c25 [maven-release-plugin][skip ci] prepare release 14.22 2021-10-26 12:39:07 +00:00
mpichura
e515dacab1 ACS-2148: Adding get StorageObjectProps to ContentService (#773)
* ACS-2148: Adding get StorageObjectProps to ContentService and implementation.

* ACS-2148: Adding propertyQName param to get storage property method.

* ACS-2148: Security config for added method.

* ACS-2148: Renaming getObjectStorageProperties to getStorageProperties

* ACS-2148: Javadoc fix

* ACS-2148: Fixing security context after method renaming.
2021-10-26 13:48:53 +02:00
Travis CI User
5041249f03 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-26 09:48:01 +00:00
Travis CI User
1b26e3a937 [maven-release-plugin][skip ci] prepare release 14.21 2021-10-26 09:47:57 +00:00
Vítor Moreira
a2d9afcecc Fix/mnt 21506 sanitation create people (#756)
* MNT-21506: sanitize username on nodeBrowser Repo
2021-10-26 09:58:11 +01:00
Travis CI User
577de6bf4c [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-26 08:45:13 +00:00
Travis CI User
f71f53c988 [maven-release-plugin][skip ci] prepare release 14.20 2021-10-26 08:45:10 +00:00
mpichura
7e4d72a66a ACS-2147: Fixing docker logins in init.sh (#771) 2021-10-25 13:10:39 +02:00
Aleksandra Onych
142f99b2a2 MNT-21883 - Fix unshare content from smart folder (#765) 2021-10-25 10:28:36 +02:00
mpichura
1b0ddb1e74 Feature/acs 2147 add get storage object props in content store (#769)
* ACS-2147: initial idea for adding storage properties to ContentStore.

* ACS-2147: adding implementations to ContentStore children + some static analysis cleanup.

* ACS-2147: adding javadoc and small fixes to ObjectStorageProps.

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* ACS-2147: initial idea for adding storage properties to ContentStore.

* ACS-2147: adding implementations to ContentStore children + some static analysis cleanup.

* ACS-2147: adding javadoc and small fixes to ObjectStorageProps.

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* ACS-2147: Adding unit tests and changes after first round of code review.

* ACS-2147: initial idea for adding storage properties to ContentStore.

* ACS-2147: adding implementations to ContentStore children + some static analysis cleanup.

* ACS-2147: adding javadoc and small fixes to ObjectStorageProps.

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* ACS-2147: Adding unit tests and changes after first round of code review.

* ACS-2147: adding implementations to ContentStore children + some static analysis cleanup.

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* ACS-2147: Fixes after reverting some 'boy scout' refactor.

* ACS-2147: Rephrasing Alfresco-derived storage properties.

* ACS-2147: Reverting some 'boy scout' refactor.

* ACS-2147: Renaming enum values.

* ACS-2147: Removing wildcard import.

Co-authored-by: David Edwards <david.edwards@alfresco.com>
2021-10-25 09:47:36 +02:00
Travis CI User
4fa0157594 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-22 08:53:09 +00:00
Travis CI User
c1196ed8e9 [maven-release-plugin][skip ci] prepare release 14.19 2021-10-22 08:53:06 +00:00
mpichura
90a69173bd ACS-2147: Adding Experimental annotation. (#764) 2021-10-22 10:07:48 +02:00
Travis CI User
cb0a07d5da [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-22 06:47:39 +00:00
Travis CI User
77e721d66a [maven-release-plugin][skip ci] prepare release 14.18 2021-10-22 06:47:36 +00:00
Suneet Gupta
25d2a51254 Merge branch 'master' of github.com:Alfresco/alfresco-community-repo 2021-10-22 11:29:08 +05:30
Suneet Gupta
54fe4bb969 Added default.properties for test cases config 2021-10-22 11:25:43 +05:30
Travis CI User
7e719cae80 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-21 15:59:24 +00:00
Travis CI User
157a6ba1c5 [maven-release-plugin][skip ci] prepare release 14.17 2021-10-21 15:59:21 +00:00
alandavis
4fc165150a Revert "Alfresco community repo migration from Mockito 1 to Mockito 3 (#745)"
This reverts commit b846ccd85e.
2021-10-21 15:21:34 +01:00
Travis CI User
d574d05066 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-21 10:33:28 +00:00
Travis CI User
f66426bb60 [maven-release-plugin][skip ci] prepare release 14.16 2021-10-21 10:33:25 +00:00
Lev Belava
b846ccd85e Alfresco community repo migration from Mockito 1 to Mockito 3 (#745) 2021-10-21 11:45:35 +02:00
Travis CI User
09fc6f1e25 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-19 16:27:33 +00:00
Travis CI User
630f553fce [maven-release-plugin][skip ci] prepare release 14.15 2021-10-19 16:27:30 +00:00
Tom Page
7242a78705 MNT-21985 Handle case where permissions in Solr and DB are out of sync. (#760)
* MNT-21985 Handle case where permissions in Solr and DB are out of sync.

* MNT-21985 Simplify return logic in error case.
2021-10-19 16:40:50 +01:00
Travis CI User
539a89537b [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-19 12:53:46 +00:00
Travis CI User
608c16d4a4 [maven-release-plugin][skip ci] prepare release 14.14 2021-10-19 12:53:43 +00:00
David Edwards
c00736c639 ACS-2064 DAU: Fix response content type always PDF (#754)
* ACS-2064 ContentStore.java to require mimetype

- Updates the ContentStore interface to also require a mimetype, deprecates old method signatures
- Original interface methods maintained so code should be backwards compatible
- Implementing classes updated to reflect changes
2021-10-19 13:10:17 +01:00
Travis CI User
15cb7ff44e [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-14 14:11:10 +00:00
Travis CI User
4776e37223 [maven-release-plugin][skip ci] prepare release 14.13 2021-10-14 14:11:07 +00:00
Lev Belava
cbd45fcb3e MNT-21706 NodeService setAssociations list of elements is now handled. (#746)
MNT-21706 NodeService setAssociations list of elements is now handled.
2021-10-14 15:27:41 +02:00
Travis CI User
655cadbda0 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-12 17:01:08 +00:00
Travis CI User
6d7e3bb787 [maven-release-plugin][skip ci] prepare release 14.12 2021-10-12 17:01:05 +00:00
Nithin Nambiar
bb8d10074e ACS-1112 Upgrade the BatchProcessor counting mechanism to work with "long" Java type (#706)
* ACS-1112 update to long data type
2021-10-12 17:04:31 +01:00
alandavis
806880a86b Include the latest MariaDB and MySQL tests in PRs.
[skip ci]
2021-10-11 12:21:42 +01:00
Nithin Nambiar
e68f56270a ACS-849_incorrect_probes added db check (#692)
* ACS-849_incorrect_probes added db check
2021-10-11 12:08:43 +01:00
Travis CI User
8705d97407 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-08 15:44:38 +00:00
Travis CI User
44e3242132 [maven-release-plugin][skip ci] prepare release 14.11 2021-10-08 15:44:36 +00:00
alandavis
8a3cdd55a7 Revert "Bump mysql-connector-java from 8.0.25 to 8.0.26 (#741)"
As tests on MySQL 5.7.23 failed - not in the PR build

This reverts commit 3b41308ecc.
2021-10-08 15:37:35 +01:00
alandavis
cff2a70b17 Use a common property for json-path as it is used in community and enterprise repo and packaging 2021-10-08 15:24:36 +01:00
dependabot[bot]
3b41308ecc Bump mysql-connector-java from 8.0.25 to 8.0.26 (#741) 2021-10-08 13:40:53 +00:00
dependabot[bot]
8a60e26ff0 Bump lombok from 1.18.20 to 1.18.22 (#742) 2021-10-08 13:38:37 +00:00
Ryan Wilson
accfc4662d Community contribution: fix spelling within permissionDefinition.xml (#469)
There were a number of locations within comments that contained incorrect spelling. [skip ci]
2021-10-08 14:30:43 +01:00
Travis CI User
1e0fcfcc14 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-08 11:06:13 +00:00
Travis CI User
837a706514 [maven-release-plugin][skip ci] prepare release 14.10 2021-10-08 11:06:10 +00:00
dependabot[bot]
db290c98f2 Bump cmis from 1.30 to 1.31 (#711) 2021-10-08 09:58:24 +00:00
dependabot[bot]
12682ddcff Bump dependency.spring.version from 5.3.9 to 5.3.10 (#715) 2021-10-08 09:39:26 +00:00
dependabot[bot]
0ed2e9b3a7 Bump joda-time from 2.10.10 to 2.10.12 (#716) 2021-10-08 09:37:42 +00:00
dependabot[bot]
3442e91575 Bump maven-war-plugin from 3.2.2 to 3.3.2 (#719) 2021-10-08 09:34:46 +00:00
Travis CI User
59b636e0ba [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-07 18:15:14 +00:00
Travis CI User
0333fe05b5 [maven-release-plugin][skip ci] prepare release 14.9 2021-10-07 18:15:11 +00:00
alandavis
9b592bfc13 Revert "Bump mysql-connector-java from 8.0.25 to 8.0.26 (#609)"
As DbNodeServiceImplTest>BaseNodeServiceTest.testLargeStrings:1061 » AlfrescoRuntime now fails

This reverts commit 386696d58b.
2021-10-07 18:26:05 +01:00
dependabot-preview[bot]
386696d58b Bump mysql-connector-java from 8.0.25 to 8.0.26 (#609)
Bumps [mysql-connector-java](https://github.com/mysql/mysql-connector-j) from 8.0.25 to 8.0.26.
- [Release notes](https://github.com/mysql/mysql-connector-j/releases)
- [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.0/CHANGES)
- [Commits](https://github.com/mysql/mysql-connector-j/commits)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Alan Davis <alan.davis@alfresco.com>
2021-10-07 15:23:38 +01:00
dependabot[bot]
1f243d629e Bump xmlsec from 1.5.8 to 2.2.3 (#732) 2021-10-07 14:16:40 +00:00
dependabot[bot]
dee7625998 Bump postgresql from 42.2.20 to 42.2.24 (#734) 2021-10-07 14:15:04 +00:00
dependabot[bot]
1c541281db Bump maven-javadoc-plugin from 3.3.0 to 3.3.1 (#733) 2021-10-07 14:11:08 +00:00
dependabot-preview[bot]
c991290c01 Bump dependency.slf4j.version from 1.7.30 to 1.7.32 (#611) 2021-10-07 14:01:24 +00:00
Travis CI User
9b62808ed7 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-07 13:00:53 +00:00
Travis CI User
d4e8bba9f5 [maven-release-plugin][skip ci] prepare release 14.8 2021-10-07 13:00:50 +00:00
dependabot[bot]
5ae240c392 Bump docker-java from 3.2.11 to 3.2.12 (#735) 2021-10-07 11:31:07 +00:00
dependabot[bot]
a5b35b7d96 Bump spring-security-core from 5.5.1 to 5.5.2 (#737) 2021-10-07 11:30:32 +00:00
dependabot[bot]
d2544b7a4d Bump docker-maven-plugin from 0.34.1 to 0.37.0 (#724) 2021-10-07 11:14:27 +00:00
dependabot[bot]
b9abc05eda Bump maven-artifact from 3.8.1 to 3.8.3 (#727) 2021-10-07 11:11:15 +00:00
dependabot[bot]
04e3743f01 Bump jsoup from 1.14.2 to 1.14.3 (#730) 2021-10-07 11:08:54 +00:00
Travis CI User
745295c4ba [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-07 10:30:48 +00:00
Travis CI User
c9b08594de [maven-release-plugin][skip ci] prepare release 14.7 2021-10-07 10:30:45 +00:00
dependabot[bot]
1d8044076c Bump dependency.webscripts.version from 8.23 to 8.24 (#710) 2021-10-07 09:10:15 +00:00
dependabot[bot]
377b082ef8 Bump mariadb-java-client from 2.7.2 to 2.7.4 (#709) 2021-10-07 09:07:17 +00:00
dependabot[bot]
ad2525bf17 Bump dependency.cxf.version from 3.4.4 to 3.4.5 (#708) 2021-10-07 09:04:57 +00:00
dependabot[bot]
888b26ef72 Bump groovy from 2.5.9 to 3.0.9 (#713)
Bumps [groovy](https://github.com/apache/groovy) from 2.5.9 to 3.0.9.
- [Release notes](https://github.com/apache/groovy/releases)
- [Commits](https://github.com/apache/groovy/commits)

---
updated-dependencies:
- dependency-name: org.codehaus.groovy:groovy
  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>
2021-10-07 09:51:16 +01:00
alandavis
aa4a5a6063 Try to give dependabot access to Nexus 2021-10-05 11:12:24 +01:00
dependabot-preview[bot]
7ea91ea702 Upgrade to GitHub-native Dependabot (#424)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-10-05 09:31:58 +02:00
Travis CI User
b3e8051f08 [maven-release-plugin][skip ci] prepare for next development iteration 2021-10-01 14:32:21 +00:00
Travis CI User
4ba0d3a899 [maven-release-plugin][skip ci] prepare release 14.6 2021-10-01 14:32:18 +00:00
kcichonczyk
8d78b257aa [PRODSEC-4829] Bumped versions of libraries to prevent security vulnerabilities: (#703)
* 'keycloak' version to 15.0.2
2021-10-01 14:38:58 +02:00
Travis CI User
df67011596 [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-29 20:23:22 +00:00
Travis CI User
871bd40d6d [maven-release-plugin][skip ci] prepare release 14.5 2021-09-29 20:23:19 +00:00
montgolfiere
2ef97e0b23 ACS-2067: Fix probes for when DAU enabled (#700) 2021-09-29 19:32:10 +01:00
Vítor Moreira
f1d48f7aab MNT-22428: configurable unsecure jsonp callback CMIS operation (#698) (#704)
* MNT-22428: configurable unsecure jsonp callback CMIS operation

(cherry picked from commit 5807e756bd)
2021-09-29 17:44:06 +01:00
Travis CI User
b5f24f5d58 [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-29 12:17:15 +00:00
Travis CI User
14668044f4 [maven-release-plugin][skip ci] prepare release 14.4 2021-09-29 12:17:12 +00:00
evasques
c5281d7f10 MNT-22600 Nodes with security marks appear unfiltered on CMIS DB queries (#702)
* Change isUnfiltered to protected so we can extend it in enterprise
* Added test method to be able to do a cmis query test

Original commit in governance-services: e4e3235328
2021-09-29 12:07:06 +01:00
Travis CI User
00565f3bc9 [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-29 10:03:49 +00:00
Travis CI User
f15c4d7a8f [maven-release-plugin][skip ci] prepare release 14.3 2021-09-29 10:03:47 +00:00
Piotr Żurek
85a3c71849 MNT-22611 - Fix bulk import parameters parsing (#699) 2021-09-29 10:50:54 +02:00
Travis CI User
4db8ca16e1 [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-29 04:44:40 +00:00
Travis CI User
52e71719d1 [maven-release-plugin][skip ci] prepare release 14.2 2021-09-29 04:44:37 +00:00
alandavis
507161a1d0 Get master ready for 7.2.0 development 2021-09-28 22:56:03 +01:00
Travis CI User
559171a32c [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-27 13:36:15 +00:00
Travis CI User
b9f449df57 [maven-release-plugin][skip ci] prepare release 11.140 2021-09-27 13:36:12 +00:00
Travis CI User
3185ecf6cb [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-24 12:21:31 +00:00
Travis CI User
bd7f2a4250 [maven-release-plugin][skip ci] prepare release 11.139 2021-09-24 12:21:28 +00:00
Vitor Moreira
79efa12b10 Revert "MNT-22428: configurable unsecure jsonp callback CMIS operation (#698)"
This reverts commit 5807e756bd.
2021-09-24 11:25:05 +01:00
Vítor Moreira
5807e756bd MNT-22428: configurable unsecure jsonp callback CMIS operation (#698)
* MNT-22428: configurable unsecure jsonp callback CMIS operation
2021-09-23 15:57:23 +01:00
Travis CI User
6ecb019b84 [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-16 12:38:24 +00:00
Travis CI User
c26f933c44 [maven-release-plugin][skip ci] prepare release 11.138 2021-09-16 12:38:20 +00:00
Jamal Kaabi-Mofrad
43e528878e ACS-1989: Fixed PostgreSQL patch. 2021-09-16 12:27:20 +01:00
Suneet Gupta
b120a9658f Revert "Releasing version 11.138"
This reverts commit 923261d9b9.
2021-09-16 16:36:30 +05:30
Suneet Gupta
3875a84f74 Revert "Releasing version 11.138"
This reverts commit 6f8507ebe2.
2021-09-16 16:36:28 +05:30
Suneet Gupta
8dddf293d0 Revert "Releasing version 11.138"
This reverts commit d01e9ffbbc.
2021-09-16 16:36:27 +05:30
Suneet Gupta
d01e9ffbbc Releasing version 11.138 2021-09-16 15:08:32 +05:30
Suneet Gupta
6f8507ebe2 Releasing version 11.138 2021-09-16 12:50:54 +05:30
Suneet Gupta
923261d9b9 Releasing version 11.138 2021-09-16 12:05:32 +05:30
Travis CI User
078e461b71 [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-15 14:51:33 +00:00
Travis CI User
ddde92ef21 [maven-release-plugin][skip ci] prepare release 11.137 2021-09-15 14:51:29 +00:00
Miguel Ruiz
189011d528 Bump up api-explorer to 7.1.0.1 (#694) 2021-09-15 13:13:44 +01:00
Travis CI User
af849d2144 [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-14 14:27:27 +00:00
Travis CI User
53208f207c [maven-release-plugin][skip ci] prepare release 11.136 2021-09-14 14:27:24 +00:00
alandavis
4cf3f77824 Pick up api-explorer 7.1.0 2021-09-14 14:15:46 +01:00
Travis CI User
9d24e083bb [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-13 07:13:40 +00:00
Travis CI User
6345c0a825 [maven-release-plugin][skip ci] prepare release 11.135 2021-09-13 07:13:37 +00:00
Sara Aspery
cda3d11c7e ACS-1981 fix DAUs status log 2021-09-13 06:51:56 +01:00
Travis CI User
7ad35ac60d [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-10 10:39:58 +00:00
Travis CI User
a164917232 [maven-release-plugin][skip ci] prepare release 11.134 2021-09-10 10:39:55 +00:00
Piotr Żurek
507c6b2ed8 ACS-1970 Switch to the alfresco/alfresco-base-tomcat:9.0.52-java-11-centos-7 base image (#693) 2021-09-10 11:13:53 +02:00
Travis CI User
ab0d65897c [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-07 11:57:08 +00:00
Travis CI User
d92844cebb [maven-release-plugin][skip ci] prepare release 11.133 2021-09-07 11:57:05 +00:00
dependabot-preview[bot]
25986d77d6 Bump commons-io from 2.8.0 to 2.11.0 (#597) 2021-09-07 11:08:17 +00:00
Travis CI User
2b8948b84b [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-02 14:45:02 +00:00
Travis CI User
64bf49cc22 [maven-release-plugin][skip ci] prepare release 11.132 2021-09-02 14:44:59 +00:00
Jamal Kaabi-Mofrad
3ce95c5262 REPO-5664/REPO-5665: System admin webscripts (#690) 2021-09-02 13:59:38 +01:00
Travis CI User
e854a01988 [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-02 12:41:48 +00:00
Travis CI User
65ba8b16e0 [maven-release-plugin][skip ci] prepare release 11.131 2021-09-02 12:41:45 +00:00
mikolajbrzezinski
d2bb3a980d Feature/acs 1835 test dau for deleted renditions (#689)
* Deleted Renditions DAU Test Skeleton

* Deleted Renditions DAU Test v1

* Deleted Renditions DAU Test v2

* Deleted Renditions DAU Test v3

* Deleted Renditions DAU Test v3.1

* Comments From Pull Request
2021-09-02 13:50:17 +02:00
Gloria Camino
59b641474f LOC-329 - Fixed, updated UI files in 15 languages as per RM-6941 (#691) 2021-09-02 17:17:01 +05:30
Travis CI User
9ee56762fb [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-02 09:09:36 +00:00
Travis CI User
6cb8e84ee4 [maven-release-plugin][skip ci] prepare release 11.130 2021-09-02 09:09:33 +00:00
alandavis
d540bb319b Pick up latest tas-restapi 1.64 2021-09-02 09:48:07 +01:00
Travis CI User
30a2bff92a [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-01 22:17:42 +00:00
Travis CI User
ac08612183 [maven-release-plugin][skip ci] prepare release 11.129 2021-09-01 22:17:39 +00:00
alandavis
031d1c740c ACS-1924 Pick up api-explorer 7.1.0-A4
Includes changes for other Direct Access URI tickets
2021-09-01 21:58:19 +01:00
Travis CI User
aac73e2064 [maven-release-plugin][skip ci] prepare for next development iteration 2021-09-01 19:00:48 +00:00
Travis CI User
ec72000380 [maven-release-plugin][skip ci] prepare release 11.128 2021-09-01 19:00:45 +00:00
Sara
015e3213af Feature/acs 1924 remove version renditions end point (#688)
* Revert "ACS-1833 - Test requestContentDirectUrl for Versions Renditions REST API endpoint (#675)"

This reverts commit 4aaae012

* ACS-1924 Remove endpoint for version rendition DAUs

* ACS-1924 Correct WebApiParams

To restore the direct access url version renditions code, do not just revert the whole commit. Instead:
* Restore commit 4aaae012 (this is the api test for direct access url version renditions)
* Revert commit 44ecb9d (this is the endpoint for version rendition DAUs)
* Do not revert commit 7157328 (This is a correction the WebApiParams for several direct access url endpoints)
2021-09-01 18:37:35 +01:00
Sara
d97510dfba ACS-1880 handle defaults for missing properties (#687)
* ACS-1880 handle defaults for missing properties

* ACS-1880 handle defaults for missing properties
2021-09-01 14:42:22 +01:00
Travis CI User
df98ad9e92 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-31 14:11:26 +00:00
Travis CI User
19a7239612 [maven-release-plugin][skip ci] prepare release 11.127 2021-08-31 14:11:23 +00:00
mikolajbrzezinski
2af2e7b868 Feature/acs 1834 test dau for deleted nodes (#686)
* Deleted Nodes DAU Test

* Deleted Nodes DAU Test Moved

* DAU Test Modification

* Copyright

* Unused import
2021-08-31 14:07:42 +02:00
Travis CI User
84824edffa [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-27 15:39:29 +00:00
Travis CI User
646419c073 [maven-release-plugin][skip ci] prepare release 11.126 2021-08-27 15:39:27 +00:00
antoniojfelix
ea854b55a4 PRODSEC-5480 - Bump jsoup version from 1.13.1 to 1.14.2 (#684) 2021-08-27 15:48:08 +01:00
Travis CI User
4bfb26a660 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-27 10:31:26 +00:00
Travis CI User
1f608b1eb5 [maven-release-plugin][skip ci] prepare release 11.125 2021-08-27 10:31:23 +00:00
Ayman Harake
8652c9d644 ATS-956: Bump T-core to use 2.5.3 (#683) 2021-08-27 10:43:59 +01:00
Travis CI User
57e8ee2c76 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-26 15:04:19 +00:00
Travis CI User
6cb00d8e3b [maven-release-plugin][skip ci] prepare release 11.124 2021-08-26 15:04:17 +00:00
alandavis
bb58c4a2d9 "ACS-1907 TMDQ against MySql throws SQLException in certain situations (#679)"
This reverts commit 83097d452b.
2021-08-26 14:26:01 +01:00
Travis CI User
1766ce6e31 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-26 12:08:32 +00:00
Travis CI User
0c5498fba0 [maven-release-plugin][skip ci] prepare release 11.123 2021-08-26 12:08:30 +00:00
Sara
48045c8c38 ACS-1788 Implement RestApi endpoint for deleted renditions (#681)
* ACS-1788 deleted renditions

* ACS-1913 Fix endpoint operation labels

* ACS-1788 Updates from review
2021-08-26 12:20:08 +01:00
Travis CI User
89adfacca6 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-26 08:45:09 +00:00
Travis CI User
6159bee521 [maven-release-plugin][skip ci] prepare release 11.122 2021-08-26 08:45:06 +00:00
Davide
a8a06f4b1f SEARCH-2833 Add field for association Qname in NodeResource and ChildAssociationResource (#678) 2021-08-26 09:59:06 +02:00
Travis CI User
279ff3a0d8 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-26 06:35:05 +00:00
Travis CI User
b6a50ae6e1 [maven-release-plugin][skip ci] prepare release 11.121 2021-08-26 06:35:01 +00:00
alandavis
83097d452b Revert "ACS-1907 TMDQ against MySql throws SQLException in certain situations (#679)"
Kept the travis changes.

This reverts commit 85fa4b5a93.
2021-08-26 01:18:19 +01:00
Travis CI User
b26d03cc0c [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-25 22:17:37 +00:00
Travis CI User
af24fef02b [maven-release-plugin][skip ci] prepare release 11.120 2021-08-25 22:17:34 +00:00
Stefan Kopf
85fa4b5a93 ACS-1907 TMDQ against MySql throws SQLException in certain situations (#679)
* Added alternative approach for DBQueryEngine to page through the entire query using "LIMIT" requests instead of result set streaming
* Use the alternative approach for MySql
2021-08-25 22:05:33 +01:00
Travis CI User
01b5fb5593 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-25 20:01:30 +00:00
Travis CI User
09f8d7a806 [maven-release-plugin][skip ci] prepare release 11.119 2021-08-25 20:01:27 +00:00
Sara
77691ec5fd ACS-1913 Fix endpoint operation labels (#682)
* ACS-1913 Fix endpoint operation labels

* ACS-1913 Update tests

* ACS-1913 Update tests
2021-08-25 20:14:16 +01:00
Travis CI User
472710ffd4 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-25 17:12:43 +00:00
Travis CI User
16f0714e99 [maven-release-plugin][skip ci] prepare release 11.118 2021-08-25 17:12:41 +00:00
Sara
c7c40b06e1 Feature/acs 1904 fix node ref vs content url (#680)
* ACS-1904 Fix NodeRef vs ContentUrl and remove deprecated methods

* ACS-1904 remove unused imports
2021-08-25 17:22:59 +01:00
alandavis
439a9254a3 Remove double spaces in log messages [skip ci] 2021-08-25 11:46:25 +01:00
Travis CI User
a9f19de31c [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-24 15:11:35 +00:00
Travis CI User
d237e51bb2 [maven-release-plugin][skip ci] prepare release 11.117 2021-08-24 15:11:32 +00:00
Sara Aspery
d7758d5509 update api-explorer version to 7.1.0-A1 in community-repo pom 2021-08-24 15:24:02 +01:00
Sara
f8b40d3cc0 ACS-566 Fix Poms (#677) 2021-08-24 09:13:03 +01:00
Travis CI User
6d48c0979e [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-24 07:14:21 +00:00
Travis CI User
1b7bada294 [maven-release-plugin][skip ci] prepare release 11.116 2021-08-24 07:14:18 +00:00
Rodica Sutu
924f64409e end to end tests for APPS-1004 and APPS-1005 (#674)
* end to end tests for governance service issues APPS-1004 and APPS-1005
2021-08-24 09:25:04 +03:00
Travis CI User
7267ea5846 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-23 11:02:06 +00:00
Travis CI User
c86d82e9cd [maven-release-plugin][skip ci] prepare release 11.115 2021-08-23 11:02:03 +00:00
mikolajbrzezinski
f7e6320a83 Feature/acs 1787 endpoint for deleted nodes (#672)
* Deleted Nodes DAU Skeleton

* Copyright Dates Update

* Spring Wiring and Default Method

* Operation Name Change

* Removal of unnecesary Method Calls and JavaDoc update

* Updates from Review
2021-08-23 12:15:40 +02:00
Travis CI User
cff733bbdf [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-23 09:00:57 +00:00
Travis CI User
57942cd43b [maven-release-plugin][skip ci] prepare release 11.114 2021-08-23 09:00:54 +00:00
Iulian Aftene
4aaae012c5 ACS-1833 - Test requestContentDirectUrl for Versions Renditions REST API endpoint (#675)
-add requestContentDirectUrl test for versions renditions
2021-08-23 11:14:33 +03:00
Travis CI User
1c387add9d [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-22 22:34:52 +00:00
Travis CI User
d3ab782b57 [maven-release-plugin][skip ci] prepare release 11.113 2021-08-22 22:34:50 +00:00
Stefan Kopf
b3d43b0500 ACS-1907: Fix typo in test case 2021-08-22 23:50:36 +02:00
Stefan Kopf
a8e1ce909e ACS-1907: Added test case to reproduce error situation 2021-08-22 23:47:26 +02:00
Travis CI User
76e815f9c5 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-20 16:38:27 +00:00
Travis CI User
5e973504d6 [maven-release-plugin][skip ci] prepare release 11.112 2021-08-20 16:38:25 +00:00
Alan Davis
b84e1f8100 ACS-1778 Common transform routing code for Repo and t-router (#648)
Main change is the removal of code from CombinedConfig into alfresco-transform-model as CombinedTransformConfig.The Code within LocalCombinedConfig has now moved to CombinedConfig as there is only one type of config now.

* Bump alfresco-transform-model from 1.3.1.1 to 1.4.0
* Add logWarn method
2021-08-20 15:49:10 +01:00
Travis CI User
42d1176ccf [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-19 13:32:16 +00:00
Travis CI User
113c27d130 [maven-release-plugin][skip ci] prepare release 11.111 2021-08-19 13:32:13 +00:00
tiagosalvado10
e7cec99d07 [ACS-1893] Bump tas-restapi to 1.63 (#673) 2021-08-19 13:37:23 +01:00
Travis CI User
aa6c347d74 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-19 12:34:39 +00:00
Travis CI User
3f8f05b0d4 [maven-release-plugin][skip ci] prepare release 11.110 2021-08-19 12:34:37 +00:00
Iulian Aftene
2c6a7e3af6 ACS-1831 - Test requestContentDirectUrl for Renditions REST API endpoint (#670)
ACS-1831 - Test requestContentDirectUrl for Renditions REST API endpoint
-add test for RequestContentDirectUrl Renditions
2021-08-19 14:49:15 +03:00
Jamal Kaabi-Mofrad
692ff3ffa8 REPO-5660: Added a patch for the new added ALFRESCO_SYSTEM_ADMINISTRATORS group. (#669) 2021-08-18 16:10:44 +01:00
Stefan Kopf
6b4df496ce Add missing 3rd party license files 2021-08-18 15:27:21 +02:00
Travis CI User
6ce7d45aa2 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-18 11:50:17 +00:00
Travis CI User
d5210ab058 [maven-release-plugin][skip ci] prepare release 11.109 2021-08-18 11:50:14 +00:00
Sara
b7df7a80c1 Feature/acs 1786 impl rest api for version renditions (#663)
* Version corrections

* ACS-1784 Implement Rest API for renditions

* ACS-1786 Impl Rest API for Version Renditions
2021-08-18 12:03:27 +01:00
Sara
b2d3c6e8c6 Feature/acs 1784 impl rest api for renditions (#662)
* Version corrections

* ACS-1784 Implement Rest API for renditions
2021-08-18 12:02:58 +01:00
Travis CI User
e2965a57f5 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-17 16:59:35 +00:00
Travis CI User
f395275129 [maven-release-plugin][skip ci] prepare release 11.108 2021-08-17 16:59:32 +00:00
antoniojfelix
ed3cc88b71 PRODSEC-4331 - Bump spring version from 5.3.3 to 5.3.9 (#666)
* PRODSEC-4331 - Upgrade spring version from 5.3.3 to 5.3.9 -> new methods added to the interface ApplicationEventMulticaster in the 5.3.9 version (removeApplicationListeners and removeApplicationListenerBeans)
2021-08-17 16:51:12 +01:00
Travis CI User
d41f3dcfde [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-17 12:25:46 +00:00
Travis CI User
6bc03c02fb [maven-release-plugin][skip ci] prepare release 11.107 2021-08-17 12:25:43 +00:00
Jamal Kaabi-Mofrad
b68e805a37 REPO-5659: Added ALFRESCO_SYSTEM_ADMINISTRATORS group authority. (#668) 2021-08-17 12:43:33 +01:00
Travis CI User
68f34c284a [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-17 07:19:18 +00:00
Travis CI User
3dcd47fac4 [maven-release-plugin][skip ci] prepare release 11.106 2021-08-17 07:19:15 +00:00
Iulian Aftene
11354630f7 ACS-1832 - Test requestContentDirectUrl for Versions REST API endpoint (#661)
* ACS-1832 - Test requestContentDirectUrl for Versions REST API endpoint
-update test for RequestContentDirectUrl Versions
2021-08-17 09:36:38 +03:00
Travis CI User
6eb7538bde [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-16 13:39:52 +00:00
Travis CI User
2da894d82b [maven-release-plugin][skip ci] prepare release 11.105 2021-08-16 13:39:50 +00:00
Rodica Sutu
b996987426 use base image according to the changes added within PR #619 [skip db] [ags] [skip repo] (#665) 2021-08-16 15:22:20 +03:00
brijmohan1
8b6dfa47b8 Fix/rm 6941 retention action on frozen nodes (#640)
* RM-6941 Changes for retention action on frozen nodes [ags]

* RM-6941 Changes for retention action on frozen nodes [ags]

* RM-6941 Changes for retention action on frozen nodes [ags]

* RM-6941 Changes for retention action on frozen nodes [ags]

* RM-6941 Changes for retention action on frozen nodes [ags]

* RM-6941 Changes for retention action on frozen nodes [ags]

* RM-6941 Changes for retention action on frozen nodes [ags]

* RM-6941 Changes for retention action on frozen nodes [ags]

* RM-6941 added slf4j and junit test [ags]

* RM-6941 added slf4j and junit test [ags]

* RM-6941 added slf4j and junit test [ags]

* RM-6941 added slf4j and junit test [ags]

* RM-6941 added slf4j and test [ags]

* RM-6941 added slf4j and test [ags]

* RM-6941 added slf4j and test [ags]

* RM-6941 added slf4j and test [ags]

* RM-6941 added slf4j and test [ags]

* RM-6941 code change for test case [ags]

* RM-6941 code change for test case [ags]

* RM-6941 code change for test case [ags]

* RM-6941 change lombok dependency scope to compile [ags]

* Revert "RM-6941 change lombok dependency scope to compile [ags]"

This reverts commit 4cee68e8

* RM-6941 change lombok dependency scope to compile [ags]

* RM-6941 revert change lombok dependency scope to compile [ags]

* RM-6941 revert change lombok dependency scope to compile [ags]
2021-08-15 14:30:08 +05:30
Travis CI User
456e442438 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-12 15:40:29 +00:00
Travis CI User
b779613910 [maven-release-plugin][skip ci] prepare release 11.104 2021-08-12 15:40:26 +00:00
tiagosalvado10
3530e3dc3b [PRODSEC-5254] Bump commons-compress to 1.21 (#658) 2021-08-12 14:56:11 +01:00
Travis CI User
c4dcbba707 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-12 06:52:56 +00:00
Travis CI User
5b539b4248 [maven-release-plugin][skip ci] prepare release 11.103 2021-08-12 06:52:54 +00:00
Sara
6f1e35217b Feature/acs 1785 impl rest api for versions (#654)
* ACS-1783 Refactor Rest Api for Nodes

* ACS-1783 Fix config default

* ACS-1783 Updates for review

* ACS-1785 Impl Rest Api for versions

* ACS-1783 Fix missing properties defaults

* ACS-1785 Minor code tidy up

* ACS-1783 Remove properties defaults

* ACS-1783 Omit enabled default

* ACS-1785 Fix public-rest-context
2021-08-12 07:10:59 +01:00
Travis CI User
5d3f3f866e [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-11 20:01:25 +00:00
Travis CI User
ad97dcd6f4 [maven-release-plugin][skip ci] prepare release 11.102 2021-08-11 20:01:22 +00:00
Sara
597056b1c4 ACS-1830 - Test requestContentDirectUrl for Nodes REST API endpoint (#650) (#656)
* ACS-1830 - Test requestContentDirectUrl for Nodes REST API endpoint
-add test for RequestContentDirectUrl
-update the license headers to 2021

Co-authored-by: Iulian Aftene <iulian.aftene@ness.com>
2021-08-11 19:51:11 +01:00
Travis CI User
4be9aad5f6 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-11 17:05:29 +00:00
Travis CI User
b066520e0e [maven-release-plugin][skip ci] prepare release 11.101 2021-08-11 17:05:26 +00:00
Sara
dcf564d3ba ACS-1783 restore contexts (#655) 2021-08-11 16:24:21 +01:00
Sara
254d29d45f Feature/acs 1783 impl rest api for nodes (#653)
* ACS-1783 Refactor Rest Api for Nodes

* ACS-1783 Fix config default

* ACS-1783 Updates for review

* ACS-1783 Fix missing properties defaults

* ACS-1783 Remove properties defaults

* ACS-1783 Omit enabled default
2021-08-11 14:49:51 +01:00
Travis CI User
e0751568db [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-11 11:58:51 +00:00
Travis CI User
fa696cfec5 [maven-release-plugin][skip ci] prepare release 11.100 2021-08-11 11:58:48 +00:00
mikolajbrzezinski
49bc40bdea Feature/acs 1789 update discovery api (#652)
* Content Service changes both ACS-1781 and 1782

* Ignore test temporarily

* ACS-1782 fix test

* ACS-1782 Test and service updates

* ACS-1781 Tests for Content Service and Store

* ACS-1782 disable rest api DAU

* Discovery API DAU Unit Tests - Asserts

* Discovery API DAU Unit Tests

* Discovery API DAU Unit Test Class

* Discovery API DAU

* ACS-1789 DiscoveryApi DAU

* Discovery API DAU Unit Tests Renamed Methods

* Integration Test Assert

* Unit Test Imports Removal

* Copyright Dates Updated

* Copyright Dates Updated

Co-authored-by: Sara Aspery <sara.aspery@alfresco.com>
2021-08-11 13:03:35 +02:00
Travis CI User
4f0b16b881 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-09 15:37:26 +00:00
Travis CI User
33155c8d92 [maven-release-plugin][skip ci] prepare release 11.99 2021-08-09 15:37:20 +00:00
Sara
838d758983 Feature/acs 1782 impl request DAU in content service (#645)
* Content Service changes both ACS-1781 and 1782

* Ignore test temporarily

* ACS-1782 fix test

* ACS-1782 Test and service updates

* ACS-1781 Tests for Content Service and Store

* ACS-1782 disable rest api DAU

* ACS-1782 fix mocks in unit test

* ACS-1782 Fix integration test
2021-08-09 15:55:10 +01:00
Travis CI User
eee7e00310 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-06 12:27:23 +00:00
Travis CI User
d726ab8099 [maven-release-plugin][skip ci] prepare release 11.98 2021-08-06 12:27:21 +00:00
CezarLeahu
216f60a0ec ACS-1773 APPS-986 Refactor on TempOutputStream, BufferedRequest, BufferedResponse & RepositoryContainer (#584)
- remove the `TempOutputStream.deleteTempFileOnClose` capability
- separate the `.close()` and the `.destroy()` methods in **TempOutputStream** (only the latter deletes the temp file)
- made `BufferedRequest`&`BufferedResponse` **AutoClosable**; their `.close()` methods always calls `.destroy()` on the underlying _TempOutputStream_ object (thus triggering the removal of their temp files)
- remove the `.destroy()` call from the `BufferedResponse.writeResponse()` method
- use `BufferedRequest`&`BufferedResponse` in try-with-resources blocks (thus calling their `.close()` methods, which calls `.destroy()` on _TempOutputStream_, tiggering the removal of the temp files) - both in **RepositoryContainer** and in **ApiWebScripts**
- replace the `TempOutputStreamFactory` class with a simple `Supplier<TempOutputStream>`
- remove the `TempByteArrayOutputStream` inner class (replaced with `ByteArrayOutputStream`)
- simplified the decision tree in some methods with the help of the IDE
- other small improvements and changes
2021-08-06 14:46:06 +03:00
Travis CI User
8e973c2b60 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-04 20:28:23 +00:00
Travis CI User
d9c0016591 [maven-release-plugin][skip ci] prepare release 11.97 2021-08-04 20:28:20 +00:00
Andrea Ligios
2deb07b97b ACS-1742 - Marked test as NOT_SUPPORTED_ON_SINGLE_PIPELINE (#641) 2021-08-04 16:35:26 +02:00
ramunteanu
3cf1cfd133 feature/APPS-1004 (#624)
* APPS-1004/APPS-1005: Retention steps are not updated when moving from another category with a different retention schedule

* APPS-1004/APPS-1005: [AGS] Retention steps are not updated when moving from another category with a different retention schedule
    - Added test for APPS-1004 and changed fix to solve another isuue
      RM-7106

* APPS-1004/APPS-1005: [AGS] Retention steps are not updated when moving from another category with a different retention schedule
    - Added common method to be used by both categoryType and folderType

* APPS-1004/APPS-1005: [AGS] Retention steps are not updated when moving from another category with a different retention schedule
    - Added change to reinitialize folders recursively, for the case
      where there are multiple subcategories

* APPS-1004/APPS-1005: [AGS] Retention steps are not updated when moving from another category with a different retention schedule
    - Added changes suggested at review
2021-08-03 18:05:15 +03:00
Travis CI User
a1c0344828 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-03 14:10:27 +00:00
Travis CI User
b639c6ba62 [maven-release-plugin][skip ci] prepare release 11.96 2021-08-03 14:10:24 +00:00
Sara
e95100e429 Acs 1865 impl configs for da us (#634)
* ACS-1781 Config set up and validation

* ACS-1781 Unit tests for config validation

* ACS-1865 Code tidy up

* ACS-1865 Updates from PR review

* ACS-1865 Updates from review
2021-08-03 14:16:24 +01:00
Travis CI User
9626f5ace6 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-02 13:16:57 +00:00
Travis CI User
48af7ebe9e [maven-release-plugin][skip ci] prepare release 11.95 2021-08-02 13:16:51 +00:00
Eliza Stan
f635bd9754 APPS-1068 : [AGS] Publish AGS-specific docker images from acs-packaging (#619) 2021-08-02 15:25:58 +03:00
Shubham Jain
3cac5ebfc5 APPS-1073_Automated Rest API tests for checking Export for Records ha… (#630)
* APPS-1073_Automated Rest API tests for checking Export for Records having size greater than 4MB

* Updated the test files as per Review Comments

* Updated the test files as per Review Comments

Co-authored-by: Shubham Jain <Shubham.Jain@hyland.com>
Co-authored-by: shubhamjain10 <shubham.jain@globallogic.com>
2021-08-02 14:23:30 +05:30
Travis CI User
28eaa8c2f8 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-31 07:59:23 +00:00
Travis CI User
d6e096a06c [maven-release-plugin][skip ci] prepare release 11.94 2021-07-31 07:59:18 +00:00
dependabot-preview[bot]
c71e536245 Bump commons-csv from 1.8 to 1.9.0 (#637) 2021-07-30 23:22:20 +00:00
Travis CI User
9e7c3f3502 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-24 00:02:44 +00:00
Travis CI User
2fcbc29491 [maven-release-plugin][skip ci] prepare release 11.93 2021-07-24 00:02:38 +00:00
dependabot-preview[bot]
9559a15fe9 Bump dependency.webscripts.version from 8.19 to 8.22 (#623) 2021-07-23 23:14:11 +00:00
Ayman Harake
8374215221 ATS-952: bump T-engines to version 2.5.2 (#604) 2021-07-21 12:15:45 +01:00
Travis CI User
964b2bb61c [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-20 13:30:15 +00:00
Travis CI User
84c32c2665 [maven-release-plugin][skip ci] prepare release 11.92 2021-07-20 13:30:05 +00:00
Manpreet Oberoi
6eb18af654 RM-6941 Changes related to retain frozen Records (#590)
* changes related to retain frozen Records

* RM-6941 add Log entries [ags][skip repo]

* RM-6941 Remove final from the variable declaration

Co-authored-by: bdwiwedi <brij.dwiwedi@globallogic.com>
2021-07-20 18:08:25 +05:30
Travis CI User
9cb719e853 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-19 11:50:41 +00:00
Travis CI User
4a6a847504 [maven-release-plugin][skip ci] prepare release 11.91 2021-07-19 11:50:35 +00:00
Abdul Mohammed
456525c1f8 Add friendly name to scheduled jobs that are currently showing class names (#603) 2021-07-19 11:51:14 +01:00
Travis CI User
16e9ebd7d1 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-15 17:52:36 +00:00
Travis CI User
d2671b9c39 [maven-release-plugin][skip ci] prepare release 11.90 2021-07-15 17:52:29 +00:00
Alan Davis
e79f4900c0 PRODENG-67/PRODENG-69 ACS 7.1 Supported Platforms: PostgreSQL 13.3, 12.7, 11.12 / MariaDB 10.6 (#602)
PostgreSQL 13.3 is also now used by default in all non DB test jobs that used 13.1 before.
2021-07-15 17:58:01 +01:00
evasques
ac4a1643e1 PRODSEC-4422 - Scripts not in Data Dictionary can be executed by action (#596)
* Added validation to the ScriptActionExecuter class to enforce the existing constraints on parameter script-ref (Repo has the constraint to only allow scripts in Data Dictionary / Scripts and AGS has the constraint to only allow scripts in Data Dictionary / Records Management / Records Management Scripts") by validating if the given scriptRef is in the allowed valued of the constraint set on that param
* Added a new unit test for AGS to make sure that rmscript action still works as expected when the script is in the correct folder and fails when not
* Added new case in ActionServiceImpl2Test#testExecuteScript to assert that the transaction fails when we execute the action with an invalid script
* Moved test testActionResult from ActionServiceImplTest to class ActionServiceImpl2Test - Before it ran with a script not in Data Dictionary so with the added validation it started to fail. I moved the unit test do avoid duplicating the code to create the script in the correct location.
2021-07-15 17:45:22 +01:00
Travis CI User
af0fd146f2 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-15 14:11:20 +00:00
Travis CI User
fd0931fb1c [maven-release-plugin][skip ci] prepare release 11.89 2021-07-15 14:11:14 +00:00
evasques
e0cbd1fba6 MNT-22481 - Unable to Create Custom Metadata (#598)
* Upgrading org.json:json from version 20090211 to 20201115 introduced the issue as getString method in the newer version does not allow for values other than strings
* Replaced getString for the get method
* Original PR in governance-services: https://github.com/Alfresco/governance-services/pull/1448
2021-07-15 14:13:43 +01:00
Travis CI User
0477533383 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-14 23:13:13 +00:00
Travis CI User
705f7e2488 [maven-release-plugin][skip ci] prepare release 11.88 2021-07-14 23:13:07 +00:00
dependabot-preview[bot]
b2109b1867 Bump docker-java from 3.0.14 to 3.2.11 (#571) 2021-07-14 22:18:35 +00:00
dependabot-preview[bot]
d5a6947918 Bump dependency.tika.version from 1.26 to 1.27 (#582) 2021-07-14 22:18:33 +00:00
dependabot-preview[bot]
ec13994ccf Bump jboss-logging from 3.4.1.Final to 3.4.2.Final (#506) 2021-07-14 22:18:22 +00:00
dependabot-preview[bot]
0b1623ee93 Bump jackson-databind from 2.12.3 to 2.12.4 (#580) 2021-07-14 22:18:10 +00:00
Travis CI User
6dcf78c211 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-14 17:19:53 +00:00
Travis CI User
c4547b3533 [maven-release-plugin][skip ci] prepare release 11.87 2021-07-14 17:19:47 +00:00
Davide
6e99df9d3e SEARCH-2878 Update the supported for SearchService (#587) 2021-07-14 17:42:55 +02:00
Travis CI User
baca7759a6 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-10 21:59:39 +00:00
Travis CI User
e109bcdaf6 [maven-release-plugin][skip ci] prepare release 11.86 2021-07-10 21:59:34 +00:00
Alex Mukha
05aee70c30 Revert "Revert "AUTH-532: Upgrade Keycloak client to match IDS-1.5.0""
This reverts commit e7b5d98dba.
2021-07-10 22:06:32 +01:00
Travis CI User
84b59efed8 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-10 16:08:55 +00:00
Travis CI User
8ccce1740f [maven-release-plugin][skip ci] prepare release 11.85 2021-07-10 16:08:49 +00:00
Alex Mukha
e7b5d98dba Revert "AUTH-532: Upgrade Keycloak client to match IDS-1.5.0"
This reverts commit bd713ffbe9.
2021-07-10 15:46:16 +01:00
Travis CI User
8263a9ccd1 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-09 22:10:46 +00:00
Travis CI User
8173d06a76 [maven-release-plugin][skip ci] prepare release 11.84 2021-07-09 22:10:40 +00:00
Davide
754eadc05a SEARCH-2878 Update the supported for SearchService to 2.0.2-RC2 (#588) 2021-07-09 22:06:32 +01:00
Travis CI User
8c5a56de14 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-09 16:37:03 +00:00
Travis CI User
b1a027a776 [maven-release-plugin][skip ci] prepare release 11.83 2021-07-09 16:36:57 +00:00
Jamal Kaabi-Mofrad
bd713ffbe9 AUTH-532: Upgrade Keycloak client to match IDS-1.5.0 2021-07-09 16:43:59 +01:00
Travis CI User
6141fe2a03 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-09 11:56:20 +00:00
269 changed files with 11802 additions and 6179 deletions

181
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,181 @@
version: 2
registries:
maven-repository-artifacts-alfresco-com-nexus-content-groups-int:
type: maven-repository
url: https://artifacts.alfresco.com/nexus/content/groups/internal
username: ${{secrets.NEXUS_USERNAME}}
password: ${{secrets.NEXUS_PASSWORD}}
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
time: "22:00"
timezone: Africa/Abidjan
open-pull-requests-limit: 99
ignore:
- dependency-name: com.google.code.gson:gson
versions:
- "> 2.8.6"
- dependency-name: io.fabric8:fabric8-maven-plugin
versions:
- "> 4.4.0"
- dependency-name: javax.servlet:javax.servlet-api
versions:
- "> 3.0.1"
- dependency-name: org.acegisecurity:acegi-security
versions:
- "> 0.8.2_patched"
- dependency-name: org.activiti:activiti-engine
versions:
- "> 5.23.0"
- dependency-name: org.activiti:activiti-engine
versions:
- ">= 7.1.a, < 7.2"
- dependency-name: org.activiti:activiti-spring
versions:
- "> 5.23.0"
- dependency-name: org.activiti:activiti-spring
versions:
- ">= 7.1.a, < 7.2"
- dependency-name: org.apache.camel:camel-activemq
versions:
- "> 3.7.1"
- dependency-name: org.apache.camel:camel-amqp
versions:
- "> 3.7.1"
- dependency-name: org.apache.camel:camel-direct
versions:
- "> 3.7.1"
- dependency-name: org.apache.camel:camel-directvm
versions:
- "> 3.7.1"
- dependency-name: org.apache.camel:camel-jackson
versions:
- "> 3.7.1"
- dependency-name: org.apache.camel:camel-mock
versions:
- "> 3.7.1"
- dependency-name: org.apache.camel:camel-spring
versions:
- "> 3.7.1"
- dependency-name: org.apache.chemistry.opencmis:chemistry-opencmis-client-impl
versions:
- "> 1.0.0"
- dependency-name: org.apache.chemistry.opencmis:chemistry-opencmis-commons-impl
versions:
- "> 1.0.0"
- dependency-name: org.apache.chemistry.opencmis:chemistry-opencmis-server-bindings
versions:
- "> 1.0.0"
- dependency-name: org.apache.chemistry.opencmis:chemistry-opencmis-test-tck
versions:
- "> 1.0.0"
- dependency-name: org.freemarker:freemarker
versions:
- "> 2.3.20-alfresco-patched-20200421"
- dependency-name: org.keycloak:keycloak-adapter-core
versions:
- "> 12.0.2"
- dependency-name: org.keycloak:keycloak-adapter-spi
versions:
- "> 12.0.2"
- dependency-name: org.keycloak:keycloak-authz-client
versions:
- "> 12.0.2"
- dependency-name: org.keycloak:keycloak-common
versions:
- "> 12.0.2"
- dependency-name: org.keycloak:keycloak-core
versions:
- "> 12.0.2"
- dependency-name: org.keycloak:keycloak-servlet-adapter-spi
versions:
- "> 12.0.2"
- dependency-name: org.eclipse.jetty:jetty-server
versions:
- 9.4.38.v20210224
- dependency-name: org.alfresco.tas:cmis
versions:
- "1.28"
- dependency-name: org.springframework:spring-webmvc
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-web
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-tx
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-orm
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-test
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-jms
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-jdbc
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-expression
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-core
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-context-support
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-context
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-beans
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.springframework:spring-aop
versions:
- 5.3.4
- 5.3.5
- dependency-name: org.alfresco.tas:restapi
versions:
- "1.55"
- dependency-name: org.eclipse.jetty:jetty-security
versions:
- 11.0.1
- dependency-name: org.alfresco.aos-module:alfresco-vti-bin
versions:
- 1.4.0-M1
- dependency-name: org.alfresco.aos-module:alfresco-aos-module-distributionzip
versions:
- 1.4.0-M1
- dependency-name: org.alfresco.aos-module:alfresco-aos-module
versions:
- 1.4.0-M1
- dependency-name: org.alfresco.surf:spring-webscripts-api
versions:
- "8.16"
- dependency-name: org.alfresco.surf:spring-webscripts:tests
versions:
- "8.16"
- dependency-name: org.alfresco.surf:spring-webscripts
versions:
- "8.16"
- dependency-name: org.alfresco.surf:spring-surf-core-configservice
versions:
- "8.16"
registries:
- maven-repository-artifacts-alfresco-com-nexus-content-groups-int

5
.gitignore vendored
View File

@@ -24,16 +24,17 @@ target
*.log.*
# Mobile Tools for Java (J2ME)
.mtj
.tmp/
# Package Files #
*.jar
*.war
*.ear
# maven-shade-plugin for mmt tool
dependency-reduced-pom.xml
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

View File

@@ -43,6 +43,11 @@ install: travis_retry travis_wait 40 bash scripts/travis/build.sh
jobs:
include:
- name: "Source Clear Scan (SCA)"
if: branch = master OR branch =~ /release\/.*/
# Run Veracode
install: skip
script: travis_wait 30 bash scripts/travis/source_clear.sh
- name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
if: commit_message !~ /\[skip repo\]/
@@ -53,38 +58,38 @@ jobs:
- name: "Repository - AppContext01TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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.0
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext03TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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.0
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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.0
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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
- mkdir -p "${HOME}/tmp"
- cp repository/src/test/resources/realms/alfresco-realm.json "${HOME}/tmp"
@@ -95,31 +100,31 @@ jobs:
- name: "Repository - AppContext06TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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.0
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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.0
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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.0
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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
script: travis_wait 20 mvn -B test -pl repository -Dtest=SearchTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dindex.subsystem.name=solr6
@@ -144,6 +149,14 @@ jobs:
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Repository - MariaDB 10.6 tests"
# We run tests on the latest version of MariaDB on pull requests plus the normal master and release branches - ignored on feature branches
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ ) OR commit_message =~ /\[db\]/ OR commit_message =~ /\[latest db\]/
before_script:
- docker run -d -p 3307:3306 --name mariadb -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mariadb:10.6 --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Repository - MySQL 5.7.23 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
before_script:
@@ -152,7 +165,8 @@ jobs:
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - MySQL 8 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
# We run tests on the latest version of MySQL on pull requests plus the normal master and release branches - ignored on feature branches
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ ) OR commit_message =~ /\[db\]/ OR commit_message =~ /\[latest db\]/
before_script:
- docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mysql:8 --transaction-isolation='READ-COMMITTED'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
@@ -172,6 +186,13 @@ jobs:
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 11.12 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.12 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 12.4 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
before_script:
@@ -179,14 +200,29 @@ jobs:
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 12.7 tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:12.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 13.1 tests"
# We only run DB tests on the latest version of PostgreSQL on feature branches
if: commit_message !~ /\[skip db\]/
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 13.3 tests"
# We only run DB tests on the latest version of PostgreSQL on feature branches
if: commit_message !~ /\[skip db\]/ OR commit_message =~ /\[latest db\]/
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
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - Messaging tests"
if: commit_message !~ /\[skip repo\]/
before_script:
@@ -196,38 +232,38 @@ jobs:
- name: "Remote-api - AppContext01TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContext02TestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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.0
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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.0
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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.0
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
@@ -298,7 +334,7 @@ jobs:
- name: "Share Services - ShareServicesTestSuite"
if: commit_message !~ /\[skip repo\]/
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.1 postgres -c 'max_connections=300'
- 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'
script: travis_wait 20 mvn -B test -pl :alfresco-share-services -Dtest=ShareServicesTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "AGS Unit & Integration Tests 01 (PostgreSQL)"

View File

@@ -2,13 +2,6 @@
[![Build Status](https://travis-ci.com/Alfresco/alfresco-community-repo.svg?branch=master)](https://travis-ci.com/Alfresco/alfresco-community-repo)
This project contains the bulk of the [Alfresco Content Services Repository](https://community.alfresco.com/docs/DOC-6385-project-overview-repository) code.
To make the development process simpler, it brings together code historically in `alfresco-core`,
`alfresco-data-madel`, `alfresco-repository`, `alfresco-remote-api` and repository specific
tests and war file creation from `acs-community-packaging`. They exist as sub projects within the Maven Reactor and still
create the same artifacts.
#### Alfresco Core
Alfresco Core is a library packaged as a jar file which contains the following:
@@ -16,8 +9,6 @@ Alfresco Core is a library packaged as a jar file which contains the following:
* Canned queries interface and supporting classes
* Generic encryption supporting classes
Version 7 of the library uses Spring 5, Quartz 2.3 and does not have Hibernate dependency.
#### Alfresco Data Model
Data model is a library packaged as a jar file which contains the following:
* Dictionary, Repository and Search Services interfaces
@@ -31,14 +22,6 @@ Repository is a library packaged as a jar file which contains the following:
* Various Service implementations
* Utility classes
Tests are combined into test classes split by test type or Spring application context used in the test, see classes
in _src/test/java/org/alfresco_. All of these classes as well as individual tests can be run by specifying the test
class name and a set of DB connection properties. Check the travis.yml file for docker images that should be started
to provide a suitable test environment. For example:
~~~
mvn clean test -Dtest=SomeRepoTest -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql:alfresco -Ddb.username=alfresco -Ddb.password=alfresco
~~~
#### Alfresco Remote API
Remote API is a library packaged as a jar file which contains the following:
@@ -46,13 +29,10 @@ Remote API is a library packaged as a jar file which contains the following:
* WebScript implementations including [V1 REST APIs](https://community.alfresco.com/community/ecm/blog/2017/05/02/v1-rest-api-10-things-you-should-know)
* [OpenCMIS](https://chemistry.apache.org/java/opencmis.html) implementations
Like the `alfresco-repository` tests are combined in test classes split by test type or Spring application context used
in the test.
#### Artifacts
The artifacts can be obtained by:
* downloading from [Alfresco maven repository](https://artifacts.alfresco.com/nexus/content/groups/public)
* getting as Maven dependency by adding the dependency to your pom file:
* as Maven dependency by adding the dependency to your pom file:
~~~
<dependency>
<groupId>org.alfresco</groupId>
@@ -94,40 +74,24 @@ and Alfresco maven repository:
~~~
The SNAPSHOT versions of the artifact are not published.
All current source versions are held in github. Historic versions can be found in [Alfresco SVN](https://svn.alfresco.com/repos/alfresco-open-mirror/services/alfresco-core/)
### Contributing guide
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.
## Setting up your development environment
Although it is possible to work on individual github projects, we recommend working on the `alfresco-community-repo`
and `acs-community-packaging` in a single Intellij IDEA project. They depend on each other and typically you will
want to make changes to both of them if you are changing the repository code.
~~~
mkdir work
cd work
git clone git@github.com:Alfresco/alfresco-community-repo.git
git clone git@github.com:Alfresco/acs-community-packaging.git
~~~
If you wish to build these projects from the command line, use the following commands.
~~~
cd alfresco-community-repo
mvn clean install -Pbuild-docker-images -DskipTests=true -Dversion.edition=Community
cd ..
cd acs-community-packaging
mvn clean install -Pbuild-docker-images -Dmaven.javadoc.skip=true
cd ..
~~~
In Intellij IDEA, create a new project using the `work` directory as the source.
* File > New Project from Existing Sources > .../work > Maven
## Setting up and building your development environment
See the [Development Tomcat Environment](https://github.com/Alfresco/acs-community-packaging/tree/master/dev/README.md)
page which will show you how to try out your repository changes in a local tomcat instance.
If you wish to use Docker images, take a look at the aliases ending in `D` and the docker-compose files in this
project's test modules.
## Branches
As multiple projects have been combined, branch names use the ACS version they are targeting.
For example the code used to create the repository in ACS 6.2.1 is a branch called `releases/6.2.1`.
This project has a branch for each ACS release. For example the code in ACS 6.2.1 is a
branch called `releases/6.2.2`. In addition to the original 6.2.2 release it will also contain Hot Fixes
added later. The latest unreleased code is on the `master` branch. There are also `.N` branches, such as
`releases/7.1.N` on which we gather unreleased fixes for future service pack releases. They do not indicate
that one is planned.
The actual version number of the **repository artifacts** created by `alfresco-community-repo` are however different.
For example `release/6.2.1` artifacts are `7.183.x`. This adds some complexity, but ensures that
version numbers do not go backwards in existing releases. It also provides some level of
independence between the repository and other ACS components.
For historic reasons the version of artifacts created on each branch do not match the ACS version.
For example artifact in ACS 7.2.0 will be `14.<something>`.
The enterprise projects which extend the `alfresco-community-repo` use the same branch names and leading
artifact version number.
### Contributing guide
Please use [this guide](CONTRIBUTING.md) to make a contribution to the project.

View File

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

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>11.82</version>
<version>14.28-SNAPSHOT</version>
</parent>
@@ -40,7 +40,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.26</version>
<version>1.7.32</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -82,7 +82,7 @@
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>3.0.14</version>
<version>3.2.12</version>
</dependency>
</dependencies>
</project>

View File

@@ -55,6 +55,7 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_AS_OF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD;
@@ -248,6 +249,9 @@ public class RecordProperties extends TestModel
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE)
private Boolean recordSearchDispositionEventsEligible;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS)
private List<String> recordSearchDispositionEvents;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS)
private String recordSearchDispositionInstructions;

View File

@@ -47,6 +47,7 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VITAL_RECORD_INDICATOR;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@@ -134,7 +135,7 @@ public class RecordCategoryChildProperties extends TestModel
private String recordSearchDispositionInstructions;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS)
private Boolean recordSearchDispositionEvents;
private List<String> recordSearchDispositionEvents;
@JsonProperty (PROPERTIES_OWNER)
private Owner owner;

View File

@@ -0,0 +1,103 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* 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.v0;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import org.alfresco.rest.core.v0.BaseAPI;
import org.apache.http.HttpResponse;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.stereotype.Component;
/**
* Methods to make API requests using v0 API for Exporting Items
*
* @author Shubham Jain
* @since 7.1.0
*/
@Component
public class ExportAPI extends BaseAPI
{
/**
* The URI to export an item
*/
private static final String EXPORT_API = "{0}rma/admin/export";
/**
* Export a single Record/Record Folder/Record Category using V0 Export API
*
* @param user User performing the export
* @param password User's Password
* @param expectedStatusCode Expected Response Code
* @param nodeID ID of the Node(Record/RecordFolder) to be exported
* @return HTTP Response
*/
public HttpResponse exportRMNode(String user, String password, int expectedStatusCode, String nodeID)
{
return export(user, password, expectedStatusCode, Collections.singletonList(getNodeRefSpacesStore() + nodeID));
}
/**
* Export a list of nodes using V0 Export API
*
* @param user User performing the export
* @param password User's Password
* @param expectedStatusCode Expected Response Code
* @param nodeIDList List of the nodes to be exported
* @return HTTP Response
*/
public HttpResponse exportRMNodes(String user, String password, int expectedStatusCode, List<String> nodeIDList)
{
List<String> nodeRefs =
nodeIDList.stream().map(nodeID -> getNodeRefSpacesStore() + nodeID).collect(Collectors.toList());
return export(user, password, expectedStatusCode, nodeRefs);
}
/**
* Export API function to perform Export Operation on items with given noderefs using V0 Export Rest API
*
* @param user User performing the export
* @param password User's Password
* @param expectedStatusCode Expected Response Code
* @param nodeRefs list of the noderefs for the items to be exported
* @return Rest API Post Request
*/
public HttpResponse export(String user, String password, int expectedStatusCode, List<String> nodeRefs)
{
final JSONObject requestParams = new JSONObject();
requestParams.put("nodeRefs", new JSONArray(nodeRefs));
return doPostJsonRequest(user, password, expectedStatusCode, requestParams, EXPORT_API);
}
}

View File

@@ -619,11 +619,27 @@ public class BaseRMRestTest extends RestTest
* @return
*/
public List<String> searchForContentAsUser(UserModel user, String term)
{
String query = "cm:name:*" + term + "*";
return searchForContentAsUser(user,query,"afts");
}
/**
* Returns search results for the given search term
*
* @param user
* @param term
* @param query language
* @return
* @throws Exception
*/
public List<String> searchForContentAsUser(UserModel user, String q, String queryLanguage)
{
getRestAPIFactory().getRmRestWrapper().authenticateUser(user);
RestRequestQueryModel queryReq = new RestRequestQueryModel();
SearchRequest query = new SearchRequest(queryReq);
queryReq.setQuery("cm:name:*" + term + "*");
queryReq.setQuery(q);
queryReq.setLanguage(queryLanguage);
List<String> names = new ArrayList<>();
// wait for solr indexing

View File

@@ -67,7 +67,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static org.apache.commons.httpclient.HttpStatus.SC_INTERNAL_SERVER_ERROR;
/**
* API tests to check actions on frozen content
*
@@ -309,11 +309,11 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
STEP("Execute the retain action");
rmRolesAndActionsAPI.executeAction(getAdminUser().getUsername(), getAdminUser().getPassword(), record.getName(),
RM_ACTIONS.END_RETENTION);
RM_ACTIONS.END_RETENTION, null, SC_INTERNAL_SERVER_ERROR);
STEP("Check the record search disposition properties");
Record recordUpdated = getRestAPIFactory().getRecordsAPI().getRecord(record.getId());
assertTrue(recordUpdated.getProperties().getRecordSearchDispositionActionName().contains(RM_ACTIONS.DESTROY.getAction()));
assertTrue(recordUpdated.getProperties().getRecordSearchDispositionActionName().contains(RM_ACTIONS.END_RETENTION.getAction()));
assertTrue(recordUpdated.getProperties().getRecordSearchDispositionPeriod().contains("immediately"));
}

View File

@@ -0,0 +1,268 @@
/*-
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.recordcategories;
import static org.alfresco.rest.rm.community.model.recordcategory.RetentionPeriodProperty.CREATED_DATE;
import static org.alfresco.rest.rm.community.model.recordcategory.RetentionPeriodProperty.CUT_OFF_DATE;
import static org.alfresco.rest.rm.community.model.recordcategory.RetentionPeriodProperty.DATE_FILED;
import static org.alfresco.rest.rm.community.utils.CoreUtil.createBodyForMoveCopy;
import static org.alfresco.rest.rm.community.utils.CoreUtil.toContentModel;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.springframework.http.HttpStatus.OK;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import org.alfresco.rest.core.v0.BaseAPI.RM_ACTIONS;
import org.alfresco.rest.core.v0.RMEvents;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.record.Record;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.v0.service.DispositionScheduleService;
import org.alfresco.test.AlfrescoTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
* Tests for moving record categories between record categories with different retention schedule
*/
public class MoveRecCategoriesWithRSTests extends BaseRMRestTest
{
private RecordCategory rootCategory, rootCategory2;
private Record elRecord, nonElRecord;
@Autowired
private DispositionScheduleService dispositionScheduleService;
/**
* Create two root categories with some retention schedules on record level
*/
@BeforeMethod
private void setUpMoveRecCategoriesWithRSTests()
{
STEP("Create record category with retention schedule and apply it to records.");
rootCategory = createRootCategory(getRandomName("rootCategory1"));
dispositionScheduleService.createCategoryRetentionSchedule(rootCategory.getName(), true);
STEP("Create record category with retention schedule and apply it to records.");
rootCategory2 = createRootCategory(getRandomName("rootCategory2"));
dispositionScheduleService.createCategoryRetentionSchedule(rootCategory2.getName(), true);
}
/**
* Given following structure is created:
* rootCategory1 with RS applied on record level with cut off and destroy after 1 day
* - subCategory1 without RS
* - recFolder
* - incomplete electronic record
* - complete non-electronic record
* rootCategory2 with RS with retain and destroy both after 2 day
* When moving subcategory1 within rootCategory2
* Then the records will inherit the RS from rootCategory2
*/
@Test
@AlfrescoTest (jira = "APPS-1005")
public void testInheritWhenMoveToDifferentRSStep() throws Exception
{
STEP("Add retention schedule cut off step after 1 day period.");
dispositionScheduleService.addCutOffAfterPeriodStep(rootCategory.getName(), "day|1", CREATED_DATE);
STEP("Add retention schedule destroy step after 1 Day period.");
dispositionScheduleService.addDestroyWithGhostingAfterPeriodStep(rootCategory.getName(), "day|1", CUT_OFF_DATE);
STEP("Create a subcategory with a record folder and records.");
RecordCategoryChild subCategory = createSubCategoryWithRecords();
STEP("Add retention schedule retain step after 2 day period.");
dispositionScheduleService.addRetainAfterPeriodStep(rootCategory2.getName(), "day|2");
STEP("Add retention schedule destroy step after 2 Day period.");
dispositionScheduleService.addDestroyWithGhostingAfterPeriodStep(rootCategory2.getName(), "day|2", DATE_FILED);
STEP("Move the subcategory within the rootCategory2.");
getRestAPIFactory().getNodeAPI(toContentModel(subCategory.getId())).move(createBodyForMoveCopy(rootCategory2.getId()));
assertStatusCode(OK);
STEP("Check that both records inherit rootCategory2 retention schedule");
elRecord = getRestAPIFactory().getRecordsAPI().getRecord(elRecord.getId());
nonElRecord = getRestAPIFactory().getRecordsAPI().getRecord(nonElRecord.getId());
assertTrue(elRecord.getProperties().getRecordSearchDispositionActionName().equalsIgnoreCase(RM_ACTIONS.END_RETENTION.getAction()),
"Disposition action should be retain");
assertTrue(elRecord.getProperties().getRecordSearchDispositionPeriod().equalsIgnoreCase("day"),
"Disposition period property should be day");
assertTrue(elRecord.getProperties().getRecordSearchDispositionPeriodExpression().equalsIgnoreCase("2"),
"Disposition period expression should be 2");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionActionName().equalsIgnoreCase(RM_ACTIONS.END_RETENTION.getAction()),
"Disposition action should be retain");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionPeriod().equalsIgnoreCase("day"),
"Disposition period property should be day");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionPeriodExpression().equalsIgnoreCase("2"),
"Disposition period expression should be 2");
}
/**
* Given following structure is created:
* rootCategory1 with RS applied on record level with retain and destroy after 1 day
* - subCategory without RS
* - recFolder
* - incomplete electronic record
* - complete non-electronic record
* rootCategory2 with RS with cut off on event case closed and destroy both after 2 day
* When moving subcategory within rootCategory2
* Then the records will inherit the RS from rootCategory2
*/
@Test
@AlfrescoTest (jira = "APPS-1004")
public void testInheritWhenMoveToDifferentRSStepOnEventBase() throws Exception
{
STEP("Add retention schedule retain step after 1 day period.");
dispositionScheduleService.addRetainAfterPeriodStep(rootCategory.getName(), "day|1");
STEP("Add retention schedule destroy step after 1 Day period.");
dispositionScheduleService.addDestroyWithGhostingAfterPeriodStep(rootCategory.getName(), "day|1", CUT_OFF_DATE);
STEP("Create a subcategory with a record folder and records.");
RecordCategoryChild subCategory = createSubCategoryWithRecords();
STEP("Add retention schedule cut off step on event case closed.");
dispositionScheduleService.addCutOffAfterEventStep(rootCategory2.getName(), RMEvents.CASE_CLOSED.getEventName());
STEP("Add retention schedule destroy step after 1 Day period.");
dispositionScheduleService.addDestroyWithGhostingAfterPeriodStep(rootCategory2.getName(), "day|2", DATE_FILED);
STEP("Move the subcategory within the rootCategory2.");
getRestAPIFactory().getNodeAPI(toContentModel(subCategory.getId())).move(createBodyForMoveCopy(rootCategory2.getId()));
assertStatusCode(OK);
STEP("Check that both records inherit rootCategory2 retention schedule");
elRecord = getRestAPIFactory().getRecordsAPI().getRecord(elRecord.getId());
nonElRecord = getRestAPIFactory().getRecordsAPI().getRecord(nonElRecord.getId());
assertTrue(elRecord.getProperties().getRecordSearchDispositionActionName().equalsIgnoreCase(RM_ACTIONS.CUT_OFF.getAction()),
"Disposition action should be cut off");
assertTrue(elRecord.getProperties().getRecordSearchDispositionPeriod().equalsIgnoreCase("none"),
"Disposition period property should none");
assertTrue(elRecord.getProperties().getRecordSearchDispositionPeriodExpression().equalsIgnoreCase("0"),
"Disposition period expression should be 0");
assertTrue(elRecord.getProperties().getRecordSearchDispositionEvents().contains(RMEvents.CASE_CLOSED.getEventName()),
"Disposition event list doesn't contain case closed event");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionActionName().equalsIgnoreCase(RM_ACTIONS.CUT_OFF.getAction()),
"Disposition action should be cut off");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionPeriod().equalsIgnoreCase("none"),
"Disposition period property should be none");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionPeriodExpression().equalsIgnoreCase("0"),
"Disposition period expression should be 0");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionEvents().contains(RMEvents.CASE_CLOSED.getEventName()),
"Disposition event list doesn't contain case closed event");
}
/**
* Given following structure is created:
* rootCategory1 with RS applied on record level with cut off on event case closed and destroy after 1 day
* - subCategory2 without RS
* - recFolder
* - incomplete electronic record
* - complete non-electronic record
* rootCategory2 with cut off on event Obsolete and destroy both after 2 day
* When moving subcategory2 within rootCategory2
* Then the records will inherit the RS from rootCategory2
*/
@Test
@AlfrescoTest (jira = "APPS-1004")
public void testInheritWhenMoveToSameStepDifferentEvent() throws Exception
{
STEP("Add retention schedule cut off on case closed.");
dispositionScheduleService.addCutOffAfterEventStep(rootCategory.getName(), RMEvents.CASE_CLOSED.getEventName());
STEP("Add retention schedule destroy step after 1 Day period.");
dispositionScheduleService.addDestroyWithGhostingAfterPeriodStep(rootCategory.getName(), "day|1", CUT_OFF_DATE);
STEP("Create a subcategory with a record folder and records.");
RecordCategoryChild subCategory = createSubCategoryWithRecords();
STEP("Add retention schedule cut off step on event separation.");
dispositionScheduleService.addCutOffAfterEventStep(rootCategory2.getName(), RMEvents.OBSOLETE.getEventName());
STEP("Add retention schedule destroy step after 2 Day period.");
dispositionScheduleService.addDestroyWithGhostingAfterPeriodStep(rootCategory2.getName(), "day|2", DATE_FILED);
STEP("Move the subcategory within the rootCategory2.");
getRestAPIFactory().getNodeAPI(toContentModel(subCategory.getId())).move(createBodyForMoveCopy(rootCategory2.getId()));
assertStatusCode(OK);
STEP("Check that both records inherit rootCategory2 retention schedule");
elRecord = getRestAPIFactory().getRecordsAPI().getRecord(elRecord.getId());
nonElRecord = getRestAPIFactory().getRecordsAPI().getRecord(nonElRecord.getId());
assertTrue(elRecord.getProperties().getRecordSearchDispositionActionName().equalsIgnoreCase(RM_ACTIONS.CUT_OFF.getAction()),
"Disposition action should be cut off");
assertTrue(elRecord.getProperties().getRecordSearchDispositionPeriod().equalsIgnoreCase("none"),
"Disposition period property should be none");
assertTrue(elRecord.getProperties().getRecordSearchDispositionPeriodExpression().equalsIgnoreCase("0"),
"Disposition period expression should be 0");
assertFalse(elRecord.getProperties().getRecordSearchDispositionEvents().contains(RMEvents.CASE_CLOSED.getEventName()),
"Event list contain the event from the previous RS ");
assertTrue(elRecord.getProperties().getRecordSearchDispositionEvents().contains(RMEvents.OBSOLETE.getEventName()),
"Event list doesn't contain the event from the current RS ");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionActionName().equalsIgnoreCase(RM_ACTIONS.CUT_OFF.getAction()),
"Disposition action should be cut off");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionPeriod().equalsIgnoreCase("none"),
"Disposition period property should be none");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionPeriodExpression().equalsIgnoreCase("0"),
"Disposition period expression should be 0");
assertFalse(nonElRecord.getProperties().getRecordSearchDispositionEvents().contains(RMEvents.CASE_CLOSED.getEventName()),
"Event list contain the event from the previous RS ");
assertTrue(nonElRecord.getProperties().getRecordSearchDispositionEvents().contains(RMEvents.OBSOLETE.getEventName()),
"Event list doesn't contain the event from the current RS ");
}
@AfterMethod (alwaysRun = true)
public void cleanupMoveRecCategoriesWithRSTests()
{
getRestAPIFactory().getRecordCategoryAPI().deleteRecordCategory(rootCategory.getId());
getRestAPIFactory().getRecordCategoryAPI().deleteRecordCategory(rootCategory2.getId());
}
/**
* Helper method to create a sub-category with a folder, an incomplete electronic record and a complete
* electronic record
* @return
*/
private RecordCategoryChild createSubCategoryWithRecords()
{
STEP("Create a subcategory with a record folder");
RecordCategoryChild subCategory = createRecordCategory(rootCategory.getId(), getRandomName("subCategory"));
RecordCategoryChild recFolder = createFolder(subCategory.getId(), getRandomName("recFolder"));
STEP("Create 2 records in the record folder. Complete one of them.");
elRecord = createElectronicRecord(recFolder.getId(), getRandomName("elRecord"));
nonElRecord = createNonElectronicRecord(recFolder.getId(), getRandomName("nonElRecord"));
getRestAPIFactory().getRecordsAPI().completeRecord(nonElRecord.getId());
return subCategory;
}
}

View File

@@ -0,0 +1,136 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.records;
import static java.util.Arrays.asList;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE;
import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.createTempFile;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.apache.http.HttpStatus.SC_OK;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.record.Record;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.v0.ExportAPI;
import org.alfresco.test.AlfrescoTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
/**
* This class contains tests for testing the Export functionality on RM site
*
* @author Shubham Jain
* @since 7.1.0
*/
public class ExportRecordsTests extends BaseRMRestTest
{
private RecordCategory rootCategory;
private RecordCategoryChild recordFolder;
@Autowired
private ExportAPI exportAPI;
@BeforeClass (alwaysRun = true)
public void exportRecordsTestsBeforeClass()
{
STEP("Create root level category");
rootCategory = createRootCategory(getRandomName("Category"));
STEP("Create the record folder inside the rootCategory");
recordFolder = createRecordFolder(rootCategory.getId(), getRandomName("Folder"));
}
@DataProvider (name = "CreateRMNodes")
public Object[][] getRMNodeID()
{
return new String[][] {
{ createRecord("Record_4MB", 4).getId() },
{ createRecord("Record_200MB", 200).getId() },
{ recordFolder.getId() }
};
}
/**
* Given a record with size > 4 MB
* When I export the record using API
* Then the request is successful
*/
@Test (description = "Testing the RM Export functionality for records of size >4MB and Record " +
"Folder containing records with size >4MB",
dataProvider = "CreateRMNodes")
@AlfrescoTest (jira = "APPS-986")
public void exportRMNodeTest(String nodeID)
{
STEP("Export the created record/record folder with size greater than 4 MB and verifying the expected response" +
" code");
exportAPI.exportRMNode(getAdminUser().getUsername(), getAdminUser().getPassword(), SC_OK, nodeID);
}
/**
* I would change this to
* Given a list of records with a size > 4MB
* When I export the records
* Then the request is succesfull
*/
@Test (description = "Testing the RM Export functionality using API for a list of Records at once with " +
"collective size of more than 4MB")
public void exportRecordsTest()
{
STEP("Export all the created records at once and verifying the expected response code");
exportAPI.exportRMNodes(getAdminUser().getUsername(), getAdminUser().getPassword(),
SC_OK, asList(createRecord("Record_2MB", 2).getId(), createRecord("Record_3MB", 3).getId()));
}
/**
* Create a Record with a specific size in RM Site inside already created Record Folder
*
* @param recordName Name of the record to be created
* @param sizeInMegaBytes Size of the record to be created in MegaBytes
* @return Created record with defined size
*/
public Record createRecord(String recordName, int sizeInMegaBytes)
{
return getRestAPIFactory().getRecordFolderAPI().createRecord(Record.builder().name(recordName)
.nodeType(CONTENT_TYPE).build(), recordFolder.getId(),
createTempFile("TempFile", sizeInMegaBytes));
}
@AfterClass (alwaysRun = true)
public void exportRecordsTestsAfter()
{
STEP("Delete the created rootCategory along with corresponding record folders/records present in it");
getRestAPIFactory().getRecordCategoryAPI().deleteRecordCategory(rootCategory.getId());
}
}

View File

@@ -41,6 +41,7 @@ import static org.testng.Assert.assertTrue;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.RandomAccessFile;
import org.alfresco.rest.rm.community.model.record.Record;
import org.alfresco.rest.rm.community.model.record.RecordProperties;
@@ -66,13 +67,19 @@ public class FilePlanComponentsUtil
// Intentionally blank
}
/** Name of the image resource file to be used for records body */
/**
* Name of the image resource file to be used for records body
*/
public static final String IMAGE_FILE = "money.JPG";
/** Title prefix for record category children */
/**
* Title prefix for record category children
*/
public static final String TITLE_PREFIX = "Title for ";
/** Description prefix for record category children */
/**
* Description prefix for record category children
*/
public static final String DESCRIPTION_PREFIX = "This is the description for";
@@ -87,7 +94,7 @@ public class FilePlanComponentsUtil
}
/**
* Creates a record model with the given type and a random name (with "Record " prefix)
* Creates a record model with the given type and a random name (with "Record " prefix)
*
* @param nodeType The node type
* @return The {@link Record} with for the given node type
@@ -95,9 +102,9 @@ public class FilePlanComponentsUtil
private static Record createRecordModel(String nodeType)
{
return Record.builder()
.name("Record " + getRandomAlphanumeric())
.nodeType(nodeType)
.build();
.name("Record " + getRandomAlphanumeric())
.nodeType(nodeType)
.build();
}
/**
@@ -133,22 +140,22 @@ public class FilePlanComponentsUtil
/**
* Creates an unfiled records container child record model with the given name and type
*
* @param name The name of the unfiled records container child
* @param name The name of the unfiled records container child
* @param nodeType The type of the record category child
* @return The {@link UnfiledContainerChild} with the given details
*/
public static UnfiledContainerChild createUnfiledContainerChildRecordModel(String name, String nodeType)
{
return UnfiledContainerChild.builder()
.name(name)
.nodeType(nodeType)
.build();
.name(name)
.nodeType(nodeType)
.build();
}
/**
* Creates a nonElectronic container child record model with all available properties for the non electronic records
*
* @param name The name of the unfiled records container child
* @param name The name of the unfiled records container child
* @param nodeType The type of the record category child
* @return The {@link UnfiledContainerChild} with the given details
*/
@@ -156,19 +163,19 @@ public class FilePlanComponentsUtil
String shelf, String storageLocation, Integer numberOfCopies, Integer physicalSize)
{
return UnfiledContainerChild.builder()
.name(name)
.nodeType(NON_ELECTRONIC_RECORD_TYPE)
.properties(UnfiledContainerChildProperties.builder()
.title(title)
.description(description)
.box(box)
.file(file)
.shelf(shelf)
.storageLocation(storageLocation)
.numberOfCopies(numberOfCopies)
.physicalSize(physicalSize)
.build())
.build();
.name(name)
.nodeType(NON_ELECTRONIC_RECORD_TYPE)
.properties(UnfiledContainerChildProperties.builder()
.title(title)
.description(description)
.box(box)
.file(file)
.shelf(shelf)
.storageLocation(storageLocation)
.numberOfCopies(numberOfCopies)
.physicalSize(physicalSize)
.build())
.build();
}
/**
@@ -190,110 +197,110 @@ public class FilePlanComponentsUtil
String shelf, String storageLocation, Integer numberOfCopies, Integer physicalSize)
{
return Record.builder()
.name(name)
.nodeType(NON_ELECTRONIC_RECORD_TYPE)
.properties(RecordProperties.builder()
.title(title)
.description(description)
.box(box)
.file(file)
.shelf(shelf)
.storageLocation(storageLocation)
.numberOfCopies(numberOfCopies)
.physicalSize(physicalSize)
.build())
.build();
.name(name)
.nodeType(NON_ELECTRONIC_RECORD_TYPE)
.properties(RecordProperties.builder()
.title(title)
.description(description)
.box(box)
.file(file)
.shelf(shelf)
.storageLocation(storageLocation)
.numberOfCopies(numberOfCopies)
.physicalSize(physicalSize)
.build())
.build();
}
/**
* Creates a record model with the given name, description and title
*
* @param name The name of the record
* @param name The name of the record
* @param description The description of the record
* @param title The title of the record
* @param title The title of the record
* @return The {@link Record} with the given details
*/
public static Record createRecordModel(String name, String description, String title)
{
return Record.builder()
.name(name)
.properties(RecordProperties.builder()
.description(description)
.title(title)
.build())
.build();
.name(name)
.properties(RecordProperties.builder()
.description(description)
.title(title)
.build())
.build();
}
/**
* Creates a record category child model with the given name and type
*
* @param name The name of the record category child
* @param name The name of the record category child
* @param nodeType The type of the record category child
* @return The {@link RecordCategoryChild} with the given details
*/
public static RecordCategoryChild createRecordCategoryChildModel(String name, String nodeType)
{
return RecordCategoryChild.builder()
.name(name)
.nodeType(nodeType)
.properties(RecordCategoryChildProperties.builder()
.title(TITLE_PREFIX + name)
.build())
.build();
.name(name)
.nodeType(nodeType)
.properties(RecordCategoryChildProperties.builder()
.title(TITLE_PREFIX + name)
.build())
.build();
}
/**
* Creates a record category model with the given name and title
*
* @param name The name of the record category
* @param name The name of the record category
* @param title The title of the record category
* @return The {@link RecordCategory} with the given details
*/
public static RecordCategory createRecordCategoryModel(String name, String title)
{
return RecordCategory.builder()
.name(name)
.nodeType(RECORD_CATEGORY_TYPE)
.properties(RecordCategoryProperties.builder()
.title(title)
.build())
.build();
.name(name)
.nodeType(RECORD_CATEGORY_TYPE)
.properties(RecordCategoryProperties.builder()
.title(title)
.build())
.build();
}
/**
* Creates a record folder model with the given name and title
*
* @param name The name of the record folder
* @param name The name of the record folder
* @param title The title of the record folder
* @return The {@link RecordFolder} with the given details
*/
public static RecordFolder createRecordFolderModel(String name, String title)
{
return RecordFolder.builder()
.name(name)
.nodeType(RECORD_FOLDER_TYPE)
.properties(RecordFolderProperties.builder()
.title(title)
.build())
.build();
.name(name)
.nodeType(RECORD_FOLDER_TYPE)
.properties(RecordFolderProperties.builder()
.title(title)
.build())
.build();
}
/**
* Creates an unfiled records container child model with the given name and type
*
* @param name The name of the unfiled records container child
* @param name The name of the unfiled records container child
* @param nodeType The type of the record category child
* @return The {@link UnfiledContainerChild} with the given details
*/
public static UnfiledContainerChild createUnfiledContainerChildModel(String name, String nodeType)
{
return UnfiledContainerChild.builder()
.name(name)
.nodeType(nodeType)
.properties(UnfiledContainerChildProperties.builder()
.title(TITLE_PREFIX + name)
.build())
.build();
.name(name)
.nodeType(nodeType)
.properties(UnfiledContainerChildProperties.builder()
.title(TITLE_PREFIX + name)
.build())
.build();
}
/**
@@ -324,6 +331,32 @@ public class FilePlanComponentsUtil
}
}
/**
* Method to create a temporary file with specific size
*
* @param name file name
* @param sizeInMegaBytes size
* @return temporary file
*/
public static File createTempFile(final String name, long sizeInMegaBytes)
{
try
{
// Create file
final File file = File.createTempFile(name, ".txt");
RandomAccessFile raf = new RandomAccessFile(file, "rw");
raf.setLength(sizeInMegaBytes * 1024 * 1024);
raf.close();
return file;
}
catch (Exception exception)
{
throw new RuntimeException("Unable to create test file.", exception);
}
}
/**
* Helper method to verify all properties of a nonElectronic record
*

View File

@@ -0,0 +1,89 @@
# dataprep related
alfresco.scheme=http
alfresco.server=localhost
alfresco.port=8082
# sync service related
sync.scheme=http
sync.server=localhost
sync.port=9090
# Solr Server Settings
solr.scheme=http
solr.server=localhost
solr.port=8083
#Solr Indexing Time
solrWaitTimeInSeconds=20
# credentials
admin.user=admin
admin.password=admin
# Identity Service configuration
# set this property to run tests using AIS
# identity-service.auth-server-url=http://localhost:8999/auth
# in containers we cannot access directly JMX, so we will use http://jolokia.org agent
# disabling this we will use direct JMX calls to server
jmx.useJolokiaAgent=false
# Server Health section
# in ServerHealth#isServerReachable() - could also be shown.
# enable this option to view if on server there are tenants or not
serverHealth.showTenants=false
# TEST MANAGEMENT SECTION - Test Rail
#
# (currently supporting Test Rail v5.2.1.3472 integration)
#
# Example of configuration:
# ------------------------------------------------------
# if testManagement.enabled=true we enabled TestRailExecutorListener (if used in your suite xml file)
# testManagement.updateTestExecutionResultsOnly=true (this will just update the results of a test: no step will be updated - good for performance)
# testManagement.endPoint=https://alfresco.testrail.com/
# testManagement.username=<username>
# testManagement.apiKey=<api-key>
# testManagement.project=<id-of-your-project
# testManagement.testRun=<test-run-name>
# testManagement.includeOnlyTestCasesExecuted=true #if you want to include in your run ONLY the test cases that you run, then set this value to false
# testManagement.rateLimitInSeconds=1 #is the default rate limit after what minimum time, should we upload the next request. http://docs.gurock.com/testrail-api2/introduction #Rate Limit
# testManagement.suiteId=23 (the id of the Master suite)
# ------------------------------------------------------
testManagement.enabled=false
testManagement.endPoint=https://alfresco.testrail.com/
testManagement.username=
testManagement.apiKey=
testManagement.project=7
testManagement.includeOnlyTestCasesExecuted=true
testManagement.rateLimitInSeconds=1
testManagement.testRun=MyTestRunInTestRail
testManagement.suiteId=12
# The location of the reports path
reports.path=./target/reports
#
# Database Section
# You should provide here the database URL, that can be a differed server as alfresco.
# https://docs.oracle.com/javase/tutorial/jdbc/basics/connecting.html
#
# Current supported db.url:
#
# MySQL:
# db.url = jdbc:mysql://${alfresco.server}:3306/alfresco
#
# PostgreSQL:
# db.url = jdbc:postgresql://<your-DB-IP>:3306/alfresco
#
# Oracle:
# db.url = jdbc:oracle://<your-DB-IP>:3306/alfresco
#
# MariaDB:
# db.url = jdbc:mariadb://<your-DB-IP>:3306/alfresco
#
db.url = jdbc:mysql://${alfresco.server}:3306/alfresco
db.username = alfresco
db.password = alfresco
environment=default

View File

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

View File

@@ -1,4 +1,4 @@
TRANSFORMERS_TAG=2.5.0
TRANSFORMERS_TAG=2.5.3
SOLR6_TAG=2.0.2-RC1
POSTGRES_TAG=13.1
POSTGRES_TAG=13.3
ACTIVEMQ_TAG=5.16.1

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=You can't create items i
rm.action.create.transfer.child-error-message=You can't create items in Transfer Folders.
rm.action.create.record.folder.child-error-message=You can only create records in record folders and this was a {0}.
rm.action.transfer-non-editable=You can't edit transfer folder or container metadata.
rm.action.node.frozen.error-message=Unable to perform action {0} because the node is frozen or has frozen children.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=Nelze vytv\u00e1\u0159et
rm.action.create.transfer.child-error-message=Nelze vytv\u00e1\u0159et polo\u017eky ve slo\u017ece p\u0159enosu.
rm.action.create.record.folder.child-error-message=Z\u00e1znamy je mo\u017en\u00e9 vytv\u00e1\u0159et pouze ve slo\u017ek\u00e1ch z\u00e1znam\u016f a toto bylo {0}.
rm.action.transfer-non-editable=Nelze upravovat metadata kontejneru nebo slo\u017eky pro p\u0159enos.
rm.action.node.frozen.error-message=Akci {0} nelze prov\u00e9st, proto\u017ee uzel je zablokovan\u00fd nebo m\u00e1 zablokovan\u00e9 pod\u0159\u00edzen\u00e9 prvky.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=Du kan ikke oprette elem
rm.action.create.transfer.child-error-message=Du kan ikke oprette elementer i Overf\u00f8r-mapper.
rm.action.create.record.folder.child-error-message=Du kan kun oprette poster i postmapper, og dette var en {0}.
rm.action.transfer-non-editable=Du kan ikke redigere overf\u00f8rselsmappe- eller container-metadata.
rm.action.node.frozen.error-message=Handlingen kan ikke udf\u00f8res {0}, fordi noden er l\u00e5st eller har l\u00e5ste underordnede noder.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=Sie k\u00f6nnen keine El
rm.action.create.transfer.child-error-message=Sie k\u00f6nnen keine Elemente in \u00dcbertragungsordnern erstellen.
rm.action.create.record.folder.child-error-message=In Record-Ordnern k\u00f6nnen Sie nur Records erstellen. Das war aber ein {0}.
rm.action.transfer-non-editable=Sie k\u00f6nnen Metadaten von \u00dcbertragungsordnern oder -containern nicht bearbeiten.
rm.action.node.frozen.error-message=Die Aktion ''{0}'' kann nicht ausgef\u00fchrt werden, da der Knoten oder untergeordnete Elemente von ihm festgefahren ist bzw. sind.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=No se pueden crear eleme
rm.action.create.transfer.child-error-message=No se pueden crear elementos en las carpetas de transferencia.
rm.action.create.record.folder.child-error-message=Solo puede crear documentos de archivo en carpetas de documentos de archivo. {0} no se puede crear aqu\u00ed.
rm.action.transfer-non-editable=No se puede editar una carpeta de transferencia ni los metadatos de un contenedor.
rm.action.node.frozen.error-message=No se puede realizar la acci\u00f3n {0} porque el nodo est\u00e1 congelado o tiene elementos secundarios congelados.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=Siirtos\u00e4ili\u00f6\u
rm.action.create.transfer.child-error-message=Siirtokansioihin ei voi luoda kohteita.
rm.action.create.record.folder.child-error-message=Tietuekansioihin voi luoda ainoastaan tietueita, mutta t\u00e4m\u00e4 oli {0}.
rm.action.transfer-non-editable=Siirtokansion tai -s\u00e4ili\u00f6n metatietoja ei voi muokata.
rm.action.node.frozen.error-message=Toimintoa {0} ei voitu suorittaa, koska solmu on j\u00e4\u00e4dytetty tai sill\u00e4 on j\u00e4\u00e4dytettyj\u00e4 alatasoja.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=Impossible de cr\u00e9er
rm.action.create.transfer.child-error-message=Impossible de cr\u00e9er des \u00e9l\u00e9ments dans les dossiers de transfert.
rm.action.create.record.folder.child-error-message=Vous ne pouvez cr\u00e9er des documents d''archives que dans les dossiers d''archives, dans le cas pr\u00e9sent {0}.
rm.action.transfer-non-editable=Impossible de modifier les m\u00e9tadonn\u00e9es de dossier de transfert ou de contenant.
rm.action.node.frozen.error-message=Impossible d''effectuer l''action {0} car le n\u0153ud ou ses enfants sont gel\u00e9s.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=Impossibile creare eleme
rm.action.create.transfer.child-error-message=Impossibile creare elementi nelle cartelle Trasferimento.
rm.action.create.record.folder.child-error-message=I record possono essere creati solo nelle cartelle dei record e questa era {0}.
rm.action.transfer-non-editable=Impossibile modificare la cartella di trasferimento o i metadati dei contenitori.
rm.action.node.frozen.error-message=Impossibile eseguire l''azione {0} poich\u00e9 il nodo \u00e8 congelato o presenta nodi figlio congelati.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=\u8ee2\u9001\u30b3\u30f3
rm.action.create.transfer.child-error-message=\u8ee2\u9001\u30d5\u30a9\u30eb\u30c0\u5185\u3067\u306f\u30a2\u30a4\u30c6\u30e0\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3002
rm.action.create.record.folder.child-error-message=\u30ec\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3067\u304d\u308b\u306e\u306f\u30ec\u30b3\u30fc\u30c9\u30d5\u30a9\u30eb\u30c0\u5185\u306e\u307f\u3067\u3001\u3053\u308c\u306f {0} \u3067\u3059\u3002
rm.action.transfer-non-editable=\u8ee2\u9001\u30d5\u30a9\u30eb\u30c0\u307e\u305f\u306f\u30b3\u30f3\u30c6\u30ca\u30e1\u30bf\u30c7\u30fc\u30bf\u306f\u7de8\u96c6\u3067\u304d\u307e\u305b\u3093\u3002
rm.action.node.frozen.error-message=\u30ce\u30fc\u30c9\u304c\u30d5\u30ea\u30fc\u30ba\u3057\u3066\u3044\u308b\u304b\u3001\u307e\u305f\u306f\u5b50\u304c\u51cd\u7d50\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u30a2\u30af\u30b7\u30e7\u30f3 {0}\u3092\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=Elementer kan ikke oppre
rm.action.create.transfer.child-error-message=Elementer kan ikke opprettes i overf\u00f8ringsmapper.
rm.action.create.record.folder.child-error-message=Oppf\u00f8ringer kan bare opprettes i oppf\u00f8ringsmapper, og dette er en {0}.
rm.action.transfer-non-editable=Overf\u00f8ringsmapper eller beholdermetadata kan ikke redigeres.
rm.action.node.frozen.error-message=Kan ikke utf\u00f8re handlingen {0} fordi noden er frossen eller har frosne underordnede elementer.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=U kunt geen onderdelen m
rm.action.create.transfer.child-error-message=U kunt geen onderdelen maken in overdrachtsmappen.
rm.action.create.record.folder.child-error-message=U kunt alleen archiefstukken maken in archiefmappen en dit was een {0}.
rm.action.transfer-non-editable=U kunt metagegevens in een overdrachtsmap of -container niet bewerken.
rm.action.node.frozen.error-message=Kan de actie {0} niet uitvoeren omdat de node geblokkeerd is of geblokkeerde onderliggende elementen heeft.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=Nie mo\u017cna utworzy\u
rm.action.create.transfer.child-error-message=Nie mo\u017cna utworzy\u0107 pozycji w folderach przesy\u0142ania.
rm.action.create.record.folder.child-error-message=W folderach rekord\u00f3w mo\u017cna tworzy\u0107 tylko rekordy, a to by\u0142o {0}.
rm.action.transfer-non-editable=Nie mo\u017cna edytowa\u0107 folderu przesy\u0142ania ani metadanych kontenera.
rm.action.node.frozen.error-message=Nie mo\u017cna wykona\u0107 czynno\u015bci {0}, poniewa\u017c w\u0119ze\u0142 jest zablokowany lub ma zablokowane elementy podrz\u0119dne.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=N\u00e3o \u00e9 poss\u00
rm.action.create.transfer.child-error-message=N\u00e3o \u00e9 poss\u00edvel criar itens nas pastas de Transfer\u00eancia.
rm.action.create.record.folder.child-error-message=\u00c9 poss\u00edvel apenas criar documentos arquiv\u00edsticos em pastas de documentos arquiv\u00edsticos; esta foi {0}.
rm.action.transfer-non-editable=N\u00e3o \u00e9 poss\u00edvel editar os metadados das pastas de transfer\u00eancia ou cont\u00eainer.
rm.action.node.frozen.error-message=N\u00e3o \u00e9 poss\u00edvel executar a a\u00e7\u00e3o {0} porque o n\u00f3 est\u00e1 congelado ou tem filhos congelados.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=\u041d\u0435\u0432\u043e
rm.action.create.transfer.child-error-message=\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043f\u0430\u043f\u043a\u0430\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438.
rm.action.create.record.folder.child-error-message=\u0417\u0430\u043f\u0438\u0441\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0430\u043f\u043a\u0430\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0430 \u044d\u0442\u043e {0}.
rm.action.transfer-non-editable=\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u043b\u0438 \u043f\u0430\u043f\u043a\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438.
rm.action.node.frozen.error-message=\u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 {0}, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443\u0437\u0435\u043b \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d \u0438\u043b\u0438 \u0438\u043c\u0435\u0435\u0442 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=Du kan inte skapa objekt
rm.action.create.transfer.child-error-message=Du kan inte skapa objekt i \u00d6verf\u00f6ringsmappar.
rm.action.create.record.folder.child-error-message=Du kan endast skapa handlingar i handlingsmappar och detta var en {0}.
rm.action.transfer-non-editable=Du kan inte redigera \u00f6verf\u00f6ringsmappen eller beh\u00e5llarens metadata.
rm.action.node.frozen.error-message=Det gick inte att utf\u00f6ra \u00e5tg\u00e4rd {0} eftersom noden \u00e4r frusen eller har frysta underordnade.

View File

@@ -45,4 +45,4 @@ rm.action.create.transfer.container.child-error-message=\u60a8\u65e0\u6cd5\u5728
rm.action.create.transfer.child-error-message=\u60a8\u65e0\u6cd5\u5728 Transfer \u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u9879\u76ee\u3002
rm.action.create.record.folder.child-error-message=\u60a8\u53ea\u80fd\u5728\u8bb0\u5f55\u6587\u4ef6\u5939\u4e2d\u521b\u5efa\u8bb0\u5f55\uff0c\u4e14\u8fd9\u662f\u4e00\u4e2a {0}\u3002
rm.action.transfer-non-editable=\u60a8\u65e0\u6cd5\u7f16\u8f91\u4f20\u8f93\u6587\u4ef6\u5939\u6216\u5bb9\u5668\u5143\u6570\u636e\u3002
rm.action.node.frozen.error-message=\u65e0\u6cd5\u6267\u884c\u64cd\u4f5c{0}\uff0c\u56e0\u4e3a\u8282\u70b9\u5df2\u51bb\u7ed3\u6216\u51bb\u7ed3\u7684\u5b50\u8282\u70b9\u3002

View File

@@ -80,6 +80,7 @@
<property name="searchService" ref="searchService" />
<property name="personService" ref="personService" />
<property name="recordsManagementActionService" ref="recordsManagementActionService" />
<property name="freezeService" ref="freezeService"/>
<property name="batchSize" value="${rm.dispositionlifecycletrigger.batchsize}"/>
</bean>

View File

@@ -102,9 +102,11 @@
<bean id="rma.unfiledRecordFolder" class="org.alfresco.module.org_alfresco_module_rm.model.rma.type.UnfiledRecordFolderType" parent="rm.baseBehaviour" />
<bean id="rma.recordCategory" class="org.alfresco.module.org_alfresco_module_rm.model.rma.type.RecordCategoryType" parent="rm.baseBehaviour">
<property name="recordService" ref="RecordService" />
<property name="vitalRecordService" ref="VitalRecordService" />
<property name="filePlanPermissionService" ref="FilePlanPermissionService" />
<property name="recordFolderService" ref="RecordFolderService" />
<property name="dispositionService" ref="DispositionService" />
</bean>
<bean id="rma.recordFolder" class="org.alfresco.module.org_alfresco_module_rm.model.rma.type.RecordFolderType" parent="rm.baseBehaviour">

View File

@@ -112,7 +112,6 @@
<property name="filePlanService" ref="FilePlanService" />
<property name="recordFolderService" ref="RecordFolderService"/>
<property name="recordService" ref="RecordService"/>
<property name="freezeService" ref="FreezeService"/>
<property name="transactionService" ref="transactionService" />
</bean>
@@ -696,6 +695,13 @@
init-method="init" depends-on="org_alfresco_module_rm_resourceBundles">
<property name="policyComponent" ref="policyComponent"/>
<property name="nodeService" ref="nodeService"/>
<!-- list of disposition actions to automatically execute when eligible -->
<property name="retentionActions">
<list>
<value>retain</value>
</list>
</property>
<property name="freezeService" ref="freezeService"/>
</bean>
<bean id="RecordsManagementActionService" class="org.springframework.aop.framework.ProxyFactoryBean">
@@ -900,6 +906,8 @@
<bean id="freezeService" class="org.alfresco.module.org_alfresco_module_rm.freeze.FreezeServiceImpl" parent="baseService">
<property name="filePlanService" ref="FilePlanService" />
<property name="holdService" ref="HoldService" />
<property name="recordFolderService" ref="RecordFolderService"/>
<property name="recordService" ref="RecordService"/>
</bean>
<bean id="FreezeService" class="org.springframework.aop.framework.ProxyFactoryBean">
@@ -945,6 +953,7 @@
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.hasFrozenChildren=RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.getFreezeDate=RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.getFreezeInitiator=RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.isFrozenOrHasFrozenChildren=RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService.*=RM_DENY
]]>
</value>

View File

@@ -5,7 +5,7 @@ version: "3"
services:
alfresco:
# acs repo community image with ags repo community amp applied
image: alfresco/alfresco-governance-repository-community:latest
image: alfresco/alfresco-governance-repository-community-base:latest
environment:
CATALINA_OPTS : "
-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n

View File

@@ -8,13 +8,13 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>11.82</version>
<version>14.28-SNAPSHOT</version>
</parent>
<properties>
<app.amp.client.war.folder>${project.build.directory}/${project.build.finalName}-war</app.amp.client.war.folder>
<image.name>alfresco/alfresco-governance-repository-community</image.name>
<image.name>alfresco/alfresco-governance-repository-community-base</image.name>
</properties>
<dependencies>
@@ -108,7 +108,7 @@
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -141,6 +141,11 @@
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
@@ -396,7 +401,7 @@
<image>
<!-- TODO upgrade this old postgres version -->
<name>postgres:9.4.12</name>
<!--<name>postgres:13.1</name>-->
<!--<name>postgres:13.3</name>-->
<run>
<ports>
<port>${postgresql.tests.port}:${postgresql.port}</port>

View File

@@ -35,17 +35,17 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementPolicies.BeforeRMActionExecution;
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementPolicies.OnRMActionExecution;
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
import org.alfresco.module.org_alfresco_module_rm.util.PoliciesUtil;
import org.alfresco.repo.policy.ClassPolicyDelegate;
import org.alfresco.repo.policy.PolicyComponent;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.surf.util.I18NUtil;
/**
@@ -53,14 +53,13 @@ import org.springframework.extensions.surf.util.I18NUtil;
*
* @author Roy Wetherall
*/
@Slf4j
public class RecordsManagementActionServiceImpl implements RecordsManagementActionService
{
/** I18N */
private static final String MSG_NOT_DEFINED = "rm.action.not-defined";
private static final String MSG_NO_IMPLICIT_NODEREF = "rm.action.no-implicit-noderef";
/** Logger */
private static Log logger = LogFactory.getLog(RecordsManagementActionServiceImpl.class);
private static final String MSG_NODE_FROZEN = "rm.action.node.frozen.error-message";
/** Registered records management actions */
private Map<String, RecordsManagementAction> rmActions = new HashMap<>(13);
@@ -78,6 +77,16 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
private ClassPolicyDelegate<BeforeRMActionExecution> beforeRMActionExecutionDelegate;
private ClassPolicyDelegate<OnRMActionExecution> onRMActionExecutionDelegate;
/**
* Freeze Service
*/
private FreezeService freezeService;
/**
* list of retention actions to automatically execute
*/
private List<String> retentionActions;
/**
* @return Policy component
*/
@@ -94,6 +103,19 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
return this.nodeService;
}
/**
* @param freezeService freeze service
*/
public void setFreezeService(FreezeService freezeService)
{
this.freezeService = freezeService;
}
public void setRetentionActions(List<String> retentionActions)
{
this.retentionActions = retentionActions;
}
/**
* Set the policy component
*
@@ -267,21 +289,23 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
*/
public RecordsManagementActionResult executeRecordsManagementAction(NodeRef nodeRef, String name, Map<String, Serializable> parameters)
{
if (logger.isDebugEnabled())
{
logger.debug("Executing record management action on " + nodeRef);
logger.debug(" actionName = " + name);
logger.debug(" parameters = " + parameters);
}
log.debug("Executing record management action on " + nodeRef);
log.debug(" actionName = " + name);
log.debug(" parameters = " + parameters);
RecordsManagementAction rmAction = this.rmActions.get(name);
if (rmAction == null)
{
String msg = I18NUtil.getMessage(MSG_NOT_DEFINED, name);
if (logger.isWarnEnabled())
{
logger.warn(msg);
}
log.warn(msg);
throw new AlfrescoRuntimeException(msg);
}
if (retentionActions.contains(name.toLowerCase()) && freezeService.isFrozenOrHasFrozenChildren(nodeRef))
{
String msg = I18NUtil.getMessage(MSG_NODE_FROZEN, name);
log.debug(msg);
throw new AlfrescoRuntimeException(msg);
}
@@ -307,10 +331,7 @@ public class RecordsManagementActionServiceImpl implements RecordsManagementActi
if (implicitTargetNode == null)
{
String msg = I18NUtil.getMessage(MSG_NO_IMPLICIT_NODEREF, name);
if (logger.isWarnEnabled())
{
logger.warn(msg);
}
log.warn(msg);
throw new AlfrescoRuntimeException(msg);
}
else

View File

@@ -306,7 +306,7 @@ public class RMAfterInvocationProvider extends RMSecurityCommon
}
}
private boolean isUnfiltered(NodeRef nodeRef)
protected boolean isUnfiltered(NodeRef nodeRef)
{
return !nodeService.hasAspect(nodeRef, RecordsManagementModel.ASPECT_FILE_PLAN_COMPONENT);

View File

@@ -45,7 +45,6 @@ import org.alfresco.module.org_alfresco_module_rm.disposition.property.Dispositi
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEvent;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
@@ -59,7 +58,6 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport.TxnReadState;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
@@ -117,9 +115,6 @@ public class DispositionServiceImpl extends ServiceBaseImpl
/** Record Service */
private RecordService recordService;
/** Freeze Service */
private FreezeService freezeService;
/** Transaction service */
private TransactionService transactionService;
@@ -192,14 +187,6 @@ public class DispositionServiceImpl extends ServiceBaseImpl
this.recordService = recordService;
}
/**
* @param freezeService freeze service
*/
public void setFreezeService(FreezeService freezeService)
{
this.freezeService = freezeService;
}
/**
* @param transactionService transaction service
*/
@@ -1191,7 +1178,7 @@ public class DispositionServiceImpl extends ServiceBaseImpl
if (FilePlanComponentKind.RECORD_FOLDER.equals(filePlanService.getFilePlanComponentKind(nodeRef)) ||
FilePlanComponentKind.RECORD.equals(filePlanService.getFilePlanComponentKind(nodeRef)))
{
if (!isDisposableItemCutoff(nodeRef) && !isFrozenOrHasFrozenChildren(nodeRef))
if (!isDisposableItemCutoff(nodeRef))
{
if (recordFolderService.isRecordFolder(nodeRef))
{
@@ -1283,32 +1270,6 @@ public class DispositionServiceImpl extends ServiceBaseImpl
}
}
/**
* Helper method to determine if a node is frozen or has frozen children
*
* @param nodeRef Node to be checked
* @return <code>true</code> if the node is frozen or has frozen children, <code>false</code> otherwise
*/
private boolean isFrozenOrHasFrozenChildren(NodeRef nodeRef)
{
boolean result = false;
if (recordFolderService.isRecordFolder(nodeRef))
{
result = freezeService.isFrozen(nodeRef) || freezeService.hasFrozenChildren(nodeRef);
}
else if (recordService.isRecord(nodeRef))
{
result = freezeService.isFrozen(nodeRef);
}
else
{
throw new AlfrescoRuntimeException("The nodeRef '" + nodeRef + "' is neither a record nor a record folder.");
}
return result;
}
/**
* Helper method to apply the cut off
*

View File

@@ -150,4 +150,12 @@ public interface FreezeService
*/
@Deprecated
Set<NodeRef> getHolds(NodeRef filePlan);
/**
* Check given node or its children are frozen
* The node should be record or record folder for retention schedule
*
* @param nodeRef
*/
boolean isFrozenOrHasFrozenChildren(NodeRef nodeRef);
}

View File

@@ -43,6 +43,8 @@ import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
import org.alfresco.module.org_alfresco_module_rm.hold.HoldService;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
import org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
@@ -75,6 +77,32 @@ public class FreezeServiceImpl extends ServiceBaseImpl
/** Hold service */
private HoldService holdService;
/**
* Record Folder Service
*/
private RecordFolderService recordFolderService;
/**
* Record Service
*/
private RecordService recordService;
/**
* @param recordFolderService record folder service
*/
public void setRecordFolderService(RecordFolderService recordFolderService)
{
this.recordFolderService = recordFolderService;
}
/**
* @param recordService record service
*/
public void setRecordService(RecordService recordService)
{
this.recordService = recordService;
}
/**
* @return File plan service
*/
@@ -392,4 +420,24 @@ public class FreezeServiceImpl extends ServiceBaseImpl
// create hold
return getHoldService().createHold(filePlan, holdName, reason, null);
}
/**
* Helper method to determine if a node is frozen or has frozen children
*
* @param nodeRef Node to be checked
* @return <code>true</code> if the node is frozen or has frozen children, <code>false</code> otherwise
*/
@Override
public boolean isFrozenOrHasFrozenChildren(NodeRef nodeRef)
{
if (recordFolderService.isRecordFolder(nodeRef))
{
return isFrozen(nodeRef) || hasFrozenChildren(nodeRef);
}
else if (recordService.isRecord(nodeRef))
{
return isFrozen(nodeRef);
}
return Boolean.FALSE;
}
}

View File

@@ -27,15 +27,17 @@
package org.alfresco.module.org_alfresco_module_rm.job;
import static org.alfresco.module.org_alfresco_module_rm.action.RMDispositionActionExecuterAbstractBase.PARAM_NO_ERROR_CHECK;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.action.RMDispositionActionExecuterAbstractBase;
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementActionService;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -45,8 +47,8 @@ import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.SearchParameters;
import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.PersonService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* The Disposition Lifecycle Job Finds all disposition action nodes which are for disposition actions specified Where
@@ -55,14 +57,14 @@ import org.apache.commons.logging.LogFactory;
* @author mrogers
* @author Roy Wetherall
*/
@Slf4j
public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecuter
{
/** logger */
private static Log logger = LogFactory.getLog(DispositionLifecycleJobExecuter.class);
/** batching properties */
private int batchSize;
public static final int DEFAULT_BATCH_SIZE = 500;
private static final String MSG_NODE_FROZEN = "rm.action.node.frozen.error-message";
/** list of disposition actions to automatically execute */
private List<String> dispositionActions;
@@ -82,6 +84,17 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
/** person service */
private PersonService personService;
/** freeze service */
private FreezeService freezeService;
/**
* @param freezeService freeze service
*/
public void setFreezeService(FreezeService freezeService)
{
this.freezeService = freezeService;
}
/**
* List of disposition actions to automatically execute when eligible.
*
@@ -166,66 +179,59 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
/**
* @see org.alfresco.module.org_alfresco_module_rm.job.RecordsManagementJobExecuter#execute()
*/
@Override
public void executeImpl()
{
try
{
logger.debug("Job Starting");
log.debug("Job Starting");
if (dispositionActions != null && !dispositionActions.isEmpty())
if (dispositionActions == null || dispositionActions.isEmpty())
{
boolean hasMore = true;
int skipCount = 0;
log.debug("Job Finished as disposition action is empty");
return;
}
if (batchSize < 1)
boolean hasMore = true;
int skipCount = 0;
if (batchSize < 1)
{
log.debug("Invalid value for batch size: " + batchSize + " default value used instead.");
batchSize = DEFAULT_BATCH_SIZE;
}
log.trace("Using batch size of " + batchSize);
while (hasMore)
{
SearchParameters params = new SearchParameters();
params.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
params.setLanguage(SearchService.LANGUAGE_FTS_ALFRESCO);
params.setQuery(getQuery());
params.setSkipCount(skipCount);
params.setMaxItems(batchSize);
// execute search
ResultSet results = searchService.query(params);
List<NodeRef> resultNodes = results.getNodeRefs();
hasMore = results.hasMore();
skipCount += resultNodes.size(); // increase by page size
results.close();
log.debug("Processing " + resultNodes.size() + " nodes");
// process search results
if (!resultNodes.isEmpty())
{
if (logger.isDebugEnabled())
{
logger.debug("Invalid value for batch size: " + batchSize + " default value used instead.");
}
batchSize = DEFAULT_BATCH_SIZE;
}
if (logger.isTraceEnabled())
{
logger.trace("Using batch size of " + batchSize);
}
while (hasMore)
{
SearchParameters params = new SearchParameters();
params.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
params.setLanguage(SearchService.LANGUAGE_FTS_ALFRESCO);
params.setQuery(getQuery());
params.setSkipCount(skipCount);
params.setMaxItems(batchSize);
// execute search
ResultSet results = searchService.query(params);
List<NodeRef> resultNodes = results.getNodeRefs();
hasMore = results.hasMore();
skipCount += resultNodes.size(); // increase by page size
results.close();
if (logger.isDebugEnabled())
{
logger.debug("Processing " + resultNodes.size() + " nodes");
}
// process search results
if (!resultNodes.isEmpty())
{
executeAction(resultNodes);
}
executeAction(resultNodes);
}
}
logger.debug("Job Finished");
log.debug("Job Finished");
}
catch (AlfrescoRuntimeException exception)
{
if (logger.isDebugEnabled())
{
logger.debug(exception);
}
log.debug(exception.getMessage());
}
}
@@ -239,40 +245,45 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
RetryingTransactionCallback<Boolean> processTranCB = () -> {
for (NodeRef actionNode : actionNodes)
{
if (nodeService.exists(actionNode))
if (!nodeService.exists(actionNode))
{
final String dispAction = (String) nodeService
.getProperty(actionNode, RecordsManagementModel.PROP_DISPOSITION_ACTION);
continue;
}
// Run disposition action
if (dispAction != null && dispositionActions.contains(dispAction))
{
ChildAssociationRef parent = nodeService.getPrimaryParent(actionNode);
if (parent.getTypeQName().equals(RecordsManagementModel.ASSOC_NEXT_DISPOSITION_ACTION))
{
Map<String, Serializable> props = new HashMap<>(1);
props.put(RMDispositionActionExecuterAbstractBase.PARAM_NO_ERROR_CHECK, Boolean.FALSE);
final String dispAction = (String) nodeService.getProperty(actionNode, PROP_DISPOSITION_ACTION);
try
{
// execute disposition action
recordsManagementActionService
.executeRecordsManagementAction(parent.getParentRef(), dispAction, props);
// Run disposition action
if (dispAction == null || !dispositionActions.contains(dispAction))
{
continue;
}
ChildAssociationRef parent = nodeService.getPrimaryParent(actionNode);
if (!parent.getTypeQName().equals(ASSOC_NEXT_DISPOSITION_ACTION))
{
continue;
}
Map<String, Serializable> props = Map.of(PARAM_NO_ERROR_CHECK, false);
if (freezeService.isFrozenOrHasFrozenChildren(parent.getParentRef()))
{
log.debug(I18NUtil.getMessage(MSG_NODE_FROZEN, dispAction));
continue;
}
try
{
// execute disposition action
recordsManagementActionService
.executeRecordsManagementAction(parent.getParentRef(), dispAction, props);
log.debug("Processed action: " + dispAction + "on" + parent);
}
catch (AlfrescoRuntimeException exception)
{
log.debug(exception.getMessage());
if (logger.isDebugEnabled())
{
logger.debug("Processed action: " + dispAction + "on" + parent);
}
}
catch (AlfrescoRuntimeException exception)
{
if (logger.isDebugEnabled())
{
logger.debug(exception);
}
}
}
}
}
}
return Boolean.TRUE;

View File

@@ -69,15 +69,9 @@ public abstract class RecordsManagementJobExecuter implements RecordsManagementM
// jobs not allowed to execute unless bootstrap is complete
if (!repositoryState.isBootstrapping())
{
retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Void>()
{
@Override
public Void execute()
{
executeImpl();
return null;
}
retryingTransactionHelper.doInTransaction((RetryingTransactionCallback<Void>) () -> {
executeImpl();
return null;
}, false, true);
}
}

View File

@@ -30,6 +30,10 @@ package org.alfresco.module.org_alfresco_module_rm.model.behaviour;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
import org.alfresco.module.org_alfresco_module_rm.model.BaseBehaviourBean;
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
@@ -52,7 +56,13 @@ public abstract class AbstractDisposableItem extends BaseBehaviourBean
/** disposition service */
protected DispositionService dispositionService;
/** record service */
protected RecordService recordService;
/** record folder service */
protected RecordFolderService recordFolderService;
/**
* @param dispositionService disposition service
*/
@@ -60,6 +70,22 @@ public abstract class AbstractDisposableItem extends BaseBehaviourBean
{
this.dispositionService = dispositionService;
}
/**
* @param recordService record service
*/
public void setRecordService(RecordService recordService)
{
this.recordService = recordService;
}
/**
* @param recordFolderService record folder service
*/
public void setRecordFolderService(RecordFolderService recordFolderService)
{
this.recordFolderService = recordFolderService;
}
/**
* Removes unwanted aspects
@@ -86,4 +112,35 @@ public abstract class AbstractDisposableItem extends BaseBehaviourBean
}
}
/**
* Cleans and re-initiates the containing records
*
* @param childAssociationRef
*/
protected void reinitializeRecordFolder(ChildAssociationRef childAssociationRef)
{
NodeRef newNodeRef = childAssociationRef.getChildRef();
AuthenticationUtil.runAs(() -> {
// clean record folder
cleanDisposableItem(nodeService, newNodeRef);
// re-initialise the record folder
recordFolderService.setupRecordFolder(newNodeRef);
// sort out the child records
for (NodeRef record : recordService.getRecords(newNodeRef))
{
// clean record
cleanDisposableItem(nodeService, record);
// Re-initiate the records in the new folder.
recordService.file(record);
}
return null;
}, AuthenticationUtil.getSystemUserName());
}
}

View File

@@ -27,13 +27,14 @@
package org.alfresco.module.org_alfresco_module_rm.model.rma.type;
import static org.alfresco.model.ContentModel.TYPE_CONTENT;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.model.BaseBehaviourBean;
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
import org.alfresco.module.org_alfresco_module_rm.model.behaviour.AbstractDisposableItem;
import org.alfresco.module.org_alfresco_module_rm.security.FilePlanPermissionService;
import org.alfresco.module.org_alfresco_module_rm.vital.VitalRecordService;
import org.alfresco.repo.copy.CopyBehaviourCallback;
@@ -49,6 +50,7 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern;
/**
* rma:recordCategory behaviour bean
@@ -60,9 +62,10 @@ import org.alfresco.service.namespace.QName;
(
defaultType = "rma:recordCategory"
)
public class RecordCategoryType extends BaseBehaviourBean
public class RecordCategoryType extends AbstractDisposableItem
implements NodeServicePolicies.OnCreateChildAssociationPolicy,
NodeServicePolicies.OnCreateNodePolicy
NodeServicePolicies.OnCreateNodePolicy,
NodeServicePolicies.OnMoveNodePolicy
{
private final static List<QName> ACCEPTED_UNIQUE_CHILD_TYPES = new ArrayList<>();
private final static List<QName> ACCEPTED_NON_UNIQUE_CHILD_TYPES = Arrays.asList(TYPE_RECORD_CATEGORY, TYPE_RECORD_FOLDER);
@@ -73,9 +76,6 @@ public class RecordCategoryType extends BaseBehaviourBean
/** file plan permission service */
protected FilePlanPermissionService filePlanPermissionService;
/** record folder service */
private RecordFolderService recordFolderService;
/**
* @param vitalRecordService vital record service
*/
@@ -92,14 +92,6 @@ public class RecordCategoryType extends BaseBehaviourBean
this.filePlanPermissionService = filePlanPermissionService;
}
/**
* @param recordFolderService record folder service
*/
public void setRecordFolderService(RecordFolderService recordFolderService)
{
this.recordFolderService = recordFolderService;
}
/**
* On every event
*
@@ -204,6 +196,53 @@ public class RecordCategoryType extends BaseBehaviourBean
}
/**
* Record Category move behaviour
*
* @see org.alfresco.repo.node.NodeServicePolicies.OnMoveNodePolicy#onMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef, org.alfresco.service.cmr.repository.ChildAssociationRef)
*/
@Override
@Behaviour
(
kind = BehaviourKind.CLASS,
notificationFrequency = NotificationFrequency.FIRST_EVENT
)
public void onMoveNode(ChildAssociationRef oldChildAssocRef, ChildAssociationRef newChildAssocRef)
{
// clean the child folders and records only if the old parent category has a disposition schedule set
// if it doesn't, then there are no old properties on the child nodes that have to be cleaned in order
// for new ones to be set
if (nodeService.getType(newChildAssocRef.getChildRef()).equals(TYPE_RECORD_CATEGORY)
&& dispositionService.getDispositionSchedule(oldChildAssocRef.getParentRef()) != null)
{
reinitializeRecordFolders(newChildAssocRef);
}
}
/**
* Recursively reinitialize each folder in a structure of categories
* Unwanted aspects will be removed from the child records and the records will be re-filed
* Disposition schedule aspects and properties will be inherited from the new parent category
*
* @param childAssociationRef
*/
private void reinitializeRecordFolders(ChildAssociationRef childAssociationRef)
{
for (ChildAssociationRef newChildRef : nodeService.getChildAssocs(childAssociationRef.getChildRef(),
ContentModel.ASSOC_CONTAINS,
RegexQNamePattern.MATCH_ALL))
{
if (nodeService.getType(newChildRef.getChildRef()).equals(TYPE_RECORD_CATEGORY))
{
reinitializeRecordFolders(newChildRef);
}
else if (!nodeService.getType(newChildRef.getChildRef()).equals(TYPE_CONTENT))
{
reinitializeRecordFolder(newChildRef);
}
}
}
/**
* Copy callback for record category
*/

View File

@@ -34,8 +34,6 @@ import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.identifier.IdentifierService;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.module.org_alfresco_module_rm.model.behaviour.AbstractDisposableItem;
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
import org.alfresco.module.org_alfresco_module_rm.vital.VitalRecordService;
import org.alfresco.repo.copy.CopyBehaviourCallback;
import org.alfresco.repo.copy.CopyDetails;
@@ -68,11 +66,6 @@ public class RecordFolderType extends AbstractDisposableItem
implements NodeServicePolicies.OnMoveNodePolicy,
NodeServicePolicies.OnCreateChildAssociationPolicy
{
/** record service */
private RecordService recordService;
/** record folder service */
private RecordFolderService recordFolderService;
/** vital record service */
protected VitalRecordService vitalRecordService;
@@ -85,22 +78,6 @@ public class RecordFolderType extends AbstractDisposableItem
private static final String MSG_CANNOT_CREATE_CHILDREN_IN_CLOSED_RECORD_FOLDER = "rm.service.add-children-to-closed-record-folder";
/**
* @param recordService record service
*/
public void setRecordService(RecordService recordService)
{
this.recordService = recordService;
}
/**
* @param recordFolderService record folder service
*/
public void setRecordFolderService(RecordFolderService recordFolderService)
{
this.recordFolderService = recordFolderService;
}
/**
* @param vitalRecordService vital record service
*/
@@ -131,31 +108,7 @@ public class RecordFolderType extends AbstractDisposableItem
{
if (!oldChildAssocRef.getParentRef().equals(newChildAssocRef.getParentRef()))
{
final NodeRef newNodeRef = newChildAssocRef.getChildRef();
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
{
public Object doWork()
{
// clean record folder
cleanDisposableItem(nodeService, newNodeRef);
// re-initialise the record folder
recordFolderService.setupRecordFolder(newNodeRef);
// sort out the child records
for (NodeRef record : recordService.getRecords(newNodeRef))
{
// clean record
cleanDisposableItem(nodeService, record);
// Re-initiate the records in the new folder.
recordService.file(record);
}
return null;
}
}, AuthenticationUtil.getSystemUserName());
reinitializeRecordFolder(newChildAssocRef);
}
}
else

View File

@@ -140,9 +140,8 @@ public class CustomPropertyDefinitionPost extends BaseCustomPropertyWebScript
for (Iterator iter = json.keys(); iter.hasNext(); )
{
String nextKeyString = (String)iter.next();
String nextValueString = json.getString(nextKeyString);
params.put(nextKeyString, nextValueString);
Serializable nextValue = (Serializable) json.get(nextKeyString);
params.put(nextKeyString, nextValue);
}
return params;

View File

@@ -28,6 +28,8 @@ package org.alfresco.module.org_alfresco_module_rm.test.integration.disposition;
import static org.alfresco.module.org_alfresco_module_rm.test.util.CommonRMTestUtils.DEFAULT_DISPOSITION_DESCRIPTION;
import static org.alfresco.module.org_alfresco_module_rm.test.util.CommonRMTestUtils.DEFAULT_DISPOSITION_INSTRUCTIONS;
import static org.alfresco.module.org_alfresco_module_rm.test.util.CommonRMTestUtils.DEFAULT_EVENT_NAME;
import static org.alfresco.module.org_alfresco_module_rm.test.util.CommonRMTestUtils.SEPARATION_EVENT_NAME;
import static org.alfresco.util.GUID.generate;
import java.io.Serializable;
@@ -37,6 +39,7 @@ import java.util.List;
import java.util.Map;
import org.alfresco.module.org_alfresco_module_rm.action.impl.CutOffAction;
import org.alfresco.module.org_alfresco_module_rm.action.impl.DestroyAction;
import org.alfresco.module.org_alfresco_module_rm.action.impl.RetainAction;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
@@ -190,6 +193,162 @@ public class DispositionScheduleInheritanceTest extends BaseRMTestCase
});
}
/**
* Given a root record category A with a retention schedule set to retain and destroy after 1 day
* and another root record category B with a retention schedule set to cut off and destroy after 1 day containing a
* subcategory
* When moving the subcategory into the first root category
* Then records under the subcategory inherit the retention schedule of the parent record category
* The events list contain the retain event step inherited from the new parent category
* <p>
* Please see https://alfresco.atlassian.net/browse/APPS-1004
*/
public void testRetentionScheduleInheritance_APPS_1004()
{
doBehaviourDrivenTest(new BehaviourDrivenTest()
{
NodeRef category1;
NodeRef subcategory2;
NodeRef record;
Date asOfDateBeforeMove;
@Override
public void given()
{
// create root category1
category1 = filePlanService.createRecordCategory(filePlan, generate());
// create record level disposition schedule for category1
createDispositionScheduleRetainAndCutOffOneDay(category1);
// create root category2
NodeRef category2 = filePlanService.createRecordCategory(filePlan, generate());
// create record level disposition schedule for category2
createDispositionScheduleCutOffAndDestroyOneDay(category2);
// create subcategory2 under category2
subcategory2 = filePlanService.createRecordCategory(category2, generate());
// create folder under subcategory2
folder = recordFolderService.createRecordFolder(subcategory2, generate());
// file record in folder and complete it
record = utils.createRecord(folder, generate(), generate());
utils.completeRecord(record);
//store the date to check if it was updated
asOfDateBeforeMove = dispositionService.getNextDispositionAction(record).getAsOfDate();
}
@Override
public void when() throws Exception
{
// move subcategory2 under category1
fileFolderService.move(subcategory2, category1, null);
}
@Override
public void then() throws Exception
{
dispositionService.getDispositionSchedule(record);
// check the next disposition action
DispositionAction dispositionActionAfterMove = dispositionService.getNextDispositionAction(record);
assertNotNull(dispositionActionAfterMove);
assertEquals(RetainAction.NAME, dispositionActionAfterMove.getName());
assertNotNull(dispositionActionAfterMove.getAsOfDate());
assertTrue(dispositionActionAfterMove.getAsOfDate().after(asOfDateBeforeMove));
// check the search aspect details
assertTrue(nodeService.hasAspect(record, ASPECT_RM_SEARCH));
assertEquals(RetainAction.NAME, nodeService.getProperty(record, PROP_RS_DISPOSITION_ACTION_NAME));
assertNotNull(nodeService.getProperty(record, PROP_RS_DISPOSITION_ACTION_AS_OF));
assertNull((List<String>) nodeService.getProperty(record, PROP_RS_DISPOSITION_EVENTS));
assertNotNull(nodeService.getProperty(record, PROP_RS_DISPOITION_INSTRUCTIONS));
assertNotNull(nodeService.getProperty(record, PROP_RS_DISPOITION_AUTHORITY));
assertTrue((Boolean) nodeService.getProperty(record, PROP_RS_HAS_DISPOITION_SCHEDULE));
}
});
}
/**
* Given a root record category A with a retention schedule set to cut off on event 'case closed'
* and another root record category B with a retention schedule set to cut off on event 'separation'
* When moving the subcategory into the first root category
* Then records under the subcategory inherit the retention schedule of the parent record category
* The events list contain the case closed event step inherited from the new parent category
* <p>
* Please see https://alfresco.atlassian.net/browse/APPS-1005
*/
public void testRetentionScheduleInheritance_APPS_1005()
{
doBehaviourDrivenTest(new BehaviourDrivenTest()
{
NodeRef category1;
NodeRef subcategory2;
NodeRef record;
Date asOfDateBeforeMove;
@Override
public void given()
{
// create root category1
category1 = filePlanService.createRecordCategory(filePlan, generate());
utils.createDispositionSchedule(category1, DEFAULT_DISPOSITION_INSTRUCTIONS,
DEFAULT_DISPOSITION_DESCRIPTION, true, true, false, DEFAULT_EVENT_NAME);
// create root category2
NodeRef category2 = filePlanService.createRecordCategory(filePlan, generate());
// create record level disposition schedule for category2
utils.createDispositionSchedule(category2, DEFAULT_DISPOSITION_INSTRUCTIONS,
DEFAULT_DISPOSITION_DESCRIPTION, true, true, false, SEPARATION_EVENT_NAME);
// create subcategory2 under category2
subcategory2 = filePlanService.createRecordCategory(category2, generate());
// create folder under subcategory2
folder = recordFolderService.createRecordFolder(subcategory2, generate());
// file record in folder and complete it
record = utils.createRecord(folder, generate(), generate());
utils.completeRecord(record);
//store the date to check if it was updated
asOfDateBeforeMove = dispositionService.getNextDispositionAction(record).getAsOfDate();
}
@Override
public void when() throws Exception
{
// move subcategory2 under category1
fileFolderService.move(subcategory2, category1, null);
}
@Override
public void then() throws Exception
{
// check the next disposition action
DispositionAction dispositionActionAfterMove = dispositionService.getNextDispositionAction(record);
assertNotNull(dispositionActionAfterMove);
assertEquals(CutOffAction.NAME, dispositionActionAfterMove.getName());
// check the search aspect details
assertTrue(nodeService.hasAspect(record, ASPECT_RM_SEARCH));
assertEquals(CutOffAction.NAME, nodeService.getProperty(record, PROP_RS_DISPOSITION_ACTION_NAME));
assertNotNull((List<String>) nodeService.getProperty(record, PROP_RS_DISPOSITION_EVENTS));
assertEquals(((List<String>) ((List<String>) nodeService.getProperty(record,
PROP_RS_DISPOSITION_EVENTS))).size(), 1);
assertEquals(DEFAULT_EVENT_NAME, ((List<String>) ((List<String>) nodeService.getProperty(record,
PROP_RS_DISPOSITION_EVENTS))).get(0));
assertNotNull(nodeService.getProperty(record, PROP_RS_DISPOITION_INSTRUCTIONS));
assertNotNull(nodeService.getProperty(record, PROP_RS_DISPOITION_AUTHORITY));
assertTrue((Boolean) nodeService.getProperty(record, PROP_RS_HAS_DISPOITION_SCHEDULE));
}
});
}
private void createDispositionScheduleCutOff(NodeRef category, String action, String period)
{
DispositionSchedule ds = utils.createDispositionSchedule(category, DEFAULT_DISPOSITION_INSTRUCTIONS, DEFAULT_DISPOSITION_DESCRIPTION, true, false, false);
@@ -205,6 +364,22 @@ public class DispositionScheduleInheritanceTest extends BaseRMTestCase
createDispositionScheduleStep(ds, RetainAction.NAME, CommonRMTestUtils.PERIOD_IMMEDIATELY);
}
private void createDispositionScheduleRetainAndCutOffOneDay(NodeRef category)
{
DispositionSchedule ds = utils.createDispositionSchedule(category, DEFAULT_DISPOSITION_INSTRUCTIONS, DEFAULT_DISPOSITION_DESCRIPTION, true, false, false);
createDispositionScheduleStep(ds, RetainAction.NAME, CommonRMTestUtils.PERIOD_ONE_DAY);
createDispositionScheduleStep(ds, DestroyAction.NAME, CommonRMTestUtils.PERIOD_ONE_DAY);
}
private void createDispositionScheduleCutOffAndDestroyOneDay(NodeRef category)
{
DispositionSchedule ds = utils.createDispositionSchedule(category, DEFAULT_DISPOSITION_INSTRUCTIONS, DEFAULT_DISPOSITION_DESCRIPTION, true, false, false);
createDispositionScheduleStep(ds, CutOffAction.NAME, CommonRMTestUtils.PERIOD_ONE_DAY);
createDispositionScheduleStep(ds, DestroyAction.NAME, CommonRMTestUtils.PERIOD_ONE_DAY);
}
private void createDispositionScheduleStep(DispositionSchedule ds, String action, String period)
{
Map<QName, Serializable> step = new HashMap<QName, Serializable>(3);

View File

@@ -0,0 +1,171 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.module.org_alfresco_module_rm.test.legacy.action;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.action.dm.ExecuteScriptAction;
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
/**
* RM Action Execute Script Unit test
*
* @author Eva Vasques
*/
public class ExecuteScriptActionTest extends BaseRMTestCase
{
@Override
protected boolean isCollaborationSiteTest()
{
return true;
}
public void testExecuteScript()
{
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
String fileOriginalName = (String) nodeService.getProperty(dmDocument, ContentModel.PROP_NAME);
// Valid Script
NodeRef validScriptRef = addTempScript("valid-rm-script.js",
"document.properties.name = \"Valid_\" + document.properties.name;\ndocument.save();");
// Invalid Script
NodeRef invalidScriptRef = addTempScript("invalid-rm-script.js",
"document.properties.name = \"Invalid_\" + document.properties.name;\ndocument.save();", dmFolder);
// Attempt to execute a script not in RM Scripts folder should fail
doTestInTransaction(new FailureTest("Script outside proper Data Dictionary folder should not be executed",
IllegalStateException.class)
{
public void run() throws Exception
{
executeAction(invalidScriptRef, dmDocument);
}
}, dmCollaborator);
// Scripts in correct data dictionary folder should be executed
doTestInTransaction(new Test<Void>()
{
@Override
public Void run() throws Exception
{
executeAction(validScriptRef, dmDocument);
return null;
}
@Override
public void test(Void result) throws Exception
{
// Assert the script was executed and the document was renamed
String currentName = (String) nodeService.getProperty(dmDocument, ContentModel.PROP_NAME);
assertEquals(currentName, "Valid_" + fileOriginalName);
}
}, dmCollaborator);
retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Void>()
{
public Void execute() throws Throwable
{
// Set the name back to what it was
nodeService.setProperty(dmDocument, ContentModel.PROP_NAME, fileOriginalName);
return null;
}
});
}
private NodeRef addTempScript(final String scriptFileName, final String javaScript, final NodeRef parentRef)
{
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<NodeRef>()
{
public NodeRef execute() throws Throwable
{
NodeRef script = nodeService.getChildByName(parentRef, ContentModel.ASSOC_CONTAINS, scriptFileName);
if (script == null)
{
// Create the script node reference
script = nodeService.createNode(parentRef, ContentModel.ASSOC_CONTAINS,
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, scriptFileName), ContentModel.TYPE_CONTENT)
.getChildRef();
nodeService.setProperty(script, ContentModel.PROP_NAME, scriptFileName);
ContentWriter contentWriter = contentService.getWriter(script, ContentModel.PROP_CONTENT, true);
contentWriter.setMimetype(MimetypeMap.MIMETYPE_JAVASCRIPT);
contentWriter.setEncoding("UTF-8");
contentWriter.putContent(javaScript);
}
return script;
}
});
}
private NodeRef addTempScript(final String scriptFileName, final String javaScript)
{
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<NodeRef>()
{
public NodeRef execute() throws Throwable
{
// get the company_home
NodeRef companyHomeRef = repositoryHelper.getCompanyHome();
// get the Data Dictionary
NodeRef dataDictionaryRef = nodeService.getChildByName(companyHomeRef, ContentModel.ASSOC_CONTAINS,
"Data Dictionary");
// get the Scripts Folder
NodeRef rmFolder = nodeService.getChildByName(dataDictionaryRef, ContentModel.ASSOC_CONTAINS,
"Records Management");
NodeRef scriptsRef = nodeService.getChildByName(rmFolder, ContentModel.ASSOC_CONTAINS,
"Records Management Scripts");
return addTempScript(scriptFileName, javaScript, scriptsRef);
}
});
}
private void executeAction(NodeRef scriptRef, NodeRef nodeRef)
{
Action action = actionService.createAction("rmscript");
action.setParameterValue(ExecuteScriptAction.PARAM_SCRIPTREF, scriptRef);
actionService.executeAction(action, nodeRef);
}
}

View File

@@ -53,7 +53,7 @@ public class FreezeServiceImplTest extends BaseRMTestCase
/**
* Test freeze service methods.
*
*
* @deprecated as of 2.2
*/
public void testFreezeService() throws Exception
@@ -219,7 +219,7 @@ public class FreezeServiceImplTest extends BaseRMTestCase
// hold is not automatically removed
holdAssocs = holdService.getHolds(filePlan);
assertEquals(1, holdAssocs.size());
// delete hold
holdService.deleteHold(holdNodeRef);
@@ -265,8 +265,38 @@ public class FreezeServiceImplTest extends BaseRMTestCase
assertFalse(freezeService.isFrozen(recordFour));
// assertFalse(freezeService.hasFrozenChildren(rmFolder));
return null;
}
});
}
return null;
}
});
doTestInTransaction(new Test<Void>()
{
@Override
public Void run() throws Exception
{
NodeRef hold101 = holdService.createHold(filePlan, "freezename 103", "FreezeReason", null);
// Freeze a record folder
assertNotNull(hold101);
holdService.addToHold(hold101, rmFolder);
assertTrue(recordFolderService.isRecordFolder(rmFolder));
assertTrue(freezeService.isFrozenOrHasFrozenChildren(rmFolder));
return null;
}
});
doTestInTransaction(new Test<Void>()
{
@Override
public Void run() throws Exception
{
NodeRef hold101 = holdService.createHold(filePlan, "freezename 104", "FreezeReason", null);
// Freeze a record inside a record folder
assertNotNull(hold101);
holdService.addToHold(hold101, recordThree);
assertTrue(recordService.isRecord(recordThree));
assertTrue(freezeService.isFrozenOrHasFrozenChildren(rmFolder));
return null;
}
});
}
}

View File

@@ -59,6 +59,7 @@ import org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityServi
import org.alfresco.module.org_alfresco_module_rm.security.FilePlanPermissionService;
import org.alfresco.module.org_alfresco_module_rm.util.RMContainerCacheManager;
import org.alfresco.module.org_alfresco_module_rm.vital.VitalRecordService;
import org.alfresco.repo.model.Repository;
import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.repo.policy.PolicyComponent;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
@@ -150,6 +151,7 @@ public abstract class BaseRMTestCase extends RetryingTransactionHelperTestCase
protected OwnableService ownableService;
protected VersionService versionService;
protected DocumentLinkService documentLinkService;
protected Repository repositoryHelper;
/** RM Services */
protected DispositionService dispositionService;
@@ -405,6 +407,7 @@ public abstract class BaseRMTestCase extends RetryingTransactionHelperTestCase
ownableService = (OwnableService)applicationContext.getBean("OwnableService");
versionService = (VersionService)applicationContext.getBean("VersionService");
documentLinkService = (DocumentLinkService)applicationContext.getBean("DocumentLinkService");
repositoryHelper = (Repository)applicationContext.getBean("repositoryHelper");
// Get RM services
dispositionService = (DispositionService)applicationContext.getBean("DispositionService");

View File

@@ -82,8 +82,10 @@ public class CommonRMTestUtils implements RecordsManagementModel
public static final String DEFAULT_DISPOSITION_INSTRUCTIONS = "disposition instructions";
public static final String DEFAULT_DISPOSITION_DESCRIPTION = "disposition action description";
public static final String DEFAULT_EVENT_NAME = "case_closed";
public static final String SEPARATION_EVENT_NAME = "separation";
public static final String PERIOD_NONE = "none|0";
public static final String PERIOD_IMMEDIATELY = "immediately|0";
public static final String PERIOD_ONE_DAY = "day|1";
public static final String PERIOD_FIVE_DAYS = "day|5";
public static final String PERIOD_TEN_DAYS = "day|10";
public static final String PERIOD_ONE_WEEK = "week|1";

View File

@@ -27,8 +27,9 @@
package org.alfresco.module.org_alfresco_module_rm.action.dm;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -352,7 +353,7 @@ public class DeclareAsVersionRecordActionUnitTest extends BaseActionUnitTest
private void setupMockedAspects()
{
doReturn(true).when(mockedNodeService).exists(actionedUponNodeRef);
doReturn(true).when(mockedDictionaryService).isSubClass(any(QName.class), eq(ContentModel.TYPE_CONTENT));
doReturn(true).when(mockedDictionaryService).isSubClass(nullable(QName.class), eq(ContentModel.TYPE_CONTENT));
doReturn(true).when(mockedNodeService).hasAspect(actionedUponNodeRef, ContentModel.ASPECT_VERSIONABLE);
doReturn(false).when(mockedNodeService).hasAspect(actionedUponNodeRef, ASPECT_RECORD);
doReturn(false).when(mockedNodeService).hasAspect(actionedUponNodeRef, ContentModel.ASPECT_WORKING_COPY);

View File

@@ -36,15 +36,13 @@ import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import java.util.Map;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.isNull;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
/**
* Unit tests for {@link AddToHoldAuditEvent}.
@@ -67,8 +65,6 @@ public class AddToHoldAuditEventUnitTest extends BaseUnitTest
@Before
public void setUp()
{
initMocks(this);
holdNodeRef = generateNodeRef();
String holdName = "Hold " + GUID.generate();
@@ -87,6 +83,6 @@ public class AddToHoldAuditEventUnitTest extends BaseUnitTest
public void testAddToHoldCausesAuditEvent()
{
addToHoldAuditEvent.onAddToHold(holdNodeRef, contentNodeRef);
verify(mockedRecordsManagementAuditService, times(1)).auditEvent(eq(contentNodeRef), any(String.class), isNull(Map.class), any(Map.class), eq(true), eq(false));
verify(mockedRecordsManagementAuditService, times(1)).auditEvent(eq(contentNodeRef), nullable(String.class), isNull(), anyMap(), eq(true), eq(false));
}
}

View File

@@ -37,15 +37,13 @@ import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import java.util.Map;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.isNull;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
/**
* Unit tests for {@link CreateHoldAuditEvent}.
@@ -68,8 +66,6 @@ public class CreateHoldAuditEventUnitTest extends BaseUnitTest
@Before
public void setUp()
{
initMocks(this);
holdNodeRef = generateNodeRef();
String holdName = "Hold " + GUID.generate();
String holdReason = "Reason " + GUID.generate();
@@ -88,6 +84,6 @@ public class CreateHoldAuditEventUnitTest extends BaseUnitTest
public void testCreateHoldCausesAuditEvent()
{
createHoldAuditEvent.onCreateNode(childAssociationRef);
verify(mockedRecordsManagementAuditService, times(1)).auditEvent(eq(holdNodeRef), any(String.class), isNull(Map.class), any(Map.class));
verify(mockedRecordsManagementAuditService, times(1)).auditEvent(eq(holdNodeRef), nullable(String.class), isNull(), anyMap());
}
}

View File

@@ -34,18 +34,15 @@ import org.alfresco.util.GUID;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Matchers;
import org.mockito.Mock;
import java.util.Map;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.isNull;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
/**
* Unit tests for {@link DeleteHoldAuditEvent}.
@@ -67,8 +64,6 @@ public class DeleteHoldAuditEventUnitTest extends BaseUnitTest
@Before
public void setUp()
{
initMocks(this);
holdNodeRef = generateNodeRef();
String holdName = "Hold " + GUID.generate();
@@ -84,6 +79,6 @@ public class DeleteHoldAuditEventUnitTest extends BaseUnitTest
{
deleteHoldAuditEvent.beforeDeleteNode(holdNodeRef);
verify(mockedRecordsManagementAuditService, times(1))
.auditEvent(eq(holdNodeRef), any(String.class), any(Map.class), isNull(Map.class), Matchers.eq(true), Matchers.eq(false));
.auditEvent(eq(holdNodeRef), nullable(String.class), anyMap(), isNull(), eq(true), eq(false));
}
}

View File

@@ -27,25 +27,24 @@
package org.alfresco.module.org_alfresco_module_rm.audit.event;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Matchers.isNull;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
import java.util.Map;
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.util.GUID;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
/**
* Unit tests for {@link RemoveFromHoldAuditEvent}.
@@ -53,6 +52,7 @@ import org.mockito.Mock;
* @author Chris Shields
* @since 3.3
*/
@RunWith(MockitoJUnitRunner.class)
public class RemoveFromHoldAuditEventUnitTest extends BaseUnitTest
{
@InjectMocks
@@ -70,16 +70,14 @@ public class RemoveFromHoldAuditEventUnitTest extends BaseUnitTest
@Before
public void setUp()
{
initMocks(this);
holdNodeRef = generateNodeRef();
String holdName = "Hold " + GUID.generate();
contentNodeRef = generateNodeRef();
String contentName = "Content " + GUID.generate();
when(mockedNodeService.getProperty(holdNodeRef, PROP_NAME)).thenReturn(holdName);
when(mockedNodeService.getProperty(contentNodeRef, PROP_NAME)).thenReturn(contentName);
lenient().when(mockedNodeService.getProperty(holdNodeRef, PROP_NAME)).thenReturn(holdName);
lenient().when(mockedNodeService.getProperty(contentNodeRef, PROP_NAME)).thenReturn(contentName);
}
/**
@@ -89,7 +87,7 @@ public class RemoveFromHoldAuditEventUnitTest extends BaseUnitTest
public void testRemoveFromHoldCausesAuditEvent()
{
removeFromHoldAuditEvent.onRemoveFromHold(holdNodeRef, contentNodeRef);
verify(mockedRecordsManagementAuditService, times(1)).auditEvent(eq(contentNodeRef), any(String.class), any(Map.class), isNull(Map.class), eq(true));
verify(mockedRecordsManagementAuditService, times(1)).auditEvent(eq(contentNodeRef), nullable(String.class), anyMap(), isNull(), eq(true));
}
}

View File

@@ -28,14 +28,14 @@
package org.alfresco.module.org_alfresco_module_rm.forms;
import static org.alfresco.module.org_alfresco_module_rm.test.util.AlfMock.generateQName;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyListOf;
import static org.mockito.Matchers.anyString;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
@@ -45,7 +45,6 @@ import java.util.Map;
import org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService;
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
import org.alfresco.repo.forms.Field;
import org.alfresco.repo.forms.FieldDefinition;
import org.alfresco.repo.forms.Form;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
@@ -81,7 +80,7 @@ public class RecordsManagementTypeFormFilterUnitTest extends BaseUnitTest
public void testAddCustomRMPropertiesNoneFound()
{
typeFormFilter.addCustomRMProperties(MY_CUSTOM_TYPE, mockForm);
verifyZeroInteractions(mockForm);
verifyNoMoreInteractions(mockForm);
}
/**
@@ -130,8 +129,8 @@ public class RecordsManagementTypeFormFilterUnitTest extends BaseUnitTest
typeFormFilter.afterGenerate(mockTypeDefinition, null, null, mockForm, null);
verify(mockedIdentifierService).generateIdentifier(any(QName.class), any(NodeRef.class));
verify(idDef).setDefaultValue(anyString());
verify(mockedIdentifierService).generateIdentifier(nullable(QName.class), nullable(NodeRef.class));
verify(idDef).setDefaultValue(nullable(String.class));
verify(vrDef).setDefaultValue(Boolean.FALSE.toString());
verify(rpDef).setDefaultValue("none|0");
}
@@ -162,7 +161,7 @@ public class RecordsManagementTypeFormFilterUnitTest extends BaseUnitTest
typeFormFilter.addCustomRMProperties(MY_CUSTOM_TYPE, mockForm);
// ensure that two custom properties have been added to the form
verify(mockForm, times(1)).addFields(anyListOf(Field.class));
verify(mockForm, times(1)).addFields(anyList());
}
/**

View File

@@ -30,16 +30,16 @@ package org.alfresco.module.org_alfresco_module_rm.job;
import static org.alfresco.module.org_alfresco_module_rm.test.util.AlfMock.generateQName;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyMap;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import java.util.Arrays;
@@ -57,7 +57,6 @@ import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.stubbing.Answer;
@@ -98,7 +97,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
return callback.execute();
};
doAnswer(doInTransactionAnswer).when(mockedRetryingTransactionHelper).doInTransaction(any(RetryingTransactionCallback.class),
Matchers.anyBoolean(), Matchers.anyBoolean());
anyBoolean(), anyBoolean());
// setup data
List<String> dispositionActions = buildList(CUTOFF, RETAIN);
@@ -141,7 +140,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
verifyQueryTimes(1);
// ensure nothing else happens becuase we have no results
verifyZeroInteractions(mockedNodeService, mockedRecordFolderService, mockedRetryingTransactionHelper);
verifyNoMoreInteractions(mockedNodeService, mockedRecordFolderService, mockedRetryingTransactionHelper);
}
/**
@@ -178,7 +177,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
// ensure work is executed in transaction for each node processed
verify(mockedNodeService, times(2)).exists(any(NodeRef.class));
verify(mockedRetryingTransactionHelper, times(2)).doInTransaction(any(RetryingTransactionCallback.class),
Matchers.anyBoolean(), Matchers.anyBoolean());
anyBoolean(), anyBoolean());
// ensure each node is process correctly
verify(mockedNodeService, times(1)).getProperty(node1, RecordsManagementModel.PROP_DISPOSITION_ACTION);
@@ -186,7 +185,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
// ensure no more interactions
verifyNoMoreInteractions(mockedNodeService);
verifyZeroInteractions(mockedRecordsManagementActionService);
verifyNoMoreInteractions(mockedRecordsManagementActionService);
}
@@ -216,7 +215,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
// ensure no more interactions
verifyNoMoreInteractions(mockedNodeService);
verifyZeroInteractions(mockedRecordsManagementActionService);
verifyNoMoreInteractions(mockedRecordsManagementActionService);
}
/**
@@ -235,6 +234,9 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
doReturn(CUTOFF).when(mockedNodeService).getProperty(node1, RecordsManagementModel.PROP_DISPOSITION_ACTION);
doReturn(RETAIN).when(mockedNodeService).getProperty(node2, RecordsManagementModel.PROP_DISPOSITION_ACTION);
doReturn(parentAssoc).when(mockedNodeService).getPrimaryParent(any(NodeRef.class));
doReturn(false).when(mockedRecordFolderService).isRecordFolder(parentAssoc.getParentRef());
doReturn(true).when(mockedRecordService).isRecord(parentAssoc.getParentRef());
doReturn(false).when(mockedFreezeService).isFrozen(parentAssoc.getParentRef());
when(mockedResultSet.getNodeRefs())
.thenReturn(buildList(node1))
@@ -255,7 +257,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
// ensure work is executed in transaction for each node processed
verify(mockedNodeService, times(2)).exists(any(NodeRef.class));
verify(mockedRetryingTransactionHelper, times(2)).doInTransaction(any(RetryingTransactionCallback.class),
Matchers.anyBoolean(), Matchers.anyBoolean());
anyBoolean(), anyBoolean());
// ensure each node is process correctly
// node1
@@ -304,7 +306,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
// mock the search service to return the right page
when(mockedSearchService.query(any(SearchParameters.class))).thenAnswer((Answer<ResultSet>) invocation -> {
SearchParameters params = invocation.getArgumentAt(0, SearchParameters.class);
SearchParameters params = invocation.getArgument(0, SearchParameters.class);
if (params.getSkipCount() == 0)
{
// mock first page

View File

@@ -27,17 +27,15 @@
package org.alfresco.module.org_alfresco_module_rm.model.rma.aspect;
import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.ASPECT_HELD_CHILDREN;
import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.ASPECT_RECORD;
import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.PROP_HELD_CHILDREN_COUNT;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyMap;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
@@ -51,24 +49,22 @@ import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.context.ApplicationContext;
import org.mockito.junit.MockitoJUnitRunner;
/**
* Test class for frozen aspect
* @author Ross Gale
* @since 3.2
*/
@RunWith(MockitoJUnitRunner.class)
public class FrozenAspectUnitTest
{
@Mock
private NodeService mockNodeService;
@Mock
private ApplicationContext mockApplicationContext;
@Mock
private ChildAssociationRef mockChildAssociationRef;
@@ -90,9 +86,6 @@ public class FrozenAspectUnitTest
@Mock
private ChildAssociationRef mockOldRef;
@Mock
private Set mockSet;
@Mock
private PropertyModificationAllowedCheck mockPropertyModificationAllowedCheck;
@@ -110,18 +103,17 @@ public class FrozenAspectUnitTest
@Before
public void setUp()
{
MockitoAnnotations.initMocks(this);
when(mockNodeService.exists(record)).thenReturn(true);
when(mockNodeService.getType(record)).thenReturn(ContentModel.TYPE_CONTENT);
when(mockedNodeTypeUtility.instanceOf(mockNodeService.getType(record), ContentModel.TYPE_CONTENT)).thenReturn(true);
when(mockNodeService.exists(content)).thenReturn(true);
when(mockNodeService.hasAspect(folder, ASPECT_HELD_CHILDREN)).thenReturn(true);
when(mockNodeService.getProperty(folder, PROP_HELD_CHILDREN_COUNT)).thenReturn(1);
when(mockApplicationContext.getBean("dbNodeService")).thenReturn(mockNodeService);
when(mockFreezeService.isFrozen(content)).thenReturn(false);
children.add(mockChildRef);
when(mockNodeService.getChildAssocs(content)).thenReturn(children);
when(mockChildRef.isPrimary()).thenReturn(true);
frozenAspect.setNodeService(mockNodeService);
}
/**
@@ -142,7 +134,6 @@ public class FrozenAspectUnitTest
@Test
public void testRemoveAspectForContent()
{
when(mockNodeService.hasAspect(content, ASPECT_RECORD)).thenReturn(false);
when(mockNodeService.getType(content)).thenReturn(ContentModel.TYPE_CONTENT);
when(mockedNodeTypeUtility.instanceOf(mockNodeService.getType(content), ContentModel.TYPE_CONTENT)).thenReturn(true);
when(mockNodeService.getPrimaryParent(content)).thenReturn(mockChildAssociationRef);
@@ -157,7 +148,6 @@ public class FrozenAspectUnitTest
@Test
public void testRemoveAspectForContentDoesntUpdateForOtherTypes()
{
when(mockNodeService.hasAspect(content, ASPECT_RECORD)).thenReturn(false);
when(mockNodeService.getType(content)).thenReturn(ContentModel.TYPE_FOLDER);
when(mockedNodeTypeUtility.instanceOf(mockNodeService.getType(content), ContentModel.TYPE_CONTENT)).thenReturn(false);
frozenAspect.onRemoveAspect(content, null);
@@ -233,7 +223,6 @@ public class FrozenAspectUnitTest
@Test(expected = PermissionDeniedException.class)
public void testBeforeMoveThrowsExceptionForFrozenNode()
{
when(mockOldRef.getParentRef()).thenReturn(parent);
when(mockOldRef.getChildRef()).thenReturn(child);
when(mockNodeService.exists(child)).thenReturn(true);
when(mockFreezeService.isFrozen(child)).thenReturn(true);
@@ -247,8 +236,6 @@ public class FrozenAspectUnitTest
public void testUpdatePropertiesThrowsExceptionForFrozenNode()
{
when(mockFreezeService.isFrozen(content)).thenReturn(true);
when(mockResourceHelper.getSet(content)).thenReturn(mockSet);
when(mockSet.contains("frozen")).thenReturn(false);
when(mockPropertyModificationAllowedCheck.check(null, null)).thenReturn(false);
frozenAspect.onUpdateProperties(content, null, null);
}

View File

@@ -33,7 +33,6 @@ import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagement
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityService;
@@ -43,14 +42,17 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
/**
* Unit tests for the {@link RecordAspect}.
*
* @author Claudia Agache
*/
@RunWith(MockitoJUnitRunner.class)
public class RecordAspectUnitTest
{
private static final NodeRef NODE_REF = new NodeRef("node://Ref/");
@@ -72,7 +74,7 @@ public class RecordAspectUnitTest
@Before
public void setUp()
{
initMocks(this);
recordAspect.setNodeService(mockNodeService);
}
/** Check that the bin is duplicated before adding the aspect if the file has a copy. */

View File

@@ -45,13 +45,15 @@ import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.util.GUID;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.junit.MockitoJUnitRunner;
/**
* @author silviudinuta
*/
@RunWith(MockitoJUnitRunner.class)
public class NonElectronicRecordTypeUnitTest implements RecordsManagementModel, ContentModel
{
private final static NodeRef CHILD_NODE_REF = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE,
@@ -74,17 +76,15 @@ public class NonElectronicRecordTypeUnitTest implements RecordsManagementModel,
@Before
public void setUp()
{
MockitoAnnotations.initMocks(this);
MockAuthenticationUtilHelper.setup(mockAuthenticationUtil);
when(mockedNodeService.exists(CHILD_NODE_REF)).thenReturn(true);
when(mockedNodeService.exists(PARENT_NODE_REF)).thenReturn(true);
ChildAssociationRef generateChildAssociationRef = mock(ChildAssociationRef.class);
when(generateChildAssociationRef.getParentRef()).thenReturn(PARENT_NODE_REF);
when(generateChildAssociationRef.getChildRef()).thenReturn(CHILD_NODE_REF);
when(mockedNodeService.getPrimaryParent(CHILD_NODE_REF)).thenReturn(generateChildAssociationRef);
when(mockedNodeService.getType(PARENT_NODE_REF)).thenReturn(TYPE_UNFILED_RECORD_FOLDER);
nonElectronicRecordType.setNodeService(mockedNodeService);
}
@Test

View File

@@ -27,6 +27,7 @@
package org.alfresco.module.org_alfresco_module_rm.script.hold;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.when;
import java.util.ArrayList;
@@ -71,8 +72,8 @@ public abstract class BaseHoldWebScriptUnitTest extends BaseWebScriptUnitTest
// generate active content
dmNodeRef = generateNodeRef(TYPE_CONTENT);
when(mockedExtendedPermissionService.hasPermission(dmNodeRef, PermissionService.WRITE)).thenReturn(AccessStatus.ALLOWED);
when(mockedDictionaryService.isSubClass(mockedNodeService.getType(dmNodeRef), ContentModel.TYPE_CONTENT)).thenReturn(true);
lenient().when(mockedExtendedPermissionService.hasPermission(dmNodeRef, PermissionService.WRITE)).thenReturn(AccessStatus.ALLOWED);
lenient().when(mockedDictionaryService.isSubClass(mockedNodeService.getType(dmNodeRef), ContentModel.TYPE_CONTENT)).thenReturn(true);
// list of active contents
activeContents = Collections.singletonList(dmNodeRef);

View File

@@ -37,9 +37,12 @@ import java.util.List;
import org.alfresco.service.cmr.repository.NodeRef;
import org.json.JSONObject;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Spy;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
/**
@@ -48,6 +51,7 @@ import org.springframework.extensions.webscripts.DeclarativeWebScript;
* @author Roy Wetherall
* @since 2.2
*/
@RunWith(MockitoJUnitRunner.class)
public class HoldPutUnitTest extends BaseHoldWebScriptWithContentUnitTest
{
/** classpath location of ftl template for web script */
@@ -77,6 +81,12 @@ public class HoldPutUnitTest extends BaseHoldWebScriptWithContentUnitTest
/**
* Test that a record can be removed from holds.
*/
@Before
public void setUp(){
webScript.setHoldService(mockedHoldService);
}
@SuppressWarnings("unchecked")
@Test
public void removeRecordFromHolds() throws Exception

View File

@@ -34,11 +34,12 @@ import static org.alfresco.service.cmr.security.PermissionService.GROUP_PREFIX;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anySet;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anySet;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
@@ -75,10 +76,11 @@ import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.service.transaction.TransactionService;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.junit.MockitoJUnitRunner;
import org.mockito.stubbing.Answer;
import org.springframework.context.ApplicationContext;
import org.springframework.context.event.ContextRefreshedEvent;
@@ -89,6 +91,7 @@ import org.springframework.context.event.ContextRefreshedEvent;
* @author Roy Wetherall
* @since 2.5
*/
@RunWith(MockitoJUnitRunner.class)
public class ExtendedSecurityServiceImplUnitTest
{
/** service mocks*/
@@ -145,9 +148,6 @@ public class ExtendedSecurityServiceImplUnitTest
@SuppressWarnings("unchecked")
@Before public void before()
{
// initialise mocks
MockitoAnnotations.initMocks(this);
// setup node
nodeRef = AlfMock.generateNodeRef(mockedNodeService);
@@ -157,7 +157,7 @@ public class ExtendedSecurityServiceImplUnitTest
.thenReturn(filePlan);
// set-up application context
when(mockedApplicationContext.getBean("dbNodeService"))
lenient().when(mockedApplicationContext.getBean("dbNodeService"))
.thenReturn(mockedNodeService);
// setup retrying transaction helper
@@ -199,6 +199,7 @@ public class ExtendedSecurityServiceImplUnitTest
.forEach((a) ->
when(mockedAuthorityService.authorityExists(a))
.thenReturn(true));
extendedSecurityService.setNodeService(mockedNodeService);
}
/**
@@ -481,7 +482,7 @@ public class ExtendedSecurityServiceImplUnitTest
.thenReturn(mockedWritePagingResults);
// setup exact match
when(mockedAuthorityService.authorityExists(GROUP_PREFIX + writeGroup))
lenient().when(mockedAuthorityService.authorityExists(GROUP_PREFIX + writeGroup))
.thenReturn(true);
when(mockedAuthorityService.getContainedAuthorities(null, GROUP_PREFIX + readGroup, true))
.thenReturn(Stream
@@ -560,7 +561,7 @@ public class ExtendedSecurityServiceImplUnitTest
.thenReturn(mockedWritePagingResults);
// setup exact match
when(mockedAuthorityService.authorityExists(GROUP_PREFIX + writeGroup))
lenient().when(mockedAuthorityService.authorityExists(GROUP_PREFIX + writeGroup))
.thenReturn(true);
when(mockedAuthorityService.getContainedAuthorities(null, GROUP_PREFIX + readGroup, true))
.thenReturn(Stream
@@ -651,7 +652,7 @@ public class ExtendedSecurityServiceImplUnitTest
.thenReturn(mockedWritePagingResults);
// setup exact match
when(mockedAuthorityService.authorityExists(GROUP_PREFIX + writeGroup))
lenient().when(mockedAuthorityService.authorityExists(GROUP_PREFIX + writeGroup))
.thenReturn(true);
when(mockedAuthorityService.getContainedAuthorities(null, GROUP_PREFIX + readGroup, true))
.thenReturn(Stream

View File

@@ -27,8 +27,9 @@
package org.alfresco.module.org_alfresco_module_rm.test.util;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.when;
import java.util.UUID;
@@ -119,7 +120,7 @@ public class AlfMock
public static NodeRef generateNodeRef(NodeService mockedNodeService, QName type, boolean exists)
{
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, GUID.generate());
when(mockedNodeService.exists(eq(nodeRef))).thenReturn(exists);
lenient().when(mockedNodeService.exists(eq(nodeRef))).thenReturn(exists);
if (type != null)
{
when(mockedNodeService.getType(eq(nodeRef))).thenReturn(type);

View File

@@ -28,10 +28,10 @@
package org.alfresco.module.org_alfresco_module_rm.test.util;
import static org.alfresco.module.org_alfresco_module_rm.test.util.AlfMock.generateQName;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -168,7 +168,7 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
MockitoAnnotations.initMocks(this);
// setup application context
doReturn(mockedNodeService).when(mockedApplicationContext).getBean("dbNodeService");
lenient().doReturn(mockedNodeService).when(mockedApplicationContext).getBean("dbNodeService");
// setup retrying transaction helper
Answer<Object> doInTransactionAnswer = new Answer<Object>()
@@ -181,7 +181,7 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
return callback.execute();
}
};
doAnswer(doInTransactionAnswer).when(mockedRetryingTransactionHelper).<Object>doInTransaction(any(RetryingTransactionCallback.class));
lenient().doAnswer(doInTransactionAnswer).when(mockedRetryingTransactionHelper).<Object>doInTransaction(any(RetryingTransactionCallback.class));
// setup mocked authentication util
MockAuthenticationUtilHelper.setup(mockedAuthenticationUtil);
@@ -189,15 +189,15 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
// setup file plan
filePlan = generateNodeRef(TYPE_FILE_PLAN);
setupAsFilePlanComponent(filePlan);
doReturn(true).when(mockedFilePlanService).isFilePlan(filePlan);
lenient().doReturn(true).when(mockedFilePlanService).isFilePlan(filePlan);
// setup basic file plan component
filePlanComponent = generateNodeRef();
setupAsFilePlanComponent(filePlanComponent);
// setup namespace service
doReturn(RM_URI).when(mockedNamespaceService).getNamespaceURI(RM_PREFIX);
doReturn(CollectionUtils.unmodifiableSet(RM_PREFIX)).when(mockedNamespaceService).getPrefixes(RM_URI);
lenient().doReturn(RM_URI).when(mockedNamespaceService).getNamespaceURI(RM_PREFIX);
lenient().doReturn(CollectionUtils.unmodifiableSet(RM_PREFIX)).when(mockedNamespaceService).getPrefixes(RM_URI);
// setup record folder and record
recordFolder = generateRecordFolder();
@@ -206,10 +206,10 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
// set record as child of record folder
List<ChildAssociationRef> result = new ArrayList<>(1);
result.add(new ChildAssociationRef(ContentModel.ASSOC_CONTAINS, recordFolder, generateQName(RM_URI), record, true, 1));
doReturn(result).when(mockedNodeService).getChildAssocs(eq(recordFolder), eq(ContentModel.ASSOC_CONTAINS), any(QNamePattern.class));
doReturn(result).when(mockedNodeService).getParentAssocs(record);
doReturn(Collections.singletonList(recordFolder)).when(mockedRecordFolderService).getRecordFolders(record);
doReturn(Collections.singletonList(record)).when(mockedRecordService).getRecords(recordFolder);
lenient().doReturn(result).when(mockedNodeService).getChildAssocs(eq(recordFolder), eq(ContentModel.ASSOC_CONTAINS), any(QNamePattern.class));
lenient().doReturn(result).when(mockedNodeService).getParentAssocs(record);
lenient().doReturn(Collections.singletonList(recordFolder)).when(mockedRecordFolderService).getRecordFolders(record);
lenient().doReturn(Collections.singletonList(record)).when(mockedRecordService).getRecords(recordFolder);
}
/**
@@ -221,7 +221,7 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
protected NodeRef generateHoldNodeRef(String name)
{
NodeRef hold = generateNodeRef(TYPE_HOLD);
doReturn(name).when(mockedNodeService).getProperty(hold, ContentModel.PROP_NAME);
lenient().doReturn(name).when(mockedNodeService).getProperty(hold, ContentModel.PROP_NAME);
doReturn(true).when(mockedHoldService).isHold(hold);
return hold;
}
@@ -235,7 +235,7 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
{
NodeRef recordFolder = generateNodeRef(TYPE_RECORD_FOLDER);
setupAsFilePlanComponent(recordFolder);
doReturn(true).when(mockedRecordFolderService).isRecordFolder(recordFolder);
lenient().doReturn(true).when(mockedRecordFolderService).isRecordFolder(recordFolder);
return recordFolder;
}
@@ -248,8 +248,8 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
{
NodeRef record = generateNodeRef(ContentModel.TYPE_CONTENT);
setupAsFilePlanComponent(record);
doReturn(true).when(mockedNodeService).hasAspect(record, ASPECT_RECORD);
doReturn(true).when(mockedRecordService).isRecord(record);
lenient().doReturn(true).when(mockedNodeService).hasAspect(record, ASPECT_RECORD);
lenient().doReturn(true).when(mockedRecordService).isRecord(record);
return record;
}
@@ -260,10 +260,10 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
*/
protected void setupAsFilePlanComponent(NodeRef nodeRef)
{
doReturn(true).when(mockedNodeService).hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT);
doReturn(true).when(mockedFilePlanService).isFilePlanComponent(nodeRef);
doReturn(filePlan).when(mockedFilePlanService).getFilePlan(nodeRef);
doReturn(filePlan).when(mockedNodeService).getProperty(nodeRef, PROP_ROOT_NODEREF);
lenient().doReturn(true).when(mockedNodeService).hasAspect(nodeRef, ASPECT_FILE_PLAN_COMPONENT);
lenient().doReturn(true).when(mockedFilePlanService).isFilePlanComponent(nodeRef);
lenient().doReturn(filePlan).when(mockedFilePlanService).getFilePlan(nodeRef);
lenient().doReturn(filePlan).when(mockedNodeService).getProperty(nodeRef, PROP_ROOT_NODEREF);
}
/**
@@ -297,7 +297,7 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
protected NodeRef generateCmContent(String name)
{
NodeRef nodeRef = generateNodeRef(ContentModel.TYPE_CONTENT, true);
doReturn(name).when(mockedNodeService).getProperty(nodeRef, ContentModel.PROP_NAME);
lenient().doReturn(name).when(mockedNodeService).getProperty(nodeRef, ContentModel.PROP_NAME);
return nodeRef;
}
@@ -312,11 +312,11 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
protected NodeRef generateNodeRef(QName type, boolean exists)
{
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, GUID.generate());
when(mockedNodeService.exists(eq(nodeRef))).thenReturn(exists);
lenient().when(mockedNodeService.exists(eq(nodeRef))).thenReturn(exists);
if (type != null)
{
when(mockedNodeService.getType(eq(nodeRef))).thenReturn(type);
when(mockedNodeTypeUtility.instanceOf(type, type)).thenReturn(true);
lenient().when(mockedNodeService.getType(eq(nodeRef))).thenReturn(type);
lenient().when(mockedNodeTypeUtility.instanceOf(type, type)).thenReturn(true);
}
return nodeRef;
}
@@ -334,7 +334,7 @@ public class BaseUnitTest implements RecordsManagementModel, ContentModel
if (parent != null)
{
doReturn(parent).when(mockedChildAssociationRef).getParentRef();
lenient().doReturn(parent).when(mockedChildAssociationRef).getParentRef();
}
if (child != null)

View File

@@ -29,10 +29,12 @@ package org.alfresco.module.org_alfresco_module_rm.test.util;
import static java.util.Collections.emptyMap;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -179,19 +181,19 @@ public abstract class BaseWebScriptUnitTest extends BaseUnitTest
org.springframework.extensions.webscripts.Runtime mockedRuntime = mock(org.springframework.extensions.webscripts.Runtime.class);
WebScriptRequest mockedRequest = mock(WebScriptRequest.class);
doReturn(match).when(mockedRequest).getServiceMatch();
doReturn(mockedRuntime).when(mockedRequest).getRuntime();
lenient().doReturn(match).when(mockedRequest).getServiceMatch();
lenient().doReturn(mockedRuntime).when(mockedRequest).getRuntime();
if (content != null && !content.isEmpty())
{
Content mockedContent = mock(Content.class);
doReturn(content).when(mockedContent).getContent();
doReturn(mockedContent).when(mockedRequest).getContent();
lenient().doReturn(content).when(mockedContent).getContent();
lenient().doReturn(mockedContent).when(mockedRequest).getContent();
}
String [] paramNames = (String[])parameters.keySet().toArray(new String[parameters.size()]);
doReturn(paramNames).when(mockedRequest).getParameterNames();
doAnswer(new Answer()
lenient().doReturn(paramNames).when(mockedRequest).getParameterNames();
lenient().doAnswer(new Answer()
{
@Override
public Object answer(InvocationOnMock invocation) throws Throwable
@@ -201,9 +203,9 @@ public abstract class BaseWebScriptUnitTest extends BaseUnitTest
}
}).when(mockedRequest).getParameter(anyString());
doReturn(new String[0]).when(mockedRequest).getHeaderNames();
doReturn("json").when(mockedRequest).getFormat();
lenient().doReturn(new String[0]).when(mockedRequest).getHeaderNames();
lenient().doReturn("json").when(mockedRequest).getFormat();
return mockedRequest;
}
@@ -217,7 +219,7 @@ public abstract class BaseWebScriptUnitTest extends BaseUnitTest
{
WebScriptResponse mockedResponse = mock(WebScriptResponse.class);
StringWriter writer = new StringWriter();
doReturn(writer).when(mockedResponse).getWriter();
lenient().doReturn(writer).when(mockedResponse).getWriter();
return mockedResponse;
}
@@ -230,13 +232,13 @@ public abstract class BaseWebScriptUnitTest extends BaseUnitTest
protected Container getMockedContainer(String template) throws Exception
{
FormatRegistry mockedFormatRegistry = mock(FormatRegistry.class);
doReturn("application/json").when(mockedFormatRegistry).getMimeType(anyString(), anyString());
lenient().doReturn("application/json").when(mockedFormatRegistry).getMimeType(nullable(String.class), nullable(String.class));
ScriptProcessorRegistry mockedScriptProcessorRegistry = mock(ScriptProcessorRegistry.class);
doReturn(null).when(mockedScriptProcessorRegistry).findValidScriptPath(anyString());
lenient().doReturn(null).when(mockedScriptProcessorRegistry).findValidScriptPath(anyString());
TemplateProcessorRegistry mockedTemplateProcessorRegistry = mock(TemplateProcessorRegistry.class);
doReturn(template).when(mockedTemplateProcessorRegistry).findValidTemplatePath(anyString());
lenient().doReturn(template).when(mockedTemplateProcessorRegistry).findValidTemplatePath(anyString());
FTLTemplateProcessor ftlTemplateProcessor = new FTLTemplateProcessor()
{
@@ -248,25 +250,25 @@ public abstract class BaseWebScriptUnitTest extends BaseUnitTest
};
ftlTemplateProcessor.init();
doReturn(ftlTemplateProcessor).when(mockedTemplateProcessorRegistry).getTemplateProcessor(anyString());
lenient().doReturn(ftlTemplateProcessor).when(mockedTemplateProcessorRegistry).getTemplateProcessor(anyString());
Container mockedContainer = mock(Container.class);
doReturn(mockedFormatRegistry).when(mockedContainer).getFormatRegistry();
doReturn(mockedScriptProcessorRegistry).when(mockedContainer).getScriptProcessorRegistry();
doReturn(mockedTemplateProcessorRegistry).when(mockedContainer).getTemplateProcessorRegistry();
lenient().doReturn(mockedFormatRegistry).when(mockedContainer).getFormatRegistry();
lenient().doReturn(mockedScriptProcessorRegistry).when(mockedContainer).getScriptProcessorRegistry();
lenient().doReturn(mockedTemplateProcessorRegistry).when(mockedContainer).getTemplateProcessorRegistry();
Map<String, Object> containerTemplateParameters = new HashMap<>(5);
containerTemplateParameters.put("jsonUtils", new JSONUtils());
containerTemplateParameters.put("people", getMockedPeopleObject());
doReturn(containerTemplateParameters).when(mockedContainer).getTemplateParameters();
lenient().doReturn(containerTemplateParameters).when(mockedContainer).getTemplateParameters();
SearchPath mockedSearchPath = mock(SearchPath.class);
doReturn(false).when(mockedSearchPath).hasDocument(anyString());
doReturn(mockedSearchPath).when(mockedContainer).getSearchPath();
lenient().doReturn(false).when(mockedSearchPath).hasDocument(anyString());
lenient().doReturn(mockedSearchPath).when(mockedContainer).getSearchPath();
// setup description
Description mockDescription = mock(Description.class);
doReturn(mock(RequiredCache.class)).when(mockDescription).getRequiredCache();
lenient().doReturn(mock(RequiredCache.class)).when(mockDescription).getRequiredCache();
return mockedContainer;
}

View File

@@ -27,11 +27,10 @@
package org.alfresco.module.org_alfresco_module_rm.test.util;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.when;
import org.alfresco.module.org_alfresco_module_rm.util.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
@@ -74,7 +73,7 @@ public class MockAuthenticationUtilHelper
reset(mockAuthenticationUtil);
// just do the work
doAnswer(new Answer<Object>()
lenient().doAnswer(new Answer<Object>()
{
@SuppressWarnings("rawtypes")
@Override
@@ -87,7 +86,7 @@ public class MockAuthenticationUtilHelper
}).when(mockAuthenticationUtil).<Object> runAsSystem(any(RunAsWork.class));
// just do the work
doAnswer(new Answer<Object>()
lenient().doAnswer(new Answer<Object>()
{
@SuppressWarnings("rawtypes")
@Override
@@ -99,10 +98,10 @@ public class MockAuthenticationUtilHelper
}).when(mockAuthenticationUtil).<Object> runAs(any(RunAsWork.class), anyString());
when(mockAuthenticationUtil.getAdminUserName()).thenReturn(ADMIN_USER);
when(mockAuthenticationUtil.getFullyAuthenticatedUser()).thenReturn(fullyAuthenticatedUser);
when(mockAuthenticationUtil.getRunAsUser()).thenReturn(fullyAuthenticatedUser);
when(mockAuthenticationUtil.getSystemUserName()).thenReturn(SYSTEM_USER);
when(mockAuthenticationUtil.getGuestUserName()).thenReturn(GUEST_USER);
lenient().when(mockAuthenticationUtil.getAdminUserName()).thenReturn(ADMIN_USER);
lenient().when(mockAuthenticationUtil.getFullyAuthenticatedUser()).thenReturn(fullyAuthenticatedUser);
lenient().when(mockAuthenticationUtil.getRunAsUser()).thenReturn(fullyAuthenticatedUser);
lenient().when(mockAuthenticationUtil.getSystemUserName()).thenReturn(SYSTEM_USER);
lenient().when(mockAuthenticationUtil.getGuestUserName()).thenReturn(GUEST_USER);
}
}

View File

@@ -87,6 +87,7 @@ public class ContentBinDuplicationUtilityUnitTest
public void setUp()
{
MockitoAnnotations.initMocks(this);
contentBinDuplicationUtility.setNodeService(mockNodeService);
}
/**

View File

@@ -29,10 +29,11 @@ package org.alfresco.module.org_alfresco_module_rm.version;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyMap;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -52,7 +53,6 @@ import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
import org.alfresco.repo.version.Version2Model;
import org.alfresco.repo.version.VersionModel;
import org.alfresco.repo.version.common.VersionImpl;
import org.alfresco.service.cmr.model.FileInfo;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
@@ -61,9 +61,11 @@ import org.alfresco.service.cmr.version.VersionType;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Spy;
import org.mockito.junit.MockitoJUnitRunner;
/**
* Recordable version service implementation unit test.
@@ -71,6 +73,7 @@ import org.mockito.Spy;
* @author Roy Wetherall
* @since 2.3
*/
@RunWith(MockitoJUnitRunner.class)
public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
{
/** versioned content name */
@@ -108,34 +111,23 @@ public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
recordableVersionService.initialise();
doReturn(generateChildAssociationRef(null, generateNodeRef(Version2Model.TYPE_QNAME_VERSION_HISTORY)))
.when(mockedDbNodeService).createNode(any(NodeRef.class),
any(QName.class),
any(QName.class),
.when(mockedDbNodeService).createNode(nullable(NodeRef.class),
nullable(QName.class),
nullable(QName.class),
eq(Version2Model.TYPE_QNAME_VERSION_HISTORY),
anyMap());
doReturn(generateChildAssociationRef(null, generateNodeRef(TYPE_CONTENT)))
.when(mockedDbNodeService).createNode(any(NodeRef.class),
any(QName.class),
any(QName.class),
eq(TYPE_CONTENT),
anyMap());
nullable(Map.class));
doReturn(filePlan).when(mockedFilePlanService).getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID);
doReturn(unfiledRecordContainer).when(mockedFilePlanService).getUnfiledContainer(any(NodeRef.class));
record = generateCmContent(CONTENT_NAME);
FileInfo mockedFileInfo = mock(FileInfo.class);
doReturn(record).when(mockedFileInfo).getNodeRef();
doReturn(mockedFileInfo).when(mockedFileFolderService).copy(any(NodeRef.class),
any(NodeRef.class),
any(String.class));
version = generateNodeRef(TYPE_CONTENT);
doReturn(generateChildAssociationRef(null, version)).when(mockedDbNodeService).createNode(
any(NodeRef.class),
nullable(NodeRef.class),
eq(Version2Model.CHILD_QNAME_VERSIONS),
any(QName.class),
nullable(QName.class),
eq(TYPE_CONTENT),
anyMap());
nullable(Map.class));
recordableVersionService.setDbNodeService(mockedDbNodeService);
}
/**
@@ -167,7 +159,6 @@ public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
{
// setup given conditions
doReturn(false).when(mockedNodeService).hasAspect(nodeRef, RecordableVersionModel.ASPECT_VERSIONABLE);
doReturn(null).when(mockedNodeService).getProperty(nodeRef, RecordableVersionModel.PROP_RECORDABLE_VERSION_POLICY);
versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MINOR);
// when version is created
@@ -357,7 +348,6 @@ public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
public void filePlanSpecifiedNoPolicy() throws Exception
{
// setup given conditions
doReturn(true).when(mockedNodeService).hasAspect(nodeRef, RecordableVersionModel.ASPECT_VERSIONABLE);
versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MAJOR);
versionProperties.put(RecordableVersionServiceImpl.KEY_RECORDABLE_VERSION, true);
@@ -376,7 +366,6 @@ public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
public void adHocRecordedVersionNoPolicy() throws Exception
{
// setup given conditions
doReturn(true).when(mockedNodeService).hasAspect(nodeRef, RecordableVersionModel.ASPECT_VERSIONABLE);
versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MAJOR);
versionProperties.put(RecordableVersionServiceImpl.KEY_RECORDABLE_VERSION, true);
@@ -391,8 +380,6 @@ public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
public void adHocRecordedVersionOverridePolicy() throws Exception
{
// setup given conditions
doReturn(true).when(mockedNodeService).hasAspect(nodeRef, RecordableVersionModel.ASPECT_VERSIONABLE);
doReturn(RecordableVersionPolicy.MAJOR_ONLY.toString()).when(mockedNodeService).getProperty(nodeRef, RecordableVersionModel.PROP_RECORDABLE_VERSION_POLICY);
versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MINOR);
versionProperties.put(RecordableVersionServiceImpl.KEY_RECORDABLE_VERSION, true);
@@ -461,16 +448,15 @@ public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
// latest version is not recorded
Version mockedVersion = mock(VersionImpl.class);
NodeRef versionNodeRef = generateNodeRef();
doReturn(Collections.emptyMap()).when(mockedVersion).getVersionProperties();
doReturn(true).when(mockedNodeService).hasAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE);
// version history
NodeRef versionHistoryNodeRef = generateNodeRef();
doReturn(versionHistoryNodeRef).when(mockedDbNodeService).getChildByName(any(NodeRef.class), eq(Version2Model.CHILD_QNAME_VERSION_HISTORIES), any(String.class));
doReturn(versionHistoryNodeRef).when(mockedDbNodeService).getChildByName(nullable(NodeRef.class), eq(Version2Model.CHILD_QNAME_VERSION_HISTORIES), nullable(String.class));
// version number
doReturn(mockedVersion).when(recordableVersionService).getCurrentVersion(nodeRef);
doReturn(versionNodeRef).when(recordableVersionService).convertNodeRef(any(NodeRef.class));
doReturn(versionNodeRef).when(recordableVersionService).convertNodeRef(nullable(NodeRef.class));
makePrimaryParentOf(versionNodeRef, versionHistoryNodeRef, ContentModel.ASSOC_CONTAINS, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "something-0"), mockedDbNodeService);
// created version
@@ -478,36 +464,36 @@ public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
doReturn(generateChildAssociationRef(versionHistoryNodeRef, newVersionNodeRef)).when(mockedDbNodeService).createNode(
eq(versionHistoryNodeRef),
eq(Version2Model.CHILD_QNAME_VERSIONS),
any(QName.class),
any(QName.class),
any(Map.class));
nullable(QName.class),
nullable(QName.class),
nullable(Map.class));
// created record
NodeRef newRecordNodeRef = generateNodeRef();
doReturn(newRecordNodeRef).when(mockedRecordService).createRecordFromContent(
eq(filePlan),
any(String.class),
any(QName.class),
any(Map.class),
any(ContentReader.class));
eq(filePlan),
nullable(String.class),
nullable(QName.class),
nullable(Map.class),
nullable(ContentReader.class));
// create record from version
recordableVersionService.createRecordFromLatestVersion(filePlan, nodeRef);
// verify that the version is converted to a recorded version
verify(mockedRecordService, times(1)).createRecordFromContent(
eq(filePlan),
any(String.class),
any(QName.class),
any(Map.class),
any(ContentReader.class));
eq(filePlan),
nullable(String.class),
nullable(QName.class),
any(Map.class),
nullable(ContentReader.class));
verify(mockedDbNodeService, times(1)).deleteNode(any(NodeRef.class));
verify(mockedDbNodeService, times(1)).createNode(
eq(versionHistoryNodeRef),
eq(Version2Model.CHILD_QNAME_VERSIONS),
any(QName.class),
any(QName.class),
any(Map.class));
nullable(QName.class),
nullable(QName.class),
nullable(Map.class));
verify(mockedNodeService, times(1)).addAspect(eq(newVersionNodeRef), eq(Version2Model.ASPECT_VERSION), any(Map.class));
verify(mockedNodeService, times(1)).addAspect(
newVersionNodeRef,
@@ -605,20 +591,13 @@ public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
// set up version
Version mockedVersion = mock(VersionImpl.class);
NodeRef versionNodeRef = generateNodeRef();
NodeRef versionRecordNodeRef = generateNodeRef();
when(mockedVersion.getFrozenStateNodeRef())
.thenReturn(versionNodeRef);
when(mockedDbNodeService.exists(versionRecordNodeRef))
.thenReturn(true);
// indicate that the version doesn't have the aspect
when(mockedDbNodeService.hasAspect(versionNodeRef, RecordableVersionModel.ASPECT_RECORDED_VERSION))
.thenReturn(true);
// indicate that the associated version record exists
when(mockedDbNodeService.getProperty(versionNodeRef, RecordableVersionModel.PROP_RECORD_NODE_REF))
.thenReturn(versionRecordNodeRef);
// mark as destroyed
recordableVersionService.destroyRecordedVersion(mockedVersion);
@@ -643,20 +622,13 @@ public class RecordableVersionServiceImplUnitTest extends BaseUnitTest
// set up version
Version mockedVersion = mock(VersionImpl.class);
NodeRef versionNodeRef = generateNodeRef();
NodeRef versionRecordNodeRef = generateNodeRef();
when(mockedVersion.getFrozenStateNodeRef())
.thenReturn(versionNodeRef);
when(mockedDbNodeService.exists(versionRecordNodeRef))
.thenReturn(false);
// indicate that the version doesn't have the aspect
when(mockedDbNodeService.hasAspect(versionNodeRef, RecordableVersionModel.ASPECT_RECORDED_VERSION))
.thenReturn(true);
// indicate that the associated version record exists
when(mockedDbNodeService.getProperty(versionNodeRef, RecordableVersionModel.PROP_RECORD_NODE_REF))
.thenReturn(versionRecordNodeRef);
// mark as destroyed
recordableVersionService.destroyRecordedVersion(mockedVersion);

View File

@@ -33,10 +33,11 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -562,7 +563,7 @@ public class DynamicAuthoritiesGetUnitTest extends BaseWebScriptUnitTest impleme
executeWebScript(parameters);
verify(contentStreamer, times(1)).streamContent(any(WebScriptRequest.class), any(WebScriptResponse.class),
csvFileCaptor.capture(), any(Long.class), any(Boolean.class), any(String.class), any(Map.class));
csvFileCaptor.capture(), nullable(Long.class), any(Boolean.class), any(String.class), any(Map.class));
File fileForDownload = csvFileCaptor.getValue();
assertNotNull(fileForDownload);

View File

@@ -28,8 +28,9 @@
package org.alfresco.rm.rest.api.impl;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
@@ -41,7 +42,6 @@ import org.alfresco.module.org_alfresco_module_rm.dod5015.DOD5015Model;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.module.org_alfresco_module_rm.test.util.AlfMock;
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.rest.api.impl.SiteImportPackageHandler;
import org.alfresco.rest.api.model.Site;
import org.alfresco.rest.api.model.SiteUpdate;
@@ -59,10 +59,11 @@ import org.alfresco.service.cmr.view.Location;
import org.alfresco.service.namespace.QName;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.junit.MockitoJUnitRunner;
/**
* Unit Test class for RMSitesImpl.
@@ -71,6 +72,7 @@ import org.mockito.MockitoAnnotations;
* @since 2.6
*
*/
@RunWith(MockitoJUnitRunner.class)
public class RMSitesImplUnitTest extends BaseUnitTest
{
private static final String RM_SITE_TITLE_AFTER_UPDATE = "Updated Title";
@@ -86,8 +88,6 @@ public class RMSitesImplUnitTest extends BaseUnitTest
@Mock
private SiteService mockedSiteService;
@Mock
AuthenticationUtil mockAuthenticationUtil;
@Mock
private ImporterService mockedImporterService;
@Mock
private FavouritesService mockedFavouritesService;
@@ -95,7 +95,6 @@ public class RMSitesImplUnitTest extends BaseUnitTest
@Before
public void before()
{
MockitoAnnotations.initMocks(this);
}
@Test
@@ -138,7 +137,7 @@ public class RMSitesImplUnitTest extends BaseUnitTest
verify(mockedImporterService, times(1)).importView(any(SiteImportPackageHandler.class), any(Location.class), any(ImporterBinding.class), eq(null));
verify(mockedSiteService, times(1)).createContainer(RM_SITE_ID, SiteService.DOCUMENT_LIBRARY, ContentModel.TYPE_FOLDER, null);
verify(mockedFavouritesService, times(1)).addFavourite(any(String.class), any(NodeRef.class));
verify(mockedFavouritesService, times(1)).addFavourite(nullable(String.class), any(NodeRef.class));
//verify returned values for RM site are the right ones
assertEquals(RMSiteCompliance.STANDARD, createdRMSite.getCompliance());
@@ -191,7 +190,7 @@ public class RMSitesImplUnitTest extends BaseUnitTest
verify(mockedImporterService, times(1)).importView(any(SiteImportPackageHandler.class), any(Location.class), any(ImporterBinding.class), eq(null));
verify(mockedSiteService, times(1)).createContainer(RM_SITE_ID, SiteService.DOCUMENT_LIBRARY, ContentModel.TYPE_FOLDER, null);
verify(mockedFavouritesService, times(1)).addFavourite(any(String.class), any(NodeRef.class));
verify(mockedFavouritesService, times(1)).addFavourite(nullable(String.class), any(NodeRef.class));
//verify returned values for RM site are the right ones
assertEquals(RMSiteCompliance.DOD5015, createdRMSite.getCompliance());
@@ -253,13 +252,12 @@ public class RMSitesImplUnitTest extends BaseUnitTest
when(mockedNodeService.getType(siteNodeRef)).thenReturn(RecordsManagementModel.TYPE_RM_SITE);
when(mockedSiteService.getSite(siteId)).thenReturn(mockedSiteInfo);
when(mockedSiteService.getMembersRole(eq(siteId), any(String.class))).thenReturn(RM_SITE_MANAGER_ROLE);
when(mockedSiteService.getMembersRole(eq(siteId), nullable(String.class))).thenReturn(RM_SITE_MANAGER_ROLE);
//mock UpdateSite
SiteUpdate mockedSiteUpdate= mock(SiteUpdate.class);
when(mockedSiteUpdate.getDescription()).thenReturn(RM_SITE_DESCRIPTION_AFTER_UPDATE);
when(mockedSiteUpdate.getTitle()).thenReturn(RM_SITE_TITLE_AFTER_UPDATE);
when(mockedSiteUpdate.getVisibility()).thenReturn(null);
when(mockedSiteUpdate.wasSet(Site.TITLE)).thenReturn(true);
when(mockedSiteUpdate.wasSet(Site.DESCRIPTION)).thenReturn(true);
@@ -309,7 +307,7 @@ public class RMSitesImplUnitTest extends BaseUnitTest
when(mockedNodeService.getType(siteNodeRef)).thenReturn(RecordsManagementModel.TYPE_RM_SITE);
when(mockedSiteService.getSite(siteId)).thenReturn(mockedSiteInfo);
when(mockedSiteService.getMembersRole(eq(siteId), any(String.class))).thenReturn(RM_SITE_MANAGER_ROLE);
when(mockedSiteService.getMembersRole(eq(siteId), nullable(String.class))).thenReturn(RM_SITE_MANAGER_ROLE);
//STANDARD compliance
RMSite rmSite = rmSitesImpl.getRMSite(siteId);

View File

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

5
amps/module-info.java Normal file
View File

@@ -0,0 +1,5 @@
module simple.lombok {
requires static lombok;
requires java.logging;
}

View File

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

View File

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

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>11.82</version>
<version>14.28-SNAPSHOT</version>
</parent>
<properties>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -26,6 +26,7 @@
package org.alfresco.repo.content;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.Experimental;
import org.alfresco.service.cmr.repository.ContentAccessor;
import org.alfresco.service.cmr.repository.ContentIOException;
import org.alfresco.service.cmr.repository.ContentReader;
@@ -33,7 +34,9 @@ import org.alfresco.service.cmr.repository.ContentStreamListener;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.repository.DirectAccessUrl;
import java.util.Date;
import java.util.Collections;
import java.util.Map;
/**
* Provides low-level retrieval of content
@@ -239,28 +242,106 @@ public interface ContentStore
*/
public boolean delete(String contentUrl);
/**
* Gets a presigned URL to directly access a binary content. It is up to the actual store
* implementation if it can fulfil this request with an expiry time or not.
*
* @param contentUrl A content store URL
* @param expiresAt An optional expiry date, so the direct access url would become invalid when the expiry date is reached
* @return A direct access URL object for a binary content
* @throws UnsupportedOperationException if the store is unable to provide the information
*/
default DirectAccessUrl getDirectAccessUrl(String contentUrl, Date expiresAt)
{
throw new UnsupportedOperationException(
"Retrieving direct access URLs is not supported by this content store.");
}
/**
* Checks if the store supports the retrieving of direct access URLs.
*
* @return true if direct access URLs retrieving is supported, false otherwise
* @return {@code true} if direct access URLs retrieving is supported, {@code false} otherwise
*/
default boolean isDirectAccessSupported()
default boolean isContentDirectUrlEnabled()
{
return false;
}
/**
* Checks if the store supports the retrieving of a direct access URL for the given node.
*
* @param contentUrl the {@code URL} of the content for which to request a direct access {@code URL}
* @return {@code true} if direct access URLs retrieving is supported for the node, {@code false} otherwise
*/
default boolean isContentDirectUrlEnabled(String contentUrl)
{
return false;
}
/**
* Gets a presigned URL to directly access the content. It is up to the actual store
* implementation if it can fulfil this request with an expiry time or not.
*
* @param contentUrl A content store {@code URL}
* @param attachment {@code true} if an attachment URL is requested, {@code false} for an embedded {@code URL}.
* @param fileName File name of the content
* @return A direct access {@code URL} object for the content
* @throws UnsupportedOperationException if the store is unable to provide the information
*/
@Deprecated
default DirectAccessUrl requestContentDirectUrl(String contentUrl, boolean attachment, String fileName)
{
return requestContentDirectUrl(contentUrl, attachment, fileName, null, null);
}
/**
* Gets a presigned URL to directly access the content. It is up to the actual store
* implementation if it can fulfil this request with an expiry time or not.
*
* @param contentUrl A content store {@code URL}
* @param attachment {@code true} if an attachment URL is requested, {@code false} for an embedded {@code URL}.
* @param fileName File name of the content
* @return A direct access {@code URL} object for the content
* @throws UnsupportedOperationException if the store is unable to provide the information
*/
default DirectAccessUrl requestContentDirectUrl(String contentUrl, boolean attachment, String fileName, String mimetype)
{
return requestContentDirectUrl(contentUrl, attachment, fileName, mimetype, null);
}
/**
* Gets a presigned URL to directly access the content. It is up to the actual store
* implementation if it can fulfil this request with an expiry time or not.
*
* @param contentUrl A content store {@code URL}
* @param attachment {@code true} if an attachment URL is requested, {@code false} for an embedded {@code URL}.
* @param fileName File name of the content
* @param validFor The time at which the direct access {@code URL} will expire.
* @return A direct access {@code URL} object for the content.
* @throws UnsupportedOperationException if the store is unable to provide the information
*/
@Deprecated
default DirectAccessUrl requestContentDirectUrl(String contentUrl, boolean attachment, String fileName, Long validFor)
{
return requestContentDirectUrl(contentUrl, attachment, fileName, null, validFor);
}
/**
* Gets a presigned URL to directly access the content. It is up to the actual store
* implementation if it can fulfil this request with an expiry time or not.
*
* @param contentUrl A content store {@code URL}
* @param attachment {@code true} if an attachment URL is requested, {@code false} for an embedded {@code URL}.
* @param fileName File name of the content
* @param mimetype Mimetype of the content
* @param validFor The time at which the direct access {@code URL} will expire.
* @return A direct access {@code URL} object for the content.
* @throws UnsupportedOperationException if the store is unable to provide the information
*/
default DirectAccessUrl requestContentDirectUrl(String contentUrl, boolean attachment, String fileName, String mimetype, Long validFor)
{
throw new UnsupportedOperationException(
"Retrieving direct access URLs is not supported by this content store.");
}
/**
* Gets a key-value (String-String) collection of storage headers/properties with their respective values.
* A particular Cloud Connector will fill in that data with Cloud Storage Provider generic data.
* Map may be also filled in with entries consisting of pre-defined Alfresco keys of {@code ObjectStorageProps} and their values.
* If empty Map is returned - no connector is present or connector is not supporting retrieval of the properties
* or cannot determine the properties.
*
* @param contentUrl the URL of the content for which the storage properties are to be retrieved.
* @return Returns a key-value (String-String) collection of storage headers/properties with their respective values.
*/
@Experimental
default Map<String, String> getStorageProperties(String contentUrl)
{
return Collections.emptyMap();
}
}

View File

@@ -0,0 +1,64 @@
/*
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* 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;
import org.alfresco.service.Experimental;
/**
* Enumeration with "header" values for Alfresco derived Storage Properties
* Values of this enum should be used when adding Alfresco derived key-value pairs in Storage Properties map.
* Subject to expand/change.
*
* @author mpichura
*/
@Experimental
public enum ObjectStorageProps {
/**
* Object's content is archived and not immediately accessible.
*/
X_ALF_ARCHIVED("x-alf-archived"),
/**
* Object's content retrieval from archive is in progress
*/
X_ALF_ARCHIVE_RESTORE_IN_PROGRESS("x-alf-archive-restore-in-progress"),
/**
* Expiry date and time of object's content retrieved from archive.
* Use YYYYMMDDThhmmssZ (ISO-8601) datetime format when using this value as key in Storage Properties map.
*/
X_ALF_ARCHIVE_RESTORE_EXPIRY("x-alf-archive-restore-expiry");
ObjectStorageProps(String value) {
this.value = value;
}
private final String value;
public String getValue() {
return value;
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of

View File

@@ -0,0 +1,55 @@
/*
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* 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.service;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation to mark a type/method/field as experimental.
* <p>
* If this annotation is present on an element it marks it as experimental and subject to change without further notice.
* The element may even be deleted or renamed without any notice.
* Experimental element may likely become a valid one (not experimental anymore) in future releases but there is no guarantee when
* and if that happens.
*
* @author mpichura
*/
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.CLASS)
@Documented
public @interface Experimental {
/**
* Further description that can optionally be added to clarify possible future changes of annotated object.
*
* @return a String, the default is an empty String.
*/
String description() default "";
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -27,6 +27,7 @@ package org.alfresco.service.cmr.repository;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import org.alfresco.api.AlfrescoPublicApi;
@@ -36,7 +37,8 @@ public class DirectAccessUrl implements Serializable
private static final long serialVersionUID = -881676208224414139L;
private String contentUrl;
private Date expiresAt;
private Date expiryTime;
private boolean attachment;
public String getContentUrl()
{
@@ -48,13 +50,38 @@ public class DirectAccessUrl implements Serializable
this.contentUrl = contentUrl;
}
public Date getExpiresAt()
public Date getExpiryTime()
{
return expiresAt;
return expiryTime;
}
public void setExpiresAt(Date expiresAt)
public void setExpiryTime(Date expiryTime)
{
this.expiresAt = expiresAt;
this.expiryTime = expiryTime;
}
public boolean isAttachment()
{
return attachment;
}
public void setAttachment(boolean attachment)
{
this.attachment = attachment;
}
@Override public boolean equals(Object obj)
{
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
DirectAccessUrl that = (DirectAccessUrl) obj;
return attachment == that.attachment && Objects.equals(contentUrl,
that.contentUrl) && Objects.equals(expiryTime, that.expiryTime);
}
@Override public int hashCode()
{
return Objects.hash(contentUrl, expiryTime, attachment);
}
}

112
mmt/pom.xml Normal file
View File

@@ -0,0 +1,112 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-mmt</artifactId>
<name>Alfresco Module Management Tool</name>
<packaging>jar</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.28-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>de.schlichtherle.truezip</groupId>
<artifactId>truezip-driver-zip</artifactId>
<version>${dependency.truezip.version}</version>
</dependency>
<dependency>
<groupId>de.schlichtherle.truezip</groupId>
<artifactId>truezip-file</artifactId>
<version>${dependency.truezip.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${dependency.maven-artifact.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>make-mmt</id>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>org.alfresco.repo.module.tool.ModuleManagementTool</Main-Class>
</manifestEntries>
</transformer>
</transformers>
<artifactSet>
<includes>
<include>de.schlichtherle.truezip:*</include>
<include>org.alfresco:alfresco-core</include>
<include>org.alfresco:alfresco-repository</include>
<include>org.apache.commons:commons-compress</include>
<include>org.safehaus.jug:jug</include>
<include>org.alfresco.surf:spring-surf-core</include>
<include>org.tukaani:xz</include>
<include>org.apache.maven:maven-artifact</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>org.alfresco:alfresco-core</artifact>
<includes>
<include>org/alfresco/error/AlfrescoRuntimeException.class</include>
<include>org/alfresco/util/Pair.class</include>
<include>org/alfresco/util/EqualsHelper.class</include>
<include>org/alfresco/util/VersionNumber.class</include>
</includes>
</filter>
<filter>
<artifact>org.apache.maven:maven-artifact</artifact>
<includes>
<include>org/apache/maven/artifact/versioning/**/*.class</include>
</includes>
</filter>
<filter>
<artifact>org.alfresco:alfresco-repository</artifact>
<includes>
<include>org/alfresco/repo/module/tool/default-file-mapping.properties</include>
<include>org/alfresco/repo/module/**/*.class</include>
<include>org/alfresco/service/cmr/module/**/*.class</include>
</includes>
</filter>
<filter>
<artifact>org.alfresco.surf:spring-surf-core</artifact>
<includes>
<include>org/springframework/extensions/surf/util/I18NUtil.class</include>
<include>org/springframework/extensions/surf/util/ISO8601DateFormat.class</include>
<include>org/springframework/extensions/surf/exception/PlatformRuntimeException.class</include>
</includes>
</filter>
<filter>
<!-- Duplicated file in truezip-driver-file, need to filter this one -->
<artifact>de.schlichtherle.truezip:truezip-driver-zip</artifact>
<excludes>
<exclude>META-INF/services/de.schlichtherle.truezip.fs.spi.FsDriverService</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

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

View File

@@ -0,0 +1,54 @@
/*--
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,46 @@
Indiana University Extreme! Lab Software License
Version 1.1.1
Copyright (c) 2002 Extreme! Lab, Indiana University. 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 end-user documentation included with the redistribution, if any,
must include the following acknowledgment:
"This product includes software developed by the Indiana University
Extreme! Lab (http://www.extreme.indiana.edu/)."
Alternately, this acknowledgment may appear in the software itself,
if and wherever such third-party acknowledgments normally appear.
4. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
must not be used to endorse or promote products derived from this
software without prior written permission. For written permission,
please contact http://www.extreme.indiana.edu/.
5. Products derived from this software may not use "Indiana Univeristy"
name nor may "Indiana Univeristy" appear in their name, without prior
written permission of the Indiana University.
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 AUTHORS, COPYRIGHT HOLDERS OR ITS 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,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.45-java-11-centos-8
FROM alfresco/alfresco-base-tomcat:9.0.52-java-11-centos-7
# Set default docker_context.
ARG resource_path=target
@@ -65,12 +65,12 @@ RUN sed -i -e "s_log4j.appender.File.File\=alfresco.log_log4j.appender.File.File
# fontconfig is required by Activiti worflow diagram generator
# installing pinned dependencies as well
RUN yum install -y fontconfig-2.13.1-3.el8 \
dejavu-fonts-common-2.35-7.el8 \
fontpackages-filesystem-1.44-22.el8 \
freetype-2.9.1-4.el8_3.1 \
libpng-1.6.34-5.el8 \
dejavu-sans-fonts-2.35-7.el8 && \
RUN yum install -y fontconfig-2.13.0-4.3.el7 \
dejavu-fonts-common-2.33-6.el7 \
fontpackages-filesystem-1.44-8.el7 \
freetype-2.8-14.el7_9.1 \
libpng-1.5.13-8.el7 \
dejavu-sans-fonts-2.33-6.el7 && \
yum clean all
# The standard configuration is to have all Tomcat files owned by root with group GROUPNAME and whilst owner has read/write privileges,

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>11.82</version>
<version>14.28-SNAPSHOT</version>
</parent>
<properties>
@@ -71,6 +71,7 @@
<groupId>org.alfresco</groupId>
<artifactId>alfresco-mmt</artifactId>
<type>jar</type>
<version>${project.version}</version>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/alfresco-mmt</outputDirectory>
</artifactItem>

View File

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

View File

@@ -1,4 +1,4 @@
TRANSFORMERS_TAG=2.5.0
SOLR6_TAG=2.0.2-RC1
POSTGRES_TAG=13.1
TRANSFORMERS_TAG=2.5.3
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>11.82</version>
<version>14.28-SNAPSHOT</version>
</parent>
<modules>

View File

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

View File

@@ -90,7 +90,7 @@ public class CancelCheckOutTests extends CmisTest
.cancelCheckOut();
}
@Test(groups = { TestGroup.REGRESSION, TestGroup.CMIS})
@Test(groups = { TestGroup.NOT_SUPPORTED_ON_SINGLE_PIPELINE, TestGroup.REGRESSION, TestGroup.CMIS})
@TestRail(section = {"cmis-api"}, executionType= ExecutionType.REGRESSION,
description = "Verify that cancel check out on document created with Versioning State CHECKED OUT deletes the document")
public void cancelCheckOutOnDocWithVersioningStateCheckedOut() throws Exception

View File

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

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