Compare commits

...

775 Commits

Author SHA1 Message Date
alfresco-build
b461f384ff [maven-release-plugin][skip ci] prepare release 20.41-DEV 2022-12-14 12:03:22 +00:00
Damian.Ujma@hyland.com
9ed4658d69 ACS-3841 Test releasing & updating downstream 2022-12-14 12:39:32 +01:00
Damian.Ujma@hyland.com
0f4d2a8e28 ACS-3841 Test releasing & updating downstream 2022-12-14 12:37:47 +01:00
Damian.Ujma@hyland.com
bc1197cc46 ACS-3841 Test releasing & updating downstream 2022-12-14 12:33:11 +01:00
Damian.Ujma@hyland.com
d07a47d088 ACS-3841 Set continue-on-error [tas][db][ags] 2022-12-14 10:47:11 +01:00
Damian.Ujma@hyland.com
94cb9de79b ACS-3841 Fix tests [tas][db][ags] 2022-12-14 08:52:47 +01:00
Damian.Ujma@hyland.com
841735491d ACS-3841 Improve conditions [tas][db][ags] 2022-12-13 16:54:01 +01:00
Damian.Ujma@hyland.com
42e29d95de ACS-3841 Improve conditions [tas][db][ags] 2022-12-13 16:51:59 +01:00
Damian.Ujma@hyland.com
5749a1a67a ACS-3841 Improve maven_release.sh 2022-12-12 10:37:09 +01:00
Damian.Ujma@hyland.com
9dce05cb5b Merge branch 'master' into feature/ACS-3841_migrate_to_gha 2022-12-12 10:28:02 +01:00
Travis CI User
c1198a0145 [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-11 00:10:54 +00:00
Travis CI User
6bd50fda1a [maven-release-plugin][skip ci] prepare release 20.40 2022-12-11 00:10:52 +00:00
Alfresco CI User
ace6eca99b [force] Force release for 2022-12-11. 2022-12-11 00:03:34 +00:00
Travis CI User
0f8349dc4c [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-09 10:34:04 +00:00
Travis CI User
eb7bcbfbfb [maven-release-plugin][skip ci] prepare release 20.39 2022-12-09 10:34:02 +00:00
dependabot[bot]
d9bbc9c628 Bump alfresco-googledrive-repo-community (#1611)
Bumps [alfresco-googledrive-repo-community](https://github.com/Alfresco/googledrive) from 3.3.1-DEV-LOG4J2 to 3.4.0-A1.
- [Release notes](https://github.com/Alfresco/googledrive/releases)
- [Changelog](https://github.com/Alfresco/googledrive/blob/master/docs/build-and-release-101.md)
- [Commits](https://github.com/Alfresco/googledrive/compare/3.3.1-DEV-LOG4J2...3.4.0-A1)

---
updated-dependencies:
- dependency-name: org.alfresco.integrations:alfresco-googledrive-repo-community
  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-12-09 10:53:15 +01:00
Travis CI User
5c434f7898 [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-08 17:19:04 +00:00
Travis CI User
06a25a48da [maven-release-plugin][skip ci] prepare release 20.38 2022-12-08 17:19:01 +00:00
Maciej Pichura
f511436823 ACS-4032 create category (multiple categories pagination fix) (#1610)
* ACS-4032: Some fixes and refactors after verification. Fixing pagination info on POST multiple entities response.

* ACS-4032: Some fixes and refactors after verification. Fixing pagination info on POST multiple entities response.

* Fixing a test STEP description

Co-authored-by: Tom Page <tpage-alfresco@users.noreply.github.com>

Co-authored-by: Tom Page <tpage-alfresco@users.noreply.github.com>
2022-12-08 17:40:56 +01:00
Travis CI User
f96b3012c4 [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-08 10:17:34 +00:00
Travis CI User
415aa2ca33 [maven-release-plugin][skip ci] prepare release 20.37 2022-12-08 10:17:31 +00:00
Maciej Pichura
b701f9a994 ACS-4032 Create category (POST) (#1606)
* 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-4032: Initial code for POST category endpoint.

* ACS-4032: Full implementation for POST category endpoint + tests.

* ACS-4032: Some fixes and refactors after code review.
2022-12-08 10:43:22 +01:00
Travis CI User
d04043b015 [maven-release-plugin][skip ci] prepare for next development iteration 2022-12-08 08:59:35 +00:00
Travis CI User
e3241fe178 [maven-release-plugin][skip ci] prepare release 20.36 2022-12-08 08:59:32 +00:00
Damian Ujma
ea8ed0eec3 ACS-4142 Update AOS version (#1607) 2022-12-08 09:20:03 +01:00
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
Damian.Ujma@hyland.com
f06f2edaa1 ACS-3841 Rename directory [db][tas][db][ags][ags on MySQL] 2022-12-05 17:02:19 +01: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
Damian.Ujma@hyland.com
24e685b70e ACS-3841 Set preserve-order to false [ags] 2022-12-05 15:06:24 +01:00
mpichura
7cd154ef86 ACS-4005: Removing duplicate RestTest class. 2022-12-05 14:29:19 +01:00
Damian.Ujma@hyland.com
e603f7882f ACS-3841 Revert ubuntu version for ags rest api test [ags] 2022-12-05 10:23:04 +01:00
Damian.Ujma@hyland.com
683e73e687 ACS-3841 Add the license header [ags] 2022-12-05 09:51:35 +01:00
Damian.Ujma@hyland.com
15fe18ca9f ACS-3841 Run on ubuntu-18.04 [ags] 2022-12-05 09:43:52 +01:00
Damian.Ujma@hyland.com
ce47b25fd8 ACS-3841 Test AlphabeticallyPriorityInterceptor [ags] 2022-12-05 09:31:23 +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
Damian.Ujma@hyland.com
cc3d965414 Revert "ACS-3841 Test without records [ags]"
This reverts commit 9ee412df04.
2022-12-01 10:17:44 +01: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
Damian.Ujma@hyland.com
9ee412df04 ACS-3841 Test without records [ags] 2022-11-28 17:14:10 +01:00
Damian.Ujma@hyland.com
e9a0a31c84 ACS-3841 Reverse tests order [ags] 2022-11-28 16:29:07 +01:00
Damian.Ujma@hyland.com
7dd8aef46c ACS-3841 Reverse tests order [ags] 2022-11-28 16:26:08 +01:00
Damian.Ujma@hyland.com
4e14c2cbd7 ACS-3841 Fix test order [db][tas][db][ags][ags on MySQL] 2022-11-28 14:57:41 +01:00
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
Damian.Ujma@hyland.com
b618ea7e06 ACS-3841 Fix condition [db][tas][db][ags][ags on MySQL] 2022-11-25 16:27:21 +01:00
Damian.Ujma@hyland.com
f67a08c7e3 ACS-3841 Improve jobs conditions [db][tas][db][ags][ags on MySQL] 2022-11-25 16:13:33 +01: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
Damian.Ujma@hyland.com
1a3d59dfa1 ACS-3841 Fix steps [db][tas][db][ags][ags on MySQL] 2022-11-25 13:26:11 +01:00
Damian.Ujma@hyland.com
1b6d8af497 ACS-3841 Fix custom action [db][tas][db][ags][ags on MySQL] 2022-11-25 13:23:45 +01:00
Damian.Ujma@hyland.com
c4c910b13e Revert "ACS-3841 Remove useless var [db][tas][db][ags][ags on MySQL]" 2022-11-25 13:21:57 +01:00
Damian.Ujma@hyland.com
e9af1baa86 ACS-3841 Test 2022-11-25 13:20:42 +01:00
Damian.Ujma@hyland.com
7927c7a119 ACS-3841 Test 2022-11-25 13:19:40 +01:00
Damian.Ujma@hyland.com
3a5c47babb ACS-3841 Test 2022-11-25 13:18:19 +01:00
Damian.Ujma@hyland.com
7f6c503434 ACS-3841 Remove useless var [db][tas][db][ags][ags on MySQL] 2022-11-25 13:17:04 +01:00
Damian.Ujma@hyland.com
18acbf65dc ACS-3841 Use custom actions to setup build tools [db][tas][db][ags][ags on MySQL] 2022-11-25 13:08:32 +01:00
Damian.Ujma@hyland.com
50b7d83495 ACS-3841 Remove travis references 2022-11-25 09:38:15 +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
Damian.Ujma@hyland.com
c9f64210e4 ACS-3841 Remove quay login step [db][tas][db][ags][ags on MySQL] 2022-11-24 16:27:38 +01:00
Damian.Ujma@hyland.com
4bbf264cdc ACS-3841 Fix remote-api tests [db][tas][db][ags][ags on MySQL] 2022-11-24 15:57:29 +01:00
Damian.Ujma@hyland.com
7c21ec298d ACS-3841 Fix remote-api tests [db][tas][db][ags][ags on MySQL] 2022-11-24 15:47:07 +01: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
Damian.Ujma@hyland.com
85d7fccf11 ACS-3841 Test [db][tas][db][ags][ags on MySQL] 2022-11-24 13:57:07 +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
Damian.Ujma@hyland.com
e51457d535 ACS-3841 Test [db][tas][db][ags][ags on MySQL] 2022-11-23 16:27:18 +01: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
Damian.Ujma@hyland.com
f5bbdd7ead ACS-3841 Fix syntax [tas] 2022-11-23 14:39:55 +01:00
Damian.Ujma@hyland.com
8885e91a58 ACS-3841 Fix syntax [tas] 2022-11-23 14:33:28 +01:00
Damian.Ujma@hyland.com
d652244292 ACS-3841 Test Remote-api-AppContextTestSuites + [tas] 2022-11-23 14:19:32 +01:00
Damian.Ujma@hyland.com
f04ca4b77f ACS-3841 Fix transformers tag 2022-11-23 12:22:02 +01:00
Damian.Ujma@hyland.com
ad2b107afd ACS-3841 Fix transformers tag 2022-11-23 12:12:32 +01:00
Damian.Ujma@hyland.com
75f68c612e ACS-3841 Fix internal script 2022-11-23 12:05:06 +01:00
Damian.Ujma@hyland.com
d3ff57bffc ACS-3841 Fix matrix strategy vars 2022-11-23 11:34:29 +01:00
Damian.Ujma@hyland.com
82efc2e564 ACS-3841 Add mariadb matrix tests 2022-11-23 10:38:17 +01:00
Damian.Ujma@hyland.com
af3e6f6009 ACS-3841 Test a matrix strategy 2022-11-23 10:00:06 +01:00
Sbisht19
38a9f6d3e1 Merge pull request #1531 from Alfresco/feature/APPS-1722
Feature/apps 1722
2022-11-23 14:12:02 +05:30
Damian.Ujma@hyland.com
457bb5b469 ACS-3841 Test a matrix strategy 2022-11-23 09:36:46 +01:00
Damian.Ujma@hyland.com
0f70ac9eba ACS-3841 Test a matrix strategy 2022-11-23 09:31:40 +01:00
Damian.Ujma@hyland.com
2bff9eeb00 Revert "ACS-3465 Redefine the tests order"
This reverts commit 670ff0de10.
2022-11-22 10:30:30 +01:00
Damian.Ujma@hyland.com
46b3021541 ACS-3841 Rename the ci scripts directory 2022-11-22 10:30:20 +01:00
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
Damian.Ujma@hyland.com
614884a4f6 ACS-3841 Fix step env 2022-11-21 17:21:04 +01:00
Damian.Ujma@hyland.com
615759f148 ACS-3841 Create docker-compose for dbs 2022-11-21 17:01:21 +01:00
Damian.Ujma@hyland.com
d323e7e3aa ACS-3841 Fix postgres port 2022-11-21 16:20:31 +01:00
Damian.Ujma@hyland.com
fee2a75049 Merge branch 'master' into feature/ACS-3841_migrate_to_gha 2022-11-21 16:11:39 +01:00
Damian.Ujma@hyland.com
35b2d64876 ACS-3841 Fix docker-compose 2022-11-21 15:37:18 +01:00
Damian.Ujma@hyland.com
115260470c ACS-3841 Fix docker-compose 2022-11-21 15:29:15 +01:00
Damian.Ujma@hyland.com
16727dce57 ACS-3841 Test cache local Maven 2022-11-21 14:58:18 +01: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Damian.Ujma@hyland.com
670ff0de10 ACS-3465 Redefine the tests order 2022-09-02 08:54:03 +02: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
Damian.Ujma@hyland.com
e93ea3bcce ACS-3465 Fix 'needs' section 2022-09-01 13:39:58 +02:00
Damian.Ujma@hyland.com
f70743ed33 ACS-3465 Add required global env variables 2022-09-01 10:44:14 +02:00
Damian.Ujma@hyland.com
95ba57d06f Merge branch 'feature/ACS-3465_migrating_to_gh_actions' of github.com:Alfresco/alfresco-community-repo into feature/ACS-3465_migrating_to_gh_actions 2022-09-01 10:38:05 +02:00
Damian.Ujma@hyland.com
cb165c67b1 ACS-3465 Remove unnecessary conditions 2022-09-01 10:37:43 +02:00
mikolajbrzezinski
ca276a9e82 fix ifs 2022-09-01 10:11:24 +02:00
Damian.Ujma@hyland.com
c7f6e876dd ACS-3465 Add jobs names 2022-09-01 09:55:22 +02:00
Damian.Ujma@hyland.com
b6131b3dd3 ACS-3465 Revert changes in build.sh 2022-08-31 16:28:12 +02:00
Damian.Ujma@hyland.com
54b96280fc ACS-3465 Add a dependency to AGS-Community-Rest-API-Tests 2022-08-31 16:13:47 +02:00
Damian.Ujma@hyland.com
48fa7748f1 ACS-3465 Fix on.push.branches 2022-08-31 16:12:53 +02:00
Damian.Ujma@hyland.com
5f6795eff0 Merge branch 'feature/ACS-3465_migrating_to_gh_actions_du' of github.com:Alfresco/alfresco-community-repo into feature/ACS-3465_migrating_to_gh_actions_du
 Conflicts:
	.github/workflows/ci.yml
2022-08-31 16:11:00 +02:00
Damian.Ujma@hyland.com
e9c87493d0 ACS-3465 Add a condition for AGS-Community-Rest-API-Tests 2022-08-31 16:06:06 +02:00
Damian.Ujma@hyland.com
440582d176 ACS-3465 Remove maven version forcing 2022-08-31 16:01:21 +02:00
Damian.Ujma@hyland.com
9353865c25 Merge branch 'feature/ACS-3465_migrating_to_gh_actions' into feature/ACS-3465_migrating_to_gh_actions_du
# Conflicts:
#	.github/workflows/ci.yml
2022-08-31 16:00:41 +02:00
Damian.Ujma@hyland.com
f58ca49b06 ACS-3465 Add AGS-Community-Rest-API-Tests 2022-08-31 15:58:09 +02:00
Damian.Ujma@hyland.com
f6382f28d3 ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-31 15:19:50 +02:00
Damian.Ujma@hyland.com
50652a4fab Revert "ACS-3465 Increase timeout AGS-Community-Rest-API-Tests"
This reverts commit d6fb3814ab.
2022-08-31 15:16:53 +02:00
mikolajbrzezinski
93adf7515a fix ifs 2022-08-31 15:08:56 +02:00
Damian.Ujma@hyland.com
d6fb3814ab ACS-3465 Increase timeout AGS-Community-Rest-API-Tests 2022-08-31 14:39:31 +02:00
mikolajbrzezinski
93c1ee9cbf add ifs 2022-08-31 13:48:53 +02:00
Damian.Ujma@hyland.com
5c82775afb ACS-3465 Force Maven 3.5.4 for AGS-Community-Rest-API-Tests 2022-08-31 12:40:18 +02:00
Damian.Ujma@hyland.com
3535801e5c ACS-3465 Fix AGS-Community-Rest-API-Tests 2022-08-31 09:52:33 +02:00
Damian.Ujma@hyland.com
9d537e6158 ACS-3465 Fix merging 2022-08-30 16:38:56 +02:00
Damian.Ujma@hyland.com
f783d4bbc1 Merge branch 'feature/ACS-3465_migrating_to_gh_actions_du' of github.com:Alfresco/alfresco-community-repo into feature/ACS-3465_migrating_to_gh_actions_du
 Conflicts:
	.github/workflows/ci.yml
	scripts/gh-actions/maven_release.sh
2022-08-30 16:29:40 +02:00
Damian.Ujma@hyland.com
ff18fba533 ACS-3465 Add AGS-Community-Rest-API-Tests, Push-to-Nexus, Update-downstream jobs
ACS-3465 Test AGS-Community-Rest-API-Tests

ACS-3465 Test AGS-Community-Rest-API-Tests

ACS-3465 Test script execution

ACS-3465 Increase SearchRecordsTests timeout

ACS-3465 Make a script executable

ACS-3465 Test script execution

ACS-3465 Fix build step in AGS-Community-Rest-API-Tests

ACS-3465 Test AGS-Community-Rest-API-Tests

ACS-3465 Test AGS-Community-Rest-API-Tests

ACS-3465 Test AGS-Community-Rest-API-Tests
2022-08-30 16:28:53 +02: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
Damian.Ujma@hyland.com
a093a10484 ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-30 09:49:12 +02:00
mikolajbrzezinski
f9ca64bb51 fix requires local images 2022-08-30 09:38:04 +02:00
Damian.Ujma@hyland.com
08cbc94ee7 ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-30 09:21:02 +02:00
mikolajbrzezinski
22b9179961 cleanup 2022-08-29 17:10:08 +02:00
Damian.Ujma@hyland.com
eec1596872 ACS-3465 Test script execution 2022-08-29 16:12:37 +02:00
Damian.Ujma@hyland.com
ffe31c2a6a ACS-3465 Increase SearchRecordsTests timeout 2022-08-29 15:51:15 +02:00
Damian.Ujma@hyland.com
da4bd743e1 ACS-3465 Make a script executable 2022-08-29 15:28:03 +02:00
Damian.Ujma@hyland.com
b1f4b5fa93 ACS-3465 Test script execution 2022-08-29 14:36:04 +02:00
mikolajbrzezinski
f166fef906 fix require local images 2022-08-29 14:14:14 +02:00
mikolajbrzezinski
29470674ce fix remote api 2 2022-08-29 14:05:40 +02:00
mikolajbrzezinski
9eefea8904 fix 2022-08-29 13:50:44 +02:00
Damian.Ujma@hyland.com
01a4b7886b ACS-3465 Fix build step in AGS-Community-Rest-API-Tests 2022-08-29 13:44:33 +02:00
Damian.Ujma@hyland.com
79445d40fc ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-29 13:26:19 +02:00
Damian.Ujma@hyland.com
448687294d ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-29 13:25:42 +02:00
Damian.Ujma@hyland.com
56d374a915 ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-29 13:23:28 +02:00
mikolajbrzezinski
94b33bf7a9 no tag 2022-08-29 12:37:56 +02:00
mikolajbrzezinski
c53d71fc75 Revert "check with specific poms"
This reverts commit eff1ab0744.
2022-08-29 11:24:49 +02:00
mikolajbrzezinski
eff1ab0744 check with specific poms 2022-08-29 11:15:39 +02:00
mikolajbrzezinski
196e37e8d9 check more tests 2022-08-29 10:28:18 +02:00
mikolajbrzezinski
9886d4afe3 check with setting REQUIRES_LOCAL_IMAGES 2022-08-26 17:27:35 +02:00
mikolajbrzezinski
9105056738 check with setting REQUIRES_LOCAL_IMAGES 2022-08-26 17:27:06 +02:00
mikolajbrzezinski
a8484b3644 change verify 2022-08-26 16:54:29 +02:00
mikolajbrzezinski
e53377947e change verify 2022-08-26 16:20:21 +02:00
mikolajbrzezinski
77d67d4ed9 Revert "Change POM"
This reverts commit b5bd2be96e.
2022-08-26 16:15:40 +02:00
mikolajbrzezinski
b5bd2be96e Change POM 2022-08-26 16:13:09 +02:00
mikolajbrzezinski
770acdba38 Update env variables list 2022-08-26 15:46:27 +02:00
mikolajbrzezinski
1f3b024a28 Check with init 2022-08-26 15:20:15 +02:00
mikolajbrzezinski
bf72cbf0b0 Check simple bash command 2022-08-26 14:56:20 +02:00
mikolajbrzezinski
5c1ec44387 fix paths 2022-08-26 13:50:16 +02:00
mikolajbrzezinski
c536f53293 fix env variable 2022-08-26 12:15:03 +02:00
mikolajbrzezinski
b056e166cc Fix timeout and add step 2022-08-26 12:12:28 +02:00
mikolajbrzezinski
87bfcdbadd Check AGS 2022-08-26 11:25:55 +02:00
mikolajbrzezinski
62e09bd1ac Check AGS 2022-08-26 10:45:40 +02:00
mikolajbrzezinski
c9e7d798e5 Check rest api tas tests 2022-08-26 10:19:27 +02:00
mikolajbrzezinski
8762148a68 Clean up 2022-08-25 17:12:42 +02:00
mikolajbrzezinski
04af833ba6 Clean up 2022-08-25 17:11:44 +02:00
mikolajbrzezinski
5b6f56a2ef Clean up 2022-08-25 17:07:38 +02:00
mikolajbrzezinski
ea60259b36 Clean up 2022-08-25 16:25:46 +02:00
mikolajbrzezinski
a050488d8e Block veracode and add test suite 2022-08-25 16:19:46 +02:00
mikolajbrzezinski
0dde0315f1 Check veracode with fixes 2022-08-25 15:36:30 +02:00
mikolajbrzezinski
42da3ee691 Fix all Unit Tests Suite 2022-08-25 14:47:32 +02:00
mikolajbrzezinski
8d15375874 Fix transformers tag 2022-08-25 13:55:16 +02:00
mikolajbrzezinski
18a39ac0fd Fix transformers tag 2022-08-25 13:25:07 +02:00
mikolajbrzezinski
ad9bce3812 Fix transformers tag 2022-08-25 13:08:20 +02:00
mikolajbrzezinski
0401246d96 Check if can get the transformers tag 2022-08-25 12:42:04 +02:00
mikolajbrzezinski
bdce8a0329 check doker run job and veracode 2022-08-25 10:43:56 +02:00
mikolajbrzezinski
a4417a0ebf .travis.settings.xml 2022-08-25 10:03:25 +02:00
mikolajbrzezinski
905b34e64b travis.settings.xml 2022-08-25 09:55:23 +02:00
mikolajbrzezinski
a05c8c6634 Update 2022-08-24 18:10:56 +02:00
mikolajbrzezinski
8781d82216 change uses to run 2022-08-24 18:05:19 +02:00
mikolajbrzezinski
9be2a90f81 remove SRCCLR_API_TOKEN 2022-08-24 18:03:38 +02:00
mikolajbrzezinski
d56e53c0ef Add SRCCLR_API_TOKEN 2022-08-24 17:43:06 +02:00
mikolajbrzezinski
4ccb22acbb Try AllUnitTestsSuite 2022-08-24 17:31:34 +02:00
mikolajbrzezinski
f3c45a13dd try without transformers tag 2022-08-24 16:43:49 +02:00
mikolajbrzezinski
5f24b4c3cd add global variables and test veracode 2022-08-24 16:42:42 +02:00
mikolajbrzezinski
f7c07c30f5 add check-out 2022-08-24 16:03:24 +02:00
mikolajbrzezinski
a0ae0dd4ec Fix scripts path 2022-08-24 15:22:04 +02:00
mikolajbrzezinski
bbd7c46ddd Remove unnecesary action folder adn turn off travis for the branch 2022-08-24 15:19:13 +02:00
mikolajbrzezinski
87c0fa228e Change trigger and add clean cache to prepare 2022-08-24 14:03:19 +02:00
mikolajbrzezinski
72182f4ef5 Add skeleton 2022-08-23 19:13:05 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
dependabot-preview[bot]
013f3fac1c Bump utility from 3.0.16 to 3.0.17 (#23) 2019-12-17 22:57:31 +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
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]
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
dependabot-preview[bot]
9080d3e0d9 Bump utility from 3.0.8 to 3.0.15 (#19) 2019-11-29 23:02:25 +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
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]
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]
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
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
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
455 changed files with 41688 additions and 1660 deletions

557
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,557 @@
name: Alfresco Community Repo CI
on:
pull_request:
push:
branches:
# - feature/**
- fix/**
workflow_call:
workflow_dispatch:
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60
LOG_WARN: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
TAS_ENVIRONMENT: ./packaging/tests/environment
TAS_SCRIPTS: ../alfresco-community-repo/packaging/tests/scripts
jobs:
prepare:
name: "Prepare"
runs-on: ubuntu-latest
if: >
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Prepare environment"
run: bash ./scripts/ci/prepare.sh
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
veracode:
name: "Source Clear Scan (SCA)"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name != 'pull_request') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@master
with:
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
all_unit_tests_suite:
name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Run tests"
run: |
mvn -B test -pl core,data-model -am -DfailIfNoTests=false
mvn -B test -pl "repository,mmt" -am "-Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite" -DfailIfNoTests=false
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
remote_api_app_context_test_suites:
name: Remote-api - ${{ matrix.testSuite }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
include:
- testSuite: AppContext01TestSuite
compose-profile: default
- testSuite: AppContext02TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext03TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext04TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContextExtraTestSuite
compose-profile: default
env:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Set transformers tag"
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Run tests"
run: mvn -B test -pl remote-api -Dtest=${{ matrix.testSuite }} -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_mariadb_tests:
name: Repository - MariaDB ${{ matrix.version }} tests
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/')) &&
github.event_name != 'pull_request' &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
version: ['10.2.18', '10.4', '10.5']
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
env:
MARIADB_VERSION: ${{ matrix.version }}
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_mariadb_10_6_tests:
name: "Repository - MariaDB 10.6 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[latest db]') ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
env:
MARIADB_VERSION: 10.6
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_mysql_tests:
name: Repository - MySQL 8 tests
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[latest db]') ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
env:
MYSQL_VERSION: 8
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_postgresql_13_7_tests:
name: "Repository - PostgreSQL 13.7 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/')) || github.event_name != 'pull_request' &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 10.6
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_postgresql_14_4_tests:
name: "Repository - PostgreSQL 14.4 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/')) && github.event_name != 'pull_request' &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[latest db]') ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 14.4
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_messaging_tests:
name: Repository - Messaging tests
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=CamelRoutesTest,CamelComponentsTest -DfailIfNoTests=false
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_app_context_test_suites:
name: Repository - ${{ matrix.testSuite }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
include:
- testSuite: AppContext01TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext02TestSuite
compose-profile: default
- testSuite: AppContext03TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext04TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext05TestSuite
compose-profile: default
parameters: '"-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth"'
- testSuite: AppContext06TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContextExtraTestSuite
compose-profile: with-transform-core-aio
- testSuite: MiscContextTestSuite
compose-profile: with-transform-core-aio
- testSuite: SearchTestSuite
compose-profile: default
parameters: '-Dindex.subsystem.name=solr6'
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up IDS"
run: |
if [ "${{ matrix.testSuite }}" == 'AppContext05TestSuite' ];
then
mkdir -p "${HOME}/tmp"
cp repository/src/test/resources/realms/alfresco-realm.json "${HOME}/tmp"
echo "HOST_IP=$(hostname -I | cut -f1 -d' ')" >> $GITHUB_ENV
docker run -d -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e DB_VENDOR=h2 -p 8999:8080 -e KEYCLOAK_IMPORT=/tmp/alfresco-realm.json -v $HOME/tmp/alfresco-realm.json:/tmp/alfresco-realm.json alfresco/alfresco-identity-service:1.2
fi
- name: "Set transformers tag"
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=${{ matrix.testSuite }} -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco ${{ matrix.parameters }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
tas-tests:
name: ${{ matrix.test-name }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
! contains(github.event.head_commit.message, '[skip tas]')) ||
contains(github.event.head_commit.message, '[tas]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
include:
- test-name: "REST API TAS tests part1"
pom-dir: tas-restapi
test-profile: run-restapi-part1
- test-name: "REST API TAS tests part2"
pom-dir: tas-restapi
test-profile: run-restapi-part2
- test-name: "REST API TAS tests part3"
pom-dir: tas-restapi
test-profile: run-restapi-part3
- test-name: "CMIS TAS tests - BROWSER binding"
pom-dir: tas-cmis
test-profile: run-cmis-browser
- test-name: "CMIS TAS tests - ATOM binding"
pom-dir: tas-cmis
test-profile: run-cmis-atom
- test-name: "CMIS TAS tests - WEBSERVICES binding"
pom-dir: tas-cmis
test-profile: run-cmis-webservices
- test-name: "Email TAS tests"
pom-dir: tas-email
- test-name: "WebDAV TAS tests"
pom-dir: tas-webdav
- test-name: "Integration TAS tests"
pom-dir: tas-integration
env:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Set up the environment"
run: |
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
- name: "Set up the environment for integration tests"
run: |
if [ "${{ matrix.test-name }}" == 'Integration TAS tests' ];
then
mvn install -pl :alfresco-community-repo-integration-test -am -DskipTests -Pall-tas-tests
fi
- name: "Run tests"
id: tests
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn -B verify -f packaging/tests/${{ matrix.pom-dir }}/pom.xml -Pall-tas-tests,${{ matrix.test-profile }} -Denvironment=default -DrunBugs=false
- name: "After success"
if: ${{ always() }} && outcome.tests.outcome == 'success'
run: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/${{ matrix.pom-dir }}"
continue-on-error: true
- name: "After failure"
if: ${{ always() }} && outcome.tests.outcome == 'failure'
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/${{ matrix.pom-dir }}"
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
share_services_share_services_test_suite:
name: Share Services - ShareServicesTestSuite
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
- name: "Run tests"
run: mvn -B test -pl :alfresco-share-services -am -Dtest=ShareServicesTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
ags_tests_postgressql:
name: AGS Unit & Integration Tests 0${{ matrix.part }} (PostgreSQL) ${{ matrix.test-name }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
! contains(github.event.head_commit.message, '[skip ags]')) ||
contains(github.event.head_commit.message, '[ags]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
part: [1, 2, 3, 4]
env:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Verify"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
ags_tests_mysql:
name: AGS Unit & Integration Tests 0${{ matrix.part }} (PostgreSQL) ${{ matrix.test-name }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
! contains(github.event.head_commit.message, '[skip ags]')) ||
contains(github.event.head_commit.message, '[ags on MySQL]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
part: [1, 2, 3, 4]
env:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Verify"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
ags_community_rest_api_tests:
name: "AGS Community Rest API Tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
! contains(github.event.head_commit.message, '[skip ags]') && ! contains(github.event.head_commit.message, '[skip tas]')) ||
(contains(github.event.head_commit.message, '[ags]') && contains(github.event.head_commit.message, '[tas]'))) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
env:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Set up the environment"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
${{ env.TAS_SCRIPTS }}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
mvn -B install -pl :alfresco-governance-services-automation-community-rest-api -am -Pags -Pall-tas-tests -DskipTests
- name: "Test"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags -Pall-tas-tests
- run: bash amps/ags/ci/scripts/getLogs.sh
if: ${{ always() }}
- shell: bash
if: ${{ always() }}
run: |
mkdir -p deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests
mv "alfresco.log" "deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests"
mv "solr.log" "deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests"
mv "./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports" "deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests"
- name: "Configure AWS credentials"
if: ${{ always() }}
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AGS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AGS_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: "Upload artifacts to Amazon S3 bucket"
if: ${{ always() }}
run: aws s3 cp --recursive ./deploy_dir s3://ags-travis-artifacts
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh

63
.github/workflows/master_release.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
name: Master/Release branch workflow
on:
push:
branches:
# - master
# - release/**
- feature/ACS-3841_test_gha
jobs:
run_ci:
uses: ./.github/workflows/ci.yml
secrets: inherit
push_to_nexus:
name: "Push to Nexus"
runs-on: ubuntu-latest
needs: [run_ci]
if: >
always() &&
(needs.run_ci.result == 'skipped' || needs.run_ci.result == 'success')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.12.0
with:
username: ${{ secrets.BOT_GITHUB_USERNAME }}
email: ${{ secrets.BOT_GITHUB_EMAIL }}
- name: "Verify release tag"
run: bash ./scripts/ci/verify_release_tag.sh
- name: "Release"
run: bash ./scripts/ci/maven_release.sh
env:
BUILD_NUMBER: ${{ github.run_number }}
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }}
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_PASSWORD }}
GIT_EMAIL: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
update_downstream:
name: "Update alfresco-enterprise-repo"
runs-on: ubuntu-latest
needs: [run_ci, push_to_nexus]
if: >
always() &&
(needs.run_ci.result == 'skipped' || needs.run_ci.result == 'success') &&
(needs.push_to_nexus.result == 'success') &&
(! contains(github.event.head_commit.message, '[no downstream]'))
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- run: bash ./scripts/ci/update_downstream.sh
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }}
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_PASSWORD }}
GIT_EMAIL: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh

View File

@@ -19,10 +19,7 @@ before_cache: bash scripts/travis/cleanup_cache.sh
branches:
only:
- master
- /release\/.*/
- /feature\/.*/
- /fix\/.*/
- none
env:
global:
@@ -264,6 +261,7 @@ 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"
@@ -273,6 +271,7 @@ 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"
@@ -282,6 +281,7 @@ 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"
@@ -291,6 +291,7 @@ 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"
@@ -300,6 +301,7 @@ 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"
@@ -309,6 +311,7 @@ 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"
@@ -318,6 +321,7 @@ 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"
@@ -327,6 +331,7 @@ 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"
@@ -337,6 +342,7 @@ jobs:
- ${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"
@@ -387,7 +393,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:
@@ -399,7 +405,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.183</version>
<version>20.41-DEV</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.183</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>17.183</version>
<version>20.41-DEV</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

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

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

@@ -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,46 @@
/*
* #%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.utils;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import org.testng.IMethodInstance;
import org.testng.IMethodInterceptor;
import org.testng.ITestContext;
public class AlphabeticallyPriorityInterceptor implements IMethodInterceptor
{
@Override
public List<IMethodInstance> intercept(List<IMethodInstance> methods,
ITestContext context)
{
return methods.stream().sorted(Comparator.comparing(el -> el.getMethod().getTestClass().toString()))
.collect(Collectors.toList());
}
}

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

@@ -1,7 +1,10 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="TestNG AllTestSuite" configfailurepolicy="continue" verbose="1" time-out="300000">
<test name="restapi">
<listeners>
<listener class-name="org.alfresco.rest.rm.community.utils.AlphabeticallyPriorityInterceptor" />
</listeners>
<test name="restapi" preserve-order="false">
<packages>
<package name="org.alfresco.rest.rm.community.*"/>
</packages>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>17.183</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

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

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

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>17.183</version>
<version>20.41-DEV</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

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

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>17.183</version>
<version>20.41-DEV</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.183</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

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

View File

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

@@ -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.183</version>
<version>20.41-DEV</version>
</parent>
<properties>
@@ -134,7 +134,7 @@
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>6.3.1</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.183</version>
<version>20.41-DEV</version>
</parent>
<dependencies>

View File

@@ -9,6 +9,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>17.183</version>
<version>20.41-DEV</version>
</parent>
</project>

View File

@@ -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.183</version>
<version>20.41-DEV</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.183</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

@@ -1,3 +1,3 @@
SOLR6_TAG=2.0.5
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.183</version>
<version>20.41-DEV</version>
</parent>
<modules>

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

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>17.183</version>
<version>20.41-DEV</version>
</parent>
<organization>

View File

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

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>17.183</version>
<version>20.41-DEV</version>
</parent>
<developers>
@@ -66,6 +66,7 @@
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</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.183</version>
<version>20.41-DEV</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>

View File

@@ -0,0 +1,70 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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;
import org.alfresco.rest.model.RestNetworkModel;
import org.alfresco.utility.model.UserModel;
public abstract class NetworkDataPrep extends RestTest
{
protected static UserModel adminUserModel;
protected static UserModel adminTenantUser, secondAdminTenantUser;
protected static UserModel tenantUser, secondTenantUser, differentNetworkTenantUser;
protected static UserModel tenantUserWithBad;
protected static UserModel userModel;
protected static RestNetworkModel restNetworkModel;
protected static String tenantDomain;
private static boolean isInitialized = false;
public void init()
{
if(!isInitialized)
{
isInitialized = true;
initialization();
}
}
public void initialization()
{
adminUserModel = dataUser.getAdminUser();
//create first tenant Admin User.
adminTenantUser = UserModel.getAdminTenantUser();
restClient.authenticateUser(adminUserModel);
restClient.usingTenant().createTenant(adminTenantUser);
tenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("uTenant");
secondTenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("sTenant");
//create second tenant Admin User.
secondAdminTenantUser = UserModel.getAdminTenantUser();
restClient.usingTenant().createTenant(secondAdminTenantUser);
tenantDomain = tenantUser.getDomain();
differentNetworkTenantUser = dataUser.usingUser(secondAdminTenantUser).createUserWithTenant("dTenant");
userModel = dataUser.createRandomTestUser();
}
}

View File

@@ -1,3 +1,28 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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;
import java.lang.reflect.Method;
@@ -5,7 +30,6 @@ import java.lang.reflect.Method;
import org.alfresco.dataprep.WorkflowService;
import org.alfresco.rest.core.RestProperties;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.rules.RulesTestsUtils;
import org.alfresco.utility.LogFactory;
import org.alfresco.utility.TasProperties;
import org.alfresco.utility.data.DataContent;
@@ -62,15 +86,19 @@ public abstract class RestTest extends AbstractTestNGSpringContextTests
@Autowired
protected WorkflowService workflow;
@Autowired
protected RulesTestsUtils rulesUtils;
protected SiteModel testSite;
@BeforeSuite(alwaysRun = true)
public void checkServerHealth() throws Exception
public void checkServerHealth()
{
super.springTestContextPrepareTestInstance();
try
{
super.springTestContextPrepareTestInstance();
}
catch (Exception e)
{
throw new IllegalStateException("Error while preparing for test execution", e);
}
serverHealth.assertServerIsOnline();
testSite = dataSite.createPublicRandomSite();
}

View File

@@ -0,0 +1,32 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core;
import org.alfresco.rest.core.assertion.IModelAssertion;
public interface IRestModel<Model> extends IModelAssertion<Model> {
Model onModel();
}

View File

@@ -0,0 +1,46 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core;
import java.util.List;
import org.alfresco.rest.exception.EmptyRestModelCollectionException;
import org.alfresco.rest.model.RestPaginationModel;
public interface IRestModelsCollection<Model> {
public List<Model> getEntries();
public Model getOneRandomEntry() throws EmptyRestModelCollectionException;
/**
* @return boolean value if entry is empty
*/
public boolean isEmpty();
public RestPaginationModel getPagination();
}

View File

@@ -0,0 +1,370 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core;
import javax.json.Json;
import javax.json.JsonArrayBuilder;
import javax.json.JsonBuilderFactory;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringJoiner;
import org.alfresco.dataprep.CMISUtil.Priority;
import org.alfresco.rest.model.RestProcessVariableModel;
import org.alfresco.rest.model.RestVariableModel;
import org.alfresco.utility.Utility;
import org.alfresco.utility.constants.UserRole;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.RepoTestModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.TestModel;
import org.alfresco.utility.model.UserModel;
/**
* Json builder for small post calls
*/
public class JsonBodyGenerator
{
private static JsonBuilderFactory jsonBuilder;
/**
* @return {@link JsonObjectBuilder}
*/
public static JsonObjectBuilder defineJSON()
{
return jsonBuilder().createObjectBuilder();
}
/**
* @return {@link JsonArrayBuilder}
*/
public static JsonArrayBuilder defineJSONArray()
{
return jsonBuilder().createArrayBuilder();
}
/**
* {
* "tag":"test-tag-1"
* }
*
* @param key
* @param value
* @return
*/
public static String keyValueJson(String key, String value)
{
return defineJSON().add(key, value).build().toString();
}
/**
* {
* "target": {
* "site": {
* "guid": "abcde-01234"
* }
* }
* }
*
* @param siteModel
* @return
*/
public static String targetSiteWithGuid(SiteModel siteModel)
{
JsonObject value = defineJSON()
.add("target", defineJSON()
.add("site", defineJSON()
.add("guid", siteModel.getGuid()))).build();
return value.toString();
}
/**
* {
* "target": {
* "file": {
* "guid": "abcde-01234"
* }
* }
* }
*
* @param siteModel
* @return
*/
public static String targetFileWithGuid(FileModel fileModel)
{
JsonObject value = defineJSON()
.add("target", defineJSON()
.add("file", defineJSON()
.add("guid", fileModel.getNodeRef().replace(";1.0", "")))).build();
return value.toString();
}
/**
* {
* "target": {
* "folder": {
* "guid": "abcde-01234"
* }
* }
* }
*
* @param siteModel
* @return
*/
public static String targetFolderWithGuid(FolderModel folderModel)
{
JsonObject value = defineJSON()
.add("target", defineJSON()
.add("folder", defineJSON()
.add("guid", folderModel.getNodeRef()))).build();
return value.toString();
}
/**
* @return the initialized JSON builder
*/
private static JsonBuilderFactory jsonBuilder()
{
if (jsonBuilder == null)
return Json.createBuilderFactory(null);
else
{
return jsonBuilder;
}
}
public static String likeRating(boolean likeOrNot)
{
JsonObject value = defineJSON()
.add("id", "likes")
.add("myRating", likeOrNot).build();
return value.toString();
}
public static String fiveStarRating(int stars)
{
JsonObject value = defineJSON()
.add("id", "fiveStar")
.add("myRating", stars).build();
return value.toString();
}
public static String siteMember(UserModel userModel)
{
Utility.checkObjectIsInitialized(userModel.getUserRole(), "userModel.getUserRole()");
JsonObject value = defineJSON()
.add("role", userModel.getUserRole().name())
.add("id", userModel.getUsername()).build();
return value.toString();
}
public static String siteGroup(String authorityId, UserRole role)
{
Utility.checkObjectIsInitialized(authorityId, "authorityId");
JsonObject value = defineJSON()
.add("role", role.name())
.add("id", authorityId).build();
return value.toString();
}
public static String siteMemberhipRequest(String message, SiteModel siteModel, String title)
{
JsonObject value = defineJSON()
.add("message", message)
.add("id", siteModel.getId())
.add("title", title).build();
return value.toString();
}
/**
* Method to create a Json object for SiteBody with site title, description, visibility
* @param siteModel
* @return String
*/
public static String updateSiteRequest(SiteModel siteModel)
{
JsonObject value = defineJSON()
.add("title", siteModel.getTitle())
.add("description", siteModel.getDescription())
.add("visibility", siteModel.getVisibility().toString()).build();
return value.toString();
}
public static String process(String processDefinitionKey, UserModel assignee, boolean sendEmailNotifications, Priority priority)
{
JsonObject value = defineJSON()
.add("processDefinitionKey", processDefinitionKey)
.add("variables", jsonBuilder().createObjectBuilder()
.add("bpm_assignee", assignee.getUsername())
.add("bpm_sendEMailNotifications", sendEmailNotifications)
.add("bpm_workflowPriority", priority.getLevel())).build();
return value.toString();
}
public static String processVariable(RestProcessVariableModel variableModel)
{
JsonObject value = defineJSON()
.add("name", variableModel.getName())
.add("value", variableModel.getValue())
.add("type", variableModel.getType()).build();
return value.toString();
}
public static String taskVariable(RestVariableModel taskVariableModel)
{
JsonObject value = defineJSON()
.add("scope", taskVariableModel.getScope())
.add("name", taskVariableModel.getName())
.add("type", taskVariableModel.getType())
.add("value", taskVariableModel.getValue().toString()).build();
return value.toString();
}
/**
* {
* "actionDefinitionId": "copy",
* "targetId": "4c4b3c43-f18b-43ff-af84-751f16f1ddfd",
* "params": {
"destination-folder": "34219f79-66fa-4ebf-b371-118598af898c"
* }
* }
*
* @param actionDefinitionId
* @param targetNode
* @param params
* @return
*/
public static String executeActionPostBody(String actionDefinitionId, RepoTestModel targetNode, Map<String, Serializable> params)
{
JsonObjectBuilder objectBuilder = jsonBuilder().createObjectBuilder();
for(Map.Entry<String, Serializable> param : params.entrySet())
{
addJsonValue(objectBuilder, param.getKey(), param.getValue());
}
JsonObject value = defineJSON()
.add("actionDefinitionId", actionDefinitionId)
.add("targetId", targetNode.getNodeRefWithoutVersion())
.add("params", objectBuilder).build();
return value.toString();
}
/** Add a value to the JSON object. */
private static void addJsonValue(JsonObjectBuilder objectBuilder, String key, Serializable value)
{
if (value == null)
{
objectBuilder.add(key, JsonObject.NULL);
}
else if (value instanceof Boolean)
{
objectBuilder.add(key, (boolean) value);
}
else if (value instanceof String)
{
objectBuilder.add(key, (String) value);
}
else if (value instanceof Integer)
{
objectBuilder.add(key, (int) value);
}
else if (value instanceof Long)
{
objectBuilder.add(key, (long) value);
}
else if (value instanceof Double)
{
objectBuilder.add(key, (double) value);
}
else
{
throw new UnsupportedOperationException("Unable to add entry to JsonObject: {" + key + ": " + value + "}");
}
}
/**
* {
* "actionDefinitionId": "check-out",
* "targetId": "4c4b3c43-f18b-43ff-af84-751f16f1ddfd",
* }
*
* @param actionDefinitionId
* @param targetNode
* @return
*/
public static String executeActionPostBody(String actionDefinitionId, RepoTestModel targetNode)
{
JsonObject value = defineJSON()
.add("actionDefinitionId", actionDefinitionId)
.add("targetId", targetNode.getNodeRefWithoutVersion())
.build();
return value.toString();
}
/**
* {
* "key1":"key1",
* "key2":"key2",
* "key3":"key3"
* }
*
* @param key
* @param value
* @return
*/
public static String keyValueJson(HashMap<String, String> mapJson)
{
JsonObjectBuilder builder= defineJSON();
for (Map.Entry<String, String> entry : mapJson.entrySet())
{
builder.add(entry.getKey().toString(), entry.getValue().toString());
}
return builder.build().toString();
}
/**
* Convert a collection of {@link TestModel} objects to JSON for a multi-entity POST request.
*
* @param models The entities to convert.
* @return The JSON string.
*/
public static String arrayToJson(List<? extends TestModel> models)
{
// Rather than convert backwards and forwards between Jackson and javax objects then we handle array creation ourselves.
StringJoiner stringJoiner = new StringJoiner(",\n");
for (TestModel model : models)
{
stringJoiner.add(model.toJson());
}
return "[\n" + stringJoiner.toString() + "\n]";
}
}

View File

@@ -0,0 +1,108 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core;
import static org.alfresco.utility.report.log.Step.STEP;
import org.alfresco.utility.data.AisToken;
import org.alfresco.utility.data.auth.DataAIS;
import org.alfresco.utility.model.UserModel;
import org.keycloak.authorization.client.util.HttpResponseException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class RestAisAuthentication
{
public static String STEP_PREFIX = "RestAisAuthProvider:";
public static String USER_DISABLED_MSG = "Account disabled";
@Autowired
private DataAIS dataAIS;
/**
*
* Get the AIS access token for the specified user model.
*
* @param userModel
* @return
*/
public String getAisAuthenticationToken(UserModel userModel)
{
STEP(String.format("%s Retrieving AIS authentication.", STEP_PREFIX));
AisToken aisToken = getAisAccessToken(userModel);
return aisToken.getToken();
}
/**
* Check if the Alfresco Identity Service is enabled
* @return True if Alfresco Identity Service is enabled (the identity service URL is not null or empty)
*/
public Boolean isAisAuthenticationEnabled()
{
return dataAIS.isEnabled() ? true : false;
}
/**
* 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 or disabled
// user so return an invalid access token
String httpResponse = new String(e.getBytes());
if (e.getStatusCode() == 401 || httpResponse.contains(USER_DISABLED_MSG))
{
STEP(String.format("%s User disabled or invalid user credentials were provided %s:%s. Using invalid token for request.", STEP_PREFIX,
userModel.getUsername(), userModel.getPassword()));
aisToken = new AisToken(badToken, badRefreshToken, System.currentTimeMillis(), 300000);
}
else
{
throw e;
}
}
return aisToken;
}
}

View File

@@ -0,0 +1,162 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core;
import static org.alfresco.utility.report.log.Step.STEP;
import java.util.List;
import java.util.Random;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.assertion.IModelsCollectionAssertion;
import org.alfresco.rest.core.assertion.ModelsCollectionAssertion;
import org.alfresco.rest.exception.EmptyRestModelCollectionException;
import org.alfresco.rest.model.RestPaginationModel;
import org.alfresco.rest.model.RestSiteModelsCollection;
/**
* Map multiple entries of JSON response to a class <T>
*
* Example:
*
* "entries": [
{
"entry": {
"visibility": "PUBLIC",
"guid": "79e140e1-5039-4efa-acaf-c22b5ba7c947",
"description": "Description1470255221170",
"id": "0-C2291-1470255221170",
"title": "0-C2291-1470255221170"
}
},
*
* Having this JSON Entry, we can auto-map this to {@link RestSiteModelsCollection} class having a List of <SiteModel> based on this example
*
* @author Paul Brodner
*/
public abstract class RestModels<Model, ModelCollection> implements IRestModelsCollection<Model>, IModelsCollectionAssertion<ModelCollection>
{
@JsonProperty(value = "entries")
private List<Model> modelEntries;
private RestPaginationModel pagination;
@Override
public List<Model> getEntries()
{
return modelEntries;
}
/**
* @return a random entry from entries list
* @throws EmptyRestModelCollectionException
*/
@Override
public Model getOneRandomEntry() throws EmptyRestModelCollectionException
{
STEP("REST API: Get random one entry from response");
Random random = new Random();
List<Model> models = getEntries();
if(models.isEmpty())
throw new EmptyRestModelCollectionException(models);
int index = random.nextInt(models.size());
return models.get(index);
}
/**
* Example
* <code>
* siteMembershipRequests.getEntryByIndex(0)
.assertThat().field("site.visibility").is(moderatedSite.getVisibility())
.assertThat().field("site.description").is(moderatedSite.getDescription())
.assertThat().field("site.id").is(moderatedSite.getId())
.assertThat().field("site.title").is(moderatedSite.getTitle());
* </code>
* @param index
* @return
* @throws EmptyRestModelCollectionException
*/
@SuppressWarnings("unchecked")
public Model getEntryByIndex(int index) throws EmptyRestModelCollectionException{
STEP("REST API: Get index entry from response");
List<Model> models = getEntries();
if(models.isEmpty())
throw new EmptyRestModelCollectionException(models);
if(models.size() > index){
return (Model) ((IRestModel<?>)models.get(index)).onModel();
}
return null;
}
@Override
public ModelsCollectionAssertion<RestModels<Model, ModelCollection>> assertThat()
{
return new ModelsCollectionAssertion<>(this);
}
@Override
public ModelsCollectionAssertion<RestModels<Model, ModelCollection>> and()
{
return assertThat();
}
@SuppressWarnings("unchecked")
@Override
public ModelCollection when()
{
return (ModelCollection)this;
}
/**
* @return boolean value if entry is empty
*/
@Override
public boolean isEmpty()
{
if (getEntries() != null)
return getEntries().isEmpty();
else
return true;
}
@Override
public RestPaginationModel getPagination()
{
return pagination;
}
public void setPagination(RestPaginationModel pagination)
{
this.pagination = pagination;
}
}

View File

@@ -0,0 +1,45 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core;
import org.alfresco.utility.TasProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration
@PropertySource("classpath:default.properties")
@PropertySource(value = "classpath:${environment}.properties", ignoreResourceNotFound = true)
public class RestProperties
{
@Autowired
private TasProperties properties;
public TasProperties envProperty()
{
return properties;
}
}

View File

@@ -0,0 +1,216 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core;
import static org.alfresco.utility.report.log.Step.STEP;
import java.util.MissingFormatArgumentException;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import io.restassured.RestAssured;
import org.springframework.http.HttpMethod;
/**
* @author Paul Brodner
*/
public class RestRequest
{
private static final String TOKEN_REGEX = "\\{.*?}";
private String body;
private HttpMethod httpMethod;
private String path;
private Object[] pathParams;
private String contentType = "UTF-8";
private RestRequest(HttpMethod httpMethod, String path, String... pathParams)
{
this(httpMethod, "", path, pathParams);
}
private RestRequest(HttpMethod httpMethod, String body, String path, String... pathParams)
{
setHttpMethod(httpMethod);
setPath(path);
setPathParams(pathParams);
setBody(body);
// Validate that the supplied path and pathParams are compatible.
constructPath();
}
/**
* Use this request when no body is needed
*
* @param httpMethod
* @param path
* @param pathParams
* @return
*/
public static RestRequest simpleRequest(HttpMethod httpMethod, String path, String... pathParams)
{
return new RestRequest(httpMethod, path, pathParams);
}
/**
* Use this request when a body has to be provided
*
* @param httpMethod
* @param body
* @param path
* @param pathParams
* @return
*/
public static RestRequest requestWithBody(HttpMethod httpMethod, String body, String path, String... pathParams)
{
return new RestRequest(httpMethod, body, path, pathParams);
}
public String getBody()
{
return body;
}
public void setBody(String body)
{
this.body = body;
}
public HttpMethod getHttpMethod()
{
return httpMethod;
}
public void setHttpMethod(HttpMethod httpMethod)
{
this.httpMethod = httpMethod;
}
public String getPath()
{
return path;
}
public void setPath(String path)
{
this.path = path;
addQueryParamsIfNeeded();
}
public Object[] getPathParams()
{
return pathParams;
}
public void setPathParams(Object[] pathParams)
{
this.pathParams = pathParams;
addQueryParamsIfNeeded();
}
/**
* Add query parameters to the path if needed.
* <p>
* e.g. For a path of "api/{fruit}" and params ["apple", "size=10", "colour=red"] then this will
* update the path to be "api/{fruit}?{param0}&{param1}" so that the tokens will be populated by
* RestAssured to make "api/apple?size=10&colour=red".
*/
private void addQueryParamsIfNeeded()
{
// Don't do anything if the path or path params haven't been set yet.
if (path == null || path.length() == 0 || pathParams == null)
{
return;
}
int groupCount = (int) Pattern.compile(TOKEN_REGEX).matcher(path).results().count();
if (pathParams.length > groupCount)
{
// Add the remaining parameters to the URL query.
String queryParams = IntStream.range(0, pathParams.length - groupCount)
.mapToObj(index -> "{parameter" + index + "}")
.collect(Collectors.joining("&"));
path += (path.contains("?") ? "&" : "?") + queryParams;
}
}
public String getContentType()
{
return contentType;
}
public void setContentType(String contentType)
{
this.contentType = contentType;
}
/**
* {@inheritDoc}
* @throws MissingFormatArgumentException If there are not enough pathParams for the path.
*/
@Override
public String toString()
{
StringBuilder sb = new StringBuilder()
.append("Request: ")
.append(getHttpMethod())
.append(" ")
.append(RestAssured.baseURI)
.append(":")
.append(RestAssured.port)
.append("/")
.append(RestAssured.basePath)
.append("/");
sb.append(constructPath());
if(!getBody().isEmpty())
{
sb.append("\nbody:")
.append(getBody());
}
sb.append("\n");
return sb.toString();
}
/**
* Populate the path with the pathParams.
*
* @return The path with tokens replaced with values.
* @throws MissingFormatArgumentException If there are not enough pathParams for the path.
*/
private String constructPath()
{
String getPathFormatted = getPath();
if(getPath().contains("{"))
{
getPathFormatted = getPath().replaceAll(TOKEN_REGEX, "%s");
getPathFormatted = String.format(getPathFormatted, getPathParams());
}
return getPathFormatted;
}
}

View File

@@ -0,0 +1,71 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core;
import io.restassured.response.Response;
import io.restassured.response.ValidatableResponse;
/**
* Defines a Rest Response
*
* @author Paul Brodner
*/
public class RestResponse
{
private Response response;
public RestResponse(Response response)
{
this.setResponse(response);
}
public String getStatusCode()
{
return String.valueOf(response.getStatusCode());
}
public Response getResponse()
{
return response;
}
public void setResponse(Response response)
{
this.response = response;
}
public <T> T toModel(Class<T> classz)
{
return response.as(classz);
}
public ValidatableResponse assertThat()
{
return response.then();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,39 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.assertion;
public interface IModelAssertion<Model>
{
default ModelAssertion<Model> assertThat()
{
return new ModelAssertion<>(this);
}
default ModelAssertion<Model> and()
{
return assertThat();
}
}

View File

@@ -0,0 +1,39 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.assertion;
@SuppressWarnings("rawtypes")
public interface IModelsCollectionAssertion<ModelCollection> {
public ModelsCollectionAssertion and();
public ModelsCollectionAssertion assertThat();
@SuppressWarnings("unchecked")
default ModelCollection when()
{
return (ModelCollection) this;
}
}

View File

@@ -0,0 +1,435 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.assertion;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import io.restassured.path.json.JsonPath;
import org.alfresco.utility.exception.TestConfigurationException;
import org.alfresco.utility.model.TestModel;
import org.testng.Assert;
/**
* Assertion on Rest Model
* Just pass your rest model as constructor
*
* @author Paul Brodner
*/
public class ModelAssertion<T>
{
protected static void checkFieldIsPresent(Object fieldNameToBeRetuned, Object fieldValueToBeRetuned)
{
if (fieldValueToBeRetuned == null)
{
Assert.fail(String.format("Field {%s} was not found in returned response.",fieldNameToBeRetuned));
}
}
private final Object model;
public ModelAssertion(Object model)
{
this.model = model;
}
/**
* Use this DSL for asserting particular fields of your model if your model
* is like this (basic POJO)
* public class Person extends ModelAssertion<Person>
* { private String id = "1234"; }
* you can use assert the id of this person as:
* Person p = new Person(); p.assertThat().field("id").is("1234")
*
* @param fieldName
* @return
* @throws IllegalStateException If the field cannot be converted to JSON.
*/
public AssertionVerbs field(String fieldName)
{
ObjectMapper mapper = new ObjectMapper();
String jsonInString = null;
try
{
jsonInString = mapper.writeValueAsString(model);
}
catch (JsonProcessingException e)
{
throw new IllegalStateException(e);
}
Object fieldValue = JsonPath.with(jsonInString).get(fieldName);
return new AssertionVerbs(model, fieldValue, fieldName);
}
public AssertionItemVerbs fieldsCount()
{
int actualSize = 0;
List<Field> allFields = getAllDeclaredFields(new LinkedList<Field>(), model.getClass());
for (Field field : allFields)
{
field.setAccessible(true);
Object fieldValue = null;
try
{
fieldValue = field.get(model);
}
catch (IllegalAccessException e)
{
throw new IllegalStateException("Unable to load model using reflection.", e);
}
if (fieldValue != null)
actualSize++;
}
return new AssertionItemVerbs(model, actualSize);
}
/**
* Use this method for asserting whole model with different model object. Method allows to ignore particular fields during the comparison.
*
* WARNING: For proper work model should implement {@code toString()} and {@code equals()} methods.
*
* @param expected - expected model.
* @param ignoreFields - fields which should be ignored during assertion.
* @return model.
*/
@SuppressWarnings("unchecked")
public T isEqualTo(T expected, String... ignoreFields)
{
T modelCopy = createCopyIgnoringFields((T) model, ignoreFields);
T expectedCopy = createCopyIgnoringFields(expected, ignoreFields);
Assert.assertEquals(modelCopy, expectedCopy, String.format("Compared objects of type: %s are not equal!", model.getClass()));
return (T) model;
}
/**
* Get all fields declared from all classes hierarchy
*
* @param fields
* @param classz
* @return
*/
private List<Field> getAllDeclaredFields(List<Field> fields, Class<?> classz)
{
if (classz.isAssignableFrom(TestModel.class))
{
return fields;
}
fields.addAll(Arrays.asList(classz.getDeclaredFields()));
if (classz.getSuperclass() != null)
{
fields = getAllDeclaredFields(fields, classz.getSuperclass());
}
return fields;
}
@SuppressWarnings("unchecked")
private T createCopyIgnoringFields(T model, String... ignoreFields)
{
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.registerTypeAdapterFactory(new SerializableTypeAdapterFactory());
Gson gson = gsonBuilder.create();
JsonObject jsonObject = gson.fromJson(gson.toJson(model), JsonObject.class);
for (String ignoreField : ignoreFields)
{
jsonObject.remove(ignoreField);
}
return gson.fromJson(gson.toJson(jsonObject), (Class<? extends T>) model.getClass());
}
/** Workaround from https://github.com/google/gson/issues/544 */
private class SerializableTypeAdapterFactory implements TypeAdapterFactory
{
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type)
{
if (Serializable.class.equals(type.getRawType()))
{
return (TypeAdapter<T>) gson.getAdapter(Object.class);
}
return null;
}
}
/**
* DSL assertion on Rest Model fields
*
* @author Paul Brodner
*/
@SuppressWarnings("unchecked")
public class AssertionVerbs
{
private String fieldName;
private Object model;
private Object fieldValue;
public AssertionVerbs(Object model, Object fieldValue, String fieldName)
{
this.model = model;
this.fieldValue = fieldValue;
this.fieldName = fieldName;
}
private String errorMessage(String info)
{
return String.format("The value of field [%s -> from %s] %s", fieldName, model.getClass().getCanonicalName(), info);
}
public T isNot(Object expected)
{
checkFieldIsPresent(fieldName, fieldValue);
Assert.assertNotEquals(fieldValue, expected, errorMessage("is correct,"));
return (T) model;
}
@Override
public boolean equals(Object o)
{
throw new UnsupportedOperationException("You probably want to use is() rather than equals()");
}
public T is(Object expected)
{
checkFieldIsPresent(fieldName, fieldValue);
Assert.assertEquals(fieldValue.toString(), expected.toString(), errorMessage("is NOT correct,"));
return (T) model;
}
/**
* Check if the supplied field is a non-empty String, Collection or Map.
*
* @throws AssertionError if the field is empty.
* @throws UnsupportedOperationException if the field cannot be checked for emptiness.
*/
public T isNotEmpty()
{
checkFieldIsPresent(fieldName, fieldValue);
if (fieldValue instanceof Collection)
{
Assert.assertNotEquals(fieldValue, Collections.emptyList(), errorMessage("is empty,"));
}
else if (fieldValue instanceof String)
{
Assert.assertNotEquals(fieldValue, "", errorMessage("is empty,"));
}
else if (fieldValue instanceof Map)
{
Assert.assertNotEquals(fieldValue, Collections.emptyMap(), errorMessage("is empty,"));
}
else if (fieldValue instanceof Integer)
{
Assert.assertNotEquals(fieldValue.toString(), "", errorMessage("is empty,"));
}
else if (fieldValue instanceof Long)
{
Assert.assertNotEquals(fieldValue.toString(), "", errorMessage("is empty,"));
}
else if (fieldValue instanceof Boolean)
{
Assert.assertNotEquals(String.valueOf(fieldValue), "", errorMessage("is empty,"));
}
else
{
throw new UnsupportedOperationException("Cannot check for emptiness of " + fieldValue.getClass());
}
return (T) model;
}
public T isNotNull()
{
checkFieldIsPresent(fieldName, fieldValue);
Assert.assertNotNull(fieldValue, errorMessage("is null,"));
return (T) model;
}
public T isNull()
{
Assert.assertNull(fieldValue, errorMessage("is not null,"));
return (T) model;
}
/**
* Check if the supplied field is an empty String, Collection or Map.
*
* @throws AssertionError if the field is not empty.
* @throws UnsupportedOperationException if the field cannot be checked for emptiness.
*/
public T isEmpty()
{
checkFieldIsPresent(fieldName, fieldValue);
if (fieldValue instanceof Collection)
{
Assert.assertEquals((Collection<?>) fieldValue, Collections.emptyList(), errorMessage("is NOT empty,"));
}
else if (fieldValue instanceof String)
{
Assert.assertEquals(fieldValue, "", errorMessage("is NOT empty,"));
}
else if (fieldValue instanceof Map)
{
Assert.assertEquals(fieldValue, Collections.emptyMap(), errorMessage("is NOT empty,"));
}
else
{
throw new UnsupportedOperationException("Cannot check for emptiness of " + fieldValue.getClass());
}
return (T) model;
}
public T contains(String value)
{
if (!fieldValue.toString().contains(value))
{
Assert.fail(errorMessage("does NOT contain expected value: " + value + ", Current Value: " + fieldValue.toString()));
}
return (T) model;
}
public T notContains(String value)
{
if (fieldValue.toString().contains(value))
{
Assert.fail(errorMessage("does contain unexpected value: " + value + ", Current Value: " + fieldValue.toString()));
}
return (T) model;
}
/**
* Assert if predicate value is greater than the field value
* @author Michael Suzuki
* @param value the predicate
* @return
* @throws TestConfigurationException
*
*/
public T isGreaterThan(Integer value) throws TestConfigurationException
{
return validateSize(value, Operation.Greater);
}
private T validateSize(Integer value, Operation operation) throws TestConfigurationException
{
try
{
if(value == null)
{
throw new TestConfigurationException("Input must be valid");
}
Integer b = Integer.valueOf(fieldValue.toString());
switch (operation)
{
case Greater:
if(value > b)
{
Assert.fail(errorMessage(String.format("The expected value %s is not greater than the actual value %s ",
value, fieldValue.toString())));
}
break;
case Less:
if(value < b)
{
Assert.fail(errorMessage(String.format("The expected value %s is not less than the actual value %s ",
value, fieldValue.toString())));
}
break;
default:
Assert.fail(errorMessage("No operation type provided"));
break;
}
}
catch(NumberFormatException e)
{
Assert.fail(errorMessage("The field is not numeric " + fieldValue.toString()));
}
catch (NullPointerException ne)
{
Assert.fail(errorMessage("The input value must be numeric " + value));
}
return (T) model;
}
/**
* Assert if predicate value is less than the field value
* @author Michael Suzuki
* @param value the predicate
* @return
* @throws TestConfigurationException
*
*/
public T isLessThan(Integer value) throws TestConfigurationException
{
return validateSize(value, Operation.Less);
}
}
@SuppressWarnings("unchecked")
public class AssertionItemVerbs
{
private Object model;
private Object actual;
public AssertionItemVerbs(Object model, Object actual)
{
this.model = model;
this.actual = actual;
}
public T is(Object expected) {
Assert.assertEquals(actual, expected, String.format("For model [%s], the expected value is not correct ",
model.getClass().getSimpleName(), expected.toString(), actual.toString()));
return (T) model;
}
}
public static enum Operation
{
Less,Greater
}
}

View File

@@ -0,0 +1,279 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.assertion;
import static org.alfresco.utility.report.log.Step.STEP;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.rest.core.IRestModelsCollection;
import org.alfresco.utility.exception.TestConfigurationException;
import org.alfresco.utility.model.Model;
import org.apache.commons.beanutils.BeanUtils;
import org.testng.Assert;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Ordering;
import io.restassured.path.json.JsonPath;
/**
* Assertion on Rest Model Collection
* Just pass your rest model collection as constructor
*
* @author Paul Brodner
*/
public class ModelsCollectionAssertion<C>
{
@SuppressWarnings("rawtypes")
private IRestModelsCollection modelCollection;
@SuppressWarnings("rawtypes")
public ModelsCollectionAssertion(IRestModelsCollection modelCollection)
{
this.modelCollection = modelCollection;
}
/**
* check if "entries" list from JSON is not empty
*/
@SuppressWarnings("unchecked")
public C entriesListIsNotEmpty()
{
STEP("REST API: Assert that entries list from response is not empty");
Assert.assertFalse(modelCollection.isEmpty(), "Entries list from response is empty.Check the logs for more details!");
return (C) modelCollection;
}
/**
* check if "entries" list from JSON is empty
*/
@SuppressWarnings("unchecked")
public C entriesListIsEmpty()
{
STEP("REST API: Assert that entries list from response is empty");
Assert.assertTrue(modelCollection.isEmpty(), "Entries list from response is not empty.Check the logs for more details!");
return (C) modelCollection;
}
@SuppressWarnings("unchecked")
public C entriesListCountIs(int expectedCount)
{
STEP(String.format("REST API: Assert that entries list count is %d", expectedCount));
int actualSize = modelCollection.getEntries().size();
Assert.assertEquals(actualSize, expectedCount);
return (C) modelCollection;
}
@SuppressWarnings("unchecked")
public C entriesListContains(String key, String value)
{
List<Model> modelEntries = modelCollection.getEntries();
String fieldValue = "";
for (Model m : modelEntries) {
Object model = loadModel(m);
try {
ObjectMapper mapper = new ObjectMapper();
String jsonInString = mapper.writeValueAsString(model);
fieldValue = JsonPath.with(jsonInString).get(key);
if (fieldValue != null && fieldValue.equals(value)) {
break;
}
} catch (Exception e) {
throw new TestConfigurationException(String.format(
"You try to assert field [%s] that doesn't exist in class: [%s]. Exception: %s, Please check your code!",
key, getClass().getCanonicalName(), e.getMessage()));
}
}
Assert.assertEquals(fieldValue, value, String.format("Entry with key: [%s] with value [%s] not found in list", key, value));
return (C) modelCollection;
}
@SuppressWarnings("unchecked")
public C entriesListDoesNotContain(String key, String value)
{
boolean exist = false;
List<Model> modelEntries = modelCollection.getEntries();
for (Model m : modelEntries) {
Object model = loadModel(m);
String fieldValue = "";
try {
ObjectMapper mapper = new ObjectMapper();
String jsonInString = mapper.writeValueAsString(model);
fieldValue = JsonPath.with(jsonInString).get(key);
if (fieldValue != null && fieldValue.equals(value)) {
exist = true;
break;
}
} catch (Exception e) {
// nothing to do
}
}
Assert.assertFalse(exist,
String.format("Entry with key: %s and value %s was found in list", key, value));
return (C) modelCollection;
}
@SuppressWarnings("unchecked")
public C entriesListDoesNotContain(String key)
{
boolean exist = modelInList(key);
Assert.assertFalse(exist,
String.format("Entry list contains key: %s", key));
return (C) modelCollection;
}
@SuppressWarnings("unchecked")
public C entriesListContains(String key)
{
boolean exist = modelInList(key);
Assert.assertTrue(exist,
String.format("Entry list doesn't contain key: %s", key));
return (C) modelCollection;
}
private boolean modelInList(String key)
{
List<Model> modelEntries = modelCollection.getEntries();
for (Model m : modelEntries)
{
Object model = loadModel(m);
ObjectMapper mapper = new ObjectMapper();
String jsonInString;
try
{
jsonInString = mapper.writeValueAsString(model);
}
catch (JsonProcessingException e)
{
throw new IllegalStateException("Failed to convert model to string.", e);
}
Object fieldValue = JsonPath.with(jsonInString).get(key);
if (fieldValue != null)
{
return true;
}
}
return false;
}
@SuppressWarnings("unchecked")
public C paginationExist()
{
STEP("REST API: Assert that response has pagination");
Assert.assertNotNull(modelCollection.getPagination(), "Pagination is was not found in the response");
return (C) modelCollection;
}
/**
* Check one field from pagination json body
*
* @param field
* @return
*/
@SuppressWarnings("rawtypes")
public PaginationAssertionVerbs paginationField(String field)
{
return new PaginationAssertionVerbs<C>(modelCollection, field, modelCollection.getPagination());
}
/**
* check is the entries are ordered ASC by a specific field
*
* @param field from json response
* @return
*/
@SuppressWarnings("unchecked")
public C entriesListIsSortedAscBy(String field)
{
List<Model> modelEntries = modelCollection.getEntries();
List<String> fieldValues = new ArrayList<String>();
for(Model m: modelEntries)
{
Object model = loadModel(m);
String fieldValue = "";
try {
fieldValue = BeanUtils.getProperty(model, field);
fieldValues.add(fieldValue);
}
catch (Exception e)
{
// nothing to do
}
}
Assert.assertTrue(Ordering.natural().isOrdered(fieldValues), String.format("Entries are not ordered ASC by %s", field));
return (C) modelCollection;
}
/**
* check is the entries are ordered DESC by a specific field
*
* @param field from json response
* @return
*/
@SuppressWarnings("unchecked")
public C entriesListIsSortedDescBy(String field)
{
List<Model> modelEntries = modelCollection.getEntries();
List<String> fieldValues = new ArrayList<String>();
for(Model m: modelEntries)
{
Object model = loadModel(m);
String fieldValue = "";
try {
fieldValue = BeanUtils.getProperty(model, field);
fieldValues.add(fieldValue);
}
catch (Exception e)
{
// nothing to do
}
}
Assert.assertTrue(Ordering.natural().reverse().isOrdered(fieldValues), String.format("Entries are not ordered DESC by %s", field));
return (C) modelCollection;
}
private Object loadModel(Model m)
{
try
{
Method method = m.getClass().getMethod("onModel", new Class[] {});
return method.invoke(m, new Object[] {});
}
catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e)
{
throw new IllegalStateException("Failed to load model using reflection.", e);
}
}
}

View File

@@ -0,0 +1,104 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.assertion;
import org.alfresco.rest.core.IRestModelsCollection;
import org.alfresco.rest.model.RestPaginationModel;
import org.alfresco.utility.exception.TestConfigurationException;
import org.apache.commons.beanutils.BeanUtils;
import org.testng.Assert;
/**
* Pagination related assertions
*
* @author Paul Brodner
*/
public class PaginationAssertionVerbs<C> {
private RestPaginationModel pagination;
private C modelCollection;
private String fieldName;
@SuppressWarnings({ "rawtypes", "unchecked" })
public PaginationAssertionVerbs(IRestModelsCollection modelCollection, String fieldName, RestPaginationModel pagination) {
this.modelCollection = (C)modelCollection;
this.fieldName = fieldName;
this.pagination = pagination;
}
/**
* @return the value of the field
*/
private String getFieldValue() {
String value = "";
try {
value = BeanUtils.getProperty(pagination, fieldName);
} catch (Exception e) {
throw new TestConfigurationException(String.format(
"You try to assert field [%s] that doesn't exist in class: [%s]. Exception: %s, Please check your code!",
fieldName, modelCollection.getClass().getCanonicalName(), e.getMessage()));
}
return value;
}
private String errorMessage(String info) {
return String.format("The value of field [%s -> from %s] %s", fieldName,
modelCollection.getClass().getCanonicalName(), info);
}
public C is(String expected) {
Assert.assertEquals(getFieldValue(), expected, errorMessage("is NOT correct,"));
return modelCollection;
}
public C isNot(Object expected) {
Assert.assertNotEquals(getFieldValue(), expected, errorMessage("is correct,"));
return modelCollection;
}
public C isNotEmpty() {
Assert.assertNotEquals(getFieldValue(), "", errorMessage("is empty,"));
return modelCollection;
}
public C isNotNull() {
Assert.assertNotNull(getFieldValue(), errorMessage("is null,"));
return modelCollection;
}
public C isNotPresent() {
Assert.assertNull(getFieldValue(), errorMessage("is present,"));
return modelCollection;
}
public C isEmpty() {
Assert.assertEquals(getFieldValue(), "", errorMessage("is NOT empty,"));
return modelCollection;
}
}

View File

@@ -0,0 +1,76 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.swagger;
/**
* Executed via command line/terminal from root of this project
* Just execute <code>mvn exec:java</code> passing as arguments:
* -Dcoverage => this will show on screen the actual coverage of TAS (vs requests that exists in each YAML file - defined in pom.xml)
* -Dmodels => this will show all MISSING models that are NOT already implemented in TAS.
* -Dmodels=a,b,d => this will generate ONLY the models 'a', 'b' and 'd' passed as parameter
* -Dhelp => show help
*
* @author Paul Brodner
*/
public class Generator
{
public static String line = "********\n------------------------------------------------------------------------";
public static void main(String[] args)
{
if (!System.getProperties().containsKey("coverage") && !System.getProperties().containsKey("models") || System.getProperties().containsKey("help") )
{
System.out.println(line);
System.out.println("No parameters provided, please use the following values:\n");
System.out.println(
"mvn exec:java -Dcoverage => this will show on screen the actual coverage of TAS (vs requests that exists in each YAML file - defined in pom.xml).");
System.out.println("mvn exec:java -Dmodels => this will show all MISSING models that are NOT already implemented in TAS.");
System.out.println("mvn exec:java -Dmodels=a,b,d => this will generate ONLY the models 'a', 'b' and 'd' passed as parameter.");
System.out.println(line);
}
for (String url : args)
{
if (System.getProperty("coverage") != null)
{
/*
* <code>mvn exec:java -Dcoverage</code>
*/
new SwaggerYamlParser(url).computeCoverage();
}
else if (System.getProperty("models") != null)
{
/*
* <code>mvn exec:java -Dmodels</code>
* <code>mvn exec:java -Dmodels=a,c,e</code>
*/
new SwaggerYamlParser(url).generateMissingModules();
}
}
}
}

View File

@@ -0,0 +1,150 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.swagger;
import java.util.AbstractMap;
import java.util.Map.Entry;
import io.swagger.models.properties.ArrayProperty;
import io.swagger.models.properties.RefProperty;
/**
* Model property used by freemarker template in {@link SwaggerModel}
*
*/
public class RestModelProperty
{
private String name;
private String type;
private String description;
private Boolean isRequired = false;
/** If the property is a ref then this is the type referenced. */
private String simpleRef;
/** If the property is an array then this is the type of the items in it. */
private RestModelProperty itemsType;
public static RestModelProperty build(Entry<String, io.swagger.models.properties.Property> property)
{
RestModelProperty model = new RestModelProperty();
model.setName(property.getKey());
model.setType(property.getValue().getType());
model.setDescription(property.getValue().getDescription());
model.setIsRequired(property.getValue().getRequired());
if (property.getValue() instanceof RefProperty)
{
RefProperty refProperty = (RefProperty) property.getValue();
model.setSimpleRef(refProperty.getSimpleRef());
}
if (property.getValue() instanceof ArrayProperty)
{
ArrayProperty arrayProperty = (ArrayProperty) property.getValue();
Entry<String, io.swagger.models.properties.Property> itemsEntry = new AbstractMap.SimpleEntry<String, io.swagger.models.properties.Property>(
arrayProperty.getName(), arrayProperty.getItems());
model.setItemsType(RestModelProperty.build(itemsEntry));
}
return model;
}
public String getName()
{
return name;
}
public String getNameCapitalized()
{
return org.apache.commons.lang3.StringUtils.capitalize(name);
}
public void setName(String name)
{
this.name = name;
}
public String getType()
{
switch (this.type)
{
case "string":
return "String";
case "integer":
return "int";
case "object":
return "Object";
case "ref":
return "Rest" + getSimpleRef() + "Model";
case "array":
return "List<" + getItemsType().getType() + ">";
default:
return type;
}
}
public void setType(String type)
{
this.type = type;
}
public String getDescription()
{
return description;
}
public void setDescription(String description)
{
this.description = description;
}
public Boolean isRequired()
{
return isRequired;
}
public void setIsRequired(Boolean isRequired)
{
this.isRequired = isRequired;
}
protected void setSimpleRef(String simpleRef)
{
this.simpleRef = simpleRef;
}
public String getSimpleRef()
{
return simpleRef;
}
protected void setItemsType(RestModelProperty itemsType)
{
this.itemsType = itemsType;
}
public RestModelProperty getItemsType()
{
return itemsType;
}
}

View File

@@ -0,0 +1,222 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.swagger;
import java.io.BufferedReader;
import java.io.Console;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import org.alfresco.utility.exception.TestConfigurationException;
import freemarker.template.TemplateException;
import io.swagger.models.Model;
import io.swagger.models.Swagger;
/**
* Handles all
* <code>Entry<String, Model> model : swagger.getDefinitions().entrySet()</code>
*
* @author Paul Brodner
*/
public class SwaggerDefinitions
{
private Swagger swagger;
List<SwaggerModel> missingSwaggerModels = new ArrayList<SwaggerModel>();
Path modelsPath;
public SwaggerDefinitions(Swagger swagger)
{
this.swagger = swagger;
modelsPath = Paths.get(Paths.get(".").toAbsolutePath().normalize().toFile().getPath(), "src/main/java/org/alfresco/rest/model");
}
public void generateMissingDefinitions()
{
/*
* read the content of ignore-moldels file
*/
List<String> ignoreModel = new ArrayList<String>();
try
{
try (BufferedReader br = new BufferedReader(new FileReader(Paths.get(modelsPath.toFile().getPath(), "ignore-models").toFile())))
{
String line;
while ((line = br.readLine()) != null)
{
if (!line.startsWith("#") && !line.equals(""))
ignoreModel.add(line);
}
}
}
catch (IOException e)
{
throw new IllegalStateException("Exception while generating missing definitions.", e);
}
/*
* filter all models, ignoring the ones from ignore-model or the ones that are already created locally
*/
for (Entry<String, Model> model : swagger.getDefinitions().entrySet())
{
SwaggerModel swaggerModel = new SwaggerModel(model, swagger);
//regexp
if(swaggerModel.getName().matches(".*Paging|.*Entry"))
{
System.out.printf("Ignoring Model: [%s] (based on regular expression: '.*Paging|.*Entry')\n", swaggerModel.getName());
continue;
}
if (ignoreModel.contains(swaggerModel.getName()))
{
System.out.printf("Ignoring Model: [%s] (based on 'ignore-models' file)\n", swaggerModel.getName());
continue;
}
if (!swaggerModel.exist())
missingSwaggerModels.add(swaggerModel);
}
System.out.println(Generator.line);
int count = 0;
/*
* iterate on all missing models
*/
for (SwaggerModel swaggerModel : missingSwaggerModels)
{
if (count == 0) // table heather
{
System.out.printf("MISSING MODEL ~ THE NEW FILE THAT WILL BE GENERATED\n");
System.out.println(" 0 -[Skip all]");
}
count += 1;
StringBuilder info = new StringBuilder();
info.append(" ")
.append(count)
.append(" -")
.append("[")
.append(swaggerModel.getName())
.append("] ~ [")
.append(swaggerModel.getPath())
.append("]");
System.out.println(info.toString());
}
System.out.println("ENTER -[All Models]");
/*
* wait for input
*/
Console c = System.console();
if (c != null && missingSwaggerModels.size() > 0)
{
c.format("%s\n", Generator.line);
c.format("\nPlease select what Models you want to generate (ex: 1,3,4) or press <<ENTER>>to generating all missing models:");
String prompt = c.readLine();
if(prompt.equals("0"))
return;
if (prompt.length() == 0)
{
System.out.println("\nStart generating all models...");
for (SwaggerModel swaggerModel : missingSwaggerModels)
{
generateModel(swaggerModel);
}
}
else
{
if (prompt.contains(","))
{
String[] modelsIDToGen = prompt.split(",");
for (int i = 0; i < modelsIDToGen.length; i++)
{
generateSelectedSwaggerModel(modelsIDToGen[i]);
}
}
else
{
generateSelectedSwaggerModel(prompt);
}
}
}
}
/**
* Generate the model based on the ID provided
*
* @param id
*/
private void generateSelectedSwaggerModel(String id)
{
int choice = Integer.parseInt(id);
if ((choice - 1) >= missingSwaggerModels.size())
{
throw new TestConfigurationException(
"You specified a wrong ID: [" + id + "] please select one value from the list displayed above. Run the command again!");
}
generateModel(missingSwaggerModels.get(choice - 1));
}
public boolean generateDefinition(String modelParamValue)
{
for (Entry<String, Model> model : swagger.getDefinitions().entrySet())
{
SwaggerModel swaggerModel = new SwaggerModel(model, swagger);
if (swaggerModel.getName().equals(modelParamValue))
{
generateModel(swaggerModel);
return true;
}
}
System.err.println("Model that you provided was NOT found!");
System.err.printf("Model [%s] not found in Swagger file: %s\n", modelParamValue, swagger.getBasePath());
return false;
}
private void generateModel(SwaggerModel swaggerModel)
{
try
{
swaggerModel.generate();
}
catch (IOException | TemplateException e)
{
throw new IllegalStateException("Exception while generating model definition.", e);
}
}
}

View File

@@ -0,0 +1,186 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.swagger;
import java.io.Console;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
import io.swagger.models.Model;
import io.swagger.models.Swagger;
/**
* Handles swagger definitions <code>Entry<String, Model> model : swagger.getDefinitions().entrySet()</code>
*
* @author Paul Brodner
*/
public class SwaggerModel
{
private Swagger swagger;
private Entry<String, Model> model;
private Path modelsPath = Paths.get(Paths.get(".").toAbsolutePath().normalize().toFile().getPath(), "src/main/java/org/alfresco/rest/model");
private List<RestModelProperty> properties = new ArrayList<RestModelProperty>();
private Configuration cfg;
private Configuration getConfig() throws IOException
{
if (cfg == null)
{
cfg = new Configuration(Configuration.VERSION_2_3_23);
cfg.setDirectoryForTemplateLoading(new File("src/main/resources"));
}
return cfg;
}
public SwaggerModel(Entry<String, Model> model, Swagger swagger)
{
this.model = model;
this.swagger = swagger;
if(model.getValue().getProperties()!=null)
{
/*
* compute the properties of this model
*/
for (Entry<String, io.swagger.models.properties.Property> property : model.getValue().getProperties().entrySet())
{
if (property.getKey().equals("entry"))
continue;
properties.add(RestModelProperty.build(property));
}
}
}
/**
* @return boolean value if file is already generated in TAS, under 'models' package
*/
public boolean exist()
{
return getPath().exists();
}
/**
* @return the location of the model in TAS
*/
public File getPath()
{
return Paths.get(modelsPath.toFile().getPath(), getNameInTAS() + ".java").toFile();
}
/**
* @return original model name as defined in Swagger YAML
*/
public String getName()
{
return model.getKey();
}
/**
* @return the name as it will be used in TAS
*/
public String getNameInTAS()
{
return String.format("Rest%sModel", getName());
}
public List<RestModelProperty> getProperties()
{
return properties;
}
public void setProperties(List<RestModelProperty> properties)
{
this.properties = properties;
}
public void generate() throws IOException, TemplateException
{
Template template = getConfig().getTemplate("rest-model.ftl");
// here we will store all data passed to template
Map<String, Object> data = new HashMap<String, Object>();
data.put("date", new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()));
data.put("author", System.getProperty("user.name"));
data.put("yamlTitle", swagger.getInfo().getTitle());
data.put("yamlBasePath", swagger.getBasePath());
data.put("name", getNameInTAS());
if (!getProperties().isEmpty())
data.put("properties", getProperties());
Writer append = new StringWriter();
template.process(data, append);
append.close();
System.out.println("----- " + getPath().getName() + " -----\n");
System.out.println(Generator.line);
System.out.println(append.toString());
System.out.printf("\nGenerating Model: %-10s to ->'%-60s'", getName(), getPath());
if (exist())
{
Console c = System.console();
if (c != null)
{
System.out.printf("There is already one model created locally: \n%s\nDo you want to override it ?(ENTER=yes, any other key=no):", getPath());
if (c.readLine().length() == 0)
{
writeContent(append.toString());
}
}
}
else
{
writeContent(append.toString());
}
}
private void writeContent(String content) throws IOException
{
FileWriter fw = new FileWriter(getPath());
fw.write(content);
fw.close();
}
}

View File

@@ -0,0 +1,219 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.swagger;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Map;
import java.util.Map.Entry;
import org.alfresco.utility.exception.TestConfigurationException;
import org.apache.commons.io.FilenameUtils;
import io.swagger.models.HttpMethod;
import io.swagger.models.Operation;
import io.swagger.models.Swagger;
/**
* Handles all
* <code>Entry<String, io.swagger.models.Path> path : swagger.getPaths().entrySet()</code>
*
* @author Paul Brodner
*/
public class SwaggerPaths
{
private Swagger swagger;
private BufferedWriter fileWithMissingRequests;
private BufferedWriter fileWithImplementedRequests;
private String swaggerFilePath;
private int implementedRequestCount = 0;
private int missingRequestCount = 0;
public SwaggerPaths(Swagger swagger, String swaggerFilePath)
{
this.swagger = swagger;
this.swaggerFilePath = swaggerFilePath;
}
/**
* Compare requests that exist in swagger yaml file vs request implemented in your code
* any findings are saved to a missing-request txt file.
*
* @throws TestConfigurationException
*/
public void computeCoverage()
{
try
{
System.out.println("Start computing the coverage of TAS vs Swagger file. Stand by...");
File missingReq = new File(String.format("missing-requests-%s.txt", FilenameUtils.getBaseName(swaggerFilePath)));
missingReq.delete();
fileWithMissingRequests = new BufferedWriter(new FileWriter(missingReq));
fileWithMissingRequests.write(String.format("BasePath: {%s}", swagger.getBasePath()));
fileWithMissingRequests.newLine();
fileWithMissingRequests.write("These requests generated should be analyzed and modified according to your needs.");
fileWithMissingRequests.newLine();
fileWithMissingRequests.write("PLEASE UPDATE your 'RestReturnedModel' name with the appropiate returned model by your request.");
fileWithMissingRequests.newLine();
fileWithMissingRequests.newLine();
File implReq = new File(String.format("implemented-requests-%s.txt", FilenameUtils.getBaseName(swaggerFilePath)));
implReq.delete();
fileWithImplementedRequests = new BufferedWriter(new FileWriter(implReq));
for (Entry<String, io.swagger.models.Path> path : swagger.getPaths().entrySet())
{
for (Map.Entry<HttpMethod, Operation> operation : path.getValue().getOperationMap().entrySet())
{
searchPattern(path.getKey(), operation);
}
}
System.out.println(toString());
fileWithImplementedRequests.close();
fileWithMissingRequests.close();
if (missingRequestCount > 0)
{
System.out.println("[ERROR] PLEASE ANALYSE THE GENERATED <missing-requests> file(s), it seems some request were NOT implemented!");
}
else
missingReq.delete();
System.out.println("ALSO ANALYZE <implemented-requests.txt> for current implementation, take a look at duplicated requests if any!");
}
catch (IOException e)
{
throw new RuntimeException("Exception while trying to create coverage report.", e);
}
}
/**
* Use RegExp to check for requests in code, line by line: no further algorithm performance analysis required at this time
*
* @param httpMethod
* @param pathUrl
* @param methodName
*/
private void searchPattern(String pathUrl, Entry<HttpMethod, Operation> operation)
{
String originalPathUrl = pathUrl;
String httpMethod = operation.getKey().name();
/* update path url, removing first "/" as implemented in TAS requests. */
if (pathUrl.startsWith("/"))
pathUrl = pathUrl.substring(1, pathUrl.length());
if (pathUrl.contains("{"))
pathUrl = pathUrl.replace("{", "\\{");
/*
* if in code we have something like: <code> "(HttpMethod.GET, "process-definitions?{parameters}" </code>
* our regular expression will search for text insider the 'HttpMethod.GET' concatenated with found 'pathUrl" until the optional double brackets
* RegExp: .*HttpMethod.%s.*\\\"%s\\\"?.*
* Result: .*HttpMethod.GET."process-definition".* - if this line is found we have a match
*/
String patternRegEx = String.format(".*HttpMethod.%s.*\\\"%s\\\"?.*", httpMethod, pathUrl);
// all request are saved under this directory, but limited to the rest/request folder
File project = Paths.get(".").toAbsolutePath().normalize().toFile();
Path requestsPath = Paths.get(project.getPath(), "src/main/java/org/alfresco/rest/requests");
BufferedReader br;
try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(requestsPath))
{
boolean found = false;
for (Path path : directoryStream)
{
if (Files.isRegularFile(path) && Files.isReadable(path))
{
String line;
InputStream fis = new FileInputStream(path.toFile());
InputStreamReader isr = new InputStreamReader(fis, Charset.forName("UTF-8"));
br = new BufferedReader(isr);
while ((line = br.readLine()) != null)
{
if (line.matches(patternRegEx))
{
// log("OK - Pattern %-60s found in: {%s} file." , originalPathUrl, path.getFileName());
fileWithImplementedRequests.write(String.format("%-10s %-60s %s", httpMethod, pathUrl, path.getFileName()));
fileWithImplementedRequests.newLine();
fileWithImplementedRequests.flush();
implementedRequestCount += 1;
found = true;
}
}
br.close();
}
}
if (!found)
{
fileWithMissingRequests.write(String.format("%-10s %-60s %s", httpMethod, originalPathUrl, patternRegEx));
fileWithMissingRequests.newLine();
SwaggerRequest swaggerReqModel = new SwaggerRequest(httpMethod, pathUrl, operation.getValue());
fileWithMissingRequests.write(swaggerReqModel.getRequestSample());
fileWithMissingRequests.flush();
missingRequestCount += 1;
}
}
catch (IOException ex)
{
ex.printStackTrace();
}
}
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("|\n").append("|------------------------------------------------------------------------\n").append("COVERAGE: ")
.append(swaggerFilePath).append("\n");
int percentage = (implementedRequestCount * 100) / (implementedRequestCount + missingRequestCount);
sb.append("\t\tImplemented:\t").append(String.valueOf(percentage)).append("% [# ").append(implementedRequestCount).append("]\t Missing: ");
percentage = (missingRequestCount * 100) / (implementedRequestCount + missingRequestCount);
sb.append(String.valueOf(percentage)).append("% [# ").append(missingRequestCount).append("]");
return sb.toString();
}
}

View File

@@ -0,0 +1,92 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.swagger;
import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.util.HashMap;
import java.util.Map;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
import io.swagger.models.Operation;
public class SwaggerRequest
{
private Configuration cfg;
private Operation swaggerRequest;
private String httpMethod;
private String pathUrl;
private Configuration getConfig()
{
if (cfg == null)
{
cfg = new Configuration(Configuration.VERSION_2_3_23);
try
{
cfg.setDirectoryForTemplateLoading(new File("src/main/resources"));
}
catch (IOException e)
{
throw new IllegalStateException("Exception while configuring Freemarker template directory.", e);
}
}
return cfg;
}
public SwaggerRequest(String httpMethod, String pathUrl, Operation swaggerRequest)
{
this.swaggerRequest = swaggerRequest;
this.httpMethod = httpMethod;
this.pathUrl = pathUrl;
}
public String getRequestSample()
{
try
{
Template template = getConfig().getTemplate("rest-request.ftl");
Map<String, Object> data = new HashMap<String, Object>();
data.put("operationId", swaggerRequest.getOperationId());
data.put("httpMethod", httpMethod);
data.put("pathUrl", pathUrl);
Writer append = new StringWriter();
template.process(data, append);
append.close();
return append.toString();
}
catch (IOException | TemplateException e)
{
throw new IllegalStateException("Exception while loading sample request.", e);
}
}
}

View File

@@ -0,0 +1,104 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.core.swagger;
import org.alfresco.utility.exception.TestConfigurationException;
import io.swagger.models.Swagger;
import io.swagger.parser.SwaggerParser;
/**
* This will handle the Swagger YAML file
* It will contain all the models, request or any other properties needed for out generator
*
* @author Paul Brodner
*/
public class SwaggerYamlParser
{
private Swagger swagger;
private String swaggerFilePath;
public SwaggerYamlParser(String swaggerFilePath) throws TestConfigurationException
{
if (swaggerFilePath == null)
throw new TestConfigurationException("'swaggerFilePath' not defined. Please update your pom.xml file with all '<swagger-file-location.yml>'");
this.swaggerFilePath = swaggerFilePath;
this.swagger = new SwaggerParser().read(this.swaggerFilePath);
}
public void computeCoverage()
{
new SwaggerPaths(swagger, this.swaggerFilePath).computeCoverage();
}
public void generateMissingModules()
{
String modelParamValue = System.getProperty("models");
SwaggerDefinitions swaggerDefinitions = new SwaggerDefinitions(swagger);
System.out.println(Generator.line);
System.out.println("Using SWAGGER FILE: " + this.swaggerFilePath);
System.out.println(Generator.line);
/*
* multiple models, separated by comma: 'mvn exec:java -Dmodels=a,b,d'
*/
if (modelParamValue.contains(","))
{
String[] models = {};
models = modelParamValue.split(",");
for (int i = 0; i < models.length; i++)
{
// generate model
swaggerDefinitions.generateDefinition(models[i]);
}
}
else
{
/*
* if no value is added after models "mvn exec:java -Dmodels"
* then we assume that we want to generate all models
*/
if (modelParamValue.equals("true"))
{
swaggerDefinitions.generateMissingDefinitions();
}
/*
* there is just one model passed as value "mvn exec:java -Dmodels=a"
* so only model "a" is generated locally
*/
else
{
swaggerDefinitions.generateDefinition(modelParamValue);
}
}
}
}

View File

@@ -0,0 +1,36 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.exception;
public class EmptyJsonResponseException extends RuntimeException
{
private static final long serialVersionUID = 1L;
public EmptyJsonResponseException(String message)
{
super(String.format("Empty JSON Response returned. Possible API bug, please investigate this further. Message: %s", message));
}
}

View File

@@ -0,0 +1,38 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.exception;
import java.util.Collection;
public class EmptyRestModelCollectionException extends Exception
{
private static final long serialVersionUID = 1L;
public <E> EmptyRestModelCollectionException(Collection<E> models)
{
super(String.format("Empty Rest Model Collection of type: %s -> %s", models.getClass(), models.toString()));
}
}

View File

@@ -0,0 +1,38 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.exception;
public class JsonToModelConversionException extends RuntimeException
{
private static final long serialVersionUID = 1L;
public <T> JsonToModelConversionException(Class<T> classz, Exception e)
{
super(String.format("Could not parse Json Response to model [%s] error: %s", classz.getName(), e.getMessage()));
}
}

View File

@@ -0,0 +1,36 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.exception;
public class ModelToJsonConversionException extends RuntimeException
{
private static final long serialVersionUID = 1L;
public <T> ModelToJsonConversionException(Class<T> classz, Exception e)
{
super(String.format("Could not convert model for [%s] to JSON", classz.getName()), e);
}
}

View File

@@ -0,0 +1,167 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
public class RestAbstractClassModel extends TestModel implements IRestModel<RestAbstractClassModel>
{
@JsonProperty(value = "entry")
RestAbstractClassModel model;
@Override
public RestAbstractClassModel onModel()
{
return model;
}
public String id;
public String title;
public String description;
public String parentId;
public Boolean isContainer = null;
public Boolean isArchive = null;
public Boolean includedInSupertypeQuery = null;
public List<String> mandatoryAspects = null;
public List<RestClassAssociationModel> associations = null;
public List <RestPropertyDefinitionModel> properties = null;
@JsonProperty(value = "model")
public RestClassModel modelInfo;
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public String getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description)
{
this.description = description;
}
public String getParentId()
{
return parentId;
}
public void setParentId(String parentId)
{
this.parentId = parentId;
}
public Boolean getContainer()
{
return isContainer;
}
public void setContainer(Boolean container)
{
isContainer = container;
}
public Boolean getArchive()
{
return isArchive;
}
public void setArchive(Boolean archive)
{
isArchive = archive;
}
public Boolean getIncludedInSupertypeQuery()
{
return includedInSupertypeQuery;
}
public void setIncludedInSupertypeQuery(Boolean includedInSupertypeQuery)
{
this.includedInSupertypeQuery = includedInSupertypeQuery;
}
public List<String> getMandatoryAspects()
{
return mandatoryAspects;
}
public void setMandatoryAspects(List<String> mandatoryAspects)
{
this.mandatoryAspects = mandatoryAspects;
}
public List<RestClassAssociationModel> getAssociations()
{
return associations;
}
public void setAssociations(List<RestClassAssociationModel> associations)
{
this.associations = associations;
}
public List<RestPropertyDefinitionModel> getProperties() {
return properties;
}
public void setProperties(List<RestPropertyDefinitionModel> properties)
{
this.properties = properties;
}
public RestClassModel getModelInfo()
{
return modelInfo;
}
public void setModelInfo(RestClassModel modelInfo)
{
this.modelInfo = modelInfo;
}
}

View File

@@ -0,0 +1,102 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import java.io.Serializable;
import java.util.Map;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
/**
* Generated by 'Kristian.Dimitrov@hyland.com' on '2022-07-14 13:22' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/
public class RestActionBodyExecTemplateModel extends TestModel implements IRestModel<RestActionBodyExecTemplateModel>
{
@JsonProperty(value = "entry")
RestActionBodyExecTemplateModel model;
@Override
public RestActionBodyExecTemplateModel onModel()
{
return model;
}
@JsonProperty(required = true)
private String actionDefinitionId;
private Map<String, Serializable> params;
public String getActionDefinitionId()
{
return this.actionDefinitionId;
}
public void setActionDefinitionId(String actionDefinitionId)
{
this.actionDefinitionId = actionDefinitionId;
}
public Map<String, Serializable> getParams()
{
return this.params;
}
public void setParams(Map<String, Serializable> params)
{
this.params = params;
}
@Override
public String toString()
{
return "RestActionBodyExecTemplateModel{" + "actionDefinitionId='" + actionDefinitionId + '\'' + ", params=" + params + '}';
}
@Override
public boolean equals(Object o)
{
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
RestActionBodyExecTemplateModel that = (RestActionBodyExecTemplateModel) o;
return Objects.equals(actionDefinitionId, that.actionDefinitionId) && Objects.equals(params, that.params);
}
@Override
public int hashCode()
{
return Objects.hash(actionDefinitionId, params);
}
}

View File

@@ -0,0 +1,100 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import java.util.List;
import java.util.Objects;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Generated by 'mpichura' on '2022-10-05 09:58' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/
public class RestActionConstraintDataModel extends TestModel implements IRestModel<RestActionConstraintDataModel>
{
@JsonProperty(value = "entry")
RestActionConstraintDataModel model;
@Override
public RestActionConstraintDataModel onModel()
{
return model;
}
/**
Constraint value (this can also be a node id)
*/
@JsonProperty(required = true)
private String value;
/**
Constraint display label
*/
private String label;
public String getValue()
{
return this.value;
}
public void setValue(String value)
{
this.value = value;
}
public String getLabel()
{
return this.label;
}
public void setLabel(String label)
{
this.label = label;
}
@Override
public boolean equals(Object o)
{
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RestActionConstraintDataModel that = (RestActionConstraintDataModel) o;
return value.equals(that.value) && Objects.equals(label, that.label);
}
@Override
public int hashCode()
{
return Objects.hash(value, label);
}
}

View File

@@ -0,0 +1,136 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import java.util.List;
import java.util.Objects;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Generated by 'mpichura' on '2022-10-05 09:58' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/
public class RestActionConstraintModel extends TestModel implements IRestModel<RestActionConstraintModel>
{
@JsonProperty(value = "entry")
RestActionConstraintModel model;
@Override
public RestActionConstraintModel onModel()
{
return model;
}
/**
Name of the constraint.
*/
private String constraintName;
/**
A list of constraint possbile values along with additional data (label, isNode flag).
Sample object could be:
```JSON
"constraintValues": [
{
"value": "EQUALS",
"label": "Equals"
},
{
"value": "CONTAINS",
"label": "Contains"
},
{
"value": "BEGINS",
"label": "Begins With"
},
{
"value": "ENDS",
"label": "Ends With"
},
{
"value": "GREATER_THAN",
"label": "Greater Than"
},
{
"value": "GREATER_THAN_EQUAL",
"label": "Greater Than Or Equal To"
},
{
"value": "LESS_THAN",
"label": "Less Than"
},
{
"value": "LESS_THAN_EQUAL",
"label": "Less Than Or Equal To"
}
]
*/
private List<RestActionConstraintDataModel> constraintValues;
public String getConstraintName()
{
return this.constraintName;
}
public void setConstraintName(String constraintName)
{
this.constraintName = constraintName;
}
public List<RestActionConstraintDataModel> getConstraintValues()
{
return this.constraintValues;
}
public void setConstraintValues(List<RestActionConstraintDataModel> constraintValues)
{
this.constraintValues = constraintValues;
}
@Override
public boolean equals(Object o)
{
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RestActionConstraintModel that = (RestActionConstraintModel) o;
return constraintName.equals(that.constraintName) && Objects.equals(constraintValues, that.constraintValues);
}
@Override
public int hashCode()
{
return Objects.hash(constraintName, constraintValues);
}
}

View File

@@ -0,0 +1,135 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
public class RestActionDefinitionModel extends TestModel implements IRestModel<RestActionDefinitionModel>
{
@JsonProperty(value = "entry")
RestActionDefinitionModel actionDefinitionModel;
private String id;
private String name;
private String title;
private String description;
private List<String> applicableTypes;
private boolean adhocPropertiesAllowed;
private boolean trackStatus;
private List<RestParameterDefinitionModel> parameterDefinitions;
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 getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public String getDescription()
{
return description;
}
public void setDescription(String description)
{
this.description = description;
}
public List<String> getApplicableTypes()
{
return applicableTypes;
}
public void setApplicableTypes(List<String> applicableTypes)
{
this.applicableTypes = applicableTypes;
}
public boolean isAdhocPropertiesAllowed()
{
return adhocPropertiesAllowed;
}
public void setAdhocPropertiesAllowed(boolean adhocPropertiesAllowed)
{
this.adhocPropertiesAllowed = adhocPropertiesAllowed;
}
public boolean isTrackStatus()
{
return trackStatus;
}
public void setTrackStatus(boolean trackStatus)
{
this.trackStatus = trackStatus;
}
public List<RestParameterDefinitionModel> getParameterDefinitions()
{
return parameterDefinitions;
}
public void setParameterDefinitions(List<RestParameterDefinitionModel> parameterDefinitions)
{
this.parameterDefinitions = parameterDefinitions;
}
@Override
public RestActionDefinitionModel onModel()
{
return actionDefinitionModel;
}
}

View File

@@ -0,0 +1,33 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import org.alfresco.rest.core.RestModels;
public class RestActionDefinitionModelsCollection extends RestModels<RestActionDefinitionModel, RestActionDefinitionModelsCollection>
{
}

View File

@@ -0,0 +1,161 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
/**
*
* @author Cristina Axinte
*
* Handles single Activity JSON responses
* Example:
{
"postedAt": "2016-09-30T12:31:54.088+0000",
"feedPersonId": "user-vtcaquckbq",
"postPersonId": "user-vtcaquckbq",
"siteId": "site-mNygPRuKka",
"activitySummary": {
"firstName": "User-vtCaqUCKBq FirstName",
"lastName": "LN-User-vtCaqUCKBq",
"memberFirstName": "User-vtCaqUCKBq FirstName",
"role": "SiteManager",
"memberLastName": "LN-User-vtCaqUCKBq",
"title": "User-vtCaqUCKBq FirstName LN-User-vtCaqUCKBq (User-vtCaqUCKBq)",
"memberPersonId": "User-vtCaqUCKBq"
},
"id": 14689,
"activityType": "org.alfresco.site.user-joined"
}
*
*/
public class RestActivityModel extends TestModel implements IRestModel<RestActivityModel>
{
@JsonProperty(value = "entry")
RestActivityModel activityModel;
@Override
public RestActivityModel onModel()
{
return activityModel;
}
@JsonProperty(required = true)
String id;
/**
* The id of the person who performed the activity
*/
@JsonProperty(required = true)
String postPersonId;
String siteId;
String postedAt;
/**
* The feed on which this activity was posted
*/
@JsonProperty(required = true)
String feedPersonId;
RestActivitySummaryModel activitySummary;
@JsonProperty(required = true)
String activityType;
public String getActivityType()
{
return activityType;
}
public void setActivityType(String activityType)
{
this.activityType = activityType;
}
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public String getPostPersonId()
{
return postPersonId;
}
public void setPostPersonId(String postPersonId)
{
this.postPersonId = postPersonId;
}
public String getSiteId()
{
return siteId;
}
public void setSiteID(String siteId)
{
this.siteId = siteId;
}
public String getPostedAt()
{
return postedAt;
}
public void setPostedAt(String postedAt)
{
this.postedAt = postedAt;
}
public String getFeedPersonId()
{
return feedPersonId;
}
public void setFeedPersonId(String feedPersonId)
{
this.feedPersonId = feedPersonId;
}
public RestActivitySummaryModel getActivitySummary()
{
return activitySummary;
}
public void setActivitySummary(RestActivitySummaryModel activitySummary)
{
this.activitySummary = activitySummary;
}
}

View File

@@ -0,0 +1,69 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import org.alfresco.rest.core.RestModels;
/**
*
* @author Cristina Axinte
*
* /**
* Handle collection of <RestActivityModel>
* Example:
{
"list": {
"pagination": {
"count": 3,
"hasMoreItems": false,
"skipCount": 0,
"maxItems": 100
},
"entries": [
{
"entry": {
"postedAt": "2016-09-30T12:31:55.923+0000",
"feedPersonId": "user-vtcaquckbq",
"postPersonId": "user-vtcaquckbq",
"siteId": "site-mNygPRuKka",
"activitySummary": {
"firstName": "User-vtCaqUCKBq FirstName",
"lastName": "LN-User-vtCaqUCKBq",
"parentObjectId": "e982c6b7-e16e-4a25-ae77-5ed96614e871",
"title": "file-bWbaaGycDm.txt",
"objectId": "3a647ca9-cef9-45d0-ae4a-49cffa131154"
},
"id": 14692,
"activityType": "org.alfresco.documentlibrary.file-added"
}
}
]
}
}
*
*/
public class RestActivityModelsCollection extends RestModels<RestActivityModel, RestActivityModelsCollection>
{
}

View File

@@ -0,0 +1,144 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.constants.UserRole;
import org.alfresco.utility.model.TestModel;
/**
*
* "activitySummary": {
"firstName": "string",
"lastName": "string",
"parentObjectId": "string",
"title": "string",
"objectId": "string"
}
*
* @author Cristina Axinte
*
*/
public class RestActivitySummaryModel extends TestModel implements IRestModel<RestActivitySummaryModel>
{
@JsonProperty(value = "entry")
RestActivitySummaryModel activitySummaryModel;
@Override
public RestActivitySummaryModel onModel()
{
return activitySummaryModel;
}
String firstName;
String lastName;
String parentObjectId;
String title;
String objectId;
String memberFirstName;
UserRole role;
String memberLastName;
String memberPersonId;
public String getMemberFirstName()
{
return memberFirstName;
}
public void setMemberFirstName(String memberFirstName)
{
this.memberFirstName = memberFirstName;
}
public UserRole getRole()
{
return role;
}
public void setRole(UserRole role)
{
this.role = role;
}
public String getMemberLastName()
{
return memberLastName;
}
public void setMemberLastName(String memberLastName)
{
this.memberLastName = memberLastName;
}
public String getMemberPersonId()
{
return memberPersonId;
}
public void setMemberPersonId(String memberPersonId)
{
this.memberPersonId = memberPersonId;
}
public String getFirstName()
{
return firstName;
}
public void setFirstName(String firstName)
{
this.firstName = firstName;
}
public String getLastName()
{
return lastName;
}
public void setLastName(String lastName)
{
this.lastName = lastName;
}
public String getParentObjectId()
{
return parentObjectId;
}
public void setParentObjectId(String parentObjectId)
{
this.parentObjectId = parentObjectId;
}
public String getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public String getObjectId()
{
return objectId;
}
public void setObjectId(String objectId)
{
this.objectId = objectId;
}
}

View File

@@ -0,0 +1,67 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
public class RestAggregateModel extends TestModel implements IRestModel<RestAggregateModel>
{
@JsonProperty(value = "aggregate")
RestAggregateModel model;
@JsonProperty(required = true)
private int numberOfRatings;
private String average;
@Override
public RestAggregateModel onModel()
{
return model;
}
public int getNumberOfRatings()
{
return numberOfRatings;
}
public void setNumberOfRatings(int numberOfRatings)
{
this.numberOfRatings = numberOfRatings;
}
public String getAverage()
{
return average;
}
public void setAverage(String average)
{
this.average = average;
}
}

View File

@@ -0,0 +1,72 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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%
*/
/*
* Copyright 2021 Alfresco Software, Ltd. All rights reserved.
* License rights for this program may be obtained from Alfresco Software, Ltd.
* pursuant to a written agreement and any use of this program without such an
* agreement is prohibited.
*/
package org.alfresco.rest.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
/**
* Generated by 'dedwards' on '2021-12-16 08:32' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/
public class RestArchiveContentRequestModel extends TestModel implements IRestModel<RestArchiveContentRequestModel>
{
@JsonProperty(value = "entry")
RestArchiveContentRequestModel model;
@Override
public RestArchiveContentRequestModel onModel()
{
return model;
}
/**
A map (String-String) of archive request properties for given content.
*/
private Object archiveProperties;
public Object getArchiveProperties()
{
return this.archiveProperties;
}
public void setArchiveProperties(Object archiveProperties)
{
this.archiveProperties = archiveProperties;
}
}

View File

@@ -0,0 +1,30 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
public class RestAspectModel extends RestAbstractClassModel
{
}

View File

@@ -0,0 +1,32 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import org.alfresco.rest.core.RestModels;
public class RestAspectsCollection extends RestModels<RestAspectModel, RestAspectsCollection>
{
}

View File

@@ -0,0 +1,86 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
/**
* Generated by 'aepure' on '2017-06-29 15:31' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/
public class RestAuditAppModel extends TestModel implements IRestModel<RestAuditAppModel>
{
@JsonProperty(value = "entry")
RestAuditAppModel model;
@Override
public RestAuditAppModel onModel()
{
return model;
}
@JsonProperty(required = true)
private String id;
private String name;
private boolean isEnabled;
public String getId()
{
return this.id;
}
public void setId(String id)
{
this.id = id;
}
public String getName()
{
return this.name;
}
public void setName(String name)
{
this.name = name;
}
public boolean getIsEnabled()
{
return this.isEnabled;
}
public void setIsEnabled(boolean isEnabled)
{
this.isEnabled = isEnabled;
}
}

View File

@@ -0,0 +1,33 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import org.alfresco.rest.core.RestModels;
public class RestAuditAppModelsCollection extends RestModels<RestAuditAppModel, RestAuditAppModelsCollection>
{
}

View File

@@ -0,0 +1,106 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* 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.model;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
public class RestAuditEntryModel extends TestModel implements IRestModel<RestAuditEntryModel>
{
@JsonProperty(value = "entry")
RestAuditEntryModel model;
@Override
public RestAuditEntryModel onModel()
{
return model;
}
@JsonProperty(required = true)
private String id;
private String auditApplicationId ;
private String createdAt;
@JsonProperty("createdByUser")
private RestByUserModel createdByUser;
@JsonProperty("values")
Map<String, Object> values;
public Map<String, Object> getValues()
{
return values;
}
public void setValues(Map<String, Object> values)
{
this.values = values;
}
public String getId()
{
return this.id;
}
public void setId(String id)
{
this.id = id;
}
public String getAuditApplicationId()
{
return this.auditApplicationId;
}
public void setAuditApplicationId(String auditApplicationId)
{
this.auditApplicationId = auditApplicationId;
}
public RestByUserModel getCreatedByUser()
{
return this.createdByUser;
}
public void setCreatedByUser(RestByUserModel createdByUser)
{
this.createdByUser = createdByUser;
}
public String getCreatedAt()
{
return this.createdAt;
}
public void setCreatedAt(String createdAt)
{
this.createdAt = createdAt;
}
}

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