Compare commits

...

1045 Commits

Author SHA1 Message Date
swapnil.verma
3875f0b170 [RM-7187] - Added REST endpoints for implementation for events API 2022-12-08 11:02:09 +05:30
Travis CI User
31d5b0985f [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-07 10:07:23 +00:00
Travis CI User
15ebb627ce [maven-release-plugin][skip ci] prepare release 20.35 2022-12-07 10:07:20 +00:00
Maciej Pichura
90ca0dea6c ACS-4028 GET Category by id (#1601)
* ACS-4028 Get category by id (#1591)

* ACS-4028: Get category by id endpoint.

* ACS-4028: Get category by id endpoint.

* ACS-4028: Get category by id endpoint - integration TAS tests.

* ACS-4028: Get category by id endpoint - refactoring.

* ACS-4028: Adding test to test suite.

* ACS-4028: Fixes after code review.

* ACS-4019: Removing redundant test group.
2022-12-07 10:32:08 +01:00
Travis CI User
e48315e4b5 [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-06 15:11:11 +00:00
Travis CI User
0902766f6e [maven-release-plugin][skip ci] prepare release 20.34 2022-12-06 15:11:08 +00:00
pzurek
9b94dcaac3 ACS-4053 Update Search Services dependency 2022-12-06 15:31:35 +01:00
Travis CI User
d6b54568ac [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-06 14:23:46 +00:00
Travis CI User
c72f175126 [maven-release-plugin][skip ci] prepare release 20.33 2022-12-06 14:23:43 +00:00
tiagosalvado10
ace4691540 [MNT-22437] Remove ACS version from landing page (#1480)
* [MNT-22437] Remove ACS version from landing page

* [MNT-22437] Bump surf-webscripts to 8.33
2022-12-06 13:45:09 +00:00
Travis CI User
8a605c3678 [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-06 13:02:58 +00:00
Travis CI User
0c811ae1fc [maven-release-plugin][skip ci] prepare release 20.32 2022-12-06 13:02:55 +00:00
Tom Page
375da138e8 Merge pull request #1560 from Alfresco/feature/ACS-4005_MergeTASRESTAPI
ACS-4005 Merge alfresco-tas-restapi into communty repo.
2022-12-06 12:25:45 +00:00
Travis CI User
b15ad3c72e [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-06 09:51:36 +00:00
Travis CI User
7112fba951 [maven-release-plugin][skip ci] prepare release 20.31 2022-12-06 09:51:33 +00:00
Tom Page
7426a2eaa2 ACS-3531 Replace content tests using TAS. (#1582)
* ACS-3531 Output the list of TAS tests that ran.

* ACS-3531 Update content and versioning REST tests. [tas]

* ACS-3531 Replace download/caching IT tests with TAS tests.
2022-12-06 09:14:34 +00:00
Tom Page
b8994d990e ACS-3531 Output the list of TAS tests that ran. (#1579) 2022-12-06 09:13:12 +00:00
Travis CI User
f67516fb19 [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-05 15:07:42 +00:00
Travis CI User
6d883709a2 [maven-release-plugin][skip ci] prepare release 20.30 2022-12-05 15:07:39 +00:00
Aleksandra Onych
b9ccd79a73 ACS-3160 Replace Reload4j with Log4j2 (#1204)
* [ACS-3160] replace reload4j with log4j2

* [ACS-3160] refactor log4j version in pom.xml files

* ACS-3160 Add log4j2.properties file

* [ACS-3160] convert log4jHierarchyInit properties

* ACS-3222 Generate log4j2 rolling file in the Tomcat logs directory

* ACS-3160 Fix reconfiguration in Log4JHierarchyInit

* [ACS-3160] change loggers from log4j2 to slf4j (where possible)

* ACS-3160 Load a set of augmenting/overriding log4j2.properties files

* ACS-3160 Fix CheckRequiredClassesForLoggingConsoleUnitTest (adjust to log4j2)

* ACS-3160 Enable CheckRequiredClassesForLoggingConsoleUnitTest

* [ACS-3160] add appender util class

* [ACS-3160] fix removeAbstractAppenderFromLogger

* ACS-3160 Upgrade Log4j2 and Slf4j2 versions to the latest

* ACS-3160 Temporarily remove AOS for test purposes [tas][db]

* [ACS-3160] remove setting level from removeAbstractAppenderFromLogger

* ACS-3160 Remove references to SanitizingPatternLayout [tas]

* ACS-3892 Migrate ags-community-repo AMP to Log4j2

* ACS-3892 Reduce log4j-core scope to test

* ACS-3160 Update the aos-module version to 1.5.0-DEV-LOG4J2 [tas][db]

* [ACS-3924] upgrade greenmail version

* [ACS-3924] remove exclusion from greenmail

* ACS-3160 Fix NDC

* ACS-3160 Revert the NDC_REF

* ACS-3160 Test with googledrive with Log4j2

* ACS-3160 Log4j references cleanup

Co-authored-by: Domenico Sibilio <domenicosibilio@gmail.com>
Co-authored-by: Damian.Ujma@hyland.com <Damian.Ujma@hyland.com>
2022-12-05 15:07:50 +01:00
mpichura
7cd154ef86 ACS-4005: Removing duplicate RestTest class. 2022-12-05 14:29:19 +01:00
Travis CI User
728e305a93 [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-04 00:10:38 +00:00
Travis CI User
490805b116 [maven-release-plugin][skip ci] prepare release 20.29 2022-12-04 00:10:36 +00:00
Alfresco CI User
752b64e320 [force] Force release for 2022-12-04. 2022-12-04 00:03:09 +00:00
Travis CI User
8bc9d13d35 [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-02 12:45:35 +00:00
Travis CI User
dece409b38 [maven-release-plugin][skip ci] prepare release 20.28 2022-12-02 12:45:32 +00:00
MohinishSah
1d59b20adb Updating Google docs version 2022-12-02 17:28:54 +05:30
Tom Page
85349293c4 ACS-4005 Reinstate plugin for generating POJOs from OpenAPI yaml. 2022-12-01 14:39:03 +00:00
Travis CI User
ba7be5999b [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-30 09:49:48 +00:00
Travis CI User
8503b2c96c [maven-release-plugin][skip ci] prepare release 20.27 2022-11-30 09:49:45 +00:00
rrajoria
f43806b9f4 Updating googledrive version 2022-11-30 14:00:25 +05:30
brijmohan1
1eebb8ec12 Feature/RM-7178 Event apis swagger (#1572)
* Added Events Management Section in Swagger

* Removed Events Management Section in Swagger

* RM-7178 swagger implementation for event APIs.

* RM-7178 event API swagger header description .

* RM-7178 event API swagger header description .

* RM-7178 updated create event API description .

* Updated Swagger for Event Management

* RM-7178 updated put and create event API description and body.

* Added /event-type endpoint

* Addressed review comments

* RM-7178 updated swagger for review comments.

* RM-7178 updated swagger for review comments.

* RM-7178 updated swagger for review comments.

* Addressed review comments

* Addressed review comments

* RM-7178 added changes for swagger review comments.

* RM-7178 added changes for swagger review comments.

* RM-7178 added changes for pagination in event and event type.

* Addressed review comments

* Addressed review comments

* Addressed review comments (Added 400 response code for paging GET APIs)

* Addressed review comments

* Addressed review comments

* Addressed review comments

* Addressed review comments

* Addressed review comments

* Addressed review comments

Co-authored-by: suneet-gupta <Suneet.Gupta@contractor.alfresco.com>
Co-authored-by: suneet-gupta <suneet.gupta@hyland.com>
2022-11-28 21:45:56 +05:30
Travis CI User
008b340851 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-27 00:11:03 +00:00
Travis CI User
6d3e249149 [maven-release-plugin][skip ci] prepare release 20.26 2022-11-27 00:11:00 +00:00
Alfresco CI User
bf276c60d6 [force] Force release for 2022-11-27. 2022-11-27 00:03:19 +00:00
Travis CI User
54be23513a [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-25 13:54:15 +00:00
Travis CI User
fa0fdff8d4 [maven-release-plugin][skip ci] prepare release 20.25 2022-11-25 13:54:12 +00:00
kcichonczyk
c37b26e678 [ACS-4053] updated INSIGHT_ENGINE_TAG and SOLR tag to 2.0.5.1 (#1578) 2022-11-25 14:17:20 +01:00
Travis CI User
b5e13e253a [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-24 16:27:05 +00:00
Travis CI User
5b5164420f [maven-release-plugin][skip ci] prepare release 20.24 2022-11-24 16:27:02 +00:00
George Evangelopoulos
17c09efb93 ACS-4064: fix for linking from a folder with inherited rules (#1577)
* ACS-4064: fix for linking from a folder with inherited rules

* ACS-4064: fix failing tests and add E2E
2022-11-24 15:48:27 +00:00
Travis CI User
f96304bd28 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-24 14:20:41 +00:00
Travis CI User
499f679c8c [maven-release-plugin][skip ci] prepare release 20.23 2022-11-24 14:20:38 +00:00
Piotr Żurek
80c6a0127d MNT-22686 Load template from the classpath (#1576) 2022-11-24 14:40:13 +01:00
Tom Page
901e4f4fea ACS-4005 Remove TAS REST files that are no longer needed. 2022-11-24 11:52:13 +00:00
Travis CI User
74e44acb1c [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-23 18:24:44 +00:00
Travis CI User
f4d66debea [maven-release-plugin][skip ci] prepare release 20.22 2022-11-23 18:24:41 +00:00
George Evangelopoulos
af838043c9 ACS-3964: fix for non-inheritable rules still appearing in inherited rule sets (#1565)
* ACS-3964: fix for non-inheritable rules still appearing in inherited rule sets

* ACS-3964: fix failing E2Es and add negative test
2022-11-23 16:24:15 +00:00
Travis CI User
1245647a9f [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-23 15:48:46 +00:00
Travis CI User
fe35f312bb [maven-release-plugin][skip ci] prepare release 20.21 2022-11-23 15:48:43 +00:00
Kacper Magdziarz
a5f16f1b11 Fix/mnt 22686 allow complex rest action params (#1569)
* MNT-22686 Allow more complex action params

* MNT-22686 Add email template test

Co-authored-by: pzurek <Piotr.Zurek@hyland.com>
Co-authored-by: Sara Aspery <sara.aspery@alfresco.com>
2022-11-23 15:11:48 +00:00
Sbisht19
38a9f6d3e1 Merge pull request #1531 from Alfresco/feature/APPS-1722
Feature/apps 1722
2022-11-23 14:12:02 +05:30
sbisht
dc512e5ab0 Merge remote-tracking branch 'origin/feature/APPS-1722' into feature/APPS-1722 2022-11-22 11:54:24 +05:30
sbisht
5c8db99231 updated FileVersionAsRecordRuleTest and FileAsRecordRuleTest [ags] 2022-11-22 11:53:37 +05:30
ashiva
e39a97ed8d "MoveToRuleOnFoldersTest changed names from E and NE to ELECTRONIC AND NON-ELECTRONIC RECORDS"[ags] 2022-11-22 06:07:53 +00:00
Travis CI User
ad0ad081c6 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-20 00:10:49 +00:00
Travis CI User
8b9513ca8f [maven-release-plugin][skip ci] prepare release 20.20 2022-11-20 00:10:46 +00:00
Alfresco CI User
5b3582c051 [force] Force release for 2022-11-20. 2022-11-20 00:03:27 +00:00
Tom Page
dec17c4003 ACS-4005 Exclude unit tests from tests jar. 2022-11-18 15:07:36 +00:00
Travis CI User
ccba1768bd [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-18 09:49:39 +00:00
Travis CI User
fde8ff084b [maven-release-plugin][skip ci] prepare release 20.19 2022-11-18 09:49:36 +00:00
rrajoria
93a7790d44 MNT-23204: Group Search (#1558) 2022-11-18 14:39:27 +05:30
ashiva
f03790e278 "MoveToRuleOnFoldersTest Completed With Creation of updateMetaData method and declration of variables to global scope"[ags] 2022-11-17 13:00:40 +00:00
ashiva
2c979ea71e "MoveToRuleOnFoldersTest Completed Refactor of code left"[ags] 2022-11-17 11:57:09 +00:00
Tom Page
cc23d94054 ACS-4005 Remove tests for empty path parameters. [tas][ags] 2022-11-17 09:39:26 +00:00
Tom Page
19b5af2eee ACS-4005 Only include AGS REST tests if we include TAS. [tas][ags]
The AGS REST tests use alfresco-tas-restapi, so this is a requirement.

Build the related maven modules first in a separate step.
2022-11-17 09:39:20 +00:00
ashiva
227c74a8bd Merge remote-tracking branch 'origin/feature/APPS-1722' into feature/APPS-1722 2022-11-16 13:56:30 +00:00
ashiva
24aa64c165 "MoveToRuleOnFoldersTest initial changes made"[ags] 2022-11-16 13:55:47 +00:00
cchandan
183873166c Added FileAsRecordRuleTests [ags] 2022-11-16 16:57:24 +05:30
Travis CI User
6e4bb33fb1 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-16 11:02:27 +00:00
Travis CI User
ae37c9273f [maven-release-plugin][skip ci] prepare release 20.18 2022-11-16 11:02:24 +00:00
evasques
783efca1d2 MNT-23108 - Manage contentStream resource closure in RemoteTransformerClient request (#1559)
* Manage contentStream resource closure so we don't have connections hanging when we lose connection to AIO
2022-11-16 10:14:55 +00:00
sbisht
1c9419d635 updated CopyToRuleOnFoldersTest [ags] 2022-11-16 11:47:27 +05:30
Tom Page
0b7c52f0e2 ACS-4005 Merge alfresco-tas-restapi into the Repository. [tas][ags] 2022-11-15 15:50:50 +00:00
Travis CI User
03f80ace94 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-15 14:54:44 +00:00
Travis CI User
e2a62cf315 [maven-release-plugin][skip ci] prepare release 20.17 2022-11-15 14:54:40 +00:00
dependabot[bot]
1cd7253f76 Bump mockito-core from 4.8.1 to 4.9.0 (#1557)
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.8.1 to 4.9.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.8.1...v4.9.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-15 15:15:00 +01:00
sbisht
17b04d7321 updated FileVersionAsRecordRuleTest [ags] 2022-11-15 16:38:12 +05:30
sbisht
fe5faa3263 updated CopyToRuleOnFoldersTest [ags] 2022-11-15 12:16:44 +05:30
Travis CI User
85e2d84add [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-14 14:03:07 +00:00
Travis CI User
7e7d86aca8 [maven-release-plugin][skip ci] prepare release 20.16 2022-11-14 14:03:05 +00:00
dependabot[bot]
6eab9d2cfb Bump email from 1.9 to 1.11 (#1408)
Bumps [email](https://github.com/Alfresco/alfresco-tas-email) from 1.9 to 1.11.
- [Release notes](https://github.com/Alfresco/alfresco-tas-email/releases)
- [Changelog](https://github.com/Alfresco/alfresco-tas-email/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/Alfresco/alfresco-tas-email/compare/v1.9...v1.11)

---
updated-dependencies:
- dependency-name: org.alfresco.tas:email
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 13:25:07 +00:00
dependabot[bot]
5588cc45a2 Bump maven-jar-plugin from 3.2.2 to 3.3.0 (#1406)
Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.2 to 3.3.0.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.2...maven-jar-plugin-3.3.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 13:24:45 +00:00
Travis CI User
b32da2af76 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-14 10:04:07 +00:00
Travis CI User
ee912bf126 [maven-release-plugin][skip ci] prepare release 20.15 2022-11-14 10:04:04 +00:00
dependabot[bot]
38c638b0ce Bump dependency.jackson.version from 2.14.0-rc1 to 2.14.0 (#1539)
Bumps `dependency.jackson.version` from 2.14.0-rc1 to 2.14.0.

Updates `jackson-core` from 2.14.0-rc1 to 2.14.0
- [Release notes](https://github.com/FasterXML/jackson-core/releases)
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.14.0-rc1...jackson-core-2.14.0)

Updates `jackson-databind` from 2.14.0-rc1 to 2.14.0
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `jackson-datatype-joda` from 2.14.0-rc1 to 2.14.0
- [Release notes](https://github.com/FasterXML/jackson-datatype-joda/releases)
- [Commits](https://github.com/FasterXML/jackson-datatype-joda/compare/jackson-datatype-joda-2.14.0-rc1...jackson-datatype-joda-2.14.0)

Updates `jackson-dataformat-yaml` from 2.14.0-rc1 to 2.14.0
- [Release notes](https://github.com/FasterXML/jackson-dataformats-text/releases)
- [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.14.0-rc1...jackson-dataformats-text-2.14.0)

Updates `jackson-annotations` from 2.14.0-rc1 to 2.14.0
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `jackson-module-jaxb-annotations` from 2.14.0-rc1 to 2.14.0
- [Release notes](https://github.com/FasterXML/jackson-modules-base/releases)
- [Commits](https://github.com/FasterXML/jackson-modules-base/compare/jackson-modules-base-2.14.0-rc1...jackson-modules-base-2.14.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 09:20:05 +00:00
Travis CI User
db2982ea62 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-13 00:09:53 +00:00
Travis CI User
71454395cb [maven-release-plugin][skip ci] prepare release 20.14 2022-11-13 00:09:50 +00:00
Alfresco CI User
9059d5a87b [force] Force release for 2022-11-13. 2022-11-13 00:03:40 +00:00
Travis CI User
71f8784a7e [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-11 17:20:59 +00:00
Travis CI User
088d8f9448 [maven-release-plugin][skip ci] prepare release 20.13 2022-11-11 17:20:57 +00:00
Tom Page
0d43100018 ACS-3975 Disable intermittent test AddFavoritesTests.addFileFavoriteUsingTagId. 2022-11-11 14:19:13 +00:00
dependabot[bot]
93800b6906 Bump dependency.cxf.version from 3.5.3 to 3.5.4 (#1493)
Bumps `dependency.cxf.version` from 3.5.3 to 3.5.4.

Updates `cxf-rt-frontend-jaxws` from 3.5.3 to 3.5.4

Updates `cxf-rt-frontend-jaxrs` from 3.5.3 to 3.5.4

Updates `cxf-rt-rs-client` from 3.5.3 to 3.5.4

Updates `cxf-rt-transports-http` from 3.5.3 to 3.5.4

Updates `cxf-rt-ws-policy` from 3.5.3 to 3.5.4

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 14:05:24 +00:00
dependabot[bot]
82f8b938a6 Bump swagger-parser from 1.0.61 to 1.0.63 (#1503)
Bumps [swagger-parser](https://github.com/swagger-api/swagger-parser) from 1.0.61 to 1.0.63.
- [Release notes](https://github.com/swagger-api/swagger-parser/releases)
- [Commits](https://github.com/swagger-api/swagger-parser/compare/v1.0.61...v1.0.63)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 14:03:46 +00:00
dependabot[bot]
8727ee18e8 Bump icu4j from 71.1 to 72.1 (#1510)
Bumps [icu4j](https://github.com/unicode-org/icu) from 71.1 to 72.1.
- [Release notes](https://github.com/unicode-org/icu/releases)
- [Commits](https://github.com/unicode-org/icu/commits)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 14:03:31 +00:00
dependabot[bot]
a688d475dc Bump mockito-core from 4.6.1 to 4.8.1 (#1516)
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.6.1 to 4.8.1.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.6.1...v4.8.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 14:03:17 +00:00
dependabot[bot]
83b1c323de Bump woodstox-core from 6.3.1 to 6.4.0 in /repository (#1524)
Bumps [woodstox-core](https://github.com/FasterXML/woodstox) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/FasterXML/woodstox/releases)
- [Commits](https://github.com/FasterXML/woodstox/compare/woodstox-core-6.3.1...woodstox-core-6.4.0)

---
updated-dependencies:
- dependency-name: com.fasterxml.woodstox:woodstox-core
  dependency-type: direct:production
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 14:01:34 +00:00
dependabot[bot]
e063e1d816 Bump woodstox-core from 6.3.1 to 6.4.0 (#1525)
Bumps [woodstox-core](https://github.com/FasterXML/woodstox) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/FasterXML/woodstox/releases)
- [Commits](https://github.com/FasterXML/woodstox/compare/woodstox-core-6.3.1...woodstox-core-6.4.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 14:01:12 +00:00
dependabot[bot]
65c62c7d03 Bump commons-compress from 1.21 to 1.22 (#1528)
Bumps commons-compress from 1.21 to 1.22.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 14:00:45 +00:00
dependabot[bot]
7a6949a059 Bump spring-security-core from 5.7.3 to 5.7.5 (#1529)
Bumps [spring-security-core](https://github.com/spring-projects/spring-security) from 5.7.3 to 5.7.5.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.7.3...5.7.5)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 14:00:30 +00:00
dependabot[bot]
1a0e45b6c8 Bump joda-time from 2.11.1 to 2.12.1 (#1530)
Bumps [joda-time](https://github.com/JodaOrg/joda-time) from 2.11.1 to 2.12.1.
- [Release notes](https://github.com/JodaOrg/joda-time/releases)
- [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt)
- [Commits](https://github.com/JodaOrg/joda-time/compare/v2.11.1...v2.12.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 14:00:14 +00:00
dependabot[bot]
1d1dead902 Bump alfresco-greenmail from 6.4 to 6.5 (#1541)
Bumps [alfresco-greenmail](https://github.com/Alfresco/alfresco-greenmail) from 6.4 to 6.5.
- [Release notes](https://github.com/Alfresco/alfresco-greenmail/releases)
- [Commits](https://github.com/Alfresco/alfresco-greenmail/compare/alfresco-greenmail-6.4...alfresco-greenmail-6.5)

---
updated-dependencies:
- dependency-name: org.alfresco:alfresco-greenmail
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 13:56:21 +00:00
dependabot[bot]
6a69b3fd86 Bump junrar from 7.5.3 to 7.5.4 (#1542)
Bumps [junrar](https://github.com/junrar/junrar) from 7.5.3 to 7.5.4.
- [Release notes](https://github.com/junrar/junrar/releases)
- [Changelog](https://github.com/junrar/junrar/blob/master/CHANGELOG.md)
- [Commits](https://github.com/junrar/junrar/compare/v7.5.3...v7.5.4)

---
updated-dependencies:
- dependency-name: com.github.junrar:junrar
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 13:55:54 +00:00
tiagosalvado10
f391cfa38c [MNT-23158] Scripts limits configuration and optimization (#1519) 2022-11-11 10:58:25 +00:00
Travis CI User
fbef1156a8 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-10 15:39:26 +00:00
Travis CI User
5d93c2efd4 [maven-release-plugin][skip ci] prepare release 20.12 2022-11-10 15:39:23 +00:00
Travis CI User
c94807cd8c [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-10 14:34:49 +00:00
Travis CI User
ff979314ae [maven-release-plugin][skip ci] prepare release 20.11 2022-11-10 14:34:46 +00:00
Vítor Moreira
7f6bd86b0c MNT-22485: added missing tables to query (#1547) 2022-11-10 13:53:22 +00:00
Travis CI User
fd2f793722 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-10 05:17:05 +00:00
Travis CI User
489b0058fe [maven-release-plugin][skip ci] prepare release 20.10 2022-11-10 05:17:02 +00:00
Vítor Moreira
14572d328f MNT-22485: audit query with createdAt criteria returns correct totalI… (#1535)
* MNT-22485: audit query with createdAt criteria returns correct totalItems
2022-11-09 15:58:49 +00:00
MohinishSah
759927c37b updated Gdrive Alpha version 2022-11-09 21:09:16 +05:30
Travis CI User
42ef2160ef [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-09 12:09:02 +00:00
Travis CI User
4f561166b7 [maven-release-plugin][skip ci] prepare release 20.9 2022-11-09 12:08:59 +00:00
Antonio Felix
295a8f7ba2 MNT-23276 - The null facet name should be considered (#1540) 2022-11-09 11:31:51 +00:00
Piyush Joshi
fd73ebe45a Merge pull request #1532 from Alfresco/MNT-22353_Cutoff_Handling_of_Records_in_Hold
[MNT-22353]- Removed Hold cases to be processed in DispositionLifecycleJob
2022-11-09 15:21:41 +05:30
pjoshi31
3bbaabd755 [MNT-22353]- Formatting Changes. 2022-11-09 12:48:16 +05:30
sbisht
63b0ff8cf4 Added FileVersionAsRecordRuleTest [ags] 2022-11-09 10:34:29 +05:30
sbisht
15c99b0c10 Merge remote-tracking branch 'origin/feature/APPS-1722' into feature/APPS-1722 2022-11-09 10:33:47 +05:30
sbisht
0f24f453c8 Added FileVersionAsRecordRuleTest [ags] 2022-11-09 10:33:14 +05:30
Travis CI User
ed50b9bb9b [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-08 14:23:32 +00:00
Travis CI User
361a674a19 [maven-release-plugin][skip ci] prepare release 20.8 2022-11-08 14:23:29 +00:00
Kacper Magdziarz
9f839b5372 Feature/acs-3644 Allow multiple docker-copose files (#1533)
* ACS-3644 enable usage of multiple docker-compose files in start-compose.sh
2022-11-08 12:05:15 +01:00
Piyush Joshi
c76d3b99c4 Update DispositionLifecycleJobExecuter.java 2022-11-07 21:25:03 +05:30
Piyush Joshi
4998f19da9 Update DispositionLifecycleJobExecuter.java 2022-11-07 21:24:10 +05:30
Travis CI User
b1340d12ef [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-07 15:10:48 +00:00
Travis CI User
2b79a4489d [maven-release-plugin][skip ci] prepare release 20.7 2022-11-07 15:10:46 +00:00
Maciej Pichura
e41fc6af02 ACS-3855: Add validation for rule condition comparator. (#1538) 2022-11-07 15:31:19 +01:00
pjoshi31
162264a8d7 [MNT-22353]- Added UnitTest Changes. 2022-11-07 18:32:17 +05:30
pjoshi31
a5977fedb2 [MNT-22353]- Removed length condition. 2022-11-07 12:19:27 +05:30
Travis CI User
024e4e072b [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-06 00:10:56 +00:00
Travis CI User
5c33911e5f [maven-release-plugin][skip ci] prepare release 20.6 2022-11-06 00:10:53 +00:00
Alfresco CI User
2a6eb91ebd [force] Force release for 2022-11-06. 2022-11-06 00:03:33 +00:00
Travis CI User
c588b915d5 [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-04 17:05:47 +00:00
Travis CI User
4e2384fd9a [maven-release-plugin][skip ci] prepare release 20.5 2022-11-04 17:05:44 +00:00
Antonio Felix
6071188405 MNT-23276 - Protect from null facet names (#1534) 2022-11-04 16:17:12 +00:00
ashiva
03ce7e37d4 "MoveToRuleOnFoldersTest added metadata update and and copy of records"[ags] 2022-11-04 15:39:08 +00:00
ashiva
1a5740eec1 Merge remote-tracking branch 'origin/feature/APPS-1722' into feature/APPS-1722 2022-11-04 15:33:19 +00:00
ashiva
f55602842d "MoveToRuleOnFoldersTest added metadata update and and copy of records"[ags] 2022-11-04 15:32:37 +00:00
sbisht
7819e29bcc Added FileVersionAsRecordRuleTest [ags] 2022-11-04 16:37:18 +05:30
sbisht
91031ca72a Added FileAsRecordRuleTests [ags] 2022-11-04 15:48:03 +05:30
cchandan
32314480a1 Added FileAsRecordRuleTests [ags] 2022-11-04 15:10:49 +05:30
ashiva
f49b7a393f "MoveToRuleOnFoldersTest added rule and folder creation" 2022-11-04 08:20:04 +00:00
cchandan
d32ba12405 Merge remote-tracking branch 'origin/feature/APPS-1722' into feature/APPS-1722 2022-11-04 13:39:44 +05:30
cchandan
7430c80a41 Added FileAsRecordRuleTests [ags] 2022-11-04 13:39:11 +05:30
pjoshi31
4c2d9ef64d [MNT-22353]- Added comment. 2022-11-03 11:45:49 +05:30
pjoshi31
f71f243b9b [MNT-22353]- Changed variable. 2022-11-03 11:21:07 +05:30
pjoshi31
3f10227c0f [MNT-22353]- Added Streams for filtering frozen nodes. 2022-11-02 18:05:11 +05:30
pjoshi31
a361596512 [MNT-22353]- Added Parallel Streams for filtering frozen nodes. 2022-11-02 16:07:59 +05:30
pjoshi31
4ad2bda8b9 [MNT-22353]- Added debug logs. 2022-11-02 15:37:08 +05:30
pjoshi31
1339dd59a9 [MNT-22353]- Removed Hold cases to be processed. 2022-11-02 14:52:35 +05:30
ashiva
af2c11063b [ags]"MoveToRuleOnFoldersTest converted" 2022-11-02 07:26:06 +00:00
ashiva
0d74540b2b Merge branch 'feature/APPS-1722' of github.com:Alfresco/alfresco-community-repo into feature/APPS-1722 2022-11-02 07:18:54 +00:00
ashiva
d68ceb1a4b [ags]"MoveToRuleOnFoldersTest converted" 2022-11-02 07:06:46 +00:00
shishuraj.bisht
379f65db0d Added copyToRuleOnFoldersTest [ags] 2022-11-01 17:40:07 +05:30
Travis CI User
9dad28ee4d [maven-release-plugin][skip ci] prepare for next development iteration 2022-11-01 09:44:03 +00:00
Travis CI User
308dd9825a [maven-release-plugin][skip ci] prepare release 20.4 2022-11-01 09:44:00 +00:00
MohinishSah
609aa750d6 updated Gdrive version to verify PRODSEC issue 2022-11-01 14:28:39 +05:30
Travis CI User
def0201274 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-31 10:55:52 +00:00
Travis CI User
a7d885c630 [maven-release-plugin][skip ci] prepare release 20.3 2022-10-31 10:55:49 +00:00
kavitshah-gl
3fcbb076a2 feature/APPS-1672 (#1470)
* Adding test for the stage AGS Smoke UI Tests for actions in RM site

* pushed the createCategoriesTest in APPS-1550 brach

* pushed the createCategoriesTest in APPS-1550 branch

* pushed the CreateFoldersTests in APPS-1550 branch

* [ags]

* ~ /\[ags\]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* Revert "~ /\[ags\]"

This reverts commit ed9443e5

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* Adding FoldersDispositionScheduleTests

* Added foldersDispositionScheduleWithGhosting

* Added foldersDispositionScheduleWithoutGhosting

* Added RecordsDispositionScheduleTests and other fixes

* Added RecordsDispositionScheduleWithGhostingTests

* [ags api]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* Revert "[ags api]"

This reverts commit 2153eafc0f.

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* DispositionScheduleLinkedRecordsTest class added

* [ags]

* [ags]

* [ags]

* [ags]

* ags

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* Added Audit Holds Test

* Added NonElectronicRecordAuditLogTest file

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* Verifying the test cases execution. [ags]

* Revert "Verifying the test cases execution. [ags]"

This reverts commit 4f6b86fac6.

* Cleanup AuditHoldsTest. [ags]

* Fixed Review Comments. [ags]

* [ags]

* Revert "[ags]"

This reverts commit e2b650b82c.

Co-authored-by: sbisht <shishuraj.bisht@globallogic.com>
Co-authored-by: ashiva <aditya.shiva@globallogic.com>
Co-authored-by: omkar.yadav <omkar.yadav@globallogic.com>
2022-10-31 15:34:55 +05:30
Travis CI User
9ab4d29ff6 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-30 00:11:17 +00:00
Travis CI User
1388a76dc7 [maven-release-plugin][skip ci] prepare release 20.2 2022-10-30 00:11:14 +00:00
Alfresco CI User
1944186ef8 [force] Force release for 2022-10-30. 2022-10-30 00:03:44 +00:00
George Evangelopoulos
66ea8c0534 ACS-3699: Add test with broken copy action (#1506)
* ACS-3699: Add test with broken copy action
2022-10-28 09:38:28 +01:00
Vítor Moreira
571f4b121d MNT-22790: exclude rules to be included in ZIP file when downloading … (#1452)
* MNT-22790: exclude rules to be included in ZIP file when downloading a folder
2022-10-27 14:22:36 +01:00
Sara
2f2e7ade80 ACS-3732 Add test for freemarker unsafe method execution (#1508)
* ACS-3732 Add test for freemarker unsafe method execution
2022-10-27 15:12:33 +02:00
Travis CI User
2d69d44049 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-27 12:11:51 +00:00
Travis CI User
6ad58b137e [maven-release-plugin][skip ci] prepare release 20.1 2022-10-27 12:11:47 +00:00
Krystian Dabrowski
4c086751e6 Update Master branch to 7.4.0 2022-10-27 12:26:37 +02:00
Travis CI User
7cb98f2d5d [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-25 13:08:34 +00:00
Travis CI User
55faedde51 [maven-release-plugin][skip ci] prepare release 17.183 2022-10-25 13:08:31 +00:00
Elia Porciani
32a524eb1f Revert "Fix/acs 2699 mandatory modifier (#1472)" (#1520)
[ACS-3854] This reverts commit 75acf5110e.
2022-10-25 14:16:26 +02:00
Travis CI User
105702bf09 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-24 12:57:27 +00:00
Travis CI User
9e2e00c4a8 [maven-release-plugin][skip ci] prepare release 17.182 2022-10-24 12:57:24 +00:00
krdabrowski
e79eac4fd8 ACS-3689: Release API explorer (Final) 7.3.0 (#1518) 2022-10-24 14:19:58 +02:00
dependabot[bot]
20f9cfc42d Bump api-explorer from 7.3.0-A1 to 7.3.0 (#1517)
Bumps [api-explorer](https://github.com/Alfresco/rest-api-explorer) from 7.3.0-A1 to 7.3.0.
- [Release notes](https://github.com/Alfresco/rest-api-explorer/releases)
- [Commits](https://github.com/Alfresco/rest-api-explorer/compare/7.3.0-A1...7.3.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-24 14:33:17 +03:00
Travis CI User
5baee04dcc [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-23 00:13:01 +00:00
Travis CI User
f821756021 [maven-release-plugin][skip ci] prepare release 17.181 2022-10-23 00:12:58 +00:00
Alfresco CI User
ae68b517f1 [force] Force release for 2022-10-23. 2022-10-23 00:05:45 +00:00
Travis CI User
24b249d93d [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-21 17:04:37 +00:00
Travis CI User
5d9b11d121 [maven-release-plugin][skip ci] prepare release 17.180 2022-10-21 17:04:35 +00:00
Tom Page
902f3b5275 ACS-3793 Permissions tests for creating rules. (#1513)
* ACS-3793 Permissions tests for creating rules.

* ACS-3793 Include Test annotation in new permissions tests.

* ACS-3793: Changing the way permissions are updated.

Co-authored-by: mpichura <maciej.pichura@hyland.com>
2022-10-21 13:17:58 +02:00
Travis CI User
3801ed4d99 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-21 06:06:12 +00:00
Travis CI User
382a4799ae [maven-release-plugin][skip ci] prepare release 17.179 2022-10-21 06:06:09 +00:00
MohinishSah
67c44a934d Updated AOS and Google docs final version 2022-10-21 10:59:34 +05:30
Travis CI User
35a364beaa [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-20 18:15:31 +00:00
Travis CI User
68ed04cc6d [maven-release-plugin][skip ci] prepare release 17.178 2022-10-20 18:15:29 +00:00
MohinishSah
dc52bc107d [skip tests] 2022-10-20 23:38:14 +05:30
kcichonczyk
ff110af9b3 InsightEngine version updated to 2.0.5 (ACS-3679) (#1514) 2022-10-20 18:45:24 +02:00
Travis CI User
87b2e0f060 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-20 13:36:36 +00:00
Travis CI User
fd9d47826e [maven-release-plugin][skip ci] prepare release 17.177 2022-10-20 13:36:32 +00:00
Tom Page
6e31f713f0 ACS-3652 Script node validation. (#1507)
* ACS-3652 Add validation for individual actions.

In particular write access is required for the folder specified in the copy and move actions.

* ACS-3652: Adding action validations for node permissions.

* ACS-3652: Fixing failing E2E tests.

* ACS-3652: Adding E2E tests.

* ACS-3652: Adding E2E tests.

* ACS-3652 E2E tests for script validation.

* ACS-3652 Fix script validation test to use admin.

* ACS-3652: Removing unnecessary code.

* ACS-3652 E2Es for link to category action.

* ACS-3652 Fix test case for normal user using script in rule.

* ACS-3652: Adding applicable action definition check.

* ACS-3652: Adding more thorough action definition checks and fixing node permission and type checks.

* ACS-3652: Adding more thorough E2E tests and some fixes.

* ACS-3652: Adding more E2E tests and some fixes.

* ACS-3652: Fixing some missing corner cases, adding tests.

* ACS-3652: Small refactoring after code review.

Co-authored-by: mpichura <maciej.pichura@hyland.com>
2022-10-20 14:00:14 +01:00
Maciej Pichura
7a70b40cc0 ACS-3652 Node access validation for Rule Action Parameters, ACS-3795 Validate that action is suitable for use in rule (#1502)
* ACS-3652 Add validation for individual actions.

In particular write access is required for the folder specified in the copy and move actions.

* ACS-3652: Adding action validations for node permissions.

* ACS-3652: Fixing failing E2E tests.

* ACS-3652: Adding E2E tests.

* ACS-3652: Adding E2E tests.

* ACS-3652 E2E tests for script validation.

* ACS-3652 Fix script validation test to use admin.

* ACS-3652: Removing unnecessary code.

* ACS-3652 E2Es for link to category action.

* ACS-3652: Adding applicable action definition check.

* ACS-3652: Adding more thorough action definition checks and fixing node permission and type checks.

* ACS-3652: Adding more thorough E2E tests and some fixes.

* ACS-3652: Adding more E2E tests and some fixes.

* ACS-3652: Fixing some missing corner cases, adding tests.

* ACS-3652: Small refactoring after code review.

Co-authored-by: Tom Page <thomas.page@alfresco.com>
2022-10-20 14:39:29 +02:00
Travis CI User
96c437e6a4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-20 09:34:39 +00:00
Travis CI User
6e4a7c1866 [maven-release-plugin][skip ci] prepare release 17.176 2022-10-20 09:34:37 +00:00
Kacper Magdziarz
b72cf6f267 Upgrade to latest ATS components (#1511) 2022-10-20 10:58:02 +02:00
Travis CI User
f65fc31601 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-20 07:05:30 +00:00
Travis CI User
4697e7bac2 [maven-release-plugin][skip ci] prepare release 17.175 2022-10-20 07:05:26 +00:00
MohinishSah
50455c8730 Updating Google drive version A2 2022-10-20 11:38:07 +05:30
Maciej Pichura
2fac4d8a9b ACS-3788: Handling null/empty rule action parameter values. (#1505)
* ACS-3788: Handling null rule action parameter values.

* ACS-3788: Throwing exception when empty/null rule action parameter values.
2022-10-19 15:09:22 +02:00
Travis CI User
7a300dc9c9 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-18 03:51:49 +00:00
Travis CI User
a996cf1842 [maven-release-plugin][skip ci] prepare release 17.174 2022-10-18 03:51:46 +00:00
MohinishSah
1d9d6ad0bb updating AOS alpha version A7 2022-10-17 23:35:20 +05:30
Travis CI User
8ba67497e1 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-17 16:54:14 +00:00
Travis CI User
fd889628c6 [maven-release-plugin][skip ci] prepare release 17.173 2022-10-17 16:54:11 +00:00
Maciej Pichura
50b9f5c612 ACS-3759: Fixing bug for empty action parameter values (#1501)
* ACS-3759: Fixing bug for empty action parameter values

* ACS-3759: Fixing missing import
2022-10-17 18:07:32 +02:00
Travis CI User
e6bdd5738c [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-16 00:12:16 +00:00
Travis CI User
4bf29ca69c [maven-release-plugin][skip ci] prepare release 17.172 2022-10-16 00:12:13 +00:00
Alfresco CI User
f4f5fd4182 [force] Force release for 2022-10-16. 2022-10-16 00:05:13 +00:00
Travis CI User
dfb6f50056 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-15 11:15:03 +00:00
Travis CI User
c7227d19c4 [maven-release-plugin][skip ci] prepare release 17.171 2022-10-15 11:15:01 +00:00
MohinishSah
9b779facd9 updating Aos alpha version A6 2022-10-15 16:10:29 +05:30
MohinishSah
f64d0a1b59 Update pom.xml 2022-10-15 15:41:59 +05:30
MohinishSah
8974845671 Merge pull request #1500 from Alfresco/fix/test-aos
Fix/test aos
2022-10-15 12:39:18 +05:30
MohinishSah
a7ae83bbee Update pom.xml 2022-10-15 12:02:09 +05:30
Jared Ottley
ee1ac25bf6 Test AOS version 1.5.0-A4 2022-10-14 13:22:07 -06:00
Travis CI User
8757f0ff2b [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-14 16:28:19 +00:00
Travis CI User
37f5b637dd [maven-release-plugin][skip ci] prepare release 17.170 2022-10-14 16:28:16 +00:00
Tom Page
b369538a61 ACS-3651 Update rule util initialisation to be on request.
This avoids creating data before env is ready and in cases where we want an ootb repo.
2022-10-14 16:37:58 +01:00
Travis CI User
1f844ce199 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-14 14:05:20 +00:00
Travis CI User
6eb80bf64e [maven-release-plugin][skip ci] prepare release 17.169 2022-10-14 14:05:17 +00:00
rrajoria
2ab1023eb7 Reverting AOS Dependency 2022-10-14 18:59:36 +05:30
rrajoria
fe1233791d Updating GoogleDrive and AOS Dependencies 2022-10-14 18:44:52 +05:30
Travis CI User
d1079890f7 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-14 10:32:32 +00:00
Travis CI User
2660da2dcb [maven-release-plugin][skip ci] prepare release 17.168 2022-10-14 10:32:29 +00:00
mikolajbrzezinski
4f3382fd92 update ooxml schemas to poi-ooxml-lite (#1498) 2022-10-14 11:57:04 +02:00
Tom Page
86a213541f Merge pull request #1497 from Alfresco/feature/ACS-3651_NodeValidation
ACS-3651 Validate node pameters.
2022-10-14 09:25:55 +01:00
Tom Page
fd83b72226 Merge pull request #1496 from Alfresco/feature/ACS-3651_RulesUtilService
ACS-3651 Convert RulesTestsUtils to a service bean.
2022-10-14 09:25:20 +01:00
Tom Page
1d0dcf3e15 ACS-3651 Remove unused reference to node service. 2022-10-13 15:37:56 +01:00
Tom Page
38bff5dc82 ACS-3651 Add unit tests for node exists and read permission. 2022-10-13 15:01:41 +01:00
Travis CI User
7b026de665 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-13 13:14:50 +00:00
Travis CI User
983de15f72 [maven-release-plugin][skip ci] prepare release 17.167 2022-10-13 13:14:47 +00:00
Tom Page
9b8b1bbbe6 ACS-3651 Validate node pameters. 2022-10-13 14:05:12 +01:00
Tom Page
5aeb9c932a Merge branch 'master' into feature/ACS-3651_RulesUtilService 2022-10-13 13:29:40 +01:00
Tom Page
32aa786c3f ACS-3651 Convert RulesTestsUtils to a service bean.
Update a few dummy folder nodes to use real folders.
2022-10-13 11:51:45 +01:00
Maciej Pichura
1759364b50 ACS-3723, ACS-3724, ACS-3725 move rules V1 API to private space (#1495)
* ACS-3723: Moving endpoints to private API path.

* ACS-3723: Fixes to E2E tests and some other parts.

* ACS-3723: Removing unnecessary imports.
2022-10-13 12:38:44 +02:00
Travis CI User
5822065f5c [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-13 09:07:52 +00:00
Travis CI User
0f8b7740b0 [maven-release-plugin][skip ci] prepare release v1.135 2022-10-13 09:07:50 +00:00
Maciej Pichura
dd017f2535 ACS-3719: Allow calling rule endpoints via private API. (#267)
* ACS-3719: Allow calling rule endpoints via private API.

* ACS-3719: Organizing imports.
2022-10-13 11:02:48 +02:00
Travis CI User
2ecb64628e [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-13 08:19:55 +00:00
Travis CI User
1fb4ab3bb8 [maven-release-plugin][skip ci] prepare release 17.166 2022-10-13 08:19:52 +00:00
Sara
771e4bb88b ACS-2579 Bump freemarker to 2.3.31-alfresco-patched (#1492) 2022-10-13 09:12:12 +02:00
Travis CI User
6cd05f9845 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-13 05:01:11 +00:00
Travis CI User
1bafb3006c [maven-release-plugin][skip ci] prepare release 17.165 2022-10-13 05:01:08 +00:00
MohinishSah
96c185c25f Merge pull request #1486 from Alfresco/fix/PRODSEC-6265_New
Handle XSS
2022-10-13 09:50:51 +05:30
Travis CI User
94f99bf0fa [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-12 16:12:18 +00:00
Travis CI User
fa0e90e267 [maven-release-plugin][skip ci] prepare release 17.164 2022-10-12 16:12:15 +00:00
Piotr Żurek
9c0799b49a ACS-2579 Use vanilla freemarker (#1491) 2022-10-12 17:12:35 +02:00
mstrankowski
1bbaf470a7 Update transform-core to 3.0.0-A6
Update transform-service to 2.0.0-A5
2022-10-12 16:12:01 +03:00
Travis CI User
7fe4c82adb [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-12 05:34:15 +00:00
Travis CI User
aed31a98e3 [maven-release-plugin][skip ci] prepare release 17.163 2022-10-12 05:34:13 +00:00
kcichonczyk
1f7987469b [ACS-3678] updated InsightEngine version to 2.0.5-A2 (#1489) 2022-10-11 22:26:20 +02:00
Travis CI User
96e176b83e [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-11 15:56:15 +00:00
Travis CI User
de14eb97cb [maven-release-plugin][skip ci] prepare release 17.162 2022-10-11 15:56:11 +00:00
krdabrowski
8ff074dfea ACS-3620: E2Es - API for manual triggering rules on a folder (#1482)
- adding "alwaysRun = true" to @BeforeMethod due to failing acs-packaging "REST API TAS tests with AIMS"
2022-10-11 17:14:43 +02:00
Travis CI User
a27a5571bc [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-11 14:31:41 +00:00
Travis CI User
3f9b18d110 [maven-release-plugin][skip ci] prepare release 17.161 2022-10-11 14:31:38 +00:00
Tom Page
623d166a76 Merge pull request #1487 from Alfresco/feature/ACS-3595_ActionParamMap
ACS-3651 Use Serializable for values in action parameters.
2022-10-11 14:53:02 +01:00
Travis CI User
6502924f8e [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-11 13:42:04 +00:00
Travis CI User
918e1cf183 [maven-release-plugin][skip ci] prepare release 17.160 2022-10-11 13:42:01 +00:00
Aleksandra Onych
59ab7e9458 ACS-3635 Alfresco WebDAV CSRF - allowInsecurePOSTMethod flag (#1488) 2022-10-11 15:05:48 +02:00
Tom Page
ccd421871c ACS-3651 Use Serializable for values in action parameters. 2022-10-11 12:00:17 +01:00
Travis CI User
ddb5f56a64 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-11 10:48:31 +00:00
Travis CI User
2d4298ee45 [maven-release-plugin][skip ci] prepare release v1.134 2022-10-11 10:48:29 +00:00
Tom Page
f844fe45f8 ACS-3595 Action params are a map of key-value pairs. (#266)
Update existing implementation to use Serializable values, rather than Strings.
2022-10-11 11:43:12 +01:00
Travis CI User
fa1e616c72 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-11 10:40:52 +00:00
Travis CI User
5a34a2b01a [maven-release-plugin][skip ci] prepare release 17.159 2022-10-11 10:40:49 +00:00
Piotr Żurek
aae87ebffd PRODSEC-6550 Fix CSRF in the WebScript console Refresh Scripts form (#1483) 2022-10-11 12:05:35 +02:00
rrajoria
679746c907 Handle XSS 2022-10-11 13:01:09 +05:30
Travis CI User
44947e3d06 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-11 06:22:01 +00:00
Travis CI User
a94e660047 [maven-release-plugin][skip ci] prepare release 17.158 2022-10-11 06:21:59 +00:00
Marcin Strankowski
561d7d2f5a Update transform-core to 3.0.0-A4, transform-service to 2.0.0-A4, remove different version for jackson-databind. Update jackson version to 2.14.0-rc1 (#1484) 2022-10-11 08:44:52 +03:00
Travis CI User
78e69353d4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-10 19:29:30 +00:00
Travis CI User
71a88870bd [maven-release-plugin][skip ci] prepare release 17.157 2022-10-10 19:29:27 +00:00
George Evangelopoulos
6bcf33d672 ACS-3616: fix exception type for missing node id (#1457)
* ACS-3616: fix exception type for missing node id

* ACS-3616: fix exception handling for missing node id

* ACS-3616: update javadoc, add a constructor for the exception
2022-10-10 21:52:19 +03:00
Travis CI User
81f2bd7018 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-10 16:08:17 +00:00
Travis CI User
b3968bcd9e [maven-release-plugin][skip ci] prepare release 17.156 2022-10-10 16:08:14 +00:00
Maciej Pichura
307eaff896 ACS-3649, ACS-3650 Action validation mechanism + validations against Action Definitions (#1481)
* ACS-3572: Action constraints endpoint + logic + unit tests.

* ACS-3572: Action constraints endpoint + logic + unit tests.

* ACS-3572: Action constraints endpoint fixes.

* ACS-3572: Cleanup after removal of GET all Action constraints.

* ACS-3572: Fixing formatting in tests.

* ACS-3572: Loosening V1 constraints restrictions for aspects, types and properties.

* ACS-3649: Action validators - constraints.

* ACS-3649: Action validators - constraints.

* ACS-3649: Action validators - constraints.

* ACS-3572: Adding validation for extra paramater.

* ACS-3649: Small refactors and fixes.

* ACS-3649: Validations against action definition.

* ACS-3649: Adding @Experimental annotation.

* ACS-3649: Fixes/refactoring after code review.

* ACS-3649: Removing ignored test
2022-10-10 17:13:51 +02:00
Travis CI User
0cfedbc979 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-10 09:13:35 +00:00
Travis CI User
89522ba09d [maven-release-plugin][skip ci] prepare release 17.155 2022-10-10 09:13:32 +00:00
Tom Page
86761bd408 Merge pull request #1478 from Alfresco/feature/ACS-3615_AllowNullParams
ACS-3615 Allow actions in rules without any params.
2022-10-10 09:29:29 +01:00
Maciej Pichura
4d6b4c2ecf ACS-3572 V1 API for action constraints (#1469)
* ACS-3572: Action constraints endpoint + logic + unit tests.

* ACS-3572: Action constraints endpoint + logic + unit tests.

* ACS-3572: Action constraints endpoint fixes.

* ACS-3572: Cleanup after removal of GET all Action constraints.

* ACS-3572: Fixing formatting in tests.

* ACS-3572: Loosening V1 constraints restrictions for aspects, types and properties.

* ACS-3572: Removing unnecessary code.

* ACS-3572: Removing unnecessary field.

* ACS-3572: Removing unnecessary field - fixing the tests.

* ACS-3572: Renaming the endpoint and fixing license headers.

* ACS-3572: Fixing license headers.

* ACS-3572: Fixing tas-restapi dependency version.

* ACS-3649: Bumping tes-restapi version.

* ACS-3649: Bumping tes-restapi version.
2022-10-10 10:14:47 +02:00
Travis CI User
98cb7762c4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-09 09:44:47 +00:00
Travis CI User
ee01595f31 [maven-release-plugin][skip ci] prepare release 17.154 2022-10-09 09:44:44 +00:00
Elia Porciani
75acf5110e Fix/acs 2699 mandatory modifier (#1472)
[ACS-2699] managed + and - modifiers in fts query parser
2022-10-09 10:47:18 +02:00
Travis CI User
3a5971e267 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-09 00:11:41 +00:00
Travis CI User
99ef570054 [maven-release-plugin][skip ci] prepare release 17.153 2022-10-09 00:11:39 +00:00
Alfresco CI User
9649324d33 [force] Force release for 2022-10-09. 2022-10-09 00:04:36 +00:00
Tom Page
ad96f85251 ACS-3615 Allow actions in rules without any params. 2022-10-07 16:37:08 +01:00
krdabrowski
7ac48f8a99 ACS-3687: Execute rules API: Remove field "isEachInheritedRuleExecuted" (#1476)
* ACS-3620: E2Es - API for manual triggering rules on a folder
2022-10-07 17:01:08 +02:00
Travis CI User
aa38bcf9df [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-07 14:27:33 +00:00
Travis CI User
86d1d36ffe [maven-release-plugin][skip ci] prepare release 17.152 2022-10-07 14:27:31 +00:00
krdabrowski
b557a0d0f1 ACS-3620: E2Es - API for manual triggering rules on a folder (#1471) 2022-10-07 15:51:48 +02:00
Tom Page
1f81a50677 Merge pull request #1474 from Alfresco/feature/ACS-3657_PartialListOfRuleSets
ACS-3657 Allow returning partial list of rule sets.
2022-10-07 14:38:39 +01:00
Travis CI User
c76a220dd4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-07 13:19:18 +00:00
Travis CI User
c1862bed27 [maven-release-plugin][skip ci] prepare release v1.133 2022-10-07 13:19:17 +00:00
Maciej Pichura
62285171b9 ACS-3572 V1 API action constraints (#264)
* ACS-3572: fixing java doc.

* ACS-3572: fixing java doc for endpoint path.
2022-10-07 15:14:18 +02:00
Travis CI User
830d44dbcc [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-07 12:32:45 +00:00
Travis CI User
c77964ba34 [maven-release-plugin][skip ci] prepare release v1.132 2022-10-07 12:32:43 +00:00
krdabrowski
3d39b49d43 ACS-3687: Execute rules API: Remove field "isEachInheritedRuleExecuted" (#262) 2022-10-07 14:27:45 +02:00
Tom Page
855e2522f2 ACS-3657 Allow returning partial list of rule sets.
If a user does not have access to a rule set applied to a node then it will be
excluded from the results, but the user will be able to see the list of other
rule sets.

Also add E2E tests for permissions when viewing rule sets.
2022-10-07 13:03:37 +01:00
Travis CI User
dac17894c7 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-07 11:38:07 +00:00
Travis CI User
9d282ef5c2 [maven-release-plugin][skip ci] prepare release v1.131 2022-10-07 11:38:06 +00:00
Maciej Pichura
763dbe7964 ACS-3572 V1 API action constraints - fixing path (#263)
* ACS-3572: Adding models and a method for action constraints.

* ACS-3572: Simplifying model for action constraints.

* ACS-3572: Simplifying model for action constraints - fix.
2022-10-07 13:32:48 +02:00
Travis CI User
f342b27c74 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-07 11:29:09 +00:00
Travis CI User
b00f01d385 [maven-release-plugin][skip ci] prepare release 17.151 2022-10-07 11:29:06 +00:00
rrajoria
ce68c4bf8b Reverting Change 2022-10-07 15:58:52 +05:30
Travis CI User
0b4a8c15a4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-07 09:57:52 +00:00
Travis CI User
f8d3788332 [maven-release-plugin][skip ci] prepare release v1.130 2022-10-07 09:57:50 +00:00
Maciej Pichura
a51c1e2761 ACS-3572 V1 API Action Constraints - simplification (#261)
* ACS-3572: Adding models and a method for action constraints.

* ACS-3572: Simplifying model for action constraints.
2022-10-07 11:52:35 +02:00
Travis CI User
12cc55fde6 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-06 07:43:24 +00:00
Travis CI User
6008419f39 [maven-release-plugin][skip ci] prepare release v1.129 2022-10-06 07:43:22 +00:00
Maciej Pichura
def7ebc7bc ACS-3572: Adding models and a method for action constraints. (#260)
* ACS-3572: Adding models and a method for action constraints.

* Fixing a javadoc
2022-10-06 09:38:24 +02:00
Travis CI User
2544885f5e [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-05 17:02:40 +00:00
Travis CI User
1f7b272e57 [maven-release-plugin][skip ci] prepare release 17.150 2022-10-05 17:02:37 +00:00
Tom Page
df92ff9328 Merge pull request #1466 from Alfresco/feature/ACS-3630_PrivateActionTests
ACS-3630 E2E tests for creating and updating rules with private actions.
2022-10-05 16:24:47 +01:00
Travis CI User
b262c8fb92 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-05 15:19:28 +00:00
Travis CI User
0254323de5 [maven-release-plugin][skip ci] prepare release 17.149 2022-10-05 15:19:26 +00:00
Tom Page
89e8f7ff66 Merge master into ACS-3630_PrivateActionTests. 2022-10-05 16:09:29 +01:00
Tom Page
5735a41a40 Merge pull request #1468 from Alfresco/feature/ACS-3291_LinkUnlinkPermissionChecks
ACS-3291 Permission checks when linking and unlinking to rule sets.
2022-10-05 15:37:25 +01:00
Piotr Żurek
68b9a0e8a6 ACS-3643 Add meaningful message in the Workflow Console when deployment fails (#1467) 2022-10-05 15:53:42 +02:00
Tom Page
39f4a2179e ACS-3630 Use existing features in AccessRestrictionUtil. 2022-10-05 14:33:18 +01:00
Tom Page
440f0568e3 ACS-3291 Permission checks when linking and unlinking to rule sets. 2022-10-05 14:22:37 +01:00
krdabrowski
67f7fff0b7 ACS-3525: API for manual triggering rules on a folder (#1458)
* ACS-3525: API for manual triggering rules on a folder
2022-10-05 12:19:49 +02:00
Tom Page
1a08480f22 ACS-3630 E2E tests for creating and updating rules with private actions.
Ensure that 403 Forbidden is returned rather than 500 Internal Server Error.
2022-10-05 09:13:01 +01:00
Tom Page
8afd06a57f Merge pull request #1465 from Alfresco/feature/ACS-3605_LimitLinkedToBy
ACS-3605 Add limit to maximum size of optional linkedToBy field.
2022-10-05 09:05:21 +01:00
Tom Page
5e82555269 ACS-3605 Fix reference in unit test. 2022-10-04 16:21:23 +01:00
Tom Page
3682ddf652 ACS-3605 Add limit to maximum size of optional linkedToBy field. 2022-10-04 15:54:31 +01:00
Travis CI User
6747e300af [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-04 08:53:26 +00:00
Travis CI User
4bb2f67a48 [maven-release-plugin][skip ci] prepare release 17.148 2022-10-04 08:53:23 +00:00
Tom Page
c5c6b45f17 Merge pull request #1462 from Alfresco/feature/ACS-3377_UpdateRuleOrder
ACS-3377 Update rule order.
2022-10-04 09:16:30 +01:00
Travis CI User
1d9823d2e9 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-03 22:54:33 +00:00
Travis CI User
bfae9dd78d [maven-release-plugin][skip ci] prepare release 17.147 2022-10-03 22:54:30 +00:00
Kristian Dimitrov
86af67a435 ACS-3601: Add unlink e2es (#1461)
* ACS-3601: Add unlink e2es
2022-10-03 23:16:59 +01:00
Travis CI User
7ce6c121ef [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-03 16:00:31 +00:00
Travis CI User
d0061fb530 [maven-release-plugin][skip ci] prepare release 17.146 2022-10-03 16:00:28 +00:00
Tom Page
1c91452ee9 Merge pull request #1456 from Alfresco/feature/ACS-3376_GETRuleIds
ACS-3376 GET rule order within rule set.
2022-10-03 16:24:39 +01:00
Tom Page
f707906943 ACS-3377 Fix review comments. 2022-10-03 15:40:52 +01:00
Tom Page
af7e9f97aa ACS-3376 Simplify method of obtaining rule ids. 2022-10-03 15:28:00 +01:00
Tom Page
e9105f0f0c ACS-3377 Update rule order. 2022-10-03 10:04:07 +01:00
Travis CI User
282186b877 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-03 09:02:38 +00:00
Travis CI User
5ab44f4f35 [maven-release-plugin][skip ci] prepare release 17.145 2022-10-03 09:02:36 +00:00
kavitshah-gl
bf855c5965 Feature/acs-3579 (#1443)
* Fixed DeleteRecordTests-destroyOfRecord

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]
2022-10-03 13:47:59 +05:30
Travis CI User
d02f88eed4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-10-02 00:13:36 +00:00
Travis CI User
e487061e96 [maven-release-plugin][skip ci] prepare release 17.144 2022-10-02 00:13:33 +00:00
Alfresco CI User
615406d5a1 [force] Force release for 2022-10-02. 2022-10-02 00:06:17 +00:00
Travis CI User
548fc9e64a [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-30 12:40:26 +00:00
Travis CI User
e7cc9ba008 [maven-release-plugin][skip ci] prepare release 17.143 2022-09-30 12:40:23 +00:00
kavitshah-gl
e10e9fe1c5 Update pom.xml
Updated Google Drive Version.
2022-09-30 16:42:10 +05:30
Travis CI User
d5a33e3f03 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-30 09:54:34 +00:00
Travis CI User
b62dfc1d76 [maven-release-plugin][skip ci] prepare release 17.142 2022-09-30 09:54:32 +00:00
Sara
3711be4e80 Feature/acs 3623 descriptor startup log (#1460)
* Pick up api-explorer 7.3.0-A1

* remove unused import

* ACS-3623 Add customembeddedworkflow to descriptor startup log
2022-09-30 09:33:36 +01:00
Travis CI User
69a39d71d5 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-29 17:40:00 +00:00
Travis CI User
3a8fde44ec [maven-release-plugin][skip ci] prepare release v1.128 2022-09-29 17:39:58 +00:00
krdabrowski
646bbe3436 ACS-3525: API for manual triggering rules on a folder (#257)
ACS-3525: API for manual triggering rules on a folder
2022-09-29 19:35:01 +02:00
Travis CI User
33297757bf [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-29 15:52:20 +00:00
Travis CI User
5f9c8fc499 [maven-release-plugin][skip ci] prepare release 17.141 2022-09-29 15:52:16 +00:00
tiagosalvado10
119ff309ac [MNT-23241] Prevent duplicated default headers if key/value pair is already in the request, otherwise, header is added (#1454)
* [MNT-23241] Prevent duplicated default headers if key/value pair is already in the request, otherwise, header is added
2022-09-29 16:17:23 +01:00
Travis CI User
7c706dbac6 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-29 14:27:29 +00:00
Travis CI User
2ab4c70217 [maven-release-plugin][skip ci] prepare release v1.127 2022-09-29 14:27:27 +00:00
Kristian Dimitrov
ed0bbf576d ACS-3601 add e2e unlink functionality (#259)
* ACS-3601: Add unlink/delete request
2022-09-29 15:22:29 +01:00
Tom Page
a93dd27674 ACS-3376 GET rule order within rule set. 2022-09-29 15:21:35 +01:00
Travis CI User
f3e43badfe [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-29 12:52:31 +00:00
Travis CI User
e99b6a98de [maven-release-plugin][skip ci] prepare release v1.126 2022-09-29 12:52:29 +00:00
Tom Page
64644505b3 ACS-3376 ACS-3377 Support GET and PUT rule id list. (#256) 2022-09-29 13:47:41 +01:00
Travis CI User
aca9e15668 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-29 11:49:12 +00:00
Travis CI User
1852309798 [maven-release-plugin][skip ci] prepare release v1.125 2022-09-29 11:49:10 +00:00
Kristian Dimitrov
ee2e248e39 ACS-3601: Add unlink/delete request (#258) 2022-09-29 12:44:10 +01:00
Travis CI User
609ffdcbf0 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-28 16:29:18 +00:00
Travis CI User
85baa164db [maven-release-plugin][skip ci] prepare release 17.140 2022-09-28 16:29:15 +00:00
Kristian Dimitrov
8776109582 ACS-3427: Add GET e2es for actions and conditions (#1451)
* ACS-3427: Add GET e2es for actions and conditions

* ACS-3427: Remove unnecessary cast
2022-09-28 16:25:47 +01:00
Travis CI User
c8cf52baef [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-28 10:04:35 +00:00
Travis CI User
9d82828959 [maven-release-plugin][skip ci] prepare release 17.139 2022-09-28 10:04:32 +00:00
Piotr Żurek
d475c74707 ACS-3563 Workflow Licence Check (#1422) 2022-09-28 11:31:32 +02:00
Travis CI User
cc3ea3167b [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-28 08:21:39 +00:00
Travis CI User
36f1c7083c [maven-release-plugin][skip ci] prepare release 17.138 2022-09-28 08:21:36 +00:00
Tom Page
22a158a1ee Merge pull request #1446 from Alfresco/feature/ACS-3488_RemoveXMLDataProvider
ACS-3488 Remove xml data provider.
2022-09-28 08:45:54 +01:00
Sara
2a75a304a9 ACS-3560 Bump tas-restapi to 1.124 (#1449) 2022-09-28 08:37:49 +01:00
Domenico Sibilio
472b3d044f ACS-3594 Add mechanism to deprecate modules within the Repo (#1445) 2022-09-28 09:25:57 +02:00
dependabot[bot]
e2db0aab11 Bump alfresco/alfresco-base-tomcat in /packaging/docker-alfresco (#1439) 2022-09-28 07:18:32 +00:00
Travis CI User
b2f90ff6bc [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-28 06:40:00 +00:00
Travis CI User
59641e833e [maven-release-plugin][skip ci] prepare release v1.124 2022-09-28 06:39:58 +00:00
Sara
6dd7d32b2e ACS-3560 Add custom embedded workflow to entitlements model (#255)
* ACS-3560 Add custom embedded workflow to entitlements model

* add header
2022-09-28 07:35:19 +01:00
Travis CI User
031efe67d7 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-27 16:23:09 +00:00
Travis CI User
e22b5fff86 [maven-release-plugin][skip ci] prepare release 17.137 2022-09-27 16:23:06 +00:00
George Evangelopoulos
91e2421d7c ACS-3291: Support for unlinking rule sets (#1421)
* ACS-3291: Support for unlinking rule sets

* ACS-3291: add unit tests and edge case exceptions

* ACS-3291: add support for -default- ruleSetId

Co-authored-by: Tom Page <tpage-alfresco@users.noreply.github.com>
2022-09-27 18:45:55 +03:00
Tom Page
529f6b31e8 Update SearchInFolderTests.java 2022-09-27 16:22:09 +01:00
Maciej Pichura
4bc36ae18d ACS-3510 Rule mappers refactor pt3 (#1438)
* ACS-3510: Rule mappers refactor pt3 (presumably final)

* ACS-3510: Rule mappers refactor pt3 - fixes after master merge.

* ACS-3510: Fixing error script conversion, adding some logging.
2022-09-27 15:24:39 +02:00
Tom Page
47187ee12e ACS-3488 Refactor in-folder tests. 2022-09-27 14:05:49 +01:00
Tom Page
520b9e7fcb ACS-3488 Remove usage of XML data provider.
This broke when we updated TestNG.
2022-09-27 10:38:25 +01:00
Travis CI User
73518a0342 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-27 09:09:54 +00:00
Travis CI User
cc1682c209 [maven-release-plugin][skip ci] prepare release 17.136 2022-09-27 09:09:51 +00:00
Tom Page
c9d7d0993e ACS-3589 Ensure tas-cmis is built before we try to use it in tas-integration. 2022-09-27 09:31:26 +01:00
Tom Page
ec13ac08c4 ACS-3589 Use project version when importing tas-cmis. 2022-09-27 09:03:07 +01:00
Tom Page
e0df4e8831 ACS-3589 Remove legacy reference to tas-cmis. 2022-09-27 08:58:41 +01:00
Tom Page
dffdb59b05 Merge pull request #1435 from Alfresco/feature/ACS-3589_TASCMISMerge
ACS-3589 Merge TAS CMIS into community repo.
2022-09-27 08:17:55 +01:00
Travis CI User
1d03f3aaa6 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-26 18:42:29 +00:00
Travis CI User
21e444da9f [maven-release-plugin][skip ci] prepare release 17.135 2022-09-26 18:42:26 +00:00
evasques
a512c3443c MNT-23174 - RM upgrade from 3.4.1.1 to 11.153 fails (#1434)
* MNT-23174 - RM upgrade from 3.4.1.1 to 11.153 fails
* Added batching capability to process records in hold
* Changed the retrieval of child assocs witout preload to not fill up the caches when we have very big holds
* Added property rm.patch.v35.holdNewChildAssocPatch.batchSize to be able to configure the batchSize
* Adapt mocks on unit test to the new calls
2022-09-26 19:05:03 +01:00
Travis CI User
e4f9c5539b [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-26 15:51:59 +00:00
Travis CI User
2a5df0dd7c [maven-release-plugin][skip ci] prepare release 17.134 2022-09-26 15:51:56 +00:00
tiagosalvado10
be7d4be636 [MNT-23118] Allow import with long paths (#1426)
* [MNT-23118] Allow nodes with long paths to be created during ACP import
2022-09-26 16:16:35 +01:00
Marcin Strankowski
d40ed346a7 Update transform-core to 3.0.0-A3. Update transform-servce to 2.0.0-A3 (#1437) 2022-09-26 16:45:04 +02:00
Tom Page
8c556eeaca ACS-3359 Rename boolean rule fields. (#1436)
* ACS-3359 Rename boolean rule fields.

* ACS-3359 Re-add unused import.

This has started to be used on master now.

* ACS-3359 Fix E2E test.

The isShared field is requested and comes back correctly as false.
2022-09-26 15:43:13 +01:00
Travis CI User
d0eea6835e [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-26 13:00:15 +00:00
Travis CI User
031dde6293 [maven-release-plugin][skip ci] prepare release 17.133 2022-09-26 13:00:12 +00:00
Maciej Pichura
819f0c9921 ACS-3510: Rule Action updates E2E tests. (#1431)
* ACS-3510: Rule Action updates E2E tests.

* ACS-3510: Rule Action updates E2E tests - fixes and enhancements.
2022-09-26 14:26:59 +02:00
Travis CI User
83bf4d0a2f [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-26 12:03:10 +00:00
Travis CI User
1af9f31b68 [maven-release-plugin][skip ci] prepare release v1.123 2022-09-26 12:03:09 +00:00
Tom Page
2b98e73468 ACS-3359 Rename boolean fields. (#253) 2022-09-26 12:58:42 +01:00
Travis CI User
0b2e9e0a97 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-26 11:19:03 +00:00
Travis CI User
09ce322111 [maven-release-plugin][skip ci] prepare release 17.132 2022-09-26 11:19:00 +00:00
evasques
49cedfc40c MNT-23043 - Property Tables Cleaner Job V3 (#1330)
* Implementation of V3

* Correct commit placement. If done while cursors are still open can result lost cursors - see MNT-23127

* Correct formatting

* Unit Test

* Add test to test suite

* Corrections on the unit test

* Correct typo and add documentation

* Fix typos

* Set the default values as constants

* remove initialization of rowsProcessed

* Improve comments

* Optimizations regarding retrieving min and max values

* Fix PostgreSQL sql script for v3
2022-09-26 11:44:01 +01:00
Tom Page
dcc739db76 ACS-3589 Merge alfresco-tas-cmis into master.
Remove files that are not needed in new structure.
2022-09-26 11:26:22 +01:00
Sara
0aa4b5de9c Feature/acs 3555 add custom embedded workflow license code (#1432)
* ACS-3555 Add license code for custom embedded workflow

* ACS-3555 remove unused import

* ACS-3560 Discovery API for custom embedded workflow license

* ACS-3560 fix compilation error

* use default method

* restore discovery api
2022-09-26 11:04:26 +01:00
Travis CI User
f196de23b0 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-25 00:10:59 +00:00
Travis CI User
59901e44fe [maven-release-plugin][skip ci] prepare release 17.131 2022-09-25 00:10:57 +00:00
Alfresco CI User
964cd86e00 [force] Force release for 2022-09-25. 2022-09-25 00:04:06 +00:00
Travis CI User
636ef33cc0 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-23 15:47:19 +00:00
Travis CI User
0d3ab4d921 [maven-release-plugin][skip ci] prepare release 17.130 2022-09-23 15:47:16 +00:00
Sara
02a0454055 Revert "Feature/acs 3555 add custom embedded workflow license code (#1420)" (#1430)
This reverts commit 19a061dc04.
2022-09-23 15:13:33 +01:00
Travis CI User
653f685dc9 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-23 13:01:58 +00:00
Travis CI User
2362ef986b [maven-release-plugin][skip ci] prepare release 17.129 2022-09-23 13:01:55 +00:00
Sara
dc5404b8c2 Revert "Feature/acs 3560 discovery api for custom embedded workflow license (#1423)" (#1429)
This reverts commit 541bf63d80.
2022-09-23 13:27:56 +01:00
tiagosalvado10
125b35e11c [MNT-21638] Script task execution (#1210)
* [MNT-21638] Script task execution based on workflow deloyment category. Javadoc. Unit tests.
2022-09-23 13:24:49 +01:00
brijmohan1
a77584a398 MNT-22233 resolved error while loading subcategory with cutoff. (#1424)
* MNT-22233 resolved error while loading subcategory with cutoff.

* MNT-22233 added log message when action definition is null.

* MNT-22233 updated log message when action definition is null.
2022-09-23 11:49:01 +05:30
Sara
541bf63d80 Feature/acs 3560 discovery api for custom embedded workflow license (#1423)
* ACS-3555 Add license code for custom embedded workflow

* ACS-3555 remove unused import

* ACS-3560 Discovery API for custom embedded workflow license

* ACS-3560 fix compilation error
2022-09-22 11:19:18 +01:00
Sara
19a061dc04 Feature/acs 3555 add custom embedded workflow license code (#1420)
* ACS-3555 Add license code for custom embedded workflow

* ACS-3555 remove unused import
2022-09-22 11:14:46 +01:00
Travis CI User
b1282cba89 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-22 06:49:24 +00:00
Travis CI User
d137dd89ec [maven-release-plugin][skip ci] prepare release 17.128 2022-09-22 06:49:22 +00:00
Maciej Pichura
9c8f98c12f ACS-3509 Rule mappers refactor pt2 (#1428)
* ACS-3509: Fixes and refactors for rule mappers pt 2.

* ACS-3509: Rule Condition mappings refactor + tests.
2022-09-22 08:10:59 +02:00
Tom Page
e0d52f98ae ACS-3366 Add support for isLinkedTo to GET rule sets. (#1427)
* ACS-3364 Add permission handling to linkedToBy.

* ACS-3366 Add support for isLinkedTo to GET rule sets.
2022-09-21 15:18:41 +01:00
Tom Page
c4d432b136 ACS-3364 Add permission handling to linkedToBy. (#1425) 2022-09-21 15:18:30 +01:00
Travis CI User
e0844d72e1 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-21 10:32:38 +00:00
Travis CI User
857771593b [maven-release-plugin][skip ci] prepare release 17.127 2022-09-21 10:32:35 +00:00
Maciej Pichura
a80ac51b5d ACS-3509: Adding E2E TAS REST tests for update rule conditions. (#1411)
* ACS-3509: Adding E2E TAS REST tests for update rule conditions.

* ACS-3509: Clean up after review.

* ACS-3509: Fixes after review, adding some more E2E tests.
2022-09-21 11:56:10 +02:00
Travis CI User
d7d50d0a67 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-21 09:32:31 +00:00
Travis CI User
11dd5307a7 [maven-release-plugin][skip ci] prepare release 17.126 2022-09-21 09:32:28 +00:00
rrajoria
a038f068ab Encoding to handle XSS (#1409) 2022-09-21 14:26:12 +05:30
Travis CI User
cc1c539a4c [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-21 08:45:24 +00:00
Travis CI User
3407899f20 [maven-release-plugin][skip ci] prepare release 17.125 2022-09-21 08:45:22 +00:00
Tom Page
1c69cd2e61 ACS-3365 Add support for GET rule sets isInherited. (#1415) 2022-09-21 09:00:34 +01:00
Travis CI User
02ba54ab3a [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-21 07:43:37 +00:00
Travis CI User
4116cae611 [maven-release-plugin][skip ci] prepare release 17.124 2022-09-21 07:43:34 +00:00
Tom Page
c300affa6d ACS-3578 Ignoring two more tests that are failing. 2022-09-21 07:52:56 +01:00
Tom Page
dba0dc9083 ACS-3578 Ignoring test that depends on ignored tests. 2022-09-20 17:13:07 +01:00
Tom Page
2c43a64fd0 ACS-3578 Ignoring tests that suddenly started failing. 2022-09-20 16:25:46 +01:00
Tom Page
af2b00cc6b ACS-3577 Use reload4j in TAS tests. 2022-09-20 16:06:20 +01:00
Travis CI User
966dd7d144 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-20 14:58:56 +00:00
Travis CI User
375c68f932 [maven-release-plugin][skip ci] prepare release v1.122 2022-09-20 14:58:54 +00:00
Tom Page
8ce6117a95 ACS-3577 Use reload4j from TAS utility. 2022-09-20 15:54:19 +01:00
Tom Page
767f6a6af2 Revert "Bump dependency.poi.version from 5.2.2 to 5.2.3 (#1414)" (#1416)
This reverts commit 4990a8b316.
2022-09-20 15:28:52 +01:00
Travis CI User
08e393c39f [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-20 11:31:17 +00:00
Travis CI User
2f4303f4eb [maven-release-plugin][skip ci] prepare release v1.121 2022-09-20 11:31:15 +00:00
Tom Page
953a1cc3f9 Fix setter and getter naming for GET rule set fields. (#252) 2022-09-20 12:26:28 +01:00
Travis CI User
23a1ddca6a [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-20 11:08:16 +00:00
Travis CI User
439dd3771f [maven-release-plugin][skip ci] prepare release v1.120 2022-09-20 11:08:14 +00:00
dependabot[bot]
df7ebe30b3 Bump utility from 3.0.54 to 3.0.55 (#249)
Bumps [utility](https://github.com/Alfresco/alfresco-tas-utility) from 3.0.54 to 3.0.55.
- [Release notes](https://github.com/Alfresco/alfresco-tas-utility/releases)
- [Changelog](https://github.com/Alfresco/alfresco-tas-utility/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/Alfresco/alfresco-tas-utility/compare/utility-3.0.54...utility-3.0.55)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 12:03:23 +01:00
dependabot[bot]
4990a8b316 Bump dependency.poi.version from 5.2.2 to 5.2.3 (#1414)
Bumps `dependency.poi.version` from 5.2.2 to 5.2.3.

Updates `poi` from 5.2.2 to 5.2.3

Updates `poi-ooxml` from 5.2.2 to 5.2.3

Updates `poi-scratchpad` from 5.2.2 to 5.2.3

---
updated-dependencies:
- dependency-name: org.apache.poi:poi
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.poi:poi-ooxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.poi:poi-scratchpad
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 10:35:39 +01:00
Travis CI User
af348eac49 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-20 09:05:02 +00:00
Travis CI User
e56b97a6fb [maven-release-plugin][skip ci] prepare release 17.123 2022-09-20 09:04:59 +00:00
dependabot[bot]
f32e554eb7 Bump xmlbeans from 5.1.0 to 5.1.1 (#1345)
Bumps xmlbeans from 5.1.0 to 5.1.1.

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 09:20:31 +01:00
dependabot[bot]
e0cdf1b3fe Bump joda-time from 2.10.14 to 2.11.1 (#1338)
Bumps [joda-time](https://github.com/JodaOrg/joda-time) from 2.10.14 to 2.11.1.
- [Release notes](https://github.com/JodaOrg/joda-time/releases)
- [Changelog](https://github.com/JodaOrg/joda-time/blob/main/RELEASE-NOTES.txt)
- [Commits](https://github.com/JodaOrg/joda-time/compare/v2.10.14...v2.11.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 09:20:18 +01:00
dependabot[bot]
1517ff6e85 Bump jsoup from 1.15.2 to 1.15.3 (#1337)
Bumps [jsoup](https://github.com/jhy/jsoup) from 1.15.2 to 1.15.3.
- [Release notes](https://github.com/jhy/jsoup/releases)
- [Changelog](https://github.com/jhy/jsoup/blob/master/CHANGES)
- [Commits](https://github.com/jhy/jsoup/compare/jsoup-1.15.2...jsoup-1.15.3)

---
updated-dependencies:
- dependency-name: org.jsoup:jsoup
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 09:20:07 +01:00
dependabot[bot]
ea8481ca98 Bump postgresql from 42.4.1 to 42.5.0 (#1336)
Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.4.1 to 42.5.0.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.4.1...REL42.5.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 09:19:56 +01:00
dependabot[bot]
5a8e73c03e Bump spring-security-core from 5.7.2 to 5.7.3 (#1314)
Bumps [spring-security-core](https://github.com/spring-projects/spring-security) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/compare/5.7.2...5.7.3)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 09:19:46 +01:00
dependabot[bot]
c89969422e Bump woodstox-core from 6.3.0 to 6.3.1 (#1312)
Bumps [woodstox-core](https://github.com/FasterXML/woodstox) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/FasterXML/woodstox/releases)
- [Commits](https://github.com/FasterXML/woodstox/compare/woodstox-core-6.3.0...woodstox-core-6.3.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 09:19:27 +01:00
dependabot[bot]
4e2f8fb8e6 Bump maven-javadoc-plugin from 3.4.0 to 3.4.1 (#1309)
Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.4.0...maven-javadoc-plugin-3.4.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 09:19:17 +01:00
dependabot[bot]
e84481d7f3 Bump dependency.antlr.version from 3.5.2 to 3.5.3 (#1061)
Bumps `dependency.antlr.version` from 3.5.2 to 3.5.3.

Updates `gunit` from 3.5.2 to 3.5.3
- [Release notes](https://github.com/antlr/antlr3/releases)
- [Commits](https://github.com/antlr/antlr3/compare/3.5.2...3.5.3)

Updates `antlr` from 3.5.2 to 3.5.3

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-20 09:19:04 +01:00
Travis CI User
6ea0f9b189 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-20 07:45:56 +00:00
Travis CI User
8def39fe6c [maven-release-plugin][skip ci] prepare release 17.122 2022-09-20 07:45:54 +00:00
Tom Page
d290c129bc ACS-3364 Add support for linkedToBy field in GET rule sets. (#1402)
* ACS-3364 Update TAS REST API for linkedTo field.

* ACS-3364 TAS test for linkedToBy field.

* ACS-3364 Implementation for linkedToBy field.
2022-09-20 08:09:29 +01:00
Travis CI User
15ba054b16 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-19 11:21:31 +00:00
Travis CI User
3e54162fcc [maven-release-plugin][skip ci] prepare release 17.121 2022-09-19 11:21:28 +00:00
Maciej Pichura
d24baf9ecd ACS-3354 Rule mappers pt1 (simple condition mapper) (#1388)
* ACS-3363: Add rule simple condition mapping layer - part 1.

* ACS-3363: Add rule simple condition mapping layer - part 1 - fixes and cleanup.

* ACS-3354: Fixes and refactors for rule mappers pt 1.
2022-09-19 12:42:26 +02:00
Travis CI User
2223f845bb [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-18 00:10:34 +00:00
Travis CI User
ee40a2140e [maven-release-plugin][skip ci] prepare release 17.120 2022-09-18 00:10:32 +00:00
Alfresco CI User
c01147f2b7 [force] Force release for 2022-09-18. 2022-09-18 00:03:29 +00:00
Travis CI User
2d69902c25 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-16 15:15:37 +00:00
Travis CI User
ff3da00a40 [maven-release-plugin][skip ci] prepare release 17.119 2022-09-16 15:15:35 +00:00
Travis CI User
c482153183 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-16 13:49:06 +00:00
Travis CI User
cdbd153151 [maven-release-plugin][skip ci] prepare release v1.119 2022-09-16 13:49:01 +00:00
Tom Page
8564f9eace ACS-3364 ACS-3365 ACS-3366 Add extra fields to rule set. (#248) 2022-09-16 14:44:14 +01:00
dependabot[bot]
2cd96b1522 Bump rest-assured from 5.1.1 to 5.2.0 (#1371)
Bumps [rest-assured](https://github.com/rest-assured/rest-assured) from 5.1.1 to 5.2.0.
- [Release notes](https://github.com/rest-assured/rest-assured/releases)
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.1.1...rest-assured-5.2.0)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:40:46 +01:00
dependabot[bot]
38300fbac3 Bump alfresco/alfresco-base-tomcat in /packaging/docker-alfresco (#1379)
Bumps alfresco/alfresco-base-tomcat from tomcat9-jre17-rockylinux8-202205140719 to tomcat9-jre17-rockylinux8-202209131110.

---
updated-dependencies:
- dependency-name: alfresco/alfresco-base-tomcat
  dependency-type: direct:production
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:38:34 +01:00
dependabot[bot]
9031ed139f Bump dependency.slf4j.version from 1.7.36 to 2.0.1 (#1385)
Bumps `dependency.slf4j.version` from 1.7.36 to 2.0.1.

Updates `slf4j-api` from 1.7.36 to 2.0.1
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.36...v_2.0.1)

Updates `slf4j-reload4j` from 1.7.36 to 2.0.1
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.36...v_2.0.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:37:51 +01:00
dependabot[bot]
298283cf7a Bump dependency.spring.version from 5.3.22 to 5.3.23 (#1390)
Bumps `dependency.spring.version` from 5.3.22 to 5.3.23.

Updates `spring-aop` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-beans` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-context` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-context-support` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-core` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-expression` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-jdbc` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-jms` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-test` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-orm` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-tx` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-web` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

Updates `spring-webmvc` from 5.3.22 to 5.3.23
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.22...v5.3.23)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:36:35 +01:00
dependabot[bot]
8026af1706 Bump dependency.webscripts.version from 8.31 to 8.32 (#1393)
Bumps `dependency.webscripts.version` from 8.31 to 8.32.

Updates `spring-surf-core-configservice` from 8.31 to 8.32

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

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

Updates `spring-webscripts-api` from 8.31 to 8.32

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:36:07 +01:00
Travis CI User
20ec3351b3 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-16 13:34:48 +00:00
Travis CI User
e79b434c54 [maven-release-plugin][skip ci] prepare release v1.34 2022-09-16 13:34:47 +00:00
dependabot-preview[bot]
163add3bfd Bump resteasy-jackson2-provider from 3.6.3.Final to 4.7.1.Final (#60)
Bumps resteasy-jackson2-provider from 3.6.3.Final to 4.7.1.Final.

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

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2022-09-16 14:30:54 +01:00
dependabot-preview[bot]
ba2367bf92 Bump alfresco-super-pom from 10 to 12 (#19)
Bumps [alfresco-super-pom](https://github.com/Alfresco/alfresco-super-pom) from 10 to 12.
- [Release notes](https://github.com/Alfresco/alfresco-super-pom/releases)
- [Commits](https://github.com/Alfresco/alfresco-super-pom/commits)

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

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2022-09-16 14:30:39 +01:00
dependabot-preview[bot]
84857e1a71 Upgrade to GitHub-native Dependabot (#54)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2022-09-16 14:30:29 +01:00
dependabot-preview[bot]
cda1c682ae Bump maven-project-info-reports-plugin from 2.9 to 3.1.2 (#55)
Bumps [maven-project-info-reports-plugin](https://github.com/apache/maven-project-info-reports-plugin) from 2.9 to 3.1.2.
- [Release notes](https://github.com/apache/maven-project-info-reports-plugin/releases)
- [Commits](https://github.com/apache/maven-project-info-reports-plugin/compare/maven-project-info-reports-plugin-2.9...maven-project-info-reports-plugin-3.1.2)

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

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2022-09-16 14:30:18 +01:00
Travis CI User
b5d7500ecc [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-16 13:27:58 +00:00
Travis CI User
e875e1fbbe [maven-release-plugin][skip ci] prepare release v1.118 2022-09-16 13:27:57 +00:00
dependabot[bot]
32179dc810 Bump utility from 3.0.53 to 3.0.54 (#243)
Bumps [utility](https://github.com/Alfresco/alfresco-tas-utility) from 3.0.53 to 3.0.54.
- [Release notes](https://github.com/Alfresco/alfresco-tas-utility/releases)
- [Changelog](https://github.com/Alfresco/alfresco-tas-utility/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/Alfresco/alfresco-tas-utility/compare/utility-3.0.53...utility-3.0.54)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:23:29 +01:00
dependabot[bot]
97ed056103 Bump maven-project-info-reports-plugin from 3.4.0 to 3.4.1 (#234)
Bumps [maven-project-info-reports-plugin](https://github.com/apache/maven-project-info-reports-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-project-info-reports-plugin/releases)
- [Commits](https://github.com/apache/maven-project-info-reports-plugin/compare/maven-project-info-reports-plugin-3.4.0...maven-project-info-reports-plugin-3.4.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:20:00 +01:00
dependabot[bot]
af97fd5d6a Bump jackson-databind from 2.13.3 to 2.13.4 (#242)
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.3 to 2.13.4.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:19:52 +01:00
dependabot[bot]
cef6e8fc7b Bump mockito-core from 4.2.0 to 4.8.0 (#244)
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.2.0 to 4.8.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v4.2.0...v4.8.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:19:12 +01:00
dependabot[bot]
31d0578a98 Bump rest-assured.version from 5.1.1 to 5.2.0 (#245)
Bumps `rest-assured.version` from 5.1.1 to 5.2.0.

Updates `rest-assured` from 5.1.1 to 5.2.0
- [Release notes](https://github.com/rest-assured/rest-assured/releases)
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.1.1...rest-assured-5.2.0)

Updates `json-path` from 5.1.1 to 5.2.0
- [Release notes](https://github.com/rest-assured/rest-assured/releases)
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.1.1...rest-assured-5.2.0)

Updates `xml-path` from 5.1.1 to 5.2.0
- [Release notes](https://github.com/rest-assured/rest-assured/releases)
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-5.1.1...rest-assured-5.2.0)

Updates `json-schema-validator` from 5.1.1 to 5.2.0

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.rest-assured:json-path
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.rest-assured:xml-path
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.rest-assured:json-schema-validator
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:19:00 +01:00
dependabot[bot]
2e1ae3bb69 Bump slf4j-api from 1.7.36 to 2.0.1 (#246)
Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 1.7.36 to 2.0.1.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.36...v_2.0.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-16 14:18:46 +01:00
George Evangelopoulos
c11b951e57 Update javadoc to clarify variable use (#1397) 2022-09-16 16:12:38 +03:00
Travis CI User
fc5a7f5838 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-16 10:43:06 +00:00
Travis CI User
3fde3cbadb [maven-release-plugin][skip ci] prepare release 17.118 2022-09-16 10:43:04 +00:00
Tom Page
ac1a77156e ACS-3363 Support inheritedBy in GET rule sets. (#1387)
* ACS-3363 E2E test for inheritedBy.

* ACS-3363 Support optional inheritedBy field in GET rule sets.

* ACS-3363 Update to new version of TAS REST API.

* ACS-3363 Remove user from private site before calling method under test.
2022-09-16 11:06:17 +01:00
Tom Page
e66263a5a8 ACS-3363 Output TAS logs for failed tests. (#1396) 2022-09-16 10:21:32 +01:00
Travis CI User
a410dbe538 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-16 07:18:14 +00:00
Travis CI User
48f53d204d [maven-release-plugin][skip ci] prepare release 17.117 2022-09-16 07:18:11 +00:00
MohinishSah
b589d574ea Update pom.xml 2022-09-16 12:11:08 +05:30
Travis CI User
a04f743318 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-15 14:39:33 +00:00
Travis CI User
d4aa429643 [maven-release-plugin][skip ci] prepare release 17.116 2022-09-15 14:39:30 +00:00
Maciej Pichura
ebdc01300d ACS-3354: Adding TAS test for update rule (other) fields. (#1389) 2022-09-15 16:00:37 +02:00
Travis CI User
9af05df046 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-15 11:37:13 +00:00
Travis CI User
71801e9e5e [maven-release-plugin][skip ci] prepare release v1.117 2022-09-15 11:37:12 +00:00
Tom Page
52149bf292 ACS-3363 Add inheritedBy to rule set. (#247) 2022-09-15 12:32:32 +01:00
Travis CI User
977681ba9b [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-15 09:12:54 +00:00
Travis CI User
e457a8b7c7 [maven-release-plugin][skip ci] prepare release 17.115 2022-09-15 09:12:51 +00:00
Maciej Pichura
772109d629 ACS-3429: Better fitting exceptions on POST rule with actions (#1376)
* ACS-3429: Better fitting exceptions on POST rule with actions when missing or invalid fields.

* ACS-3429: Fixing and adding tests
2022-09-15 10:35:32 +02:00
Travis CI User
ee8adb45fb [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-15 06:54:29 +00:00
Travis CI User
7daf864168 [maven-release-plugin][skip ci] prepare release 17.114 2022-09-15 06:54:26 +00:00
alandavis
9744b1da4d HXENG-64 dependency snakeyaml 1.30 -> 1.32 2022-09-15 07:00:22 +01:00
kavitshah-gl
033a00075f Feature/apps 1613 (#1284)
* Adding test for the stage AGS Smoke UI Tests for actions in RM site

* pushed the createCategoriesTest in APPS-1550 brach

* pushed the createCategoriesTest in APPS-1550 branch

* pushed the CreateFoldersTests in APPS-1550 branch

* [ags]

* ~ /\[ags\]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* Revert "~ /\[ags\]"

This reverts commit ed9443e5

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* Adding FoldersDispositionScheduleTests

* Added foldersDispositionScheduleWithGhosting

* Added foldersDispositionScheduleWithoutGhosting

* Added RecordsDispositionScheduleTests and other fixes

* Added RecordsDispositionScheduleWithGhostingTests

* [ags api]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* Revert "[ags api]"

This reverts commit 2153eafc0f.

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* DispositionScheduleLinkedRecordsTest class added

* [ags]

* [ags]

* [ags]

* [ags]

* ags

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

* [ags]

Co-authored-by: sbisht <shishuraj.bisht@globallogic.com>
2022-09-15 10:51:52 +05:30
alandavis
2a48160442 Pick up t-core 3.0.0-A2 and t-service 2.0.0-A2 which include snakeyaml 1.32 2022-09-15 00:24:16 +01:00
Alan Davis
64955658fc HXENG-64 refactor ATS
* Pick refactored t-core 3.0.0 and t-service 2.0.0.
* Use new package names from t-model
* Fix up a few test failures due to incomplete t-config which is now checked.
2022-09-14 22:07:07 +01:00
Travis CI User
bec0ac0236 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-14 13:51:26 +00:00
Travis CI User
b22595058e [maven-release-plugin][skip ci] prepare release 17.113 2022-09-14 13:51:22 +00:00
Marcin Strankowski
742a4c89dd ACS-3402: Add actual dependency, not just dependencyManagement, record of non-transitive netty dependencies to be used in AMPs (#1384) 2022-09-14 15:11:09 +02:00
Travis CI User
09db0fcad3 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-14 12:43:24 +00:00
Travis CI User
313823eb8c [maven-release-plugin][skip ci] prepare release 17.112 2022-09-14 12:43:21 +00:00
Tom Page
b7d2d3bae9 ACS-3536 Omit actionContext for rules. (#1383)
* ACS-3536 Omit actionContext for rules.

It will always be set to 'Rule' anyway.

* ACS-3536 Stop setting actionContext in rules E2E tests.

Also add extra assertion for action params in new test.
2022-09-14 12:56:38 +01:00
Travis CI User
e265bb0a5d [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-13 18:58:36 +00:00
Travis CI User
6da0d7cc7b [maven-release-plugin][skip ci] prepare release 17.111 2022-09-13 18:58:34 +00:00
tiagosalvado10
430d15f32d [MNT-21901] Prevent update preferences concurrency errors (#821)
* [MNT-21901] Added PersistenceException to retry exceptions. Added validation to get retry cause

* [MNT-21901] Check exception message only if it is JavaScriptException

* [MNT-21901] Removed unit test from repository. Added new test on remote-api. Changed ExceptionStackUtil validation.

* [MNT-21901] Improved JavascriptException validation. Added exception delimiter to prevent accepting exceptions with the same partial name.
2022-09-13 16:40:23 +01:00
Travis CI User
3fc0100bb5 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-13 13:49:23 +00:00
Travis CI User
7ccd9640ee [maven-release-plugin][skip ci] prepare release 17.110 2022-09-13 13:49:20 +00:00
Marcin Strankowski
bea34483b5 Feature/acs 3402 release gytheio 0.17.0 (#1375)
* Update Gytheio version
2022-09-13 15:01:02 +02:00
Travis CI User
e0867a099f [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-13 11:19:31 +00:00
Travis CI User
6cb07e1b86 [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-01 16:01:29 +00:00
Travis CI User
fa3df0987d [maven-release-plugin][skip ci] prepare release v1.116 2022-09-01 16:01:27 +00:00
Tom Page
fde20c948f Upgrade tas-utility version to use latest TestNG. (#241) 2022-09-01 16:56:40 +01:00
Travis CI User
9c989c424f [maven-release-plugin][skip ci] prepare for next development iteration 2022-09-01 14:10:33 +00:00
Travis CI User
c338001de2 [maven-release-plugin][skip ci] prepare release v1.33 2022-09-01 14:10:30 +00:00
Tom Page
c6519c2a3f Upgrade tas-utility version to use latest TestNG. 2022-09-01 15:05:38 +01:00
Travis CI User
9ea1336a18 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-30 12:01:40 +00:00
Travis CI User
b007740dd0 [maven-release-plugin][skip ci] prepare release v1.115 2022-08-30 12:01:39 +00:00
Maciej Pichura
15b10ba605 ACS-3431 rule set link TAS changes (#239)
* ACS-3341: Adding initial changes to handle rule set linking.

* ACS-3341: Adding equals/hashcode override to RestRuleSetLinkModel.

* ACS-3341: Adding equals/hashcode override to RestRuleSetModel.
2022-08-30 13:57:31 +02:00
Travis CI User
8983a11d3d [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-16 15:06:16 +00:00
Travis CI User
6fd482b492 [maven-release-plugin][skip ci] prepare release v1.114 2022-08-16 15:06:14 +00:00
Tom Page
0a0c90a230 ACS-3280 Get/Set Rules Inheritance. (#235) 2022-08-16 16:02:01 +01:00
Travis CI User
109af6abff [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-15 14:05:31 +00:00
Travis CI User
43532eebf5 [maven-release-plugin][skip ci] prepare release v1.113 2022-08-15 14:05:29 +00:00
Tom Page
5dc3424fe2 ACS-3280 Move assertThat() and and() to defaults in interface. (#232)
* ACS-3280 Move assertThat() and and() to defaults in interface.

Update ftl so that any future generated models will use the defaults too.

* ACS-3280 Revert changes to collections.

They have a different hierarchy and so need a different refactor.

* ACS-3280 Make RestCompanyModel work the same as all the other models.
2022-08-15 15:01:03 +01:00
Travis CI User
133670cd17 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-15 13:29:41 +00:00
Travis CI User
909e95685e [maven-release-plugin][skip ci] prepare release v1.112 2022-08-15 13:29:39 +00:00
krdabrowski
91e7b0d66f ACS-3353: POST support for "other fields" (#231)
Fix for equals method.
2022-08-15 14:25:15 +01:00
Travis CI User
cc40cf05a9 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-12 12:03:07 +00:00
Travis CI User
4629c20b51 [maven-release-plugin][skip ci] prepare release v1.111 2022-08-12 12:03:05 +00:00
krdabrowski
ee88946b1c ACS-3353: POST support for "other fields" (#230)
ACS-3353: POST support for "other fields"
- adding method `isEqualTo()` allowing assertion of whole model with different model.
2022-08-12 13:58:46 +02:00
Travis CI User
b1faf15806 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-12 09:33:07 +00:00
Travis CI User
367ad20fb7 [maven-release-plugin][skip ci] prepare release v1.110 2022-08-12 09:33:05 +00:00
Tom Page
80e770f2da ACS-3358 Support isShared in rules API. (#229)
* ACS-3358 Automatically include any unused RestWrapper parameters in the request.

* ACS-3358 Remove unnecessary calls to RestWrapper.getParameters() from rules methods.

* ACS-3358 Move request logging to point of use.

* ACS-3358 Support isShared in rules API.
2022-08-12 10:28:33 +01:00
Tom Page
e8cf525792 ACS-3358 Automatically include extra params. (#228)
* ACS-3358 Automatically include any unused RestWrapper parameters in the request.

* ACS-3358 Remove unnecessary calls to RestWrapper.getParameters() from rules methods.

* ACS-3358 Move request logging to point of use.
2022-08-12 10:28:02 +01:00
Travis CI User
a594341bb5 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-11 09:05:46 +00:00
Travis CI User
058e8d6302 [maven-release-plugin][skip ci] prepare release v1.109 2022-08-11 09:05:44 +00:00
Tom Page
91fcbb0b59 ACS-3358 We no longer need to explicitly give the "?". (#227) 2022-08-11 10:01:17 +01:00
Travis CI User
830898c605 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-10 14:52:23 +00:00
Travis CI User
d214040bc8 [maven-release-plugin][skip ci] prepare release v1.108 2022-08-10 14:52:21 +00:00
Tom Page
1b071cb555 ACS-3358 Refactor ModelRequest to cope with more parameters than tokens in the URL. (#224)
For example we can now pass include parameters without having to update the URL to have a "?" in the test code.
2022-08-10 15:47:46 +01:00
Travis CI User
37e04ee2fc [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-10 10:45:05 +00:00
Travis CI User
10f32aa74c [maven-release-plugin][skip ci] prepare release v1.107 2022-08-10 10:45:03 +00:00
Tom Page
bea386ddc8 ACS-3358 Support specifying include. (#223)
* ACS-3358 Better support when specifying includes.

* ACS-3358 Add unit tests for RestWrapper.withParams().

* ACS-3358 Refactor RestWrapper.withParams().

* ACS-3358 Add unit tests for ModelRequest.
2022-08-10 11:40:45 +01:00
Travis CI User
2449d1d8f3 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-10 10:02:03 +00:00
Travis CI User
3883fd22e3 [maven-release-plugin][skip ci] prepare release v1.106 2022-08-10 10:02:01 +00:00
Tom Page
183ac4c7cd ACS-3358 Remove demo tests. (#222)
These were only intended to demonstrate how to use the TAS library.

Also make tests run against all branches.
2022-08-10 10:58:00 +01:00
Travis CI User
c7559ba8b1 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-10 08:56:35 +00:00
Travis CI User
c5fcce20f1 [maven-release-plugin][skip ci] prepare release v1.32 2022-08-10 08:56:34 +00:00
Travis CI User
fa1b8d46dd [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-10 08:45:04 +00:00
Travis CI User
df35137d12 [maven-release-plugin][skip ci] prepare release v1.105 2022-08-10 08:45:02 +00:00
Damian Ujma
0a97d98271 ACS-3351 Upgrade to Java 17 (#62) 2022-08-10 10:38:48 +02:00
Damian Ujma
1d1b454978 ACS-3351 Upgrade to Java 17 (#219) 2022-08-10 10:36:45 +02:00
Travis CI User
deaee78d09 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-09 12:09:27 +00:00
Travis CI User
9e3c144a7d [maven-release-plugin][skip ci] prepare release v1.104 2022-08-09 12:09:24 +00:00
Tom Page
d0b100a88b ACS-3361 Support for inclusionType. (#221) 2022-08-09 13:05:51 +01:00
Travis CI User
9d807242ee [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-09 11:21:44 +00:00
Travis CI User
5f2b5fe9af [maven-release-plugin][skip ci] prepare release v1.103 2022-08-09 11:21:43 +00:00
Marcin Strankowski
7edee67997 Move all versions under the rest-assured.version, update it to 5.1.1 (#220) 2022-08-09 13:17:55 +02:00
Travis CI User
5f151aaa96 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-08 14:20:54 +00:00
Travis CI User
dcf25d89d0 [maven-release-plugin][skip ci] prepare release v1.102 2022-08-08 14:20:51 +00:00
Tom Page
7d5aafecb5 ACS-3362 Add owningFolder field to rule set. (#218)
* ACS-3362 Add owningFolder field to rule set.

* ACS-3362 Allow passing include param.
2022-08-08 15:17:29 +01:00
Travis CI User
1d8f1bd8a2 [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-05 13:58:04 +00:00
Travis CI User
fe04e621e1 [maven-release-plugin][skip ci] prepare release v1.101 2022-08-05 13:58:02 +00:00
krdabrowski
ee03296733 ACS-3360 GET APIs for rule sets E2E tests. (#217)
- fixed improper rest client method usage
2022-08-05 15:54:23 +02:00
Travis CI User
c5e89242ba [maven-release-plugin][skip ci] prepare for next development iteration 2022-08-02 12:30:42 +00:00
Travis CI User
0fbeffe80a [maven-release-plugin][skip ci] prepare release v1.100 2022-08-02 12:30:40 +00:00
Tom Page
d1e9cf0144 ACS-3360 TAS endpoints for GET rule sets. (#216) 2022-08-02 14:27:17 +02:00
Travis CI User
b51146c868 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-29 12:01:19 +00:00
Travis CI User
515f243911 [maven-release-plugin][skip ci] prepare release v1.99 2022-07-29 12:01:17 +00:00
dependabot[bot]
a7263931f5 Bump utility from 3.0.48 to 3.0.49 (#209) 2022-07-29 11:58:13 +00:00
Travis CI User
2c23c674a7 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-29 08:26:45 +00:00
Travis CI User
2b929b747a [maven-release-plugin][skip ci] prepare release v1.98 2022-07-29 08:26:44 +00:00
dependabot[bot]
1fd36cf903 Bump groovy from 3.0.11 to 3.0.12 (#214) 2022-07-29 08:23:47 +00:00
dependabot[bot]
d45bc9e6c6 Bump groovy-json from 3.0.11 to 3.0.12 (#215) 2022-07-29 08:23:43 +00:00
Travis CI User
6ae2ff6cd9 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-25 15:57:54 +00:00
Travis CI User
e3fbdd5904 [maven-release-plugin][skip ci] prepare release v1.97 2022-07-25 15:57:52 +00:00
Maciej Pichura
575f4f26c0 ACS-3345: Adding delete rule method. (#213) 2022-07-25 17:54:27 +02:00
Travis CI User
c11cd252d4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-25 14:23:23 +00:00
Travis CI User
74141cf4b7 [maven-release-plugin][skip ci] prepare release v1.96 2022-07-25 14:23:21 +00:00
Tom Page
0105b87153 ACS-3214 Add method to update folder rule. (#212) 2022-07-25 15:20:08 +01:00
Travis CI User
c2ed150a7d [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-25 13:56:27 +00:00
Travis CI User
d47bf8c3ac [maven-release-plugin][skip ci] prepare release v1.95 2022-07-25 13:56:25 +00:00
Tom Page
6372e9124c Add license headers. (#211)
* Add license header check to project.

* Update all java files to have license header.
2022-07-25 14:52:36 +01:00
Travis CI User
dcf5e8325b [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-21 14:43:09 +00:00
Travis CI User
ebabe9a16b [maven-release-plugin][skip ci] prepare release v1.94 2022-07-21 14:43:06 +00:00
Tom Page
bbb6d610fa ACS-3227 Create folder rules. (#210)
* ACS-3227 Create folder rules.

* ACS-3227 Fix multiple POST method to be generic.
2022-07-21 15:39:35 +01:00
Travis CI User
20ccedfee8 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-20 07:17:36 +00:00
Travis CI User
fcc1eef0f5 [maven-release-plugin][skip ci] prepare release v1.93 2022-07-20 07:17:35 +00:00
Tom Page
f757fb6be8 ACS-3225 Use processModels rather than processModel for a list. (#208)
Refactor common code from both methods.
2022-07-20 08:14:16 +01:00
Travis CI User
439c578b8d [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-19 15:36:21 +00:00
Travis CI User
55c53a6789 [maven-release-plugin][skip ci] prepare release v1.92 2022-07-19 15:36:19 +00:00
dependabot[bot]
ea1d13a5a6 Bump maven-project-info-reports-plugin from 3.3.0 to 3.4.0 (#204) 2022-07-19 15:33:11 +00:00
Travis CI User
0b0b89a1be [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-19 15:29:33 +00:00
Travis CI User
3e7200d65f [maven-release-plugin][skip ci] prepare release v1.91 2022-07-19 15:29:31 +00:00
Tom Page
9ed945504f ACS-3225 Fix return type of the GET many rules. (#207) 2022-07-19 16:26:12 +01:00
Travis CI User
ab18be55a4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-19 13:26:37 +00:00
Travis CI User
80548d0c3f [maven-release-plugin][skip ci] prepare release v1.90 2022-07-19 13:26:35 +00:00
Tom Page
11a8824fd3 ACS-3225 Refactor to have a usingRuleSet method. (#206)
This makes it possible to call both existing GET endpoints.
2022-07-19 14:23:13 +01:00
Travis CI User
a73610c143 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-19 13:22:42 +00:00
Travis CI User
d43872a4ab [maven-release-plugin][skip ci] prepare release v1.89 2022-07-19 13:22:40 +00:00
Tom Page
7a66b812bb ACS-3225 Replace all instances of "throws Exception". (#205)
In many places there were actually no exceptions being throw.
2022-07-19 14:19:29 +01:00
Travis CI User
732fa806e7 [maven-release-plugin][skip ci] prepare for next development iteration 2022-07-15 12:57:28 +00:00
Travis CI User
c9d115664b [maven-release-plugin][skip ci] prepare release v1.88 2022-07-15 12:57:26 +00:00
Kristian Dimitrov
0f1f67230f ACS-3275: Expose Rules V1 APIs (#203)
* ACS-3275: Initial commit

* ACS-3275: Add newly generated POJO

* ACS-3275: Add requests

* ACS-3275: Add Rest Models Collection
2022-07-15 13:47:40 +01:00
Travis CI User
5f303be26d [maven-release-plugin][skip ci] prepare for next development iteration 2022-06-23 14:09:02 +00:00
Travis CI User
9d27f2099a [maven-release-plugin][skip ci] prepare release v1.87 2022-06-23 14:08:59 +00:00
dependabot[bot]
0588182c81 Bump httpclient-osgi from 4.5.3 to 4.5.6 and ignore further upgrades (#202)
* Bump httpclient-osgi from 4.5.3 to 4.5.13

Bumps httpclient-osgi from 4.5.3 to 4.5.13.

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents:httpclient-osgi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* ACS-3186 Fix httpclient-osgi to 4.5.6

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Domenico Sibilio <domenicosibilio@gmail.com>
2022-06-23 16:05:12 +02:00
Travis CI User
85cdad32d0 [maven-release-plugin][skip ci] prepare for next development iteration 2022-06-21 10:45:14 +00:00
Travis CI User
976670de8a [maven-release-plugin][skip ci] prepare release v1.86 2022-06-21 10:45:12 +00:00
Domenico Sibilio
a5dc3d767c Downgrade httpclient-osgi to 4.5.3 (#201) 2022-06-21 12:41:41 +02:00
Travis CI User
42a42fd941 [maven-release-plugin][skip ci] prepare for next development iteration 2022-06-20 15:20:56 +00:00
Travis CI User
709ebd2e12 [maven-release-plugin][skip ci] prepare release v1.85 2022-06-20 15:20:53 +00:00
Domenico Sibilio
6e27433ac5 Downgrade json-path and json-schema-validator to 3.3.0 (#198) 2022-06-20 17:17:18 +02:00
Travis CI User
2d7697bf2c [maven-release-plugin][skip ci] prepare for next development iteration 2022-06-16 08:18:14 +00:00
Travis CI User
a47409268f [maven-release-plugin][skip ci] prepare release v1.84 2022-06-16 08:18:12 +00:00
dependabot[bot]
db7f49afbd Bump swagger-parser from 1.0.60 to 1.0.61 (#197)
Bumps [swagger-parser](https://github.com/swagger-api/swagger-parser) from 1.0.60 to 1.0.61.
- [Release notes](https://github.com/swagger-api/swagger-parser/releases)
- [Commits](https://github.com/swagger-api/swagger-parser/compare/v1.0.60...v1.0.61)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-16 10:14:56 +02:00
Travis CI User
b324c07568 [maven-release-plugin][skip ci] prepare for next development iteration 2022-06-15 15:10:10 +00:00
Travis CI User
63a47002f9 [maven-release-plugin][skip ci] prepare release v1.83 2022-06-15 15:10:08 +00:00
dependabot[bot]
31e557261e Bump maven-project-info-reports-plugin from 3.1.2 to 3.3.0 (#183)
Bumps [maven-project-info-reports-plugin](https://github.com/apache/maven-project-info-reports-plugin) from 3.1.2 to 3.3.0.
- [Release notes](https://github.com/apache/maven-project-info-reports-plugin/releases)
- [Commits](https://github.com/apache/maven-project-info-reports-plugin/compare/maven-project-info-reports-plugin-3.1.2...maven-project-info-reports-plugin-3.3.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 17:06:32 +02:00
dependabot[bot]
5eb54e9b0c Bump httpclient-osgi from 4.5.3 to 4.5.13 (#151)
Bumps httpclient-osgi from 4.5.3 to 4.5.13.

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents:httpclient-osgi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 17:03:24 +02:00
dependabot[bot]
f7642f99f2 Bump jackson-databind from 2.9.10.8 to 2.13.3 (#185)
Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.9.10.8 to 2.13.3.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 17:02:42 +02:00
Travis CI User
c9f6f1bdd4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-06-15 14:54:30 +00:00
Travis CI User
9c54707ad8 [maven-release-plugin][skip ci] prepare release v1.82 2022-06-15 14:54:27 +00:00
dependabot[bot]
52e5b2bc8a Bump swagger-parser from 1.0.31 to 1.0.60 (#186)
Bumps [swagger-parser](https://github.com/swagger-api/swagger-parser) from 1.0.31 to 1.0.60.
- [Release notes](https://github.com/swagger-api/swagger-parser/releases)
- [Commits](https://github.com/swagger-api/swagger-parser/compare/v1.0.31...v1.0.60)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 16:50:50 +02:00
dependabot[bot]
62cc9419c6 Bump groovy from 2.5.14 to 3.0.11 (#192)
Bumps [groovy](https://github.com/apache/groovy) from 2.5.14 to 3.0.11.
- [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>
2022-06-15 16:50:42 +02:00
dependabot[bot]
8a0f3849ff Bump groovy-json from 2.5.9 to 3.0.11 (#191)
Bumps [groovy-json](https://github.com/apache/groovy) from 2.5.9 to 3.0.11.
- [Release notes](https://github.com/apache/groovy/releases)
- [Commits](https://github.com/apache/groovy/commits)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 16:50:33 +02:00
dependabot[bot]
55e6f1c9b1 Bump json-schema-validator from 3.3.0 to 5.1.1 (#195)
Bumps json-schema-validator from 3.3.0 to 5.1.1.

---
updated-dependencies:
- dependency-name: io.rest-assured:json-schema-validator
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 16:49:14 +02:00
dependabot[bot]
d62b8b0942 Bump json-path from 3.3.0 to 5.1.1 (#196)
Bumps [json-path](https://github.com/rest-assured/rest-assured) from 3.3.0 to 5.1.1.
- [Release notes](https://github.com/rest-assured/rest-assured/releases)
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-3.3.0...rest-assured-5.1.1)

---
updated-dependencies:
- dependency-name: io.rest-assured:json-path
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 16:48:50 +02:00
Travis CI User
b2c38d9bb0 [maven-release-plugin][skip ci] prepare for next development iteration 2022-06-15 12:54:58 +00:00
Travis CI User
d16d88cd22 [maven-release-plugin][skip ci] prepare release v1.81 2022-06-15 12:54:56 +00:00
dependabot[bot]
c8a3ce3af5 Bump alfresco-super-pom from 10 to 12 (#160)
Bumps [alfresco-super-pom](https://github.com/Alfresco/alfresco-super-pom) from 10 to 12.
- [Release notes](https://github.com/Alfresco/alfresco-super-pom/releases)
- [Commits](https://github.com/Alfresco/alfresco-super-pom/commits)

---
updated-dependencies:
- dependency-name: org.alfresco:alfresco-super-pom
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 14:49:05 +02:00
dependabot[bot]
fc4a47a71a Bump scribejava-apis from 6.9.0 to 8.3.1 (#159)
Bumps [scribejava-apis](https://github.com/scribejava/scribejava) from 6.9.0 to 8.3.1.
- [Release notes](https://github.com/scribejava/scribejava/releases)
- [Changelog](https://github.com/scribejava/scribejava/blob/master/changelog)
- [Commits](https://github.com/scribejava/scribejava/compare/scribejava-6.9.0...scribejava-8.3.1)

---
updated-dependencies:
- dependency-name: com.github.scribejava:scribejava-apis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 14:48:46 +02:00
dependabot[bot]
d6a3d3db2a Bump slf4j-api from 1.7.32 to 1.7.36 (#155)
Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 1.7.32 to 1.7.36.
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.32...v_1.7.36)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 14:48:24 +02:00
Travis CI User
45b9f63351 [maven-release-plugin][skip ci] prepare for next development iteration 2022-04-20 06:46:40 +00:00
Travis CI User
84269b568f [maven-release-plugin][skip ci] prepare release v1.80 2022-04-20 06:46:38 +00:00
Damian Ujma
b9ee972ff2 ACS-2674 Add method to delete rendition (#182)
* ACS-2674 Add method to delete rendition

* ACS-2674 Close the quotes on the URI
2022-04-20 08:42:46 +02:00
Travis CI User
c95be234a0 [maven-release-plugin][skip ci] prepare for next development iteration 2022-03-08 17:15:27 +00:00
Travis CI User
bcd304abab [maven-release-plugin][skip ci] prepare release v1.79 2022-03-08 17:15:25 +00:00
Sara
170e82ad75 ACS-1987 Uncomment create DAU version renditions (#169)
* ACS-1987 Uncomment create DAU version renditions

* Update linux version from trusty to focal
2022-03-08 17:03:40 +00:00
Travis CI User
8c6cebec1d [maven-release-plugin][skip ci] prepare for next development iteration 2022-03-03 09:35:53 +00:00
Travis CI User
d822a4d7ac [maven-release-plugin][skip ci] prepare release v1.78 2022-03-03 09:35:50 +00:00
Piotr Żurek
a9d9daf6bb ACS-2620 Downgrade json-path and rest-assured (#164) 2022-03-03 10:30:38 +01:00
Travis CI User
9bfbc3a623 [maven-release-plugin][skip ci] prepare for next development iteration 2022-03-02 19:42:41 +00:00
Travis CI User
7bd1efb1f0 [maven-release-plugin][skip ci] prepare release v1.77 2022-03-02 19:42:39 +00:00
Sara
6b1b240da7 ACS-1965 DAU tests to use request without body (#163) 2022-03-02 19:37:54 +00:00
Travis CI User
e9ce710f3c [maven-release-plugin][skip ci] prepare for next development iteration 2022-03-02 10:13:27 +00:00
Travis CI User
26d29b0bc0 [maven-release-plugin][skip ci] prepare release v1.76 2022-03-02 10:13:24 +00:00
Sara
df8e315d48 ACS-1965 Fix DAUs methods (#162)
* ACS-1965 Fix DAUs methods

* ACS-1965 Removed commented code, added rendition id
2022-03-02 10:08:30 +00:00
Travis CI User
458a8c17ff [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-28 09:02:35 +00:00
Travis CI User
0cecb28903 [maven-release-plugin][skip ci] prepare release v1.75 2022-02-28 09:02:33 +00:00
dependabot[bot]
19584814f0 Bump rest-assured from 3.3.0 to 4.5.1 (#158)
Bumps [rest-assured](https://github.com/rest-assured/rest-assured) from 3.3.0 to 4.5.1.
- [Release notes](https://github.com/rest-assured/rest-assured/releases)
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-3.3.0...rest-assured-4.5.1)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-28 08:57:48 +00:00
Travis CI User
4ac6cf4088 [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-24 13:43:31 +00:00
Travis CI User
04225ce5ef [maven-release-plugin][skip ci] prepare release v1.74 2022-02-24 13:43:29 +00:00
montgolfiere
c7464e7501 Create dependabot.yml 2022-02-24 13:38:40 +00:00
dependabot-preview[bot]
793ff892b7 Bump json-path from 3.3.0 to 4.4.0 (#133)
Bumps [json-path](https://github.com/rest-assured/rest-assured) from 3.3.0 to 4.4.0.
- [Release notes](https://github.com/rest-assured/rest-assured/releases)
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-3.3.0...rest-assured-4.4.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2022-02-24 13:35:14 +00:00
Travis CI User
7c6d35d38c [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-18 09:44:58 +00:00
Travis CI User
b2dc3fa5cd [maven-release-plugin][skip ci] prepare release v1.73 2022-02-18 09:44:55 +00:00
Domenico Sibilio
54c91e8770 ACS-2566 Configure Solr shared secret authentication
* ACS-2566 Configure Solr shared secret

* Fix emoji in README.md
2022-02-18 10:39:34 +01:00
Travis CI User
da2db2c339 [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-11 14:16:58 +00:00
Travis CI User
84b62f2386 [maven-release-plugin][skip ci] prepare release v1.72 2022-02-11 14:16:56 +00:00
dependabot[bot]
bcc3c30985 Bump jackson-databind from 2.9.8 to 2.9.10.8 (#142) 2022-02-11 14:12:20 +00:00
Travis CI User
c457fafc1b [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-09 11:18:52 +00:00
Travis CI User
fcf7d017b0 [maven-release-plugin][skip ci] prepare release v1.71 2022-02-09 11:18:50 +00:00
dependabot[bot]
94be653375 Bump groovy from 2.5.9 to 2.5.14 (#106) 2022-02-09 11:14:09 +00:00
Travis CI User
d9c37d5f9f [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-08 08:59:47 +00:00
Travis CI User
2555ff04f6 [maven-release-plugin][skip ci] prepare release v1.70 2022-02-08 08:59:45 +00:00
dependabot[bot]
668e14182f Bump xercesImpl from 2.12.1 to 2.12.2 (#146)
Bumps xercesImpl from 2.12.1 to 2.12.2.

---
updated-dependencies:
- dependency-name: xerces:xercesImpl
  dependency-type: direct:production
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-08 08:55:12 +00:00
Travis CI User
e0e27f6448 [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-04 17:24:19 +00:00
Travis CI User
0c7fe86cc0 [maven-release-plugin][skip ci] prepare release v1.69 2022-02-04 17:24:16 +00:00
dependabot[bot]
c631cdba82 Bump swagger-parser from 1.0.23 to 1.0.31 (#4)
Bumps [swagger-parser](https://github.com/swagger-api/swagger-parser) from 1.0.23 to 1.0.31.
- [Release notes](https://github.com/swagger-api/swagger-parser/releases)
- [Commits](https://github.com/swagger-api/swagger-parser/compare/v1.0.23...v1.0.31)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-04 17:19:22 +00:00
Travis CI User
aabbcf449f [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-21 09:56:16 +00:00
Travis CI User
ec4958a6e2 [maven-release-plugin][skip ci] prepare release v1.68 2022-01-21 09:56:14 +00:00
mpichura
751643bac1 ACS-2406: update tas rest api for new version storage info endpoints (#145)
* ACS-2406: Methods to handle new version storage-info endpoints

* ACS-2406: Fixing javadoc.
2022-01-21 10:52:42 +01:00
Travis CI User
08b603cc33 [maven-release-plugin][skip ci] prepare for next development iteration 2021-12-17 16:12:29 +00:00
Travis CI User
410759bb37 [maven-release-plugin][skip ci] prepare release v1.67 2021-12-17 16:12:27 +00:00
David Edwards
29b25ea8ce ACS-2201 Add new endpoints for storage-info (#144)
Models generated from swagger at branch:
feature/ACS-2336_POST_endpoints_archive_restore_content

Endpoints added:
GET nodes/{nodeId}/storage-info/{contentPropName}
POST nodes/{nodeId}/storage-info/{contentPropName}/archive
POST nodes/{nodeId}/storage-info/{contentPropName}/archive-restore
2021-12-17 11:08:53 -05:00
Travis CI User
cd6c38347f [maven-release-plugin][skip ci] prepare for next development iteration 2021-12-16 12:23:26 +00:00
Travis CI User
5ce6a774cc [maven-release-plugin][skip ci] prepare release v1.66 2021-12-16 12:23:24 +00:00
kcichonczyk
13529c0408 [ACS-2158] Prolonged retry window from 15 seconds to 1 minute (#143)
* [ACS-2158] Prolonged retry window from 15 seconds to 1 minute
2021-12-16 13:19:44 +01:00
Travis CI User
718968e77f [maven-release-plugin][skip ci] prepare for next development iteration 2021-11-09 01:10:29 +00:00
Travis CI User
2b59c3ad71 [maven-release-plugin][skip ci] prepare release v1.65 2021-11-09 01:10:27 +00:00
Jamal Kaabi-Mofrad
4c984b3b52 ACS-1795: Updated tas utility version. 2021-11-09 00:25:49 +00:00
Jamal Kaabi-Mofrad
764e47b472 ACS-1795: Updated tas utility version. 2021-11-08 23:41:24 +00:00
Travis CI User
0c24c55296 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-31 15:32:23 +00:00
Travis CI User
5d74ca8323 [maven-release-plugin][skip ci] prepare release v1.64 2021-08-31 15:32:20 +00:00
Sara
a45137fc48 ACS-1881 Enable tests for DAUs (#140) 2021-08-31 16:28:38 +01:00
Travis CI User
3595ffd7cf [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-19 10:27:50 +00:00
Travis CI User
586f5f546c [maven-release-plugin][skip ci] prepare release v1.63 2021-08-19 10:27:47 +00:00
tiagosalvado10
f129a47be0 [ACS-1893] Added maven profiles for alternate rest-api-explorer version. Added isDirectAccessUrlEnabled flag to status info model (#139) 2021-08-19 11:24:08 +01:00
Travis CI User
83cd90c85e [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-02 22:33:17 +00:00
Travis CI User
6186757322 [maven-release-plugin][skip ci] prepare release v1.31 2021-08-02 22:33:11 +00:00
dependabot-preview[bot]
27344421e0 Bump utility from 3.0.44 to 3.0.45 (#61) 2021-08-02 22:25:05 +00:00
Travis CI User
f8287e59e2 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-20 22:27:16 +00:00
Travis CI User
79c7310a34 [maven-release-plugin][skip ci] prepare release v1.62 2021-07-20 22:27:10 +00:00
dependabot-preview[bot]
5039d4d0d0 Bump slf4j-api from 1.7.31 to 1.7.32 (#137) 2021-07-20 22:23:27 +00:00
Travis CI User
f68299aa37 [maven-release-plugin][skip ci] prepare for next development iteration 2021-06-23 07:53:14 +00:00
Travis CI User
e63b0a8751 [maven-release-plugin][skip ci] prepare release v1.61 2021-06-23 07:53:08 +00:00
Andrei Forascu
3d2b7a733a ACS-1585: - add support for storage classes (#136) 2021-06-23 10:49:33 +03:00
Travis CI User
4bcffcd820 [maven-release-plugin][skip ci] prepare for next development iteration 2021-06-18 22:36:15 +00:00
Travis CI User
c552a7b660 [maven-release-plugin][skip ci] prepare release v1.60 2021-06-18 22:36:10 +00:00
dependabot-preview[bot]
3f41f8e4eb Bump slf4j-api from 1.7.30 to 1.7.31 (#135) 2021-06-18 22:25:24 +00:00
Travis CI User
a8f9d4df81 [maven-release-plugin][skip ci] prepare for next development iteration 2021-05-13 11:12:31 +00:00
Travis CI User
366cea6e33 [maven-release-plugin][skip ci] prepare release v1.30 2021-05-13 11:12:27 +00:00
Denis Ungureanu
eb9792339f REPO-5391 : [cmis webservices] isPrivateWorkingCopy throws NullPointerException (#56)
- Alfresco supports BindingType.WEBSERVICES for CMIS 1.0 and "cmis:isPrivateWorkingCopy" was introduced with CMIS 1.1
 - thus checking if the document is a pwc (private working copy) through CMIS 1.0 method https://chemistry.apache.org/java/javadoc/org/apache/chemistry/opencmis/client/api/Document.html#isVersionSeriesPrivateWorkingCopy--
2021-05-13 14:03:48 +03:00
Travis CI User
71ed6d1155 [maven-release-plugin][skip ci] prepare for next development iteration 2021-04-30 22:22:53 +00:00
Travis CI User
c04a83e3c2 [maven-release-plugin][skip ci] prepare release v1.59 2021-04-30 22:22:48 +00:00
dependabot-preview[bot]
e946bfcf71 Bump maven-project-info-reports-plugin from 3.1.1 to 3.1.2 (#129) 2021-04-30 22:18:55 +00:00
Travis CI User
1cee8f46bd [maven-release-plugin][skip ci] prepare for next development iteration 2021-04-20 12:45:44 +00:00
Travis CI User
dfb05bb00e [maven-release-plugin][skip ci] prepare release v1.58 2021-04-20 12:45:39 +00:00
Davide
c33dde8f41 SEARCH-2748 add missing field and change the type for some field than can be included from primitive to boxed type in order to assert if it is present or not in the request (#126) 2021-04-20 14:41:39 +02:00
Travis CI User
fcb7ec339f [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-26 22:21:06 +00:00
Travis CI User
110a21cf27 [maven-release-plugin][skip ci] prepare release v1.29 2021-03-26 22:21:02 +00:00
dependabot-preview[bot]
bfc9fdc802 Bump utility from 3.0.43 to 3.0.44 (#53) 2021-03-26 22:17:50 +00:00
Travis CI User
f93d07d116 [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-25 10:35:24 +00:00
Travis CI User
a88d0b07f2 [maven-release-plugin][skip ci] prepare release v1.57 2021-03-25 10:35:20 +00:00
Nithin Nambiar
da6e08b0e3 ACS-276 rendition version support (#122) 2021-03-25 10:09:24 +00:00
Travis CI User
48c0546bd0 [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-03 14:14:09 +00:00
Travis CI User
2c0fb3fe95 [maven-release-plugin][skip ci] prepare release v1.56 2021-03-03 14:14:03 +00:00
Simona C
ea308c1c0a Fix SyncServiceAPITest with unrecognized field (#121) 2021-03-03 16:10:04 +02:00
Travis CI User
ff8e95e1cf [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-02 22:20:09 +00:00
Travis CI User
8e5a259204 [maven-release-plugin][skip ci] prepare release v1.28 2021-03-02 22:20:02 +00:00
dependabot-preview[bot]
f993a9c904 Bump utility from 3.0.42 to 3.0.43 (#52) 2021-03-02 22:16:40 +00:00
Travis CI User
a02f0e7e2f [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-02 13:23:04 +00:00
Travis CI User
9f32368582 [maven-release-plugin][skip ci] prepare release v1.55 2021-03-02 13:22:58 +00:00
Simona C
b42b08559a Fix SyncServiceAPITest with unrecognized field (#119)
Fix SyncServiceAPITest with unrecognized field
2021-03-02 15:18:36 +02:00
Travis CI User
95af4d6876 [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-02 09:57:44 +00:00
Travis CI User
9c17870040 [maven-release-plugin][skip ci] prepare release v1.54 2021-03-02 09:57:37 +00:00
dhrn
e93028c30e [REPO-5552] expose aspect/type end points (#117)
* [REPO-5552] TAS rest API

* * docs update
2021-03-02 15:23:35 +05:30
Travis CI User
7741456b79 [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-01 22:40:51 +00:00
Travis CI User
27f7b2ec33 [maven-release-plugin][skip ci] prepare release v1.53 2021-03-01 22:40:45 +00:00
dependabot-preview[bot]
078ae4cd32 Bump commons-lang3 from 3.11 to 3.12.0 (#118) 2021-03-01 22:29:29 +00:00
Travis CI User
4cd63227ae [maven-release-plugin][skip ci] prepare for next development iteration 2021-02-04 22:28:37 +00:00
Travis CI User
f42e8b2e82 [maven-release-plugin][skip ci] prepare release v1.27 2021-02-04 22:28:29 +00:00
dependabot-preview[bot]
fff66fea81 Bump utility from 3.0.41 to 3.0.42 (#51) 2021-02-04 22:20:13 +00:00
Travis CI User
ab3a0f00c4 [maven-release-plugin][skip ci] prepare for next development iteration 2021-02-01 10:33:27 +00:00
Travis CI User
829c7ef65d [maven-release-plugin][skip ci] prepare release v1.52 2021-02-01 10:33:20 +00:00
dhrn
0d40d455b2 [REPO-5317] expose site groups apis (#112)
* [REPO-5317] expose site groups method

* Update Site.java

* Update JsonBodyGenerator.java
2021-02-01 10:20:23 +00:00
Travis CI User
3d91bf154d [maven-release-plugin][skip ci] prepare for next development iteration 2021-01-04 22:59:11 +00:00
Travis CI User
d87532ce55 [maven-release-plugin][skip ci] prepare release v1.51 2021-01-04 22:59:04 +00:00
dependabot-preview[bot]
e6f97e979a Bump xercesImpl from 2.12.0 to 2.12.1 (#114) 2021-01-04 22:30:33 +00:00
Travis CI User
451736a9b4 [maven-release-plugin][skip ci] prepare for next development iteration 2020-12-17 22:21:59 +00:00
Travis CI User
7c2ae622ad [maven-release-plugin][skip ci] prepare release v1.26 2020-12-17 22:21:53 +00:00
dependabot-preview[bot]
2d34b3579b Bump utility from 3.0.40 to 3.0.41 (#49) 2020-12-17 22:18:17 +00:00
Travis CI User
78d98bba49 [maven-release-plugin][skip ci] prepare for next development iteration 2020-11-19 22:20:01 +00:00
Travis CI User
d8085b463f [maven-release-plugin][skip ci] prepare release v1.25 2020-11-19 22:19:55 +00:00
dependabot-preview[bot]
1ff9c13985 Bump utility from 3.0.39 to 3.0.40 (#48) 2020-11-19 22:16:08 +00:00
Travis CI User
f23c013950 [maven-release-plugin][skip ci] prepare for next development iteration 2020-11-18 22:19:50 +00:00
Travis CI User
e7f6d7aa15 [maven-release-plugin][skip ci] prepare release v1.24 2020-11-18 22:19:43 +00:00
dependabot-preview[bot]
7d00b5a965 Bump utility from 3.0.38 to 3.0.39 (#47) 2020-11-18 22:15:34 +00:00
Travis CI User
b800d4b7e4 [maven-release-plugin][skip ci] prepare for next development iteration 2020-11-13 14:56:58 +00:00
Travis CI User
92bad68c5b [maven-release-plugin][skip ci] prepare release v1.50 2020-11-13 14:56:51 +00:00
Simona C
d77e02f9a8 DESKTOPAPP-475: Ignored Bamboo quarantined test (#101) 2020-11-13 16:53:03 +02:00
Travis CI User
8a6584540f [maven-release-plugin][skip ci] prepare for next development iteration 2020-11-13 09:05:22 +00:00
Travis CI User
2dec33388e [maven-release-plugin][skip ci] prepare release v1.49 2020-11-13 09:05:15 +00:00
Angel Borroy
2c149b412e SEARCH-2460: Additional methods to perform operations and queries in SOLR (#99) 2020-11-13 09:54:13 +01:00
Travis CI User
78df8e8f18 [maven-release-plugin][skip ci] prepare for next development iteration 2020-11-12 22:20:38 +00:00
Travis CI User
56fca4f248 [maven-release-plugin][skip ci] prepare release v1.23 2020-11-12 22:20:31 +00:00
dependabot-preview[bot]
7646714e3a Bump utility from 3.0.37 to 3.0.38 (#46) 2020-11-12 22:16:53 +00:00
Travis CI User
68948a568a [maven-release-plugin][skip ci] prepare for next development iteration 2020-11-11 22:23:36 +00:00
Travis CI User
c10c522a00 [maven-release-plugin][skip ci] prepare release v1.22 2020-11-11 22:23:30 +00:00
dependabot-preview[bot]
a6fb00721c Bump utility from 3.0.36 to 3.0.37 (#45) 2020-11-11 22:16:48 +00:00
Travis CI User
b07a96a289 [maven-release-plugin][skip ci] prepare for next development iteration 2020-11-04 22:19:54 +00:00
Travis CI User
fb58ef512e [maven-release-plugin][skip ci] prepare release v1.21 2020-11-04 22:19:48 +00:00
dependabot-preview[bot]
99d4b52ccb Bump utility from 3.0.35 to 3.0.36 (#44) 2020-11-04 22:15:37 +00:00
Travis CI User
6946969ab9 [maven-release-plugin][skip ci] prepare for next development iteration 2020-11-04 11:07:37 +00:00
Travis CI User
e1dbd1d4fe [maven-release-plugin][skip ci] prepare release v1.20 2020-11-04 11:07:31 +00:00
Adina Parpalita
0723852ac3 correctly throw assert error (#43) 2020-11-04 13:04:36 +02:00
Travis CI User
3dbcbfa535 [maven-release-plugin][skip ci] prepare for next development iteration 2020-10-30 14:24:15 +00:00
Travis CI User
163c938848 [maven-release-plugin][skip ci] prepare release v1.19 2020-10-30 14:24:09 +00:00
Adina Parpalita
e334c60d7a remove RuntimeException from catch (#42) 2020-10-30 16:20:03 +02:00
Travis CI User
f159e66c1b [maven-release-plugin][skip ci] prepare for next development iteration 2020-10-28 22:22:18 +00:00
Travis CI User
83e4ace76f [maven-release-plugin][skip ci] prepare release v1.18 2020-10-28 22:22:11 +00:00
dependabot-preview[bot]
c60f940cc1 Bump utility from 3.0.34 to 3.0.35 (#41) 2020-10-28 22:18:42 +00:00
Travis CI User
81abbf55b4 [maven-release-plugin][skip ci] prepare for next development iteration 2020-10-27 22:21:47 +00:00
Travis CI User
f97a9605f2 [maven-release-plugin][skip ci] prepare release v1.17 2020-10-27 22:21:39 +00:00
dependabot-preview[bot]
0c81885ea0 Bump utility from 3.0.33 to 3.0.34 (#40) 2020-10-27 22:16:32 +00:00
Travis CI User
248830e77f [maven-release-plugin][skip ci] prepare for next development iteration 2020-10-13 21:22:03 +00:00
Travis CI User
9c950f767f [maven-release-plugin][skip ci] prepare release v1.16 2020-10-13 21:21:57 +00:00
dependabot-preview[bot]
13b23ad55f Bump utility from 3.0.32 to 3.0.33 (#39) 2020-10-13 21:18:35 +00:00
Travis CI User
01f19d717b [maven-release-plugin][skip ci] prepare for next development iteration 2020-10-08 21:24:15 +00:00
Travis CI User
4aeffd2647 [maven-release-plugin][skip ci] prepare release v1.15 2020-10-08 21:24:09 +00:00
dependabot-preview[bot]
03f02a7687 Bump utility from 3.0.30 to 3.0.32 (#38) 2020-10-08 21:20:35 +00:00
Travis CI User
d70555e60a [maven-release-plugin][skip ci] prepare for next development iteration 2020-09-30 13:20:42 +00:00
Travis CI User
255c6c8e8a [maven-release-plugin][skip ci] prepare release v1.14 2020-09-30 13:20:36 +00:00
Alexandru-Eusebiu Epure
961b336c11 Add WS support - alfa version. (#37)
* Add support for WS Binding - alfa stage.
2020-09-30 15:57:54 +03:00
dependabot-preview[bot]
ec79172479 Bump utility from 3.0.29 to 3.0.30 (#36) 2020-09-25 21:18:48 +00:00
Travis CI User
10b427209d [maven-release-plugin][skip ci] prepare for next development iteration 2020-09-04 21:22:18 +00:00
Travis CI User
a53eb13f9f [maven-release-plugin][skip ci] prepare release v1.48 2020-09-04 21:22:12 +00:00
dependabot-preview[bot]
c0a90dd32b Bump maven-project-info-reports-plugin from 3.1.0 to 3.1.1 (#83) 2020-09-04 21:18:16 +00:00
dependabot-preview[bot]
47de5d9e0a Bump utility from 3.0.28 to 3.0.29 (#32) 2020-08-31 21:20:26 +00:00
dependabot-preview[bot]
4cb843024c Bump utility from 3.0.27 to 3.0.28 (#31) 2020-08-28 21:19:22 +00:00
Travis CI User
d2a414f8a7 [maven-release-plugin][skip ci] prepare for next development iteration 2020-08-06 11:49:03 +00:00
Travis CI User
e484360980 [maven-release-plugin][skip ci] prepare release v1.47 2020-08-06 11:48:56 +00:00
Alex Mukha
691855bed2 Fix json serialisation for StatsSearchTest 2020-08-06 12:44:48 +01:00
dependabot-preview[bot]
b8cb5d89a6 Bump utility from 3.0.26 to 3.0.27 (#29) 2020-07-21 21:45:50 +00:00
Travis CI User
e81a33d770 [maven-release-plugin][skip ci] prepare for next development iteration 2020-07-16 22:22:20 +00:00
Travis CI User
9dab62b490 [maven-release-plugin][skip ci] prepare release v1.46 2020-07-16 22:22:13 +00:00
dependabot-preview[bot]
44f602eee4 Bump commons-lang3 from 3.10 to 3.11 (#76) 2020-07-16 21:48:33 +00:00
dependabot-preview[bot]
d61e5826f7 Bump utility from 3.0.25 to 3.0.26 (#28) 2020-07-14 21:31:16 +00:00
Travis CI User
c04c149779 [maven-release-plugin][skip ci] prepare for next development iteration 2020-07-14 12:59:35 +00:00
Travis CI User
9cfa31ca63 [maven-release-plugin][skip ci] prepare release v1.45 2020-07-14 12:59:29 +00:00
dhrn
a061d8d4df * fixed serialization problem (#74) 2020-07-14 18:19:56 +05:30
Travis CI User
8052f7f299 [maven-release-plugin][skip ci] prepare for next development iteration 2020-07-14 11:21:28 +00:00
Travis CI User
962ce7a740 [maven-release-plugin][skip ci] prepare release v1.44 2020-07-14 11:21:21 +00:00
Andrei Forascu
57603871d3 ACS-349: - add methods for running rest-api requests on direct access URL endpoints (#73) 2020-07-14 14:17:28 +03:00
dependabot-preview[bot]
8238947ee0 Bump utility from 3.0.24 to 3.0.25 (#27) 2020-07-10 21:33:37 +00:00
dependabot-preview[bot]
129dac1916 Bump utility from 3.0.23 to 3.0.24 (#26) 2020-07-07 21:23:52 +00:00
dependabot-preview[bot]
cb5548914a Bump utility from 3.0.22 to 3.0.23 (#25) 2020-07-02 21:20:47 +00:00
dependabot-preview[bot]
32b66fad2b Bump utility from 3.0.21 to 3.0.22 (#24) 2020-07-01 21:23:03 +00:00
Travis CI User
7d7cc446a4 [maven-release-plugin][skip ci] prepare for next development iteration 2020-06-15 22:12:04 +00:00
Travis CI User
2733ece40f [maven-release-plugin][skip ci] prepare release v1.43 2020-06-15 22:11:56 +00:00
dependabot-preview[bot]
f01204bf0a Bump utility from 3.0.20 to 3.0.21 (#63) 2020-06-15 21:32:47 +00:00
dependabot-preview[bot]
475dd43a32 Bump utility from 3.0.20 to 3.0.21 (#22) 2020-06-15 21:23:58 +00:00
Travis CI User
add073938a [maven-release-plugin][skip ci] prepare for next development iteration 2020-06-04 07:59:04 +00:00
Travis CI User
472becd973 [maven-release-plugin][skip ci] prepare release v1.42 2020-06-04 07:58:57 +00:00
Simona C
d9293fff27 DESKTOPAPP-112: Added folderChange variable to SyncService Changes Model (#62)
Co-authored-by: Simona Carp <simona.carp@ness.com>
2020-06-04 10:55:16 +03:00
Travis CI User
361e6b0221 [maven-release-plugin][skip ci] prepare for next development iteration 2020-06-02 21:25:50 +00:00
Travis CI User
3aec98cb92 [maven-release-plugin][skip ci] prepare release v1.41 2020-06-02 21:25:43 +00:00
dependabot-preview[bot]
cfd0dd388e Bump maven-project-info-reports-plugin from 3.0.0 to 3.1.0 (#61) 2020-06-02 21:21:46 +00:00
Travis CI User
8aadb2baf1 [maven-release-plugin][skip ci] prepare for next development iteration 2020-05-27 08:22:20 +00:00
Travis CI User
ca6b4cce24 [maven-release-plugin][skip ci] prepare release v1.40 2020-05-27 08:22:13 +00:00
bogdanbocancea
eb2c76f600 DESKTOPAPP-39: fix list constraint array (#60)
Co-authored-by: bogdan0317 <bogdan.bocancea@gmail.com>
2020-05-27 11:18:24 +03:00
Travis CI User
fa910faea6 [maven-release-plugin][skip ci] prepare for next development iteration 2020-05-21 10:36:32 +00:00
Travis CI User
d428c542fc [maven-release-plugin][skip ci] prepare release v1.39 2020-05-21 10:36:26 +00:00
bogdanbocancea
d0d5ce8d9d DESKTOPAPP-39: Create methods to handle custom aspects, types and properties (#57)
Co-authored-by: bogdan0317 <bogdan.bocancea@gmail.com>
2020-05-21 13:32:31 +03:00
Travis CI User
3e4a3a0a31 [maven-release-plugin][skip ci] prepare for next development iteration 2020-04-10 05:34:35 +00:00
Travis CI User
7d5f01f3d5 [maven-release-plugin][skip ci] prepare release v1.38 2020-04-10 05:34:28 +00:00
Ciprian Chelaru
1ae1f87cdf added missing quota and quotaUsed properties (#53) 2020-04-10 08:30:36 +03:00
Travis CI User
a5ceb3df00 [maven-release-plugin][skip ci] prepare for next development iteration 2020-03-27 22:20:58 +00:00
Travis CI User
18dc254813 [maven-release-plugin][skip ci] prepare release v1.37 2020-03-27 22:20:51 +00:00
dependabot-preview[bot]
b737775fd3 Bump commons-lang3 from 3.9 to 3.10 (#51) 2020-03-27 22:16:48 +00:00
Travis CI User
175a525b64 [maven-release-plugin][skip ci] prepare for next development iteration 2020-03-26 16:41:42 +00:00
Travis CI User
8dba7f9468 [maven-release-plugin][skip ci] prepare release v1.36 2020-03-26 16:41:35 +00:00
Meenal Bhave
838794f274 Search-2142: Configuring the right api endpoint, as the context changes from solr, solr admin and alfresco apis (#50) 2020-03-26 16:37:39 +00:00
Travis CI User
917961569d [maven-release-plugin][skip ci] prepare for next development iteration 2020-03-04 11:50:11 +00:00
Travis CI User
8e1c10aae0 [maven-release-plugin][skip ci] prepare release v1.35 2020-03-04 11:50:05 +00:00
Meenal Bhave
580dda50e6 Search-2078: Added a method to configure alfresco endpoint for search api in case its been reset to solr endpoint (#42) 2020-03-04 11:46:13 +00:00
Travis CI User
d0bc3f1ece [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-26 22:29:57 +00:00
Travis CI User
a05f2eb20f [maven-release-plugin][skip ci] prepare release v1.34 2020-02-26 22:29:49 +00:00
dependabot-preview[bot]
51029868a9 Bump utility from 3.0.19 to 3.0.20 (#41) 2020-02-26 22:18:30 +00:00
dependabot-preview[bot]
178ae7375a Bump utility from 3.0.19 to 3.0.20 (#16) 2020-02-26 22:18:06 +00:00
Travis CI User
e0b1c6f776 [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-17 12:38:43 +00:00
Travis CI User
9930f18291 [maven-release-plugin][skip ci] prepare release v1.33 2020-02-17 12:38:37 +00:00
Ciprian Chelaru
ca785cda74 APPSREPO-752 added identityServiceConfig obj into sync service model (#38) 2020-02-17 14:34:48 +02:00
Travis CI User
308a60dcfa [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-17 09:20:22 +00:00
Travis CI User
2518910fe1 [maven-release-plugin][skip ci] prepare release v1.32 2020-02-17 09:20:15 +00:00
ciprianchelaru
4ddfb16bff APPSREPO-752_new object in sync service model 2020-02-17 11:15:51 +02:00
Travis CI User
ffb4df068b [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-11 16:23:10 +00:00
Travis CI User
7fdb040b50 [maven-release-plugin][skip ci] prepare release v1.31 2020-02-11 16:23:04 +00:00
Meenal Bhave
c2e587d640 Search-2096: Added missing API to update Site (#37) 2020-02-11 16:19:15 +00:00
Travis CI User
bed12e40ca [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-06 12:14:27 +00:00
Travis CI User
a53daf152f [maven-release-plugin][skip ci] prepare release v1.30 2020-02-06 12:14:19 +00:00
Angel Borroy
cc03aaf92f RestWrapper for Solr Admin API (#34) 2020-02-06 13:10:30 +01:00
Travis CI User
f9102eae0d [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-05 16:31:10 +00:00
Travis CI User
8f252b69f1 [maven-release-plugin][skip ci] prepare release v1.29 2020-02-05 16:31:04 +00:00
Keerat Lalia
50f884556c SEARCH-1681 Adding the shard params instance to the RestInstanceModel (#33)
* SEARCH-1681 Adding the shard params instance to the RestInstanceModel

* SEARCH-1681 Adding the changes from the review
2020-02-04 13:47:11 +00:00
dependabot-preview[bot]
b1ad95a756 Bump utility from 3.0.18 to 3.0.19 (#32) 2020-01-23 22:18:23 +00:00
dependabot-preview[bot]
d935b7fc2e Bump utility from 3.0.18 to 3.0.19 (#13) 2020-01-23 22:16:28 +00:00
Travis CI User
581f82f332 [maven-release-plugin][skip ci] prepare for next development iteration 2020-01-15 23:05:25 +00:00
Travis CI User
80fda4ed56 [maven-release-plugin][skip ci] prepare release v1.28 2020-01-15 23:05:19 +00:00
dependabot-preview[bot]
086ca9229e Bump utility from 3.0.17 to 3.0.18 (#27) 2020-01-15 22:26:44 +00:00
Travis CI User
5bb26afe91 [maven-release-plugin][skip ci] prepare for next development iteration 2020-01-15 22:25:55 +00:00
Travis CI User
8c121889ae [maven-release-plugin][skip ci] prepare release v1.13 2020-01-15 22:25:49 +00:00
dependabot-preview[bot]
e241c2a4ec Bump utility from 3.0.17 to 3.0.18 (#12) 2020-01-15 22:17:05 +00:00
Travis CI User
6d84baa34e [maven-release-plugin][skip ci] prepare for next development iteration 2020-01-14 23:19:23 +00:00
Travis CI User
d048054903 [maven-release-plugin][skip ci] prepare release v1.27 2020-01-14 23:19:17 +00:00
dependabot-preview[bot]
faf6cafe5a Bump groovy-json from 2.5.8 to 2.5.9 (#26) 2020-01-14 22:37:31 +00:00
dependabot-preview[bot]
13a134da27 Bump groovy from 2.5.8 to 2.5.9 (#25) 2020-01-14 22:32:53 +00:00
Travis CI User
5e93e937f9 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-17 23:31:54 +00:00
Travis CI User
36c830ecdb [maven-release-plugin][skip ci] prepare release v1.26 2019-12-17 23:31:48 +00:00
Travis CI User
da1fd787e7 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-17 23:29:59 +00:00
Travis CI User
0cf76c6d3f [maven-release-plugin][skip ci] prepare release v1.12 2019-12-17 23:29:53 +00:00
dependabot-preview[bot]
013f3fac1c Bump utility from 3.0.16 to 3.0.17 (#23) 2019-12-17 22:57:31 +00:00
dependabot-preview[bot]
347c05c855 Bump utility from 3.0.16 to 3.0.17 (#9) 2019-12-17 22:56:44 +00:00
Travis CI User
ec675d6123 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-16 22:42:32 +00:00
Travis CI User
e115c673e1 [maven-release-plugin][skip ci] prepare release v1.25 2019-12-16 22:42:27 +00:00
dependabot-preview[bot]
2453b3c9c7 Bump slf4j-api from 1.7.29 to 1.7.30 (#22) 2019-12-16 22:31:24 +00:00
Travis CI User
761554ad83 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-14 00:26:40 +00:00
Travis CI User
20738f6ac5 [maven-release-plugin][skip ci] prepare release v1.24 2019-12-14 00:26:34 +00:00
Alex Mukha
1a90c129bc Revert "Decrease wait time for activity feed requests"
This reverts commit 9e9caec601.
2019-12-14 00:22:46 +00:00
Travis CI User
76ba1ce813 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-12 09:38:08 +00:00
Travis CI User
91bb8651d3 [maven-release-plugin][skip ci] prepare release v1.23 2019-12-12 09:38:02 +00:00
David Edwards
bbdc41555c Revert "Bump httpclient-osgi from 4.5.3 to 4.5.10 (#21)"
This reverts commit d0e94e0d68.
2019-12-12 09:33:42 +00:00
Travis CI User
1d77e2e852 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-11 22:41:31 +00:00
Travis CI User
8155132d69 [maven-release-plugin][skip ci] prepare release v1.22 2019-12-11 22:41:25 +00:00
dependabot-preview[bot]
d0e94e0d68 Bump httpclient-osgi from 4.5.3 to 4.5.10 (#21) 2019-12-11 22:33:19 +00:00
Travis CI User
5c50dbef83 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-11 14:41:31 +00:00
Travis CI User
ef6d2531fb [maven-release-plugin][skip ci] prepare release v1.21 2019-12-11 14:41:25 +00:00
David Edwards
0c3c584ed9 Revert rest-assured 2019-12-11 14:37:37 +00:00
David Edwards
516d15796f REPO-4739 Update Rest-assured and httpclient-osgi
Rest-assured to 4.1.2 (newest version)
httpclient-osgi 4.5.3 (dependency of rest-assured)
2019-12-11 14:32:33 +00:00
Travis CI User
440a3640a9 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-04 23:07:44 +00:00
Travis CI User
9d4c92bedf [maven-release-plugin][skip ci] prepare release v1.11 2019-12-04 23:07:39 +00:00
Travis CI User
c2a2541a62 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-04 22:50:02 +00:00
Travis CI User
397979a4f9 [maven-release-plugin][skip ci] prepare release v1.20 2019-12-04 22:49:56 +00:00
dependabot-preview[bot]
e5655effee Bump utility from 3.0.15 to 3.0.16 (#8) 2019-12-04 22:29:55 +00:00
dependabot-preview[bot]
ec85dd7e61 Bump utility from 3.0.15 to 3.0.16 (#20) 2019-12-04 22:19:25 +00:00
Travis CI User
69ccd06cf2 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-03 12:08:15 +00:00
Travis CI User
6002440be5 [maven-release-plugin][skip ci] prepare release v1.19 2019-12-03 12:08:09 +00:00
Tom Page
1973a9d578 Add some javadoc to explain the type of totalItems. 2019-12-03 12:03:45 +00:00
Travis CI User
8d1e16e9c2 [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-30 00:09:40 +00:00
Travis CI User
9e0b26f612 [maven-release-plugin][skip ci] prepare release v1.18 2019-11-30 00:09:34 +00:00
Travis CI User
cf6495a22c [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-30 00:00:11 +00:00
Travis CI User
f917f67a00 [maven-release-plugin][skip ci] prepare release v1.10 2019-11-30 00:00:06 +00:00
dependabot-preview[bot]
9080d3e0d9 Bump utility from 3.0.8 to 3.0.15 (#19) 2019-11-29 23:02:25 +00:00
dependabot-preview[bot]
f33e7b9555 Bump utility from 3.0.14 to 3.0.15 (#7) 2019-11-29 22:34:36 +00:00
Travis CI User
cfec11a246 [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-29 16:34:51 +00:00
Travis CI User
c066e42152 [maven-release-plugin][skip ci] prepare release v1.9 2019-11-29 16:34:45 +00:00
Tom Page
d2ab9a7998 SEARCH-1989 Allow checking ordered values returned in a column. (#6) 2019-11-29 16:27:05 +00:00
Travis CI User
15dea80d0a [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-29 14:53:58 +00:00
Travis CI User
28ef5fa32c [maven-release-plugin][skip ci] prepare release v1.8 2019-11-29 14:53:52 +00:00
Tom Page
7da7544c37 SEARCH-1989 Allow checking values returned in a column. (#1) 2019-11-29 14:50:05 +00:00
Travis CI User
f916a625d0 [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-29 14:44:37 +00:00
Travis CI User
e0c278e277 [maven-release-plugin][skip ci] prepare release v1.17 2019-11-29 14:44:31 +00:00
Travis CI User
98bc091adc [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-29 14:44:01 +00:00
Travis CI User
8839ed7027 [maven-release-plugin][skip ci] prepare release v1.7 2019-11-29 14:43:55 +00:00
dependabot-preview[bot]
bb64b05534 Bump commons-lang3 from 3.8 to 3.9 (#15) 2019-11-29 14:36:27 +00:00
dependabot-preview[bot]
3ee1db50f8 Bump utility from 3.0.8 to 3.0.14 (#3) 2019-11-29 14:35:21 +00:00
dependabot-preview[bot]
28be182040 Bump groovy from 2.5.5 to 2.5.8 (#16) 2019-11-29 14:34:25 +00:00
dependabot-preview[bot]
ee88b0bf0c Bump scribejava-apis from 6.5.1 to 6.9.0 (#14) 2019-11-29 14:33:01 +00:00
dependabot-preview[bot]
3fbbf5a891 Bump chemistry-opencmis-commons-api from 1.0.0 to 1.1.0 (#2) 2019-11-29 14:32:03 +00:00
dependabot-preview[bot]
cd60067bbf Bump servlet-api from 2.4 to 2.5 (#13) 2019-11-29 14:31:42 +00:00
dependabot-preview[bot]
bd64391527 Bump javax.json from 1.0.4 to 1.1.4 (#11) 2019-11-29 14:31:38 +00:00
dependabot-preview[bot]
126ece3dbe Bump groovy-json from 2.5.5 to 2.5.8 (#12) 2019-11-29 14:31:32 +00:00
dependabot-preview[bot]
f7b7eeaf56 Bump slf4j-api from 1.7.2 to 1.7.29 (#8) 2019-11-29 14:29:58 +00:00
dependabot-preview[bot]
53937c963c Bump httpclient-osgi from 4.5.2 to 4.5.10 (#6) 2019-11-29 14:29:49 +00:00
Travis CI User
671116b500 [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-29 11:00:11 +00:00
Travis CI User
82369a3dcf [maven-release-plugin][skip ci] prepare release v1.16 2019-11-29 11:00:05 +00:00
Alex Mukha
9e9caec601 Decrease wait time for activity feed requests 2019-11-29 10:56:10 +00:00
Travis CI User
27caf48c79 [maven-release-plugin][skip ci] prepare for next development iteration 2019-11-15 16:55:22 +00:00
Travis CI User
e1b1e66e8d [maven-release-plugin][skip ci] prepare release v1.15 2019-11-15 16:55:15 +00:00
Alex Mukha
9186cead13 Move demo tests to test folder 2019-11-15 16:51:16 +00:00
Travis CI User
6c2d084209 [maven-release-plugin][skip ci] prepare for next development iteration 2019-10-17 17:07:43 +00:00
Travis CI User
81e0cb939d [maven-release-plugin][skip ci] prepare release v1.14 2019-10-17 17:07:38 +00:00
Alex Mukha
2bd64e48b5 REPO-4705: Allow to reconfigure server URI in RestWrapper 2019-10-17 18:03:20 +01:00
Alex Mukha
3d6c34c8d6 Revert "REPO-4705: Allow to reconfigure server URI (#2)"
This reverts commit 3c818df7f1.
2019-10-17 16:57:57 +01:00
Travis CI User
506dd32b31 [maven-release-plugin][skip ci] prepare for next development iteration 2019-10-16 10:44:44 +00:00
Travis CI User
70ed927b3c [maven-release-plugin][skip ci] prepare release v1.13 2019-10-16 10:44:38 +00:00
Alex Mukha
3c818df7f1 REPO-4705: Allow to reconfigure server URI (#2) 2019-10-16 11:33:12 +01:00
Travis CI User
612b65798e [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 17:53:10 +00:00
Travis CI User
d0724a0a06 [maven-release-plugin][skip ci] prepare release v1.12 2019-08-02 17:53:03 +00:00
Alex Mukha
beea540ad0 Update utility to 3.0.8 2019-08-02 18:46:30 +01:00
Tom Page
099e1328c0 Remove several references to unthrown checked exceptions. 2019-08-02 18:30:12 +01:00
Tom Page
0f01dea5d2 Don't throw raw Exception when performing search. 2019-08-02 18:30:12 +01:00
eliaporciani
38edaf79c2 [SEARCH-1641]
changed score type to float
2019-08-02 18:30:12 +01:00
Travis CI User
d7e7545482 [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 16:06:56 +00:00
Travis CI User
2cdcc7d5ce [maven-release-plugin][skip ci] prepare release v1.11 2019-08-02 16:06:50 +00:00
Alex Mukha
de7431b917 Remove unused config in pom 2019-08-02 17:00:41 +01:00
Travis CI User
fb7e03b02f [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 15:58:13 +00:00
Travis CI User
e6e1245a7a [maven-release-plugin][skip ci] prepare release v1.6 2019-08-02 15:58:07 +00:00
Alex Mukha
2e499fb377 Remove source jar config 2019-08-02 16:53:26 +01:00
Alex Mukha
b25dbeb608 Remove test jar 2019-08-02 16:52:58 +01:00
Alex Mukha
8fba004f83 Remove unused properties from pom 2019-08-02 16:49:34 +01:00
Alex Mukha
47b391315b Fix pom formatting 2019-08-02 16:48:22 +01:00
Travis CI User
14e500cb1f [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 15:27:58 +00:00
Travis CI User
4c37f4cda6 [maven-release-plugin][skip ci] prepare release v1.10 2019-08-02 15:27:53 +00:00
Alex Mukha
8470a1962b Cleanup unused resources 2019-08-02 16:21:41 +01:00
Travis CI User
deade9c64c [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 15:13:30 +00:00
Travis CI User
ffe1d0a158 [maven-release-plugin][skip ci] prepare release v1.5 2019-08-02 15:13:24 +00:00
Alex Mukha
1cd2352dc9 Cleanup of resources 2019-08-02 16:09:11 +01:00
Travis CI User
a27871e7a7 [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 14:59:03 +00:00
Travis CI User
030363d7c0 [maven-release-plugin][skip ci] prepare release v1.4 2019-08-02 14:58:57 +00:00
Alex Mukha
0af021b469 Release 1.4 2019-08-02 15:53:53 +01:00
Travis CI User
0dc4f3fbf7 [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 14:33:56 +00:00
Travis CI User
988846e1df [maven-release-plugin][skip ci] prepare release v1.3 2019-08-02 14:33:50 +00:00
Alex Mukha
67e366def2 Release 1.3 2019-08-02 15:29:05 +01:00
Travis CI User
a673102baf [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 14:24:20 +00:00
Travis CI User
652c0784d5 [maven-release-plugin][skip ci] prepare release v1.2 2019-08-02 14:24:14 +00:00
Alex Mukha
5ca5e96b7e Fix javadoc on JDK11 2019-08-02 15:19:08 +01:00
Travis CI User
ed39b9a114 [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 14:15:22 +00:00
Travis CI User
35e543f37d [maven-release-plugin][skip ci] prepare release v1.1 2019-08-02 14:15:17 +00:00
Alex Mukha
a8585b55cb Add compiler plugin config to run on JDK11 2019-08-02 15:09:19 +01:00
Travis CI User
3ffb350567 [maven-release-plugin][skip ci] prepare for next development iteration 2019-08-02 14:03:49 +00:00
Travis CI User
4d2073e4c5 [maven-release-plugin][skip ci] prepare release v1.0 2019-08-02 14:03:43 +00:00
Alex Mukha
19ebec0320 Update build agent to xenial 2019-08-01 22:41:13 +01:00
Alex Mukha
0c23a3fa4b Initial version after move 2019-08-01 22:34:53 +01:00
Alex Mukha
3c2269f51c Initial commit 2019-08-01 22:30:29 +01:00
Travis CI User
914ad394c3 [maven-release-plugin][skip ci] prepare for next development iteration 2019-07-27 15:48:13 +00:00
Travis CI User
1668baac05 [maven-release-plugin][skip ci] prepare release v1.9 2019-07-27 15:48:07 +00:00
Alex Mukha
17118db32f Fix response status in create tenant request 2019-07-27 16:32:12 +01:00
Travis CI User
13f6aa2044 [maven-release-plugin][skip ci] prepare for next development iteration 2019-07-27 14:13:34 +00:00
Travis CI User
f6b3b62841 [maven-release-plugin][skip ci] prepare release v1.8 2019-07-27 14:13:28 +00:00
Alex Mukha
46c59e50f6 Fix response status in node rendition request 2019-07-27 14:51:15 +01:00
Alex Mukha
7870db5370 Fix response status in person activities request 2019-07-27 14:50:35 +01:00
Alex Mukha
78a8d8d6cb Fix response status in node rendition request 2019-07-27 14:44:56 +01:00
Travis CI User
60083c6145 [maven-release-plugin][skip ci] prepare for next development iteration 2019-07-27 12:36:01 +00:00
Travis CI User
c9a6c633ed [maven-release-plugin][skip ci] prepare release v1.7 2019-07-27 12:35:55 +00:00
Alex Mukha
1de92e61c4 Fix response status in node rendition request 2019-07-27 13:23:00 +01:00
Alex Mukha
e246eb31cf Add email address of release bot [skip ci] 2019-06-20 19:05:46 +01:00
Travis CI User
4261615fb4 [maven-release-plugin][skip ci] prepare for next development iteration 2019-06-07 16:02:43 +00:00
Travis CI User
6cc81beab5 [maven-release-plugin][skip ci] prepare release v1.6 2019-06-07 16:02:37 +00:00
Alex Mukha
9a77903d8c Update utility to 3.0.0 (#1) 2019-06-07 16:45:28 +01:00
Travis CI User
0049eefcdb [maven-release-plugin][skip ci] prepare for next development iteration 2019-06-05 10:08:07 +00:00
Travis CI User
918d5575ca [maven-release-plugin][skip ci] prepare release v1.5 2019-06-05 10:07:59 +00:00
Travis CI User
3c7b48d95c [maven-release-plugin][skip ci] prepare for next development iteration 2019-06-03 13:45:15 +00:00
Travis CI User
85635663a2 [maven-release-plugin][skip ci] prepare release v1.4 2019-06-03 13:45:07 +00:00
Alex Mukha
46d42c0910 Prepare for next release 2019-06-03 14:36:25 +01:00
Alex Mukha
5cd309d5ff [ci skip] Add skip release in Travis 2019-06-03 14:27:47 +01:00
Alex Mukha
5b5c3ee584 Update tas-utility version to 2.0.25 2019-06-03 14:25:12 +01:00
Alex Mukha
ee3513ddc8 REPO-4250: REST API: Refactor TAS RESTAPI tests to not use CMIS
- cherry-pick cd78b750c22f908e962362d9e7ebc754d206e203 from release/5.2.x to master
2019-06-03 14:23:15 +01:00
Travis CI User
98d90b8008 [maven-release-plugin][skip ci] prepare for next development iteration 2019-05-29 10:05:02 +00:00
Travis CI User
1847b4e3b0 [maven-release-plugin][skip ci] prepare release v1.3 2019-05-29 10:04:57 +00:00
Travis CI User
81dfbe0baf [maven-release-plugin][skip ci] prepare for next development iteration 2019-05-22 10:05:23 +00:00
Travis CI User
068eb23f88 [maven-release-plugin][skip ci] prepare release v1.2 2019-05-22 10:05:18 +00:00
Travis CI User
344caf4904 [maven-release-plugin][skip ci] prepare for next development iteration 2019-05-15 16:15:23 +00:00
Travis CI User
47bfefb3c4 [maven-release-plugin][skip ci] prepare release v1.1 2019-05-15 16:15:18 +00:00
Alex Mukha
21c63e382c Fix JavaDoc compilation 2019-05-15 17:09:50 +01:00
Travis CI User
12a2bb249e [maven-release-plugin][skip ci] prepare for next development iteration 2019-05-15 15:36:17 +00:00
Travis CI User
48a22a88f2 [maven-release-plugin][skip ci] prepare release v1.0 2019-05-15 15:36:11 +00:00
Alex Mukha
d3a78b59a6 Fix pom. Update release stage 2019-05-15 16:25:44 +01:00
Alex Mukha
97657229c9 Update tas-utility to 2.0.22 2019-05-15 16:14:41 +01:00
Alex Mukha
bbe7da71c2 Remove non-public xerces and insight-jdbc dependencies 2019-05-15 11:03:04 +01:00
Alex Mukha
219d62e005 Add Travis configuration 2019-05-15 10:55:20 +01:00
Alex Mukha
c17d35da27 Initial commit 2019-05-15 10:51:35 +01:00
Alex Mukha
05090ef2dc Initial commit 2019-05-15 10:16:13 +01:00
620 changed files with 57005 additions and 3437 deletions

View File

@@ -264,6 +264,8 @@ jobs:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 60 mvn -B verify -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
after_success: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/tas-restapi"
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-restapi"
- name: "REST API TAS tests part2"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
@@ -272,6 +274,8 @@ jobs:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 60 mvn -B verify -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part2 -Denvironment=default -DrunBugs=false
after_success: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/tas-restapi"
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-restapi"
- name: "REST API TAS tests part3"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
@@ -280,6 +284,8 @@ jobs:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 60 mvn -B verify -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part3 -Denvironment=default -DrunBugs=false
after_success: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/tas-restapi"
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-restapi"
- name: "CMIS TAS tests - BROWSER binding"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
@@ -288,6 +294,8 @@ jobs:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 40 mvn -B verify -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-browser -Denvironment=default -DrunBugs=false
after_success: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/tas-cmis"
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-cmis"
- name: "CMIS TAS tests - ATOM binding"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
@@ -296,6 +304,8 @@ jobs:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 40 mvn -B verify -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-atom -Denvironment=default -DrunBugs=false
after_success: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/tas-cmis"
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-cmis"
- name: "CMIS TAS tests - WEBSERVICES binding"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
@@ -304,6 +314,8 @@ jobs:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 40 mvn -B verify -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-webservices -Denvironment=default -DrunBugs=false
after_success: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/tas-cmis"
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-cmis"
- name: "Email TAS tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
@@ -312,6 +324,8 @@ jobs:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 30 mvn -B verify -f packaging/tests/tas-email/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
after_success: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/tas-email"
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-email"
- name: "WebDAV TAS tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
@@ -320,6 +334,8 @@ jobs:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script: travis_wait 30 mvn -B verify -f packaging/tests/tas-webdav/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
after_success: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/tas-webdav"
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-webdav"
- name: "Integration TAS tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
@@ -327,7 +343,10 @@ jobs:
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
- travis_retry travis_wait 40 mvn install -pl :alfresco-community-repo-integration-test -am -DskipTests -Pall-tas-tests
script: travis_wait 30 mvn -B verify -f packaging/tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
after_success: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/tas-integration"
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-integration"
- name: "Share Services - ShareServicesTestSuite"
if: commit_message !~ /\[skip repo\]/
@@ -377,7 +396,7 @@ jobs:
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt4 -f amps/ags/pom.xml ${LOG_WARN}
- name: "AGS Community Rest API Tests"
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/ AND commit_message !~ /\[skip tas\]/) OR (commit_message =~ /\[ags\]/ AND commit_message =~ /\[tas\]/)
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
addons:
artifacts:
@@ -389,7 +408,8 @@ jobs:
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
script: travis_wait 40 mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -am -DfailIfNoTests=false -Dskip.automationtests=false -Pags
- travis_wait 40 mvn -B install -pl :alfresco-governance-services-automation-community-rest-api -am -Pags -Pall-tas-tests -DskipTests
script: travis_wait 40 mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags -Pall-tas-tests
after_script: bash amps/ags/travis/scripts/getLogs.sh
- name: "Push to Nexus"

View File

@@ -7,14 +7,22 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>17.109</version>
<version>20.36-SNAPSHOT</version>
</parent>
<modules>
<module>rm-community</module>
<module>rm-automation</module>
</modules>
<profiles>
<profile>
<id>all-tas-tests</id>
<modules>
<module>rm-automation</module>
</modules>
</profile>
</profiles>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>17.109</version>
<version>20.36-SNAPSHOT</version>
</parent>
<build>
@@ -43,14 +43,21 @@
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<version>${dependency.slf4j.version}</version>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${dependency.log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${dependency.log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.alfresco.tas</groupId>
@@ -62,6 +69,17 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>utility</artifactId>
<version>${dependency.tas-utility.version}</version>
<!-- These exclusions can be removed once tas-utility does not rely on Reload4j anymore -->
<exclusions>
<exclusion>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>

View File

@@ -0,0 +1,73 @@
/*-
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.v0;
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;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.MessageFormat;
import java.util.List;
/**
* Methods to make API requests using v0 API for Linking Records
*
* @author Kavit Shah
* @since 3.2
*/
@Component
public class LinksAPI extends BaseAPI {
private static final String LINK_API = "{0}doclib/action/rm-link/site/rm/documentLibrary/{1}";
/**
* Creates the Link
*
* @param user The username of the user to use.
* @param password The password of the user.
* @param expectedStatusCode The expected return status code.
* @param sourcePath The Source of link the record. This should be in the format
* "{site}/{container}/{path}", "{site}/{container}", "{store_type}/{store_id}/{id}/{path}",
* "{store_type}/{store_id}/{id}" or "{store_type}/{store_id}".
* @param nodeRefs The Node that needs to be linked.
* @return The HTTP Response.
* @throws AssertionError If the API didn't return the expected status code.
*/
public HttpResponse linkRecord(String user, String password, int expectedStatusCode, String sourcePath, List<String> nodeRefs) throws UnsupportedEncodingException {
JSONObject requestParams = new JSONObject();
requestParams.put("nodeRefs", new JSONArray(nodeRefs));
return doSlingshotPostJsonRequest(user, password, expectedStatusCode, requestParams,
MessageFormat.format(LINK_API, "{0}", sourcePath));
}
}

View File

@@ -26,6 +26,7 @@
*/
package org.alfresco.rest.v0;
import static org.apache.http.HttpStatus.SC_OK;
import static org.testng.Assert.assertTrue;
import java.io.UnsupportedEncodingException;
@@ -36,6 +37,7 @@ import java.util.List;
import org.alfresco.rest.core.v0.BaseAPI;
import org.alfresco.rest.rm.community.model.audit.AuditEntry;
import org.alfresco.rest.rm.community.util.PojoUtility;
import org.apache.http.HttpResponse;
import org.json.JSONArray;
import org.json.JSONObject;
import org.slf4j.Logger;
@@ -58,6 +60,8 @@ public class RMAuditAPI extends BaseAPI
private static final String RM_AUDIT_API = "{0}rma/admin/rmauditlog";
private static final String RM_AUDIT_LOG_API = RM_AUDIT_API + "?{1}";
private static final String RM_AUDIT_LOG_AS_RECORD = "{0}node/{1}/rmauditlog";
/**
* Returns a list of rm audit entries .
*
@@ -84,6 +88,21 @@ public class RMAuditAPI extends BaseAPI
return PojoUtility.jsonToObject(auditEntries, AuditEntry.class);
}
/**
* Returns a list of rm audit entries .
*
* @param user The username of the user to use.
* @param password The password of the user.
* @param size Maximum number of log entries to return
* @return return All return log entries
*/
public List<AuditEntry> getRMAuditLogAll(String user, String password, final int size) {
String parameters = "size=" + size;
JSONArray auditEntries = doGetRequest(user, password,
MessageFormat.format(RM_AUDIT_LOG_API,"{0}", parameters)).getJSONObject("data").getJSONArray("entries");
return PojoUtility.jsonToObject(auditEntries, AuditEntry.class);
}
/**
* Clear the list of audit entries.
*
@@ -100,5 +119,19 @@ public class RMAuditAPI extends BaseAPI
&& getRMAuditLog(username, password, 100, null).size() == 2);
}
/**
* Logs the Audit Log as Record.
*
* @param username The username of the user to use.
* @param password The password of the user.
* @param recNodeRef The Record Node reference for which Audit log should be created as record
* @param destinationNodeRef The Folder id Node reference where the html file should be placed
* @throws AssertionError If the API call didn't create the Audit Log as Record.
*/
public HttpResponse logsAuditLogAsRecord(String username, String password, String recNodeRef, String destinationNodeRef) {
JSONObject requestParams = new JSONObject();
requestParams.put("destination", destinationNodeRef);
return doPostJsonRequest(username, password, SC_OK, requestParams, RM_AUDIT_LOG_AS_RECORD,recNodeRef);
}
}

View File

@@ -52,7 +52,7 @@ public class RecordCategoriesAPI extends BaseAPI
private static final String RM_ACTIONS_API = "{0}rma/actions/ExecutionQueue";
private static final String DISPOSITION_ACTIONS_API = "{0}node/{1}/dispositionschedule/dispositionactiondefinitions";
private static final String DISPOSITION_SCHEDULE_API = "{0}node/{1}/dispositionschedule";
private static final String NEXT_DISPOSITION_ACTIONS_API = "{0}node/{1}/nextdispositionaction";
/**
* Creates a retention schedule for the category given as parameter
@@ -191,4 +191,19 @@ public class RecordCategoriesAPI extends BaseAPI
retentionProperties.put(RETENTION_SCHEDULE.RETENTION_INSTRUCTIONS, instructions);
return retentionProperties;
}
/**
* Get the Next Disposition Action
*
* @param user
* @param password
* @param recordId
* @return the next disposition schedule action
*/
public JSONObject getNextDispositionAction(String user, String password, String recordId)
{
String nodeRef = NODE_PREFIX + recordId;
JSONObject nextDispositionAction = doGetRequest(user, password, MessageFormat.format(NEXT_DISPOSITION_ACTIONS_API, "{0}", nodeRef));
return nextDispositionAction;
}
}

View File

@@ -97,4 +97,16 @@ public class RecordFoldersAPI extends BaseAPI
return null;
}
public HttpResponse reOpenRecordFolder(String user, String password, String recordFolder)
{
String recNodeRef = getNodeRefSpacesStore() + contentService.getNodeRef(user, password, RM_SITE_ID, recordFolder);
JSONObject requestParams = new JSONObject();
requestParams.put("name", "openRecordFolder");
requestParams.put("nodeRef", recNodeRef);
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
}
}

View File

@@ -360,4 +360,25 @@ public class RecordsAPI extends BaseAPI
{
return getNodeRefSpacesStore() + getItemNodeRef(username, password, recordPath + "/" + recordName);
}
/**
* Reopens the record given as parameter
*
* @param user the user declaring the document as record
* @param password the user's password
* @param recordName the record name
* @return The HTTP Response.
*/
public HttpResponse reOpenRecord(String user, String password, String recordName)
{
String recNodeRef = getNodeRefSpacesStore() + contentService.getNodeRef(user, password, RM_SITE_ID, recordName);
JSONObject requestParams = new JSONObject();
requestParams.put("name", "undeclareRecord");
requestParams.put("nodeRef", recNodeRef);
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
}
}

View File

@@ -0,0 +1,146 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.audit;
import static java.util.Arrays.asList;
import static org.alfresco.rest.rm.community.base.TestData.*;
import static org.alfresco.rest.rm.community.model.audit.AuditEvents.ADD_TO_HOLD;
import static org.alfresco.rest.rm.community.model.audit.AuditEvents.REMOVE_FROM_HOLD;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.core.IsNot.not;
import static org.springframework.http.HttpStatus.CREATED;
import static org.testng.AssertJUnit.*;
import java.util.Collections;
import java.util.List;
import org.alfresco.dataprep.CMISUtil;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.audit.AuditEntry;
import org.alfresco.rest.rm.community.model.audit.AuditEvents;
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.rm.community.model.recordfolder.RecordFolder;
import org.alfresco.rest.rm.community.model.user.UserRoles;
import org.alfresco.rest.v0.HoldsAPI;
import org.alfresco.rest.v0.service.RMAuditService;
import org.alfresco.rest.v0.service.RoleService;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.UserModel;
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;
public class AuditHoldsTest extends BaseRMRestTest {
private final String PREFIX = generateTestPrefix(AuditAddToHoldTests.class);
private final String HOLD1 = PREFIX + "hold1";
private SiteModel publicSite;
private FileModel testFile;
@Autowired
private RMAuditService rmAuditService;
@Autowired
private HoldsAPI holdsAPI;
@Autowired
private RoleService roleService;
private UserModel rmAdmin;
private RecordCategory recordCategory;
private RecordCategoryChild recordFolder1,recordFolder2;
private List<AuditEntry> auditEntries;
private String hold1NodeRef;
public static final String RECORD_FOLDER_THREE = "record-folder-three";
@BeforeClass(alwaysRun = true)
public void preconditionForAuditAddToHoldTests()
{
createRMSiteIfNotExists();
rmAdmin = roleService.createUserWithRMRole(UserRoles.ROLE_RM_ADMIN.roleId);
STEP("Create a hold");
hold1NodeRef = holdsAPI.createHoldAndGetNodeRef(rmAdmin.getUsername(), rmAdmin.getPassword(), HOLD1, HOLD_REASON,
HOLD_DESCRIPTION);
STEP("Create a collaboration site with a test file.");
publicSite = dataSite.usingAdmin().createPublicRandomSite();
testFile = dataContent.usingAdmin().usingSite(publicSite).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
STEP("Create a record category with 2 folders and 1 record");
recordCategory = createRootCategory(getRandomName("recordCategory"));
recordFolder1 = createRecordFolder(recordCategory.getId(), PREFIX + "recFolder1");
recordFolder2 = createRecordFolder(recordCategory.getId(), PREFIX + "recFolder2");
Record recordToBeAdded = createElectronicRecord(recordFolder1.getId(), PREFIX + "record");
assertStatusCode(CREATED);
STEP("Add some items to the hold, then remove them from the hold");
final List<String> itemsList = asList(testFile.getNodeRefWithoutVersion(), recordToBeAdded.getId(), recordFolder2.getId());
final List<String> holdsList = Collections.singletonList(HOLD1);
holdsAPI.addItemToHold(rmAdmin.getUsername(), rmAdmin.getPassword(), recordToBeAdded.getId(), HOLD1);
holdsAPI.removeItemsFromHolds(rmAdmin.getUsername(), rmAdmin.getPassword(), itemsList, holdsList);
STEP("Delete the record folder that was held");
getRestAPIFactory().getRecordFolderAPI().deleteRecordFolder(recordFolder2.getId());
STEP("Rename the parent of the record that was held");
RecordFolder recordFolder = RecordFolder.builder().name(RECORD_FOLDER_THREE).build();
getRestAPIFactory().getRecordFolderAPI().updateRecordFolder(recordFolder, recordFolder1.getId());
}
/**
* Data provider with hold events that have links to held items
*
* @return the hold events
*/
@DataProvider (name = "holdsEvents")
public Object[][] getHoldEvents()
{
return new AuditEvents[][]
{
{ ADD_TO_HOLD },
{ REMOVE_FROM_HOLD }
};
}
@Test (dataProvider = "holdsEvents")
public void checkItemPathLink(AuditEvents event) {
auditEntries = rmAuditService.getAuditEntriesFilteredByEvent(getAdminUser(), event);
assertFalse("Audit results should not be empty",auditEntries.size()==0);
final String auditedEvent = event + " - " + testFile.getName();
assertTrue("Audit results should contain one " + auditedEvent + " event",auditEntries.stream().anyMatch(e -> e.getEvent().startsWith(event.eventDisplayName)));
STEP("Check the audit log contains only an entry for add to hold.");
assertThat(auditEntries, is(not(empty())));
}
@AfterClass(alwaysRun = true)
private void cleanup() {
dataSite.usingAdmin().deleteSite(publicSite);
deleteRecordFolder(recordFolder1.getId());
deleteRecordFolder(recordFolder2.getId());
deleteRecordCategory(recordCategory.getId());
rmAuditService.clearAuditLog();
}
}

View File

@@ -0,0 +1,244 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.audit;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.audit.AuditEntry;
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.RMAuditAPI;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.RecordsAPI;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.Utility;
import org.alfresco.utility.model.UserModel;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import java.util.List;
import java.util.Optional;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAspects.ASPECTS_COMPLETED_RECORD;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.createRecordModel;
import static org.springframework.http.HttpStatus.OK;
import static org.springframework.test.util.AssertionErrors.assertTrue;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.fail;
public class ElectronicRecordAuditLogTest extends BaseRMRestTest {
private Optional<UserModel> rmAdmin;
@Autowired
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
@Autowired
private RMAuditAPI auditLog;
@Autowired
private RecordsAPI recordApi;
/* electronic record details */
private static final String AUDIT_ELECTRONIC_RECORD = generateTestPrefix(ElectronicRecordAuditLogTest.class) + "electronic record";
private static final String AUDIT_COMPLETE_REOPEN_ELECTRONIC_RECORD = "Complete Reopen Electronic Record";
public static final String TITLE = "Title";
public static final String DESCRIPTION = "Description";
private RecordCategory category1;
private RecordCategoryChild recordFolder1;
private Record electronicRecord, electronicRecord2;
@BeforeClass(alwaysRun = true)
public void electronicRecordsAuditLogSetup()
{
createRMSiteIfNotExists();
rmAdmin = Optional.ofNullable(getDataUser().createRandomTestUser());
rmRolesAndActionsAPI.assignRoleToUser(
getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),
rmAdmin.get().getUsername(),
"Administrator");
auditLog.clearAuditLog(rmAdmin.get().getUsername(),rmAdmin.get().getPassword());
category1 = createRootCategory(TITLE, DESCRIPTION);
recordFolder1 = createFolder(category1.getId(),TITLE);
electronicRecord = createElectronicRecord(recordFolder1.getId(),AUDIT_ELECTRONIC_RECORD,rmAdmin.get());
}
@Test(description = "Audit log for newly filed electronic record")
@AlfrescoTest(jira="RM-4303")
public void newElectronicRecordAudit() {
List<AuditEntry> auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
// newly created record contains 2 events: "file to" and metadata update
// the order in which object creation and metadata update are listed isn't always identical due to
// both happening in the same transaction
assertTrue("File To Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("File to")));
assertTrue("Updated metadata Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Updated Metadata")));
}
@Test
(
dependsOnMethods = "newElectronicRecordAudit",
description = "Viewing electronic record audit log is itself an auditable event"
)
@AlfrescoTest(jira="RM-4303")
public void electronicRecordAuditIsEvent()
{
List<AuditEntry> auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
assertTrue("Audit View Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Audit View")));
}
@Test
(
dependsOnMethods = "electronicRecordAuditIsEvent",
description = "Rename electronic record is an edit metadata event"
)
@AlfrescoTest(jira="RM-4303")
public void renameElectronicRecord() {
auditLog.clearAuditLog(rmAdmin.get().getUsername(),rmAdmin.get().getPassword());
Record renameElectronicRecord = createRecordModel("edited " + electronicRecord.getName(), "", "");
// rename record
getRestAPIFactory().getRecordsAPI().updateRecord(renameElectronicRecord, electronicRecord.getId());
assertStatusCode(OK);
// we expect 1 new event: "metadata update"
List<AuditEntry> auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
assertTrue("Updated metadata Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Updated Metadata")));
}
@Test (
dependsOnMethods = "newElectronicRecordAudit",
description = "Complete and reopen electronic record")
@AlfrescoTest(jira="RM-4303")
public void completeAndReopenElectronicRecord() {
electronicRecord2 = createElectronicRecord(recordFolder1.getId(),AUDIT_COMPLETE_REOPEN_ELECTRONIC_RECORD);
// complete record
recordApi.completeRecord(rmAdmin.get().getUsername(),rmAdmin.get().getPassword(),
electronicRecord2.getName());
try
{
Utility.sleep(1000, 30000, () ->
{
org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
List<String> aspects = recordsAPI.getRecord(electronicRecord2.getId()).getAspectNames();
// a record must be completed
assertTrue("Record is not completed.",aspects.contains(ASPECTS_COMPLETED_RECORD));
});
}
catch (InterruptedException e)
{
fail("InterruptedException received while waiting for results.");
}
List<AuditEntry> auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
assertTrue("Complete Record Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Complete Record")));
// Reopen record
recordApi.reOpenRecord(rmAdmin.get().getUsername(),rmAdmin.get().getPassword(),
electronicRecord2.getName());
try
{
Utility.sleep(1000, 30000, () ->
{
org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
List<String> aspects = recordsAPI.getRecord(electronicRecord2.getId()).getAspectNames();
// a record mustn't be completed
assertFalse(aspects.contains(ASPECTS_COMPLETED_RECORD));
});
}
catch (InterruptedException e)
{
fail("InterruptedException received while waiting for results.");
}
auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
assertTrue("Reopen Record Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Reopen Record")));
}
@Test
(
dependsOnMethods = "completeAndReopenElectronicRecord",
description = "File electronic record's audit log as record"
)
@AlfrescoTest(jira="RM-4303")
public void fileElectronicRecordAuditLogAsRecord()
{
// audit log is stored in the same folder, refresh it so that it appears in the list
HttpResponse auditRecordHttpResponse = auditLog.logsAuditLogAsRecord(rmAdmin.get().getUsername(),rmAdmin.get().getPassword(),
getRecordNodeRef(electronicRecord2.getId()),getFolderNodeRef(recordFolder1.getId()));
JSONObject auditRecordProperties = getAuditPropertyValues(auditRecordHttpResponse);
Record auditRecord = getRestAPIFactory().getRecordsAPI().getRecord(auditRecordProperties.get("record").toString()
.replace("workspace://SpacesStore/",""));
// check audit log
AssertJUnit.assertTrue(auditRecordProperties.get("recordName").toString().endsWith(".html"));
AssertJUnit.assertTrue(auditRecord.getAspectNames().stream().noneMatch(x -> x.startsWith(ASPECTS_COMPLETED_RECORD)));
}
private String getFolderNodeRef(String folderId) {
return "workspace://SpacesStore/" + folderId;
}
private String getRecordNodeRef(String recordId) {
return "workspace/SpacesStore/" + recordId;
}
private JSONObject getAuditPropertyValues(HttpResponse httpResponse) {
HttpEntity entity = httpResponse.getEntity();
String responseString = null;
try {
responseString = EntityUtils.toString(entity, "UTF-8");
} catch (IOException e) {
throw new RuntimeException(e);
}
JSONObject result = new JSONObject(responseString);
return result;
}
@AfterMethod
private void closeAuditLog() {
auditLog.clearAuditLog(rmAdmin.get().getUsername(),rmAdmin.get().getPassword());
}
@AfterClass(alwaysRun = true)
private void electronicRecordAuditLogCleanup() {
deleteRecord(electronicRecord.getId());
deleteRecordFolder(recordFolder1.getId());
deleteRecordCategory(category1.getId());
dataUser.usingAdmin().deleteUser(new UserModel(rmAdmin.get().getUsername(), rmAdmin.get().getPassword()));
}
}

View File

@@ -0,0 +1,246 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.audit;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.audit.AuditEntry;
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.RMAuditAPI;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.RecordsAPI;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.Utility;
import org.alfresco.utility.model.UserModel;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import java.util.List;
import java.util.Optional;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAspects.ASPECTS_COMPLETED_RECORD;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.createRecordModel;
import static org.springframework.http.HttpStatus.OK;
import static org.springframework.test.util.AssertionErrors.assertTrue;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.fail;
public class NonElectronicRecordAuditLogTest extends BaseRMRestTest {
private Optional<UserModel> rmAdmin;
@Autowired
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
@Autowired
private RMAuditAPI auditLog;
@Autowired
private RecordsAPI recordApi;
private RecordCategory category1;
private RecordCategoryChild recordFolder1;
private Record nonElectronicRecord , nonElectronicRecord2;
private static final String AUDIT_NON_ELECTRONIC_RECORD = generateTestPrefix(NonElectronicRecordAuditLogTest.class) + "non electronic record";
private static final String AUDIT_COMPLETE_REOPEN_NON_ELECTRONIC_RECORD = "Complete Reopen Non-Electronic Record";
public static final String TITLE = "Title";
public static final String DESCRIPTION = "Description";
@BeforeClass(alwaysRun = true)
public void nonElectronicRecordAuditLogSetup()
{
createRMSiteIfNotExists();
rmAdmin = Optional.ofNullable(getDataUser().createRandomTestUser());
rmRolesAndActionsAPI.assignRoleToUser(
getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),
rmAdmin.get().getUsername(),
"Administrator");
auditLog.clearAuditLog(rmAdmin.get().getUsername(),rmAdmin.get().getPassword());
category1 = createRootCategory(TITLE, DESCRIPTION);
recordFolder1 = createFolder(category1.getId(),TITLE);
nonElectronicRecord = createNonElectronicRecord(recordFolder1.getId(),AUDIT_NON_ELECTRONIC_RECORD,rmAdmin.get());
}
@Test(description = "Audit log for newly filed non-electronic record")
@AlfrescoTest(jira="RM-4303")
public void newNonElectronicRecordAudit()
{
List<AuditEntry> auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
// newly created record contains 3 events: "created object", "file to" and metadata update
assertTrue("File To Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("File to")));
assertTrue("Updated metadata Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Updated Metadata")));
assertTrue("Created Object Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Created Object")));
}
@Test
(
dependsOnMethods = "newNonElectronicRecordAudit",
description = "Viewing Non electronic record audit log is itself an auditable event"
)
@AlfrescoTest(jira="RM-4303")
public void nonElectronicRecordAuditIsEvent()
{
List<AuditEntry> auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
assertTrue("Audit View Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Audit View")));
}
@Test
(
dependsOnMethods = "nonElectronicRecordAuditIsEvent",
description = "Rename electronic record is an edit metadata event"
)
@AlfrescoTest(jira="RM-4303")
public void renameNonElectronicRecord()
{
auditLog.clearAuditLog(rmAdmin.get().getUsername(),rmAdmin.get().getPassword());
Record renameNonElectronicRecord = createRecordModel("edited " + nonElectronicRecord.getName(), "", "");
// rename record
getRestAPIFactory().getRecordsAPI().updateRecord(renameNonElectronicRecord, nonElectronicRecord.getId());
assertStatusCode(OK);
// we expect 1 new event: "metadata update"
List<AuditEntry> auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
assertTrue("Updated metadata Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Updated Metadata")));
}
@Test (dependsOnMethods = "newNonElectronicRecordAudit",description = "Complete and reopen electronic record")
@AlfrescoTest(jira="RM-4303")
public void completeAndReopenNonElectronicRecord()
{
nonElectronicRecord2 = createNonElectronicRecord(recordFolder1.getId(),AUDIT_COMPLETE_REOPEN_NON_ELECTRONIC_RECORD);
// complete record
recordApi.completeRecord(rmAdmin.get().getUsername(),rmAdmin.get().getPassword(),
nonElectronicRecord2.getName());
try
{
Utility.sleep(1000, 30000, () ->
{
org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
List<String> aspects = recordsAPI.getRecord(nonElectronicRecord2.getId()).getAspectNames();
// a record must be completed
assertTrue("Record is not completed.",aspects.contains(ASPECTS_COMPLETED_RECORD));
});
}
catch (InterruptedException e)
{
fail("InterruptedException received while waiting for results.");
}
List<AuditEntry> auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
assertTrue("Complete Record Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Complete Record")));
// Reopen record
recordApi.reOpenRecord(rmAdmin.get().getUsername(),rmAdmin.get().getPassword(),
nonElectronicRecord2.getName());
try
{
Utility.sleep(1000, 30000, () ->
{
org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
List<String> aspects = recordsAPI.getRecord(nonElectronicRecord2.getId()).getAspectNames();
// a record mustn't be completed
assertFalse(aspects.contains(ASPECTS_COMPLETED_RECORD));
});
}
catch (InterruptedException e)
{
fail("InterruptedException received while waiting for results.");
}
auditEntries= auditLog.getRMAuditLogAll(getAdminUser().getUsername(),getAdminUser().getPassword(),100);
assertTrue("Reopen Record Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Reopen Record")));
}
@Test
(
dependsOnMethods = "completeAndReopenNonElectronicRecord",
description = "File electronic record's audit log as record"
)
@AlfrescoTest(jira="RM-4303")
public void fileNonElectronicRecordAuditLogAsRecord()
{
// audit log is stored in the same folder, refresh it so that it appears in the list
HttpResponse auditRecordHttpResponse = auditLog.logsAuditLogAsRecord(rmAdmin.get().getUsername(),rmAdmin.get().getPassword(),
getRecordNodeRef(nonElectronicRecord2.getId()),getFolderNodeRef(recordFolder1.getId()));
JSONObject auditRecordProperties = getAuditPropertyValues(auditRecordHttpResponse);
Record auditRecord = getRestAPIFactory().getRecordsAPI().getRecord(auditRecordProperties.get("record").toString()
.replace("workspace://SpacesStore/",""));
// check audit log
AssertJUnit.assertTrue(auditRecordProperties.get("recordName").toString().endsWith(".html"));
AssertJUnit.assertTrue(auditRecord.getAspectNames().stream().noneMatch(x -> x.startsWith(ASPECTS_COMPLETED_RECORD)));
}
private String getFolderNodeRef(String folderId) {
return "workspace://SpacesStore/" + folderId;
}
private String getRecordNodeRef(String recordId) {
return "workspace/SpacesStore/" + recordId;
}
private JSONObject getAuditPropertyValues(HttpResponse httpResponse) {
HttpEntity entity = httpResponse.getEntity();
String responseString = null;
try {
responseString = EntityUtils.toString(entity, "UTF-8");
} catch (IOException e) {
throw new RuntimeException(e);
}
JSONObject result = new JSONObject(responseString);
return result;
}
@AfterMethod
private void closeAuditLog() {
auditLog.clearAuditLog(rmAdmin.get().getUsername(),rmAdmin.get().getPassword());
}
@AfterClass(alwaysRun = true)
private void nonElectronicRecordAuditLogCleanup() {
deleteRecord(nonElectronicRecord.getId());
deleteRecord(nonElectronicRecord2.getId());
deleteRecordFolder(recordFolder1.getId());
deleteRecordCategory(category1.getId());
dataUser.usingAdmin().deleteUser(new UserModel(rmAdmin.get().getUsername(), rmAdmin.get().getPassword()));
}
}

View File

@@ -0,0 +1,120 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.audit;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.audit.AuditEntry;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.v0.RMAuditAPI;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.List;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.utility.data.RandomData.getRandomAlphanumeric;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.springframework.http.HttpStatus.OK;
import static org.springframework.test.util.AssertionErrors.assertTrue;
public class RecordCategoryAuditLogTest extends BaseRMRestTest {
@Autowired
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
@Autowired
private RMAuditAPI auditLog;
private final String TEST_PREFIX = generateTestPrefix(RecordCategoryAuditLogTest.class);
private final String RM_ADMIN = TEST_PREFIX + "rm_admin";
private static final String AUDIT_CATEGORY = generateTestPrefix(RecordCategoryAuditLogTest.class) + "category";
private RecordCategory recordCategoryAudit;
@BeforeClass(alwaysRun = true)
public void recordCategoryAuditLogSetup() {
STEP("Create RM Site");
createRMSiteIfNotExists();
STEP("Create RM Admin user");
rmRolesAndActionsAPI.createUserAndAssignToRole(getAdminUser().getUsername(), getAdminUser().getPassword(), RM_ADMIN,
getAdminUser().getPassword(),
"Administrator");
}
@Test
@AlfrescoTest(jira = "RM-2768")
public void recordCategoryAudit() throws Exception {
STEP("Create root level category");
recordCategoryAudit = createRootCategory(AUDIT_CATEGORY);
List<AuditEntry> auditEntries = auditLog.getRMAuditLogAll(getAdminUser().getUsername(), getAdminUser().getPassword(), 100);
// newly created record category contains 3 events: object creation, inherited permissions set to false and metadata update
// the order in which object creation and metadata update are listed isn't always identical due to
// both happening in the same transaction
assertTrue("Created Object Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Created Object")));
assertTrue("Updated metadata Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Updated Metadata")));
}
@Test
(
dependsOnMethods = "recordCategoryAudit",
description = "Viewing audit log is itself an auditable event"
)
@AlfrescoTest(jira="RM-4303")
public void recordCategoryAuditIsEvent() {
List<AuditEntry> auditEntries = auditLog.getRMAuditLogAll(getAdminUser().getUsername(), getAdminUser().getPassword(), 100);
assertTrue("Audit View Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Audit View")));
}
@Test
(
dependsOnMethods = "recordCategoryAuditIsEvent",
description = "Record category rename is an edit metadata event"
)
@AlfrescoTest(jira="RM-4303")
public void renameRecordCategory() {
String categoryName = "Category name " + getRandomAlphanumeric();
RecordCategory rootRecordCategory = createRootCategory(categoryName);
String newCategoryName = "Rename " + categoryName;
RecordCategory recordCategoryUpdated = RecordCategory.builder().name(newCategoryName).build();
RecordCategory renamedRecordCategory = getRestAPIFactory().getRecordCategoryAPI().updateRecordCategory(recordCategoryUpdated, rootRecordCategory.getId());
assertStatusCode(OK);
// we expect 1 new event: "metadata update"
List<AuditEntry> auditEntries = auditLog.getRMAuditLogAll(getAdminUser().getUsername(), getAdminUser().getPassword(), 100);
assertTrue("Updated metadata Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Updated Metadata")));
}
@AfterClass(alwaysRun = true)
private void electronicRecordAuditLogCleanup() {
deleteRecordCategory(recordCategoryAudit.getId());
dataUser.deleteUser(new UserModel(RM_ADMIN,
getAdminUser().getPassword()));
auditLog.clearAuditLog(getAdminUser().getUsername(), getAdminUser().getPassword());
}
}

View File

@@ -0,0 +1,175 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.audit;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.audit.AuditEntry;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.rm.community.model.recordfolder.RecordFolder;
import org.alfresco.rest.v0.RMAuditAPI;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.RecordFoldersAPI;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.Utility;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.List;
import java.util.Optional;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAspects.ASPECTS_COMPLETED_RECORD;
import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.createRecordFolderModel;
import static org.springframework.http.HttpStatus.OK;
import static org.springframework.test.util.AssertionErrors.assertTrue;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.fail;
public class RecordFolderAuditLogTest extends BaseRMRestTest {
private Optional<UserModel> rmAdmin;
@Autowired
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
@Autowired
private RMAuditAPI auditLog;
@Autowired
private RecordFoldersAPI recordFoldersAPI;
private RecordCategory category1;
private RecordCategoryChild recordFolder1;
public static final String TITLE = "Title";
public static final String DESCRIPTION = "Description";
@BeforeClass(alwaysRun = true)
public void recordFolderAuditLogSetup() {
createRMSiteIfNotExists();
rmAdmin = Optional.ofNullable(getDataUser().createRandomTestUser());
rmRolesAndActionsAPI.assignRoleToUser(
getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),
rmAdmin.get().getUsername(),
"Administrator");
}
@Test(description = "Audit log for empty record folder")
@AlfrescoTest(jira = "RM-4303")
public void recordFolderAudit() {
category1 = createRootCategory(TITLE, DESCRIPTION);
recordFolder1 = createFolder(category1.getId(), TITLE);
List<AuditEntry> auditEntries = auditLog.getRMAuditLogAll(getAdminUser().getUsername(), getAdminUser().getPassword(), 100);
assertTrue("Created Object Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Created Object")));
assertTrue("Updated metadata Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Updated Metadata")));
}
@Test
(
dependsOnMethods = "recordFolderAudit",
description = "Viewing record folder audit log is itself an auditable event"
)
@AlfrescoTest(jira = "RM-4303")
public void recordFolderAuditIsEvent() {
List<AuditEntry> auditEntries = auditLog.getRMAuditLogAll(getAdminUser().getUsername(), getAdminUser().getPassword(), 100);
assertTrue("Audit View Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Audit View")));
}
@Test
(
dependsOnMethods = "recordFolderAuditIsEvent",
description = "Record folder rename is an edit metadata event"
)
@AlfrescoTest(jira = "RM-4303")
public void renameRecordFolder() {
auditLog.clearAuditLog(rmAdmin.get().getUsername(), rmAdmin.get().getPassword());
RecordFolder renameRecordFolder = createRecordFolderModel(category1.getId(), "edited");
getRestAPIFactory().getRecordFolderAPI().updateRecordFolder(renameRecordFolder, recordFolder1.getId());
assertStatusCode(OK);
// we expect 1 new event: "metadata update"
List<AuditEntry> auditEntries = auditLog.getRMAuditLogAll(getAdminUser().getUsername(), getAdminUser().getPassword(), 100);
// assertTrue("Move To Event is not present.",auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Move to")));
assertTrue("Updated metadata Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Updated Metadata")));
}
@Test(dependsOnMethods = "recordFolderAudit",
description = "Close and reopen folder")
@AlfrescoTest(jira = "RM-4303")
public void closeReopenFolder() {
//close folder
recordFoldersAPI.closeRecordFolder(rmAdmin.get().getUsername(), rmAdmin.get().getPassword(),
recordFolder1.getName());
try
{
Utility.sleep(1000, 30000, () ->
{
List<AuditEntry> auditEntries = auditLog.getRMAuditLogAll(getAdminUser().getUsername(), getAdminUser().getPassword(), 100);
assertTrue("Folder Close Record Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Close Record Folder")));
});
}
catch (InterruptedException e)
{
fail("InterruptedException received while waiting for results.");
}
//reopen folder
recordFoldersAPI.reOpenRecordFolder(rmAdmin.get().getUsername(), rmAdmin.get().getPassword(),
recordFolder1.getName());
try
{
Utility.sleep(1000, 30000, () ->
{
List<AuditEntry> auditEntries = auditLog.getRMAuditLogAll(getAdminUser().getUsername(), getAdminUser().getPassword(), 100);
assertTrue("Reopen Record Event is not present.", auditEntries.stream().anyMatch(x -> x.getEvent().startsWith("Open Record Folder")));
});
}
catch (InterruptedException e)
{
fail("InterruptedException received while waiting for results.");
}
}
@AfterMethod
private void closeAuditLog()
{
auditLog.clearAuditLog(rmAdmin.get().getUsername(),rmAdmin.get().getPassword());
}
@AfterClass (alwaysRun = true)
public void recordFolderAuditLogCleanup()
{
deleteRecordFolder(recordFolder1.getId());
deleteRecordCategory(category1.getId());
dataUser.usingAdmin().deleteUser(new UserModel(rmAdmin.get().getUsername(), rmAdmin.get().getPassword()));
}
}

View File

@@ -72,6 +72,7 @@ import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Ignore;
import org.testng.annotations.Test;
import org.alfresco.utility.model.TestGroup;
@@ -259,6 +260,7 @@ public class DeclareAndFileDocumentAsRecordTests extends BaseRMRestTest
* And the document is not declared as a record
*/
@Test (dataProvider = "invalidDestinationPaths",groups = { TestGroup.NOT_SUPPORTED_ON_SINGLE_PIPELINE })
@Ignore
public void declareAndFileToInvalidLocationUsingActionsAPI(String containerPath, String expectedException) throws Exception
{
STEP("Declare document as record with an invalid location parameter value");

View File

@@ -61,6 +61,7 @@ import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Ignore;
import org.testng.annotations.Test;
import org.alfresco.utility.model.TestGroup;
@@ -209,6 +210,7 @@ public class FileVersionAsRecordTests extends BaseRMRestTest
* And the document is not declared as a version record
*/
@Test (dataProvider = "invalidDestinationPaths", groups = { TestGroup.NOT_SUPPORTED_ON_SINGLE_PIPELINE })
@Ignore
public void declareVersionAndFileToInvalidLocationUsingActionsAPI(String containerPath, String expectedException) throws Exception
{
STEP("Declare document as record version with an invalid location parameter value");

View File

@@ -0,0 +1,311 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.records;
import org.alfresco.dataprep.CMISUtil;
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.rm.community.model.rules.ActionsOnRule;
import org.alfresco.rest.rm.community.model.rules.RuleDefinition;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainer;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChildCollection;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.RecordsAPI;
import org.alfresco.rest.v0.RulesAPI;
import org.alfresco.rest.v0.service.DispositionScheduleService;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.constants.UserRole;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static java.util.Arrays.asList;
import static org.alfresco.rest.core.v0.BaseAPI.NODE_PREFIX;
import static org.alfresco.rest.core.v0.BaseAPI.RM_SITE_ID;
import static org.alfresco.rest.rm.community.base.TestData.DEFAULT_PASSWORD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.UNFILED_RECORDS_CONTAINER_ALIAS;
import static org.alfresco.rest.rm.community.model.recordcategory.RetentionPeriodProperty.CREATED_DATE;
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_READ_RECORDS;
import static org.alfresco.rest.rm.community.requests.gscore.api.FilesAPI.PARENT_ID_PARAM;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.junit.Assert.assertTrue;
import static org.springframework.http.HttpStatus.CREATED;
public class DeclareInPlaceRecordsTestLevel2 extends BaseRMRestTest {
private final String TEST_PREFIX = generateTestPrefix(DeclareInPlaceRecordsTestLevel2.class);
private final String RM_ADMIN = TEST_PREFIX + "rm_admin";
private final String RECORDS_CATEGORY_ONE = TEST_PREFIX + "category";
public static final String RECORD_FOLDER_ONE = "record-folder-one";
public static final String RECORD_CATEGORY_TWO = "record-category-two" + System.currentTimeMillis();
public static final String RECORD_FOLDER_TWO = "record-folder-two";
private final String RULE_NAME = TEST_PREFIX + "rule unfiled";
private String unfiledRecordsNodeRef;
private RecordCategory RecordCategoryOne, RecordCategoryTwo;
private RecordCategoryChild recordFolder;
private UnfiledContainer unfiledContainer;
private FolderModel testFolder;
private SiteModel testSite;
private SiteModel privateSite;
private UserModel testUser;
@Autowired
private DispositionScheduleService dispositionScheduleService;
@Autowired
private RulesAPI rulesAPI;
/**
* data prep services
*/
@Autowired
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
@Autowired
private RecordsAPI recordsAPI;
@BeforeClass(alwaysRun = true)
public void preConditions() {
STEP("Create RM Site");
createRMSiteIfNotExists();
privateSite = dataSite.usingAdmin().createPrivateRandomSite();
}
/**
* Given that a user is the owner of a document
* And that user has been deleted
* When admin tries to declare the document as a record
* Then the document becomes an inplace record
*/
@Test
@AlfrescoTest(jira="RM-2584")
public void DeclareRecordOwnerDeleted() throws Exception {
createTestPrecondition();
// Upload document in a folder in a collaboration site
FileModel uploadedDoc = dataContent.usingSite(testSite)
.usingUser(testUser)
.usingResource(testFolder)
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
// delete the test user
dataUser.deleteUser(testUser);
// declare uploadedDocument as record
getRestAPIFactory().getFilesAPI(getDataUser().getAdminUser()).declareAsRecord(uploadedDoc.getNodeRefWithoutVersion());
assertStatusCode(CREATED);
// assert that the document is now a record
assertTrue(hasRecordAspect(uploadedDoc));
}
/**
* Given that a user is the owner of a document
* And that user declare the document as a record
* When admin files the record to a category that has a disposition schedule applied on records and a cut off step
* And admin completes the record so the pending record action is now Cut off
* Then user is still able to see the in place record in original share site location
*/
@Test
@AlfrescoTest(jira="MNT-18558")
public void inPlaceRecordVisibilityAfterFilingToCategoryWithCutOffStep() throws Exception {
// create test precondition
createTestPrecondition(RECORDS_CATEGORY_ONE);
//create a disposition schedule on Records level with a cut off step
dispositionScheduleService.createCategoryRetentionSchedule(RECORDS_CATEGORY_ONE, true);
dispositionScheduleService.addCutOffAfterPeriodStep(RECORDS_CATEGORY_ONE, "day|2", CREATED_DATE);
//create a folder in category
recordFolder = createFolder(getAdminUser(),RecordCategoryOne.getId(),RECORD_FOLDER_ONE);
// create a File to record folder rule applied on Unfiled Records container
fileToRuleAppliedOnUnfiledRecords();
//create a new test user
UserModel testUser = createSiteManager();
// upload a new document as the user and declare the document as record
FileModel uploadedDoc = dataContent.usingSite(privateSite)
.usingUser(testUser)
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
Record uploadedRecord = getRestAPIFactory().getFilesAPI(getDataUser().getAdminUser()).declareAsRecord(uploadedDoc.getNodeRefWithoutVersion());
assertStatusCode(CREATED);
//Complete the record as admin to be sure that pending action is now Cut off
recordsAPI.completeRecord(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), uploadedRecord.getName());
// As test user navigate to collaboration site documents library and check that the record is still visible
dataContent.usingAdmin().usingSite(privateSite).assertContentExist();
}
/**
* Create a user called test
* Create a collaboration site
* Add the user to the collaboration site as consumer
* Create an RM site
* In RM, create a new categories under file plan with a cut off step set after an event happens
* Under the previously created category create a folder
* Set READ-ONLY permission for test user for the folder previously created (the user does not have Read
* permissions to the category containing the folder)
* In the collaboration site create two files
* File as record the first file
* Log in with test user and check if he can still see the two files in the collaboration site
*/
@Test
@AlfrescoTest (jira = "MNT-22138")
public void filesVisibilityAfterFilingToCategoryWithCutOffAfterEventStep() throws Exception {
//create a category
RecordCategoryTwo = createRootCategory(RECORD_CATEGORY_TWO);
//create a disposition schedule on Records level with a cut off step
dispositionScheduleService.createCategoryRetentionSchedule(RECORD_CATEGORY_TWO, true);
dispositionScheduleService.addCutOffAfterPeriodStep(RECORD_CATEGORY_TWO, "day|2", CREATED_DATE);
//create a folder in category
recordFolder = createFolder(getAdminUser(),RecordCategoryTwo.getId(),RECORD_FOLDER_TWO);
//create a new test user
UserModel siteConsumer = getDataUser().createRandomTestUser();
getDataUser().addUserToSite(siteConsumer,privateSite,UserRole.SiteConsumer);
// give read permissions to test user
getRestAPIFactory().getRMUserAPI().addUserPermission(recordFolder.getId(), siteConsumer, PERMISSION_READ_RECORDS);
// create two documents
FileModel testFile = dataContent.usingSite(new SiteModel(privateSite.getTitle()))
.usingAdmin()
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
FileModel testFileNotFiled = dataContent.usingSite(new SiteModel(privateSite.getTitle()))
.usingAdmin()
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
// file one of the documents as record
getRestAPIFactory().getFilesAPI()
.usingParams(String.format("%s=%s", PARENT_ID_PARAM, recordFolder.getId()))
.declareAsRecord(testFile.getNodeRefWithoutVersion());
getRestAPIFactory().getRmRestWrapper().assertStatusCodeIs(CREATED);
// As test user navigate to collaboration site documents library and check that both of the documents are
// visible
STEP("Verify the document in collaboration site is now a record");
Assert.assertTrue(hasRecordAspect(testFile), "File should have record aspect");
Assert.assertFalse(hasRecordAspect(testFileNotFiled), "File should not have record aspect");
}
private void createTestPrecondition(String categoryName) {
// create "rm admin" user if it does not exist and assign it to RM Administrator role
rmRolesAndActionsAPI.createUserAndAssignToRole(
getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),
RM_ADMIN, DEFAULT_PASSWORD, "Administrator");
// create category
STEP("Create category");
RecordCategoryOne = createRootCategory(categoryName,"Title");
unfiledContainer = getRestAPIFactory().getUnfiledContainersAPI().getUnfiledContainer(UNFILED_RECORDS_CONTAINER_ALIAS);
unfiledRecordsNodeRef = NODE_PREFIX + unfiledContainer.getId();
}
private void createTestPrecondition() {
STEP("Create collab_user user");
testUser = getDataUser().createRandomTestUser();
testSite = dataSite.usingAdmin().createPublicRandomSite();
// invite collab_user to Collaboration site with Contributor role
getDataUser().addUserToSite(testUser, testSite, UserRole.SiteContributor);
testFolder = dataContent.usingSite(testSite).usingUser(testUser).createFolder();
}
private void fileToRuleAppliedOnUnfiledRecords() {
unfiledRecordsRuleTeardown();
// create a rule
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title(RULE_NAME)
.description(RULE_NAME)
.createRecordPath(false)
.path("/" + RECORDS_CATEGORY_ONE + "/" + RECORD_FOLDER_ONE)
.runInBackground(true)
.actions(asList(ActionsOnRule.FILE_TO.getActionValue()));
// create a rule on unfiledRecords
rulesAPI.createRule(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), unfiledRecordsNodeRef, ruleDefinition);
}
private void unfiledRecordsRuleTeardown() {
rulesAPI.deleteAllRulesOnContainer(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), unfiledRecordsNodeRef);
}
public UserModel createSiteManager() {
UserModel siteManager = getDataUser().createRandomTestUser();
getDataUser().addUserToSite(siteManager, privateSite, UserRole.SiteManager);
return siteManager;
}
@AfterClass
public void cleanupCategory() {
unfiledRecordsRuleTeardown();
rmRolesAndActionsAPI.deleteAllItemsInContainer(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), RM_SITE_ID, RECORD_FOLDER_ONE);
rmRolesAndActionsAPI.deleteAllItemsInContainer(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), RM_SITE_ID, RecordCategoryOne.getName());
deleteRecordCategory(RecordCategoryOne.getId());
rmRolesAndActionsAPI.deleteAllItemsInContainer(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), RM_SITE_ID, RECORD_FOLDER_TWO);
rmRolesAndActionsAPI.deleteAllItemsInContainer(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), RM_SITE_ID, RecordCategoryTwo.getName());
deleteRecordCategory(RecordCategoryTwo.getId());
dataSite.usingAdmin().deleteSite(privateSite);
dataSite.usingAdmin().deleteSite(testSite);
UnfiledContainerChildCollection unfiledContainerChildCollection = getRestAPIFactory()
.getUnfiledContainersAPI().getUnfiledContainerChildren(unfiledContainer.getId());
unfiledContainerChildCollection.getEntries().forEach(unfiledChild ->
{
if (unfiledChild.getEntry().getIsRecord())
{
getRestAPIFactory().getRecordsAPI().deleteRecord(unfiledChild.getEntry().getId());
}
else
{
getRestAPIFactory().getUnfiledRecordFoldersAPI().deleteUnfiledRecordFolder(unfiledChild.getEntry().getId());
}
});
}
}

View File

@@ -75,6 +75,7 @@ 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.Ignore;
import org.testng.annotations.Test;
/**
@@ -102,7 +103,7 @@ public class DeleteRecordTests extends BaseRMRestTest
testSite = dataSite.usingAdmin().createPublicRandomSite();
recordFolder = createCategoryFolderInFilePlan();
unfiledRecordFolder = createUnfiledContainerChild(UNFILED_RECORDS_CONTAINER_ALIAS, getRandomName("Unfiled Folder "),
UNFILED_RECORD_FOLDER_TYPE);
UNFILED_RECORD_FOLDER_TYPE);
}
/** Data provider with electronic and non-electronic records to be deleted */
@@ -133,10 +134,10 @@ public class DeleteRecordTests extends BaseRMRestTest
* </pre>
*/
@Test
(
dataProvider = "recordsToBeDeleted",
description = "Admin user can delete records"
)
(
dataProvider = "recordsToBeDeleted",
description = "Admin user can delete records"
)
@AlfrescoTest(jira="RM-4363")
public void adminCanDeleteRecords(String recordId)
{
@@ -154,17 +155,17 @@ public class DeleteRecordTests extends BaseRMRestTest
* </pre>
*/
@Test
(
description = "User without write permissions can't delete a record"
)
(
description = "User without write permissions can't delete a record"
)
@AlfrescoTest(jira="RM-4363")
public void userWithoutWritePermissionsCantDeleteRecord()
{
// Create a non-electronic record in unfiled records
UnfiledContainerChild nonElectronicRecord = UnfiledContainerChild.builder()
.name("Record " + RandomData.getRandomAlphanumeric())
.nodeType(NON_ELECTRONIC_RECORD_TYPE)
.build();
.name("Record " + RandomData.getRandomAlphanumeric())
.nodeType(NON_ELECTRONIC_RECORD_TYPE)
.build();
UnfiledContainerChild newRecord = getRestAPIFactory().getUnfiledContainersAPI().createUnfiledContainerChild(nonElectronicRecord, UNFILED_RECORDS_CONTAINER_ALIAS);
assertStatusCode(CREATED);
@@ -187,9 +188,9 @@ public class DeleteRecordTests extends BaseRMRestTest
* </pre>
*/
@Test
(
description = "User without delete records capability can't delete a record"
)
(
description = "User without delete records capability can't delete a record"
)
@AlfrescoTest(jira="RM-4363")
public void userWithoutDeleteRecordsCapabilityCantDeleteRecord()
{
@@ -234,7 +235,7 @@ public class DeleteRecordTests extends BaseRMRestTest
STEP("Create a record in first folder and copy it into second folder.");
String recordId = getRestAPIFactory().getRecordFolderAPI()
.createRecord(createElectronicRecordModel(), recordFolder.getId(), getFile(IMAGE_FILE)).getId();
.createRecord(createElectronicRecordModel(), recordFolder.getId(), getFile(IMAGE_FILE)).getId();
String copyId = copyNode(recordId, recordFolderB.getId()).getId();
assertStatusCode(CREATED);
@@ -318,14 +319,14 @@ public class DeleteRecordTests extends BaseRMRestTest
RecordCategoryChild recFolder = createFolder(recordCategory.getId(), getRandomName("recFolder"));
RecordBodyFile recordBodyFile = RecordBodyFile.builder().targetParentId(recFolder.getId()).build();
Record recordFiled = getRestAPIFactory().getRecordsAPI().fileRecord(recordBodyFile, testFile.getNodeRefWithoutVersion());
getRestAPIFactory().getRecordsAPI().completeRecord(recordFiled.getId());
assertStatusCode(CREATED);
completeRecord(recordFiled.getId());
assertStatusCode(OK);
STEP("Execute the disposition schedule steps.");
rmRolesAndActionsAPI.executeAction(getAdminUser().getUsername(), getAdminUser().getUsername(), recordFiled.getName(),
RM_ACTIONS.CUT_OFF);
RM_ACTIONS.CUT_OFF);
rmRolesAndActionsAPI.executeAction(getAdminUser().getUsername(), getAdminUser().getUsername(), recordFiled.getName(),
RM_ACTIONS.DESTROY);
RM_ACTIONS.DESTROY);
STEP("Check that it's possible to load the copy content.");
getNodeContent(copy.getId());
@@ -348,14 +349,14 @@ public class DeleteRecordTests extends BaseRMRestTest
STEP("Declare file version as record.");
recordsAPI.declareDocumentVersionAsRecord(getAdminUser().getUsername(), getAdminUser().getPassword(), testSite.getId(),
testFile.getName());
testFile.getName());
UnfiledContainerChild unfiledContainerChild = getRestAPIFactory().getUnfiledContainersAPI()
.getUnfiledContainerChildren(UNFILED_RECORDS_CONTAINER_ALIAS)
.getEntries().stream()
.filter(child -> child.getEntry().getName()
.startsWith(testFile.getName().substring(0, testFile.getName().indexOf("."))))
.findFirst()
.get().getEntry();
.getUnfiledContainerChildren(UNFILED_RECORDS_CONTAINER_ALIAS)
.getEntries().stream()
.filter(child -> child.getEntry().getName()
.startsWith(testFile.getName().substring(0, testFile.getName().indexOf("."))))
.findFirst()
.get().getEntry();
STEP("Delete the record.");
deleteAndVerify(unfiledContainerChild.getId());

View File

@@ -0,0 +1,128 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.records;
import org.alfresco.dataprep.ContentService;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.RecordsAPI;
import org.alfresco.test.AlfrescoTest;
import org.apache.commons.httpclient.HttpStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;
import static org.alfresco.rest.core.v0.BaseAPI.RM_SITE_ID;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertFalse;
/**
* Tests to cover share action for records
* @author Kavit Shah
*/
public class ShareRecordsTest extends BaseRMRestTest {
/** data prep services*/
@Autowired
private RecordsAPI service;
@Autowired
private ContentService contentService;
@Autowired
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
/** Constants*/
private final String TEST_PREFIX = generateTestPrefix(ShareRecordsTest.class);
private final String CATEGORY = "CategoryWithSharedRecords" + TEST_PREFIX;
private final String FOLDER = "FolderWithSharedRecords" + TEST_PREFIX;
private final String ELECTRONIC_RECORD = "ELECTRONIC_RECORD" + TEST_PREFIX;
private final String NONELECTRONIC_REC = "NON_ELECTRONIC_RECORD" + TEST_PREFIX;
private RecordCategory category;
private RecordCategoryChild recordCategoryChild;
/**
* Given a record
* When admin tries to share it via API
* Then the record can't be shared
*/
@Test
@AlfrescoTest(jira = "RM-5308")
public void shareRecordViaApi()
{
//create RM Site
createRMSiteIfNotExists();
//create a category
category = createRootCategory(CATEGORY);
//create folder
recordCategoryChild = createFolder(category.getId(),FOLDER);
createNonElectronicRecord(recordCategoryChild.getId(),NONELECTRONIC_REC);
// create record to be shared
createElectronicRecord(recordCategoryChild.getId(),ELECTRONIC_RECORD);
//get the node id for the ELECTRONIC_RECORD created
String nodeRefRec1= contentService.getNodeRefByPath(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),
"/Sites/" + RM_SITE_ID + "/documentLibrary/" + CATEGORY + "/" + FOLDER + "/" + service.getRecordFullName(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), FOLDER, ELECTRONIC_RECORD));
//check record can't be shared
assertFalse("The record has been succesfully shared",
service.shareDocument(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),nodeRefRec1 ).getKey());
//check the error code when trying to share a record
assertEquals("The API response code is not " + HttpStatus.SC_INTERNAL_SERVER_ERROR, service.shareDocument(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), nodeRefRec1).getValue(),
String.valueOf( HttpStatus.SC_INTERNAL_SERVER_ERROR));
//get the node id for NONELECTRONIC_REC created
String nodeRefRec2 = contentService.getNodeRefByPath(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),
"/Sites/" + RM_SITE_ID + "/documentLibrary/" + CATEGORY + "/" + FOLDER + "/" + service.getRecordFullName(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), FOLDER, NONELECTRONIC_REC));
//check record can't be shared
assertFalse("The record has been succesfully shared",
service.shareDocument(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), nodeRefRec2).getKey());
//check the error code when trying to share a record
assertEquals("The API response code is not " + HttpStatus.SC_INTERNAL_SERVER_ERROR, service.shareDocument(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), nodeRefRec2).getValue(),
String.valueOf(HttpStatus.SC_INTERNAL_SERVER_ERROR));
}
@AfterClass
public void cleanupCategory() {
rmRolesAndActionsAPI.deleteAllItemsInContainer(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), RM_SITE_ID, recordCategoryChild.getName());
rmRolesAndActionsAPI.deleteAllItemsInContainer(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), RM_SITE_ID, category.getName());
deleteRecordCategory(category.getId());
}
}

View File

@@ -0,0 +1,118 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.rules;
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.rm.community.model.rules.ActionsOnRule;
import org.alfresco.rest.rm.community.model.rules.RuleDefinition;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordCategoryAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
import org.alfresco.rest.rm.community.smoke.CreateCategoriesTests;
import org.alfresco.rest.v0.RulesAPI;
import org.alfresco.test.AlfrescoTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.Test;
import java.util.Collections;
import static org.alfresco.rest.core.v0.BaseAPI.NODE_PREFIX;
import static org.alfresco.rest.rm.community.base.TestData.ELECTRONIC_RECORD_NAME;
import static org.alfresco.rest.rm.community.base.TestData.NONELECTRONIC_RECORD_NAME;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.rest.rm.community.utils.CoreUtil.createBodyForMoveCopy;
import static org.alfresco.rest.rm.community.utils.CoreUtil.toContentModel;
import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.*;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.springframework.http.HttpStatus.*;
public class CopyToRuleOnFoldersTest extends BaseRMRestTest {
private RecordCategory category;
private RecordCategoryChild folder1,folder2;
private final static String title = "Run in background";
private final String TEST_PREFIX = generateTestPrefix(CopyToRuleOnFoldersTest.class);
private final String RM_ADMIN = TEST_PREFIX + "rm_admin";
private final String electronicRecord = TEST_PREFIX + "record_electronic_for_copyTo";
private final String nonElectronicRecord = TEST_PREFIX + "record_non_electronic_for_copyTo";
@Autowired
private RulesAPI rulesAPI;
@Test
@AlfrescoTest(jira = "RM-2994")
public void copyToRuleOnFoldersTest()
{
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description1")
.runInBackground(true).title(title)
.actions(Collections.singletonList(ActionsOnRule.COPY_TO.getActionValue()));
STEP("Create the RM site if doesn't exist");
createRMSiteIfNotExists();
STEP("Create record categories and record folders");
category= createRootCategory(getRandomName("recordCategory"));
String folder1 = createCategoryFolderInFilePlan().getId();
String folder2 = createCategoryFolderInFilePlan().getId();
// create a rule on folder
rulesAPI.createRule(getAdminUser().getUsername(), getAdminUser().getPassword(), NODE_PREFIX + folder1, ruleDefinition);
// create electronic record in record folder
String electronicRecordId = createElectronicRecord(folder1, ELECTRONIC_RECORD_NAME).getId();
assertStatusCode(CREATED);
// create non-electronic record in record folder
String nonElectronicRecord = createElectronicRecord(folder1, NONELECTRONIC_RECORD_NAME).getId();
assertStatusCode(CREATED);
// Move the electronic and non-electronic records from "Category with records"> "Folder with rule"
// to "Copy Category with records" > "Folder with rule"
getRestAPIFactory().getNodeAPI(toContentModel(folder1)).copy(createBodyForMoveCopy(category.getId()));
getRestAPIFactory().getNodeAPI(toContentModel( electronicRecord)).move(createBodyForMoveCopy(folder2));
getRestAPIFactory().getNodeAPI(toContentModel( nonElectronicRecord)).move(createBodyForMoveCopy(folder2));
RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
// Delete the record category
RecordCategoryAPI recordCategoryAPI = getRestAPIFactory().getRecordCategoryAPI();
String recordCategoryId = category.getId();
recordCategoryAPI.deleteRecordCategory(recordCategoryId);
recordsAPI.deleteRecord(electronicRecord);
recordsAPI.deleteRecord(nonElectronicRecord);
assertStatusCode(NO_CONTENT);
}
}

View File

@@ -0,0 +1,229 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.rules;
import org.alfresco.dataprep.CMISUtil;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.rm.community.model.rules.ActionsOnRule;
import org.alfresco.rest.rm.community.model.rules.RuleDefinition;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChildEntry;
import org.alfresco.rest.rm.community.model.user.UserRoles;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
import org.alfresco.rest.rm.community.smoke.FileAsRecordTests;
import org.alfresco.rest.v0.RulesAPI;
import org.alfresco.rest.v0.service.RoleService;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import static org.alfresco.rest.core.v0.BaseAPI.NODE_PREFIX;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.FILE_PLAN_ALIAS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.UNFILED_RECORDS_CONTAINER_ALIAS;
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.springframework.http.HttpStatus.CREATED;
@AlfrescoTest (jira = "APPS-36")
public class FileAsRecordRuleTests extends BaseRMRestTest
{
private UserModel nonRMUser, rmManager;
private RecordCategory category_manager, category_admin;
private RecordCategoryChild folder_admin, folder_manager ;
private static final String CATEGORY_MANAGER = "catManager" + generateTestPrefix(FileAsRecordTests.class);
private static final String CATEGORY_ADMIN = "catAdmin" + generateTestPrefix(FileAsRecordTests.class);
private static final String FOLDER_MANAGER = "recordFolder" + generateTestPrefix(FileAsRecordTests.class);
private static final String FOLDER_ADMIN = "recordFolder" + generateTestPrefix(FileAsRecordTests.class);
private FolderModel testFolder;
private FileModel document,inPlaceRecord;
@Autowired
private RoleService roleService;
@Autowired
private RulesAPI rulesAPI;
/**
* Create preconditions:
* 1. RM site is created
* 2. Two users: user without RM role and a user with RM manager role
* 3. Two Record categories with one folder each
* 4. User with RM MANAGER role has Filling permission over one category
* 5. A collaboration folder with rule set to declare and file as record to a record folder
**/
@BeforeClass(alwaysRun = true)
public void preconditionForDeclareFileAsRecordRuleTests()
{
STEP("Create the RM site if doesn't exist");
createRMSiteIfNotExists();
STEP("Create a user");
nonRMUser = dataUser.createRandomTestUser("testUser");
STEP("Create a collaboration site");
testSite = dataSite.usingUser(nonRMUser).createPublicRandomSite();
STEP("Create two categories with two folders");
category_manager = createRootCategory(CATEGORY_MANAGER);
category_admin = createRootCategory(CATEGORY_ADMIN);
folder_admin = createFolder(category_admin.getId(),FOLDER_ADMIN);
folder_manager = createFolder(category_manager.getId(),FOLDER_MANAGER);
STEP("Create an rm user and give filling permission over CATEGORY_MANAGER record category");
RecordCategory recordCategory = new RecordCategory().builder()
.id(category_manager.getId()).build();
rmManager = roleService.createCollaboratorWithRMRoleAndPermission(testSite, recordCategory,
UserRoles.ROLE_RM_MANAGER, PERMISSION_FILING);
STEP("Create a collaboration folder with a rule set to declare and file as record to a record folder");
RecordCategoryChild folderWithRule = createFolder(recordCategory.getId(), getRandomName("recordFolder"));
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description")
.applyToChildren(true)
.actions(Collections.singletonList(ActionsOnRule.DECLARE_AS_RECORD.getActionValue()));
rulesAPI.createRule(getAdminUser().getUsername(), getAdminUser().getPassword(), NODE_PREFIX + folderWithRule.getId(), ruleDefinition);
assertStatusCode(CREATED);
}
/**
* Given I am a user that can create a rule on a folder in a collaboration site
* When I am creating the rule
* Then I have the option of adding a "Declare and File as Record" action to the rule
* <p>
* Given I am creating a rule
* When I add the "Declare and File as Record" action to the rule
* Then I am able to select the record folder I want the declared record to be filed to
* <p>
* Given I am configuring a "Declare and File as Record" action within a rule
* And I have at least one records management role (eg RM User)
* When I am selecting the record folder location to file the declared record to
* Then I see the record folders in the file plan that I have file access to as the creator of the record
**/
@Test
public void declareAsRecordRuleAsRMUserWithFilingPermissions() {
STEP("Create a collaboration folder");
testFolder = dataContent.usingSite(testSite)
.usingUser(rmManager)
.createFolder();
STEP("Create a rule with Declare as Record action and check that user can select a record folder.");
RecordCategory recordCategory = new RecordCategory().builder()
.id(category_manager.getId()).build();
RecordCategoryChild folderWithRule = createFolder(recordCategory.getId(), getRandomName("recordFolder"));
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description")
.applyToChildren(true)
.actions(Collections.singletonList(ActionsOnRule.DECLARE_AS_RECORD.getActionValue()));
rulesAPI.createRule(getAdminUser().getUsername(), getAdminUser().getPassword(), NODE_PREFIX + folderWithRule.getId(), ruleDefinition);
assertStatusCode(CREATED);
}
/**
* Given I am configuring a "Declare and File as Record" action within a rule
* And I don't have a records management role
* When I am selecting the record folder location to file the declared record to
* Then I can see only the file plan
*/
@Test
public void declareAsRecordRuleAsNonRMUser()
{
STEP("Create a collaboration folder");
testFolder = dataContent.usingSite(testSite)
.usingUser(nonRMUser)
.createFolder();
STEP("Create a rule with Declare as Record action and check that user can select a record folder.");
RecordCategory recordCategory = new RecordCategory().builder()
.id(category_manager.getId()).build();
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description")
.applyToChildren(true)
.actions(Collections.singletonList(ActionsOnRule.DECLARE_AS_RECORD.getActionValue()));
rulesAPI.createRule(nonRMUser.getUsername(), nonRMUser.getPassword(), NODE_PREFIX + testFolder.getNodeRef(), ruleDefinition);
assertStatusCode(CREATED);
}
/**
* Given I have not selected a record folder location
* When the rule is triggered
* Then the file is declared as record to the UnFiled Records folder
*/
@Test
public void triggerDeclareToUnfiledRuleAsNonRMUser()
{
STEP("Create a collaboration folder with a rule set to declare and file as record without a record folder location");
RecordCategory recordCategory = new RecordCategory().builder()
.id(category_manager.getId()).build();
RecordCategoryChild folderWithRule = createFolder(recordCategory.getId(), getRandomName("recordFolder"));
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description")
.applyToChildren(true)
.actions(Collections.singletonList(ActionsOnRule.DECLARE_AS_RECORD.getActionValue()));
rulesAPI.createRule(getAdminUser().getUsername(), getAdminUser().getPassword(), NODE_PREFIX + folderWithRule.getId(), ruleDefinition);
assertStatusCode(CREATED);
STEP("Create as nonRMUser a new file into the previous folder in order to trigger the rule");
inPlaceRecord = dataContent.usingUser(nonRMUser).usingResource(testFolder).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
// Verify that declared record is in Unfilled Records Folder
UnfiledContainerAPI unfiledContainersAPI = getRestAPIFactory().getUnfiledContainersAPI();
List<UnfiledContainerChildEntry> matchingRecords = unfiledContainersAPI.getUnfiledContainerChildren(UNFILED_RECORDS_CONTAINER_ALIAS)
.getEntries()
.stream()
.filter(e -> e.getEntry().getId().equals(inPlaceRecord.getNodeRefWithoutVersion()))
.collect(Collectors.toList());
}
@AfterClass(alwaysRun = true)
public void cleanupDeclareAsRecordRuleTests()
{
STEP("Delete the collaboration site");
dataSite.usingUser(nonRMUser).deleteSite(testSite);
STEP("Delete Users");
dataUser.deleteUser(nonRMUser);
dataUser.deleteUser(rmManager);
STEP("Delete categories");
getRestAPIFactory().getFilePlansAPI().getRootRecordCategories(FILE_PLAN_ALIAS).getEntries().forEach(recordCategoryEntry ->
deleteRecordCategory(recordCategoryEntry.getEntry().getId()));
}
}

View File

@@ -0,0 +1,221 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.rules;
import org.alfresco.dataprep.CMISUtil;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.rm.community.model.rules.ActionsOnRule;
import org.alfresco.rest.rm.community.model.rules.RuleDefinition;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChildEntry;
import org.alfresco.rest.rm.community.model.user.UserRoles;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
import org.alfresco.rest.rm.community.smoke.FileAsRecordTests;
import org.alfresco.rest.v0.RulesAPI;
import org.alfresco.rest.v0.service.RoleService;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FileType;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import static org.alfresco.rest.core.v0.BaseAPI.NODE_PREFIX;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.FILE_PLAN_ALIAS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.UNFILED_RECORDS_CONTAINER_ALIAS;
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.springframework.http.HttpStatus.CREATED;
public class FileVersionAsRecordRuleTest extends BaseRMRestTest {
private UserModel nonRMuser, rmManager;
private RecordCategory category_manager, category_admin;
private RecordCategoryChild folder_admin, folder_manager ;
private static final String CATEGORY_MANAGER = "catManager" + generateTestPrefix(FileAsRecordTests.class);
private static final String CATEGORY_ADMIN = "catAdmin" + generateTestPrefix(FileAsRecordTests.class);
private static final String FOLDER_MANAGER = "recordFolder" + generateTestPrefix(FileAsRecordTests.class);
private static final String FOLDER_ADMIN = "recordFolder" + generateTestPrefix(FileAsRecordTests.class);
private FolderModel testFolder;
private FileModel document,inPlaceRecord;
@Autowired
private RoleService roleService;
@Autowired
private RulesAPI rulesAPI;
@BeforeClass(alwaysRun = true)
public void createTestPrecondition()
{
STEP("Create the RM site if doesn't exist");
createRMSiteIfNotExists();
STEP("Create a user");
nonRMuser = dataUser.createRandomTestUser("testUser");
STEP("Create a collaboration site");
testSite = dataSite.usingUser(nonRMuser).createPublicRandomSite();
STEP("Create a document with the user without RM role");
document = dataContent.usingSite(testSite)
.usingUser(nonRMuser)
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
STEP("Create two categories with two folders");
category_manager = createRootCategory(CATEGORY_MANAGER);
category_admin = createRootCategory(CATEGORY_ADMIN);
folder_admin = createFolder(category_admin.getId(),FOLDER_ADMIN);
folder_manager = createFolder(category_manager.getId(),FOLDER_MANAGER);
STEP("Create an rm user and give filling permission over CATEGORY_MANAGER record category");
RecordCategory recordCategory = new RecordCategory().builder()
.id(category_manager.getId())
.build();
rmManager = roleService.createCollaboratorWithRMRoleAndPermission(testSite, recordCategory,
UserRoles.ROLE_RM_MANAGER, PERMISSION_FILING);
STEP("Create a collaboration folder with a rule set to declare and file version as record to a record folder");
RecordCategoryChild folderWithRule = createFolder(recordCategory.getId(), getRandomName("recordFolder"));
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description")
.applyToChildren(true)
.actions(Collections.singletonList(ActionsOnRule.DECLARE_AS_RECORD.getActionValue()));
rulesAPI.createRule(getAdminUser().getUsername(), getAdminUser().getPassword(), NODE_PREFIX + folderWithRule.getId(), ruleDefinition);
assertStatusCode(CREATED);
}
@Test
public void declareVersionAsRecordRuleAsRMUserWithFilingPermissions()
{
STEP("Create a collaboration folder");
testFolder = dataContent.usingSite(testSite)
.usingUser(rmManager)
.createFolder();
STEP("Create a rule with Declare as Record action and check that user can select a record folder.");
RecordCategory recordCategory = new RecordCategory().builder()
.id(category_manager.getId()).build();
RecordCategoryChild folderWithRule = createFolder(recordCategory.getId(), getRandomName("recordFolder"));
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description")
.applyToChildren(true)
.actions(Collections.singletonList(ActionsOnRule.DECLARE_AS_RECORD.getActionValue()));
rulesAPI.createRule(rmManager.getUsername(), rmManager.getPassword(), NODE_PREFIX + testFolder.getNodeRef(), ruleDefinition);
assertStatusCode(CREATED);
}
@Test
public void declareVersionAsRecordRuleAsNonRMUser()
{
STEP("Create a collaboration folder");
testFolder = dataContent.usingSite(testSite)
.usingUser(nonRMuser)
.createFolder();
STEP("Create a rule with Declare as Record action and check that user can select a record folder.");
RecordCategory recordCategory = new RecordCategory().builder()
.id(category_manager.getId()).build();
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description")
.applyToChildren(true)
.actions(Collections.singletonList(ActionsOnRule.DECLARE_AS_RECORD.getActionValue()));
rulesAPI.createRule(nonRMuser.getUsername(), nonRMuser.getPassword(), NODE_PREFIX + testFolder.getNodeRef(), ruleDefinition);
assertStatusCode(CREATED);
}
@Test
public void triggerDeclareToUnfiledRuleAsNonRMUser() throws Exception {
STEP("Create a collaboration folder with a rule set to declare and file as record without a record folder location");
FileModel inplaceRecord = dataContent.usingSite(testSite).usingUser(nonRMuser)
.createContent(new FileModel("declareAndFileToIntoUnfiledRecordFolder",
FileType.TEXT_PLAIN));
RecordCategory recordCategory = new RecordCategory().builder()
.id(category_manager.getId()).build();
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description")
.applyToChildren(true)
.actions(Collections.singletonList(ActionsOnRule.DECLARE_AS_RECORD.getActionValue()));
rulesAPI.createRule(nonRMuser.getUsername(), nonRMuser.getPassword(), NODE_PREFIX + inplaceRecord.getNodeRef(), ruleDefinition);
assertStatusCode(CREATED);
STEP("Create as nonRMuser a new file into the previous folder in order to trigger the rule");
inPlaceRecord = dataContent.usingUser(nonRMuser).usingResource(testFolder).createContent(CMISUtil.DocumentType.TEXT_PLAIN);
// verify the declared record is in Unfilled Records folder
UnfiledContainerAPI unfiledContainersAPI = getRestAPIFactory().getUnfiledContainersAPI();
List<UnfiledContainerChildEntry> matchingRecords = unfiledContainersAPI.getUnfiledContainerChildren(UNFILED_RECORDS_CONTAINER_ALIAS)
.getEntries()
.stream()
.filter(e -> e.getEntry().getId().equals(inplaceRecord.getNodeRefWithoutVersion()))
.collect(Collectors.toList());
}
@AfterClass(alwaysRun = true)
public void cleanupDeclareVersionAsRecordRuleTests()
{
STEP("Delete the collaboration site");
dataSite.usingUser(nonRMuser).deleteSite(testSite);
STEP("Delete Users");
dataUser.deleteUser(nonRMuser);
dataUser.deleteUser(rmManager);
STEP("Delete categories");
getRestAPIFactory().getFilePlansAPI().getRootRecordCategories(FILE_PLAN_ALIAS).getEntries().forEach(recordCategoryEntry ->
deleteRecordCategory(recordCategoryEntry.getEntry().getId()));
}
}

View File

@@ -0,0 +1,237 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.rules;
import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
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.rm.community.model.rules.ActionsOnRule;
import org.alfresco.rest.rm.community.model.rules.ConditionsOnRule;
import org.alfresco.rest.rm.community.model.rules.RuleDefinition;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainer;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChildEntry;
import org.alfresco.rest.rm.community.model.user.UserRoles;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
import org.alfresco.rest.search.RestRequestQueryModel;
import org.alfresco.rest.v0.HoldsAPI;
import org.alfresco.rest.v0.RecordsAPI;
import org.alfresco.rest.v0.RulesAPI;
import org.alfresco.rest.v0.service.RoleService;
import org.alfresco.utility.model.UserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.InputStream;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import static java.lang.Integer.MAX_VALUE;
import static java.util.Arrays.asList;
import static org.alfresco.rest.core.v0.BaseAPI.NODE_PREFIX;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.FILE_PLAN_ALIAS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.UNFILED_RECORDS_CONTAINER_ALIAS;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.rest.rm.community.utils.CoreUtil.createBodyForMoveCopy;
import static org.alfresco.rest.rm.community.utils.CoreUtil.toContentModel;
import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.*;
import static org.alfresco.utility.data.RandomData.getRandomAlphanumeric;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.springframework.http.HttpStatus.*;
import static org.testng.Assert.assertNotNull;
public class MoveToRuleOnFoldersTest extends BaseRMRestTest{
private RecordCategoryChild recordFolder2;
private RecordCategoryChild recordFolder1;
private String nonElectronicId;
public Record electronicRecord;
private String ruleType = ConditionsOnRule.UPDATE.getWhenConditionValue();
private UserModel rmAdmin;
public RecordCategory RecordCategoryOne;
private RecordCategoryChild recordFolder;
public static final String RECORD_FOLDER_ONE = "record-folder-one";
private final String TEST_PREFIX = generateTestPrefix(MoveToRuleOnFoldersTest.class);
private final String RECORD_CATEGORY_ONE = TEST_PREFIX + "category";
private final String recordName = "Test record";
private final String recordTitle = recordName + " title";
private final String recordDescription = recordName + " description";
private Record nonElectrinicRecordModel;
private RecordFolderAPI recordFolderAPI;
public String title,description,box,file,shelf,storageLocation,name;
@Autowired
private RulesAPI rulesAPI;
@Autowired
private HoldsAPI holdsAPI;
@Autowired
private RoleService roleService;
@Autowired
public RecordsAPI recordsAPI;
@BeforeClass(alwaysRun = true)
public void precondition()
{
//create RM site
createRMSiteIfNotExists();
rmAdmin = roleService.createUserWithRMRole(UserRoles.ROLE_RM_ADMIN.roleId);
//create root category, create folders , add electronic and non electronic records
RecordCategoryOne = createRootCategory(RECORD_CATEGORY_ONE);
recordFolder1=createRecordFolder(RecordCategoryOne.getId(), getRandomName("recFolder"));
// recordFolder1_id = createRecordFolder(RecordCategoryOne.getId(), getRandomName("recFolder")).getId();
recordFolder2 = createFolder(getAdminUser(),RecordCategoryOne.getId(),getRandomName("recFolder"));
STEP("CREATE ELECTRONIC RECORD");
recordFolderAPI = getRestAPIFactory().getRecordFolderAPI();
electronicRecord = recordFolderAPI.createRecord(createElectronicRecordModel(), recordFolder1.getId(), getFile(IMAGE_FILE));
STEP("Check the electronic record has been created");
assertStatusCode(CREATED);
STEP("Create a non-electronic record by completing some of the fields");
// Use these properties for non-electronic record to be created
title = "Title " + getRandomAlphanumeric();
description = "Description " + getRandomAlphanumeric();
box = "Box "+ getRandomAlphanumeric();
file = "File " + getRandomAlphanumeric();
shelf = "Shelf " + getRandomAlphanumeric();
storageLocation = "Storage Location " + getRandomAlphanumeric();
name = "Record " + getRandomAlphanumeric();
Random random = new Random();
Integer numberOfCopies = random.nextInt(MAX_VALUE);
Integer physicalSize = random.nextInt(MAX_VALUE);
// Set values of all available properties for the non electronic records
nonElectrinicRecordModel = createFullNonElectronicRecordModel(name, title, description, box, file, shelf, storageLocation, numberOfCopies, physicalSize);
// Create non-electronic record
nonElectronicId = recordFolderAPI.createRecord(nonElectrinicRecordModel, recordFolder1.getId()).getId();
STEP("Check the non-electronic record has been created");
assertStatusCode(CREATED);
}
@Test
public void MoveToRuleFoldersTest()
{
String CatName=RecordCategoryOne.getName();
String folder2name=recordFolder2.getName();
String recfolder2_path="/"+CatName+"/"+folder2name;
STEP("create a rule MOVE_TO for folder 1");
RuleDefinition ruleDefinition = RuleDefinition.createNewRule().title("name").description("description1")
.runInBackground(true).title(title)
.actions(Collections.singletonList(ActionsOnRule.MOVE_TO.getActionValue())).ruleType(ruleType).path(recfolder2_path);
rulesAPI.createRule(getAdminUser().getUsername(), getAdminUser().getPassword(), NODE_PREFIX +recordFolder1.getId() , ruleDefinition);
STEP("Update metadata for Non-Electronic Record");
updateRecordMetadata();
STEP("Delete ELECTRONIC AND NON-ELECTRONIC RECORDS IN FOLDER 2");
org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
recordsAPI.deleteRecord(electronicRecord.getId());
assertStatusCode(NO_CONTENT);
recordsAPI.deleteRecord(nonElectronicId);
assertStatusCode(NO_CONTENT);
STEP("RULE CREATION FOR FOLDER 1 WITHOUT RUNNING IN BACKGROUND");
RuleDefinition ruleDefinition_notinbackground = RuleDefinition.createNewRule().title("name").description("description1")
.runInBackground(false).title(title)
.actions(Collections.singletonList(ActionsOnRule.MOVE_TO.getActionValue())).ruleType(ruleType).path(recfolder2_path);
rulesAPI.createRule(getAdminUser().getUsername(), getAdminUser().getPassword(), NODE_PREFIX +recordFolder1.getId() , ruleDefinition);
STEP("CREATE ELECTRONIC AND NON-ELECTRONIC RECORDS");
electronicRecord = recordFolderAPI.createRecord(createElectronicRecordModel(), recordFolder1.getId(), getFile(IMAGE_FILE));
STEP("Check the electronic record has been created");
assertStatusCode(CREATED);
nonElectronicId = recordFolderAPI.createRecord(nonElectrinicRecordModel, recordFolder1.getId()).getId();
STEP("Check the non-electronic record has been created");
assertStatusCode(CREATED);
STEP("UPDATE METADATA");
updateRecordMetadata();
STEP("CHECK IF ELECTRONIC AND NON-ELECTRONIC RECORDS MOVED TO FOLDER2");
updateRecordMetadata();
}
@AfterClass(alwaysRun = true)
public void cleanMoveToRuleOnFoldersTest()
{
deleteRecordCategory(RecordCategoryOne.getId());
getDataUser().deleteUser(rmAdmin);
}
private String getModifiedPropertyValue(String originalValue) {
/* to be used to append to modifications */
String MODIFIED_PREFIX = "modified_";
return MODIFIED_PREFIX + originalValue;
}
private void updateRecordMetadata(){
STEP("Update metadata for Non-Electronic Record");
org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI recordsAPI = getRestAPIFactory().getRecordsAPI();
Record nonelecrecord = recordsAPI.getRecord(nonElectronicId);
String nonelecnewName = getModifiedPropertyValue(nonElectrinicRecordModel.getName());
String nonelecnewTitle = getModifiedPropertyValue(nonElectrinicRecordModel.getProperties().getTitle());
String nonelecnewDescription = getModifiedPropertyValue(nonElectrinicRecordModel.getProperties().getDescription());
recordsAPI.updateRecord(createRecordModel(nonelecnewName, nonelecnewDescription, nonelecnewTitle),nonelecrecord.getId());
assertStatusCode(OK);
STEP("Update metadata for Electronic Record");
Record elecrecord = recordsAPI.getRecord(electronicRecord.getId());
String elecnewName = getModifiedPropertyValue(electronicRecord.getName());
String elecnewTitle = getModifiedPropertyValue(electronicRecord.getProperties().getTitle());
String elecnewDescription = getModifiedPropertyValue(electronicRecord.getProperties().getDescription());
recordsAPI.updateRecord(createRecordModel(elecnewName, elecnewDescription, elecnewTitle),elecrecord.getId());
assertStatusCode(OK);
}
}

View File

@@ -0,0 +1,121 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.smoke;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.RecordFoldersAPI;
import org.alfresco.rest.v0.service.DispositionScheduleService;
import org.alfresco.test.AlfrescoTest;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
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.util.CommonTestUtils.generateTestPrefix;
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.AssertJUnit.assertNotNull;
public class DestroyRecordFolderActionsTest extends BaseRMRestTest {
private RecordCategory Category1,CATEGORY_TO_MOVE;
@Autowired
private DispositionScheduleService dispositionScheduleService;
@Autowired
private RecordFoldersAPI recordFoldersAPI;
private final String TEST_PREFIX = generateTestPrefix(DestroyRecordFolderActionsTest.class);
private final String folderDisposition = TEST_PREFIX + "RM-2937 folder ghosting";
@BeforeClass(alwaysRun = true)
private void setUp(){
STEP("Create the RM site if doesn't exist");
createRMSiteIfNotExists();
STEP("Create two record category");
Category1 = createRootCategory(getRandomName("Category1"));
CATEGORY_TO_MOVE = createRootCategory(getRandomName("CATEGORY_TO_MOVE"));
//create retention schedule
dispositionScheduleService.createCategoryRetentionSchedule(Category1.getName(), false);
// add cut off step
dispositionScheduleService.addCutOffAfterPeriodStep(Category1.getName(), "day|2", CREATED_DATE);
// add destroy step with ghosting
dispositionScheduleService.addDestroyWithGhostingImmediatelyAfterCutOff(Category1.getName());
}
@Test
@AlfrescoTest (jira = "RM-1621")
public void moveOnCutOffDestroyFolders() throws Exception {
//create folders
RecordCategoryChild FOLDER_DESTROY = createFolder(getAdminUser(),Category1.getId(),folderDisposition);
// edit disposition date
recordFoldersAPI.postFolderAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),editDispositionDateJson(),FOLDER_DESTROY.getName());
// cut off the FOLDER_DESTROY
recordFoldersAPI.postFolderAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","cutoff"),FOLDER_DESTROY.getName());
// Destroy the FOLDER_DESTROY
recordFoldersAPI.postFolderAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","destroy"),FOLDER_DESTROY.getName());
//Move the FOLDER_DESTROY within the CATEGORY_TO_MOVE.");
getRestAPIFactory().getNodeAPI(toContentModel(FOLDER_DESTROY.getId())).move(createBodyForMoveCopy(CATEGORY_TO_MOVE.getId()));
assertStatusCode(OK);
}
@AfterMethod(alwaysRun = true)
private void deletePreconditions() {
deleteRecordCategory(Category1.getId());
deleteRecordCategory(CATEGORY_TO_MOVE.getId());
}
}

View File

@@ -0,0 +1,425 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.smoke;
import org.alfresco.rest.core.v0.RMEvents;
import org.alfresco.rest.model.RestNodeBodyMoveCopyModel;
import org.alfresco.rest.model.RestNodeModel;
import org.alfresco.rest.requests.Node;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
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.rm.community.model.user.UserRoles;
import org.alfresco.rest.v0.LinksAPI;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.RecordFoldersAPI;
import org.alfresco.rest.v0.RecordsAPI;
import org.alfresco.rest.v0.service.DispositionScheduleService;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.model.RepoTestModel;
import org.alfresco.utility.model.UserModel;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.util.EntityUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.AssertJUnit;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import static org.alfresco.rest.core.v0.BaseAPI.NODE_REF_WORKSPACE_SPACES_STORE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.FILE_PLAN_ALIAS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAspects.CUT_OFF_ASPECT;
import static org.alfresco.rest.rm.community.model.recordcategory.RetentionPeriodProperty.*;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.springframework.http.HttpStatus.NO_CONTENT;
public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
@Autowired
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
@Autowired
private DispositionScheduleService dispositionScheduleService;
@Autowired
private LinksAPI linksAPI;
@Autowired
private RecordsAPI recordsAPI;
@Autowired
private RecordFoldersAPI recordFoldersAPI;
private final static String TEST_PREFIX = generateTestPrefix(DispositionScheduleLinkedRecordsTest.class);
private RecordCategory Category1,catsameLevel1,catsameLevel2;
private RecordCategoryChild CopyCatFolder,folder1,CatFolder,folder2;
private static final String categoryRM3077 = TEST_PREFIX + "RM-3077_manager_sees_me";
private static final String copyCategoryRM3077 = "Copy_of_" + categoryRM3077;
private static final String folderRM3077 = "RM-3077_folder_"+ categoryRM3077;
private static final String copyFolderRM3077 = "Copy_of_" + folderRM3077;
private final String electronicRecord = "RM-2937 electronic 2 record";
private final String folder = TEST_PREFIX + "RM-2937 folder ghosting";
private static final String categoryRecordsRM2526 = TEST_PREFIX + "RM-2526_category_records_immediately";
private static final String category2RecordsRM2526 = TEST_PREFIX + "RM-2526_category_2_records_1_day";
private static final String firstCategoryRM3060 = TEST_PREFIX + "RM-3060_category_record";
private static final String secondCategoryRM3060 = "Copy_of_" + firstCategoryRM3060;
private static final String firstFolderRM3060 = TEST_PREFIX + "RM-3060_folder";
private static final String secondFolderRM3060 = TEST_PREFIX + "RM-3060_disposition_on_Record_Level";
private static final String electronicRecordRM3060 = TEST_PREFIX + "RM-3060_electronic_1_record";
private static final String nonElectronicRecordRM3060 = TEST_PREFIX + "RM-3060_non-electronic_record";
private static final String TRANSFER_LOCATION = TEST_PREFIX + "RM-3060_transferred_records";
public static final String TRANSFER_TYPE = "rma:transferred";
private FilePlan filePlanModel;
private UserModel rmAdmin, rmManager;
@BeforeClass(alwaysRun = true)
public void setupDispositionScheduleLinkedRecordsTest() {
createRMSiteIfNotExists();
//get file plan
filePlanModel = getRestAPIFactory().getFilePlansAPI().getFilePlan(FILE_PLAN_ALIAS);
// create "rm admin" user if it does not exist and assign it to RM Administrator role
rmAdmin = getDataUser().createRandomTestUser();
rmRolesAndActionsAPI.assignRoleToUser(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),rmAdmin.getUsername(),
UserRoles.ROLE_RM_ADMIN.roleId);
// create "rm Manager" user if it does not exist and assign it to RM Administrator role
rmManager = getDataUser().createRandomTestUser();
rmRolesAndActionsAPI.assignRoleToUser(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),rmManager.getUsername(),
UserRoles.ROLE_RM_MANAGER.roleId);
}
/**
* Disposition Schedule on Record Folder with linked records test
* <p>
* Precondition:
* <p>
* Create rm_manager user that would have RM Managers role, rm_admin that would have RM Administrator role.
* Log in with admin user, create a category "manager sees me", give rm_manager read&file permission over it.
* Create a disposition schedule for it that would cut off folders after 1 day from created date. Copy the category.
* <p>
* <p/> TestRail Test C775<p/>
**/
@Test
@AlfrescoTest(jira = "RM-1622")
public void dispositionScheduleLinkedRecords() throws UnsupportedEncodingException {
STEP("Create record category");
Category1 = createRootCategory(categoryRM3077);
//create retention schedule
dispositionScheduleService.createCategoryRetentionSchedule(Category1.getName(), false);
// add cut off step
dispositionScheduleService.addCutOffAfterPeriodStep(Category1.getName(), "day|2", CREATED_DATE);
//create a copy of the category recordsCategory
String CopyCategoryId = copyCategory(getAdminUser(),Category1.getId(), copyCategoryRM3077);
// create folders in both categories
CatFolder = createRecordFolder(Category1.getId(), folderRM3077);
CopyCatFolder = createRecordFolder(CopyCategoryId, copyFolderRM3077);
// create record files
String electronicRecord = "RM-2801 electronic record";
Record elRecord = createElectronicRecord(CatFolder.getId(), electronicRecord);
String elRecordFullName = recordsAPI.getRecordFullName(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), CatFolder.getName(), electronicRecord);
String nonElectronicRecord = "RM-2801 non-electronic record";
Record nonElRecord = createNonElectronicRecord(CatFolder.getId(), nonElectronicRecord);
String nonElRecordFullName = recordsAPI.getRecordFullName(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), CatFolder.getName(), nonElectronicRecord);
// link the records to copy folder, then complete them
List<String> recordLists = new ArrayList<>();
recordLists.add(NODE_REF_WORKSPACE_SPACES_STORE + elRecord.getId());
recordLists.add(NODE_REF_WORKSPACE_SPACES_STORE + nonElRecord.getId());
linksAPI.linkRecord(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(), HttpStatus.SC_OK,copyCategoryRM3077 + "/" +
copyFolderRM3077, recordLists);
recordsAPI.completeRecord(rmAdmin.getUsername(), rmAdmin.getPassword(), elRecordFullName);
recordsAPI.completeRecord(rmAdmin.getUsername(), rmAdmin.getPassword(), nonElRecordFullName);
// edit disposition date
recordFoldersAPI.postFolderAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),editDispositionDateJson(),CatFolder.getName());
// cut off the Folder
recordFoldersAPI.postFolderAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","cutoff"),CatFolder.getName());
// Verify the Content
Node electronicNode = getNode(elRecord.getId());
assertTrue("The content of " + electronicRecord + " is available",
StringUtils.isEmpty(electronicNode.getNodeContent().getResponse().getBody().asString()));
// verify the Properties
AssertJUnit.assertNull("The properties are present even after cutting off the record.", elRecord.getProperties().getTitle());
// delete precondition
deleteRecordCategory(Category1.getId());
deleteRecordCategory(CopyCategoryId);
}
/**
* Test covering RM-3060
* Check the disposition steps for a record can be executed
* When the record is linked to a folder with the same disposition schedule
* */
@Test
@AlfrescoTest (jira = "RM-3060")
public void sameDispositionScheduleLinkedRecords() throws UnsupportedEncodingException {
// create a category with retention applied on records level
RecordCategory recordCategory = getRestAPIFactory().getFilePlansAPI(rmAdmin)
.createRootRecordCategory(RecordCategory.builder().name(firstCategoryRM3060).build(),
RecordCategory.DEFAULT_FILE_PLAN_ALIAS);
dispositionScheduleService.createCategoryRetentionSchedule(firstCategoryRM3060, true);
dispositionScheduleService.addCutOffAfterPeriodStep(firstCategoryRM3060, "week|1", DATE_FILED);
dispositionScheduleService.addTransferAfterEventStep(firstCategoryRM3060, TRANSFER_LOCATION, RMEvents.CASE_CLOSED.getEventName());
dispositionScheduleService.addDestroyWithoutGhostingAfterPeriodStep(firstCategoryRM3060, "week|1", CUT_OFF_DATE);
// make a copy of the category created
String categorySecondId = copyCategory(getAdminUser(), recordCategory.getId(), secondCategoryRM3060);
// create a folder on the category firstCategoryRM3060 with a complete electronic record
RecordCategoryChild firstFolderRecordCategoryChild = createRecordFolder(recordCategory.getId(),firstFolderRM3060);
Record firstElectronicRecord = createElectronicRecord(firstFolderRecordCategoryChild.getId(),electronicRecordRM3060);
String elRecordFullName = recordsAPI.getRecordFullName(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(),firstFolderRM3060, electronicRecordRM3060);
String elRecordNameNodeRef = recordsAPI.getRecordNodeRef(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), elRecordFullName, "/" + firstCategoryRM3060 + "/" + firstFolderRM3060);
recordsAPI.completeRecord(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(), elRecordFullName);
// create a folder on the category secondCategoryRM3060 with a non electronic record
RecordCategoryChild secondFolderRecordCategoryChild = createRecordFolder(categorySecondId,secondFolderRM3060);
Record secondNonElectronicRecord = createNonElectronicRecord(secondFolderRecordCategoryChild.getId(),nonElectronicRecordRM3060);
// link the nonElectronicRecordRM3060 to firstFolderRM3060
List<String> recordLists = new ArrayList<>();
recordLists.add(NODE_REF_WORKSPACE_SPACES_STORE + secondNonElectronicRecord.getId());
linksAPI.linkRecord(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(), HttpStatus.SC_OK,secondCategoryRM3060 + "/" +
secondFolderRM3060, recordLists);
String nonElRecordFullName = recordsAPI.getRecordFullName(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), secondFolderRM3060, secondNonElectronicRecord.getName());
String nonElRecordNameNodeRef = recordsAPI.getRecordNodeRef(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), nonElRecordFullName, "/" + secondCategoryRM3060 + "/" + secondFolderRM3060);
// complete records and cut them off
recordsAPI.completeRecord(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(), nonElRecordFullName);
// edit the disposition date
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),editDispositionDateJson(),nonElRecordNameNodeRef);
// cut off the record
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","cutoff"),nonElRecordNameNodeRef);
//check the record is cut off
AssertJUnit.assertTrue("The file " + nonElectronicRecordRM3060 + " has not been successfully cut off.", getRestAPIFactory().getRecordsAPI().getRecord(secondNonElectronicRecord.getId()).getAspectNames().contains(CUT_OFF_ASPECT));
// link the electronic record to secondFolderRM3060
recordLists.clear();
recordLists.add(NODE_REF_WORKSPACE_SPACES_STORE + secondNonElectronicRecord.getId());
linksAPI.linkRecord(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(), HttpStatus.SC_OK,secondCategoryRM3060 + "/" +
secondFolderRM3060, recordLists);
// edit the disposition date and cut off the record
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),editDispositionDateJson(),elRecordNameNodeRef);
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","cutoff"),elRecordNameNodeRef);
AssertJUnit.assertTrue("The file " + electronicRecordRM3060 + " has not been successfully cut off.", getRestAPIFactory().getRecordsAPI().getRecord(firstElectronicRecord.getId()).getAspectNames().contains(CUT_OFF_ASPECT));
// open the record and complete the disposition schedule event
rmRolesAndActionsAPI.completeEvent(getAdminUser().getUsername(),
getAdminUser().getPassword(), elRecordFullName, RMEvents.CASE_CLOSED, Instant.now());
rmRolesAndActionsAPI.completeEvent(getAdminUser().getUsername(),
getAdminUser().getPassword(), nonElRecordFullName, RMEvents.CASE_CLOSED, Instant.now());
// transfer the files & complete transfers
HttpResponse nonElRecordNameHttpResponse = recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","transfer"),recordsAPI.getRecordNodeRef(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), nonElRecordFullName, "/" + secondCategoryRM3060 + "/" + secondFolderRM3060));
String nonElRecordNameTransferId = getTransferId(nonElRecordNameHttpResponse,nonElRecordNameNodeRef);
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","transferComplete"),nonElRecordNameTransferId);
HttpResponse elRecordNameHttpResponse = recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","transfer"),recordsAPI.getRecordNodeRef(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), elRecordFullName, "/" + firstCategoryRM3060 + "/" + firstFolderRM3060));
String elRecordNameTransferId = getTransferId(elRecordNameHttpResponse,elRecordNameNodeRef);
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","transferComplete"),elRecordNameTransferId);
AssertJUnit.assertTrue("The file " + electronicRecordRM3060 + " has not been successfully transferred", getRestAPIFactory().getRecordsAPI().getRecord(firstElectronicRecord.getId()).getAspectNames().contains(TRANSFER_TYPE));
AssertJUnit.assertTrue("The file " + nonElectronicRecordRM3060 + " has not been successfully transferred.", getRestAPIFactory().getRecordsAPI().getRecord(secondNonElectronicRecord.getId()).getAspectNames().contains(TRANSFER_TYPE));
// edit the disposition date for nonElectronicRecordRM3060 & electronicRecordRM3060
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),editDispositionDateJson(),nonElRecordNameNodeRef);
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),editDispositionDateJson(),elRecordNameNodeRef);
// destroy nonElectronicRecordRM3060 & electronicRecordRM3060 records
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","destroy"),nonElRecordNameNodeRef);
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","destroy"),elRecordNameNodeRef);
// check the file is not displayed
assertNull("The file " + nonElectronicRecordRM3060 + " has not been successfully destroyed.", secondNonElectronicRecord.getContent());
assertNull("The file " + electronicRecordRM3060 + " has not been successfully destroyed.", firstElectronicRecord.getContent());
// delete precondition
deleteRecordCategory(recordCategory.getId());
deleteRecordCategory(categorySecondId);
}
private String copyCategory(UserModel user, String categoryId, String copyName) {
RepoTestModel repoTestModel = new RepoTestModel() {};
repoTestModel.setNodeRef(categoryId);
RestNodeModel restNodeModel;
RestNodeBodyMoveCopyModel copyDestinationInfo = new RestNodeBodyMoveCopyModel();
copyDestinationInfo.setTargetParentId(filePlanModel.getId());
copyDestinationInfo.setName(copyName);
try
{
restNodeModel = getRestAPIFactory().getNodeAPI(user, repoTestModel).copy(copyDestinationInfo);
}
catch (Exception e)
{
throw new RuntimeException("Problem copying category.", e);
}
return restNodeModel.getId();
}
private Node getNode(String recordId)
{
RepoTestModel repoTestModel = new RepoTestModel() {};
repoTestModel.setNodeRef(recordId);
return getRestAPIFactory().getNodeAPI(repoTestModel);
}
private String getTransferId(HttpResponse httpResponse,String nodeRef) {
HttpEntity entity = httpResponse.getEntity();
String responseString = null;
try {
responseString = EntityUtils.toString(entity, "UTF-8");
} catch (IOException e) {
throw new RuntimeException(e);
}
JSONObject result = new JSONObject(responseString);
return result
.getJSONObject("results")
.get(nodeRef)
.toString();
}
@Test
@AlfrescoTest(jira = "RM-1622")
public void sameLevelDispositionScheduleStepsPeriodsCalculation() throws Exception {
// create a category with retention applied on records level
RecordCategory catsameLevel1 = getRestAPIFactory().getFilePlansAPI(rmAdmin)
.createRootRecordCategory(RecordCategory.builder().name(firstCategoryRM3060).build(),
RecordCategory.DEFAULT_FILE_PLAN_ALIAS);
RecordCategory catsameLevel2 = getRestAPIFactory().getFilePlansAPI(rmAdmin)
.createRootRecordCategory(RecordCategory.builder().name(secondCategoryRM3060).build(),
RecordCategory.DEFAULT_FILE_PLAN_ALIAS);
// create retention schedule applied on records for category 1
dispositionScheduleService.createCategoryRetentionSchedule(firstCategoryRM3060, true);
// with retain immediately after record creation date and cut 1 day after record creation date
dispositionScheduleService.addCutOffAfterPeriodStep(firstCategoryRM3060, "day|1", DATE_FILED);
// create a folder on the category firstCategoryRM3060 with a complete electronic record
RecordCategoryChild firstFolderRecordCategoryChild = createRecordFolder(catsameLevel1.getId(),firstFolderRM3060);
Record firstElectronicRecord = createElectronicRecord(firstFolderRecordCategoryChild.getId(),electronicRecordRM3060);
String elRecordFullName = recordsAPI.getRecordFullName(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(),firstFolderRM3060, electronicRecordRM3060);
String elRecordNameNodeRef = recordsAPI.getRecordNodeRef(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), elRecordFullName, "/" + firstCategoryRM3060 + "/" + firstFolderRM3060);
recordsAPI.completeRecord(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(), elRecordFullName);
// create a folder on the category secondCategoryRM3060 with a non electronic record
RecordCategoryChild secondFolderRecordCategoryChild = createRecordFolder(catsameLevel2.getId(),secondFolderRM3060);
String elRecordNameNodeRefs = recordsAPI.getRecordNodeRef(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), elRecordFullName, "/" + firstCategoryRM3060 + "/" + firstFolderRM3060);
// link it to the folder in second category through the details page
List<String> recordLists = new ArrayList<>();
recordLists.add(NODE_REF_WORKSPACE_SPACES_STORE + firstElectronicRecord.getId());
linksAPI.linkRecord(getDataUser().getAdminUser().getUsername(),
getDataUser().getAdminUser().getPassword(), HttpStatus.SC_OK,secondCategoryRM3060 + "/" +
secondFolderRM3060, recordLists);
// edit disposition date
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),editDispositionDateJson(),elRecordNameNodeRefs);
}
@Test (dependsOnMethods = {"sameLevelDispositionScheduleStepsPeriodsCalculation" })
public void deleteLongestPeriodTestPrecondition() {
// Delete the RM site
getRestAPIFactory().getRMSiteAPI().deleteRMSite();
// Verify the status code
assertStatusCode(NO_CONTENT);
}
}

View File

@@ -0,0 +1,138 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.smoke;
import org.alfresco.dataprep.CMISUtil;
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild;
import org.alfresco.rest.rm.community.model.recordfolder.RecordFolderCollection;
import org.alfresco.rest.rm.community.model.user.UserRoles;
import org.alfresco.rest.rm.community.records.FileUnfiledRecordsTests;
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.RecordCategoriesAPI;
import org.alfresco.rest.v0.RecordsAPI;
import org.alfresco.rest.v0.service.RoleService;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.Utility;
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.data.DataSite;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FileType;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.UserModel;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.concurrent.atomic.AtomicReference;
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.utility.data.RandomData.getRandomName;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.springframework.test.util.AssertionErrors.assertTrue;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.fail;
public class FileVersionAsRecordTests extends BaseRMRestTest {
private UserModel nonRMuser,rmManager;
private SiteModel testSite;
private FileModel document, documentDeclared;
private RecordCategory category_manager, category_admin;
private RecordCategoryChild folder_admin, folder_manager ;
private static final String CATEGORY_MANAGER = "catManager" + generateTestPrefix(FileAsRecordTests.class);
private static final String CATEGORY_ADMIN = "catAdmin" + generateTestPrefix(FileAsRecordTests.class);
private static final String FOLDER_MANAGER = "recordFolder" + generateTestPrefix(FileAsRecordTests.class);
private static final String FOLDER_ADMIN = "recordFolder" + generateTestPrefix(FileAsRecordTests.class);
@Autowired
private DataSite dataSite;
@Autowired
private DataContent dataContent;
@Autowired
private RoleService roleService;
@BeforeClass(alwaysRun = true)
public void preconditionForFileVersionAsRecordTests()
{
STEP("Create the RM site if doesn't exist");
createRMSiteIfNotExists();
STEP("Create a user");
nonRMuser = dataUser.createRandomTestUser("testUser");
STEP("Create a collaboration site");
testSite = dataSite.usingUser(nonRMuser).createPublicRandomSite();
STEP("Create a document with the user without RM role");
document = dataContent.usingSite(testSite)
.usingUser(nonRMuser)
.createContent(CMISUtil.DocumentType.TEXT_PLAIN);
STEP("Create two categories with two folders");
category_manager = createRootCategory(CATEGORY_MANAGER);
category_admin = createRootCategory(CATEGORY_ADMIN);
folder_admin = createFolder(category_admin.getId(),FOLDER_ADMIN);
folder_manager = createFolder(category_manager.getId(),FOLDER_MANAGER);
STEP("Create an rm user and give filling permission over CATEGORY_MANAGER record category");
RecordCategory recordCategory = new RecordCategory().builder()
.id(category_manager.getId())
.build();
rmManager = roleService.createCollaboratorWithRMRoleAndPermission(testSite, recordCategory,
UserRoles.ROLE_RM_MANAGER, PERMISSION_FILING);
}
@Test
@AlfrescoTest (jira = "APPS-1625")
public void fileVersionAsRecordToUnfiledRecordContainer() throws Exception
{
AtomicReference<RecordFolderCollection> apiChildren = new AtomicReference<>();
STEP("Create a document with the user without RM role");
FileModel inplaceRecord = dataContent.usingSite(testSite).usingUser(rmManager)
.createContent(new FileModel("declareAndFileToIntoUnfiledRecordFolder",
FileType.TEXT_PLAIN));
STEP("Click on Declare and file without selecting a record folder");
getRestAPIFactory().getActionsAPI(rmManager).declareAndFile(inplaceRecord,"");
STEP("Check the file is declared in unfiled record folder");
Assert.assertTrue(isMatchingRecordInUnfiledRecords(inplaceRecord), "Record should be filed to Unfiled Records folder");
}
}

View File

@@ -0,0 +1,156 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.smoke;
import org.alfresco.rest.core.v0.BaseAPI;
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.RMRolesAndActionsAPI;
import org.alfresco.rest.v0.RecordCategoriesAPI;
import org.alfresco.rest.v0.RecordFoldersAPI;
import org.alfresco.rest.v0.RecordsAPI;
import org.alfresco.rest.v0.service.DispositionScheduleService;
import org.alfresco.test.AlfrescoTest;
import org.apache.commons.lang3.time.DateUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.AfterClass;
import org.testng.annotations.Test;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import static org.alfresco.rest.rm.community.base.TestData.DEFAULT_PASSWORD;
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
import static org.alfresco.utility.report.log.Step.STEP;
import static org.testng.Assert.assertTrue;
public class RecordRetentionAsOfDateTest extends BaseRMRestTest {
/** data prep 6services */
@Autowired
private RMRolesAndActionsAPI rmRolesAndActionsAPI;
@Autowired
private RecordsAPI recordsAPI;
@Autowired
private RecordFoldersAPI recordFoldersAPI;
@Autowired
private RecordCategoriesAPI recordCategoriesAPI;
@Autowired
private DispositionScheduleService dispositionScheduleService;
private RecordCategory Category1;
private final String TEST_PREFIX = generateTestPrefix(RecordRetentionAsOfDateTest.class);
private final String RM_ADMIN = TEST_PREFIX + "rm_admin";
private final String recordsCategory = TEST_PREFIX + "RM-5733 category";
private final String folderDisposition = TEST_PREFIX + "RM-5733 folder";
private static final String YEAR_MONTH_DAY = "yyyy-MM-dd";
@Test
@AlfrescoTest (jira = "RM-5733,RM-5799")
public void checkRetentionAsOfDateForTransferStepWithRetentionAction() {
// create test precondition
createTestPrecondition(recordsCategory);
// create disposition schedule
dispositionScheduleService.createCategoryRetentionSchedule(Category1.getName(), true);
// add cut off step
dispositionScheduleService.addCutOffImmediatelyStep(Category1.getName());
// add transfer step
HashMap<BaseAPI.RETENTION_SCHEDULE, String> transferStep = new HashMap<>();
transferStep.put(BaseAPI.RETENTION_SCHEDULE.RETENTION_PERIOD, "day|1");
transferStep.put(BaseAPI.RETENTION_SCHEDULE.NAME, "transfer");
transferStep.put(BaseAPI.RETENTION_SCHEDULE.RETENTION_PERIOD_PROPERTY, "rma:cutOffDate");
transferStep.put(BaseAPI.RETENTION_SCHEDULE.COMBINE_DISPOSITION_STEP_CONDITIONS, "false");
transferStep.put(BaseAPI.RETENTION_SCHEDULE.RETENTION_ELIGIBLE_FIRST_EVENT, "true");
transferStep.put(BaseAPI.RETENTION_SCHEDULE.RETENTION_GHOST, "on");
transferStep.put(BaseAPI.RETENTION_SCHEDULE.DESCRIPTION, "Transfer after 1 day");
recordCategoriesAPI.addDispositionScheduleSteps(getAdminUser().getUsername(),
getAdminUser().getPassword(), Category1.getName(), transferStep);
// create a folder and an electronic and a non-electronic record in it
RecordCategoryChild FOLDER = createFolder(getAdminUser(),Category1.getId(),folderDisposition);
String nonElectronicRecord = TEST_PREFIX + "RM-5733 non-electronic record";
Record nonElRecord = createNonElectronicRecord(FOLDER.getId(), nonElectronicRecord);
// complete records and cut them off
String nonElRecordName = recordsAPI.getRecordFullName(getAdminUser().getUsername(),
getAdminUser().getPassword(), folderDisposition, nonElectronicRecord);
// complete records and cut them off
completeRecord(nonElRecord.getId());
String nonElRecordNameNodeRef = recordsAPI.getRecordNodeRef(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(), nonElRecordName, "/" + Category1.getName() + "/" + folderDisposition);
recordFoldersAPI.postRecordAction(getAdminUser().getUsername(),
getAdminUser().getPassword(),new JSONObject().put("name","cutoff"),nonElRecordNameNodeRef);
JSONObject nextDispositionActionJson = recordCategoriesAPI.getNextDispositionAction(getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),nonElRecord.getId());
assertTrue(getAsOfDate(nextDispositionActionJson).startsWith(getTomorrow()),
"The retention as of date is not set to tomorrow.");
}
@AfterClass(alwaysRun = true)
public void cleanUp() {
// delete category
deleteRecordCategory(Category1.getId());
}
private void createTestPrecondition(String categoryName) {
createRMSiteIfNotExists();
// create "rm admin" user if it does not exist and assign it to RM Administrator role
rmRolesAndActionsAPI.createUserAndAssignToRole(
getDataUser().usingAdmin().getAdminUser().getUsername(),
getDataUser().usingAdmin().getAdminUser().getPassword(),
RM_ADMIN, DEFAULT_PASSWORD, "Administrator");
// create category
STEP("Create category");
Category1 = createRootCategory(categoryName,"Title");
}
private String getAsOfDate(JSONObject nextDispositionActionJson) {
return nextDispositionActionJson.getJSONObject("data").get("asOf").toString();
}
private static String getTomorrow() {
Date today = new Date();
Date tomorrow = DateUtils.addDays(today, 1);
SimpleDateFormat dateFormat = new SimpleDateFormat(YEAR_MONTH_DAY);
return dateFormat.format(tomorrow);
}
}

View File

@@ -1,11 +0,0 @@
# Root logger option
log4j.rootLogger=INFO, file
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=./target/reports/rm-automation-community-rest-api.log
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%t] %d{HH:mm:ss} %-5p %c{1}:%L - %m%n
log4j.logger.com.example=debug

View File

@@ -0,0 +1,20 @@
###### Root Logger #######
rootLogger.level=info
rootLogger.appenderRef.rolling.ref=RollingAppender
###### File appender definition #######
appender.rolling.type=RollingFile
appender.rolling.name=RollingAppender
appender.rolling.fileName=target/reports/rm-automation-community-rest-api.log
appender.rolling.filePattern=target/reports/rm-automation-community-rest-api.log.%i
appender.rolling.layout.type=PatternLayout
appender.rolling.layout.pattern=[%t] %d{HH:mm:ss} %-5p %c{1}:%L - %replace{%m}{[\r\n]+}{}%n
appender.rolling.policies.type=Policies
appender.rolling.policies.size.type=SizeBasedTriggeringPolicy
appender.rolling.policies.size.size=10MB
appender.rolling.strategy.type=DefaultRolloverStrategy
appender.rolling.strategy.max=10
###### Loggers definitions #######
logger.com-example.name=com.example
logger.com-example.level=debug

View File

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

View File

@@ -1,3 +1,3 @@
SOLR6_TAG=2.0.3
SOLR6_TAG=2.0.6-A4
POSTGRES_TAG=14.4
ACTIVEMQ_TAG=5.17.1-jre11-rockylinux8

View File

@@ -109,6 +109,10 @@ rm.completerecord.mandatorypropertiescheck.enabled=true
#
rm.patch.v22.convertToStandardFilePlan=false
#
# Max Batch size for adding the associations between the frozen nodes and the hold
rm.patch.v35.holdNewChildAssocPatch.batchSize=1000
# Permission mapping
# these take a comma separated string of permissions from org.alfresco.service.cmr.security.PermissionService
# read maps to ReadRecords and write to FileRecords

View File

@@ -1,60 +0,0 @@
#
# Warnings
#
log4j.logger.org.alfresco.module.org_alfresco_module_rm.caveat=warn
log4j.logger.org.alfresco.module.org_alfresco_module_rm.security.RMMethodSecurityPostProcessor=warn
#
# Module patches
#
log4j.logger.org.alfresco.module.org_alfresco_module_rm.patch=info
#
# Set to 'debug' to see details of capability failures when AccessDenied is thrown. May be
# removed to enhance performance.
#
log4j.logger.org.alfresco.module.org_alfresco_module_rm.security.RMMethodSecurityInterceptor=info
#
# RM permission debug
#
#log4j.logger.org.alfresco.module.org_alfresco_module_rm.capability.RMEntryVoter=debug
#log4j.logger.org.alfresco.module.org_alfresco_module_rm.capability.RMAfterInvocationProvider=debug
#log4j.logger.org.alfresco.module.org_alfresco_module_rm.capability.declarative=debug
#
# RM Audit service debug
#
#log4j.logger.org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService=debug
#
# Job debug
#
#log4j.logger.org.alfresco.module.org_alfresco_module_rm.job=debug
#
# Script logging level
#
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=error
#
# Behaviour debug
#
log4j.logger.org.alfresco.repo.policy.annotation.AnnotatedBehaviourPostProcessor=info
log4j.logger.org.alfresco.module.org_alfresco_module_rm.behaviour.BaseBehaviourBean=info
#
# Patch debug
#
log4j.logger.org.alfresco.module.org_alfresco_module_rm.patch=info
#
# RM Audit service debug
#
#log4j.logger.org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService=debug
#
# Job debug
#
#log4j.logger.org.alfresco.module.org_alfresco_module_rm.job=debug
log4j.logger.org.alfresco.repo.web.scripts.roles.DynamicAuthoritiesGet=info
log4j.logger.org.alfresco.module.org_alfresco_module_rm.query.RecordsManagementQueryDAOImpl=info

View File

@@ -0,0 +1,50 @@
# Warnings
logger.alfresco-module-org_alfresco_module_rm-caveat.name=org.alfresco.module.org_alfresco_module_rm.caveat
logger.alfresco-module-org_alfresco_module_rm-caveat.level=warn
logger.alfresco-module-org_alfresco_module_rm-security-RMMethodSecurityPostProcessor.name=org.alfresco.module.org_alfresco_module_rm.security.RMMethodSecurityPostProcessor
logger.alfresco-module-org_alfresco_module_rm-security-RMMethodSecurityPostProcessor.level=warn
# Module patches
logger.alfresco-module-org_alfresco_module_rm-patch.name=org.alfresco.module.org_alfresco_module_rm.patch
logger.alfresco-module-org_alfresco_module_rm-patch.level=info
# Set to 'debug' to see details of capability failures when AccessDenied is thrown. May be
# removed to enhance performance.
logger.alfresco-module-org_alfresco_module_rm-security-RMMethodSecurityInterceptor.name=org.alfresco.module.org_alfresco_module_rm.security.RMMethodSecurityInterceptor
logger.alfresco-module-org_alfresco_module_rm-security-RMMethodSecurityInterceptor.level=info
# RM permission debug
#logger.alfresco-module-org_alfresco_module_rm-capability-RMEntryVoter.name=org.alfresco.module.org_alfresco_module_rm.capability.RMEntryVoter
#logger.alfresco-module-org_alfresco_module_rm-capability-RMEntryVoter.level=debug
#logger.alfresco-module-org_alfresco_module_rm-capability-RMAfterInvocationProvider.name=org.alfresco.module.org_alfresco_module_rm.capability.RMAfterInvocationProvider
#logger.alfresco-module-org_alfresco_module_rm-capability-RMAfterInvocationProvider.level=debug
#logger.alfresco-module-org_alfresco_module_rm-capability-declarative.name=org.alfresco.module.org_alfresco_module_rm.capability.declarative
#logger.alfresco-module-org_alfresco_module_rm-capability-declarative.level=debug
# RM Audit service debug
#logger.alfresco-module-org_alfresco_module_rm-audit-RecordsManagementAuditService.name=org.alfresco.module.org_alfresco_module_rm.audit.RecordsManagementAuditService
#logger.alfresco-module-org_alfresco_module_rm-audit-RecordsManagementAuditService.level=debug
# Job debug
#logger.alfresco-module-org_alfresco_module_rm-job.name=org.alfresco.module.org_alfresco_module_rm.job
#logger.alfresco-module-org_alfresco_module_rm-job.level=debug
# Script logging level
logger.alfresco-repo-jscript-ScriptLogger.name=org.alfresco.repo.jscript.ScriptLogger
logger.alfresco-repo-jscript-ScriptLogger.level=error
# Behaviour debug
logger.alfresco-repo-policy-annotation-AnnotatedBehaviourPostProcessor.name=org.alfresco.repo.policy.annotation.AnnotatedBehaviourPostProcessor
logger.alfresco-repo-policy-annotation-AnnotatedBehaviourPostProcessor.level=info
logger.alfresco-module-org_alfresco_module_rm-behaviour-BaseBehaviourBean.name=org.alfresco.module.org_alfresco_module_rm.behaviour.BaseBehaviourBean
logger.alfresco-module-org_alfresco_module_rm-behaviour-BaseBehaviourBean.level=info
logger.alfresco-repo-web-scripts-roles-DynamicAuthoritiesGet.name=org.alfresco.repo.web.scripts.roles.DynamicAuthoritiesGet
logger.alfresco-repo-web-scripts-roles-DynamicAuthoritiesGet.level=info
logger.alfresco-module-org_alfresco_module_rm-query-RecordsManagementQueryDAOImpl.name=org.alfresco.module.org_alfresco_module_rm.query.RecordsManagementQueryDAOImpl
logger.alfresco-module-org_alfresco_module_rm-query-RecordsManagementQueryDAOImpl.level=info

View File

@@ -17,5 +17,6 @@
<property name="filePlanService" ref="filePlanService" />
<property name="holdService" ref="holdService" />
<property name="nodeService" ref="nodeService" />
<property name="batchSize" value="${rm.patch.v35.holdNewChildAssocPatch.batchSize}" />
</bean>
</beans>

View File

@@ -175,6 +175,14 @@
<property name="nodesModelFactory" ref="nodesModelFactory" />
</bean>
<bean class="org.alfresco.rm.rest.api.events.EventEntityResource">
<property name="recordsManagementEventService" ref="RecordsManagementEventService" />
</bean>
<bean class="org.alfresco.rm.rest.api.events.EventTypeEntityResource">
<property name="recordsManagementEventService" ref="RecordsManagementEventService" />
</bean>
<!-- extended sites bean definition -->
<bean id="rm.sites" class="org.alfresco.rm.rest.api.impl.RMSitesImpl" parent="sites">
<property name="siteSurfConfig" ref="rm.siteSurfConfig" />
@@ -209,6 +217,8 @@
<entry key="org.alfresco.service.cmr.attributes.DuplicateAttributeException" value="#{T(org.springframework.extensions.webscripts.Status).STATUS_CONFLICT}" />
<entry key="org.alfresco.module.org_alfresco_module_rm.record.RecordCreationException" value="422" />
<entry key="org.alfresco.service.cmr.model.FileExistsException" value="409" />
<entry key="org.alfresco.rest.framework.core.exceptions.EventAlreadyExistsException" value="409" />
<entry key="org.alfresco.rest.framework.core.exceptions.EntityNotFoundException" value="404" />
</map>
</property>
</bean>

View File

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

View File

@@ -30,8 +30,10 @@ 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.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.alfresco.error.AlfrescoRuntimeException;
@@ -47,7 +49,6 @@ 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.springframework.extensions.surf.util.I18NUtil;
/**
@@ -64,7 +65,6 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
/** 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;
@@ -194,6 +194,7 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
boolean hasMore = true;
int skipCount = 0;
List<NodeRef> resultNodes = new ArrayList<>();
if (batchSize < 1)
{
@@ -214,7 +215,14 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
// execute search
ResultSet results = searchService.query(params);
List<NodeRef> resultNodes = results.getNodeRefs();
if(results != null)
{
// filtering out the hold/freezed cases from the result set
resultNodes =
results.getNodeRefs().stream().filter(node -> nodeService.getPrimaryParent(node) == null ?
!freezeService.isFrozenOrHasFrozenChildren(node) :
!freezeService.isFrozenOrHasFrozenChildren(nodeService.getPrimaryParent(node).getParentRef())).collect(Collectors.toList());
}
hasMore = results.hasMore();
skipCount += resultNodes.size(); // increase by page size
results.close();
@@ -265,12 +273,6 @@ public class DispositionLifecycleJobExecuter extends RecordsManagementJobExecute
}
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

View File

@@ -38,9 +38,12 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.alfresco.model.ContentModel;
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
import org.alfresco.module.org_alfresco_module_rm.capability.impl.ViewRecordsCapability;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
import org.alfresco.module.org_alfresco_module_rm.event.EventCompletionDetails;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
@@ -76,6 +79,7 @@ import org.json.simple.JSONObject;
*
* @author Roy Wetherall
*/
@Slf4j
public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONConversionComponent
implements NodeServicePolicies.OnDeleteNodePolicy,
NodeServicePolicies.OnCreateNodePolicy
@@ -515,17 +519,25 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
AuthenticationUtil.runAsSystem((RunAsWork<Void>) () -> {
//Add details of the next incomplete event in the disposition schedule
if (dispositionService.getNextDispositionAction(nodeRef) != null)
DispositionAction nextDispositionAction = dispositionService.getNextDispositionAction(nodeRef);
if (nextDispositionAction != null)
{
for (EventCompletionDetails details : dispositionService.getNextDispositionAction(nodeRef).getEventCompletionDetails())
for (EventCompletionDetails details : nextDispositionAction.getEventCompletionDetails())
{
if (!details.isEventComplete())
{
DispositionActionDefinition dispositionActionDefinition = nextDispositionAction.getDispositionActionDefinition();
HashMap properties = (HashMap) rmNodeValues.get("properties");
properties.put("combineDispositionStepConditions", nodeService.getProperty(dispositionService.getNextDispositionAction(nodeRef).getDispositionActionDefinition().getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS));
properties.put("incompleteDispositionEvent", details.getEventName());
properties.put("dispositionEventCombination", nodeService.getProperty(dispositionService.getNextDispositionAction(nodeRef).getDispositionActionDefinition().getNodeRef(), PROP_DISPOSITION_EVENT_COMBINATION));
if(dispositionActionDefinition == null)
{
log.debug("Disposition action definition for disposition action "+ nextDispositionAction.getName() +" has been removed or never exist");
}
else
{
properties.put("combineDispositionStepConditions", nodeService.getProperty(dispositionActionDefinition.getNodeRef(), PROP_COMBINE_DISPOSITION_STEP_CONDITIONS));
properties.put("dispositionEventCombination", nodeService.getProperty(dispositionActionDefinition.getNodeRef(), PROP_DISPOSITION_EVENT_COMBINATION));
}
break;
}
}

View File

@@ -30,6 +30,9 @@ import static org.alfresco.model.ContentModel.ASSOC_CONTAINS;
import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementCustomModel.RM_CUSTOM_URI;
import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.ASSOC_FROZEN_CONTENT;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.alfresco.model.ContentModel;
@@ -37,11 +40,14 @@ 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.patch.AbstractModulePatch;
import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
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;
import org.alfresco.service.namespace.RegexQNamePattern;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Patch to create new hold child association to link the record to the hold
@@ -52,8 +58,15 @@ import org.alfresco.service.namespace.RegexQNamePattern;
*/
public class RMv35HoldNewChildAssocPatch extends AbstractModulePatch
{
/** logger */
protected static final Logger LOGGER = LoggerFactory.getLogger(RMv35HoldNewChildAssocPatch.class);
/** A name for the associations created by this patch. */
protected static final QName PATCH_ASSOC_NAME = QName.createQName(RM_CUSTOM_URI, RMv35HoldNewChildAssocPatch.class.getSimpleName());
protected static final QName PATCH_ASSOC_NAME = QName.createQName(RM_CUSTOM_URI,
RMv35HoldNewChildAssocPatch.class.getSimpleName());
/** The batch size for processing frozen nodes. */
private int batchSize = 1000;
/**
* File plan service interface
@@ -75,7 +88,8 @@ public class RMv35HoldNewChildAssocPatch extends AbstractModulePatch
/**
* Setter for fileplanservice
*
* @param filePlanService File plan service interface
* @param filePlanService
* File plan service interface
*/
public void setFilePlanService(FilePlanService filePlanService)
{
@@ -85,7 +99,8 @@ public class RMv35HoldNewChildAssocPatch extends AbstractModulePatch
/**
* Setter for hold service
*
* @param holdService Hold service interface.
* @param holdService
* Hold service interface.
*/
public void setHoldService(HoldService holdService)
{
@@ -95,7 +110,8 @@ public class RMv35HoldNewChildAssocPatch extends AbstractModulePatch
/**
* Setter for node service
*
* @param nodeService Interface for public and internal node and store operations.
* @param nodeService
* Interface for public and internal node and store operations.
*/
public void setNodeService(NodeService nodeService)
{
@@ -112,33 +128,49 @@ public class RMv35HoldNewChildAssocPatch extends AbstractModulePatch
this.behaviourFilter = behaviourFilter;
}
/**
* Setter for maximum batch size
*
* @param maxBatchSize
* The max amount of associations to be created between the frozen nodes and the hold in a transaction
*/
public void setBatchSize(int batchSize)
{
this.batchSize = batchSize;
}
@Override
public void applyInternal()
{
behaviourFilter.disableBehaviour(ContentModel.ASPECT_AUDITABLE);
behaviourFilter.disableBehaviour(ContentModel.ASPECT_VERSIONABLE);
try
{
int patchedNodesCounter = 0;
for (NodeRef filePlan : filePlanService.getFilePlans())
{
for (NodeRef hold : holdService.getHolds(filePlan))
{
List<ChildAssociationRef> frozenAssoc = nodeService.getChildAssocs(hold, ASSOC_FROZEN_CONTENT, RegexQNamePattern.MATCH_ALL);
for (ChildAssociationRef ref : frozenAssoc)
LOGGER.debug("Analyzing hold {}", hold.getId());
BatchWorker batchWorker = new BatchWorker(hold);
LOGGER.debug("Hold has {} items to be analyzed", batchWorker.getWorkSize());
while (batchWorker.hasMoreResults())
{
NodeRef childNodeRef = ref.getChildRef();
// In testing we found that this was returning more than just "contains" associations.
// Possibly this is due to the code in Node2ServiceImpl.getParentAssocs not using the second parameter.
List<ChildAssociationRef> parentAssocs = nodeService.getParentAssocs(childNodeRef, ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
boolean childContainedByHold =
parentAssocs.stream().anyMatch(entry -> entry.getParentRef().equals(hold) && entry.getTypeQName().equals(ASSOC_CONTAINS));
if (!childContainedByHold)
{
nodeService.addChild(hold, childNodeRef, ASSOC_CONTAINS, PATCH_ASSOC_NAME);
}
processBatch(hold, batchWorker);
}
LOGGER.debug("Patched {} items in hold", batchWorker.getTotalPatchedNodes());
patchedNodesCounter += batchWorker.getTotalPatchedNodes();
}
}
LOGGER.debug("Patch applied to {} children across all holds", patchedNodesCounter);
}
finally
{
@@ -146,4 +178,92 @@ public class RMv35HoldNewChildAssocPatch extends AbstractModulePatch
behaviourFilter.enableBehaviour(ContentModel.ASPECT_VERSIONABLE);
}
}
private void processBatch(NodeRef hold, BatchWorker batch)
{
transactionService.getRetryingTransactionHelper().doInTransaction(() -> {
Collection<ChildAssociationRef> childRefs = batch.getNextWork();
LOGGER.debug("Processing batch of {} children in hold", childRefs.size());
for (ChildAssociationRef child : childRefs)
{
NodeRef childNodeRef = child.getChildRef();
if (!isChildContainedByHold(hold, childNodeRef))
{
nodeService.addChild(hold, childNodeRef, ASSOC_CONTAINS, PATCH_ASSOC_NAME);
batch.countPatchedNode();
}
}
return null;
}, false, true);
}
private boolean isChildContainedByHold(NodeRef hold, NodeRef child)
{
// In testing we found that this was returning more than just "contains" associations.
// Possibly this is due to the code in Node2ServiceImpl.getParentAssocs not using the second
// parameter.
List<ChildAssociationRef> parentAssocs = nodeService.getParentAssocs(child, ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
return parentAssocs.stream()
.anyMatch(entry -> entry.getParentRef().equals(hold) && entry.getTypeQName().equals(ASSOC_CONTAINS));
}
private class BatchWorker
{
NodeRef hold;
int totalPatchedNodes = 0;
int workSize;
Iterator<ChildAssociationRef> iterator;
public BatchWorker(NodeRef hold)
{
this.hold = hold;
setupHold();
}
public boolean hasMoreResults()
{
return iterator == null ? true : iterator.hasNext();
}
public void countPatchedNode()
{
this.totalPatchedNodes += 1;
}
public int getTotalPatchedNodes()
{
return totalPatchedNodes;
}
public int getWorkSize()
{
return workSize;
}
public void setupHold()
{
// Get child assocs without preloading
List<ChildAssociationRef> holdChildren = nodeService.getChildAssocs(hold, ASSOC_FROZEN_CONTENT,
RegexQNamePattern.MATCH_ALL, Integer.MAX_VALUE, false);
this.iterator = holdChildren.listIterator();
this.workSize = holdChildren.size();
}
public Collection<ChildAssociationRef> getNextWork()
{
List<ChildAssociationRef> frozenNodes = new ArrayList<ChildAssociationRef>(batchSize);
while (iterator.hasNext() && frozenNodes.size() < batchSize)
{
frozenNodes.add(iterator.next());
}
return frozenNodes;
}
}
}

View File

@@ -0,0 +1,222 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rm.rest.api.events;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEvent;
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEventService;
import org.alfresco.rest.framework.WebApiDescription;
import org.alfresco.rest.framework.WebApiParam;
import org.alfresco.rest.framework.core.ResourceParameter;
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
import org.alfresco.rest.framework.core.exceptions.EventAlreadyExistsException;
import org.alfresco.rest.framework.resource.EntityResource;
import org.alfresco.rest.framework.resource.actions.interfaces.EntityResourceAction;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Paging;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rm.rest.api.model.EventBody;
import org.alfresco.rm.rest.api.model.EventInfo;
import org.alfresco.util.GUID;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import static org.alfresco.util.ParameterCheck.mandatory;
/**
* Event entity resource
*/
@EntityResource(name = "events", title = "Events")
public class EventEntityResource implements EntityResourceAction.Read<EventInfo>,
EntityResourceAction.ReadById<EventInfo>,
EntityResourceAction.Update<EventBody>,
EntityResourceAction.Create<EventBody> {
private RecordsManagementEventService recordsManagementEventService;
/**
* Set the records management event service
*
* @param rmEventService
*/
public void setRecordsManagementEventService(RecordsManagementEventService rmEventService)
{
this.recordsManagementEventService = rmEventService;
}
@Override
@WebApiDescription(title = "Return a single event identified by 'eventId'")
@WebApiParam(name = "eventId", title = "The event id", kind = ResourceParameter.KIND.URL_PATH)
public EventInfo readById(String eventId, Parameters parameters) throws EntityNotFoundException
{
mandatory("eventId", eventId);
RecordsManagementEvent event = null;
if (eventExists(eventId))
{
// Get the event
event = recordsManagementEventService.getEvent(eventId);
}
return EventInfo.fromRecordsManagementEvent(event);
}
@Override
@WebApiDescription(title = "Return a list of events")
public CollectionWithPagingInfo<EventInfo> readAll(Parameters params)
{
Paging paging = params.getPaging();
List<EventInfo> eventInfoList = recordsManagementEventService.getEvents().stream()
.map(EventInfo::fromRecordsManagementEvent)
.collect(Collectors.toList());
int totalCount = eventInfoList.size();
boolean hasMoreItems = paging.getSkipCount() + paging.getMaxItems() < totalCount;
return CollectionWithPagingInfo.asPaged(paging, eventInfoList.stream()
.skip(paging.getSkipCount())
.limit(paging.getMaxItems())
.collect(Collectors.toList()), hasMoreItems, totalCount);
}
@Override
@WebApiDescription(title = "Create a new event")
public List<EventBody> create(List<EventBody> eventBodyList, Parameters parameters)
{
//TODO: 403 User not allowed to update event error still needs to be implemented
mandatory("eventBodyList", eventBodyList);
for (EventBody eventBody : eventBodyList) {
mandatory("eventName", eventBody.getName());
mandatory("eventType", eventBody.getType());
}
List<EventBody> responseEventBodyList = new ArrayList<>();
for (EventBody eventBody : eventBodyList) {
String eventId = GUID.generate();
String eventName = eventBody.getName();
String eventType = eventBody.getType();
if(canCreateEvent(eventId, eventName)) {
RecordsManagementEvent event = recordsManagementEventService.addEvent(eventType, eventId, eventName);
responseEventBodyList.add(EventBody.fromRecordsManagementEvent(event));
}
}
return responseEventBodyList;
}
@Override
@WebApiDescription(title = "Update a single event identified by 'eventId'")
@WebApiParam(name = "eventId", title = "The event id", kind = ResourceParameter.KIND.URL_PATH)
public EventBody update(String eventId, EventBody eventBody, Parameters parameters)
{
//TODO: 403 User not allowed to update event error still needs to be implemented
mandatory("eventId", eventId);
mandatory("eventName", eventBody.getName());
mandatory("eventType", eventBody.getType());
RecordsManagementEvent event = null;
if (canEditEvent(eventBody.getName(), eventId, eventBody.getType()))
{
// Create event
event = recordsManagementEventService.addEvent(eventBody.getType(), eventId, eventBody.getName());
}
else
{
// Get event
event = recordsManagementEventService.getEvent(eventId);
}
return EventBody.fromRecordsManagementEvent(event);
}
/**
* Helper method for checking if an event exists or not. Throws an
* error if the event does not exist.
*
* @param eventId The id of the event
*/
private boolean eventExists(String eventId)
{
boolean eventExists = true;
// Check the event exists
if (!recordsManagementEventService.existsEvent(eventId))
{
throw new EntityNotFoundException(eventId);
}
return eventExists;
}
/**
* Helper method for checking if an event can be created or not. Throws an
* error if the event already exists.
*
* @param eventId The id of the event
* @param eventName The name of the event
*/
private boolean canCreateEvent(String eventId, String eventName)
{
boolean canCreateEvent = true;
if (!recordsManagementEventService.canCreateEvent(eventName, eventId))
{
throw new EventAlreadyExistsException("framework.exception.CreateEventAlreadyExists", new Object[] {eventName});
}
return canCreateEvent;
}
/**
* Helper method for checking if an event can be edited or not. Throws an
* error if an event with the same display label already exists.
*
* @param eventName The name of the event
* @param eventId The id of the event
* @param eventType The type of the event
* @return true if the event can be edited, false otherwise
*/
private boolean canEditEvent(String eventName, String eventId, String eventType)
{
boolean canEditEvent = false;
if (eventExists(eventId)) {
try
{
canEditEvent = recordsManagementEventService.canEditEvent(eventName, eventId, eventType);
}
catch (AlfrescoRuntimeException are)
{
throw new EventAlreadyExistsException("framework.exception.UpdateEventAlreadyExists", new Object[] {eventName});
}
}
return canEditEvent;
}
}

View File

@@ -0,0 +1,76 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rm.rest.api.events;
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEventService;
import org.alfresco.rest.framework.WebApiDescription;
import org.alfresco.rest.framework.resource.EntityResource;
import org.alfresco.rest.framework.resource.actions.interfaces.EntityResourceAction;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Paging;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rm.rest.api.model.EventTypeInfo;
import java.util.List;
import java.util.stream.Collectors;
/**
* Event Type entity resource
*/
@EntityResource(name = "event-types", title = "Event Types")
public class EventTypeEntityResource implements EntityResourceAction.Read<EventTypeInfo> {
private RecordsManagementEventService recordsManagementEventService;
/**
* Set the records management event service
* @param rmEventService
*/
public void setRecordsManagementEventService(RecordsManagementEventService rmEventService)
{
this.recordsManagementEventService = rmEventService;
}
@Override
@WebApiDescription(title = "Return a list of different event types")
public CollectionWithPagingInfo<EventTypeInfo> readAll(Parameters params)
{
// TODO: AssociationName and ActionOnAssociatedNode properties still need to be assigned.
Paging paging = params.getPaging();
List<EventTypeInfo> eventTypeInfoList = recordsManagementEventService.getEventTypes().stream()
.map(EventTypeInfo::fromRecordsManagementEventType)
.collect(Collectors.toList());
int totalCount = eventTypeInfoList.size();
boolean hasMoreItems = paging.getSkipCount() + paging.getMaxItems() < totalCount;
return CollectionWithPagingInfo.asPaged(paging, eventTypeInfoList.stream()
.skip(paging.getSkipCount())
.limit(paging.getMaxItems())
.collect(Collectors.toList()), hasMoreItems, totalCount);
}
}

View File

@@ -0,0 +1,34 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
/**
* Package info that defines the Information Governance Events REST API
*/
@WebApi(name="gs", scope=Api.SCOPE.PUBLIC, version=1)
package org.alfresco.rm.rest.api.events;
import org.alfresco.rest.framework.Api;
import org.alfresco.rest.framework.WebApi;

View File

@@ -0,0 +1,71 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rm.rest.api.model;
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEvent;
/**
* The EventBody model to be exposed through REST API.
*/
public class EventBody {
private String name;
private String type;
public static EventBody fromRecordsManagementEvent(RecordsManagementEvent event)
{
EventBody eventBody = new EventBody();
if(event != null) {
eventBody.setName(event.getDisplayLabel());
eventBody.setType(event.getType());
}
return eventBody;
}
public EventBody() {}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getType()
{
return type;
}
public void setType(String type)
{
this.type = type;
}
}

View File

@@ -0,0 +1,82 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rm.rest.api.model;
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEvent;
/**
* The EventInfo model to be exposed through REST API.
*/
public class EventInfo {
private String id;
private String name;
private String type;
public static EventInfo fromRecordsManagementEvent(RecordsManagementEvent event)
{
EventInfo eventInfo = new EventInfo();
if (event != null) {
eventInfo.setName(event.getDisplayLabel());
eventInfo.setId(event.getName());
eventInfo.setType(event.getType());
}
return eventInfo;
}
public EventInfo() {}
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getType()
{
return type;
}
public void setType(String type)
{
this.type = type;
}
}

View File

@@ -0,0 +1,105 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rm.rest.api.model;
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEventType;
/**
* The EventTypeInfo model to be exposed through REST API.
*/
public class EventTypeInfo {
private String id;
private String name;
private boolean isAutomatic;
private String associationName;
private String actionOnAssociatedNode;
public static EventTypeInfo fromRecordsManagementEventType(RecordsManagementEventType eventType)
{
EventTypeInfo eventTypeInfo = new EventTypeInfo();
if (eventType != null) {
eventTypeInfo.setName(eventType.getDisplayLabel());
eventTypeInfo.setId(eventType.getName());
eventTypeInfo.setAutomatic(eventType.isAutomaticEvent());
}
return eventTypeInfo;
}
public EventTypeInfo() {}
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public boolean isAutomatic()
{
return isAutomatic;
}
public void setAutomatic(boolean automatic)
{
isAutomatic = automatic;
}
public String getAssociationName()
{
return associationName;
}
public void setAssociationName(String associationName)
{
this.associationName = associationName;
}
public String getActionOnAssociatedNode()
{
return actionOnAssociatedNode;
}
public void setActionOnAssociatedNode(String actionOnAssociatedNode)
{
this.actionOnAssociatedNode = actionOnAssociatedNode;
}
}

View File

@@ -4,7 +4,7 @@
# Version label
version.major=7
version.minor=3
version.minor=4
version.revision=0
version.label=

View File

@@ -170,7 +170,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
executer.executeImpl();
// then
verify(mockedNodeService, times(2)).getPrimaryParent(any(NodeRef.class));
// ensure the query is executed and closed
verifyQueryTimes(2);
@@ -206,7 +206,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
executer.executeImpl();
// then
verify(mockedNodeService, times(1)).getPrimaryParent(any(NodeRef.class));
// ensure the query is executed and closed
verifyQueryTimes(1);
@@ -262,11 +262,11 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
// ensure each node is process correctly
// node1
verify(mockedNodeService, times(1)).getProperty(node1, RecordsManagementModel.PROP_DISPOSITION_ACTION);
verify(mockedNodeService, times(1)).getPrimaryParent(node1);
verify(mockedNodeService, times(3)).getPrimaryParent(node1);
verify(mockedRecordsManagementActionService, times(1)).executeRecordsManagementAction(eq(parent), eq(CUTOFF), anyMap());
// node2
verify(mockedNodeService, times(1)).getProperty(node2, RecordsManagementModel.PROP_DISPOSITION_ACTION);
verify(mockedNodeService, times(1)).getPrimaryParent(node2);
verify(mockedNodeService, times(3)).getPrimaryParent(node2);
verify(mockedRecordsManagementActionService, times(1)).executeRecordsManagementAction(eq(parent), eq(RETAIN), anyMap());
// ensure no more interactions
@@ -329,7 +329,7 @@ public class DispositionLifecycleJobExecuterUnitTest extends BaseUnitTest
// call the service
executer.executeImpl();
// check the loop iterated trough all the elements
// check the loop iterated through all the elements
verify(mockedNodeService).exists(node1);
verify(mockedNodeService).exists(node2);
verify(mockedNodeService).exists(node3);

View File

@@ -34,7 +34,9 @@ import static org.alfresco.model.ContentModel.ASSOC_CONTAINS;
import static org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel.ASSOC_FROZEN_CONTENT;
import static org.alfresco.module.org_alfresco_module_rm.patch.v35.RMv35HoldNewChildAssocPatch.PATCH_ASSOC_NAME;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyMap;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
@@ -51,16 +53,21 @@ import java.util.Set;
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
import org.alfresco.module.org_alfresco_module_rm.hold.HoldService;
import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
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;
import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.service.transaction.TransactionService;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
/**
* RM V3.5 Create new hold child association to link the record to the hold
@@ -81,6 +88,12 @@ public class RMv35HoldNewChildAssocPatchUnitTest
@Mock
private BehaviourFilter mockBehaviourFilter;
@Mock
private TransactionService mockTransactionService;
@Mock
private RetryingTransactionHelper mockRetryingTransactionHelper;
@InjectMocks
private RMv35HoldNewChildAssocPatch patch;
@@ -112,25 +125,63 @@ public class RMv35HoldNewChildAssocPatchUnitTest
/**
* Test secondary associations are created for held items so that they are "contained" in the hold.
*/
@SuppressWarnings("unchecked")
@Test
public void testAddChildDuringUpgrade()
{
when(mockFilePlanService.getFilePlans()).thenReturn(fileplans);
when(mockHoldService.getHolds(filePlanRef)).thenReturn(holds);
when(mockNodeService.getChildAssocs(holdRef, ASSOC_FROZEN_CONTENT, RegexQNamePattern.MATCH_ALL)).thenReturn(childAssocs);
when(mockNodeService.getChildAssocs(holdRef, ASSOC_FROZEN_CONTENT, RegexQNamePattern.MATCH_ALL, Integer.MAX_VALUE, false))
.thenReturn(childAssocs);
when(childAssociationRef.getChildRef()).thenReturn(heldItemRef);
// setup retrying transaction helper
Answer<Object> doInTransactionAnswer = new Answer<Object>()
{
@SuppressWarnings("rawtypes")
@Override
public Object answer(InvocationOnMock invocation) throws Throwable
{
RetryingTransactionCallback callback = (RetryingTransactionCallback) invocation.getArguments()[0];
// when(childAssociationRef.getChildRef()).thenReturn(heldItemRef);
return callback.execute();
}
};
doAnswer(doInTransactionAnswer).when(mockRetryingTransactionHelper)
.<Object> doInTransaction(any(RetryingTransactionCallback.class), anyBoolean(), anyBoolean());
when(mockTransactionService.getRetryingTransactionHelper()).thenReturn(mockRetryingTransactionHelper);
patch.applyInternal();
verify(mockNodeService, times(1)).addChild(holdRef, heldItemRef, ASSOC_CONTAINS, PATCH_ASSOC_NAME);
}
@SuppressWarnings("unchecked")
@Test
public void patchRunWithSuccessWhenNoHeldChildren()
{
when(mockFilePlanService.getFilePlans()).thenReturn(fileplans);
when(mockHoldService.getHolds(filePlanRef)).thenReturn(holds);
when(mockNodeService.getChildAssocs(holdRef, ASSOC_FROZEN_CONTENT, RegexQNamePattern.MATCH_ALL)).thenReturn(emptyList());
when(mockNodeService.getChildAssocs(holdRef, ASSOC_FROZEN_CONTENT, RegexQNamePattern.MATCH_ALL, Integer.MAX_VALUE, false))
.thenReturn(emptyList());
// setup retrying transaction helper
Answer<Object> doInTransactionAnswer = new Answer<Object>()
{
@SuppressWarnings("rawtypes")
@Override
public Object answer(InvocationOnMock invocation) throws Throwable
{
RetryingTransactionCallback callback = (RetryingTransactionCallback) invocation.getArguments()[0];
when(childAssociationRef.getChildRef()).thenReturn(heldItemRef);
return callback.execute();
}
};
doAnswer(doInTransactionAnswer).when(mockRetryingTransactionHelper)
.<Object> doInTransaction(any(RetryingTransactionCallback.class), anyBoolean(), anyBoolean());
when(mockTransactionService.getRetryingTransactionHelper()).thenReturn(mockRetryingTransactionHelper);
patch.applyInternal();

View File

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

View File

@@ -38,6 +38,9 @@ tags:
description: Retrieve and manage unfiled records containers
- name: unfiled-record-folders
description: Retrieve and manage unfiled record folders
- name: events
description: Retrieve and manage retention events
paths:
## GS sites
'/gs-sites':
@@ -2091,7 +2094,172 @@ paths:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
'/events':
get:
tags:
- events
summary: List all available retention events
description: |
Gets the list of events that can be used by retention steps
operationId: getAllEvents
produces:
- application/json
parameters:
- $ref: '#/parameters/skipCountParam'
- $ref: '#/parameters/maxItemsParam'
responses:
'200':
description: Successful response
schema:
$ref: '#/definitions/EventPaging'
'400':
description: |
Invalid parameter: value of **maxItems** or **skipCount** is invalid
'401':
description: Authentication failed
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
post:
tags:
- events
summary: Create a new retention event
description: |
Creates a new event that can be used by retention schedules.
operationId: createEvent
parameters:
- in: body
name: eventBodyCreate
description: The new event.
required: true
schema:
$ref: '#/definitions/EventBody'
consumes:
- application/json
produces:
- application/json
responses:
'201':
description: Successful response
schema:
$ref: '#/definitions/EventEntry'
'400':
description: |
Invalid parameter: **name** or **type** is invalid
'401':
description: Authentication failed
'403':
description: Current user does not have permission to create event
'409':
description: Cannot create event. An event with the name **name** already exists
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
'/events/{eventId}':
get:
tags:
- events
summary: Return event for given eventId
description: |
Gets information about the retention event with id **eventId**.
operationId: getEvent
produces:
- application/json
parameters:
- $ref: '#/parameters/eventIdParam'
responses:
'200':
description: Successful response
schema:
$ref: '#/definitions/EventEntry'
'400':
description: |
Invalid parameter: **eventId** is invalid
'401':
description: Authentication failed
'404':
description: "**eventId** does not exist"
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
put:
tags:
- events
summary: Update event for given eventId
operationId: updateEvent
description: |
Updates retention event with id **eventId**.
produces:
- application/json
parameters:
- $ref: '#/parameters/eventIdParam'
- in: body
name: eventBodyUpdate
description: The event information to update.
required: true
schema:
$ref: '#/definitions/EventBody'
responses:
'200':
description: Successful response
schema:
$ref: '#/definitions/EventEntry'
'400':
description: |
Invalid parameter: The update request is invalid or **eventId** is not a valid format or **eventBodyUpdate** is invalid
'401':
description: Authentication failed
'403':
description: Current user does not have permission to update events
'404':
description: "**eventId** does not exist"
'409':
description: Cannot update event. An event with the name **name** already exists
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
'/event-types':
get:
tags:
- events
summary: List all the retention event types
description: |
Gets a list of all the retention event types.
operationId: getAllEventTypes
produces:
- application/json
parameters:
- $ref: '#/parameters/skipCountParam'
- $ref: '#/parameters/maxItemsParam'
responses:
'200':
description: Successful response
schema:
$ref: '#/definitions/EventTypePaging'
'400':
description: |
Invalid parameter: value of **maxItems** or **skipCount** is invalid
'401':
description: Authentication failed
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
parameters:
## event
eventIdParam:
name: eventId
in: path
description: The identifier of an event.
required: true
type: string
## File plans
filePlanEntryIncludeParam:
name: include
@@ -3760,3 +3928,91 @@ definitions:
- SiteCollaborator
- SiteContributor
- SiteManager
EventPaging:
type: object
properties:
list:
type: object
properties:
pagination:
$ref: '#/definitions/Pagination'
entries:
type: array
items:
$ref: '#/definitions/EventEntry'
EventEntry:
type: object
required:
- entry
properties:
entry:
$ref: '#/definitions/Event'
Event:
type: object
required:
- id
- name
- type
properties:
id:
type: string
description: this is the id of the event
name:
type: string
description: This is the unique display label of the event
type:
type: string
description: this is event type
EventBody:
type: object
required:
- name
properties:
name:
type: string
description: This is the unique display label of the event
type:
type: string
description: this is event type
default: Simple
EventTypePaging:
type: object
properties:
list:
type: object
properties:
pagination:
$ref: '#/definitions/Pagination'
entries:
type: array
items:
$ref: '#/definitions/EventTypeEntry'
EventTypeEntry:
type: object
required:
- entry
properties:
entry:
$ref: '#/definitions/EventType'
EventType:
type: object
required:
- id
- name
properties:
id:
type: string
description: this is the event type id
name:
type: string
description: this is event type name
isAutomatic:
type: boolean
description: Whether events of this type need completing manually or can be completed automatically
default: true
associationName:
type: string
description: The association used to determine whether automatic events of this type are complete
actionOnAssociatedNode:
type: string
description: If an association name is set for this event type then it is possible to require an action to be completed on the associated node

View File

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

View File

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

View File

@@ -14,7 +14,7 @@ function main()
maxResults: (args.maxResults !== null) ? parseInt(args.maxResults, 10) : DEFAULT_MAX_RESULTS,
pageSize: (args.pageSize !== null) ? parseInt(args.pageSize, 10) : DEFAULT_PAGE_SIZE,
startIndex: (args.startIndex !== null) ? parseInt(args.startIndex, 10) : 0,
facetFields: args.facetFields,
facetFields: args.facetFields !== null ? args.facetFields.replace( /(<([^>]+)>)/ig, '') : null,
filters: args.filters,
encodedFilters: args.encodedFilters,
spell: (args.spellcheck !== null) ? (args.spellcheck == "true") : false

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>17.109</version>
<version>20.36-SNAPSHOT</version>
</parent>
<dependencies>
@@ -54,9 +54,14 @@
<classifier>asl</classifier>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<version>1.2.18.3</version>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${dependency.log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${dependency.log4j.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
@@ -113,8 +118,8 @@
<!-- Test only dependencies, as popped up while running mvn test -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@@ -25,6 +25,9 @@ package org.alfresco.error;
*/
public class ExceptionStackUtil
{
private static final String JAVASCRIPT_EXCEPTION = "org.mozilla.javascript.JavaScriptException";
private static final String EXCEPTION_DELIMITER = ":";
/**
* Searches through the exception stack of the given throwable to find any instance
* of the possible cause. The top-level throwable will also be tested.
@@ -38,10 +41,17 @@ public class ExceptionStackUtil
{
while (throwable != null)
{
Class<?> throwableClass = throwable.getClass();
boolean isJavaScriptException = throwableClass.getName().contains(JAVASCRIPT_EXCEPTION);
String throwableMsg = throwable.getMessage() != null ? throwable.getMessage() : "";
for (Class<?> possibleCauseClass : possibleCauses)
{
Class<?> throwableClass = throwable.getClass();
if (possibleCauseClass.isAssignableFrom(throwableClass))
String possibleCauseClassName = possibleCauseClass.getName();
if (possibleCauseClass.isAssignableFrom(throwableClass)
|| (isJavaScriptException && throwableMsg.contains(possibleCauseClassName + EXCEPTION_DELIMITER)))
{
// We have a match
return throwable;

View File

@@ -21,6 +21,7 @@ package org.alfresco.httpclient;
import java.io.IOException;
import java.util.Map;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HostConfiguration;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
@@ -57,7 +58,12 @@ public class RequestHeadersHttpClient extends HttpClient
if (defaultHeaders != null)
{
defaultHeaders.forEach((k,v) -> {
method.addRequestHeader(k, v);
Header h = method.getRequestHeader(k);
boolean add = h == null || h.getValue() == null || !h.getValue().equals(v);
if (add)
{
method.addRequestHeader(k, v);
}
});
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
* Copyright (C) 2005-2022 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -23,7 +23,7 @@ import org.apache.commons.logging.LogFactory;
/**
* A stand in for the org.apache.log4j.NDC class that avoids introducing runtime dependencies against the otherwise
* A stand in for the org.apache.logging.log4j.ThreadContext class that avoids introducing runtime dependencies against the otherwise
* optional log4j.
*
* @author dward
@@ -32,7 +32,7 @@ public class NDC
{
private static Log logger = LogFactory.getLog(NDC.class);
/** Log4J delegate for NDC */
/** Log4J2 delegate for NDC */
private static NDCDelegate ndcDelegate;
static

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
* Copyright (C) 2005-2022 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -25,19 +25,19 @@
package org.alfresco.util.log.log4j;
import org.alfresco.util.log.NDCDelegate;
import org.apache.log4j.NDC;
import org.apache.logging.log4j.ThreadContext;
/**
* A stand in for the org.apache.log4j.NDC class that avoids introducing runtime dependencies against the otherwise
* A stand in for the org.apache.logging.log4j.ThreadContext class that avoids introducing runtime dependencies against the otherwise
* optional log4j.
*
* @author dward
*/
public class Log4JNDC implements NDCDelegate
{
// Force resolution of the log4j NDC class by the classloader (thus forcing an error if unavailable)
// Force resolution of the log4j2 ThreadContext class by the classloader (thus forcing an error if unavailable)
@SuppressWarnings("unused")
private static final Class<?> NDC_REF = NDC.class;
private static final Class<?> NDC_REF = ThreadContext.class;
/**
* Push new diagnostic context information for the current thread.
@@ -47,7 +47,7 @@ public class Log4JNDC implements NDCDelegate
*/
public void push(String message)
{
NDC.push(message);
ThreadContext.push(message);
}
/**
@@ -55,6 +55,6 @@ public class Log4JNDC implements NDCDelegate
*/
public void remove()
{
NDC.remove();
ThreadContext.clearAll();
}
}

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>17.109</version>
<version>20.36-SNAPSHOT</version>
</parent>
<properties>
@@ -134,7 +134,7 @@
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>6.3.0</version>
<version>6.4.0</version>
</dependency>
<!-- the cxf libs were updated, see dependencyManagement section -->

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
# Fetch image based on Tomcat 9.0, Java 17 and Rocky Linux 8
# More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat
FROM alfresco/alfresco-base-tomcat:tomcat9-jre17-rockylinux8-202205140719
FROM alfresco/alfresco-base-tomcat:tomcat9-jre17-rockylinux8-202209261711
# Set default docker_context.
ARG resource_path=target
@@ -42,10 +42,6 @@ RUN sed -i "s/shared.loader=/shared.loader=\${catalina.base}\/shared\/classes/"
RUN mkdir -p ${TOMCAT_DIR}/amps
#RUN echo -e '\n\
#log4j.logger.org.alfresco.repo.content.transform.TransformerDebug=debug\n\
#' >> ${TOMCAT_DIR}/shared/classes/alfresco/extension/custom-log4j.propertiesRUN mkdir -p ${TOMCAT_DIR}/amps
# Copy the amps from build context to the appropriate location for your application server
COPY ${resource_path}/amps ${TOMCAT_DIR}/amps
@@ -55,13 +51,14 @@ RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar install \
${TOMCAT_DIR}/webapps/alfresco -directory -nobackup
# Move the log file
RUN sed -i -e "s_log4j.appender.File.File\=alfresco.log_log4j.appender.File.File\=${TOMCAT_DIR}/logs\/alfresco.log_" \
${TOMCAT_DIR}/webapps/alfresco/WEB-INF/classes/log4j.properties && \
RUN sed -i -e "s_appender.rolling.fileName\=alfresco.log_appender.rolling.fileName\=${TOMCAT_DIR}/logs\/alfresco.log_" \
${TOMCAT_DIR}/webapps/alfresco/WEB-INF/classes/log4j2.properties && \
sed -i -e "s_appender.rolling.filePattern=alfresco.log.%d{yyyy-MM-dd}_appender.rolling.filePattern\=${TOMCAT_DIR}/logs\/alfresco.log.%d{yyyy-MM-dd}_" \
${TOMCAT_DIR}/webapps/alfresco/WEB-INF/classes/log4j2.properties && \
# Add catalina.policy to ROOT.war and alfresco.war
# Grant all security permissions to alfresco webapp because of numerous permissions required in order to work properly.
# Grant only deployXmlPermission to ROOT webapp.
sed -i -e "\$a\grant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/alfresco\/-\" \{\n\ permission\ java.security.AllPermission\;\n\};\ngrant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/ROOT\/-\" \{\n\ permission org.apache.catalina.security.DeployXmlPermission \"ROOT\";\n\};" ${TOMCAT_DIR}/conf/catalina.policy
sed -i -e "\$a\grant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/alfresco\/-\" \{\n\ permission\ java.security.AllPermission\;\n\};\ngrant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/_vti_bin\/-\" \{\n\ permission\ java.security.AllPermission\;\n\};\ngrant\ codeBase\ \"file:\$\{catalina.base\}\/webapps\/ROOT\/-\" \{\n\ permission org.apache.catalina.security.DeployXmlPermission \"ROOT\";\n\};" ${TOMCAT_DIR}/conf/catalina.policy
# fontconfig is required by Activiti worflow diagram generator
# installing pinned dependencies as well

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>17.109</version>
<version>20.36-SNAPSHOT</version>
</parent>
<properties>
@@ -78,7 +78,6 @@
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-amps</id>
<phase>process-resources</phase>

View File

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

View File

@@ -1,3 +1,3 @@
SOLR6_TAG=2.0.3
SOLR6_TAG=2.0.6-A4
POSTGRES_TAG=14.4
ACTIVEMQ_TAG=5.17.1-jre11-rockylinux8

View File

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

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
TAS_DIRECTORY=$1
cd ${TAS_DIRECTORY}
failures=$(grep 'status="FAIL"' target/surefire-reports/testng-results.xml | sed 's|^.*[ ]name="\([^"]*\)".*$|\1|g')
for failure in ${failures}
do
cat target/reports/alfresco-tas.log | sed '/STARTING Test: \['${failure}'\]/,/ENDING Test: \['${failure}'\]/!d;/ENDING Test: \['${failure}'\]/q'
done

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
TAS_DIRECTORY=$1
cd ${TAS_DIRECTORY}
cat target/reports/alfresco-tas.log | grep "*** STARTING"

View File

@@ -1,9 +1,21 @@
#!/usr/bin/env bash
set -x
export DOCKER_COMPOSE_PATH=$1
export CLEAN_UP="$2"
export DOCKER_COMPOSES=""
export CLEAN_UP=""
if [ -z "$DOCKER_COMPOSE_PATH" ]
for var in "$@"
do
if [ "$var" == "no-clean-up" ]
then
export CLEAN_UP="$var"
else
export DOCKER_COMPOSES+="--file $var "
fi
done
if [ -z "$DOCKER_COMPOSES" ]
then
echo "Please provide path to docker-compose.yml: \"${0##*/} /path/to/docker-compose.yml\""
exit 1
@@ -15,8 +27,8 @@ fi
# The second parameter can be used to avoid doing a clean up if we are doing a restart test.
if [ "$CLEAN_UP" != "no-clean-up" ]
then
docker-compose --file "${DOCKER_COMPOSE_PATH}" kill
docker-compose --file "${DOCKER_COMPOSE_PATH}" rm -f
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") kill
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") rm -f
export GENERATED_IMAGES=$(docker images | grep '^environment_' | awk '{ print $3 }')
if [ -n "$GENERATED_IMAGES" ]
@@ -31,7 +43,7 @@ export TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-tra
export TRANSFORM_ROUTER_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-service.version -q -DforceStdout)
# .env files are picked up from project directory correctly on docker-compose 1.23.0+
docker-compose --file "${DOCKER_COMPOSE_PATH}" --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
if [ $? -eq 0 ]
then

View File

@@ -0,0 +1,495 @@
![in progress](https://img.shields.io/badge/Document_Level-In_Progress-yellow.svg?style=flat-square)
:paw_prints: Back to [TAS Master Documentation](https://gitlab.alfresco.com/tas/documentation/wikis/home)
---
## Table of Contents
* [Synopsis](#synopsis)
* [Prerequisite](#prerequisite)
* [Installation](#installation-if-you-want-to-contribute)
* [Package Presentation](#package-presentation)
* [Sample Usage](#sample-usage)
* [How to write a test](#how-to-write-a-test)
* [How to run tests?](#how-to-run-tests)
* [from IDE](#from-ide)
* [from command line](#from-command-line)
* [Perform CMIS Queries](#perform-cmis-queries)
* [Listeners](#listeners)
* [Test Results](#test-results)
* [Test Rail Integration](#test-rail-integration)
* [Configuration](#configuration)
* [How to enable Test Rail Integration?](#how-to-enable-test-rail-integration)
* [Change Log](docs/CHANGELOG.md) :glowing_star:
* [Reference](#reference)
* [Releasing](#releasing)
* [Contributors](#contributors)
* [License](#license)
## Synopsis
**TAS**( **T**est **A**utomation **S**ystem)- **CMIS** is the project that handles the automated tests related only to CMIS API integrated with Alfresco One [Alfresco CMIS API](http://docs.alfresco.com/5.1/pra/1/topics/cmis-welcome.html).
It is based on Apache Maven, compatible with major IDEs and is using also Spring capabilities for dependency injection.
As a high level overview, this project makes use of the following functionality useful in automation testing as:
* reading/defining test environment settings (e.g. alfresco server details, authentication, etc.)
* managing resource (i.e. creating files and folders)
* test data generators (for site, users, content, etc)
* helpers (i.e. randomizers, test environment information)
* test logging generated on runtime and test reporting capabilities
* test management tool integration (at this point we support integration with [Test Rail](https://alfresco.testrail.net) (v5.2.1)
* health checks (verify if server is reachable, if server is online)
* generic Internal-DSL (Domain Specific Language)
Using Nexus -Release Repository, everyone will be able to use individual interfaces in their projects by extending the automation core functionalities.
**[Back to Top ^](#table-of-contents)**
## Prerequisite
(tested on unix/non-unix distribution)
* [Java SE 1.8](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
* [Maven 3.3](https://maven.apache.org/download.cgi) installed and configure according to [Windows OS](https://maven.apache.org/guides/getting-started/windows-prerequisites.html) or [Mac OS](https://maven.apache.org/install.html).
* Configure Maven to use Alfresco alfresco-internal repository following this [Guide](https://ts.alfresco.com/share/page/site/eng/wiki-page?title=Maven_Setup).
* Your favorite IDE as [Eclipse](https://eclipse.org/downloads/) or [IntelliJ](https://www.jetbrains.com/idea).
* Access to [Nexus](https://nexus.alfresco.com/nexus/) repository.
* Access to GitLab [TAS](https://gitlab.alfresco.com/tas/) repository.
* GitLab client for your operating system. (we recommend [SourceTree](https://www.sourcetreeapp.com) - use your google account for initial setup).
* Getting familiar with [Basic Git Commands](http://docs.gitlab.com/ee/gitlab-basics/basic-git-commands.html).
* Getting familiar with [Maven](https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html).
* Getting familiar with [Spring](http://docs.spring.io).
* Getting familiar with [TestNG](http://testng.org/doc/index.html)
**[Back to Top ^](#table-of-contents)**
## Installation (if you want to contribute)
* Open your GitLab client and clone the repository of this project.
* You can do this also from command line (or in your terminal) adding:
```bash
$ git clone https://gitlab.alfresco.com/tas/alfresco-tas-cmis-test.git
# this clone will have the latest changes from repository. If you want to checkout a specific version released, take a look at the [Change Log](docs/CHANGELOG.md) page
$ cd alfresco-tas-cmis-test
# this command will checkout the remove v1.0.0 tagged repository and create locally a new branch v1.0.0
$ git checkout tags/v1.0.0 -b v1.0.0
```
* Install and check if all dependencies are downloaded
```bash
$ mvn clean install -DskipTests
# you should see one [INFO] BUILD SUCCESS message displayed
```
**[Back to Top ^](#table-of-contents)**
## Package Presentation
The project uses a maven layout [archetype](https://maven.apache.org/plugins-archives/maven-archetype-plugin-1.0-alpha-7/examples/simple.html):
```ruby
├── pom.xml
├── src
   ├── main
      └── java
      └── org
      └── alfresco
      └── cmis
      ├── (...)
      ├── CmisProperties.java #handles all properties from default.properties
      ├── CmisWrapper.java #wrapper around CMIS API
      └── exception
      └── (...)
   ├── test
      ├── java
         └── org
         └── alfresco
         └── cmis
         ├── CmisDemoTests.java #demo example
         └── CmisTest.java #abstract base class that should be inherited by all tests
      └── resources
      ├── alfresco-cmis-context.xml #spring configuration
      ├── default.properties #all settings related to environment, protocol
      ├── log4j.properties
      └── sanity-cmis.xml # default suite of tests
```
**[Back to Top ^](#table-of-contents)**
## Sample Usage
Following the standard layout for Maven projects, the application sources locate in src/main/java and test sources locate in src/test/java.
Application sources consist in defining the CMIS object that simulates the API calls.
The tests are based on an abstract object: CmisTest.java that handles the common behavior: checking the health status of the test server, configuration settings, getting the general properties, etc.
Please take a look at [CmisDemoTests.java](src/test/java/org/alfresco/cmis/CmisDemoTests.java) class for an example.
Common configuration settings required for this project are stored in properties file, see [default.properties](src/test/resources/default.properties).
Please analyze and update it accordingly with Alfresco test server IP, port, credentials, etc.
Example:
```java
# Alfresco HTTP Server Settings
alfresco.scheme=http
alfresco.server=<add-here-the-ip-of-your-test-server>
alfresco.port=<default-port-for-alfresco-not-share>
```
* optional update the logging level in [log4j](src/test/resources/log4j.properties) file (you can increase/decrease the deails of the [logging file](https://logging.apache.org/log4j/1.2/manual.html), setting the ```log4j.rootLogger=DEBUG``` if you want.)
* go to [running](#how-to-run-tests) section for more information on how to run this tests.
**[Back to Top ^](#table-of-contents)**
### How to write a test
* Tests are organized in java classes and located on src/test/java as per maven layout.
* One test class should contain the tests that cover one functionality as we want to have a clear separation of test scope: tests for sanity/core/full, tests that verify manage of folder/files etc.
* These are the conventions that need to follow when you write a test:
* The test class has @Test annotation with the group defined: protocols, cmis. You can add more groups like sanity, regression
```java
@Test(groups={ "sanity"}
```
* The test has @TestRail annotation in order to assure that the details and results will be submitted on TestRail. The fields for TestRail annotation will be explained on next chapter.
```java
@TestRail(section = { "cmis-api" }, executionType=ExecutionType.SANITY,
description = "Verify admin user creates folder in DocumentLibrary with CMIS")
public void adminShouldCreateFolderInSite() throws Exception
{ cmisApi.usingSite(testSite).createFolder(testFolder).assertExistsInRepo(); }
```
* Use Spring capabilities to initialize the objects(Models, Wrappers) with @Autowired
* We followed Builder pattern to develop specific DSL for simple and clear usage of protocol client in test:
```java
cmisApi.usingSite(testSite) .createFolder(testFolder) .assertExistsInRepo();
```
* To view a simple class that is using this utility, just browse on [CmisDemoTests.java](src/test/java/org/alfresco/cmis/CmisDemoTests.java)
Notice the class definition and inheritance value:
```java
public class CmisDemoTests extends CmisTest
```
* as a convention, before running your test, check if the test environment is reachable and your alfresco test server is online.
(this will stop the test if the server defined in your property file is not healthy - method available in parent class)
```java
@BeforeClass(alwaysRun = true)
public void setupCmisTest() throws Exception {
serverHealth.assertServerIsOnline();
}
```
* the test name are self explanatory:
```java
@TestRail(section = { "cmis-api" }, executionType=ExecutionType.SANITY, description = "Verify admin user creates folder in DocumentLibrary with CMIS")
public void adminShouldCreateFolderInSite() throws Exception
{
cmisApi.usingSite(testSite)
.createFolder(testFolder)
.assertExistsInRepo();
}
```
```java
@TestRail(section = { "cmis-api" }, executionType=ExecutionType.SANITY, description = "Verify admin user creates and renames folder in DocumentLibrary with CMIS")
public void adminShouldRenameFolderInSite() throws Exception
{
cmisApi.usingSite(testSite).createFolder(testFolder)
.and().rename("renamed")
.assertExistsInRepo();
}
```
**[Back to Top ^](#table-of-contents)**
### How to run tests
#### from IDE
* The project can be imported into a development environment tool (Eclipse or IntelliJ). You have the possibility to execute tests or suite of tests using [TestNG plugin](http://testng.org/doc/eclipse.html) previously installed in IDE.
From Eclipse, just right click on the testNG class (something similar to [CmisDemoTests.java](src/test/java/org/alfresco/cmis/CmisDemoTests.java)), select Run As - TestNG Test
You should see your test passed.
* In case you are using the default settings that points to localhost (127.0.0.1) and you don't have Alfresco installed on your machine, you will see one exception thrown (as expected):
```java
org.alfresco.utility.exception.ServerUnreachableException: Server {127.0.0.1} is unreachable.
```
#### from command line
* In terminal or CMD, navigate (with CD) to root folder of your project (you can use the sample project):
The tests can be executed on command line/terminal using Maven command
```bash
mvn test
```
This command with trigger the tests specified in the default testNG suite from POM file: <suiteXmlFile>src/main/resources/shared-resources/cmis-suites.xml</suiteXmlFile>
You can use -Dtest parameter to run the test/suites through command line (http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html).
You can also specify a different suiteXMLFile like:
```bash
mvn test -DsuiteXmlFile=src/resources/your-custom-suite.xml
```
Or even a single test:
```bash
mvn test -Dtest=org.alfresco.cmis.CmisDemoTests
```
But pay attention that you will not have enabled all the [listeners](#listeners) in this case (the Reporting listener or TestRail integration one)
### Perform CMIS Queries
(:glowing_star: please notice that at this point we assert only the results count returned by the query: we plan to extend the functionality to assert on QueryResult iterable objects also: simple modification on [QueryExecutor.java](src/main/java/org/alfresco/cmis/dsl/QueryExecutor.java)
There are a couple of ways to test the results count after performing CMIS queries, choose the one that you like the most:
a) direct queries using a simple TestNG test:
(see example [here](src/test/java/org/alfresco/cmis/search/SorlSearchSimpleQueryTests.java))
```java
public class SorlSearchSimpleQueryTests extends CmisTest
{
@Test
public void simpleQueryOnFolderDesc() throws Exception
{
// create here multiple folder as data preparation
cmisApi.authenticateUser(dataUser.getAdminUser())
.withQuery("SELECT * FROM cmis:folder ORDER BY cmis:createdBy DESC").assertResultsCount().isLowerThan(101);
}
}
```
- just extend CmisTest
- authenticate with your UserModel and perform the query. The DSL will allow you to assert the result count if is equal, lower or greater than to a particular value. You can update the methods in [QueryResultAssertion](src/main/java/org/alfresco/cmis/dsl/QueryExecutor.java) class.
b) define one set of test data (folders, files, etc. ) that you will search in all tests then execute all CMIS queris from one common XML file
- see test class [SolrSearchInFolderTests](src/test/java/org/alfresco/cmis/search/SolrSearchInFolderTests.java)
- see [XML test data](src/main/resources/shared-resources/testdata/search-in-folder.xml) used in [SolrSearchInFolderTests](src/test/java/org/alfresco/cmis/search/SolrSearchInFolderTests.java) into one DataProvider. Notice that XML file has two parameter: the query that will be executed and the expected result count returned.
c) define test data (user, sites, folder, files, aspects, comments, custom models, etc) all into one XML file with all cmis queries related.
- see example on [SolrSearchByIdTests](https://gitlab.alfresco.com/tas/alfresco-tas-cmis-test/blob/master/src/test/java/org/alfresco/cmis/search/SolrSearchByIdTests.java)
- notice the 'NODE_REF[x]'; 'NODE_REF[y]' keywords that will dynamically take the test data identified by id: x, y (you will figure it out based on examples).
**Info**: all search test queries are found [org.alfresco.cmis.search](src/test/java/org/alfresco/cmis/search) package.
**[Back to Top ^](#table-of-contents)**
## Listeners
With the help of Listeners we can modify the behaviour of TestNG framework. There are a lot of testNG listener interfaces that we can override in order to provide new functionalities.
The tas framework provides out of the box a couple of listeners that you could use. These could be enabled and added at the class level or suite level.
### a) org.alfresco.utility.report.ReportListenerAdapter
* if added at the class level:
```java
@Listeners(value=ReportListenerAdapter.class)
public class MyTestClass extends CmisTest
{
(...)
}
```
* or suite xml level
```java
<suite name="Your Suite test" parallel="classes">
<listeners>
<listener class-name="org.alfresco.utility.report.ReportListenerAdapter"></listener>
</listeners>
(...)
</suite>
```
It will automatically generate one html named "report.html" in ./target/report folder.
Please also take a look at [Test Results](#test-results) section.
### b) org.alfresco.utility.testrail.TestRailExecutorListener
It will automatically update Test Rail application with the test cases that you've automated.
Please take a look at [Test Rail Integration](#test-rail-integration) section for more details.
### c) org.alfresco.utility.report.log.LogsListener
This is a new listener that will generate further details in one XML format of the automated test steps that you will write.
Example:
```java
public void myDSLMethod1()
{
STEP("Lorem ipsum dolor sit amet");
//code for first step
STEP("consectetur adipiscing elit");
//code for the next description
}
public void myDSLMethod2()
{
STEP("sed do eiusmod tempor incididunt ut labore");
//code for first step
STEP("et dolore magna aliqua");
//code for the next description
}
```
If these methods will be executed insite a test method, all those steps will be automatically logged in the XML report generated.
Example:
```java
@Test
public void adminShouldCreateFileInSite()
{
myDSLMethod1();
myDSLMethod2()
}
```
So if "testingSomething" will be executed this is what you will see on the XML file generated. (please take a look at [Test Results](#test-results) section for defining the defaul location)
Here is one example of XML file generated with these steps:
![](docs/pics/xml-steps-report.JPG)
**[Back to Top ^](#table-of-contents)**
## Test Results
We already executed a couple of tests using command line as indicated above. Sweet! Please take a look at [sanity-cmis.xml](src/test/resources/sanity-cmis.xml) one more time.
You will see there that we have one listener added:
```java
<listener class-name="org.alfresco.utility.report.ReportListenerAdapter"></listener>
```
This will tell our framework, after we run all tests, to generate one HTML report file with graphs and metrics.
Take a look at the target/reports folder (created after running the tests) and open the report.html file.
![](docs/pics/html-report-sample.JPG)
Playing with this report, you will notice that you will be able to:
* search tests cases by name
* filter test cases by errors, labels, groups, test types, date when it was executed, protocol used, etc.
* view overall pass/fail metrics of current test suite, history of tests execution, etc.
The report path can be configured in default.properties):
```
# The location of the reports path
reports.path=your-new-location-of-reports
```
**[Back to Top ^](#table-of-contents)**
## Test Rail Integration
Alfresco is using now https://alfresco.testrail.net (v5.3.0.3601).
We aim to accelerate the delivery of automated test by minimizing the interaction with the test management tool - TestRail. In this scope we developed the following capabilities:
* creating automatically the manual tests in TestRail
* submitting the test results (with stack trace) after each execution into TestRail Test Runs
* adding the test steps for each test.
### Configuration
In order to use Test Rail Integration you will need to add a couple of information in [default.properties](src/test/resources/default.properties) file:
(the document is pretty self explanatory)
```java
# Example of configuration:
# ------------------------------------------------------
# testManagement.endPoint=https://alfresco.testrail.com/
# testManagement.username=<yourusername-that-you-connect-to-testrail>
# testManagement.apiKey=<api-key>
# testManagement.project=<id-of-your-project
# testManagement.testRun=<test-run-name>
```
!This settings are already defined in default.properties for you.
For generating a new API Key take a look at the official documentation, TestRail [APIv2](http://docs.gurock.com/testrail-api2)
* _testManagement.project= **<id-of-your-project**_ this is the ID of the project where you want to store your test cases.
If you want to use [Alfresco ONE](https://alfresco.testrail.net/index.php?/projects/overview/1) project in TestRail, open that project and notice the URL, after "/overview/**1**" link you will see the ID of the project (1 in this case)
If you want to use [TAS Project](https://alfresco.testrail.net/index.php?/projects/overview/7) you will notice the ID 7, so _"testManagement.project=7"_
* "_testManagement.testRun=<test-run-name>_" this represents the name of the Test Run from your project.
* In Test Rail, navigating to Test Runs & Results, create a new Test Run and include all/particular test cases. If this test run name is "Automation", update _testManagement.testRun= **Automation**_.
All test results will be updated only on this test run at runtime as each test is executed by TAS framework.
### How to enable Test Rail Integration?
We wanted to simplify the Test Rail integration, so we used listeners in order to enable/disable the integration of Test Rail.
* first configure your default.properties as indicated above
* now on your TestNG test, add the @TestRail annotation, so let's say you will have this test:
```java
@Test(groups="sample-tests")
public void thisAutomatedTestWillBePublishedInTestRail()
{
}
```
add now @TestRail integration with mandatory field ```section```. This means that this tests annotated, will be uploaded in TestRail:
```java
@Test(groups="sample-tests")
@TestRail(section = { "protocols", "TBD" })
public void thisAutomatedTestWillBePublishedInTestRail()
{
}
```
The section field, represents an array of strings, the hierarchy of sections that SHOULD be found on TestRail under the project you've selected in default.properties. Follow the TestRail [user-guide](http://docs.gurock.com/testrail-userguide/start) for more information regarding sections.
In our example we created in Test Rail one root section "protocols" with a child section: "TBD" (you can go further and add multiple section as you wish)
* now, lets add the listener, the TestRailExecutorListener that will handle this TC Management interaction.
This listener can be added at the class level or suite level (approach that we embrace)
Take a look at [sanity-cmis.xml](src/test/resources/sanity-cmis.xml) for further example.
```xml
<listeners>
<listener class-name="org.alfresco.utility.testrail.TestRailExecutorListener"></listener>
(...)
</listeners>
```
Right click on cmis-suites.xml file and run it, or just "mvn test" from root if this sample project.
After everything passes, go in Test Rail, open your project and navigate to "Test Cases" section. Notice that under protocols/TBD section, you will see your test case published.
If you defined also the "testManagement.testRun" correctly, you will see under Test Runs, the status of this case marked as passed.
The @TestRail annotation offers also other options like:
- "description" this is the description that will be updated in Test Rail for your test case
- "testType", the default value is set to Functional test
- "executionType", default value is set to ExecutionType.REGRESSION, but you can also use ExecutionType.SMOKE, ExecutionType.SANITY, etc
Take a look at the demo scenarios in this project for further examples.
**[Back to Top ^](#table-of-contents)**
## Reference
* For any improvements, bugs, please use Jira - [TAS](https://issues.alfresco.com/jira/browse/TAS) project.
* Setup the environment using [docker](https://gitlab.alfresco.com/tas/alfresco-docker-provisioning/blob/master/Readme.md).
* [Bamboo Test Plan](https://bamboo.alfresco.com/bamboo/browse/TAS-CMIS)
## Contributors
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other... [more](CODE_OF_CONDUCT.md)
## Releasing
Any commit done on this project should be automatically executed by [TAS Build Plan](https://bamboo.alfresco.com/bamboo/browse/TAS-TAS)
If the build passes, then you didn't broke anything.
If you want to perform a release, open [TAS-CMIS](https://bamboo.alfresco.com/bamboo/browse/TAS-CMIS) Bamboo Build.
Run the Default stage and if it passes, then manually perform the Release stage (this will auto-increment the version in pom.xml)
## License
TBD

View File

@@ -0,0 +1,20 @@
:paw_prints: Back to Utility [README](README.md).
---
# Change Log
All notable changes to this project will be documented in this file.
Each tag bellow has a corresponded version released in [Nexus](https://nexus.alfresco.com/nexus/#welcome).
Currently we are testing [CMIS v1.1](http://docs.oasis-open.org/cmis/CMIS/v1.1/CMIS-v1.1.html) with Alfresco One.
(if you need to update/polish tests please branch from the release tags)
## [[v5.2.0-1] - 2016-12-12](/tas/alfresco-tas-cmis-test/commits/v5.2.0-1)
### TBD
## [[v5.2.0-0] - 2016-12-12](/tas/alfresco-tas-cmis-test/commits/v5.2.0-0)
- works with 5.2 alfresco
- 100% Core tests for CMIS
- 100% Sanity test for CMIS
- use released v1.0.7 utility

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.alfresco.tas</groupId>
<artifactId>alfresco-community-repo-cmis-test</artifactId>
<name>cmis test</name>
<packaging>jar</packaging>
<artifactId>cmis</artifactId>
<name>alfresco-tas-cmis</name>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>17.109</version>
<version>20.36-SNAPSHOT</version>
</parent>
<developers>
<developer>
<name>Paul Brodner</name>
<roles>
<role>Test Automation Architect</role>
</roles>
</developer>
</developers>
<organization>
<name>Alfresco Software</name>
<url>http://www.alfresco.com/</url>
</organization>
<properties>
<maven.build.sourceVersion>11</maven.build.sourceVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<chemistry-opencmis-commons-api>1.1.0</chemistry-opencmis-commons-api>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<maven-release.version>2.5.3</maven-release.version>
<java.version>11</java.version>
<suiteXmlFile>${project.basedir}/src/test/resources/cmis-suite.xml</suiteXmlFile>
<cmis.binding />
<cmis.basePath />
@@ -58,10 +58,29 @@
</profiles>
<dependencies>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>4.7.1.Final</version>
</dependency>
<!-- alfresco tester settings -->
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>cmis</artifactId>
<scope>test</scope>
<artifactId>utility</artifactId>
<exclusions>
<exclusion>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- open cmis settings -->
<dependency>
<groupId>org.apache.chemistry.opencmis</groupId>
<artifactId>chemistry-opencmis-commons-api</artifactId>
<version>${chemistry-opencmis-commons-api}</version>
</dependency>
</dependencies>

View File

@@ -0,0 +1,130 @@
package org.alfresco.cmis;
import org.alfresco.utility.data.AisToken;
import org.alfresco.utility.data.auth.DataAIS;
import org.alfresco.utility.model.UserModel;
import org.apache.chemistry.opencmis.commons.SessionParameter;
import org.keycloak.authorization.client.util.HttpResponseException;
import org.keycloak.representations.AccessTokenResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
import static org.alfresco.utility.report.log.Step.STEP;
@Service
public class AuthParameterProviderFactory
{
public static String STEP_PREFIX = "CMIS AuthParameterProvider:";
@Autowired
private DataAIS dataAIS;
@Autowired
private CmisProperties cmisProperties;
/**
*
* The default provider uses AIS if support for Alfresco Identity Service is enabled.
* Otherwise a provider which uses Basic authentication is returned.
*
* @return Function which takes a {@link UserModel} and returns a map of
* authentication parameters to be used with {@link CmisWrapper#authenticateUser(UserModel, Function)}
*/
public Function<UserModel, Map<String, String>> getDefaultProvider()
{
if (dataAIS.isEnabled())
{
STEP(String.format("%s Retrieved default AIS auth parameter provider.", STEP_PREFIX));
return new AisAuthParameterProvider();
}
else
{
STEP(String.format("%s Retrieved default Basic auth parameter provider.", STEP_PREFIX));
return new BasicAuthParameterProvider();
}
}
public Function<UserModel, Map<String, String>> getAISProvider()
{
return new AisAuthParameterProvider();
}
public Function<UserModel, Map<String, String>> getBasicProvider()
{
return new BasicAuthParameterProvider();
}
private class BasicAuthParameterProvider implements Function<UserModel, Map<String, String>>
{
@Override
public Map<String, String> apply(UserModel userModel)
{
STEP(String.format("%s Using Basic auth parameter provider.", STEP_PREFIX));
Map<String, String> parameters = new HashMap<>();
parameters.put(SessionParameter.USER, userModel.getUsername());
parameters.put(SessionParameter.PASSWORD, userModel.getPassword());
return parameters;
}
}
private class AisAuthParameterProvider implements Function<UserModel, Map<String, String>>
{
@Override
public Map<String, String> apply(UserModel userModel)
{
Map<String, String> parameters = new HashMap<>();
STEP(String.format("%s Using AIS auth parameter provider.", STEP_PREFIX));
AisToken aisToken = getAisAccessToken(userModel);
parameters.put(SessionParameter.AUTHENTICATION_PROVIDER_CLASS, "org.apache.chemistry.opencmis.client.bindings.spi.OAuthAuthenticationProvider");
parameters.put(SessionParameter.OAUTH_ACCESS_TOKEN, aisToken.getToken());
parameters.put(SessionParameter.OAUTH_REFRESH_TOKEN, aisToken.getRefreshToken());
parameters.put(SessionParameter.OAUTH_EXPIRATION_TIMESTAMP, String.valueOf(System.currentTimeMillis()
+ (aisToken.getExpiresIn() * 1000))); // getExpiresIn is in seconds
parameters.put(SessionParameter.OAUTH_TOKEN_ENDPOINT, cmisProperties.aisProperty().getAdapterConfig().getAuthServerUrl()
+ "/realms/alfresco/protocol/openid-connect/token");
parameters.put(SessionParameter.OAUTH_CLIENT_ID, cmisProperties.aisProperty().getAdapterConfig().getResource());
return parameters;
}
/**
* Returns a valid access token for valid user credentials in userModel.
* An invalid access token is returned for invalid user credentials,
* which can be used for tests involving non existing or unauthorized users.
* @param userModel
* @return
*/
private AisToken getAisAccessToken(UserModel userModel)
{
String badToken = "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJUazFPZ2JqVlo1UEw2bmtsNWFvTUlacTZ4cW9PZzc5WGtzdnJTTUcxLUFZIn0.eyJqdGkiOiI3NTVkMGZiOS03NzI5LTQ1NzYtYWM4Ny1hZWZjZWNiZDE0ZGEiLCJleHAiOjE1NTM2MjQ1NDgsIm5iZiI6MCwiaWF0IjoxNTUzNjI0MjQ4LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0L2F1dGgvcmVhbG1zL2FsZnJlc2NvIiwiYXVkIjoiYWNjb3VudCIsInN1YiI6Ijk4NDE0Njg4LTUwMDUtNDVmOS05YTVjLTlkMDRlODMyYTNkMiIsInR5cCI6IkJlYXJlciIsImF6cCI6ImFsZnJlc2NvIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiNjJlN2U5YzktZmFlNS00N2RhLTk5MDItMTZjYTJhZWUwMWMwIiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6WyJodHRwOi8vbG9jYWxob3N0KiIsImh0dHBzOi8vbG9jYWxob3N0KiJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoicHJvZmlsZSBlbWFpbCIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicHJlZmVycmVkX3VzZXJuYW1lIjoidXNlci12eGlrcXd3cG5jYmpzeHgifQ.PeLGCNCzj-P2m0knwUU9Vfx4dzLLQER9IdV7GyLel9LRN-3J9nh7GBDRQsyDJ0pqhObQyMg4V3wSsrsXRQ6gKhmUyDemmD-w1YMC2a2HKX6GlxsTEF_f1K_R15lIQOawNVErlWjZWORJGCvCYZOJ99SOmeOC6PGY79zLL94MMnf6dXcegePPMOKG-59eNjBkOylTipYebvM40nbbKrS5vzNHQlvUh4ALFeBoMSKGnLSjQd06Dj4SWojG0p1BrxurqDjW0zz6pQlEAm4vcWApRZ6qBLZcMH8adYix07zCDb87GOn1pmfEBWpwd3BEgC_LLu06guaCPHC9tpeIaDTHLg";
String badRefreshToken = "eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJmM2YyMjhjYS1jMzg5LTQ5MGUtOGU1Zi02YWI1MmJhZDVjZGEifQ.eyJqdGkiOiIyNmExZWNhYy00Zjk0LTQwYzctYjJjNS04NTlhZmQ3NjBiYWMiLCJleHAiOjE1NTM2MjYwNDgsIm5iZiI6MCwiaWF0IjoxNTUzNjI0MjQ4LCJpc3MiOiJodHRwOi8vbG9jYWxob3N0L2F1dGgvcmVhbG1zL2FsZnJlc2NvIiwiYXVkIjoiaHR0cDovL2xvY2FsaG9zdC9hdXRoL3JlYWxtcy9hbGZyZXNjbyIsInN1YiI6Ijk4NDE0Njg4LTUwMDUtNDVmOS05YTVjLTlkMDRlODMyYTNkMiIsInR5cCI6IlJlZnJlc2giLCJhenAiOiJhbGZyZXNjbyIsImF1dGhfdGltZSI6MCwic2Vzc2lvbl9zdGF0ZSI6IjYyZTdlOWM5LWZhZTUtNDdkYS05OTAyLTE2Y2EyYWVlMDFjMCIsInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIn0.lRBJQc7tj0rk7JBC0zpM0dDdZgDKjm9wcxP8nzLnXe4";
AisToken aisToken;
try
{
// Attempt to get an access token for userModel from AIS
aisToken = dataAIS.perform().getAccessToken(userModel);
}
catch (HttpResponseException e)
{
// Trying to authenticate with invalid user credentials so return an invalid access token
if (e.getStatusCode() == 401)
{
STEP(String.format("%s Invalid user credentials were provided %s:%s. Using invalid token for reqest.",
STEP_PREFIX, userModel.getUsername(), userModel.getPassword()));
aisToken = new AisToken(badToken, badRefreshToken, System.currentTimeMillis(), 300000);
}
else
{
throw e;
}
}
return aisToken;
}
}
}

View File

@@ -0,0 +1,64 @@
package org.alfresco.cmis;
import org.alfresco.utility.TasAisProperties;
import org.alfresco.utility.TasProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
@Configuration
@PropertySource("classpath:default.properties")
@PropertySource(value = "classpath:${environment}.properties", ignoreResourceNotFound = true)
public class CmisProperties
{
@Autowired
private TasProperties properties;
@Autowired
private TasAisProperties aisProperties;
public TasProperties envProperty()
{
return properties;
}
public TasAisProperties aisProperty()
{
return aisProperties;
}
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer()
{
return new PropertySourcesPlaceholderConfigurer();
}
@Value("${cmis.binding}")
private String cmisBinding;
@Value("${cmis.basePath}")
private String basePath;
public String getCmisBinding()
{
return cmisBinding;
}
public String getBasePath()
{
return basePath;
}
public void setBasePath(String basePath)
{
this.basePath = basePath;
}
public void setCmisBinding(String cmisBinding)
{
this.cmisBinding = cmisBinding;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,185 @@
package org.alfresco.cmis.dsl;
import static org.alfresco.utility.report.log.Step.STEP;
import java.util.Iterator;
import java.util.List;
import org.alfresco.cmis.CmisWrapper;
import org.alfresco.utility.LogFactory;
import org.apache.chemistry.opencmis.client.api.ItemIterable;
import org.apache.chemistry.opencmis.client.api.ObjectType;
import org.apache.chemistry.opencmis.client.api.Tree;
import org.apache.chemistry.opencmis.client.runtime.objecttype.ObjectTypeHelper;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.slf4j.Logger;
import org.testng.Assert;
/**
* DSL for preparing calls on getting the type children of a type.
*/
public class BaseObjectType
{
private CmisWrapper cmisAPI;
private String baseTypeID;
private boolean includePropertyDefinition = false;
private Logger LOG = LogFactory.getLogger();
public BaseObjectType(CmisWrapper cmisAPI, String baseTypeID)
{
this.cmisAPI = cmisAPI;
this.baseTypeID = baseTypeID;
}
public BaseObjectType withPropertyDefinitions()
{
this.includePropertyDefinition = true;
return this;
}
public BaseObjectType withoutPropertyDefinitions()
{
this.includePropertyDefinition = false;
return this;
}
/**
* Example of objectTypeID:
* "D:trx:transferReport" - see {@link ObjectTypeHelper} "D:trx:tempTransferStore"
* "D:imap:imapAttach"
*
* @param objectTypeID
*/
public PropertyDefinitionObject hasChildren(String objectTypeID)
{
return checkChildren(objectTypeID, true);
}
/**
* Example of objectTypeID:
* "D:trx:transferReport" - see {@link ObjectTypeHelper} "D:trx:tempTransferStore"
* "D:imap:imapAttach"
*
* @param objectTypeID
*/
public CmisWrapper doesNotHaveChildren(String objectTypeID)
{
checkChildren(objectTypeID, false);
return cmisAPI;
}
/**
* Example of objectTypeID:
* "D:trx:transferReport" - see {@link ObjectTypeHelper} "D:trx:tempTransferStore"
* "D:imap:imapAttach"
*
* @param objectTypeID
*/
private PropertyDefinitionObject checkChildren(String objectTypeID, boolean exist)
{
ItemIterable<ObjectType> values = cmisAPI.withCMISUtil().getTypeChildren(this.baseTypeID, includePropertyDefinition);
boolean foundChild = false;
PropertyDefinitionObject propDefinition = null;
for (Iterator<ObjectType> iterator = values.iterator(); iterator.hasNext();)
{
ObjectType type = (ObjectType) iterator.next();
LOG.info("Found child Object Type: {}", ToStringBuilder.reflectionToString(type, ToStringStyle.MULTI_LINE_STYLE));
if (type.getId().equals(objectTypeID))
{
foundChild = true;
propDefinition = new PropertyDefinitionObject(type);
break;
}
}
Assert.assertEquals(foundChild, exist,
String.format("Object Type with ID[%s] is found as children for Parent Type: [%s]", objectTypeID, this.baseTypeID));
return propDefinition;
}
public class PropertyDefinitionObject
{
ObjectType type;
public PropertyDefinitionObject(ObjectType type)
{
this.type = type;
}
public PropertyDefinitionObject propertyDefinitionIsEmpty()
{
STEP(String.format("%s Verify that property definitions map is empty.", CmisWrapper.STEP_PREFIX));
Assert.assertTrue(type.getPropertyDefinitions().isEmpty(), "Property definitions is empty.");
return this;
}
public PropertyDefinitionObject propertyDefinitionIsNotEmpty()
{
STEP(String.format("%s Verify that property definitions map is not empty.", CmisWrapper.STEP_PREFIX));
Assert.assertFalse(type.getPropertyDefinitions().isEmpty(), "Property definitions is not empty.");
return this;
}
}
private CmisWrapper checkDescendents(int depth, boolean exist, String... objectTypeIDs)
{
List<Tree<ObjectType>> values = cmisAPI.withCMISUtil().getTypeDescendants(this.baseTypeID, depth, includePropertyDefinition);
for (String objectTypeID : objectTypeIDs)
{
boolean foundChild = false;
for (Tree<ObjectType> tree : values)
{
if (tree.getItem().getId().equals(objectTypeID))
{
foundChild = true;
break;
}
}
Assert.assertEquals(foundChild, exist,
String.format("Assert %b: Descendant [%s] is found as descendant for Type: [%s]", exist, objectTypeID, this.baseTypeID));
if (foundChild)
{
STEP(String.format("%s Cmis object '%s' is found as descendant.", CmisWrapper.STEP_PREFIX, objectTypeID));
}
else
{
STEP(String.format("%s Cmis object '%s' is NOT found as descendant.", CmisWrapper.STEP_PREFIX, objectTypeID));
}
}
return cmisAPI;
}
/**
* Assert that specified descendantType is present in the depth of tree
* Depth can be -1 or >= 1
* Example of objectTypeID:
* "D:trx:transferReport" - see {@link ObjectTypeHelper} "D:trx:tempTransferStore"
* "D:imap:imapAttach"
*
* @param objectTypeID
* @param depth
* @return
*/
public CmisWrapper hasDescendantType(int depth, String... objectTypeIDs)
{
return checkDescendents(depth, true, objectTypeIDs);
}
/**
* Assert that specified descendantType is NOT present in the depth of tree
* Depth can be -1 or >= 1
* Example of objectTypeID:
* "D:trx:transferReport" - see {@link ObjectTypeHelper} "D:trx:tempTransferStore"
* "D:imap:imapAttach"
*
* @param objectTypeID
* @param depth
* @return
*/
public CmisWrapper doesNotHaveDescendantType(int depth, String... objectTypeIDs)
{
checkDescendents(depth, false, objectTypeIDs);
return cmisAPI;
}
}

View File

@@ -0,0 +1,78 @@
package org.alfresco.cmis.dsl;
import org.alfresco.cmis.CmisWrapper;
import org.alfresco.utility.Utility;
import org.apache.chemistry.opencmis.client.api.Document;
import org.apache.chemistry.opencmis.commons.data.ContentStream;
import org.apache.chemistry.opencmis.commons.exceptions.CmisStorageException;
import java.util.Map;
/**
* DSL pertaining only to check in a {@link Document}
*/
public class CheckIn
{
private CmisWrapper cmisWrapper;
private boolean version;
private Map<String, ?> properties;
private String content;
private String comment;
public CheckIn(CmisWrapper cmisWrapper)
{
this.cmisWrapper = cmisWrapper;
}
public CheckIn withMajorVersion()
{
this.version = true;
return this;
}
public CheckIn withMinorVersion()
{
this.version = false;
return this;
}
public CheckIn withContent(String content)
{
this.content = content;
return this;
}
public CheckIn withoutComment()
{
this.comment = null;
return this;
}
public CheckIn withComment(String comment)
{
this.comment = comment;
return this;
}
public CmisWrapper checkIn() throws Exception
{
return checkIn(properties);
}
public CmisWrapper checkIn(Map<String, ?> properties) throws Exception
{
ContentStream contentStream = cmisWrapper.withCMISUtil().getContentStream(content);
try
{
Document pwc = cmisWrapper.withCMISUtil().getPWCDocument();
pwc.refresh();
Utility.waitToLoopTime(2);
pwc.checkIn(version, properties, contentStream, comment);
}
catch(CmisStorageException st)
{
cmisWrapper.withCMISUtil().getPWCDocument().checkIn(version, properties, contentStream, comment);
}
return cmisWrapper;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,761 @@
package org.alfresco.cmis.dsl;
import org.alfresco.cmis.CmisWrapper;
import org.alfresco.cmis.exception.InvalidCmisObjectException;
import org.alfresco.utility.LogFactory;
import org.alfresco.utility.Utility;
import org.alfresco.utility.constants.UserRole;
import org.alfresco.utility.exception.IORuntimeException;
import org.alfresco.utility.model.ContentModel;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.GroupModel;
import org.alfresco.utility.model.UserModel;
import org.apache.chemistry.opencmis.client.api.CmisObject;
import org.apache.chemistry.opencmis.client.api.Document;
import org.apache.chemistry.opencmis.client.api.FileableCmisObject;
import org.apache.chemistry.opencmis.client.api.Folder;
import org.apache.chemistry.opencmis.client.api.ItemIterable;
import org.apache.chemistry.opencmis.client.api.ObjectType;
import org.apache.chemistry.opencmis.client.api.OperationContext;
import org.apache.chemistry.opencmis.client.api.Property;
import org.apache.chemistry.opencmis.client.api.QueryResult;
import org.apache.chemistry.opencmis.client.api.Rendition;
import org.apache.chemistry.opencmis.client.api.SecondaryType;
import org.apache.chemistry.opencmis.client.api.Tree;
import org.apache.chemistry.opencmis.commons.PropertyIds;
import org.apache.chemistry.opencmis.commons.data.Ace;
import org.apache.chemistry.opencmis.commons.data.Acl;
import org.apache.chemistry.opencmis.commons.data.AclCapabilities;
import org.apache.chemistry.opencmis.commons.data.ContentStream;
import org.apache.chemistry.opencmis.commons.data.PermissionMapping;
import org.apache.chemistry.opencmis.commons.data.PropertyData;
import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
import org.apache.chemistry.opencmis.commons.enums.Action;
import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
import org.apache.chemistry.opencmis.commons.enums.BindingType;
import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisVersioningException;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.testng.collections.Lists;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static org.alfresco.utility.report.log.Step.STEP;
/**
* DSL utility for managing CMIS objects
*/
public class CmisUtil
{
private CmisWrapper cmisAPI;
private Logger LOG = LogFactory.getLogger();
public CmisUtil(CmisWrapper cmisAPI)
{
this.cmisAPI = cmisAPI;
}
/**
* Get cmis object by object id
*
* @param objectId cmis object id
* @return CmisObject cmis object
*/
public CmisObject getCmisObjectById(String objectId)
{
LOG.debug("Get CMIS object by ID {}", objectId);
if (cmisAPI.getSession() == null)
{
throw new CmisRuntimeException("Please authenticate user, call: cmisAPI.authenticate(..)!");
}
if (objectId == null)
{
throw new InvalidCmisObjectException("Invalid content id");
}
return cmisAPI.getSession().getObject(objectId);
}
/**
* Get cmis object by object id with OperationContext
*
* @param objectId cmis object id
* @param context OperationContext
* @return CmisObject cmis object
*/
public CmisObject getCmisObjectById(String objectId, OperationContext context)
{
if (cmisAPI.getSession() == null)
{
throw new CmisRuntimeException("Please authenticate user, call: cmisAPI.authenticate(..)!");
}
if (objectId == null)
{
throw new InvalidCmisObjectException("Invalid content id");
}
return cmisAPI.getSession().getObject(objectId, context);
}
/**
* Get cmis object by path
*
* @param pathToItem String path to item
* @return CmisObject cmis object
*/
public CmisObject getCmisObject(String pathToItem)
{
if (cmisAPI.getSession() == null)
{
throw new CmisRuntimeException("Please authenticate user, call: cmisAPI.authenticate(..)!");
}
if (pathToItem == null)
{
throw new InvalidCmisObjectException("Invalid path set for content");
}
CmisObject cmisObject = cmisAPI.getSession().getObjectByPath(Utility.removeLastSlash(pathToItem));
if (cmisObject instanceof Document)
{
if (!((Document) cmisObject).getVersionLabel().contentEquals("pwc"))
{
// get last version of document
cmisObject = ((Document) cmisObject).getObjectOfLatestVersion(false);
}
else
{
// get pwc document
cmisObject = cmisAPI.getSession().getObject(((Document) cmisObject).getObjectOfLatestVersion(false).getVersionSeriesCheckedOutId());
}
}
return cmisObject;
}
/**
* Get cmis object by path with context
*
* @param pathToItem String path to item
* @param context OperationContext
* @return CmisObject cmis object
*/
public CmisObject getCmisObject(String pathToItem, OperationContext context)
{
if (cmisAPI.getSession() == null)
{
throw new CmisRuntimeException("Please authenticate user!");
}
if (pathToItem == null)
{
throw new InvalidCmisObjectException("Invalid path set for content");
}
CmisObject cmisObject = cmisAPI.getSession().getObjectByPath(Utility.removeLastSlash(pathToItem), context);
if (cmisObject instanceof Document)
{
if (!((Document) cmisObject).getVersionLabel().contentEquals("pwc"))
{
// get last version of document
cmisObject = ((Document) cmisObject).getObjectOfLatestVersion(false, context);
}
else
{
// get pwc document
cmisObject = cmisAPI.getSession().getObject(((Document) cmisObject).getObjectOfLatestVersion(false, context).getVersionSeriesCheckedOutId());
}
}
return cmisObject;
}
/**
* Get Document object for a file
*
* @param path String path to document
* @return {@link Document} object
*/
public Document getCmisDocument(final String path)
{
LOG.debug("Get CMIS Document by path {}", path);
Document d = null;
CmisObject docObj = getCmisObject(path);
if (docObj instanceof Document)
{
d = (Document) docObj;
}
else if (docObj instanceof Folder)
{
throw new InvalidCmisObjectException("Content at " + path + " is not a file");
}
return d;
}
/**
* Get Folder object for a folder
*
* @param path String path to folder
* @return {@link Folder} object
*/
public Folder getCmisFolder(final String path)
{
Folder f = null;
CmisObject folderObj = getCmisObject(path);
if (folderObj instanceof Folder)
{
f = (Folder) folderObj;
}
else if (folderObj instanceof Document)
{
throw new InvalidCmisObjectException("Content at " + path + " is not a folder");
}
return f;
}
/**
* Helper method to get the contents of a stream
*
* @param stream
* @return
* @throws IORuntimeException
*/
protected String getContentAsString(ContentStream stream)
{
LOG.debug("Get Content as String {}", stream);
InputStream inputStream = stream.getStream();
String result;
try
{
result = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
}
catch (IOException e)
{
throw new IORuntimeException(e);
}
IOUtils.closeQuietly(inputStream);
return result;
}
/**
* Copy all the children of the source folder to the target folder
*
* @param sourceFolder
* @param targetFolder
*/
protected void copyChildrenFromFolder(Folder sourceFolder, Folder targetFolder)
{
for (Tree<FileableCmisObject> t : sourceFolder.getDescendants(-1))
{
CmisObject obj = t.getItem();
if (obj instanceof Document)
{
Document d = (Document) obj;
d.copy(targetFolder);
}
else if (obj instanceof Folder)
{
copyFolder((Folder) obj, targetFolder);
}
}
}
/**
* Copy folder with all children
*
* @param sourceFolder source folder
* @param targetFolder target folder
* @return CmisObject of new created folder
*/
public CmisObject copyFolder(Folder sourceFolder, Folder targetFolder)
{
Map<String, Object> folderProperties = new HashMap<String, Object>(2);
folderProperties.put(PropertyIds.NAME, sourceFolder.getName());
folderProperties.put(PropertyIds.OBJECT_TYPE_ID, sourceFolder.getBaseTypeId().value());
Folder newFolder = targetFolder.createFolder(folderProperties);
copyChildrenFromFolder(sourceFolder, newFolder);
return newFolder;
}
protected boolean isPrivateWorkingCopy()
{
boolean result;
try
{
result = getPWCDocument().isVersionSeriesPrivateWorkingCopy();
}
catch (CmisVersioningException cmisVersioningException)
{
result = false;
}
return result;
}
/**
* Returns the PWC (private working copy) ID of the document version series
*/
public Document getPWCDocument()
{
Document document = getCmisDocument(cmisAPI.getLastResource());
String pwcId = document.getVersionSeriesCheckedOutId();
if (pwcId != null)
{
return (Document) cmisAPI.getSession().getObject(pwcId);
}
else
{
throw new CmisVersioningException(String.format("Document %s is not checked out", document.getName()));
}
}
public FileModel getPWCFileModel()
{
Document document = getPWCDocument();
String[] pathTokens = cmisAPI.getLastResource().split("/");
String path = "";
for (int i = 0; i < pathTokens.length - 1; i++)
path = Utility.buildPath(path, pathTokens[i]);
path = Utility.buildPath(path, document.getName());
FileModel fileModel = new FileModel();
fileModel.setName(document.getName());
fileModel.setCmisLocation(path);
return fileModel;
}
protected Folder getFolderParent()
{
return getCmisFolder(cmisAPI.getLastResource()).getFolderParent();
}
/**
* @return List<Action> of allowable actions for the current object
*/
protected List<Action> getAllowableActions()
{
return Lists.newArrayList(getCmisObject(cmisAPI.getLastResource()).getAllowableActions().getAllowableActions());
}
/**
* Returns the requested property. If the property is not available, null is returned
*
* @param propertyId
* @return CMIS Property
*/
protected <T> Property<T> getProperty(String propertyId)
{
CmisObject cmisObject = getCmisObject(cmisAPI.getLastResource());
return cmisObject.getProperty(propertyId);
}
protected List<Rendition> getRenditions()
{
OperationContext operationContext = cmisAPI.getSession().createOperationContext();
operationContext.setRenditionFilterString("*");
CmisObject obj = cmisAPI.getSession().getObjectByPath(cmisAPI.getLastResource(), operationContext);
obj.refresh();
List<Rendition> renditions = obj.getRenditions();
int retry = 0;
while ((renditions == null || renditions.isEmpty()) && retry < Utility.retryCountSeconds)
{
Utility.waitToLoopTime(1);
obj.refresh();
renditions = obj.getRenditions();
retry++;
}
return obj.getRenditions();
}
protected List<SecondaryType> getSecondaryTypes()
{
CmisObject obj = getCmisObject(cmisAPI.getLastResource());
obj.refresh();
return obj.getSecondaryTypes();
}
/**
* Get the children from a parent folder
*
* @return Map<ContentModel, ObjectType>
*/
public Map<ContentModel, ObjectType> getChildren()
{
String folderParent = cmisAPI.getLastResource();
ItemIterable<CmisObject> children = cmisAPI.withCMISUtil().getCmisFolder(folderParent).getChildren();
Map<ContentModel, ObjectType> contents = new HashMap<ContentModel, ObjectType>();
for (CmisObject o : children)
{
ContentModel content = new ContentModel(o.getName());
content.setNodeRef(o.getId());
content.setDescription(o.getDescription());
content.setCmisLocation(Utility.buildPath(folderParent, o.getName()));
contents.put(content, o.getType());
}
return contents;
}
/**
* Gets the folder descendants starting with the current folder
*
* @param depth level of the tree that you want to go to
* - currentFolder
* -- file1.txt
* -- file2.txt
* -- folderB
* --- file3.txt
* --- file4.txt
* e.g. A depth of 1 will give you just the current folder descendants (file1.txt, file2.txt, folder1)
* e.g. A depth of -1 will return all the descendants (file1.txt, file2.txt, folder1, file3.txt and file4.txt)
*/
public List<CmisObject> getFolderDescendants(int depth)
{
return getFolderTreeCmisObjects(getCmisFolder(cmisAPI.getLastResource()).getDescendants(depth));
}
/**
* Returns a list of Cmis objects for the provided Content Models
*
* @param contentModels
*/
public List<CmisObject> getCmisObjectsFromContentModels(ContentModel... contentModels)
{
List<CmisObject> cmisObjects = new ArrayList<>();
for (ContentModel contentModel : contentModels)
cmisObjects.add(getCmisObject(contentModel.getCmisLocation()));
return cmisObjects;
}
public ContentStream getContentStream(String content)
{
String fileName = getCmisDocument(cmisAPI.getLastResource()).getName();
return cmisAPI.getDataContentService().getContentStream(fileName, content);
}
public Acl getAcls()
{
OperationContext context = cmisAPI.getSession().createOperationContext();
context.setIncludeAcls(true);
return getCmisObject(cmisAPI.getLastResource(), context).getAcl();
}
/**
* Gets only the folder descendants for the {@link #getLastResource()} folder
*
* @param depth level of the tree that you want to go to
* - currentFolder
* -- folderB
* -- folderC
* --- folderD
* e.g. A depth of 1 will give you just the current folder descendants (folderB, folderC)
* e.g. A depth of -1 will return all the descendants (folderB, folderC, folderD)
*/
public List<CmisObject> getFolderTree(int depth)
{
return getFolderTreeCmisObjects(getCmisFolder(cmisAPI.getLastResource()).getFolderTree(depth));
}
/**
* Helper method for getFolderTree and getFolderDescendants that cycles threw the folder descendants and returns List<CmisObject>
*/
private List<CmisObject> getFolderTreeCmisObjects(List<Tree<FileableCmisObject>> descendants)
{
List<CmisObject> cmisObjectList = new ArrayList<>();
for (Tree<FileableCmisObject> descendant : descendants)
{
cmisObjectList.add(descendant.getItem());
cmisObjectList.addAll(descendant.getChildren().stream().map(Tree::getItem).collect(Collectors.toList()));
}
return cmisObjectList;
}
protected List<Document> getAllDocumentVersions()
{
return getCmisDocument(cmisAPI.getLastResource()).getAllVersions();
}
public List<Document> getAllDocumentVersionsBy(OperationContext context)
{
return getCmisDocument(cmisAPI.getLastResource()).getAllVersions(context);
}
public List<Document> getCheckedOutDocumentsFromSession()
{
return com.google.common.collect.Lists.newArrayList(cmisAPI.getSession().getCheckedOutDocs());
}
public List<Document> getCheckedOutDocumentsFromSession(OperationContext context)
{
return com.google.common.collect.Lists.newArrayList(cmisAPI.getSession().getCheckedOutDocs(context));
}
public List<Document> getCheckedOutDocumentsFromFolder()
{
Folder folder = cmisAPI.withCMISUtil().getCmisFolder(cmisAPI.getLastResource());
return com.google.common.collect.Lists.newArrayList(folder.getCheckedOutDocs());
}
public List<Document> getCheckedOutDocumentsFromFolder(OperationContext context)
{
Folder folder = cmisAPI.withCMISUtil().getCmisFolder(cmisAPI.getLastResource());
return com.google.common.collect.Lists.newArrayList(folder.getCheckedOutDocs(context));
}
protected boolean isCmisObjectContainedInCmisCheckedOutDocumentsList(CmisObject cmisObject, List<Document> cmisCheckedOutDocuments)
{
for (Document cmisCheckedOutDocument : cmisCheckedOutDocuments)
if (cmisObject.getId().split(";")[0].equals(cmisCheckedOutDocument.getId().split(";")[0]))
return true;
return false;
}
public Map<String, Object> getProperties(ContentModel contentModel, String baseTypeId)
{
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, baseTypeId);
properties.put(PropertyIds.NAME, contentModel.getName());
// WebServices binding does not have SecondaryTypes and cannot be added to Object.
// cm:title and cm:description Policies
if (cmisAPI.getSession().getBinding().getBindingType().value().equals(BindingType.WEBSERVICES.value()))
{
return properties;
}
List<Object> aspects = new ArrayList<Object>();
aspects.add("P:cm:titled");
properties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, aspects);
properties.put("cm:title", contentModel.getTitle());
properties.put("cm:description", contentModel.getDescription());
return properties;
}
public OperationContext setIncludeAclContext()
{
OperationContext context = cmisAPI.getSession().createOperationContext();
context.setIncludeAcls(true);
return context;
}
public List<Ace> createAce(UserModel user, UserRole role)
{
List<String> addPermission = new ArrayList<String>();
addPermission.add(role.getRoleId());
Ace addAce = cmisAPI.getSession().getObjectFactory().createAce(user.getUsername(), addPermission);
List<Ace> addAces = new ArrayList<Ace>();
addAces.add(addAce);
return addAces;
}
public List<Ace> createAce(GroupModel group, UserRole role)
{
List<String> addPermission = new ArrayList<String>();
addPermission.add(role.getRoleId());
Ace addAce = cmisAPI.getSession().getObjectFactory().createAce(group.getDisplayName(), addPermission);
List<Ace> addAces = new ArrayList<Ace>();
addAces.add(addAce);
return addAces;
}
public List<Ace> createAce(UserModel user, String... permissions)
{
List<Ace> addAces = new ArrayList<Ace>();
RepositoryInfo repositoryInfo = cmisAPI.getSession().getRepositoryInfo();
AclCapabilities aclCapabilities = repositoryInfo.getAclCapabilities();
Map<String, PermissionMapping> permissionMappings = aclCapabilities.getPermissionMapping();
for (String perm : permissions)
{
STEP(String.format("%s Add permission '%s' for user %s ", CmisWrapper.STEP_PREFIX, perm, user.getUsername()));
PermissionMapping permissionMapping = permissionMappings.get(perm);
List<String> permissionsList = permissionMapping.getPermissions();
Ace addAce = cmisAPI.getSession().getObjectFactory().createAce(user.getUsername(), permissionsList);
addAces.add(addAce);
}
return addAces;
}
public ObjectType getTypeDefinition()
{
CmisObject cmisObject = cmisAPI.withCMISUtil().getCmisObject(cmisAPI.getLastResource());
return cmisAPI.getSession().getTypeDefinition(cmisObject.getBaseTypeId().value());
}
public ItemIterable<ObjectType> getTypeChildren(String baseType, boolean includePropertyDefinitions)
{
STEP(String.format("%s Get type children for '%s' and includePropertyDefinitions set to '%s'", CmisWrapper.STEP_PREFIX, baseType,
includePropertyDefinitions));
return cmisAPI.getSession().getTypeChildren(baseType, includePropertyDefinitions);
}
public List<Tree<ObjectType>> getTypeDescendants(String baseTypeId, int depth, boolean includePropertyDefinitions)
{
STEP(String.format("%s Get type descendants for '%s' with depth set to %d and includePropertyDefinitions set to '%s'", CmisWrapper.STEP_PREFIX,
baseTypeId, depth, includePropertyDefinitions));
return cmisAPI.getSession().getTypeDescendants(baseTypeId, depth, includePropertyDefinitions);
}
public String getObjectId(String pathToObject)
{
return getCmisObject(pathToObject).getId();
}
/**
* Update property for last resource cmis object
*
* @param propertyName String property name (e.g. cmis:name)
* @param propertyValue Object property value
*/
public void updateProperties(String propertyName, Object propertyValue)
{
Map<String, Object> props = new HashMap<String, Object>();
props.put(propertyName, propertyValue);
getCmisObject(cmisAPI.getLastResource()).updateProperties(props);
}
protected boolean isFolderInList(FolderModel folderModel, List<FolderModel> folders)
{
for (FolderModel folder : folders)
{
if (folderModel.getName().equals(folder.getName()))
{
return true;
}
}
return false;
}
protected boolean isFileInList(FileModel fileModel, List<FileModel> files)
{
for (FileModel file : files)
{
if (fileModel.getName().equals(file.getName()))
{
return true;
}
}
return false;
}
protected boolean isContentInList(ContentModel contentModel, List<ContentModel> contents)
{
for (ContentModel content : contents)
{
if (content.getName().equals(content.getName()))
{
return true;
}
}
return false;
}
/**
* Get children folders from a parent folder
*
* @return List<FolderModel>
*/
public List<FolderModel> getFolders()
{
STEP(String.format("%s Get the folder children from '%s'", CmisWrapper.STEP_PREFIX, cmisAPI.getLastResource()));
Map<ContentModel, ObjectType> children = getChildren();
List<FolderModel> folders = new ArrayList<FolderModel>();
for (Map.Entry<ContentModel, ObjectType> entry : children.entrySet())
{
if (entry.getValue().getId().equals(BaseTypeId.CMIS_FOLDER.value()))
{
FolderModel folder = new FolderModel(entry.getKey().getName());
folder.setNodeRef(entry.getKey().getNodeRef());
folder.setDescription(entry.getKey().getDescription());
folder.setCmisLocation(entry.getKey().getCmisLocation());
folder.setProtocolLocation(entry.getKey().getCmisLocation());
folders.add(folder);
}
}
return folders;
}
/**
* Get children documents from a parent folder
*
* @return List<FolderModel>
*/
public List<FileModel> getFiles()
{
STEP(String.format("%s Get the file children from '%s'", CmisWrapper.STEP_PREFIX, cmisAPI.getLastResource()));
Map<ContentModel, ObjectType> children = getChildren();
List<FileModel> files = new ArrayList<FileModel>();
for (Map.Entry<ContentModel, ObjectType> entry : children.entrySet())
{
if (entry.getValue().getId().equals(BaseTypeId.CMIS_DOCUMENT.value()))
{
FileModel file = new FileModel(entry.getKey().getName());
file.setNodeRef(entry.getKey().getNodeRef());
file.setDescription(entry.getKey().getDescription());
file.setCmisLocation(entry.getKey().getCmisLocation());
file.setProtocolLocation(entry.getKey().getCmisLocation());
files.add(file);
}
}
return files;
}
/*
* Get document(set as last resource) content
*/
public String getDocumentContent()
{
Utility.waitToLoopTime(2);
Document lastVersion = getCmisDocument(cmisAPI.getLastResource());
lastVersion.refresh();
LOG.info(String.format("Get the content from %s - node: %s", lastVersion.getName(), lastVersion.getId()));
ContentStream contentStream = lastVersion.getContentStream();
String actualContent = "";
if (contentStream != null)
{
actualContent = getContentAsString(contentStream);
}
else
{
lastVersion = getCmisDocument(cmisAPI.getLastResource());
lastVersion.refresh();
LOG.info(String.format("Retry get content stream for %s node: %s", lastVersion.getName(), lastVersion.getId()));
contentStream = lastVersion.getContentStream();
if (contentStream != null)
{
actualContent = getContentAsString(contentStream);
}
}
if(actualContent.isEmpty())
{
Utility.waitToLoopTime(2);
Document retryDoc = getCmisDocument(cmisAPI.getLastResource());
retryDoc.refresh();
LOG.info(String.format("Retry get content stream for %s node: %s", retryDoc.getName(), retryDoc.getId()));
contentStream = retryDoc.getContentStream();
if (contentStream != null)
{
actualContent = getContentAsString(contentStream);
}
}
return actualContent;
}
/**
* Get user noderef
*
* @param user {@link UserModel}
*/
public String getUserNodeRef(UserModel user)
{
String objectId = "";
ItemIterable<QueryResult> results = cmisAPI.getSession().query("select cmis:objectId from cm:person where cm:userName = '" + user.getUsername() + "'",
false);
for (QueryResult qResult : results)
{
PropertyData<?> propData = qResult.getPropertyById("cmis:objectId");
objectId = (String) propData.getFirstValue();
}
return objectId;
}
}

View File

@@ -0,0 +1,137 @@
package org.alfresco.cmis.dsl;
import static org.alfresco.utility.report.log.Step.STEP;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.alfresco.cmis.CmisWrapper;
import org.apache.chemistry.opencmis.client.api.CmisObject;
import org.apache.chemistry.opencmis.client.api.Document;
import org.apache.chemistry.opencmis.client.api.OperationContext;
import org.testng.Assert;
/**
* DSL utility for verifying a document version {@link Document}
*/
public class DocumentVersioning
{
private CmisWrapper cmisWrapper;
private CmisObject cmisObject;
private boolean majorVersion;
private Object versionLabel;
private List<Object> versions;
public DocumentVersioning(CmisWrapper cmisWrapper, CmisObject cmisObject)
{
this.cmisWrapper = cmisWrapper;
this.cmisObject = cmisObject;
}
private DocumentVersioning withLatestMajorVersion()
{
this.majorVersion = true;
return this;
}
private DocumentVersioning withLatestMinorVersion()
{
this.majorVersion = false;
return this;
}
private Document getVersionOfDocument()
{
Document document = (Document) cmisObject;
if (versionLabel != null)
{
List<Document> documents = document.getAllVersions();
for (Document documentVersion : documents)
if (documentVersion.getVersionLabel().equals(versionLabel.toString()))
return documentVersion;
}
else
{
return document.getObjectOfLatestVersion(majorVersion);
}
return document;
}
private List<Object> getDocumentVersions(List<Document> documentList)
{
List<Object> versions = new ArrayList<Object>();
for (Document document : documentList)
{
versions.add(document.getVersionLabel());
}
return versions;
}
public CmisWrapper assertVersionIs(Double expectedVersion)
{
STEP(String.format("%s Verify if document '%s' has version '%s'", cmisWrapper.getProtocolName(), cmisObject.getName(), expectedVersion));
Assert.assertEquals(getVersionOfDocument().getVersionLabel(), expectedVersion.toString(), "File has version");
return cmisWrapper;
}
public CmisWrapper assertLatestMajorVersionIs(Double expectedVersion)
{
STEP(String.format("%s Verify if latest major version of document '%s' is '%s'", cmisWrapper.getProtocolName(), cmisObject.getName(), expectedVersion));
Assert.assertEquals(withLatestMajorVersion().getVersionOfDocument().getVersionLabel(), expectedVersion.toString(), "File has version");
return cmisWrapper;
}
public CmisWrapper assertLatestMinorVersionIs(Double expectedVersion)
{
STEP(String.format("%s Verify if latest minor version of document '%s' is '%s'", cmisWrapper.getProtocolName(), cmisObject.getName(), expectedVersion));
Assert.assertEquals(withLatestMinorVersion().getVersionOfDocument().getVersionLabel(), expectedVersion.toString(), "File has version");
return cmisWrapper;
}
public DocumentVersioning getAllDocumentVersions()
{
setVersions(getDocumentVersions(cmisWrapper.withCMISUtil().getAllDocumentVersions()));
return this;
}
public CmisWrapper assertHasVersions(Object... versions)
{
setVersions(getDocumentVersions(cmisWrapper.withCMISUtil().getAllDocumentVersions()));
List<Object> documentVersions = getVersions();
for (Object version : versions)
{
STEP(String.format("%s Verify if document '%s' has version '%s'", cmisWrapper.getProtocolName(), cmisObject.getName(), version));
Assert.assertTrue(documentVersions.contains(version.toString()),
String.format("Document %s does not have version %s", cmisObject.getName(), version));
}
return cmisWrapper;
}
public DocumentVersioning getAllDocumentVersionsBy(OperationContext context)
{
setVersions(getDocumentVersions(cmisWrapper.withCMISUtil().getAllDocumentVersionsBy(context)));
return this;
}
public CmisWrapper assertHasVersionsInOrder(Object... versions)
{
List<Object> documentVersions = getVersions();
List<Object> expectedVersions = Arrays.asList(versions);
STEP(String.format("%s Verify if document '%s' has versions in this order '%s'", cmisWrapper.getProtocolName(), cmisObject.getName(),
Arrays.toString(expectedVersions.toArray())));
Assert.assertTrue(documentVersions.toString().equals(expectedVersions.toString()),
String.format("Document %s does not have versions in this order %s", cmisObject.getName(), Arrays.toString(expectedVersions.toArray())));
return cmisWrapper;
}
public List<Object> getVersions()
{
return versions;
}
public void setVersions(List<Object> versions)
{
this.versions = versions;
}
}

View File

@@ -0,0 +1,39 @@
package org.alfresco.cmis.dsl;
import org.alfresco.cmis.CmisWrapper;
import org.alfresco.utility.network.Jmx;
import org.alfresco.utility.network.JmxClient;
import org.alfresco.utility.network.JmxJolokiaProxyClient;
/**
* DSL for interacting with JMX (using direct JMX call see {@link JmxClient} or {@link JmxJolokiaProxyClient}
*/
public class JmxUtil
{
@SuppressWarnings("unused")
private CmisWrapper cmisWrapper;
private Jmx jmx;
private final String jmxAuditObjectName = "Alfresco:Type=Configuration,Category=Audit,id1=default";
public JmxUtil(CmisWrapper cmisWrapper, Jmx jmx)
{
this.cmisWrapper = cmisWrapper;
this.jmx = jmx;
}
public void enableCMISAudit() throws Exception
{
if(jmx.readProperty(jmxAuditObjectName, "audit.enabled").equals(String.valueOf(false)))
{
jmx.writeProperty(jmxAuditObjectName, "audit.enabled", String.valueOf(true));
}
jmx.writeProperty(jmxAuditObjectName, "audit.cmischangelog.enabled", String.valueOf(true));
jmx.writeProperty(jmxAuditObjectName, "audit.alfresco-access.enabled", String.valueOf(true));
}
public void disableCMISAudit() throws Exception
{
jmx.writeProperty(jmxAuditObjectName, "audit.cmischangelog.enabled", String.valueOf(false));
jmx.writeProperty(jmxAuditObjectName, "audit.alfresco-access.enabled", String.valueOf(false));
}
}

View File

@@ -0,0 +1,287 @@
package org.alfresco.cmis.dsl;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
import static org.alfresco.utility.Utility.checkObjectIsInitialized;
import static org.alfresco.utility.report.log.Step.STEP;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.StreamSupport;
import org.alfresco.cmis.CmisWrapper;
import org.alfresco.utility.LogFactory;
import org.alfresco.utility.data.provider.XMLTestData;
import org.alfresco.utility.exception.TestConfigurationException;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.TestModel;
import org.apache.chemistry.opencmis.client.api.ItemIterable;
import org.apache.chemistry.opencmis.client.api.QueryResult;
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.commons.data.PropertyData;
import org.slf4j.Logger;
import org.testng.Assert;
/**
* DSL for CMIS Queries
* This will also handle execution of CMIS queries
*/
public class QueryExecutor
{
static Logger LOG = LogFactory.getLogger();
CmisWrapper cmisWrapper;
private long resultCount = -1;
private String currentQuery = "";
private List<QueryResult> results;
public QueryExecutor(CmisWrapper cmisWrapper, String query)
{
this.cmisWrapper = cmisWrapper;
currentQuery = query;
}
public QueryResultAssertion assertResultsCount()
{
resultCount = executeQuery(currentQuery).getPageNumItems();
return new QueryResultAssertion();
}
public QueryResultAssertion assertColumnIsOrdered()
{
return assertValues();
}
public QueryResultAssertion assertColumnValuesRange()
{
return assertValues();
}
public QueryResultAssertion assertValues()
{
STEP("Sending query " + currentQuery);
results = StreamSupport.stream(executeQuery(currentQuery).spliterator(), false)
.collect(toList());
resultCount = results.size();
STEP("Received results " + results.stream().map(this::resultToString).collect(toList()));
return new QueryResultAssertion();
}
/** Try to return a useful string representation of the CMIS query result. */
private String resultToString(QueryResult result)
{
if (result == null || result.getProperties() == null)
{
return "null";
}
Optional<PropertyData<?>> idProperty = result.getProperties().stream()
.filter(propertyData -> propertyData.getId().equals("cmis:objectId"))
.findFirst();
return idProperty.map(PropertyData::getValues)
.map(values -> values.stream().map(Object::toString).collect(joining(",")))
.orElse(result.getProperties().toString());
}
private ItemIterable<QueryResult> executeQuery(String query)
{
Session session = cmisWrapper.getSession();
checkObjectIsInitialized(session, "You need to authenticate first using <cmisWrapper.authenticateUser(UserModel userModel)>");
return session.query(query, false);
}
/**
* Call getNodeRef on each test data item used in test and replace that with NODE_REF keywords in your Query
*
* @param testData
* @return
*/
public QueryExecutor applyNodeRefsFrom(XMLTestData testData)
{
List<String> dataItems = extractKeywords("NODE_REF");
if (dataItems.isEmpty())
return this;
List<String> nodeRefs = new ArrayList<String>();
for (String dataItemName : dataItems)
{
currentQuery = currentQuery.replace(String.format("NODE_REF[%s]", dataItemName), "%s");
TestModel model = testData.getTestDataItemWithId(dataItemName).getModel();
if (model == null)
throw new TestConfigurationException("No TestData with ID: " + dataItemName + " found in your XML file.");
if (model instanceof SiteModel)
{
nodeRefs.add(cmisWrapper.getDataContentService().usingAdmin().usingSite((SiteModel) model).getNodeRef());
}
else if (model instanceof FolderModel)
{
nodeRefs.add(((FolderModel) model).getNodeRef());
}
else if (model instanceof FileModel)
{
nodeRefs.add(((FileModel) model).getNodeRef());
}
}
try
{
currentQuery = String.format(currentQuery, nodeRefs.toArray());
LOG.info("Injecting nodeRef IDs \n\tQuery: [{}]", currentQuery);
}
catch (Exception e)
{
throw new TestConfigurationException(
"You passed multiple keywords to your search query, please re-analyze your query search format: " + e.getMessage());
}
return this;
}
/**
* if you have in your search 'SELECT * from cmis:document where workspace://SpacesStore/NODE_REF[site1] or workspace://SpacesStore/NODE_REF[site2]'
* and pass key="NODE_REF" this method will get "site1" and "site2" as values
*
* @param key
* @return
* @throws TestConfigurationException
*/
private List<String> extractKeywords(String key) throws TestConfigurationException
{
String[] lines = currentQuery.split(key);
List<String> keywords = new ArrayList<String>();
for (int i = 0; i < lines.length; i++)
{
if (lines[i].startsWith("["))
{
String keyValue = "";
for (int j = 1; j < lines[i].length() - 1; j++)
{
String tmp = Character.toString(lines[i].charAt(j));
if (tmp.equals("]"))
break;
keyValue += tmp;
}
keywords.add(keyValue);
}
}
return keywords;
}
public class QueryResultAssertion
{
public QueryResultAssertion hasLength(long expectedValue)
{
STEP(String.format("Verify that query: '%s' has %d results count returned", currentQuery, expectedValue));
Assert.assertEquals(resultCount, expectedValue, showErrorMessage());
return this;
}
public QueryResultAssertion isGreaterThan(long expectedValue)
{
STEP(String.format("Verify that query: '%s' has more than %d results count returned", currentQuery, expectedValue));
if (expectedValue <= resultCount)
Assert.fail(String.format("%s expected to have more than %d results, but found %d", showErrorMessage(), expectedValue, resultCount));
return this;
}
public QueryResultAssertion isLowerThan(long expectedValue)
{
STEP(String.format("Verify that query: '%s' has more than %d results count returned", currentQuery, expectedValue));
if (resultCount >= expectedValue)
Assert.fail(String.format("%s expected to have less than %d results, but found %d", showErrorMessage(), expectedValue, resultCount));
return this;
}
public QueryResultAssertion isOrderedAsc(String queryName)
{
STEP(String.format("Verify that query: '%s' is returning ascending ordered values for column %s", currentQuery, queryName));
List<Object> columnValues = new ArrayList<>();
results.forEach((r) -> {
columnValues.add(r.getPropertyValueByQueryName(queryName));
});
List<Object> orderedColumnValues = columnValues.stream().sorted().collect(toList());
Assert.assertEquals(columnValues, orderedColumnValues,
String.format("%s column values expected to be in ascendent order, but found %s", queryName, columnValues.toString()));
return this;
}
public QueryResultAssertion isOrderedDesc(String queryName)
{
STEP(String.format("Verify that query: '%s' is returning descending ordered values for column %s", currentQuery, queryName));
List<Object> columnValues = new ArrayList<>();
results.forEach((r) -> {
columnValues.add(r.getPropertyValueByQueryName(queryName));
});
List<Object> reverseOrderedColumnValues = columnValues.stream().sorted(Collections.reverseOrder()).collect(toList());
Assert.assertEquals(columnValues, reverseOrderedColumnValues,
String.format("%s column values expected to be in descendent order, but found %s", queryName, columnValues.toString()));
return this;
}
public QueryResultAssertion isReturningValuesInRange(String queryName, BigDecimal minValue, BigDecimal maxValue)
{
STEP(String.format("Verify that query: '%s' is returning values for column %s in range from %.4f to %.4f", currentQuery, queryName, minValue, maxValue));
results.forEach((r) -> {
BigDecimal value = (BigDecimal) r.getPropertyValueByQueryName(queryName);
if (value.compareTo(minValue) < 0 || value.compareTo(maxValue) > 0)
{
Assert.fail(String.format("%s column values expected to be in range from %.4f to %.4f, but found %.4f", queryName, minValue, maxValue, value));
}
});
return this;
}
public <T> QueryResultAssertion isReturningValues(String queryName, Set<T> values)
{
return isReturningValues(queryName, values, false);
}
public <T> QueryResultAssertion isReturningValues(String queryName, Set<T> values, boolean multivalue)
{
STEP(String.format("Verify that query: '%s' returns the values from %s for column %s", currentQuery, values, queryName));
Function<QueryResult, Object> extractValue = (multivalue ? (r -> r.getPropertyMultivalueById(queryName)) : r -> r.getPropertyValueById(queryName));
Set<Object> resultSet = results.stream().map(extractValue).collect(toSet());
Assert.assertEquals(resultSet, values, "Values did not match - expected " + values + " got " + resultSet);
return this;
}
public <T> QueryResultAssertion isReturningOrderedValues(String queryName, List<T> values)
{
return isReturningOrderedValues(queryName, values, false);
}
public <T> QueryResultAssertion isReturningOrderedValues(String queryName, List<T> values, boolean multivalue)
{
STEP(String.format("Verify that query: '%s' returns the values from %s for column %s", currentQuery, values, queryName));
Function<QueryResult, Object> extractValue = (multivalue ? (r -> r.getPropertyMultivalueById(queryName)) : r -> r.getPropertyValueById(queryName));
List<Object> resultList = results.stream().map(extractValue).collect(toList());
// Include both lists in assertion message as TestNG does not provide this information.
Assert.assertEquals(resultList, values, "Values did not match expected " + values + " but found " + resultList);
return this;
}
private String showErrorMessage()
{
return String.format("Returned results count of Query [%s] is not the expected one:", currentQuery);
}
}
}

View File

@@ -0,0 +1,10 @@
package org.alfresco.cmis.exception;
public class InvalidCmisObjectException extends RuntimeException
{
private static final long serialVersionUID = 1L;
public InvalidCmisObjectException(String reason)
{
super(reason);
}
}

View File

@@ -0,0 +1,12 @@
package org.alfresco.cmis.exception;
public class UnrecognizedBinding extends Exception
{
private static final long serialVersionUID = 1L;
private static final String DEFAULT_MESSAGE = "Unrecognized CMIS Binding [%s]. Available binding options: BROWSER or ATOM";
public UnrecognizedBinding(String binding)
{
super(String.format(DEFAULT_MESSAGE, binding));
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<context:annotation-config />
<context:component-scan base-package="org.alfresco" />
<import resource="classpath:dataprep-context.xml" />
<import resource="classpath*:alfresco-tester-context.xml" />
</beans>

View File

@@ -0,0 +1,76 @@
# dataprep related
alfresco.scheme=http
alfresco.server=localhost
alfresco.port=8081
# credentials
admin.user=admin
admin.password=admin
solrWaitTimeInSeconds=30
# 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=true
# set CMIS binding to 'browser' or 'atom'
cmis.binding=browser
cmis.basePath=/alfresco/api/-default-/public/cmis/versions/1.1/${cmis.binding}
# 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=
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

View File

@@ -0,0 +1,26 @@
# Root logger option
log4j.rootLogger=INFO, file, stdout
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=./target/reports/alfresco-tas.log
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%t] %d{HH:mm:ss} %-5p %c{1}:%L - %m%n
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%t] %d{HH:mm:ss} %-5p %c{1}:%L - %m%n
# TestRail particular log file
# Direct log messages to a log file
log4j.appender.testrailLog=org.apache.log4j.RollingFileAppender
log4j.appender.testrailLog.File=./target/reports/alfresco-testrail.log
log4j.appender.testrailLog.MaxBackupIndex=10
log4j.appender.testrailLog.layout=org.apache.log4j.PatternLayout
log4j.appender.testrailLog.layout.ConversionPattern=%d{HH:mm:ss} %-5p %c{1}:%L - %m%n
log4j.category.testrail=INFO, testrailLog
log4j.additivity.testrail=false

View File

@@ -1,9 +1,21 @@
package org.alfresco.cmis.search;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
import static org.alfresco.utility.report.log.Step.STEP;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import org.alfresco.cmis.CmisProperties;
import org.alfresco.cmis.dsl.QueryExecutor.QueryResultAssertion;
import org.alfresco.utility.Utility;
import org.alfresco.utility.model.ContentModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -45,32 +57,76 @@ public abstract class AbstractCmisE2ETest extends AbstractE2EFunctionalTest
/**
* Repeat Elastic Query till results count returns expectedCountResults
* @param query CMIS Query to be executed
* @param expectedCountResults Number of results expected
* @param expectedResultsCount Number of results expected
* @return true when results count is equals to expectedCountResults
*/
protected boolean waitForIndexing(String query, long expectedCountResults)
protected boolean waitForIndexing(String query, long expectedResultsCount)
{
for (int searchCount = 1; searchCount <= SEARCH_MAX_ATTEMPTS; searchCount++)
try
{
waitForIndexing(query, execution -> execution.hasLength(expectedResultsCount));
return true;
}
catch (AssertionError ae)
{
STEP("Received assertion error for query '" + query + "': " + ae);
return false;
}
}
/**
* Repeat Elastic Query until we get the expected results or we hit the retry limit.
*
* @param query CMIS Query to be executed
* @param expectedResults The expected results (unordered).
*/
protected void waitForIndexing(String query, ContentModel... expectedResults)
{
Set<String> expectedNames = Arrays.stream(expectedResults).map(ContentModel::getName).collect(toSet());
waitForIndexing(query, execution -> execution.isReturningValues("cmis:name", expectedNames));
}
/**
* Repeat Elastic Query until we get the expected results in the given order or we hit the retry limit.
*
* @param query CMIS Query to be executed
* @param expectedResults The expected results (ordered).
*/
protected void waitForIndexingOrdered(String query, ContentModel... expectedResults)
{
List<String> expectedNames = Arrays.stream(expectedResults).map(ContentModel::getName).collect(toList());
waitForIndexing(query, execution -> execution.isReturningOrderedValues("cmis:name", expectedNames));
}
/**
* Repeat Elastic Query until we get the expected results or we hit the retry limit.
*
* @param query CMIS Query to be executed
* @param assertionMethod A method that will be called to check the response and which will throw an AssertionError if they aren't what we want.
*/
protected void waitForIndexing(String query, Consumer<QueryResultAssertion> assertionMethod)
{
int searchCount = 0;
while (true)
{
try
{
cmisApi.withQuery(query).assertResultsCount().equals(expectedCountResults);
return true;
assertionMethod.accept(cmisApi.withQuery(query).assertValues());
return;
}
catch (AssertionError ae)
{
LOGGER.info(String.format("WaitForIndexing in Progress: %s", ae));
searchCount++;
if (searchCount < SEARCH_MAX_ATTEMPTS)
{
LOGGER.info(String.format("WaitForIndexing in Progress: %s", ae));
Utility.waitToLoopTime(getElasticWaitTimeInSeconds(), "Wait For Indexing");
}
else
{
throw ae;
}
}
Utility.waitToLoopTime(getElasticWaitTimeInSeconds(), "Wait For Indexing");
}
return false;
}
}

View File

@@ -1,12 +1,12 @@
package org.alfresco.cmis.search;
import java.util.List;
import java.util.Set;
import org.alfresco.utility.Utility;
import org.alfresco.utility.data.provider.XMLDataConfig;
import org.alfresco.utility.data.provider.XMLTestDataProvider;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FileType;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.QueryModel;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
@@ -17,6 +17,21 @@ public class SearchInFolderTests extends AbstractCmisE2ETest
private FolderModel parentFolder, subFolder1, subFolder2, subFolder3;
private FileModel subFile1, subFile2, subFile3, subFile4, subFile5;
/**
* Create test data in the following format:
* <pre>
* testSite
* +- parentFolder
* +- subFile5 (fifthFile.txt: "fifthFile content")
* +- subFolder1
* +- subFolder2
* +- subFolder3 (subFolder)
* +- subFile1 (firstFile.xls)
* +- subFile2 (.pptx)
* +- subFile3 (.txt)
* +- subFile4 (fourthFile.docx: "fourthFileTitle", "fourthFileDescription")
* </pre>
*/
@BeforeClass(alwaysRun = true)
public void createTestData() throws Exception
{
@@ -51,12 +66,164 @@ public class SearchInFolderTests extends AbstractCmisE2ETest
dataContent.deleteSite(testSite);
}
@Test(dataProviderClass = XMLTestDataProvider.class, dataProvider = "getQueriesData")
@XMLDataConfig(file = "src/test/resources/search-in-folder.xml")
public void executeCMISQuery(QueryModel query)
@Test
public void executeCMISQuery_selectFieldsFromFolder()
{
String currentQuery = String.format(query.getValue(), parentFolder.getNodeRef());
String query = "SELECT cmis:name, cmis:parentId, cmis:path, cmis:allowedChildObjectTypeIds" +
" FROM cmis:folder where IN_FOLDER('%s') AND cmis:name = 'subFolder'";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
Assert.assertTrue(waitForIndexing(currentQuery, query.getResults()), String.format("Result count not as expected for query: %s", currentQuery));
waitForIndexing(currentQuery, subFolder3);
}
@Test
public void executeCMISQuery_selectFieldsFromDocument()
{
String query = "SELECT cmis:name, cmis:objectId, cmis:lastModifiedBy, cmis:creationDate, cmis:contentStreamFileName" +
" FROM cmis:document where IN_FOLDER('%s') AND cmis:name = 'fourthFile'";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexing(currentQuery, subFile4);
}
@Test
public void executeCMISQuery_selectParentId()
{
String query = "SELECT cmis:parentId FROM cmis:folder where IN_FOLDER('%s')";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
// Expect to get the same parent for each of the three matches.
String parentId = parentFolder.getNodeRef();
List<String> expectedParentIds = List.of(parentId, parentId, parentId);
waitForIndexing(currentQuery, execution -> execution.isReturningOrderedValues("cmis:parentId", expectedParentIds));
}
@Test
public void executeCMISQuery_inFolder()
{
String query = "SELECT * FROM cmis:document where IN_FOLDER('%s')";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexing(currentQuery, subFile1, subFile2, subFile3, subFile4, subFile5);
}
@Test
public void executeCMISQuery_orderByNameAsc()
{
String query = "SELECT * FROM cmis:document where IN_FOLDER('%s') AND cmis:name NOT LIKE 'file%%' ORDER BY cmis:name ASC";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexingOrdered(currentQuery, subFile5, subFile1, subFile4);
}
@Test
public void executeCMISQuery_orderByNameDesc()
{
String query = "SELECT * FROM cmis:document where IN_FOLDER('%s') AND cmis:name NOT LIKE 'file%%' ORDER BY cmis:name DESC";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexingOrdered(currentQuery, subFile4, subFile1, subFile5);
}
@Test
public void executeCMISQuery_orderByLastModifiedAsc()
{
String query = "SELECT * FROM cmis:folder where IN_FOLDER('%s') ORDER BY cmis:lastModificationDate ASC";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexingOrdered(currentQuery, subFolder1, subFolder2, subFolder3);
}
@Test
public void executeCMISQuery_orderByLastModifiedDesc()
{
String query = "SELECT * FROM cmis:folder where IN_FOLDER('%s') ORDER BY cmis:lastModificationDate DESC";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexingOrdered(currentQuery, subFolder3, subFolder2, subFolder1);
}
@Test
public void executeCMISQuery_orderByCreatedBy()
{
String query = "SELECT * FROM cmis:document where IN_FOLDER('%s') ORDER BY cmis:createdBy DESC";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
// All the results were created by the same user, so we can't assert anything about the order.
waitForIndexing(currentQuery, subFile5, subFile1, subFile2, subFile3, subFile4);
}
@Test
public void executeCMISQuery_documentNameNotNull()
{
String query = "SELECT * FROM cmis:document where IN_FOLDER('%s') AND cmis:name IS NOT NULL";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexing(currentQuery, subFile1, subFile2, subFile3, subFile4, subFile5);
}
@Test
public void executeCMISQuery_folderNameNotNull()
{
String query = "SELECT * FROM cmis:folder where IN_FOLDER('%s') AND cmis:name IS NOT NULL";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexing(currentQuery, subFolder1, subFolder2, subFolder3);
}
@Test
public void executeCMISQuery_nameLike()
{
String query = "SELECT * FROM cmis:document where IN_FOLDER('%s') AND cmis:name LIKE 'fourthFile'";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexingOrdered(currentQuery, subFile4);
}
@Test
public void executeCMISQuery_doubleNegative()
{
String query = "SELECT * FROM cmis:folder where IN_FOLDER('%s') AND NOT(cmis:name NOT IN ('subFolder'))";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexingOrdered(currentQuery, subFolder3);
}
@Test
public void executeCMISQuery_nameInList()
{
String query = "SELECT * FROM cmis:document where IN_FOLDER('%s') AND cmis:name IN ('fourthFile', 'fifthFile.txt')";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexing(currentQuery, subFile4, subFile5);
}
@Test
public void executeCMISQuery_nameNotInList()
{
String query = "SELECT * FROM cmis:document where IN_FOLDER('%s') AND cmis:name NOT IN ('fourthFile', 'fifthFile.txt')";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexing(currentQuery, subFile1, subFile2, subFile3);
}
@Test
public void executeCMISQuery_nameDifferentFrom()
{
String query = "SELECT * FROM cmis:folder where IN_FOLDER('%s') AND cmis:name <> 'subFolder'";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
waitForIndexing(currentQuery, subFolder1, subFolder2);
}
@Test
public void executeCMISQuery_selectSecondaryObjectTypeIds()
{
String query = "SELECT cmis:secondaryObjectTypeIds FROM cmis:folder where IN_FOLDER('%s') AND cmis:name = 'subFolder'";
String currentQuery = String.format(query, parentFolder.getNodeRef());
cmisApi.authenticateUser(testUser);
Set<List<String>> expectedSecondaryObjectTypeIds = Set.of(List.of("P:cm:titled", "P:sys:localized"));
waitForIndexing(currentQuery, execution -> execution.isReturningValues("cmis:secondaryObjectTypeIds", expectedSecondaryObjectTypeIds, true));
Assert.assertTrue(waitForIndexing(currentQuery, 1), String.format("Result count not as expected for query: %s", currentQuery));
}
}

View File

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

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>17.109</version>
<version>20.36-SNAPSHOT</version>
</parent>
<developers>
@@ -66,6 +66,7 @@
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
@@ -73,6 +74,7 @@
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>cmis</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

View File

@@ -0,0 +1,564 @@
![in progress](https://img.shields.io/badge/Document_Level-In_Progress-yellow.svg?style=flat-square)
Back to [TAS Master Documentation](https://git.alfresco.com/tas/alfresco-tas-utility/wikis/home)
---
## Table of Contents
* [Synopsis](#synopsis)
* [Prerequisite](#prerequisite)
* [Installation](#installation-if-you-want-to-contribute)
* [Package Presentation](#package-presentation)
* [Sample Usage](#sample-usage)
* [How to write a test](#how-to-write-a-test)
* [How to generate models or check coverage](#how-to-generate-models-or-check-coverage)
* [How to run tests?](#how-to-run-tests)
* [from IDE](#from-ide)
* [from command line](#from-command-line)
* [Listeners](#listeners)
* [Test Results](#test-results)
* [Test Rail Integration](#test-rail-integration)
* [Configuration](#configuration)
* [How to enable Test Rail Integration?](#how-to-enable-test-rail-integration)
* [Reference](#reference)
* [Change Log](docs/CHANGELOG.md) 🌟
* [Contributors](#contributors)
* [Releasing](#releasing)
* [License](#license)
## Synopsis
**TAS**( **T**est **A**utomation **S**ystem)- **RESTAPI** is the project that handles the automated tests related only to [Alfresco REST API](http://docs.alfresco.com/5.1/pra/1/topics/pra-welcome.html).
It is based on Apache Maven, compatible with major IDEs and is using also Spring capabilities for dependency injection.
As a high level overview, this project makes use of the following functionality useful in automation testing as:
* reading/defining test environment settings (e.g. alfresco server details, authentication, etc.)
* managing resource (i.e. creating files and folders)
* test data generators (for site, users, content, etc)
* helpers (i.e. randomizers, test environment information)
* test logging generated on runtime and test reporting capabilities
* test management tool integration (at this point we support integration with [Test Rail](https://alfresco.testrail.net) (v5.2.1)
* health checks (verify if server is reachable, if server is online)
* generic Internal-DSL (Domain Specific Language)
Using Nexus -Release Repository, everyone will be able to use individual interfaces in their projects by extending the automation core functionalities.
**[Back to Top ^](#table-of-contents)**
## Prerequisite
(tested on unix/non-unix destribution)
* [Java SE 1.8](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
* [Maven 3.3](https://maven.apache.org/download.cgi) installed and configure according to [Windows OS](https://maven.apache.org/guides/getting-started/windows-prerequisites.html) or [Mac OS](https://maven.apache.org/install.html).
* Configure Maven to use Alfresco alfresco-internal repository following this [Guide](https://ts.alfresco.com/share/page/site/eng/wiki-page?title=Maven_Setup).
* Your favorite IDE as [Eclipse](https://eclipse.org/downloads/) or [InteliJ](https://www.jetbrains.com/idea).
* Access to [Nexus](https://nexus.alfresco.com/nexus/) repository.
* Access to Gitlab [TAS](https://gitlab.alfresco.com/tas/) repository.
* GitLab client for your operating system. (we recommend [SourceTree](https://www.sourcetreeapp.com) - use your google account for initial setup).
* Getting familiar with [Basic Git Commands](http://docs.gitlab.com/ee/gitlab-basics/basic-git-commands.html).
* Getting familiar with [Maven](https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html).
* Getting familiar with [Spring](http://docs.spring.io).
* Getting familiar with [TestNG](http://testng.org/doc/index.html)
**[Back to Top ^](#table-of-contents)**
## Installation (if you want to contribute)
* Open your Gitlab client and clone the repository of this project.
* You can do this also from command line (or in your terminal) adding:
```bash
$ git clone https://git.alfresco.com/tas/alfresco-tas-restapi-test.git
# this clone will have the latest changes from repository. If you want to checkout a specific version released, take a look at the [Change Log](docs/CHANGELOG.md) page
$ cd alfresco-tas-tester
# this command will checkout the remove v2.0.0 tagged repository and create locally a new branch v2.0.0
$ git checkout tags/v2.0.0 -b v2.0.0
```
* Install and check if all dependencies are downloaded
```bash
> cd alfresco-tas-restapi-test
> mvn clean install -DskipTests
# you should see one [INFO] BUILD SUCCESS message displayed
```
**[Back to Top ^](#table-of-contents)**
## Package Presentation
The project uses a maven layout [archetype](https://maven.apache.org/plugins-archives/maven-archetype-plugin-1.0-alpha-7/examples/simple.html):
```ruby
├── pom.xml
├── report.html
├── src
   ├── main
      └── java
      └── org
      └── alfresco
      └── rest
      ├── core
         ├── assertion
  ├── IModelAssertion.java
        ├── IModelsCollectionAssertion.java
        ├── (...)
        └── PaginationAssertionVerbs.java
         ├── swagger
      ├── Generator.java
      ├── RestModelProperty.java
      ├── (...)
      └── SwaggerYamlParser.java
         ├── IRestModel.java
         ├── IRestModelsCollection.java
         ├── (...)
         ├── RestResponse.java
         └── RestWrapper.java
      ├── exception
         ├── EmptyJsonResponseException.java
      ├── EmptyRestModelCollectionException.java
      └── JsonToModelConversionException.java
      ├── model
  ├── builder  
        └── NodesBuilder.java
      ├── RestActivityModel.java
      ├── RestActivityModelsCollection.java
      ├── (...)
      └── RestVariableModelsCollection.java
├── requests
├── authAPI  
        └── RestAuthAPI.java
      ├── coreAPI
└── RestCoreAPI.java
      ├── workflowAPI
└── RestWorkflowAPI.java
├── Deployments.java
      ├── (...)
      └── Tenant.java
   ├── test
      ├── java
         └── org
         └── alfresco
         └── rest
         ├── auth
└── AuthTests.java
├── comments
├── AddCommentCoreTests.java
├── (...)
         ├── (...)
├── workflow
├── deployments
├── DeleteDeploymentCoreFullTests.java
├── (...)
├── processDefinitions
├── GetProcessDefinitionCoreTests.java
├── (...)
├── (...)
         ├── FunctionalCasesTests.java
         └── RestTest.java
      └── resources
      ├── alfresco-restapi-context.xml
      ├── default.properties
      └── log4j.properties
```
**[Back to Top ^](#table-of-contents)**
## Sample Usage
Following the standard layout for Maven projects, the application sources locate in src/main/java and test sources locate in src/test/java.
Application sources consist in defining the REST API object that simulates the calls: get, post, put, delete.
The tests are based on an abstract object: Rest.java that handles the common behavior: checking the health status of the test server, configuration settings, getting the general properties, etc.
Please take a look at [RestDemoTests.java](src/test/java/org/alfresco/rest/demo/RestDemoTests.java) class for an example.
Common configuration settings required for this project are stored in properties file, see [default.properties](src/test/resources/default.properties).
Please analyze and update it accordingly with Alfresco test server IP, port, credentials, etc.
Example:
```java
# Alfresco HTTP Server Settings
alfresco.scheme=http
alfresco.server=<add-here-the-ip-of-your-test-server>
alfresco.port=<default-port-for-alfresco-not-share>
```
* optional update the logging level in [log4j](src/test/resources/log4j.properties) file (you can increase/decrease the deails of the [logging file](https://logging.apache.org/log4j/1.2/manual.html), setting the ```log4j.rootLogger=DEBUG``` if you want.)
* go to [running](#how-to-run-tests) section for more information on how to run this tests.
**[Back to Top ^](#table-of-contents)**
### How to write a test
* Please also take a look at the [Rest-API desing and implementation](https://ts.alfresco.com/share/page/site/eng/document-details?nodeRef=workspace://SpacesStore/9f7823e7-0597-4435-9fd1-6ec8a4791259) guidelines.
* Tests are organized in java classes and located on src/test/java as per maven layout.
* One test class should contain the tests that cover one functionality as we want to have a clear separation of test scope: tests for sanity/core/full, tests that verify manage of folder/files etc.
* These are the conventions that need to follow when you write a test:
* The test class has @Test annotation with the group defined: rest-api. You can add more groups like sanity, regression
```java
@Test(groups={ TestGroup.COMMENTS}
```
* The test has @TestRail annotation in order to assure that the details and results will be submitted on TestRail. The fields for TestRail annotation will be explained on next chapter.
```java
@TestRail(section={TestGroup.REST_API, TestGroup.PEOPLE}, executionType= ExecutionType.SANITY,
description = "Verify admin user gets person with Rest API and response is not empty")
public void adminShouldRetrievePerson() throws Exception
{
peopleAPI.getPerson(userModel.getUsername())
.assertResponseIsNotEmpty();
restClient.assertStatusCodeIs(HttpStatus.OK.toString());
}
```
* Use Spring capabilities to initialize the objects(Models, Wrappers) with @Autowired
* To view a simple class that is using this utility, just browse on [RestDemoTests.java]((src/test/java/org/alfresco/rest/demo/RestDemoTests.java)
Notice the class definition and inheritance value:
```java
public class RestDemoTest extends RestTest
```
* as a convention, before running your test, check if the test environment is reachable and your alfresco test server is online.
(this will stop the test if the server defined in your property file is not healthy - method available in parent class)
```java
@BeforeClass(alwaysRun = true)
public void setupRestTest() throws Exception{
serverHealth.assertServerIsOnline();
}
```
* the test name are self explanatory:
```java
@TestRail(section={TestGroup.REST_API, TestGroup.SITES}, executionType= ExecutionType.SANITY,
description = "Verify admin user gets sites with Rest API and status code is 200")
public void adminShouldRetrieveSites() throws JsonToModelConversionException, Exception
{
siteAPI.getSites();
restClient()
.assertStatusCodeIs(HttpStatus.OK.toString());
}
```
* Asserting on imbricated keys:
Let's say your response is something like:
```json
{"entry": {
"createdAt": "2017-08-01T12:01:24.979+0000",
"edited": false,
"modifiedBy": {
"firstName": "Administrator"
}
}}
```
if you want to assert that firstName is "Administrator" you can do that using the following DSL:
```java
restClient.onResponse().assertThat().body("entry.modifiedBy.firstName", org.hamcrest.Matchers.is("Administrator"));
```
(notice that i'm using Hamcrest Matcher to finalize this assertion)
**[Back to Top ^](#table-of-contents)**
### How to generate models or check coverage
There are some simple generators that could parse [Swagger YAML](http://docs.alfresco.com/community/concepts/alfresco-sdk-tutorials-using-rest-api-explorer.html) files and provide some usefull information to you like:
a) Show on screen the actual coverage of TAS vs requests that exists in each YAML file - defined in pom.xml)
```bash
mvn exec:java -Dcoverage
```
Any missing request are saved under "missing-requests```<yaml-file-name>```.txt" file for further analysis
All current implementation are saved under "implemented-requests```<yaml-file-name>```.txt"
![](docs/pics/coverage.png)
b) Generate all missing models
```bash
mvn exec:java -Dmodels
```
This command will read all definitions of models from swagger YAML file predefined in pom.xml file.
It will compare with this file pattern: 'Rest```<model-definition-name>```Model.java', file created under ```/src/main/java/org/alfresco/rest/model``` ignoring the ones that are specified in [ignore-models](src/main/java/org/alfresco/rest/model/ignore-models) file.
![](docs/pics/models-all.png)
At this time you you will be prompted to select (based on displayed ID) what models you want to generate (separate each one by comma).
(you can also skip the generation of models from select yaml file or generate all missing models)
c) Generate specific models
Maybe you want to generate/regenerate just one model or multiple ones.
```bash
mvn exec:java -Dmodels=Error,SiteModel
```
This command will parse the Swagger YAML file, and will generate the definition of only those specified models, even if those models exist locally (in this case you will be prompted to override that file or not)
_NOTE_: there are some fields that are marked as ```required``` in swagger file. We also generate those fields with annotation ```@JsonProperty(required = true)```
All models are generated based on a [freemarker](http://freemarker.org) template found [here](src/main/resources/rest-model.ftl).
### How to run tests
#### from IDE
* The project can be imported into a development environment tool (Eclipse or IntelliJ). You have the possibility to execute tests or suite of tests using [TestNG plugin](http://testng.org/doc/eclipse.html) previously installed in IDE.
* In case you are using the default settings that points to localhost (127.0.0.1) and you don't have Alfresco installed on your machine, you will see one exception thrown (as expected):
```java
org.alfresco.utility.exception.ServerUnreachableException: Server {127.0.0.1} is unreachable.
```
#### from command line
* In terminal or CMD, navigate (with CD) to root folder of your project (you can use the sample project):
The tests can be executed on command line/terminal using Maven command
```bash
mvn test
```
This command with trigger the tests specified in the default testng suite from POM file: <suiteXmlFile>src/main/resources/shared-resources/restapi-acs-community-suite.xml</suiteXmlFile>
You can use -Dtest parameter to run the test/suites through command line (http://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html).
You can also specify a different suiteXMLFile like:
```bash
mvn test -DsuiteXmlFile=src/resources/your-custom-suite.xml
```
Or even a single test:
```bash
mvn test -Dtest=org.alfresco.rest.RestDemoTest
```
But pay attention that you will not have enabled all the [listeners](#listeners) in this case (the Reporting listener or TestRail integration one)
**[Back to Top ^](#table-of-contents)**
## Listeners
With the help of Listeners we can modify the behavior of TestNG framework. There are a lot of testNG listener interfaces that we can override in order to provide new functionalities.
The TAS framework provides out of the box a couple of listeners that you could use. These could be enabled and added at the class level or suite level.
### a) org.alfresco.utility.report.ReportListenerAdapter
* if added at the class level:
```java
@Listeners(value=ReportListenerAdapter.class)
public class MyTestClass extends RestTest
{
(...)
}
```
* or suite xml level
```java
<suite name="Your Suite test" parallel="classes">
<listeners>
<listener class-name="org.alfresco.utility.report.ReportListenerAdapter"></listener>
</listeners>
(...)
</suite>
```
It will automatically generate one html named "report.html" in ./target/report folder.
Please also take a look at [Test Results](#test-results) section.
### b) org.alfresco.utility.testrail.TestRailExecutorListener
It will automatically update Test Rail application with the test cases that you've automated.
Please take a look at [Test Rail Integration](#test-rail-integration) section for more details.
### c) org.alfresco.utility.report.log.LogsListener
This is a new listener that will generate further details in one XML format of the automated test steps that you will write.
Example:
```java
public void myDSLMethod1()
{
STEP("Lorem ipsum dolor sit amet");
//code for first step
STEP("consectetur adipiscing elit");
//code for the next description
}
public void myDSLMethod2()
{
STEP("sed do eiusmod tempor incididunt ut labore");
//code for first step
STEP("et dolore magna aliqua");
//code for the next description
}
```
If these methods will be executed insite a test method, all those steps will be automatically logged in the XML report generated.
Example:
```java
@Test
public void adminShouldCreateFileInSite()
{
myDSLMethod1();
myDSLMethod2()
}
```
So if "testingSomething" will be executed this is what you will see on the XML file generated. (please take a look at [Test Results](#test-results) section for defining the defaul location)
Here is one example of XML file generated with these steps:
![](docs/pics/xml-steps-report.JPG)
**[Back to Top ^](#table-of-contents)**
## Test Results
We already executed a couple of tests using command line as indicated above. Sweet! Please take a look at [rest-suites.xml](src/main/resources/shared-resources/restapi-acs-community-suite.xml) one more time.
You will see there that we have one listener added:
```java
<listener class-name="org.alfresco.utility.report.HtmlReportListener"></listener>
```
This will tell our framework, after we run all tests, to generate one HTML report file with graphs and metrics.
Take a look at the target/reports folder (created after running the tests) and open the report.html file.
![](docs/pics/html-report-sample.JPG)
Playing with this report, you will notice that you will be able to:
* search tests cases by name
* filter test cases by errors, labels, groups, test types, date when it was executed, protocol used, etc.
* view overall pass/fail metrics of current test suite, history of tests execution, etc.
The report path can be configured in default.properties):
```
# The location of the reports path
reports.path=your-new-location-of-reports
```
**[Back to Top ^](#table-of-contents)**
## Test Rail Integration
Alfresco is using now https://alfresco.testrail.net (v5.3.0.3601).
We aim to accelerate the delivery of automated test by minimizing the interaction with the test management tool - TestRail. In this scope we developed the following capabilities:
* creating automatically the manual tests in TestRail
* submitting the test results (with stack trace) after each execution into TestRail Test Runs
* adding the test steps for each test.
### Configuration
In order to use Test Rail Integration you will need to add a couple of information in [default.properties](src/test/resources/default.properties) file:
(the document is pretty self explanatory)
```java
# Example of configuration:
# ------------------------------------------------------
# testManagement.enabled=<true/false>
# testManagement.endPoint=https://alfresco.testrail.com/
# testManagement.username=<yourusername-that-you-connect-to-testrail>
# testManagement.apiKey=<api-key>
# testManagement.project=<id-of-your-project
# testManagement.includeOnlyTestCasesExecuted=<true/false>
# testManagement.rateLimitInSeconds= 1
# testManagement.testRun=<test-run-name>
# testManagement.suiteId=<suite-id>
```
!This settings are already defined in default.properties for you.
For generating a new API Key take a look at the official documentation, TestRail [APIv2](http://docs.gurock.com/testrail-api2)
* _testManagement.project= **<id-of-your-project**_ this is the ID of the project where you want to store your test cases.
If you want to use [Alfresco ONE](https://alfresco.testrail.net/index.php?/projects/overview/1) project in TestRail, open that project and notice the URL, after "/overview/**1**" link you will see the ID of the project (1 in this case)
If you want to use [TAS Project](https://alfresco.testrail.net/index.php?/projects/overview/7) you will notice the ID 7, so _"testManagement.project=7"_
* "_testManagement.testRun=<test-run-name>_" this represents the name of the Test Run from your project.
* In Test Rail, navigating to Test Runs & Results, create a new Test Run and include all/particular test cases. If this test run name is "Automation", update _testManagement.testRun= **Automation**_.
All test results will be updated only on this test run at runtime as each test is executed by TAS framework.
### How to enable Test Rail Integration?
We wanted to simplify the Test Rail integration, so we used listeners in order to enable/disable the integration of Test Rail.
* first configure your default.properties as indicated above
* now on your TestNG test, add the @TestRail annotation, so let's say you will have this test:
```java
@Test(groups="sample-tests")
public void thisAutomatedTestWillBePublishedInTestRail()
{
}
```
add now @TestRail integration with mandatory field ```section```. This means that this tests annotated, will be uploaded in TestRail:
```java
@Test(groups= TestGroup.REST_API, TestGroup.FULL,)
@TestRail(section = {TestGroup.REST_API, TestGroup.PROCESSES })
public void thisAutomatedTestWillBePublishedInTestRail()
{
}
```
The section field, represents an array of strings, the hierarchy of sections that SHOULD be found on TestRail under the project you've selected in default.properties. Follow the TestRail [user-guide](http://docs.gurock.com/testrail-userguide/start) for more information regarding sections.
In our example we created in Test Rail one root section "restAPI" with a child section: "processes" (you can go further and add multiple section as you wish)
* now, lets add the listener, the TestRailExecutorListener that will handle this TC Management interaction.
This listener can be added at the class level or suite level (approach that we embrace)
Take a look at [restapi-acs-community-suite.xml](src/main/resources/shared-resources/restapi-acs-community-suite.xml) for further example.
```xml
<listeners>
<listener class-name="org.alfresco.utility.report.HtmlReportListener"></listener>
(...)
</listeners>
```
Right click on sanity-suite.xml file and run it, or just "mvn test" from root if this sample project.
After everything passes, go in Test Rail, open your project and navigate to "Test Cases" section. Notice that under restApi/processes section, you will see your test case published.
If you defined also the "testManagement.testRun" correctly, you will see under Test Runs, the status of this case marked as passed.
The @TestRail annotation offers also other options like:
- "description" this is the description that will be updated in Test Rail for your test case
- "testType", the default value is set to Functional test
- "executionType", default value is set to ExecutionType.REGRESSION, but you can also use ExecutionType.SMOKE, ExecutionType.SANITY, etc
Take a look at the demo scenarios in this project for further examples.
**[Back to Top ^](#table-of-contents)**
## Reference
* For any improvements, bugs, please use Jira - [TAS](https://issues.alfresco.com/jira/browse/TAS) project.
* Setup the environment using [docker](https://gitlab.alfresco.com/tas/alfresco-docker-provisioning/blob/master/Readme.md).
* [Bamboo Test Plan](https://bamboo.alfresco.com/bamboo/browse/TAS-RESTAPI)
## Contributors
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other... [more](CODE_OF_CONDUCT.md)
## Releasing
Any commit done on this project should be automatically executed by [TAS Build Plan](https://bamboo.alfresco.com/bamboo/browse/TAS-TAS)
If the build passes, then you didn't broke anything.
If you want to perform a release, open [TAS-RestAPI](https://bamboo.alfresco.com/bamboo/browse/TAS-RESTAPI) Bamboo Build.
Run the Default stage and if it passes, then manually perform the Release stage (this will auto-increment the version in pom.xml)

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -2,27 +2,26 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.alfresco.tas</groupId>
<artifactId>alfresco-community-repo-restapi-test</artifactId>
<name>restapi test</name>
<packaging>jar</packaging>
<artifactId>restapi</artifactId>
<name>alfresco-tas-restapi</name>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>17.109</version>
<version>20.36-SNAPSHOT</version>
</parent>
<developers>
<developer>
<name>Paul Brodner</name>
<roles>
<role>Test Automation Architect</role>
</roles>
</developer>
</developers>
<properties>
<suiteXmlFile>${project.basedir}/src/test/resources/restapi-suite.xml</suiteXmlFile>
<maven.build.sourceVersion>11</maven.build.sourceVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<rest.api.explorer.branch>master</rest.api.explorer.branch>
<httpclient-osgi-version>4.5.6</httpclient-osgi-version>
<org.glassfish.version>1.1.4</org.glassfish.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<scribejava-apis.version>8.3.1</scribejava-apis.version>
<license-maven-plugin.version>2.0.1.alfresco-2</license-maven-plugin.version>
<java.version>11</java.version>
</properties>
<profiles>
@@ -47,26 +46,146 @@
</profiles>
<dependencies>
<!-- fix the info log messages related to Could not instantiate TestExecutionListener
[org.springframework.test.context.web.ServletTestExecutionListener -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<!-- alfresco tester settings -->
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId>
<scope>test</scope>
<artifactId>utility</artifactId>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
</exclusion>
<exclusion>
<artifactId>commons-lang</artifactId>
<groupId>commons-lang</groupId>
</exclusion>
<exclusion>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<!-- REST ASSURED -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
<version>${httpclient-osgi-version}</version>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>json-path</artifactId>
<exclusions>
<exclusion>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>xml-path</artifactId>
<exclusions>
<exclusion>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>json-schema-validator</artifactId>
</dependency>
<dependency>
<groupId>com.github.scribejava</groupId>
<artifactId>scribejava-apis</artifactId>
<version>${scribejava-apis.version}</version>
</dependency>
<!-- JSON to Object -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.glassfish/javax.json -->
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>${org.glassfish.version}</version>
</dependency>
<!-- swagger parser -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-parser</artifactId>
<exclusions>
<exclusion>
<artifactId>commons-lang3</artifactId>
<groupId>org.apache.commons</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</dependency>
<!--fixing java.lang.ClassCastException: class [B cannot be cast to class [C ([B and [C are in module java.base of loader 'bootstrap') -->
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>3.0.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-json</artifactId>
<version>3.0.12</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
@@ -96,6 +215,32 @@
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>**/*UnitTest*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<arguments>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-auth.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-core.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-discovery.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-search.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-workflow.yaml</argument>
</arguments>
<mainClass>org.alfresco.rest.core.swagger.Generator</mainClass>
</configuration>
</plugin>
</plugins>
</build>

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