Compare commits

..

497 Commits

Author SHA1 Message Date
alfresco-build
7b396dc652 [maven-release-plugin] prepare release V3.2.0.3 2020-08-19 11:32:43 +01:00
alfresco-build
5b080cf308 [maven-release-plugin] prepare for next development iteration 2020-08-14 12:04:35 +01:00
alfresco-build
c6a9ec43f5 [maven-release-plugin] prepare release V3.2.0.2 2020-08-14 12:04:24 +01:00
evasques
0ea0565909 Merge pull request #1182 from Alfresco/hotfix-3.2/MNT-21585_fix_ipr_group_match
MNT-21585 - Having EVERYONE in original ACL causes IPR duplication (#…
2020-08-10 11:10:21 +01:00
evasques
ff81afe125 MNT-21585 - Having EVERYONE in original ACL causes IPR duplication (#1144)
* MNT-21585 - Having EVERYONE in original authorities causes IPR duplication

* Update License Headers

* prevent NPE when authorities is null and refactored findIPRGroup method
2020-07-29 13:21:33 +01:00
Claudia Agache
2a014eefe0 Merge remote-tracking branch 'remotes/origin/release/V3.1' into merge-3.2/APPS-235_SetupEnv_no
# Conflicts:
#	.travis.yml
2020-07-15 16:49:27 +03:00
rodicasutu
4c9fe378c6 Merge remote-tracking branch 'remotes/origin/release/V3.1' into merge-3.2/APPS-230_BuildAGSOnTravis
# Conflicts:
#	pom.xml

# Conflicts:
#	.travis.settings.xml
#	.travis.yml
2020-07-15 09:19:38 +03:00
Claudia Agache
6d22541437 Change SCM URLs in order to switch to SSH authentication with 2FA for Github
(cherry picked from commit 53f26b5793)
2020-06-09 08:53:33 +01:00
Claudia Agache
06a8df491c RM-7131 Update old gitlab repo links with the new one from github
(cherry picked from commit c3cdd88873)
2020-06-09 08:29:35 +01:00
alfresco-build
5b34dbd24f [maven-release-plugin] prepare for next development iteration 2020-02-26 12:04:24 +00:00
alfresco-build
783dcc7710 [maven-release-plugin] prepare release V3.2.0.1 2020-02-26 12:04:18 +00:00
Rodica Sutu
7604b96b88 Merge branch 'hotfix-3.2/MNT-21292_DownloadsViaPostForRecord' into 'release/V3.2.0.x'
Resolve MNT-21292 "Hotfix 3.2/ downloadsviapostforrecord"

See merge request records-management/records-management!1388
2020-02-24 10:52:15 +00:00
Rodica Sutu
e78f159844 Merge branch 'feature/RM-7012_ActionNameInListOfValuesForAudit' into 'master'
RM-7012

See merge request records-management/records-management!1280

(cherry picked from commit a3450f74cf)
2020-02-21 15:04:35 +02:00
Rodica Sutu
43268debd3 move test DownloadAsZipRecordTest into rm enterprise package as there is no ACS 6.1.1 community equivalent and the issue is not reproducing with ACS community 6.1.2-ga 2020-02-21 11:23:32 +02:00
Rodica Sutu
b2b0121d20 revert unwanted changes 2020-02-20 12:53:54 +02:00
Rodica Sutu
738fce1c37 update the ACS library versions in order to have the changes that cause download post to work 2020-02-20 10:11:22 +02:00
Rodica Sutu
1292cb495b Merge branch 'feature/RM-7006_UpdateToACS611' into 'master'
RM-7006 Update to ACS 6.1.1

Closes RM-7006

See merge request records-management/records-management!1272
2020-02-19 19:56:11 +02:00
Rodica Sutu
098c80bd03 cherry pick
# Conflicts:
#	rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/capability/policy/AssocPolicy.java
#	rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/integration/record/DownloadAsZipRecordTest.java
2020-02-18 16:32:43 +02:00
Rodica Sutu
49f504ba93 update the assoc policy for the case when the create assoc source node is not a file plan component node 2020-02-18 16:31:20 +02:00
Rodica Sutu
d85d6227ce Merge branch 'hotfix-3.2/MNT-21292_UpdateHeadersCherryPick' into 'release/V3.2.0.x'
Hotfix 3.2/ updateheaderscherrypick"

See merge request records-management/records-management!1386
2020-02-18 14:16:14 +00:00
Sara Aspery
2790244142 Update license headers 2020-02-18 11:10:36 +02:00
Sara Aspery
2d0913df35 Merge branch 'release/V3.1' into release/V3.2 2020-02-18 11:07:45 +02:00
cagache
55602eb72c Update version to 3.2.0.1-SNAPSHOT 2019-10-22 12:36:41 +03:00
alfresco-build
8f43d02bee [maven-release-plugin] prepare release V3.2.0 2019-10-22 09:18:45 +01:00
Ross Gale
1608781182 Merge branch 'feature/RM-7014_CheckForRmSite' into 'master'
RM-7014 add code to check an rm site has been created before running the...

Closes RM-7014

See merge request records-management/records-management!1277
2019-10-19 11:26:07 +01:00
Ross Gale
bd4c398205 Update RMv32HoldChildAssocPatch.java 2019-10-18 18:34:03 +01:00
Ross Gale
bf7047745a Update rm-patch-v32-context.xml 2019-10-18 14:33:16 +01:00
Ross Gale
6792522163 RM-7014 code review comments 2019-10-18 14:26:48 +01:00
Ross Gale
6c1808731b RM-7014 add code to check an rm site has been created before running the patches that require an rm site 2019-10-17 17:49:01 +01:00
Ramona Popa
e6983ce90f Merge branch 'feature/RM-7003_UpgradeGenerateHoldReportTemplatePatch' into 'master'
RM-7003: [Upgrade] Generate Hold Report fails for a hold if has active content

Closes RM-7003

See merge request records-management/records-management!1276
2019-10-17 08:06:15 +01:00
Ramona Popa
5bae9d32a1 RM-7003: [Upgrade] Generate Hold Report fails for a hold if has active content
- added new the patch to update the hold report template
2019-10-17 08:06:15 +01:00
Ross Gale
1e236e085f Removing unused imports from RMv32HoldChildAssocPatchUnitTest.java 2019-10-16 08:48:01 +01:00
Ross Gale
94bb04d7f8 Removing unused import from RMv32HoldChildAssocPatch.java 2019-10-16 08:46:16 +01:00
gbroadbent
bcac8974a4 BRAZILIAN PORTUGUESE: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-16 00:55:43 +01:00
Ross Gale
25bb9c83f7 Merge branch 'feature/RM-6993_CreateNewAssoc' into 'master'
Resolve RM-6993 "Feature/ createnewassoc"

Closes RM-6993 and RM-6995

See merge request records-management/records-management!1265
2019-10-15 15:50:57 +01:00
gbroadbent
750e69f849 BRAZILIAN PORTUGUESE: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 14:50:27 +01:00
Ross Gale
4b7b25893c Merge branch 'feature/RM-6995_CreateNewAssocPatch' into 'feature/RM-6993_CreateNewAssoc'
Resolve RM-6995 "Feature/ createnewassocpatch"

See merge request records-management/records-management!1271
2019-10-15 14:17:39 +01:00
Ross Gale
1c30a04c5b Resolve RM-6995 "Feature/ createnewassocpatch" 2019-10-15 14:17:39 +01:00
gbroadbent
6fd5e0197d SIMPLIFIED CHINESE: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 13:41:16 +01:00
gbroadbent
cb068b9fd0 RUSSIAN: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 13:40:26 +01:00
gbroadbent
0e8255d59c DUTCH: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 13:39:44 +01:00
gbroadbent
e312e1128f NORWEGIAN Bokmal: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 13:39:08 +01:00
gbroadbent
d37ac2f955 JAPANESE: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 13:38:32 +01:00
gbroadbent
d5b41e179f ITALIAN: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 13:37:43 +01:00
gbroadbent
d25733fdb6 FRENCH: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 13:36:27 +01:00
gbroadbent
ea9f43d3d6 GERMAN: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 13:35:34 +01:00
gbroadbent
667859aa42 SPANISH: Updated files for AGS 3.2 based on EN-RM-rev 10th Oct 2019 - fix for LOC-169 2019-10-15 13:34:31 +01:00
Claudia Agache
bfb19ee91e Merge branch 'feature/RM-6982_UpdateStringsInTests' into 'master'
RM-6982 Update Strings in tests

Closes RM-6982

See merge request records-management/records-management!1274
2019-10-11 09:03:48 +01:00
Tom Page
c820d3d2ca Merge release/V3.1 into master. 2019-10-11 08:30:45 +01:00
Tom Page
6f08a237b2 Merge release/V3.0 into release/V3.1. 2019-10-11 08:26:31 +01:00
Tom Page
3407c560ba Record-only merge to sync with published release/V3.0. 2019-10-11 08:23:54 +01:00
cagache
1dff0dbecd Replace exception messages in tests 2019-10-11 10:16:23 +03:00
Tom Page
793603f6b1 Merge release/V2.7 into release/V3.0. 2019-10-11 08:14:56 +01:00
cagache
9d606baf3c Replace exception messages in tests 2019-10-11 09:32:58 +03:00
cagache
0db6218624 Record only merge. 2019-10-11 09:10:35 +03:00
cagache
5290538d9d Record only merge. 2019-10-11 09:04:43 +03:00
Ross Gale
9a9965fdd0 Merge branch 'feature/RM-6982_StringUpdate' into 'master'
Resolve RM-6982 "Feature/ stringupdate"

Closes RM-6982

See merge request records-management/records-management!1273
2019-10-10 16:54:02 +01:00
Ross Gale
ae99c53468 RM-6982 updating hold properties strings 2019-10-10 16:22:41 +01:00
Ross Gale
4017f9f101 RM-6982 updating hold properties strings 2019-10-10 16:21:31 +01:00
cagache
9d9bdff348 Record only merge. 2019-10-10 17:19:38 +03:00
cagache
02eec901b3 Record only merge. 2019-10-10 17:17:44 +03:00
cagache
3cd9aaeef5 Record only merge. 2019-10-10 17:15:46 +03:00
alfresco-build
42a32d4422 [maven-release-plugin] prepare for next development iteration 2019-10-10 13:19:15 +01:00
alfresco-build
5dc0d39287 [maven-release-plugin] prepare release V2.6.0.1 2019-10-10 13:19:11 +01:00
Tom Page
3d5d01efb8 Record-only merge release/V2.7.2.x into release/V2.7. 2019-10-10 08:52:45 +01:00
alfresco-build
d7d68b10a6 [maven-release-plugin] prepare for next development iteration 2019-10-09 15:23:26 +01:00
alfresco-build
7fe911dcdb [maven-release-plugin] prepare release V2.7.2.2 2019-10-09 15:23:22 +01:00
Ramona Popa
88ffa3ccc0 Merge branch 'feature/RM-7001_GenerateHoldReportActiveContent' into 'master'
RM-7001: Generate Hold Report fails for a hold if has active content

Closes RM-7001

See merge request records-management/records-management!1266
2019-10-08 18:38:28 +01:00
Ramona Popa
5370b92eb8 RM-700: Generate Hold Report fails for a hold if has active content
- check if rma:identifier property exists
2019-10-08 18:38:28 +01:00
Tom Page
1f81c867aa Merge branch 'merge-2.6/MNT-20680_ClusteredCaching' into 'release/V2.6'
Resolve MNT-20680 "Merge 2.6/ clusteredcaching"

See merge request records-management/records-management!1262
2019-10-08 16:42:37 +01:00
Ross Gale
81aa1f2c5c RM-6993 replace old assoc with new 2019-10-08 13:25:30 +01:00
Ross Gale
07383d7e77 RM-6993 revert change to depricated assoc 2019-10-08 11:57:30 +01:00
Ross Gale
56a5da0154 RM-6993 create new assoc 2019-10-08 11:55:47 +01:00
Tom Page
763ba1b319 Merge release/V2.6.0.x into release/V2.6. 2019-10-04 16:00:55 +01:00
Tom Page
5f87a5cd92 Update license headers. 2019-10-02 14:58:48 +01:00
Ross Gale
78cfa3a879 Merge remote-tracking branch 'origin' into feature/RM-6928_Renditions 2019-09-27 11:03:15 +01:00
Tom Page
c2e2536389 Merge branch 'feature/DockerMavenPlugin' into 'master'
Use docker-maven-plugin rather than fabric8-maven-plugin.

See merge request records-management/records-management!1241
2019-09-27 08:59:18 +01:00
Tom Page
dc031c1317 Merge branch 'feature/DeclareJava11' into 'master'
Set declared Java version to 11.

See merge request records-management/records-management!1238
2019-09-26 08:16:31 +01:00
Tom Page
0616a1070d Remove duplicate unnecessary configuration for stop db/amq. 2019-09-25 13:51:11 +01:00
Tom Page
8c16f9351f Make all configuration execution specific.
This introduces some duplication for the start/stop db executions, but
I can't see any way to avoid that. We don't want the other
configuration being shared between executions.

Ensure the db start/stop execution triggers for repo and not for share.
2019-09-25 11:51:03 +01:00
Tom Page
4461495d85 Fix start/stop db to be in a pluginManagement section. 2019-09-25 10:20:13 +01:00
Tom Page
2cdfdf5037 Build docker images during verify phase.
This avoids needing to update the build plans, which expect the docker image to be built during the verify phase.
2019-09-25 10:07:30 +01:00
Tom Page
43c29299d1 Remove unused property. 2019-09-25 09:07:18 +01:00
Tom Page
df16478e53 Convert start/stop db into a profile.
Now we're using the docker-maven-plugin for building images and also
for starting/stopping the db, we need to ensure we don't skip it at
the wrong time. It's simpler to avoid using the <skip> element at all,
and instead use a profile based on the skip.integrationtests property
so that we only start the db when running integration tests.
2019-09-25 08:40:53 +01:00
Ross Gale
d50b552be6 RM-6928 adding check to allow specified properties on frozen nodes to be updated 2019-09-24 16:45:51 +01:00
Tom Page
067cae1cd2 Use docker-maven-plugin rather than fabric8-maven-plugin.
This removes any attempts to connect to kubernetes clusters which can take considerable time.
2019-09-24 15:51:14 +01:00
Tom Page
c2a27f6370 Set declared Java version to 11.
This should ensure that IDEs default to the correct Java version.
2019-09-20 16:00:11 +01:00
Rodica Sutu
756208affb Merge branch 'feature/RM-6856_BulkRemovalFromHold_Tests' into 'master'
Resolve RM-6940 "Automate AC for Bulk removal of items"

Closes RM-6940 and RM-6856

See merge request records-management/records-management!1229
2019-09-19 19:53:15 +01:00
Rodica Sutu
26f664c68f Merge branch 'master' of https://git.alfresco.com/records-management/records-management into feature/RM-6856_BulkRemovalFromHold_Tests 2019-09-18 21:27:59 +03:00
Meenal Bhave
3a6b3c994a Merge branch 'feature/Search-1835-IE-GS-Compatibility' into 'master'
Search-1835: Updated GS Automation to use TAS Rest API Version 6.0.1.2

See merge request records-management/records-management!1232
2019-09-18 09:52:53 +01:00
Meenal Bhave
7dd104c28e Search-1835: Updated GS Automation to use TAS Rest API Version 6.0.1.2, to be used with IE automation 2019-09-18 09:52:53 +01:00
Rodica Sutu
8d6c50f8d1 Merge remote-tracking branch 'remotes/origin/feature/RM-6949_DropDown' into feature/RM-6856_BulkRemovalFromHold_Tests 2019-09-17 13:57:14 +03:00
Rodica Sutu
414be241a4 Merge branch 'master' of https://git.alfresco.com/records-management/records-management into feature/RM-6856_BulkRemovalFromHold_Tests 2019-09-17 13:56:53 +03:00
Ross Gale
703f706afc RM-6949 rebase 2019-09-17 11:01:07 +01:00
Ramona Popa
c9fc6baeb8 Merge branch 'feature/RM-6945_DisplayActionForHeldAContentInHold' into 'master'
RM-6945: Display available actions on held active content inside a hold

Closes RM-6945

See merge request records-management/records-management!1230
2019-09-16 09:08:14 +01:00
Ramona Popa
066503b515 RM-6945: Display available actions on held active content inside a hold
- added actions for isFreezeActiveContent
2019-09-16 09:08:14 +01:00
Roxana Lucanu
0a1cfa0d11 Merge branch 'feature/RM-6943_AddoToHoldActionInCollabSite' into 'master'
RM-6943 AddTo/RemoveFrom hold actions from a collaboration site

Closes RM-6943

See merge request records-management/records-management!1228
2019-09-16 07:22:54 +01:00
rlucanu
e3e3273ab0 RM-6943 other code review comments 2019-09-13 16:26:27 +03:00
rlucanu
d2c2f14270 RM-6943 code review changes 2019-09-13 13:44:01 +03:00
Ramona Popa
8b14d81e1e RM-6945: Display available actions on held active content inside a hold
- updated actions for document library
2019-09-13 10:12:39 +03:00
Ramona Popa
25ef9dcb75 Merge branch 'feature/RM-6943_AddoToHoldActionInCollabSite' into feature/RM-6945_DisplayActionForHeldAContentInHold 2019-09-13 09:00:27 +03:00
Ramona Popa
a2be7a29f9 RM-6945: Display available actions on held active content inside a hold
- updated actions
2019-09-13 08:59:59 +03:00
rlucanu
4b1fec979a RM-6943 added RemoveFromHold evaluator 2019-09-12 17:04:33 +03:00
Ramona Popa
e59b169422 Merge branch 'feature/RM-6943_AddoToHoldActionInCollabSite' into feature/RM-6945_DisplayActionForHeldAContentInHold
# Conflicts:
#	rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/rm-ui-evaluators-context.xml
#	rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/jscript/app/JSONConversionComponent.java
2019-09-12 16:26:40 +03:00
Ramona Popa
50f2457a52 RM-6945: Display available actions on held active content inside a hold
- fixed actions
2019-09-12 16:21:23 +03:00
rlucanu
0523ca1d5c RM-6943 Changes on AddToHold evaluator 2019-09-12 12:20:51 +03:00
Ramona Popa
48d8f66046 RM-6945: Display available actions on held active content inside a hold
- added uiType frozen content
2019-09-11 16:26:56 +03:00
Ramona Popa
7a8273645d RM-6945: Display available actions on held active content inside a hold
- reverted allow method to be executed by non rm
2019-09-11 11:23:53 +03:00
Ramona Popa
5183b6c389 Merge branch 'feature/RM-6943_AddoToHoldActionInCollabSite' into feature/RM-6945_DisplayActionForHeldAContentInHold 2019-09-10 23:02:19 +03:00
Ramona Popa
cb4c0ef37f RM-6945: Display available actions on held active content inside a hold
- allow method to be executed by non rm
2019-09-10 23:00:53 +03:00
rlucanu
c369d53d7c Merge 'origin/master' into feature/RM-6943_AddoToHoldActionInCollabSite 2019-09-10 15:10:15 +03:00
Rodica Sutu
28b1fc7d9c Merge branch 'master' of https://git.alfresco.com/records-management/records-management into feature/RM-6856_BulkRemovalFromHold_Tests 2019-09-10 09:16:48 +03:00
Claudia Agache
8787bd09e4 Merge branch 'feature/RM-6918_ViewHoldContentTests' into 'master'
RM-6918 View Hold Contents tests

Closes RM-6918

See merge request records-management/records-management!1227
2019-09-10 07:08:09 +01:00
Sara Aspery
41d0404d4f Merge branch 'feature/RM-6915_ViewContentsOfLegalHoldUI' into 'master'
Resolve RM-6915 "Feature/ viewcontentsoflegalholdui"

Closes RM-6915

See merge request records-management/records-management!1226
2019-09-09 20:57:03 +01:00
Ramona Popa
b8963f75c8 RM-6945: Display available actions on held active content inside a hold
- added actions for isFreezeActiveContent
2019-09-09 22:10:55 +03:00
Rodica Sutu
3c957afdbe remove unwanted changes 2019-09-09 13:31:35 +03:00
Rodica Sutu
9588917c66 Merge remote-tracking branch 'remotes/origin/feature/RM-6918_ViewHoldContentTests' into feature/RM-6856_BulkRemovalFromHold_Tests 2019-09-09 13:24:25 +03:00
Rodica Sutu
5334623e56 add tests to Bulk Remove from Hold 2019-09-09 12:55:32 +03:00
rlucanu
7e79c86baf RM-6943 adding implementation for AddToHold evaluator 2019-09-06 16:58:52 +03:00
cagache
bc2f13e0f7 Code review comments 2019-09-06 08:50:49 +03:00
cagache
f5cae4cbca Merge remote-tracking branch 'remotes/origin/feature/RM-6915_ViewContentsOfLegalHoldUI' into feature/RM-6918_ViewHoldContentTests 2019-09-05 11:13:49 +03:00
cagache
720abc0ab5 Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6918_ViewHoldContentTests 2019-09-05 11:07:53 +03:00
rlucanu
262a9480f3 Merge 'origin/master' into feature/RM-6915_ViewContentsOfLegalHoldUI 2019-09-05 10:53:46 +03:00
cagache
1f0c13438b Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6918_ViewHoldContentTests 2019-09-05 10:39:31 +03:00
cagache
9fd3d7f9d8 RM-6918 View legal holds content UI tests 2019-09-05 10:26:58 +03:00
Rodica Sutu
11396093b6 Merge branch 'feature/RM-6931_RetentionWIthRetainStepWithFrozenRecords_v2' into 'master'
RM-6931 RetentionWithRetainStepOnFrozenRecords

See merge request records-management/records-management!1223
2019-09-05 06:38:36 +01:00
cagache
f5879bb7fb RM-6918 View legal holds content UI tests 2019-09-04 16:20:43 +03:00
Rodica Sutu
c087c888c6 add an end to end test to check the search disposition schedule properties 2019-09-04 16:07:38 +03:00
Rodica Sutu
15e6b5c107 Merge branch 'master' of https://git.alfresco.com/records-management/records-management into feature/RM-6931_RetentionWIthRetainStepWithFrozenRecords_v2 2019-09-04 14:20:49 +03:00
cagache
d85ca33232 Record only merge of version change. 2019-09-04 11:06:27 +03:00
cagache
29fd680ced Record only merge of version change. 2019-09-04 10:59:13 +03:00
cagache
cc21d22bf4 Record only merge of version change. 2019-09-04 10:52:52 +03:00
cagache
5584f05cb0 Record only merge of version change. 2019-09-04 10:52:06 +03:00
cagache
9a3f52cc5b Merge remote-tracking branch 'remotes/origin/release/V3.1' into merge/MNT-20740_BinDuplicationHotFix 2019-09-03 17:10:21 +03:00
alfresco-build
b80cbad7c6 [maven-release-plugin] prepare for next development iteration 2019-09-03 13:49:08 +01:00
alfresco-build
fc9df152e5 [maven-release-plugin] prepare release V2.7.2.1 2019-09-03 13:49:04 +01:00
cagache
c1b3decae4 Merge remote-tracking branch 'remotes/origin/release/V3.0' into merge-3.1/MNT-20740_BinDuplicationHotFix 2019-09-03 13:36:48 +03:00
Rodica Sutu
44c35a454e remove unwanted logs 2019-09-03 11:36:00 +03:00
cagache
995a771b51 Merge remote-tracking branch 'remotes/origin/release/V2.7' into merge-3.0/MNT-20740_BinDuplicationHotFix
# Conflicts:
#	rm-community/rm-community-repo/unit-test/java/org/alfresco/module/org_alfresco_module_rm/util/ContentBinDuplicationUtilityUnitTest.java
#	rm-enterprise/rm-enterprise-repo/src/unit-test/java/org/alfresco/module/org_alfresco_module_rm/content/ContentDestructionComponentUnitTest.java
2019-09-03 10:10:18 +03:00
cagache
af928d3c7d Merge remote-tracking branch 'remotes/origin/hotfix-2.7/MNT-20740_BinDuplicationHotFix' into release/V2.7 2019-09-03 09:16:44 +03:00
Rodica Sutu
f4f18f1047 disable on properties update for a frozen aspect 2019-09-03 09:01:15 +03:00
Claudia Agache
bb8d99c895 Merge branch 'hotfix-2.7/MNT-20740_BinDuplicationHotFix' into 'release/V2.7.2.x'
Resolve MNT-20740 "Hotfix 2.7/ binduplicationhotfix"

See merge request records-management/records-management!1222
2019-09-02 11:37:34 +01:00
cagache
fa48983bb6 apply code style 2019-09-02 13:33:37 +03:00
Sara Aspery
2fe6cdf602 RM-6915_ViewActiveContentInHoldAndFrozenIndicator 2019-08-30 23:41:19 +01:00
Roy Wetherall
a48cb2755c Deal with review comments 2019-08-30 11:28:44 +10:00
Roy Wetherall
8e26f5aad5 Addition tests for records, fixed up a couple of issues in the query method as a result. 2019-08-29 21:35:00 +10:00
Roy Wetherall
1c539f9f05 Fix issue with inaccurate results returning from content URL query
* added integration test for MNT scenarios
* checked for nodeId's that don't exist in query results
* changed DAO method to return set of node references rather tha nodeId strings
* turned off logging by default
2019-08-29 12:28:04 +10:00
Roy Wetherall
211ebba2f2 Add logging to rm query DAO implementation 2019-08-29 09:50:57 +10:00
Rodica Sutu
d02b074670 Merge branch 'feature/RM-6929_RecordFolderWithVitalAndFrozenRecords' into 'master'
Resolve RM-6929 "Feature/ recordfolderwithvitalandfrozenrecords"

Closes RM-6929

See merge request records-management/records-management!1221
2019-08-28 13:08:19 +01:00
Rodica Sutu
bcefca962c code review updates 2019-08-28 10:57:13 +03:00
Rodica Sutu
184673cef1 Add tests for RM-6929 2019-08-27 13:55:54 +03:00
Rodica Sutu
ba9a192950 disable on update properties for frozen items when setting the record search properties 2019-08-27 09:34:30 +03:00
Rodica Sutu
5e516a57b9 Merge branch 'feature/RM-6914_AddRemoveToHold_Tests' into 'master'
Resolve RM-6914 "Feature/ addremovetohold tests"

Closes RM-6914

See merge request records-management/records-management!1219
2019-08-23 08:11:06 +01:00
Rodica Sutu
0a26da478b update the tests to allow remove from hold with a user with read permission, filling permission over the hold and remove from hold capabilities 2019-08-22 14:51:33 +03:00
Sara Aspery
d79caf2466 Merge branch 'feature-2.7/MNT-20740_BinDuplicationHotFix' into hotfix-2.7/MNT-20740_BinDuplicationHotFix
# Conflicts:
#	rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/module-context.xml
#	rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/util/ContentBinDuplicationUtility.java
2019-08-22 12:29:45 +01:00
Sara Aspery
18bd7d7fac MNT-20740 New db query 2019-08-22 11:19:34 +01:00
Rodica Sutu
35a76988a2 Merge branch 'master' of https://git.alfresco.com/records-management/records-management into feature/RM-6914_AddRemoveToHold_Tests 2019-08-22 08:48:40 +03:00
Claudia Agache
a03fce52d3 Merge branch 'feature/RM-6911_AddActiveContentToHoldRestAPI' into 'master'
RM-6911 Add/Remove Active Content To/From Holds via REST API

See merge request records-management/records-management!1218
2019-08-22 06:36:39 +01:00
cagache
becbf296df code review comments 2019-08-22 08:30:18 +03:00
cagache
903791e1db code review comments 2019-08-21 18:56:27 +03:00
cagache
f169e79599 fix tests 2019-08-21 18:38:37 +03:00
cagache
27496b81f1 code review comments 2019-08-21 18:19:18 +03:00
Rodica Sutu
577b2e1a72 Merge branch 'master' of https://git.alfresco.com/records-management/records-management into feature/RM-6914_AddRemoveToHold_Tests 2019-08-21 14:43:43 +03:00
Rodica Sutu
7c5d8058d2 Merge branch 'feature/RM-6911_AddActiveContentToHoldRestAPI' of https://git.alfresco.com/records-management/records-management into feature/RM-6914_AddRemoveToHold_Tests 2019-08-21 14:43:27 +03:00
Rodica Sutu
0e4501d27a minor updates of the java doc and code style 2019-08-21 14:41:05 +03:00
Rodica Sutu
0d85f2cadd code review changes 2019-08-21 12:03:01 +03:00
Ross Gale
1575124fd7 Merge branch 'feature/RM-6873_RemoveActiveContentFromHold' into 'master'
RM-6873 adding code to allow for the removal of active content from a hold

See merge request records-management/records-management!1216
2019-08-21 08:44:56 +01:00
Claudia Agache
9cea6d9344 Merge branch 'feature/RM-6926_AddFrozenNodeToAnotherHold' into 'master'
RM-6926 Don't trigger onUpdateProperties policy when a frozen node is added to another hold

Closes RM-6926

See merge request records-management/records-management!1220
2019-08-21 07:14:59 +01:00
cagache
bee8d09bd4 Merge changes from feature/RM-6873_RemoveActiveContentFromHold 2019-08-20 16:54:58 +03:00
Ross Gale
40767c1b59 RM-6873 adding code review changes 2019-08-20 13:58:26 +01:00
Ross Gale
3e5b1bad95 RM-6873 adding code review changes 2019-08-20 13:57:42 +01:00
Ross Gale
6437f31749 RM-6873 adding code review changes 2019-08-20 13:56:14 +01:00
cagache
5230a9e0e8 RM-6926 Don't trigger onUpdateProperties policy when a frozen node is added to another hold 2019-08-20 14:56:46 +03:00
Rodica Sutu
849252b125 tests updates java docs and clean up data after test run 2019-08-20 11:33:42 +03:00
Rodica Sutu
5a24bf2f2b Merge branch 'master' of https://git.alfresco.com/records-management/records-management into feature/RM-6914_AddRemoveToHold_Tests 2019-08-20 08:54:52 +03:00
Rodica Sutu
d0a6b5a739 Merge branch 'feature/RM-6911_AddActiveContentToHoldRestAPI' of https://git.alfresco.com/records-management/records-management into feature/RM-6914_AddRemoveToHold_Tests 2019-08-20 08:54:40 +03:00
Rodica Sutu
36f5c76599 Tests for Add and Remove active content to/from hold using exiting API's 2019-08-20 08:50:58 +03:00
cagache
d990f30e8c Merge changes from feature/RM-6873_RemoveActiveContentFromHold 2019-08-20 08:09:32 +03:00
Claudia Agache
296c78e7d5 Merge branch 'feature/RM-6904_PreventUpdateHeldActiveContent' into 'master'
Resolve RM-6904 "Feature/ preventupdateheldactivecontent"

Closes RM-6904

See merge request records-management/records-management!1217
2019-08-20 05:59:32 +01:00
Ross Gale
ac4b8d4b9a RM-6873 adding changes from update branch and updating tests 2019-08-19 15:56:10 +01:00
Ross Gale
3d4175078d Merge branch 'feature/RM-6904_PreventUpdateHeldActiveContent' into feature/RM-6873_RemoveActiveContentFromHold 2019-08-19 15:47:32 +01:00
cagache
b769ce2892 Check exception messages 2019-08-19 17:12:58 +03:00
cagache
a5d245b5f6 Throw PermissionDeniedException instead of AccessDeniedException and internationalized the messages. 2019-08-19 15:02:40 +03:00
Rodica Sutu
d1d3bb91d9 Merge branch 'feature/RM-6911_AddActiveContentToHoldRestAPI' of https://git.alfresco.com/records-management/records-management into feature/RM-6914_AddRemoveToHold_Tests 2019-08-19 11:26:57 +03:00
cagache
3dfc01f716 Added check for Remove From Hold capability 2019-08-19 09:32:33 +03:00
Rodica Sutu
c726d4616d Merge remote-tracking branch 'remotes/origin/feature/RM-6904_PreventUpdateHeldActiveContent' into feature/RM-6914_AddRemoveToHold_Tests 2019-08-19 09:22:41 +03:00
cagache
f858d6d203 Added fix to not trigger onUpdateProperties policy when deleting a hold. 2019-08-16 19:08:54 +03:00
Rodica Sutu
5e05737186 Merge remote-tracking branch 'remotes/origin/feature/RM-6904_PreventUpdateHeldActiveContent' into feature/RM-6914_AddRemoveToHold_Tests 2019-08-16 17:34:43 +03:00
cagache
cc968e5aa8 small fix 2019-08-16 17:28:53 +03:00
cagache
54420ca212 RM-6906 Add integration tests for prevent update of held content. Added fix to not trigger onUpdateProperties policy when removing the frozen aspect. 2019-08-16 16:10:09 +03:00
cagache
b9a4df14f5 code review comments 2019-08-16 10:56:08 +03:00
cagache
221a633c2a Merge changes from feature/RM-6873_RemoveActiveContentFromHold 2019-08-16 09:44:56 +03:00
Ross Gale
1d739008c2 RM-6873 adding unit tests for edit 2019-08-16 07:25:19 +01:00
cagache
9af13a5e51 Restrict frozenRecords association to have only cm:cmobject as target 2019-08-16 08:51:33 +03:00
Ross Gale
a5722c31c4 RM-6873 adding in edit protection changes 2019-08-15 13:25:18 +01:00
rlucanu
4f03687e83 RM-6904 code review changes 2019-08-14 17:54:37 +03:00
cagache
f972c54efb Moved instanceOf method from ServiceBaseImpl class to a utility class 2019-08-14 17:04:04 +03:00
Ross Gale
2af340c5d6 RM-6873 sonar update 2019-08-14 13:40:39 +01:00
cagache
947b293c76 Merge remote-tracking branch 'remotes/origin/feature/RM-6873_RemoveActiveContentFromHold' into feature/RM-6911_AddActiveContentToHoldRestAPI 2019-08-14 15:22:27 +03:00
Ross Gale
dff5b452d9 RM-6873 code review changes 2019-08-14 11:20:18 +01:00
rlucanu
94936bc8a7 RM-6904 Fixing tests 2019-08-14 12:12:54 +03:00
cagache
c3021ccfa1 Do not allow addition of locked content to holds 2019-08-13 17:10:06 +03:00
rlucanu
ae64374c61 RM-6904 Tiding up 2019-08-13 01:24:22 +03:00
cagache
8fc0ca7e5a Merge remote-tracking branch 'remotes/origin/feature/RM-6873_RemoveActiveContentFromHold' into feature/RM-6911_AddActiveContentToHoldRestAPI 2019-08-09 12:53:03 +03:00
cagache
2f88cee847 Add active content to hold through rest api 2019-08-09 12:07:24 +03:00
Ross Gale
d5278c4ec7 RM-6873 adding code to allow for the removal of active content from a hold 2019-08-09 10:06:30 +01:00
rlucanu
93084fac63 RM-6904 Prevent updating held active content 2019-08-08 13:15:22 +03:00
Claudia Agache
dded7766c7 Merge branch 'feature/RM-6872_AddActiveContentToHold' into 'master'
RM-6872 Add active content to hold

See merge request records-management/records-management!1209
2019-08-07 13:50:56 +01:00
cagache
5dae326ea0 fix sonar issues 2019-08-07 12:38:18 +03:00
Tom Page
3f0f3d5ddd Merge branch 'merge/RemoveExceptionsFromGSCoreAPI' into 'master'
Merge/remove exceptions from gs core api

See merge request records-management/records-management!1215
2019-08-06 14:50:27 +01:00
cagache
1876c120d7 fix sonar issues 2019-08-06 16:25:08 +03:00
cagache
66706abac5 code review comments 2019-08-06 13:45:53 +03:00
Tom Page
d8f75eaf59 Merge release/V3.1 into master. 2019-08-06 09:17:33 +01:00
Tom Page
ad7eec9700 Merge branch 'merge-3.1/RemoveExceptionsFromGSCoreAPI' into 'release/V3.1'
Merge 3.1/remove exceptions from gs core api

See merge request records-management/records-management!1214
2019-08-06 08:33:09 +01:00
Tom Page
0b3652b5a4 Merge release/V3.0 into release/V3.1. 2019-08-05 15:28:53 +01:00
Tom Page
6bc8aa9f99 Merge branch 'merge-3.0/RemoveExceptionsFromGSCoreAPI' into 'release/V3.0'
Merge 3.0/remove exceptions from gs core api

See merge request records-management/records-management!1213
2019-08-05 15:15:06 +01:00
cagache
53f75085a5 Added check for archived nodes 2019-08-05 16:40:26 +03:00
Sara Aspery
0f0b0962b8 MNT-20740 Updates from review 2019-08-05 10:20:38 +01:00
Tom Page
79c9244a14 Merge release/V2.7 into release/V3.0. 2019-08-05 08:11:57 +01:00
Tom Page
8beb4d5e24 Merge branch 'merge-2.7/RemoveExceptionsFromGSCoreAPI' into 'release/V2.7'
Merge 2.7/remove exceptions from gs core api

See merge request records-management/records-management!1212
2019-08-05 08:08:36 +01:00
cagache
2fd1f661e2 code review comments 2019-08-02 17:31:02 +03:00
cagache
c33a174b1a Removed printed exception 2019-08-02 15:38:54 +03:00
cagache
30d05f4f7a Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6872_AddActiveContentToHold 2019-08-02 15:37:21 +03:00
cagache
862e69da17 get default file plan only if node is not a file plan component 2019-08-02 09:42:09 +03:00
cagache
5348b963c3 code review comments 2019-08-01 16:02:55 +03:00
Tom Page
a97bf04cff Merge release/V2.6 into release/V2.7. 2019-08-01 13:39:25 +01:00
Tom Page
8c008a5b6d Merge branch 'feature-2.6/RemoveExceptionsFromGSCoreAPI' into 'release/V2.6'
Remove unthrown checked exceptions.

See merge request records-management/records-management!1211
2019-08-01 13:38:45 +01:00
Tom Page
1df5a307c4 Revert "Use AlfrescoRuntimeException."
This reverts commit b2c0afd8d5.
2019-08-01 13:33:26 +01:00
Tom Page
b2c0afd8d5 Use AlfrescoRuntimeException. 2019-08-01 13:23:43 +01:00
Tom Page
9a36a9e8d6 Remove unthrown checked exceptions.
Update the javadoc to refer to RuntimeExceptions instead.  Also conversion from
IOException to RuntimeException in UnfiledContainerAPI and UnfiledRecordFolderAPI
to add consistency with RecordFolderAPI.
2019-08-01 09:51:31 +01:00
Sara Aspery
7c4d8e91ab MNT-20740 BinDuplicationHotFixSqlRefactor 2019-07-30 16:35:48 +01:00
cagache
bb970e33f5 Add ASPECT_HELD_CHILDREN on active content parent 2019-07-29 15:35:35 +03:00
cagache
820d1b2c0d Added IT and unit tests for add file to hold 2019-07-25 17:51:17 +03:00
cagache
9c13bf3ced Add IT to check that active content can be added to a hold by admin user 2019-07-25 11:07:36 +03:00
cagache
2aeb78b57c Add ASPECT_HELD_CHILDREN on active content parent 2019-07-24 17:30:15 +03:00
cagache
f61992f047 Allow active content to be added to a hold 2019-07-23 15:45:23 +03:00
cagache
512297c6a4 Merge remote-tracking branch 'remotes/origin/release/V3.1' into merge/MNT-20741_AddingSubtypeLogic 2019-07-19 12:41:43 +03:00
cagache
9c344bd97b Merge MNT-20741 fix from release/V3.0 branch to release/V3.1 branch 2019-07-19 08:50:05 +03:00
Ross Gale
557ce8b432 Removing severe sonar warnings
(cherry picked from commit 665c579560)

(cherry picked from commit 16f96e6e91)
2019-07-18 11:15:01 +03:00
cagache
894dd69c74 Merge MNT-20741 fix from release/V2.7 branch to release/V3.0 branch 2019-07-18 09:17:18 +03:00
cagache
ecf2f9bc21 Merge remote-tracking branch 'remotes/origin/release/V2.7.2.x' into merge-2.7/MNT-20741_AddingSubtypeLogic 2019-07-17 09:50:40 +03:00
cagache
5152c1c0ce Record only merge of version change. 2019-07-15 16:23:02 +03:00
cagache
35e9e20871 Record only merge of version change. 2019-07-15 16:21:20 +03:00
cagache
ff9a5f239b Record only merge of version change. 2019-07-15 16:19:41 +03:00
cagache
a6e413c52f Update version to 3.0.2.1-SNAPSHOT 2019-07-15 15:36:52 +03:00
alfresco-build
aed94d26cf [maven-release-plugin] prepare for next development iteration 2019-07-15 12:22:08 +01:00
Ross Gale
1e8dcd5e24 Merge branch 'feature-2.7/MNT-20741_AddingSubtypeLogic' into 'release/V2.7.2.x'
MNT-20741 adding code to check for subtypes

See merge request records-management/records-management!1207
2019-07-12 16:37:00 +01:00
cagache
5551b6f89f Merge remote-tracking branch 'remotes/origin/release/V3.1' into merge/RM-6577_MergeIERMTests 2019-07-12 15:29:30 +03:00
cagache
9dc6a7a0ac Record only merge of version change. 2019-07-12 15:25:00 +03:00
Ross Gale
807032334d MNT-20741 adding code to check for subtypes 2019-07-11 15:41:14 +01:00
Ross Gale
075794981b MNT-20740 initial commit for delete protection for copied records 2019-07-10 10:53:27 +01:00
Rodica Sutu
8bedb94a5e Merge remote-tracking branch 'remotes/origin/release/V3.0' into merge-3.1/RM-6823_MergeIERMTests
# Conflicts:
#	rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/rm/community/requests/gscore/api/RMUserAPI.java
#	rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RMRolesAndActionsAPI.java
#	rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/service/RoleService.java
#	rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
#	rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/DeleteRecordTests.java
#	rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/UpdateRecordsTests.java
#	rm-automation/rm-automation-enterprise-rest-api/src/test/java/org/alfresco/rest/rm/enterprise/base/BaseRMEnterpriseRestTest.java
#	rm-automation/rm-automation-enterprise-rest-api/src/test/java/org/alfresco/rest/rm/enterprise/v0/classification/content/ClassifyCompleteRecordsTest.java
#	rm-automation/rm-automation-enterprise-rest-api/src/test/java/org/alfresco/rest/rm/enterprise/v0/classification/content/SetRMExemptionReasonTest.java
#	rm-automation/rm-automation-enterprise-rest-api/src/test/java/org/alfresco/rest/rm/enterprise/v0/search/SearchClassifiedRecordFoldersTests.java
#	rm-automation/rm-automation-enterprise-rest-api/src/test/java/org/alfresco/rest/rm/enterprise/v0/search/SearchClassifiedRecordsTests.java
2019-07-09 08:48:13 +03:00
cagache
0d0c1c4048 Merge remote-tracking branch 'remotes/origin/release/V3.1' into merge/RM-6564_InsightEngine 2019-07-05 16:59:55 +03:00
cagache
0b765199fe Merge IE changes from release/V3.0 branch to release/V3.1 branch 2019-07-04 17:11:45 +03:00
cagache
fc4f1b77c4 Merge remote-tracking branch 'remotes/origin/release/V3.1' into merge/RM-6892_SonarFixes 2019-07-04 14:27:07 +03:00
cagache
cd76665548 Merge remote-tracking branch 'remotes/origin/release/V3.0' into merge-3.1/RM-6892_SonarFixes 2019-07-04 09:47:50 +03:00
cagache
7a03c64ffd Merge changes from release/V3.0 branch to release/V3.1 branch 2019-07-04 09:40:11 +03:00
cagache
7471d4e537 Record only merge of version change. 2019-06-20 14:35:38 +03:00
cagache
ba70b24ce3 Record only merge of version change. 2019-06-20 14:33:22 +03:00
cagache
068fef7ac2 Update version to 3.1.0.1-SNAPSHOT 2019-06-20 14:31:42 +03:00
cagache
9238737f68 Update version to 3.1.1-SNAPSHOT 2019-06-20 14:28:45 +03:00
alfresco-build
38feaef31d [maven-release-plugin] prepare for next development iteration 2019-06-20 10:46:20 +01:00
alfresco-build
93175c24ae [maven-release-plugin] prepare release V3.1.0 2019-06-20 10:46:16 +01:00
Ross Gale
75b4bc5ca5 Merge branch 'feature/RM-6865_RemoveEncoding' into 'master'
Resolve RM-6865 "Feature/ removeencoding"

Closes RM-6865

See merge request records-management/records-management!1196
2019-06-20 07:33:47 +01:00
Ross Gale
8daac2d403 Revert "RM-6865 code review changes"
This reverts commit b4bc9195
2019-06-19 10:57:08 +01:00
Ross Gale
b4bc91950b RM-6865 code review changes 2019-06-19 10:16:25 +01:00
Ross Gale
8a37916e3a RM-6865 code review changes 2019-06-19 08:20:55 +01:00
Ross Gale
d5d74d6899 RM-6865 removing encoding of path in action body 2019-06-18 17:47:39 +01:00
Ross Gale
c82d586479 RM-6865 removing encoding of path in action body 2019-06-18 17:45:46 +01:00
Claudia Agache
86ad2dcd93 Merge branch 'feature/RM-6847_SonarMajorIssues' into 'master'
RM-6847 Fix some of sonar major issues

See merge request records-management/records-management!1191
2019-06-18 12:57:01 +01:00
Ross Gale
06b8001362 RM-6865 adding param to test 2019-06-18 08:57:46 +01:00
Claudia Agache
532747b0ad Merge branch 'feature/RM-6884_RemovedUnusedStringsAndOtherChanges' into 'master'
RM-6884 Changed Record Folder Location display label and removed unused strings

Closes RM-6884

See merge request records-management/records-management!1193
2019-06-18 07:00:15 +01:00
Ross Gale
b907ff04cb RM-6865 adding null check 2019-06-17 14:43:39 +01:00
Ross Gale
40d01c2c44 RM-6865 adding test 2019-06-17 08:01:15 +01:00
rlucanu
41e1d9f880 RM-6884 Changed Record Folder Location display label and removed unused strings 2019-06-14 18:06:10 +03:00
Ross Gale
dc38a2031b Merge branch 'feature/RM-6831_SecuritySonarFix' into 'master'
Resolve RM-6831 "Feature/ securitysonarfix"

Closes RM-6831

See merge request records-management/records-management!1189
2019-06-14 14:15:05 +01:00
Ross Gale
c142ab7699 RM-6865 adding extra param for declare to 2019-06-14 13:44:44 +01:00
cagache
365fddc247 fix Sonar: Empty statements should be removed 2019-06-14 14:45:49 +03:00
cagache
7f73ad8227 Fix sonar Performance - Boxed value is unboxed and then immediately reboxed 2019-06-14 10:38:23 +03:00
Roxana Lucanu
76cb942556 Merge branch 'feature/RM-6864_AddedEvaluatorForDeclareAndFileAction' into 'master'
Resolve RM-6864 Fix permission issue for File as record action

Closes RM-6864

See merge request records-management/records-management!1190
2019-06-13 10:07:27 +01:00
rlucanu
54097b2fb5 RM-6864 fixed condition 2019-06-12 15:40:51 +03:00
rlucanu
ad620ba6b5 RM-6864 Code review changes 2019-06-12 11:37:50 +03:00
rlucanu
0e9a855182 RM-6864 Changed label to be consistent with File to action 2019-06-10 21:21:46 +03:00
rlucanu
e38904cb91 RM-6864 Fix roles issue 2019-06-10 15:30:27 +03:00
Ross Gale
a002f1d1c5 RM-6831 updating search value 2019-06-07 12:14:19 +01:00
Ross Gale
01b4146582 RM-6831 adding sonar fix 2019-06-07 11:35:01 +01:00
Sara Aspery
35a1fd00e7 Merge branch 'feature/RM-6865_EnableEncodedDeclareAndFileRecPath' into 'master'
Resolve RM-6865 "Feature/ enableencodeddeclareandfilerecpath"

Closes RM-6865

See merge request records-management/records-management!1188
2019-06-07 08:48:04 +01:00
gbroadbent
5afd26bad8 SIMPLIFIED CHINESE: Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:27:29 +01:00
gbroadbent
106f7c21b2 BRAZILIAN PORTUGUESE: Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:25:51 +01:00
gbroadbent
0ae39dc850 RUSSIAN: Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:24:53 +01:00
gbroadbent
bb336d7758 DUTCH: Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:24:12 +01:00
gbroadbent
ce7dd88301 NORWEGIAN (Bokmal): Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:23:40 +01:00
gbroadbent
11b76dcd8b JAPANESE: Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:23:01 +01:00
gbroadbent
f1cd87593c ITALIAN: Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:22:27 +01:00
gbroadbent
586e2eca87 SPANISH: Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:21:48 +01:00
gbroadbent
f3fbd4ebdc FRENCH: Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:21:11 +01:00
gbroadbent
791b4ceb3e GERMAN: Updated UI files based on EN-RM-rev2019-05-29T131603 2019-06-06 11:20:32 +01:00
cagache
6819516c58 Update the rejectLinkedRecord test to use files api and records api instead of actions api 2019-06-05 16:01:03 +01:00
Sara Aspery
36ba457cfa RM-6865 Rest API v0 test 2019-06-05 15:27:05 +01:00
Sara Aspery
1419540456 RM-6865 allow spaces in declare and file path 2019-06-05 15:26:31 +01:00
Ross Gale
afc24fa4a9 RM-6869 removing updates 2019-06-05 10:45:13 +01:00
Ross Gale
e8d1c82a21 RM-6869 extracting actions utils to a class 2019-06-05 09:34:28 +01:00
Ross Gale
77af43057a RM-6869 extracting actions utils to a class 2019-06-05 09:30:41 +01:00
Ross Gale
e078e0f6d1 RM-6869 extracting actions utils to a class 2019-06-05 09:27:38 +01:00
Ross Gale
62b7426b73 RM-6869 code comment changes 2019-06-05 09:07:35 +01:00
Ross Gale
76c865e41a RM-6869 removing linked record during rejection 2019-06-03 11:10:16 +01:00
Rodica Sutu
57452c43eb Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6811_DeclareAndFileUI_Tests 2019-05-27 10:26:56 +03:00
Sara Aspery
895dfe3be9 Merge branch 'feature/RM-6851_DeclareAndFileRecInHoldFolder' into 'master'
Resolve RM-6851 "Feature/ declareandfilerecinholdfolder"

Closes RM-6851 and RM-6852

See merge request records-management/records-management!1178
2019-05-23 21:29:20 +01:00
Sara Aspery
e0e2e94b21 Merge branch 'feature/RM-6852_FixInconsistenciesV1ResponeCodes' into 'feature/RM-6851_DeclareAndFileRecInHoldFolder'
Resolve RM-6852 "Feature/ fixinconsistenciesv1responsecodes"

See merge request records-management/records-management!1179
2019-05-23 21:24:40 +01:00
Sara Aspery
dc2e6f9f57 RM-6851 updates from review 2019-05-23 15:17:04 +01:00
Rodica Sutu
0ab7a955ce fix the previous commit revert the integration tests changes and add tests for RM-6780 Add "Declare and File Record" Share action 2019-05-23 15:47:00 +03:00
Rodica Sutu
210b554297 Tests for RM-6780 Add "Declare and File Record" Share action 2019-05-23 15:43:13 +03:00
Sara Aspery
3cf3874db1 RM-6852 Fix inconsistencies in V1 response codes 2019-05-23 13:27:53 +01:00
Sara Aspery
48469d8ce9 RM-6852 Fix inconsistencies in V1 response codes 2019-05-23 12:44:20 +01:00
Sara Aspery
16ef2130a8 RM-6851 Fix declare record into hold - add unit test 2019-05-23 12:32:01 +01:00
Sara Aspery
4f84727da0 RM-6851 Fix declare record into hold 2019-05-23 12:31:35 +01:00
Claudia Agache
ac4214b56c Merge branch 'feature/RM-6849_CheckForFilingPermission' into 'master'
RM-6849 Check for filling permission on destination record folder

See merge request records-management/records-management!1175
2019-05-23 06:59:58 +01:00
Roxana Lucanu
475f695d04 Merge branch 'feature/RM-6806_DeclareAndFileToUI' into 'master'
Resolve RM-6806 "Feature/ declareandfiletoui"

Closes RM-6806

See merge request records-management/records-management!1174
2019-05-22 20:33:44 +01:00
cagache
021804e79a code review comments 2019-05-22 17:04:18 +03:00
rlucanu
122665284f RM-6806 removed unnecessary strings 2019-05-22 17:04:14 +03:00
cagache
0deb093287 Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6849_CheckForFilingPermission 2019-05-22 16:41:44 +03:00
cagache
ab114dd03a Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6849_CheckForFilingPermission 2019-05-22 16:39:07 +03:00
Claudia Agache
777a256a06 Merge branch 'feature/RM-6796_DeclareAndFileTests' into 'master'
RM-6796 Automated tests for Declare and file to a record folder functionality

See merge request records-management/records-management!1164
2019-05-22 13:51:08 +01:00
cagache
92ff5dd935 Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6796_DeclareAndFileTests 2019-05-22 13:55:24 +03:00
Sara Aspery
0b7f4c9ec5 Merge branch 'feature/RM-6792_V1RestAPI' into 'master'
RM-6792 V1 Rest api

Closes RM-6832

See merge request records-management/records-management!1177
2019-05-22 10:53:54 +01:00
cagache
2f22080d41 Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6796_DeclareAndFileTests 2019-05-22 09:40:35 +03:00
rlucanu
6bee296849 Merged master into feature/RM-6806_DeclareAndFileToUI 2019-05-22 09:07:54 +03:00
Sara Aspery
2b3522dd55 Merge branch 'feature/RM-6792_AddLocnParamToDeclareAsRec' into 'master'
RM-6792 Optional Record Locn

See merge request records-management/records-management!1168
2019-05-21 20:21:08 +01:00
cagache
f54d71baf1 Merge remote-tracking branch 'origin/feature/RM-6849_CheckForFilingPermission' into feature/RM-6849_CheckForFilingPermission 2019-05-21 16:57:18 +03:00
cagache
c1470c7c38 Merge remote-tracking branch 'remotes/origin/feature/RM-6796_DeclareAndFileTests' into feature/RM-6849_CheckForFilingPermission 2019-05-21 16:55:51 +03:00
cagache
a1b7957c15 Merge remote-tracking branch 'remotes/origin/feature/RM-6792_AddLocnParamToDeclareAsRec' into feature/RM-6796_DeclareAndFileTests 2019-05-21 16:37:32 +03:00
Ross Gale
ef483a7f4b Merge branch 'feature/RM-6798_RejectFiledRecords' into 'master'
Resolve RM-6798 "Feature/ rejectfiledrecords"

Closes RM-6798

See merge request records-management/records-management!1173
2019-05-21 14:21:09 +01:00
cagache
f27a0a39dc Merge remote-tracking branch 'remotes/origin/feature/RM-6792_V1RestAPI' into feature/RM-6849_CheckForFilingPermission 2019-05-21 16:10:26 +03:00
cagache
39c9ab7132 Merge remote-tracking branch 'remotes/origin/feature/RM-6792_V1RestAPI' into feature/RM-6796_DeclareAndFileTests 2019-05-21 15:39:19 +03:00
cagache
94abd407be Merge remote-tracking branch 'remotes/origin/feature/RM-6792_AddLocnParamToDeclareAsRec' into feature/RM-6796_DeclareAndFileTests 2019-05-21 15:38:47 +03:00
Sara Aspery
3ef7ae2f82 RM-6832 review updates 2019-05-21 13:09:22 +01:00
Sara Aspery
d7f20f1a3f RM-6792 review - change unfiled folder to container 2019-05-21 12:48:32 +01:00
Sara Aspery
8aeaf91926 RM-6792 review - change unfiled folder to container 2019-05-21 12:39:46 +01:00
cagache
c47cd6f44e Updated javadoc 2019-05-21 12:10:45 +03:00
cagache
fd00d6c705 Get Unfiled Container with system user 2019-05-21 09:38:53 +03:00
cagache
2bb72a4a59 Added check for filling permission on destination record folder 2019-05-20 17:02:05 +03:00
cagache
284ea22322 addressed code review comments 2019-05-20 16:58:35 +03:00
rlucanu
498c93c724 RM-6806 Code review changes. 2019-05-20 09:28:22 +03:00
Sara Aspery
b3bf912a78 RM-6792 updates from review - sonar 2019-05-20 06:39:56 +01:00
cagache
8f49086a06 Updated exception message 2019-05-16 14:27:13 +03:00
cagache
e0df3f4175 Merge remote-tracking branch 'remotes/origin/feature/RM-6792_AddLocnParamToDeclareAsRec' into feature/RM-6796_DeclareAndFileTests 2019-05-16 13:56:45 +03:00
Sara Aspery
4684596b02 Merge remote-tracking branch 'origin/feature/RM-6792_AddLocnParamToDeclareAsRec' into feature/RM-6792_AddLocnParamToDeclareAsRec 2019-05-16 10:44:45 +01:00
Sara Aspery
a2103168d8 RM-6792 updates from review 1 2019-05-16 10:44:29 +01:00
cagache
ba3acb3eed Added test for declaring and file a record into a held record folder 2019-05-16 10:54:58 +03:00
cagache
e5ac7ad9b7 code review comments 2019-05-14 15:18:24 +03:00
cagache
60f8a61599 Added closed folder to invalidDestinationIds data provider 2019-05-14 09:54:16 +03:00
cagache
bb1e01a6cc Fix sonar bugs for DockerHelper class 2019-05-13 16:46:32 +03:00
cagache
7e9147ceef Added parentId parameter for tests that use declareRecord v1 api 2019-05-13 15:00:42 +03:00
cagache
20a61b49de Merge remote-tracking branch 'remotes/origin/feature/RM-6792_V1RestAPI' into feature/RM-6796_DeclareAndFileTests 2019-05-13 10:02:32 +03:00
cagache
929980e7c2 Fix "Either re-interrupt this method or rethrow the "InterruptedException"." sonar bug 2019-05-13 10:00:29 +03:00
cagache
f6a2008b4d Merge remote-tracking branch 'remotes/origin/feature/RM-6792_AddLocnParamToDeclareAsRec' into feature/RM-6796_DeclareAndFileTests 2019-05-13 08:22:51 +03:00
Sara Aspery
d1ccc66c3d Merge branch 'master' into 'feature/RM-6792_AddLocnParamToDeclareAsRec'
# Conflicts:
#   rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/record/RecordServiceImpl.java
2019-05-10 15:47:16 +01:00
Sara Aspery
2ba81c8736 RM-6792 Optional Rec Locn V1 Rest API 2019-05-10 15:29:43 +01:00
Sara Aspery
b85d6cf378 RM-6792 Oliver strings and fix closed folder and tests 2019-05-10 15:26:17 +01:00
cagache
5dcae9c608 delete unnecessary semicolon 2019-05-10 17:08:33 +03:00
cagache
3c341d85c5 delete unnecessary imports 2019-05-10 17:05:15 +03:00
rlucanu
525abf9f2e RM-6806 Added UI part for Declare and File to action 2019-05-10 16:04:44 +03:00
cagache
07360369b8 Merge remote-tracking branch 'origin/feature/RM-6796_DeclareAndFileTests' into feature/RM-6796_DeclareAndFileTests 2019-05-10 15:31:53 +03:00
cagache
4fa230a322 removed contentService from child classes and made it protected in parent class 2019-05-10 15:24:03 +03:00
cagache
0f71d6ee98 Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6796_DeclareAndFileTests 2019-05-10 15:16:53 +03:00
cagache
a15998b23f added missing curly braces 2019-05-10 10:59:56 +03:00
cagache
9c03ae75ad removed contentService from child classes and made it protected in parent class 2019-05-09 16:50:18 +03:00
Ross Gale
493821f1c2 Merge branch 'feature/RM-6836_SonarFixes' into 'master'
Resolve RM-6836 "Feature/ sonarfixes"

Closes RM-6836

See merge request records-management/records-management!1170
2019-05-09 13:12:46 +01:00
cagache
ba729a0f2e removed unused variable 2019-05-09 11:34:42 +03:00
cagache
a11feb9bfe removed contentService from child classes and made it protected in parent class 2019-05-09 11:32:32 +03:00
cagache
2955a87244 fix some sonar issues from RoleService class 2019-05-09 10:38:19 +03:00
Ross Gale
e03c9ecab1 RM-6798 removing config preventing filed records being rejected 2019-05-08 11:13:00 +01:00
Ross Gale
8515b9c2f8 RM-6836 remove unused imports 2019-05-08 10:27:13 +01:00
Ross Gale
f0fe989822 RM-6836 formatting change 2019-05-08 09:25:19 +01:00
Ross Gale
a000f99c04 RM-6836 formatting change 2019-05-08 09:17:19 +01:00
Ross Gale
8f9ca689df Merge branch 'master' into 'feature/RM-6836_SonarFixes'
# Conflicts:
#   rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/aspect/FilePlanComponentAspect.java
2019-05-08 09:08:42 +01:00
Ross Gale
05c70ede63 RM-6836 formatting change 2019-05-08 09:06:08 +01:00
Ross Gale
07d4c451ca RM-6836 adding review comments 2019-05-08 08:30:30 +01:00
Ross Gale
9f2336d487 RM-6836 adding the severe and serious sonar fixes 2019-05-07 17:23:11 +01:00
Rodica Sutu
709588ff42 Merge branch 'feature/RM-6835_FixJavaDocRMCommunity' into 'master'
Fix java docs for rm community repo:

Closes RM-6835

See merge request records-management/records-management!1163
2019-05-07 06:51:48 +01:00
Rodica Sutu
bac70edcd1 review comments: add the missing @param values, @return type 2019-05-06 21:47:26 +03:00
cagache
d247e1e2bc Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6796_DeclareAndFileTests 2019-05-06 16:59:12 +03:00
cagache
7ed0e9f15c used rmRestWrapper 2019-05-06 16:57:39 +03:00
Ross Gale
86f66dbd85 Removing sonar warnings 2019-05-06 14:06:21 +01:00
cagache
f7e8eb9def autowire the constructor 2019-05-06 15:20:29 +03:00
cagache
a37e56f1fc code review comments 2019-05-06 10:33:42 +03:00
cagache
41f9acbede used rmRestWrapper 2019-05-06 10:28:11 +03:00
cagache
cff25869f8 updated javadoc 2019-05-06 10:25:19 +03:00
Ross Gale
665c579560 Removing severe sonar warnings 2019-05-03 14:57:12 +01:00
Ross Gale
c99fa9b421 RM-6836 updating variable beanname 2019-05-03 14:04:01 +01:00
Rodica Sutu
9f095aea8c remove some of the method duplicated and change the action service class into a component 2019-05-03 15:54:08 +03:00
Rodica Sutu
790f2700e2 Merge remote-tracking branch 'remotes/origin/feature/RM-6792_AddLocnParamToDeclareAsRec' into feature/RM-6796_DeclareAndFileTests 2019-05-03 14:41:08 +03:00
Ross Gale
e19e3c8b35 Merge branch 'feature/RM-6834_RecordSearchFix' into 'master'
Resolve RM-6834 "Feature/ recordsearchfix"

Closes RM-6834

See merge request records-management/records-management!1165
2019-05-03 10:35:45 +01:00
Rodica Sutu
9b2525e006 Merge branch 'master' of https://git.alfresco.com/records-management/records-management into feature/RM-6835_FixJavaDocRMCommunity 2019-05-02 13:45:09 +03:00
Ross Gale
5a964b50cd Merge branch 'merge/RM-6773' into 'master'
Resolve RM-6773 "Merge/"

Closes RM-6773

See merge request records-management/records-management!1166
2019-05-02 09:16:25 +01:00
Ross Gale
6fa7d75f0a Record only merge for release 2019-04-30 14:43:56 +01:00
cagache
d396c87e29 split test class in 2 2019-04-25 16:21:01 +03:00
Ross Gale
943345ab78 RM-6834 adding fix for system edited records not being returned from search 2019-04-25 14:10:12 +01:00
cagache
86128a66b3 RM-6796 Added automated tests for Declare and file to a record folder functionality 2019-04-25 15:05:18 +03:00
Rodica Sutu
905a8996b5 Fix java docs for rm community repo:
update/remove/add  method parameters as @param in doc comments
substitute element < with &lt;
substitute element > with &gt;
substitute element & with  &amp;
2019-04-25 09:32:00 +03:00
Sara Aspery
2c30614e8c RM-6792 Optional Record Locn 2019-04-24 11:42:42 +01:00
cagache
e8725860eb transform UserPermissions in enum; add helper methods to create users with rm role, permissions or clearance 2019-04-23 12:15:38 +03:00
cagache
a54a80f6a6 transform UserPermissions in enum; add helper methods to create users with rm role, permissions or clearance 2019-04-23 08:23:43 +03:00
Rodica Sutu
78ed0e4404 Record only merge of ACS 6.0.1 changes. 2019-04-22 15:52:50 +03:00
Rodica Sutu
0710c81b53 Merge branch 'feature/RM-6825_IncreaseTravisTimeout' into 'master'
Increase Travis timeout

Closes RM-6825

See merge request records-management/records-management!1162
2019-04-22 11:54:22 +01:00
Claudia Agache
06cb843fac Merge branch 'feature/RM-6821_IntermittentSearchRestApiTests' into 'master'
RM-6821 Try to fix intermittent enterprise search rest api failures by increasing the search time with 30 sec

See merge request records-management/records-management!1154
2019-04-22 08:06:48 +01:00
Rodica Sutu
ba8cd73a10 Increase Travis timeout 2019-04-22 09:24:03 +03:00
Rodica Sutu
d719f535db Merge branch 'feature/RM-6833_SkipFailBuildOnJavaDocsError' into 'master'
RM-6833

See merge request records-management/records-management!1161
2019-04-19 14:40:52 +01:00
Rodica Sutu
61e50fb10f RM-6833 Fix java docs generation on openJDK 11.0.2 2019-04-19 14:40:52 +01:00
cagache
f6d0b2fd05 Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6821_IntermittentSearchRestApiTests 2019-04-19 14:37:28 +03:00
cagache
d68070051d try to search for content ~1.45 min 2019-04-18 16:40:31 +03:00
Ross Gale
ecfb3fdca9 Merge branch 'feature/RM-6825_UpdateTravis' into 'master'
RM-6825 update travis to use openjdk11

Closes RM-6825

See merge request records-management/records-management!1157
2019-04-17 13:21:30 +01:00
Ross Gale
3cb127b620 RM-6825 update travis to use openjdk11 2019-04-17 11:04:26 +01:00
cagache
29a7047db1 try to search for content ~2 min 2019-04-16 14:17:55 +03:00
cagache
94454b1f6c try to search for content ~1.45 min 2019-04-16 10:38:24 +03:00
cagache
f74303fc50 removed afterMethod annotation 2019-04-16 09:16:20 +03:00
cagache
11a193bdbf Merge remote-tracking branch 'remotes/origin/master' into feature/RM-6821_IntermittentSearchRestApiTests 2019-04-16 08:17:37 +03:00
cagache
15b5c167af try to search for content ~1.45 min 2019-04-15 15:42:01 +03:00
cagache
ce60d3e89f Renamed test classes to end with Test or Tests 2019-04-12 14:32:52 +03:00
cagache
72493a9a13 Merge remote-tracking branch 'remotes/origin/release/V3.0' into merge/Fix_ClassNotFoundException_logs 2019-04-12 14:17:40 +03:00
cagache
688628258d try to search for content ~1.30 min 2019-04-12 14:14:59 +03:00
Rodica Sutu
c17fc2ac6f Merge branch 'feature/RM-6804_FixWarningsIllegalReflecticeAccess' into 'master'
RM-6804_FixWarningsIllegalReflecticeAccess

See merge request records-management/records-management!1153
2019-04-12 12:13:21 +01:00
Rodica Sutu
3d91c28743 Merge branch 'master' of https://git.alfresco.com/records-management/records-management into feature/RM-6804_FixWarningsIllegalReflecticeAccess
# Conflicts:
#	pom.xml
2019-04-12 11:32:10 +03:00
Claudia Agache
99bf4bba4a Merge branch 'feature/RM-6803_JavadocNotGenerated_no' into 'master'
RM-6803 Skip Javadoc execution for not a Java classpath-capable packages

Closes RM-6803

See merge request records-management/records-management!1151
2019-04-12 08:47:23 +01:00
Rodica Sutu
107ae75f35 fix the illegal reflective access operation warning from xstream library 2019-04-12 10:31:23 +03:00
cagache
1bee02b8df try to search for content ~1 min 2019-04-11 17:47:08 +03:00
cagache
ce8522a2c1 refactoring 2019-04-11 17:33:26 +03:00
cagache
2e5ce4c6a2 fix javadoc 2019-04-11 17:10:08 +03:00
cagache
b6daa30fba Added slf4j-log4j12 dependency to automation community rest api project and log4j.properties file because logs didn't work on rest api tests after moving to OpenJdk 11 2019-04-11 17:09:40 +03:00
Roxana Lucanu
400a61b7bc Merge branch 'feature/RM-6723_AGS_ACS6.1_compatibility' into 'master'
Resolve RM-6723 "Feature/ ags acs6.1 compatibility"

Closes RM-6723

See merge request records-management/records-management!1148
2019-04-10 15:18:46 +01:00
cagache
aa0a32b676 RM-6803 Skip Javadoc execution for not a Java classpath-capable packages 2019-04-10 15:39:35 +03:00
cagache
c697e37dfe Record only merge of version change. 2019-04-10 13:31:04 +03:00
Rodica Sutu
9cbdb10e6a Merge branch 'merge/RM-6787_VersionWhenClassifyFileWithCopies' into 'master'
Resolve RM-6787 "Merge/ versionwhenclassifyfilewithcopies"

Closes RM-6787

See merge request records-management/records-management!1150
2019-04-10 10:54:41 +01:00
Rodica Sutu
2d06a30243 Merge remote-tracking branch 'origin/release/V3.0' into merge/RM-6787_VersionWhenClassifyFileWithCopies 2019-04-10 09:04:01 +03:00
rlucanu
02db9e2d52 RM-6723 review changes 2019-04-09 16:45:22 +03:00
rlucanu
166273ff0a RM-6723 code review changes 2019-04-09 09:55:43 +03:00
rlucanu
aa04bbba90 Merge remote-tracking branch 'origin/master' into feature/RM-6723_AGS_ACS6.1_compatibility 2019-04-08 14:39:48 +03:00
cagache
9384a4e5aa Merge remote-tracking branch 'remotes/origin/release/V3.0' into merge/MergeTestChangesFromV2.7 2019-04-08 09:47:19 +03:00
rlucanu
d25c8762ca RM-6723 fixing tests 2019-04-07 23:11:10 +03:00
rlucanu
a8c7e8540e RM-6723 Added variables for versions 2019-04-05 16:07:53 +03:00
rlucanu
5c2c54a4cd Merge remote-tracking branch 'origin/master' into feature/RM-6723_AGS_ACS6.1_compatibility 2019-04-05 14:47:27 +03:00
rlucanu
3ab28bb2c2 RM-6723 Added ActiveMQ 2019-04-05 14:44:30 +03:00
Claudia Agache
a68fccd169 Merge branch 'feature/RM-6790_OpenJDK11Compatibility' into 'master'
RM-6790 Make RM automation project compatible with OpenJdk 11

Closes RM-6722

See merge request records-management/records-management!1140
2019-04-03 09:44:57 +01:00
Rodica Sutu
84699c994d Merge branch 'feature/RM-6722_OpenJDK11Compatibility' into 'feature/RM-6790_OpenJDK11Compatibility'
Resolve RM-6722 "Feature/ openjdk11compatibility"

See merge request records-management/records-management!1141
2019-04-03 09:34:33 +01:00
Rodica Sutu
d306574122 version updates for the plugins used for OpenJDK 11 2019-04-02 12:43:16 +03:00
Rodica Sutu
f77dc61b89 tidy up 2019-04-02 12:41:22 +03:00
rlucanu
190f859464 Merge branch 'feature/RM-6722_OpenJDK11Compatibility' into feature/RM-6723_AGS_ACS6.1_compatibility 2019-04-02 12:21:14 +03:00
Rodica Sutu
9d1c3770c9 fix getResourceAsStream() for OpenJdk11 2019-04-01 11:11:43 +03:00
rlucanu
3ac143c283 RM-6723 removed unwanted string 2019-03-29 12:06:01 +02:00
Rodica Sutu
abfc1fc999 update the maven java doc plugin to fix the Error fetching link: .../target/apidocs/package-list.
add the fabric8.docker.version to fix the warning "build.plugins.plugin.version' for io.fabric8:docker-maven-plugin is missing."
2019-03-29 10:14:03 +02:00
rlucanu
8df3dbb151 RM-6723 changes to be compatible with ACS6.1 2019-03-29 09:24:40 +02:00
Rodica Sutu
0a72cf0c32 update maven enforce plugin 2019-03-28 17:53:00 +02:00
Rodica Sutu
60a7f3282d update the versions for surefire and failsafe plugins and add an additional argument --illegal-access=permit to allow all reflection access for third party libraries: 2019-03-28 17:33:37 +02:00
Rodica Sutu
95249c3c24 Merge remote-tracking branch 'remotes/origin/feature/RM-6790_OpenJDK11Compatibility' into feature/RM-6722_OpenJDKCOmpatibility 2019-03-28 11:32:05 +02:00
Rodica Sutu
5afd385009 update the maven.enforcer.plugin 2019-03-28 11:19:32 +02:00
Rodica Sutu
2b6dd1861c change back alfresco-maven-plugin
comment out thejava version from the maven-enforcer-plugin
2019-03-28 09:48:45 +02:00
Rodica Sutu
7c27ac4782 fix compilation error 2019-03-28 09:44:43 +02:00
cagache
b860dd25c7 changed formatter used in tests because DateTimeFormatter.ISO_INSTANT outputs 9 nanoseconds and POST request to http://localhost:8080/alfresco/service/api/rma/actions/ExecutionQueue returns 500 2019-03-27 13:19:09 +02:00
cagache
076910017e Revert "call super.checkServerHealth"
This reverts commit 5b151008
2019-03-26 16:19:15 +02:00
cagache
5b15100839 call super.checkServerHealth 2019-03-26 15:35:05 +02:00
Rodica Sutu
c9ae6b8d91 Merge remote-tracking branch 'remotes/origin/feature/RM-6790_OpenJDK11Compatibility' into feature/RM-6722_OpenJDKCOmpatibility 2019-03-26 13:51:40 +02:00
Rodica Sutu
cb76ebed00 update the maven javadoc, maven war and alfresco-maven plugin to be compatible with OpenJDK 11
add javax libraries
2019-03-26 13:50:09 +02:00
cagache
5e6555db50 RM-6790 Make RM automation module compatible with OpenJDK 11 2019-03-26 10:39:57 +02:00
Ross Gale
3314a60b44 Merge branch 'merge/RM-6788_DeclareArchivedContent' into 'master'
Resolve RM-6788 "Merge/ declarearchivedcontent"

Closes RM-6788

See merge request records-management/records-management!1137
2019-03-22 13:52:17 +00:00
Ross Gale
47ecd4eb64 Merge branch 'release/V3.0' into merge/RM-6788_DeclareArchivedContent 2019-03-18 13:11:36 +00:00
cagache
7f2c73174a Merge branch 'release/V3.0' into merge/RM-6786_FileCantBeDeclaredAsRecord 2019-03-15 15:31:41 +02:00
Rodica Sutu
e7d32b93c1 Merge branch 'merge/RM-6785_JacksonLibraryUpdate' into 'master'
RM-6785 Update Jackson Library on master

Closes RM-6785

See merge request records-management/records-management!1136
2019-03-15 13:23:26 +00:00
Rodica Sutu
53d0fb1cbd Merge remote-tracking branch 'remotes/origin/release/V3.0' into merge/RM-6785_JacksonLibraryUpdate 2019-03-15 09:00:51 +02:00
Ross Gale
dd606fd941 Merge branch 'feature/PR-7_wossabi' into 'master'
Resolve PR-7 "Feature/ wossabi"

Closes PR-7

See merge request records-management/records-management!1130
2019-03-01 14:15:06 +00:00
GitHub
901ed61933 Update CONTRIBUTING.md
Adding in details of issues tab

Mirrored from community commit ba9468a98bb56e781144fc95cf03e8bdc3aa814a
2019-02-26 09:11:29 +00:00
GitHub
c40c426797 Update CONTRIBUTING.md
removing reference to ALF project

Mirrored from community commit 2b62b5d592de5f86c118e661ac91c5fe91d117fa
2019-02-26 09:05:55 +00:00
cagache
81cf904d33 Record only merge of version change. 2019-02-26 09:27:49 +02:00
Rodica Sutu
5141e97129 Merge branch 'merge/MNT_20145_RM_6758_ChangesFrom2_6' into 'master'
Merge/mnt 20145 rm 6758 changes from2 6

See merge request records-management/records-management!1127
2019-02-26 07:07:22 +00:00
Rodica Sutu
c6a45874fb Merge remote-tracking branch 'remotes/origin/release/V3.0' into merge/MNT_20145_RM_6758_ChangesFrom2_6 2019-02-25 23:31:20 +02:00
Rodica Sutu
3ee27eb72a Record only merge of version change. 2019-01-25 12:53:16 +02:00
Ross Gale
77d73283a1 Merge branch 'merge/RM-6702_LicenceUpdate' into 'master'
Resolve RM-6702 "Merge/ licenceupdate"

Closes RM-6702

See merge request records-management/records-management!1110
2019-01-04 15:25:54 +00:00
Ross Gale
c68c814513 RM-6702 updating headers to 2019 2019-01-04 15:25:11 +00:00
Ross Gale
2898fbb8a4 Record only merge of header update 2019-01-04 15:22:03 +00:00
Rodica Sutu
3088f0a4a4 Merge branch 'feature/RM_6591_Update_RuleDefinitions_ru' into 'master'
RM-6591 Update RuleDefinitions action type

See merge request records-management/records-management!1105
2018-10-25 12:42:36 +01:00
Rodica Sutu
a057f799cf Merge branch 'feature/RM_6591_Update_RuleDefinitions_ru' of https://git.alfresco.com/records-management/records-management into feature/RM_6591_Update_RuleDefinitions_ru 2018-10-25 12:46:50 +03:00
Rodica Sutu
ff0a24a577 Update the actions type from RuleDefinition class in order to be able to use it with other non-rm actions 2018-10-25 12:44:21 +03:00
Rodica Sutu
009ac8cf1c Update the actions type from RuleDefinition class in order to be able to use it with other non-rm actions 2018-10-25 11:25:19 +03:00
cagache
b8be1e375e Merge remote-tracking branch 'remotes/origin/release/V3.0' into merge/Merge_MNT-19967_From2.6 2018-10-04 08:39:56 +03:00
cagache
c0fb76539b Merge remote-tracking branch 'remotes/origin/release/V3.0' 2018-10-01 18:03:18 +03:00
cagache
772ea923ce Record only merge of release/V3.0 into master 2018-09-06 10:03:08 +03:00
cagache
873470ec26 Merge changes from 2.6.1 release to master 2018-09-03 09:54:56 +03:00
Rashmi Itagi
f8558c92ac Merge branch 'feature/RM-6269_Rebranding_artifactIds' into 'master'
RM-6269 Rebranding

See merge request records-management/records-management!1094
2018-08-23 10:26:26 +01:00
cagache
673bf03972 changed profile ids 2018-08-21 10:59:23 +03:00
cagache
c570793fa8 Merged with master 2018-08-21 10:30:50 +03:00
cagache
d16884a692 Revert "RM-6269 Changed the module folder names on enterprise"
This reverts commit 6c52e58
2018-08-20 20:13:03 +03:00
Rashmi Itagi
6c52e5891d RM-6269 Changed the module folder names on enterprise 2018-08-20 16:38:11 +01:00
Rashmi Itagi
b83b3e7631 RM-6269 Changed the rm to governance-services in the names of the amp files in Dockerfiles 2018-08-20 11:55:03 +01:00
Tom Page
168f24d140 Record-only merge release/V3.0 into master. 2018-07-30 16:21:15 +01:00
alfresco-build
f51fac42c4 [maven-release-plugin] prepare for next development iteration 2018-07-30 14:01:41 +01:00
David Webster
e117e16b4e Merge remote-tracking branch 'origin/master' into feature/RM-6269_Rebranding_artifactIds 2018-07-26 16:59:22 +01:00
Rashmi Itagi
2ff92641dc RM-6269 attach-rm-jar to attach-alfresco-governance-services-jar 2018-07-24 17:09:07 +01:00
Rashmi Itagi
f8a1697e34 RM-6269 alfresco-ags to alfresco-governance-services and alfresco.rm.artifactId to ags.artifactId 2018-07-24 17:03:45 +01:00
1209 changed files with 8645 additions and 2301 deletions

68
.travis.settings.xml Normal file
View File

@@ -0,0 +1,68 @@
<settings>
<profiles>
<profile>
<id>alfresco-internal</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>alfresco-internal</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-internal</id>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</pluginRepository>
<pluginRepository>
<id>alfresco-public</id>
<name>Alfresco Public Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
<pluginRepository>
<id>alfresco-private</id>
<name>Alfresco Private Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<servers>
<server>
<id>docker.io</id>
<username>${env.DOCKERHUB_USERNAME}</username>
<password>${env.DOCKERHUB_PASSWORD}</password>
</server>
<server>
<id>quay.io</id>
<username>${env.QUAY_USERNAME}</username>
<password>${env.QUAY_PASSWORD}</password>
</server>
<server>
<id>alfresco-internal</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-private</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-internal-snapshots</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
</servers>
</settings>

View File

@@ -1,6 +1,129 @@
import:
- source: travis-env-vars.yml
os: linux
dist: xenial
language: java
jdk:
- openjdk11
sudo: false
install: true
script: travis_wait 35 mvn -B clean verify -Dcommunity -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
services:
- docker
branches:
only:
- /release\/V3.\d+.*/
- /feature-3.\d+\/.*/
- /merge-3.\d+\/.*/
- /hotfix-3.\d+\/.*/
cache:
directories:
- $HOME/.m2
# the cache can grow constantly
before_cache:
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-governance-services*
before_install:
- "cp .travis.settings.xml $HOME/.m2/settings.xml"
install: skip
stages:
- name: Build AGS
- name: Tests
if: commit_message !~ /\[skip tests\]/
- name: Security Scans
- name: Release
- name: Publish
jobs:
include:
- name: "Build AGS Community"
stage: Build AGS
before_script: source scripts/setUpMavenPhase.sh
script:
- travis_retry travis_wait 120 mvn -B -q clean ${MAVEN_PHASE} -P${BUILD_PROFILE} -Dimage.tag=${IMAGE_TAG} -Dskip.integrationtests=false -Dcommunity -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: "Build AGS Enterprise"
stage: Build AGS
before_script: source scripts/setUpMavenPhase.sh
install:
- travis_retry travis_wait 60 mvn -B -q clean install $MVN_SKIP -f rm-community/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
script:
- travis_retry travis_wait 80 mvn -B -q ${MAVEN_PHASE} -P${BUILD_PROFILE} -Dimage.tag=${IMAGE_TAG} -Dskip.integrationtests=false -f rm-enterprise/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: "Build AGS Benchmark"
stage: Build AGS
before_script: source scripts/setUpMavenPhase.sh
install:
- travis_retry travis_wait 80 mvn -B -q clean install $MVN_SKIP -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
script:
- travis_retry travis_wait 35 mvn -B -q ${MAVEN_PHASE} -Dskip.integrationtests=false -f rm-benchmark/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: "Community Integrations Tests on MySQL"
stage: Tests
script:
- echo "Community Integrations Tests on MySQL"
- name: "Enterprise Integrations Tests on MySQL"
stage: Tests
script:
- echo "Enterprise Integrations Tests on MySQL"
- name: "Community Rest API Tests"
stage: Tests
before_install:
- travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-community-repo -am
install:
- bash scripts/startAlfresco.sh $COMMUNITY_REPO_PATH
- bash scripts/waitForAlfrescoToStart.sh
script:
- echo "Community Rest API Tests"
- name: "Enterprise Rest API Tests"
stage: Tests
before_install:
- travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am
install:
- bash scripts/startAlfresco.sh $ENTERPRISE_REPO_PATH
- bash scripts/waitForAlfrescoToStart.sh
script:
- echo "Enterprise Rest API Tests"
- name: "Community UI Tests ..."
stage: Tests
before_install:
- travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-community-repo,:alfresco-governance-services-community-share -am
install:
- bash scripts/startAlfresco.sh $COMMUNITY_SHARE_PATH
- bash scripts/waitForAlfrescoToStart.sh
script:
- echo "Community UI Tests ..."
- name: "Enterprise UI Tests ..."
stage: Tests
before_install:
- travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo,:alfresco-governance-services-enterprise-share -am
install:
- bash scripts/startAlfresco.sh $ENTERPRISE_SHARE_PATH
- bash scripts/waitForAlfrescoToStart.sh
script:
- echo "Enterprise UI Tests ..."
- name: "Source Clear Scan (SCA)"
stage: Security Scans
script:
- echo "Source Clear Scan (SCA)"
- name: "Static Analysis (SAST)"
stage: Security Scans
script:
- echo "Static Analysis (SAST)"
- name: "Community Release"
stage: Release
script:
- echo "Community Release"
- name: "Enterprise Release"
stage: Release
script:
- echo "Enterprise Release"
- name: "Copy to S3 Release Bucket"
stage: Publish
script:
- echo "Copy to S3 Release Bucket"

View File

@@ -4,20 +4,19 @@ For the details on the Records Management project see [here](https://community.a
## Getting started
What you need to get started:
* A [Jira](https://issues.alfresco.com/jira/projects/ALF/issues/?filter=allopenissues) account;
* A [GitHub](https://github.com/) account.
Useful but not necessary:
* An [Alfresco community](https://community.alfresco.com/) account - this is a good place to ask questions and find answers.
* A [Jira](https://issues.alfresco.com/jira/projects/RM/issues/?filter=allopenissues) account - Good place to look at what the team is working on;
## Making changes
We use Jira to track issues. If you are committing a fix for a raised issue please include the ticket number in both the merge requests and the git commit messages.
For example a fix for the ticket [ALF-21953](https://issues.alfresco.com/jira/browse/ALF-21953) might have the git commit message: "ALF-21953 Updated to use super pom v9".
We use GitHub's issues to track community contributions and issues. If you are committing a fix for a raised issue please reference the issue number in the pull request.
If you are adding in a new feature or bug fix please do so [here](https://issues.alfresco.com/jira/projects/ALF/issues/?filter=allopenissues). By raising a ticket in this project you will be agreeing to the Alfresco Contribution Agreement which can be found at the bottom of the 'Create Issue' form or alternatively attached to [this](https://community.alfresco.com/docs/DOC-7070-alfresco-contribution-agreement) page.
If you are adding in a new feature or bug fix please raise an issue in the issues tab. By raising an issue in this project you will be agreeing to the Alfresco Contribution Agreement which can be found [here](https://community.alfresco.com/docs/DOC-7070-alfresco-contribution-agreement).
When you are ready to make a change you just need to fork the [records-management](https://github.com/Alfresco/records-management) repository and then make your changes into your copy of the code.
@@ -55,8 +54,6 @@ Occasionally we may have to revert a change after it has been accepted. This wil
[IDE settings for Eclipse and Intellij](https://github.com/Alfresco/records-management/tree/master/ide-config)
[Jira project for raising issues/features](https://issues.alfresco.com/jira/projects/ALF/issues/?filter=allopenissues)
[Jira project used by GS team](https://issues.alfresco.com/jira/projects/RM/issues)
[Records Management project details](https://community.alfresco.com/docs/DOC-6387-project-overview-records-management)

295
pom.xml
View File

@@ -2,10 +2,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-rm</artifactId>
<artifactId>alfresco-governance-services</artifactId>
<packaging>pom</packaging>
<version>3.0.2</version>
<name>Alfresco Records Management</name>
<version>3.2.0.3</version>
<name>Alfresco Governance Services</name>
<url>http://www.alfresco.org/</url>
<inceptionYear>2005</inceptionYear>
@@ -15,10 +15,10 @@
</organization>
<scm>
<connection>scm:git:https://git.alfresco.com/records-management/records-management.git</connection>
<developerConnection>scm:git:https://git.alfresco.com/records-management/records-management.git</developerConnection>
<url>https://git.alfresco.com/records-management/records-management</url>
<tag>V3.0.2</tag>
<connection>scm:git:ssh://git@github.com/Alfresco/governance-services.git</connection>
<developerConnection>scm:git:ssh://git@github.com/Alfresco/governance-services.git</developerConnection>
<url>scm:git:ssh://git@github.com/Alfresco/governance-services.git</url>
<tag>V3.2.0.3</tag>
</scm>
<issueManagement>
@@ -258,32 +258,26 @@
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8.maven.version}</version>
<configuration>
<images>
<image>
<name>${image.name}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<artifactId>docker-maven-plugin</artifactId>
<version>${fabric8.docker.version}</version>
<executions>
<execution>
<id>build-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>build-image-verify</id>
<!-- This will still be executed if the tests are skipped. -->
<phase>verify</phase>
<goals>
<goal>build</goal>
</goals>
<configuration>
<images>
<image>
<name>${image.name}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
</execution>
</executions>
</plugin>
@@ -300,19 +294,8 @@
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8.maven.version}</version>
<configuration>
<images>
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<artifactId>docker-maven-plugin</artifactId>
<version>${fabric8.docker.version}</version>
<executions>
<execution>
<id>build-push-image</id>
@@ -321,6 +304,17 @@
<goal>build</goal>
<goal>push</goal>
</goals>
<configuration>
<images>
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
</execution>
</executions>
</plugin>
@@ -338,25 +332,8 @@
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8.maven.version}</version>
<configuration>
<images>
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<image>
<name>${image.name}:${image.tag}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<artifactId>docker-maven-plugin</artifactId>
<version>${fabric8.docker.version}</version>
<executions>
<execution>
<id>build-push-image</id>
@@ -365,6 +342,23 @@
<goal>build</goal>
<goal>push</goal>
</goals>
<configuration>
<images>
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<image>
<name>${image.name}:${image.tag}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
</execution>
</executions>
</plugin>
@@ -382,19 +376,8 @@
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8.maven.version}</version>
<configuration>
<images>
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<artifactId>docker-maven-plugin</artifactId>
<version>${fabric8.docker.version}</version>
<executions>
<execution>
<id>build-push-image</id>
@@ -403,6 +386,17 @@
<goal>build</goal>
<goal>push</goal>
</goals>
<configuration>
<images>
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
</execution>
</executions>
</plugin>
@@ -420,25 +414,8 @@
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8.maven.version}</version>
<configuration>
<images>
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<image>
<name>${image.name}:${project.version}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<artifactId>docker-maven-plugin</artifactId>
<version>${fabric8.docker.version}</version>
<executions>
<execution>
<id>build-push-image</id>
@@ -447,6 +424,94 @@
<goal>build</goal>
<goal>push</goal>
</goals>
<configuration>
<images>
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<image>
<name>${image.name}:${project.version}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>start-db</id>
<activation>
<property>
<name>skip.integrationtests</name>
<value>false</value>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${fabric8.docker.version}</version>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>stop</goal>
<goal>start</goal>
</goals>
<configuration>
<images>
<image>
<alias>test-database</alias>
<name>postgres:${postgres.version}</name>
<run>
<ports>
<port>${database.port}:${postgresql.port}</port>
</ports>
<env>
<POSTGRES_PASSWORD>${alfresco.db.password}</POSTGRES_PASSWORD>
<POSTGRES_USER>${alfresco.db.username}</POSTGRES_USER>
<POSTGRES_DB>${alfresco.test.db.name}</POSTGRES_DB>
</env>
<cmd>
<shell>-c max_connections=300</shell>
</cmd>
<wait>
<log>database system is ready to accept connections</log>
<time>20000</time>
</wait>
</run>
</image>
<image>
<name>alfresco/alfresco-activemq:${activemq.version}</name>
<run>
<ports>
<port>${activemq.port1}:${activemq.port1}</port>
<port>${activemq.port2}:${activemq.port2}</port>
</ports>
</run>
</image>
</images>
</configuration>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
@@ -467,29 +532,38 @@
<alfresco.db.username>alfresco</alfresco.db.username>
<alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.share.artifactId>share</alfresco.share.artifactId>
<alfresco-spring-webscripts.version>6.20</alfresco-spring-webscripts.version>
<api.explorer.version>6.0.7-ga</api.explorer.version>
<alfresco-spring-webscripts.version>7.8</alfresco-spring-webscripts.version>
<api.explorer.version>6.1.0</api.explorer.version>
<!-- Set this here and override it in the community and enterprise modules. -->
<alfresco.version>0.0</alfresco.version>
<skip.integrationtests>true</skip.integrationtests>
<postgres.version>9.4.12</postgres.version>
<activemq.version>5.15.6</activemq.version>
<activemq.port1>61616</activemq.port1>
<activemq.port2>5672</activemq.port2>
<share.client.contextPath>/share</share.client.contextPath>
<maven.javadoc.version>3.1.0</maven.javadoc.version>
<maven.javadoc.skip>true</maven.javadoc.skip>
<maven.war.plugin.version>2.6</maven.war.plugin.version>
<maven.war.plugin.version>3.2.2</maven.war.plugin.version>
<maven.alfresco.includeDependencies>false</maven.alfresco.includeDependencies>
<maven.build.sourceVersion>1.8</maven.build.sourceVersion>
<maven.build.testSourceVersion>1.8</maven.build.testSourceVersion>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<testJavaVersion>${java.version}</testJavaVersion>
<maven.buildhelper.version>1.9.1</maven.buildhelper.version>
<maven.compiler.version>3.8.0</maven.compiler.version>
<maven.enforcer.plugin>3.0.0-M2</maven.enforcer.plugin>
<maven.resources.version>3.1.0</maven.resources.version>
<maven.tomcat.port>8080</maven.tomcat.port>
<jackson.version>2.9.8</jackson.version>
<jackson.version>2.9.9</jackson.version>
<jackson-databind.version>2.9.9.3</jackson-databind.version>
<fabric8.docker.version>0.25.0</fabric8.docker.version>
<mockito.version>1.10.19</mockito.version>
<postgresql.version>42.2.5</postgresql.version>
<postgresql.version>42.2.6</postgresql.version>
<postgresql.port>5432</postgresql.port>
<mysql.version>5.1.40</mysql.version>
<mysql.port>3306</mysql.port>
@@ -514,7 +588,6 @@
<app.properties.test.include>**</app.properties.test.include>
<app.properties.test.folder>src/test/properties/local</app.properties.test.folder>
<fabric8.maven.version>3.5.37</fabric8.maven.version>
<image.name>imageNameNotSet</image.name>
<image.tag>latest</image.tag>
<image.registry>quay.io</image.registry>
@@ -597,13 +670,17 @@
<configuration>
<rules>
<requireJavaVersion>
<version>[1.8.0,)</version>
<version>[${java.version},)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
@@ -616,14 +693,14 @@
<configuration>
<regexPropertySettings>
<regexPropertySetting>
<name>rm.module.repo.version.min</name>
<name>ags.module.repo.version.min</name>
<value>${alfresco.version}</value>
<regex>(\d+)\.(\d+).*</regex>
<replacement>$1.$2</replacement>
<failIfNoMatch>false</failIfNoMatch>
</regexPropertySetting>
<regexPropertySetting>
<name>rm.module.version</name>
<name>ags.module.version</name>
<value>${project.version}</value>
<regex>([0-9\.]*[0-9]).*</regex>
<replacement>$1</replacement>
@@ -832,8 +909,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>${maven.build.sourceVersion}</source>
<target>${maven.build.sourceVersion}</target>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
<executions>
<execution>
@@ -843,8 +920,8 @@
<goal>testCompile</goal>
</goals>
<configuration>
<source>${maven.build.testSourceVersion}</source>
<target>${maven.build.testSourceVersion}</target>
<source>${testJavaVersion}</source>
<target>${testJavaVersion}</target>
</configuration>
</execution>
</executions>
@@ -939,7 +1016,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<doclint>none</doclint>
<source>8</source>
<source>${java.version}</source>
</configuration>
</plugin>
@@ -1040,6 +1117,12 @@
<artifactId>maven-war-plugin</artifactId>
<version>${maven.war.plugin.version}</version>
<dependencies>
<!-- Needed when creating the community and enterprise rest api wars -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.18</version>
</dependency>
<dependency>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>

View File

@@ -1,14 +1,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-rm-automation</artifactId>
<name>Alfresco Records Management Automation</name>
<artifactId>alfresco-governance-services-automation</artifactId>
<name>Alfresco Governance Services Automation</name>
<packaging>pom</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-rm</artifactId>
<version>3.0.2</version>
<artifactId>alfresco-governance-services</artifactId>
<version>3.2.0.3</version>
</parent>
<licenses>
@@ -24,8 +24,6 @@
</modules>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<suiteXmlFile>testng.xml</suiteXmlFile>
<skip.automationtests>true</skip.automationtests>
</properties>
@@ -131,7 +129,7 @@
</build>
</profile>
<profile>
<id>apply-rm-community</id>
<id>apply-ags-community</id>
<build>
<plugins>
<plugin>
@@ -147,13 +145,13 @@
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-rm-community-share</artifactId>
<artifactId>alfresco-governance-services-community-share</artifactId>
<version>${project.version}</version>
<type>amp</type>
</artifactItem>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-rm-community-repo</artifactId>
<artifactId>alfresco-governance-services-community-repo</artifactId>
<version>${project.version}</version>
<type>amp</type>
</artifactItem>
@@ -178,7 +176,7 @@
<configuration>
<backup>true</backup>
<ampLocation>
${project.build.directory}/amps/alfresco-rm-community-repo-${project.version}.amp
${project.build.directory}/amps/alfresco-governance-services-community-repo-${project.version}.amp
</ampLocation>
<warLocation>${project.build.directory}/alf-installation/tomcat/webapps/alfresco.war
</warLocation>
@@ -193,7 +191,7 @@
<configuration>
<backup>true</backup>
<ampLocation>
${project.build.directory}/amps/alfresco-rm-community-share-${project.version}.amp
${project.build.directory}/amps/alfresco-governance-services-community-share-${project.version}.amp
</ampLocation>
<warLocation>${project.build.directory}/alf-installation/tomcat/webapps/share.war
</warLocation>
@@ -205,7 +203,7 @@
</build>
</profile>
<profile>
<id>apply-rm-enterprise</id>
<id>apply-ags-enterprise</id>
<build>
<plugins>
<plugin>
@@ -221,13 +219,13 @@
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>${alfresco.rm.share}</artifactId>
<artifactId>${ags.share}</artifactId>
<version>${project.version}</version>
<type>amp</type>
</artifactItem>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>${alfresco.rm.repo}</artifactId>
<artifactId>${ags.repo}</artifactId>
<version>${project.version}</version>
<type>amp</type>
</artifactItem>
@@ -251,7 +249,7 @@
<phase>process-test-resources</phase>
<configuration>
<backup>true</backup>
<ampLocation>${project.build.directory}/amps/${alfresco.rm.repo}-${project.version}.amp</ampLocation>
<ampLocation>${project.build.directory}/amps/${ags.repo}-${project.version}.amp</ampLocation>
<warLocation>${project.build.directory}/alf-installation/tomcat/webapps/alfresco.war</warLocation>
</configuration>
</execution>
@@ -263,7 +261,7 @@
<phase>process-test-resources</phase>
<configuration>
<backup>true</backup>
<ampLocation>${project.build.directory}/amps/${alfresco.rm.share}-${project.version}.amp</ampLocation>
<ampLocation>${project.build.directory}/amps/${ags.share}-${project.version}.amp</ampLocation>
<warLocation>${project.build.directory}/alf-installation/tomcat/webapps/share.war</warLocation>
</configuration>
</execution>

View File

@@ -2,22 +2,22 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-rm-automation-community-rest-api</artifactId>
<name>Alfresco Records Management Automation Community REST API</name>
<artifactId>alfresco-governance-services-automation-community-rest-api</artifactId>
<name>Alfresco Governance Services Automation Community REST API</name>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-rm-automation</artifactId>
<version>3.0.2</version>
<artifactId>alfresco-governance-services-automation</artifactId>
<version>3.2.0.3</version>
</parent>
<properties>
<maven.build.sourceVersion>1.8</maven.build.sourceVersion>
<maven.javadoc.skip>false</maven.javadoc.skip>
<alfresco.rm.share>alfresco-rm-community-share</alfresco.rm.share>
<alfresco.rm.repo>alfresco-rm-community-repo</alfresco.rm.repo>
<tas.restapi.version>6.0.0.3</tas.restapi.version>
<ags.share>alfresco-governance-services-community-share</ags.share>
<ags.repo>alfresco-governance-services-community-repo</ags.repo>
<tas.restapi.version>6.0.1.2</tas.restapi.version>
<fluent.json.version>2.0.0</fluent.json.version>
<jackson.databind.version>2.7.7</jackson.databind.version>
</properties>
<build>
@@ -46,16 +46,34 @@
</build>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.26</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi-test</artifactId>
<version>${tas.restapi.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi-test</artifactId>
<version>${tas.restapi.version}</version>
<type>test-jar</type>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
@@ -79,5 +97,15 @@
<artifactId>commons-collections4</artifactId>
<version>4.1</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>3.0.14</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.databind.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -56,4 +56,7 @@ public class RMRestProperties extends RestProperties
@Value ("${rest.rmPath}")
private String restRmPath;
@Value ("${docker.host}")
private String dockerHost;
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -26,7 +26,7 @@
*/
package org.alfresco.rest.core;
import com.jayway.restassured.builder.RequestSpecBuilder;
import io.restassured.builder.RequestSpecBuilder;
import org.alfresco.rest.exception.EmptyJsonResponseException;
import org.alfresco.rest.model.RestErrorModel;

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -34,6 +34,7 @@ import org.alfresco.rest.requests.Node;
import org.alfresco.rest.requests.coreAPI.RestCoreAPI;
import org.alfresco.rest.requests.search.SearchAPI;
import org.alfresco.rest.rm.community.requests.gscore.GSCoreAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.ActionsExecutionAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.FilePlanAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.FilesAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RMSiteAPI;
@@ -225,4 +226,14 @@ public class RestAPIFactory
{
return getGSCoreAPI(userModel).usingUnfiledRecordFolder();
}
public ActionsExecutionAPI getActionsAPI(UserModel userModel)
{
return getGSCoreAPI(userModel).usingActionsExecutionsAPI();
}
public ActionsExecutionAPI getActionsAPI()
{
return getGSCoreAPI(null).usingActionsExecutionsAPI();
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -26,12 +26,18 @@
*/
package org.alfresco.rest.core.v0;
import javax.json.Json;
import javax.json.JsonReader;
import java.io.IOException;
import java.io.InputStream;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.ParseException;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -76,4 +82,40 @@ public class APIUtils
LOGGER.info("Response body:\n{}", source);
return new JSONObject(source);
}
/**
* Util method to extract the message string from the HTTP response
*
* @param httpResponse http response
* @return error message from the http response
*/
public static String extractErrorMessageFromHttpResponse(HttpResponse httpResponse)
{
final HttpEntity entity = httpResponse.getEntity();
JsonReader reader = null;
try
{
final InputStream responseStream = entity.getContent();
reader = Json.createReader(responseStream);
return reader.readObject().getString("message");
}
catch (JSONException error)
{
LOGGER.error("Converting message body to JSON failed. Body: {}", httpResponse, error);
}
catch (ParseException | IOException error)
{
LOGGER.error("Parsing message body failed.", error);
}
finally
{
if (reader != null)
{
reader.close();
}
}
return null;
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -81,7 +81,7 @@ public abstract class BaseAPI
protected static final String UPDATE_METADATA_API = "{0}node/{1}/formprocessor";
protected static final String ACTIONS_API = "{0}actionQueue";
protected static final String RM_ACTIONS_API = "{0}rma/actions/ExecutionQueue";
protected static final String RM_SITE_ID = "rm";
public static final String RM_SITE_ID = "rm";
protected static final String SHARE_ACTION_API = "{0}internal/shared/share/workspace/SpacesStore/{1}";
private static final String SLINGSHOT_PREFIX = "alfresco/s/slingshot/";
@@ -702,6 +702,7 @@ public abstract class BaseAPI
public enum RM_ACTIONS
{
EDIT_DISPOSITION_DATE("editDispositionActionAsOfDate"),
END_RETENTION("retain"),
CUT_OFF("cutoff"),
UNDO_CUT_OFF("undoCutoff"),
TRANSFER("transfer"),

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -36,4 +36,10 @@ public class FilePlanComponentAspects
{
// aspect present on completed records
public static final String ASPECTS_COMPLETED_RECORD = "rma:declaredRecord";
// aspect present on record folders/categories with vital records
public static final String ASPECTS_VITAL_RECORD_DEFINITION= "rma:vitalRecordDefinition";
// aspect present on vital records
public static final String ASPECTS_VITAL_RECORD = "rma:vitalRecord";
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -82,6 +82,7 @@ public class FilePlanComponentFields
public static final String PROPERTIES_CLASSIFICATION = "sc:classification";
public static final String PROPERTIES_DATE_FILED = "rma:dateFiled";
public static final String PROPERTIES_ORIGINAL_NAME = "rma:origionalName";
public static final String PROPERTIES_REVIEW_AS_OF = "rma:reviewAsOf";
/** Electronic record properties */
public static final String PROPERTIES_VERSION_TYPE = "cm:versionType";

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -0,0 +1,56 @@
/*-
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2020 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.model.hold;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.alfresco.utility.model.TestModel;
/**
* POJO for hold entry
*
* @author Rodica Sutu
* @since 3.2
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties (ignoreUnknown = true)
public class HoldEntry extends TestModel
{
@JsonProperty (required = true)
private String name;
@JsonProperty (required = true)
private String nodeRef;
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -60,7 +60,11 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_PERIOD_EXPRESSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RESOLUTION_UNIT;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_REVIEW_AS_OF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_SHELF;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_SOFTWARE;
@@ -77,14 +81,13 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.rest.rm.community.model.common.Owner;
import org.alfresco.utility.model.TestModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.alfresco.rest.rm.community.model.common.Owner;
import org.alfresco.utility.model.TestModel;
/**
* POJO for record properties
@@ -237,4 +240,13 @@ public class RecordProperties extends TestModel
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS)
private String recordSearchDispositionInstructions;
@JsonProperty (PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD)
private String recordSearchVitalRecordReviewPeriod;
@JsonProperty (PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION)
private String recordSearchVitalRecordReviewPeriodExpression;
@JsonProperty(PROPERTIES_REVIEW_AS_OF)
private Date reviewAsOf;
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -33,6 +33,10 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IS_CLOSED;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_LOCATION;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields
.PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields
.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION;
@@ -120,4 +124,11 @@ public class RecordFolderProperties extends TestModel
@JsonProperty (PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION)
private String recordSearchVitalRecordReviewPeriodExpression;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY)
private String recordSearchDispositionAuthority;
@JsonProperty (PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS)
private String recordSearchDispositionInstructions;
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -45,7 +45,7 @@ public class RuleDefinition
private String contentTitle;
private String contentDescription;
private String rejectReason;
private List<ActionsOnRule> actions;
private List<String> actions;
/**
* Creates a new object of type Rule Definition
@@ -189,15 +189,15 @@ public class RuleDefinition
return this;
}
public List<ActionsOnRule> getActions()
public List<String> getActions()
{
return actions;
}
public RuleDefinition actions(List<ActionsOnRule> actions)
public RuleDefinition actions(List<String> actions)
{
this.actions = actions;
return this;
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -29,6 +29,7 @@ package org.alfresco.rest.rm.community.model.unfiledcontainer;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER;
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.alfresco.utility.model.TestModel;
@@ -50,6 +51,7 @@ import lombok.NoArgsConstructor;
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties (ignoreUnknown = true)
public class UnfiledContainerProperties extends TestModel
{
/*************************/

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -41,14 +41,14 @@ import lombok.Setter;
* @author Tuna Aksoy
* @since 2.6
*/
public abstract class RMModelRequest extends ModelRequest<RMModelRequest>
public abstract class RMModelRequest<Request> extends ModelRequest<Request>
{
@Getter (value = PROTECTED)
@Setter (value = PRIVATE)
private RMRestWrapper rmRestWrapper;
/**
* @param restWrapper
* @param rmRestWrapper
*/
public RMModelRequest(RMRestWrapper rmRestWrapper)
{

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -29,10 +29,11 @@ package org.alfresco.rest.rm.community.requests.gscore;
import static java.lang.Integer.parseInt;
import static java.lang.String.format;
import com.jayway.restassured.RestAssured;
import io.restassured.RestAssured;
import org.alfresco.rest.core.RMRestProperties;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.requests.gscore.api.ActionsExecutionAPI;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import org.alfresco.rest.rm.community.requests.gscore.api.FilePlanAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.FilesAPI;
@@ -179,4 +180,14 @@ public class GSCoreAPI extends RMModelRequest
{
return new RMUserAPI(getRmRestWrapper());
}
/**
* Provides DSL for ActionExecution API
*
* @return {@link ActionsExecutionAPI}
*/
public ActionsExecutionAPI usingActionsExecutionsAPI()
{
return new ActionsExecutionAPI(getRmRestWrapper());
}
}

View File

@@ -0,0 +1,78 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2020 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.requests.gscore.api;
import com.google.common.collect.ImmutableMap;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.rules.ActionsOnRule;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import org.alfresco.utility.model.RepoTestModel;
import org.json.JSONObject;
/**
* Produces processed results from Core Actions API calls
*
* @author Claudia Agache
* @since 3.1
*/
public class ActionsExecutionAPI extends RMModelRequest
{
/**
* @param rmRestWrapper RM REST Wrapper
*/
public ActionsExecutionAPI(RMRestWrapper rmRestWrapper)
{
super(rmRestWrapper);
}
/**
* Declares and files a document as record to a record folder using v1 actions api
*
* @param targetNode the node on which the action is executed
* @param destinationPath the path to the record folder
* @throws Exception
*/
public JSONObject declareAndFile(RepoTestModel targetNode, String destinationPath) throws Exception
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.DECLARE_AS_RECORD.getActionValue(), targetNode,
ImmutableMap.of("path", destinationPath));
}
/**
* Declares a document as record using v1 actions api
*
* @param targetNode the node on which the action is executed
* @throws Exception
*/
public JSONObject declareAsRecord(RepoTestModel targetNode) throws Exception
{
return getRmRestWrapper().withCoreAPI().usingActions()
.executeAction(ActionsOnRule.DECLARE_AS_RECORD.getActionValue(), targetNode);
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -54,7 +54,7 @@ public class FilePlanAPI extends RMModelRequest
/**
* Constructor.
*
* @param restWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public FilePlanAPI(RMRestWrapper rmRestWrapper)
{
@@ -77,7 +77,7 @@ public class FilePlanAPI extends RMModelRequest
* @param filePlanId The identifier of a file plan
* @param parameters The URL parameters to add
* @return The {@link FilePlan} for the given {@code filePlanId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code filePlanId} is not a valid format</li>
* <li>authentication fails</li>
@@ -113,7 +113,7 @@ public class FilePlanAPI extends RMModelRequest
* @param filePlanId The identifier of a file plan
* @param parameters The URL parameters to add
* @return The {@link RecordCategoryCollection} for the given {@code filePlanId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code filePlanId}</li>
@@ -177,7 +177,7 @@ public class FilePlanAPI extends RMModelRequest
/**
* see {@link #updateFilePlan(FilePlan, String, String)
*/
public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId) throws Exception
public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId)
{
mandatoryObject("filePlanModel", filePlanModel);
mandatoryString("filePlanId", filePlanId);
@@ -191,7 +191,7 @@ public class FilePlanAPI extends RMModelRequest
* @param filePlanModel The file plan model which holds the information
* @param filePlanId The identifier of the file plan
* @param parameters The URL parameters to add
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code filePlanId} is not a valid format or {@code filePlanModel} is invalid</li>
* <li>authentication fails</li>
@@ -200,7 +200,7 @@ public class FilePlanAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters) throws Exception
public FilePlan updateFilePlan(FilePlan filePlanModel, String filePlanId, String parameters)
{
mandatoryObject("filePlanModel", filePlanModel);
mandatoryString("filePlanId", filePlanId);

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -41,10 +41,12 @@ import org.alfresco.rest.rm.community.requests.RMModelRequest;
* @author Kristijan Conkas
* @since 2.6
*/
public class FilesAPI extends RMModelRequest
public class FilesAPI extends RMModelRequest<FilesAPI>
{
public static final String PARENT_ID_PARAM = "parentId";
/**
* @param rmRestWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public FilesAPI(RMRestWrapper rmRestWrapper)
{
@@ -55,11 +57,10 @@ public class FilesAPI extends RMModelRequest
* Declare file as record
*
* @param fileId The Id of a file to declare as record
* @param parameters Request parameters, refer to API documentation for more details
* @return The {@link Record} for created record
* @throws Exception for malformed JSON responses
* @throws RuntimeException for malformed JSON responses
*/
public Record declareAsRecord(String fileId, String parameters) throws Exception
public Record declareAsRecord(String fileId)
{
mandatoryString("fileId", fileId);
@@ -67,22 +68,8 @@ public class FilesAPI extends RMModelRequest
POST,
"/files/{fileId}/declare?{parameters}",
fileId,
parameters
getRmRestWrapper().getParameters()
));
}
/**
* A no-parameter version of {@link FilesAPI#declareAsRecord}
*
* @param fileId The Id of a file to declare as record
* @return The {@link Record} for created record
* @throws Exception for malformed JSON responses
*/
public Record declareAsRecord(String fileId) throws Exception
{
mandatoryString("fileId", fileId);
return declareAsRecord(fileId, EMPTY);
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -62,7 +62,7 @@ public class RMSiteAPI extends RMModelRequest
* Get the RM site
*
* @return The {@link RMSite} for the given file plan component id
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li>
* <li>Api Response code 401 If authentication failed</li>
@@ -70,7 +70,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error</li>
* </ul>
*/
public RMSite getSite() throws Exception
public RMSite getSite()
{
return getRmRestWrapper().processModel(RMSite.class, simpleRequest(
GET,
@@ -83,7 +83,7 @@ public class RMSiteAPI extends RMModelRequest
*
* @param rmSite The properties of the rm site to be created
* @return The {@link RMSite} with the given properties
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 Invalid parameter: title, or description exceed the maximum length; or siteBodyCreate invalid</li>
* <li>Api Response code 401 If authentication failed</
@@ -91,7 +91,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error</li>
* </ul>
*/
public RMSite createRMSite(RMSite rmSiteModel) throws Exception
public RMSite createRMSite(RMSite rmSiteModel)
{
mandatoryObject("rmSiteModel", rmSiteModel);
@@ -104,7 +104,7 @@ public class RMSiteAPI extends RMModelRequest
/**
* Delete RM site
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 Invalid parameter: DELETE request is supported only for the RM site</li>
* <li>Api Response code 401 If authentication failed</
@@ -113,7 +113,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error</li>
* </ul>
*/
public void deleteRMSite() throws Exception
public void deleteRMSite()
{
getRmRestWrapper().processEmptyModel(simpleRequest(
DELETE,
@@ -126,7 +126,7 @@ public class RMSiteAPI extends RMModelRequest
*
* @param rmSiteProperties The properties to be updated
* @return The updated {@link RMSite}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 the update request is invalid {@code rmSiteModel} is invalid</li>
* <li>Api Response code 401 If authentication fails</li>
@@ -135,7 +135,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error,model integrity exception</li>
* </ul>
*/
public RMSite updateRMSite(RMSite rmSiteModel) throws Exception
public RMSite updateRMSite(RMSite rmSiteModel)
{
mandatoryObject("rmSiteProperties", rmSiteModel);
@@ -150,7 +150,7 @@ public class RMSiteAPI extends RMModelRequest
* Checks if the RM site exists or not
*
* @return <code>true</code> if the RM site exists, <code>false</code> otherwise
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li>
* <li>Api Response code 401 If authentication failed</li>
@@ -158,7 +158,7 @@ public class RMSiteAPI extends RMModelRequest
* <li>Api Response code default Unexpected error</li>
* </ul>
*/
public boolean existsRMSite() throws Exception
public boolean existsRMSite()
{
getSite();
return getRmRestWrapper().getStatusCode().equals(OK.toString());

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -26,17 +26,17 @@
*/
package org.alfresco.rest.rm.community.requests.gscore.api;
import static com.jayway.restassured.RestAssured.basic;
import static com.jayway.restassured.RestAssured.given;
import static org.jglue.fluentjson.JsonBuilderFactory.buildObject;
import static org.springframework.http.HttpStatus.OK;
import com.google.gson.JsonObject;
import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.http.ContentType;
import com.jayway.restassured.response.Response;
import com.jayway.restassured.specification.RequestSpecification;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
import io.restassured.response.Response;
import io.restassured.specification.RequestSpecification;
import static io.restassured.RestAssured.basic;
import static io.restassured.RestAssured.given;
import org.alfresco.dataprep.AlfrescoHttpClient;
import org.alfresco.dataprep.AlfrescoHttpClientFactory;
@@ -59,7 +59,7 @@ import org.alfresco.utility.model.UserModel;
public class RMUserAPI extends RMModelRequest
{
/**
* @param rmRestWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public RMUserAPI(RMRestWrapper rmRestWrapper)
{
@@ -87,6 +87,7 @@ public class RMUserAPI extends RMModelRequest
*
* @param userName User's username
* @param userRole User's RM role, one of {@link UserRoles} roles
* @throws RuntimeException for failed requests
*/
public void assignRoleToUser(String userName, String userRole)
{
@@ -131,7 +132,7 @@ public class RMUserAPI extends RMModelRequest
JsonObject bodyJson = buildObject()
.addArray("permissions")
.addObject()
.add("authority", (user != null ? user.getUsername() : null))
.add("authority", user.getUsername())
.add("role", permission.permissionId)
.end()
.getJson();

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -54,7 +54,7 @@ public class RecordCategoryAPI extends RMModelRequest
/**
* Constructor.
*
* @param restWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public RecordCategoryAPI(RMRestWrapper rmRestWrapper)
{
@@ -65,7 +65,7 @@ public class RecordCategoryAPI extends RMModelRequest
* Deletes a record category.
*
* @param recordCategoryId The identifier of a record category
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordCategoryId} is not a valid format</li>
* <li>authentication fails</li>
@@ -101,7 +101,7 @@ public class RecordCategoryAPI extends RMModelRequest
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @return The {@link RecordCategory} for the given {@code recordCategoryId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordCategoryId} is not a valid format</li>
* <li>authentication fails</li>
@@ -124,7 +124,7 @@ public class RecordCategoryAPI extends RMModelRequest
/**
* see {@link #updateRecordCategory(RecordCategory, String, String)
*/
public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId) throws Exception
public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId)
{
mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("recordCategoryId", recordCategoryId);
@@ -139,7 +139,7 @@ public class RecordCategoryAPI extends RMModelRequest
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @param returns The updated {@link RecordCategory}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code recordCategoryId} is not a valid format or {@code recordCategoryModel} is invalid</li>
* <li>authentication fails</li>
@@ -149,7 +149,7 @@ public class RecordCategoryAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters) throws Exception
public RecordCategory updateRecordCategory(RecordCategory recordCategoryModel, String recordCategoryId, String parameters)
{
mandatoryObject("recordCategoryModel", recordCategoryModel);
mandatoryString("recordCategoryId", recordCategoryId);
@@ -179,7 +179,7 @@ public class RecordCategoryAPI extends RMModelRequest
* @param recordCategoryId The identifier of a record category
* @param parameters The URL parameters to add
* @return The {@link RecordCategoryChildCollection} for the given {@code recordCategoryId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code recordCategoryId}</li>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -45,8 +45,8 @@ import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.http.ContentType;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.record.Record;
@@ -66,7 +66,7 @@ public class RecordFolderAPI extends RMModelRequest
/**
* Constructor.
*
* @param restWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public RecordFolderAPI(RMRestWrapper rmRestWrapper)
{
@@ -77,7 +77,7 @@ public class RecordFolderAPI extends RMModelRequest
* Deletes a record folder.
*
* @param recordFolderId The identifier of a record folder
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordFolderId} is not a valid format</li>
* <li>authentication fails</li>
@@ -113,7 +113,7 @@ public class RecordFolderAPI extends RMModelRequest
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @return The {@link RecordFolder} for the given {@code recordFolderId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordFolderId} is not a valid format</li>
* <li>authentication fails</li>
@@ -136,7 +136,7 @@ public class RecordFolderAPI extends RMModelRequest
/**
* see {@link #updateRecordFolder(RecordFolder, String, String)
*/
public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId) throws Exception
public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId)
{
mandatoryObject("recordFolderModel", recordFolderModel);
mandatoryString("recordFolderId", recordFolderId);
@@ -151,7 +151,7 @@ public class RecordFolderAPI extends RMModelRequest
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @param returns The updated {@link RecordFolder}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code recordFolderId} is not a valid format or {@code recordFolderModel} is invalid</li>
* <li>authentication fails</li>
@@ -161,7 +161,7 @@ public class RecordFolderAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId, String parameters) throws Exception
public RecordFolder updateRecordFolder(RecordFolder recordFolderModel, String recordFolderId, String parameters)
{
mandatoryObject("recordFolderModel", recordFolderModel);
mandatoryString("recordFolderId", recordFolderId);
@@ -191,7 +191,7 @@ public class RecordFolderAPI extends RMModelRequest
* @param recordFolderId The identifier of a record folder
* @param parameters The URL parameters to add
* @return The {@link RecordFolderCollection} for the given {@code recordFolderId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code recordFolderId}</li>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -37,13 +37,14 @@ import static org.springframework.http.HttpMethod.GET;
import static org.springframework.http.HttpMethod.POST;
import static org.springframework.http.HttpMethod.PUT;
import com.jayway.restassured.response.ResponseBody;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.record.Record;
import org.alfresco.rest.rm.community.model.record.RecordBodyFile;
import org.alfresco.rest.rm.community.requests.RMModelRequest;
import io.restassured.response.ResponseBody;
/**
* Records REST API Wrapper
*
@@ -53,7 +54,7 @@ import org.alfresco.rest.rm.community.requests.RMModelRequest;
public class RecordsAPI extends RMModelRequest
{
/**
* @param rmRestWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public RecordsAPI(RMRestWrapper rmRestWrapper)
{
@@ -65,7 +66,7 @@ public class RecordsAPI extends RMModelRequest
*
* @param recordId The id of the electronic record
* @return {@link ResponseBody} representing content for the given record id
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordId} has no content</li>
* <li> {@code recordId} is not a valid format, or is not a record</li>
@@ -73,7 +74,7 @@ public class RecordsAPI extends RMModelRequest
* <li>{@code recordId} does not exist</li>
* </ul>
*/
public ResponseBody<?> getRecordContent(String recordId) throws Exception
public ResponseBody<?> getRecordContent(String recordId)
{
mandatoryString("recordId", recordId);
@@ -89,7 +90,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordBodyFile The properties where to file the record
* @param recordId The id of the record to file
* @return The {@link Record} with the given properties
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li>
* <li>authentication fails</li>
@@ -100,7 +101,7 @@ public class RecordsAPI extends RMModelRequest
* </ul>
*
*/
public Record fileRecord(RecordBodyFile recordBodyFile, String recordId) throws Exception
public Record fileRecord(RecordBodyFile recordBodyFile, String recordId)
{
mandatoryObject("recordBodyFile", recordBodyFile);
mandatoryString("recordId", recordId);
@@ -114,7 +115,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordBodyFile The properties where to file the record
* @param recordId The id of the record to file
* @return The {@link Record} with the given properties
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li>
* <li>authentication fails</li>
@@ -125,7 +126,7 @@ public class RecordsAPI extends RMModelRequest
* </ul>
*
*/
public Record fileRecord(RecordBodyFile recordBodyFile, String recordId, String parameters) throws Exception
public Record fileRecord(RecordBodyFile recordBodyFile, String recordId, String parameters)
{
mandatoryObject("requestBodyFile", recordBodyFile);
mandatoryString("recordId", recordId);
@@ -142,7 +143,7 @@ public class RecordsAPI extends RMModelRequest
/**
* see {@link #completeRecord(String, String)
*/
public Record completeRecord(String recordId) throws Exception
public Record completeRecord(String recordId)
{
mandatoryString("recordId", recordId);
@@ -154,7 +155,7 @@ public class RecordsAPI extends RMModelRequest
*
* @param recordId The id of the record to complete
* @return The completed {@link Record} with the given properties
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>Invalid parameter: {@code recordId} is not a record</li>
* <li>authentication fails</li>
@@ -164,7 +165,7 @@ public class RecordsAPI extends RMModelRequest
* <li>model integrity exception: the record has missing meta-data</li>
* </ul>
*/
public Record completeRecord(String recordId, String parameters) throws Exception
public Record completeRecord(String recordId, String parameters)
{
mandatoryString("recordId", recordId);
@@ -179,7 +180,7 @@ public class RecordsAPI extends RMModelRequest
* Deletes a record.
*
* @param recordId The identifier of a record
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordId} is not a valid format</li>
* <li>authentication fails</li>
@@ -215,7 +216,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordId The identifier of a record
* @param parameters The URL parameters to add
* @return The {@link Record} for the given {@code recordId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code recordId} is not a valid format</li>
* <li>authentication fails</li>
@@ -238,7 +239,7 @@ public class RecordsAPI extends RMModelRequest
/**
* see {@link #updateRecord(Record, String, String)
*/
public Record updateRecord(Record recordModel, String recordId) throws Exception
public Record updateRecord(Record recordModel, String recordId)
{
mandatoryObject("recordModel", recordModel);
mandatoryString("recordId", recordId);
@@ -253,7 +254,7 @@ public class RecordsAPI extends RMModelRequest
* @param recordId The identifier of a record
* @param parameters The URL parameters to add
* @return The updated {@link Record}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code recordId} is not a valid format or {@code recordModel} is invalid</li>
* <li>authentication fails</li>
@@ -263,7 +264,7 @@ public class RecordsAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public Record updateRecord(Record recordModel, String recordId, String parameters) throws Exception
public Record updateRecord(Record recordModel, String recordId, String parameters)
{
mandatoryObject("recordModel", recordModel);
mandatoryString("recordId", recordId);

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -46,7 +46,7 @@ import org.alfresco.rest.rm.community.requests.RMModelRequest;
public class TransferAPI extends RMModelRequest
{
/**
* @param rmRestWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public TransferAPI(RMRestWrapper rmRestWrapper)
{
@@ -69,7 +69,7 @@ public class TransferAPI extends RMModelRequest
* @param transferId The identifier of a transfer
* @param parameters The URL parameters to add
* @return The {@link Transfer} for the given {@code transferId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code transferId} is not a valid format</li>
* <li>authentication fails</li>
@@ -104,7 +104,7 @@ public class TransferAPI extends RMModelRequest
* @param transferId The identifier of a transfer
* @param parameters The URL parameters to add
* @return The {@link TransferChildCollection} for the given {@code transferId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code transferId}</li>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -50,7 +50,7 @@ import org.alfresco.rest.rm.community.requests.RMModelRequest;
public class TransferContainerAPI extends RMModelRequest
{
/**
* @param rmRestWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public TransferContainerAPI(RMRestWrapper rmRestWrapper)
{
@@ -73,7 +73,7 @@ public class TransferContainerAPI extends RMModelRequest
* @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add
* @return The {@link TransferContainer} for the given {@code transferContainerId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code transferContainerId} is not a valid format</li>
* <li>authentication fails</li>
@@ -96,7 +96,7 @@ public class TransferContainerAPI extends RMModelRequest
/**
* see {@link #updateTransferContainer(TransferContainer, String, String)
*/
public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId) throws Exception
public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId)
{
mandatoryObject("transferContainerModel", transferContainerModel);
mandatoryString("transferContainerId", transferContainerId);
@@ -111,7 +111,7 @@ public class TransferContainerAPI extends RMModelRequest
* @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add
* @param returns The updated {@link TransferContainer}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code transferContainerId} is not a valid format or {@code transferContainerModel} is invalid</li>
* <li>authentication fails</li>
@@ -121,7 +121,7 @@ public class TransferContainerAPI extends RMModelRequest
* <li>model integrity exception, including transfer container name with invalid characters</li>
* </ul>
*/
public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId, String parameters) throws Exception
public TransferContainer updateTransferContainer(TransferContainer transferContainerModel, String transferContainerId, String parameters)
{
mandatoryObject("transferContainerModel", transferContainerModel);
mandatoryString("transferContainerId", transferContainerId);
@@ -151,7 +151,7 @@ public class TransferContainerAPI extends RMModelRequest
* @param transferContainerId The identifier of a transfer container
* @param parameters The URL parameters to add
* @return The {@link TransferCollection} for the given {@code transferContainerId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code transferContainerId}</li>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -39,12 +39,14 @@ import static org.springframework.http.HttpMethod.PUT;
import static org.testng.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.http.ContentType;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainer;
@@ -63,7 +65,7 @@ import org.alfresco.rest.rm.community.util.UnfiledContainerChildMixin;
public class UnfiledContainerAPI extends RMModelRequest
{
/**
* @param rmRestWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public UnfiledContainerAPI(RMRestWrapper rmRestWrapper)
{
@@ -86,7 +88,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of a unfiled record container
* @param parameters The URL parameters to add
* @return The {@link UnfiledContainer} for the given {@code unfiledContainerId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledContainerId} is not a valid format</li>
* <li>authentication fails</li>
@@ -122,7 +124,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of an unfiled records container
* @param parameters The URL parameters to add
* @return The {@link UnfiledContainerChildCollection} for the given {@code unfiledContainerId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code unfiledContainerId}</li>
@@ -144,7 +146,7 @@ public class UnfiledContainerAPI extends RMModelRequest
/**
* see {@link #createUnfiledContainerChild(UnfiledContainerChild, String, String)}
*/
public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId) throws Exception
public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId)
{
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
@@ -159,7 +161,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of an unfiled container
* @param parameters The URL parameters to add
* @return The created {@link UnfiledContainerChild}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledContainerId} is not a valid format or {@code unfiledContainerChildModel} is invalid</li>
* <li>authentication fails</li>
@@ -169,7 +171,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* <li>model integrity exception, including node name with invalid characters</li>
* </ul>
*/
public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, String parameters) throws Exception
public UnfiledContainerChild createUnfiledContainerChild(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, String parameters)
{
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
@@ -190,9 +192,9 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerChildContent {@link File} pointing to the content of the electronic record to be created
* @param unfiledContainerId The identifier of a unfiled container
* @return newly created {@link UnfiledContainerChild}
* @throws Exception for invalid recordModel JSON strings
* @throws RuntimeException for invalid recordModel JSON strings
*/
public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, File unfiledContainerChildContent) throws Exception
public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, File unfiledContainerChildContent)
{
mandatoryObject("unfiledContainerChildModel", unfiledContainerChildModel);
mandatoryObject("unfiledContainerChildContent", unfiledContainerChildContent);
@@ -208,7 +210,15 @@ public class UnfiledContainerAPI extends RMModelRequest
* to the request.
*/
RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec();
JsonNode root = new ObjectMapper().readTree(toJson(unfiledContainerChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
JsonNode root;
try
{
root = new ObjectMapper().readTree(toJson(unfiledContainerChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
}
catch (IOException e)
{
throw new RuntimeException("Failed to convert model to JSON.", e);
}
// add request fields
Iterator<String> fieldNames = root.fieldNames();
while (fieldNames.hasNext())
@@ -225,7 +235,7 @@ public class UnfiledContainerAPI extends RMModelRequest
/**
* see {@link #updateUnfiledContainer(UnfiledContainer, String, String)
*/
public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId) throws Exception
public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId)
{
mandatoryObject("unfiledContainerModel", unfiledContainerModel);
mandatoryString("unfiledContainerId", unfiledContainerId);
@@ -240,7 +250,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* @param unfiledContainerId The identifier of an unfiled record container
* @param parameters The URL parameters to add
* @param returns The updated {@link UnfiledContainer}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code unfiledContainerId} is not a valid format or {@code unfiledContainerModel} is invalid</li>
* <li>authentication fails</li>
@@ -250,7 +260,7 @@ public class UnfiledContainerAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId, String parameters) throws Exception
public UnfiledContainer updateUnfiledContainer(UnfiledContainer unfiledContainerModel, String unfiledContainerId, String parameters)
{
mandatoryObject("unfiledContainerModel", unfiledContainerModel);
mandatoryString("unfiledContainerId", unfiledContainerId);

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -40,12 +40,13 @@ import static org.springframework.http.HttpMethod.PUT;
import static org.testng.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.http.ContentType;
import io.restassured.builder.RequestSpecBuilder;
import io.restassured.http.ContentType;
import org.alfresco.rest.core.RMRestWrapper;
import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild;
@@ -63,7 +64,7 @@ import org.alfresco.rest.rm.community.util.UnfiledContainerChildMixin;
public class UnfiledRecordFolderAPI extends RMModelRequest
{
/**
* @param rmRestWrapper
* @param rmRestWrapper RM REST Wrapper
*/
public UnfiledRecordFolderAPI(RMRestWrapper rmRestWrapper)
{
@@ -86,7 +87,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of a unfiled record folder
* @param parameters The URL parameters to add
* @return The {@link UnfiledRecordFolder} for the given {@code unfiledRecordFolderId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledRecordFolderId} is not a valid format</li>
* <li>authentication fails</li>
@@ -122,7 +123,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of an unfiled records folder
* @param parameters The URL parameters to add
* @return The {@link UnfiledRecordFolderChildCollection} for the given {@code unfiledRecordFolderId}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>authentication fails</li>
* <li>current user does not have permission to read {@code unfiledRecordFolderId}</li>
@@ -144,7 +145,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
/**
* see {@link #createUnfiledRecordFolderChild(UnfiledContainerChild, String, String)}
*/
public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId) throws Exception
public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId)
{
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -159,7 +160,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of an unfiled folder
* @param parameters The URL parameters to add
* @return The created {@link UnfiledRecordFolderChild}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderChildModel} is invalid</li>
* <li>authentication fails</li>
@@ -169,7 +170,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* <li>model integrity exception, including node name with invalid characters</li>
* </ul>
*/
public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, String parameters) throws Exception
public UnfiledContainerChild createUnfiledRecordFolderChild(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, String parameters)
{
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -190,9 +191,9 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderChildContent {@link File} pointing to the content of the electronic record to be created
* @param unfiledRecordFolderId The identifier of a unfiled record folder
* @return newly created {@link UnfiledContainerChild}
* @throws Exception for invalid recordModel JSON strings
* @throws RuntimeException for invalid recordModel JSON strings
*/
public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent) throws Exception
public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent)
{
mandatoryObject("unfiledRecordFolderChildModel", unfiledRecordFolderChildModel);
mandatoryObject("unfiledRecordFolderChildContent", unfiledRecordFolderChildContent);
@@ -208,7 +209,15 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* to the request.
*/
RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec();
JsonNode root = new ObjectMapper().readTree(toJson(unfiledRecordFolderChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
JsonNode root;
try
{
root = new ObjectMapper().readTree(toJson(unfiledRecordFolderChildModel, UnfiledContainerChild.class, UnfiledContainerChildMixin.class));
}
catch (IOException e)
{
throw new RuntimeException("Failed to convert model to JSON.", e);
}
// add request fields
Iterator<String> fieldNames = root.fieldNames();
while (fieldNames.hasNext())
@@ -225,7 +234,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
/**
* see {@link #updateUnfiledRecordFolder(UnfiledRecordFolder, String, String)
*/
public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId) throws Exception
public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId)
{
mandatoryObject("unfiledRecordFolderModel", unfiledRecordFolderModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -240,7 +249,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* @param unfiledRecordFolderId The identifier of an unfiled record folder
* @param parameters The URL parameters to add
* @param returns The updated {@link UnfiledRecordFolder}
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>the update request is invalid or {@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderModel} is invalid</li>
* <li>authentication fails</li>
@@ -250,7 +259,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* <li>model integrity exception, including file name with invalid characters</li>
* </ul>
*/
public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId, String parameters) throws Exception
public UnfiledRecordFolder updateUnfiledRecordFolder(UnfiledRecordFolder unfiledRecordFolderModel, String unfiledRecordFolderId, String parameters)
{
mandatoryObject("unfiledRecordFolderModel", unfiledRecordFolderModel);
mandatoryString("unfiledRecordFolderId", unfiledRecordFolderId);
@@ -268,7 +277,7 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
* Deletes an unfiled record folder.
*
* @param unfiledRecordFolderId The identifier of a unfiled record folder
* @throws Exception for the following cases:
* @throws RuntimeException for the following cases:
* <ul>
* <li>{@code unfiledRecordFolderId} is not a valid format</li>
* <li>authentication fails</li>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -0,0 +1,142 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2020 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.util;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.command.LogContainerCmd;
import com.github.dockerjava.api.model.Container;
import com.github.dockerjava.api.model.Frame;
import com.github.dockerjava.core.DockerClientBuilder;
import com.github.dockerjava.core.command.LogContainerResultCallback;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang.SystemUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
/**
* Helper class for interaction with docker containers
*
* @author Claudia Agache
* @since 3.1
*/
@Service
public class DockerHelper
{
private static final Logger LOGGER = LoggerFactory.getLogger(DockerHelper.class);
private static final String REPO_IMAGE_NAME = "repository";
@Getter
@Setter
private DockerClient dockerClient;
@Autowired
public DockerHelper(@Value ("${docker.host}") String dockerHost)
{
if (SystemUtils.IS_OS_WINDOWS)
{
this.dockerClient = DockerClientBuilder.getInstance(dockerHost).build();
}
else
{
this.dockerClient = DockerClientBuilder.getInstance().build();
}
}
/**
* Method for returning logs of docker container
*
* @param containerId - ID of the container
* @return list of strings, where every string is log line
*/
private List<String> getDockerLogs(String containerId)
{
final List<String> logs = new ArrayList<>();
// get the logs since current time - 10 seconds
final int timeStamp = (int) (System.currentTimeMillis() / 1000) - 10;
final LogContainerCmd logContainerCmd = getDockerClient().logContainerCmd(containerId);
logContainerCmd.withStdOut(true)
.withStdErr(true)
.withSince(timeStamp) // UNIX timestamp to filter logs. Output log-entries since that timestamp.
.withTimestamps(true); //print timestamps for every log line
try
{
logContainerCmd.exec(new LogContainerResultCallback()
{
@Override
public void onNext(Frame item)
{
logs.add(item.toString());
}
}).awaitCompletion();
}
catch (InterruptedException e)
{
Thread.currentThread().interrupt(); // set interrupt flag
LOGGER.error("Failed to retrieve logs of container " + containerId, e);
}
return logs;
}
/**
* Get the alfresco container logs
*
* @return list of strings, where every string is log line
*/
public List<String> getAlfrescoLogs()
{
final Optional<Container> alfrescoContainer = findContainerByImageName(REPO_IMAGE_NAME);
return (alfrescoContainer.isPresent()) ? getDockerLogs(alfrescoContainer.get().getId()) : Collections.emptyList();
}
/**
* Method for finding a docker container after the image name
*
* @param imageName - the name of the image used by container
* @return the container
*/
private Optional<Container> findContainerByImageName(String imageName)
{
final List<Container> containers = getDockerClient().listContainersCmd().withShowAll(true).exec();
return containers.stream()
.filter(container -> container.getImage().contains(imageName))
.findFirst();
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -0,0 +1,327 @@
/*-
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.v0;
import static org.alfresco.rest.core.v0.APIUtils.convertHTTPResponseToJSON;
import static org.apache.http.HttpStatus.SC_OK;
import static org.testng.AssertJUnit.assertNotNull;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import org.alfresco.rest.core.v0.APIUtils;
import org.alfresco.rest.core.v0.BaseAPI;
import org.alfresco.rest.rm.community.model.hold.HoldEntry;
import org.alfresco.rest.rm.community.util.PojoUtility;
import org.alfresco.utility.Utility;
import org.apache.chemistry.opencmis.client.api.CmisObject;
import org.apache.http.HttpResponse;
import org.apache.http.ParseException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.stereotype.Component;
/**
* Methods to make API requests using v0 API for generalized holds
*
* @author Rodica Sutu
* @since 3.2
*/
@Component
public class HoldsAPI extends BaseAPI
{
public static final String HOLDS_CONTAINER = "Holds";
/**
* The URI to create a hold
*/
private static final String CREATE_HOLDS_API = "{0}type/rma:hold/formprocessor";
/**
* The URI to add items to hold or to remove items from hold
*/
private static final String RM_HOLDS_API = "{0}rma/holds";
/**
* The URI to get holds.
*/
private static final String GET_RM_HOLDS = RM_HOLDS_API + "?{1}";
/**
* Util method to create a hold
*
* @param user the user creating the hold
* @param password the user's password
* @param holdName the hold name
* @param reason hold reason
* @param description hold description
* @return The HTTP response (or null if no POST call was needed).
*/
public HttpResponse createHold(String user, String password,
String holdName, String reason, String description)
{
// if the hold already exists don't try to create it again
final String fullHoldPath = Utility.buildPath(getFilePlanPath(), HOLDS_CONTAINER) + holdName;
final CmisObject hold = getObjectByPath(user, password, fullHoldPath);
if (hold != null)
{
return null;
}
// retrieve the Holds container nodeRef
final String parentNodeRef = getItemNodeRef(user, password, "/" + HOLDS_CONTAINER);
final JSONObject requestParams = new JSONObject();
requestParams.put("alf_destination", getNodeRefSpacesStore() + parentNodeRef);
requestParams.put("prop_cm_name", holdName);
requestParams.put("prop_cm_description", description);
requestParams.put("prop_rma_holdReason", reason);
// Make the POST request and throw an assertion error if it fails.
final HttpResponse httpResponse = doPostJsonRequest(user, password, SC_OK, requestParams, CREATE_HOLDS_API);
assertNotNull("Expected object to have been created at " + fullHoldPath,
getObjectByPath(user, password, fullHoldPath));
return httpResponse;
}
/**
* Create a hold and get the node ref of the hold from the response body
*
* @param user the user creating the hold
* @param password the user's password
* @param holdName the hold name to be created
* @param reason reason of the hold to be created
* @param description hold description
* @return node ref of the hold created
*/
public String createHoldAndGetNodeRef(String user, String password,
String holdName, String reason, String description)
{
final HttpResponse httpResponse = createHold(user, password, holdName, reason, description);
try
{
return convertHTTPResponseToJSON(httpResponse).getString("persistedObject")
.replace(NODE_REF_WORKSPACE_SPACES_STORE, "");
}
catch(JSONException error)
{
LOGGER.error("Converting message body to JSON failed. Body: {}", httpResponse, error);
}
catch(ParseException error)
{
LOGGER.error("Parsing message body failed.", error);
}
return null;
}
/**
* Deletes hold
*
* @param username user's username
* @param password its password
* @param holdName the hold name
* @throws AssertionError if the deletion was unsuccessful.
*/
public void deleteHold( String username, String password, String holdName)
{
deleteItem(username, password, String.format("/%s/%s", HOLDS_CONTAINER, holdName));
}
/**
* Adds item(content/record/record folder) to the hold
*
* @param user the user who adds the item to the hold
* @param password the user's password
* @param itemNodeRef the nodeRef of the item to be added to hold
* @param holdName the hold name
* @return The HTTP response
*/
public HttpResponse addItemToHold(String user, String password, String itemNodeRef, String holdName)
{
return addItemsToHolds(user, password, Collections.singletonList(itemNodeRef), Collections.singletonList(holdName));
}
/**
* Adds a list of items (content/record/record folder) to a list of holds
*
* @param user the user who adds the items to the holds
* @param password the user's password
* @param itemNodeRefs the list of items nodeRefs to be added to holds
* @param holdNames the list of holds
* @return The HTTP response
*/
public HttpResponse addItemsToHolds(String user, String password, List<String> itemNodeRefs, List<String> holdNames)
{
return addItemsToHolds(user, password, SC_OK, itemNodeRefs, holdNames);
}
/**
* Adds a list of items (content/record/record folder) to a list of holds
*
* @param user the user who adds the items to the holds
* @param password the user's password
* @param itemNodeRefs the list of items nodeRefs to be added to holds
* @param holdNames the list of holds
* @return The HTTP response
*/
public HttpResponse addItemsToHolds(String user, String password, int expectedStatus, List<String> itemNodeRefs,
List<String> holdNames)
{
final JSONObject requestParams = addOrRemoveToFromHoldJsonObject(user, password, itemNodeRefs, holdNames);
return doPostJsonRequest(user, password, expectedStatus, requestParams, RM_HOLDS_API);
}
/**
* Util method to add item(content/record/record folder) to the hold and get the error message
*
* @param user the user who adds the item to the hold
* @param password the user's password
* @param itemNodeRef the nodeRef of the item to be added to hold
* @param holdName the hold name
* @return The error message
*/
public String addToHoldAndGetMessage(String user, String password, int expectedStatus, String itemNodeRef, String
holdName)
{
final HttpResponse httpResponse = addItemsToHolds(user, password, expectedStatus, Collections.singletonList(itemNodeRef),
Collections.singletonList(holdName));
return APIUtils.extractErrorMessageFromHttpResponse(httpResponse);
}
/**
* Util method to create the request body used when adding items to holds or when removing items from holds
*
* @param user user to create the request body for add/remove an item to/from hold
* @param password the user's password
* @param items list of items node refs to be added to holds
* @param holdNames list of hold names for add/remove items
* @return JSONObject fo
*/
private JSONObject addOrRemoveToFromHoldJsonObject(String user, String password, List<String> items, List<String> holdNames)
{
final JSONArray nodeRefs = new JSONArray();
items.forEach(itemNodeRef -> nodeRefs.put(getNodeRefSpacesStore() + itemNodeRef));
final List<String> holdNodeRefs = holdNames.stream().map(hold ->
getNodeRefSpacesStore() + getItemNodeRef(user, password, String.format("/%s/%s", HOLDS_CONTAINER, hold)))
.collect(Collectors.toList());
final JSONArray holds = new JSONArray();
holdNodeRefs.forEach(holds::put);
final JSONObject requestParams = new JSONObject();
requestParams.put("nodeRefs", nodeRefs);
requestParams.put("holds", holds);
return requestParams;
}
/**
* Remove item(content/record/record folder) from hold
*
* @param user the user who removes the item from the hold
* @param password the user's password
* @param itemNodeRef the nodeRef of the item to be removed from hold
* @param holdName the hold name
* @return The HTTP response
*/
public HttpResponse removeItemFromHold(String user, String password, String itemNodeRef, String holdName)
{
return removeItemsFromHolds(user, password, Collections.singletonList(itemNodeRef), Collections.singletonList(holdName));
}
/**
* Remove a list of items (content/record/record folder) from a list of holds
*
* @param user the user who removes the item from the hold
* @param password the user's password
* @param itemNodeRefs the list of items nodeRefs to be removed from hold
* @param holdNames the list of hold names
* @return The HTTP response
*/
public HttpResponse removeItemsFromHolds(String user, String password, List<String> itemNodeRefs, List<String> holdNames)
{
return removeItemsFromHolds(user, password, SC_OK, itemNodeRefs, holdNames);
}
/**
* Remove a list of items (content/record/record folder) from a list of holds
*
* @param user the user who removes the item from the hold
* @param password the user's password
* @param expectedStatus https status code expected
* @param itemNodeRefs the list of items nodeRefs to be removed from hold
* @param holdNames the list of hold names
* @return The HTTP response
*/
public HttpResponse removeItemsFromHolds(String user, String password, int expectedStatus, List<String> itemNodeRefs,
List<String> holdNames)
{
final JSONObject requestParams = addOrRemoveToFromHoldJsonObject(user, password, itemNodeRefs, holdNames);
return doPutJsonRequest(user, password, expectedStatus, requestParams, RM_HOLDS_API);
}
/**
* Util method to remove item(content/record/record folder) from hold and get the error message
*
* @param user the user who removes the item from hold
* @param password the user's password
* @param itemNodeRef the nodeRef of the item to be removed from hold
* @param holdName the hold name
* @return The error message
*/
public String removeFromHoldAndGetMessage(String user, String password, int expectedStatus, String itemNodeRef, String
holdName)
{
final HttpResponse httpResponse = removeItemsFromHolds(user, password, expectedStatus, Collections.singletonList(itemNodeRef),
Collections.singletonList(holdName));
return APIUtils.extractErrorMessageFromHttpResponse(httpResponse);
}
/**
* Get the list of the available holds which have the item node reference if includedInHold parameter is true,
* otherwise a list of hold node references will be retrieved which do not include the given node reference.
*
* @param user The username of the user to use.
* @param password The password of the user.
* @param itemNodeRef The item node reference
* @param includedInHold True to retrieve the holds which have the item node reference
* @param fileOnly True if only files should be return
* @return return a list of hold entries
*/
public List<HoldEntry> getHolds(String user, String password, final String itemNodeRef,
final Boolean includedInHold, final Boolean fileOnly)
{
final String parameters = (itemNodeRef != null ? "itemNodeRef=" + NODE_REF_WORKSPACE_SPACES_STORE + itemNodeRef : "")
+ (includedInHold != null ? "&includedInHold=" + includedInHold : "")
+ (fileOnly != null ? "&fileOnly=" + fileOnly : "");
final JSONArray holdEntries = doGetRequest(user, password,
MessageFormat.format(GET_RM_HOLDS, "{0}", parameters)).getJSONObject("data").getJSONArray("holds");
return PojoUtility.jsonToObject(holdEntries, HoldEntry.class);
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -30,7 +30,7 @@ import static org.alfresco.dataprep.AlfrescoHttpClient.MIME_TYPE_JSON;
import static org.alfresco.rest.core.v0.APIUtils.ISO_INSTANT_FORMATTER;
import static org.apache.http.HttpStatus.SC_OK;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertNotNull;
import static org.testng.AssertJUnit.assertFalse;
import static org.testng.AssertJUnit.assertTrue;
import static org.testng.AssertJUnit.fail;
@@ -47,7 +47,6 @@ import org.alfresco.dataprep.AlfrescoHttpClientFactory;
import org.alfresco.dataprep.UserService;
import org.alfresco.rest.core.v0.BaseAPI;
import org.alfresco.rest.core.v0.RMEvents;
import org.alfresco.utility.Utility;
import org.apache.chemistry.opencmis.client.api.CmisObject;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.http.HttpResponse;
@@ -73,8 +72,6 @@ import org.springframework.stereotype.Component;
@Component
public class RMRolesAndActionsAPI extends BaseAPI
{
public static final String HOLDS_CONTAINER = "Holds";
/** The URI to view the configured roles and capabilities. */
private static final String RM_ROLES = "{0}rma/admin/rmroles";
/** The URI for REST requests about a particular configured role. */
@@ -84,9 +81,6 @@ public class RMRolesAndActionsAPI extends BaseAPI
// logger
private static final Logger LOGGER = LoggerFactory.getLogger(RMRolesAndActionsAPI.class);
private static final String MOVE_ACTIONS_API = "action/rm-move-to/site/rm/documentLibrary/{0}";
private static final String CREATE_HOLDS_API = "{0}type/rma:hold/formprocessor";
/** The URI to add items to hold.*/
private static final String RM_HOLDS_API = "{0}rma/holds";
/** http client factory */
@Autowired
@@ -106,8 +100,8 @@ public class RMRolesAndActionsAPI extends BaseAPI
public Set<String> getConfiguredRoles(String adminUser, String adminPassword)
{
// Using "is=true" includes the in-place readers and writers.
final JSONObject jsonObject = doGetRequest(adminUser, adminPassword, RM_ROLES + "?is=true").getJSONObject
("data");
final JSONObject jsonObject = doGetRequest(adminUser, adminPassword, RM_ROLES + "?is=true").getJSONObject(
"data");
return jsonObject.toMap().keySet();
}
@@ -121,12 +115,31 @@ public class RMRolesAndActionsAPI extends BaseAPI
*/
public Set<String> getCapabilitiesForRole(String adminUser, String adminPassword, String role)
{
final JSONObject jsonObject = doGetRequest(adminUser, adminPassword, RM_ROLES + "?is=true").getJSONObject
("data");
final JSONObject jsonObject = doGetRequest(adminUser, adminPassword, RM_ROLES + "?is=true").getJSONObject(
"data");
assertTrue("Could not find role '" + role + "' in " + jsonObject.keySet(), jsonObject.has(role));
return jsonObject.getJSONObject(role).getJSONObject("capabilities").keySet();
}
/**
* Creates the body for PUT/POST Roles API requests
*
* @param roleName the role name
* @param roleDisplayLabel a human-readable label for the role
* @param capabilities a list of capabilities for the role
* @return
*/
private JSONObject roleRequestBody(String roleName, String roleDisplayLabel, Set<String> capabilities)
{
final JSONObject requestBody = new JSONObject();
requestBody.put("name", roleName);
requestBody.put("displayLabel", roleDisplayLabel);
final JSONArray capabilitiesArray = new JSONArray();
capabilities.forEach(capabilitiesArray::put);
requestBody.put("capabilities", capabilitiesArray);
return requestBody;
}
/**
* Create a new RM role.
*
@@ -138,13 +151,8 @@ public class RMRolesAndActionsAPI extends BaseAPI
*/
public void createRole(String adminUser, String adminPassword, String roleName, String roleDisplayLabel, Set<String> capabilities)
{
final JSONObject requestBody = new JSONObject();
requestBody.put("name", roleName);
requestBody.put("displayLabel", roleDisplayLabel);
final JSONArray capabilitiesArray = new JSONArray();
capabilities.forEach(capabilitiesArray::put);
requestBody.put("capabilities", capabilitiesArray);
doPostJsonRequest(adminUser, adminPassword, HttpStatus.SC_OK, requestBody, RM_ROLES);
doPostJsonRequest(adminUser, adminPassword, HttpStatus.SC_OK, roleRequestBody(roleName, roleDisplayLabel, capabilities),
RM_ROLES);
}
/**
@@ -158,13 +166,8 @@ public class RMRolesAndActionsAPI extends BaseAPI
*/
public void updateRole(String adminUser, String adminPassword, String roleName, String roleDisplayLabel, Set<String> capabilities)
{
final JSONObject requestBody = new JSONObject();
requestBody.put("name", roleName);
requestBody.put("displayLabel", roleDisplayLabel);
final JSONArray capabilitiesArray = new JSONArray();
capabilities.forEach(capabilitiesArray::put);
requestBody.put("capabilities", capabilitiesArray);
doPutJsonRequest(adminUser, adminPassword, HttpStatus.SC_OK, requestBody, RM_ROLES_ROLE, roleName);
doPutJsonRequest(adminUser, adminPassword, HttpStatus.SC_OK, roleRequestBody(roleName, roleDisplayLabel, capabilities),
RM_ROLES_ROLE, roleName);
}
/**
@@ -177,8 +180,8 @@ public class RMRolesAndActionsAPI extends BaseAPI
public void deleteRole(String adminUser, String adminPassword, String roleName)
{
doDeleteRequest(adminUser, adminPassword, MessageFormat.format(RM_ROLES_ROLE, "{0}", roleName));
final boolean success = !getConfiguredRoles(adminUser, adminPassword).contains(roleName);
assertTrue("Failed to delete role " + roleName + " with " + adminUser, success);
assertFalse("Failed to delete role " + roleName + " with " + adminUser,
getConfiguredRoles(adminUser, adminPassword).contains(roleName));
}
/**
@@ -277,7 +280,7 @@ public class RMRolesAndActionsAPI extends BaseAPI
}
catch (JSONException | IOException e)
{
e.printStackTrace();
LOGGER.error(e.toString());
}
finally
{
@@ -315,16 +318,40 @@ public class RMRolesAndActionsAPI extends BaseAPI
}
/**
* Perform an action on the record folder
* Perform an action on the given content
*
* @param user the user executing the action
* @param password the user's password
* @param contentName the content name
* @return The HTTP response.
*/
public HttpResponse executeAction(String user, String password, String contentName, RM_ACTIONS rm_action)
public HttpResponse executeAction(String user, String password, String contentName, RM_ACTIONS action)
{
return executeAction(user, password, contentName, rm_action, null);
return executeAction(user, password, contentName, action, null);
}
/**
* Creates the body for Actions API requests
*
* @param user the user executing the action
* @param password the user's password
* @param contentName the content on which the action is executed
* @param action the action executed
* @param actionsParams the request parameters
* @return the JSONObject created
*/
private JSONObject actionsRequestBody(String user, String password, String contentName, RM_ACTIONS action,
JSONObject actionsParams)
{
final String recNodeRef = getNodeRefSpacesStore() + contentService.getNodeRef(user, password, RM_SITE_ID, contentName);
final JSONObject requestParams = new JSONObject();
requestParams.put("name", action.getAction());
requestParams.put("nodeRef", recNodeRef);
if (actionsParams != null)
{
requestParams.put("params", actionsParams);
}
return requestParams;
}
/**
@@ -338,19 +365,12 @@ public class RMRolesAndActionsAPI extends BaseAPI
*/
public HttpResponse executeAction(String user, String password, String contentName, RM_ACTIONS action, ZonedDateTime date)
{
String recNodeRef = getNodeRefSpacesStore() + contentService.getNodeRef(user, password, RM_SITE_ID, contentName);
JSONObject requestParams = new JSONObject();
requestParams.put("name", action.getAction());
requestParams.put("nodeRef", recNodeRef);
final JSONObject actionParams = new JSONObject();
if (date != null)
{
String thisMoment = date.format(ISO_INSTANT_FORMATTER);
requestParams.put("params", new JSONObject()
.put("asOfDate", new JSONObject()
.put("iso8601", thisMoment)
)
);
actionParams.put("asOfDate", new JSONObject().put("iso8601", ISO_INSTANT_FORMATTER.format(date)));
}
final JSONObject requestParams = actionsRequestBody(user, password, contentName, action, actionParams);
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
}
@@ -366,20 +386,14 @@ public class RMRolesAndActionsAPI extends BaseAPI
*/
public HttpResponse completeEvent(String user, String password, String nodeName, RMEvents event, Instant date)
{
String recNodeRef = getNodeRefSpacesStore() + contentService.getNodeRef(user, password, RM_SITE_ID, nodeName);
JSONObject requestParams = new JSONObject();
requestParams.put("name", RM_ACTIONS.COMPLETE_EVENT.getAction());
requestParams.put("nodeRef", recNodeRef);
date = (date != null) ? date : Instant.now();
String formattedDate = ISO_INSTANT_FORMATTER.format(date);
requestParams.put("params", new JSONObject()
.put("eventName", event.getEventName())
.put("eventCompletedBy", user)
.put("eventCompletedAt", new JSONObject()
.put("iso8601", formattedDate)
)
);
final JSONObject actionParams = new JSONObject().put("eventName", event.getEventName())
.put("eventCompletedBy", user)
.put("eventCompletedAt", new JSONObject()
.put("iso8601", ISO_INSTANT_FORMATTER.format(date))
);
final JSONObject requestParams = actionsRequestBody(user, password, nodeName, RM_ACTIONS.COMPLETE_EVENT,
actionParams);
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
}
@@ -394,13 +408,8 @@ public class RMRolesAndActionsAPI extends BaseAPI
*/
public HttpResponse undoEvent(String user, String password, String contentName, RMEvents event)
{
String recNodeRef = getNodeRefSpacesStore() + contentService.getNodeRef(user, password, RM_SITE_ID, contentName);
JSONObject requestParams = new JSONObject();
requestParams.put("name", RM_ACTIONS.UNDO_EVENT.getAction());
requestParams.put("nodeRef", recNodeRef);
requestParams.put("params", new JSONObject()
.put("eventName", event.getEventName()));
final JSONObject requestParams = actionsRequestBody(user, password, contentName, RM_ACTIONS.UNDO_EVENT,
new JSONObject().put("eventName", event.getEventName()));
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_ACTIONS_API);
}
@@ -419,82 +428,10 @@ public class RMRolesAndActionsAPI extends BaseAPI
{
item.delete();
}
boolean success = !(contentService.getFolderObject(contentService.getCMISSession(username, password), siteId, containerName).getChildren().getHasMoreItems());
assertTrue("Not all items were deleted from " + containerName, success);
assertFalse("Not all items were deleted from " + containerName,
contentService.getFolderObject(contentService.getCMISSession(username, password), siteId, containerName).getChildren().getHasMoreItems());
}
/**
* Deletes hold
*
* @param username user's username
* @param password its password
* @param holdName the hold name
* @throws AssertionError if the deletion was unsuccessful.
*/
public void deleteHold(String username, String password, String holdName)
{
deleteItem(username, password, "/Holds/" + holdName);
}
/**
* Util method to create a hold
*
* @param user the user creating the category
* @param password the user's password
* @param holdName the hold name
* @param reason hold reason
* @param description hold description
* @return The HTTP response (or null if no POST call was needed).
*/
public HttpResponse createHold(String user, String password, String holdName, String reason, String description)
{
// if the hold already exists don't try to create it again
final String holdsContainerPath = Utility.buildPath(getFilePlanPath(), HOLDS_CONTAINER);
final String fullHoldPath = holdsContainerPath + holdName;
final CmisObject hold = getObjectByPath(user, password, fullHoldPath);
if (hold != null)
{
return null;
}
// retrieve the Holds container nodeRef
final String parentNodeRef = getItemNodeRef(user, password, "/Holds");
final JSONObject requestParams = new JSONObject();
requestParams.put("alf_destination", getNodeRefSpacesStore() + parentNodeRef);
requestParams.put("prop_cm_name", holdName);
requestParams.put("prop_cm_description", description);
requestParams.put("prop_rma_holdReason", reason);
// Make the POST request and throw an assertion error if it fails.
final HttpResponse httpResponse = doPostJsonRequest(user, password, SC_OK, requestParams, CREATE_HOLDS_API);
assertNotNull("Expected object to have been created at " + fullHoldPath,
getObjectByPath(user, password, fullHoldPath));
return httpResponse;
}
/**
* Adds item (record/ record folder) to the hold
*
* @param user the user who adds the item to the hold
* @param password the user's password
* @param itemNodeRef the nodeRef of the item to be added to hold
* @param holdName the hold name
* @return The HTTP response
*/
public HttpResponse addItemToHold(String user, String password, String itemNodeRef, String holdName)
{
final JSONArray nodeRefs = new JSONArray().put(getNodeRefSpacesStore() + itemNodeRef);
final String holdNodeRef = getItemNodeRef(user, password, String.format("/%s/%s", HOLDS_CONTAINER, holdName));
final JSONArray holds = new JSONArray().put(getNodeRefSpacesStore() + holdNodeRef);
final JSONObject requestParams = new JSONObject();
requestParams.put("nodeRefs", nodeRefs);
requestParams.put("holds", holds);
return doPostJsonRequest(user, password, SC_OK, requestParams, RM_HOLDS_API);
}
/**
* Updates metadata, can be used on records, folders and categories
*

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -38,7 +38,6 @@ import java.util.List;
import java.util.stream.Collectors;
import org.alfresco.rest.core.v0.BaseAPI;
import org.alfresco.rest.rm.community.model.rules.ActionsOnRule;
import org.alfresco.rest.rm.community.model.rules.RuleDefinition;
import org.apache.http.HttpResponse;
import org.json.JSONArray;
@@ -251,10 +250,10 @@ public class RulesAPI extends BaseAPI
{
List<JSONObject> ruleActionsList = new ArrayList<>();
for (ActionsOnRule ruleAction : ruleProperties.getActions())
for (String ruleAction : ruleProperties.getActions())
{
JSONObject ruleActionObj = new JSONObject();
ruleActionObj.put("actionDefinitionName", ruleAction.getActionValue());
ruleActionObj.put("actionDefinitionName", ruleAction);
JSONObject parameters = new JSONObject();
if (ruleProperties.getPath() != null)
{

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2019 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
@@ -241,7 +241,6 @@ public class SearchAPI extends BaseAPI
* Helper method to extract list of names from search result.
*
* @param searchResult
* @param getProperties
* @return
*/
private List<String> getItemNames(JSONObject searchResult)
@@ -253,7 +252,8 @@ public class SearchAPI extends BaseAPI
* Helper method to extract list of property values from search result for the given nodeRef.
*
* @param searchResult
* @param getProperties
* @param nodeRef
* @param propertyName
* @return
*/
private String getItemProperty(JSONObject searchResult, String nodeRef, String propertyName)

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