mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	Compare commits
	
		
			475 Commits
		
	
	
		
			release/23
			...
			23.7.0.3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | e779057f23 | ||
|  | 49ee9f8f29 | ||
|  | 213886cedd | ||
|  | eceb7c0eb3 | ||
|  | 8cd46d4585 | ||
|  | 11d71e1941 | ||
|  | 353d50a35c | ||
|  | 2daafc711d | ||
|  | dfa94fbe21 | ||
|  | 4a93aec66b | ||
|  | 3f0bbc9844 | ||
|  | cb9ad42101 | ||
|  | ca385b3bbc | ||
|  | 19c1582f1e | ||
|  | 06a918b082 | ||
|  | f543de9959 | ||
|  | 8124279e6a | ||
|  | 4281fd5b2d | ||
|  | d10d88306b | ||
|  | 1d7a37cd8c | ||
|  | 4bcb795452 | ||
|  | 393b064918 | ||
|  | f741f2ca45 | ||
|  | ef676f11e4 | ||
|  | 478c81fee3 | ||
|  | cf9cc8042d | ||
|  | 8d790ed1cb | ||
|  | 87c7bd2877 | ||
|  | 9125f889b0 | ||
|  | 2fb74d2691 | ||
|  | d671162dae | ||
|  | bfaa629da7 | ||
|  | 719d73a558 | ||
|  | a2aa867f3f | ||
|  | 8d745c536a | ||
|  | b0f4c21ae3 | ||
|  | 72494e34fa | ||
|  | 792b7024ea | ||
|  | 40a1371f0d | ||
|  | c22c47e63f | ||
|  | 232299d42d | ||
|  | aca7969849 | ||
|  | 4ab2bbd3d6 | ||
|  | f68f02372d | ||
|  | 9b0eedc8c1 | ||
|  | f164dedcee | ||
|  | 9cdaa0a265 | ||
|  | ef034e596b | ||
|  | 1251081a69 | ||
|  | 2d16eb6f42 | ||
|  | e577134875 | ||
|  | 510eadd565 | ||
|  | 187646895c | ||
|  | f9515e336f | ||
|  | 828dd20576 | ||
|  | 3372e20c35 | ||
|  | 64b5cace27 | ||
|  | 83acf26cf4 | ||
|  | b3be0f2b7f | ||
|  | 7a6ebb9a05 | ||
|  | fa0f239618 | ||
|  | 43799408a8 | ||
|  | e7305006f0 | ||
|  | 40c30411af | ||
|  | 91f8b43237 | ||
|  | 6fccf828e1 | ||
|  | 3fac3373c9 | ||
|  | ee857ce1de | ||
|  | 483d7fab21 | ||
|  | 590209b299 | ||
|  | 376514df67 | ||
|  | 7144a2dd94 | ||
|  | b4da3d8c20 | ||
|  | 62de9ff0c0 | ||
|  | a11acce720 | ||
|  | 1128011e15 | ||
|  | d0cb45de0d | ||
|  | 2b48195896 | ||
|  | fbb95d6a7f | ||
|  | 502427e852 | ||
|  | 3ff2d79641 | ||
|  | f274b88ece | ||
|  | 21550ec30b | ||
|  | 8665267225 | ||
|  | 984b0bc719 | ||
|  | 5b89fc0be7 | ||
|  | bf3a3382fd | ||
|  | 14d007fae8 | ||
|  | 79317ddc9d | ||
|  | c0e762fe5e | ||
|  | 5109b99520 | ||
|  | dfc6306331 | ||
|  | 731f98921f | ||
|  | 0b21dbdc0a | ||
|  | dd928356b8 | ||
|  | 1844d8bdb9 | ||
|  | 17eef66f5c | ||
|  | 1d1f269a70 | ||
|  | 2ccf6044b8 | ||
|  | bdd09784e1 | ||
|  | de5d70be46 | ||
|  | 8cacba0988 | ||
|  | 60187bf9a2 | ||
|  | ff4634be19 | ||
|  | 9c64b45908 | ||
|  | d97d8fba04 | ||
|  | 368b571d9c | ||
|  | e9da7d222b | ||
|  | 8c059460f9 | ||
|  | bd0aaa08b3 | ||
|  | 93d678dc30 | ||
|  | 9648189827 | ||
|  | 9bfd274127 | ||
|  | dcf9f65f6b | ||
|  | 784fae5834 | ||
|  | eddd8a1065 | ||
|  | 0941746518 | ||
|  | a1f0f35f60 | ||
|  | 25d96a50cd | ||
|  | 3c7f024fed | ||
|  | 6a1a197701 | ||
|  | 5cff5092a0 | ||
|  | b50f912df2 | ||
|  | b4f00dddb8 | ||
|  | 02c103f39a | ||
|  | 3c23fa20c5 | ||
|  | 576b6faac9 | ||
|  | d86415401d | ||
|  | 460cc1f2cd | ||
|  | 370fef10fd | ||
|  | efadc239d4 | ||
|  | de90e37578 | ||
|  | 6e438d2e4f | ||
|  | a86fa21880 | ||
|  | db74a6e7f2 | ||
|  | 8c773ac97c | ||
|  | 5a2b3cf64d | ||
|  | 8ab910d2b1 | ||
|  | fa70f1cd45 | ||
|  | 75a2e0f901 | ||
|  | 84997bcf86 | ||
|  | 536b3ddd6d | ||
|  | bb86c97b11 | ||
|  | 558f117f24 | ||
|  | bbae71658d | ||
|  | 9ee9653463 | ||
|  | 44570cec8a | ||
|  | 33eb0354fa | ||
|  | 0d3e2dc8bb | ||
|  | ac62c52a33 | ||
|  | 0d30d40d8f | ||
|  | 87e365df7e | ||
|  | 6ee01e808b | ||
|  | 57427f4765 | ||
|  | f6a12760c9 | ||
|  | 560a050af3 | ||
|  | 5ed82930d2 | ||
|  | f8a32022c3 | ||
|  | 137df0ff4c | ||
|  | 23bd8c064c | ||
|  | e3384eaee4 | ||
|  | c7e5716a4a | ||
|  | 7fa0d30100 | ||
|  | 6d33e57d05 | ||
|  | f0bfc647e4 | ||
|  | 757dbbbb1f | ||
|  | 8c555b62d4 | ||
|  | d0138c9702 | ||
|  | 71849cd4ac | ||
|  | dba27bb86c | ||
|  | 6a37bc93c0 | ||
|  | 686ffcb19c | ||
|  | b36a1a9364 | ||
|  | a12a31120d | ||
|  | bf2e53344d | ||
|  | aa4570c895 | ||
|  | 6e2e3f705f | ||
|  | 462625165f | ||
|  | d341a3bab8 | ||
|  | ecf658dd82 | ||
|  | feba13d274 | ||
|  | b2023bed63 | ||
|  | 2c1203f1f5 | ||
|  | 0edebd7df1 | ||
|  | e059aa060a | ||
|  | bd92569cec | ||
|  | 2b521fd5a7 | ||
|  | 1ecfa6c18e | ||
|  | 60eb7d2630 | ||
|  | 65a70c64c5 | ||
|  | d23279227a | ||
|  | 117462a480 | ||
|  | be47b189dc | ||
|  | 7ccc2f02f5 | ||
|  | 456fa58c11 | ||
|  | 0cf3eec834 | ||
|  | dfd855440d | ||
|  | 88d46884c4 | ||
|  | e6444a1c7a | ||
|  | e215038230 | ||
|  | a5f8034725 | ||
|  | c7dd659268 | ||
|  | ffae77169e | ||
|  | 3bcfaf256e | ||
|  | 0e8d56d7b2 | ||
|  | ef9e8d574f | ||
|  | a17712b501 | ||
|  | fce6d1d7eb | ||
|  | 867af27a96 | ||
|  | 3de74456ae | ||
|  | 919880e363 | ||
|  | e6ac2875b9 | ||
|  | 4250167a28 | ||
|  | 312463b5e0 | ||
|  | c09f5f7cb0 | ||
|  | 6284e9724e | ||
|  | dcf391faea | ||
|  | 475f345909 | ||
|  | f42e033e40 | ||
|  | 546f37eded | ||
|  | a35673d44f | ||
|  | 25e9bdbdb6 | ||
|  | 33ab26e52b | ||
|  | 7e35abfdc8 | ||
|  | 634e591264 | ||
|  | 86f66c86da | ||
|  | 2904535d40 | ||
|  | e99905efbd | ||
|  | ce65de0f10 | ||
|  | 29b19d4245 | ||
|  | 4eea43bddf | ||
|  | 4c9282790a | ||
|  | 39a74e42b6 | ||
|  | a298c0dcb9 | ||
|  | 9ee56a5d08 | ||
|  | 6b80a2c39c | ||
|  | f6569edde1 | ||
|  | 5ab9aa8cf2 | ||
|  | 8a171d09b5 | ||
|  | 3e423a1543 | ||
|  | 6351782c1d | ||
|  | 4c92868efb | ||
|  | 2cca9ea11b | ||
|  | e12001e4d1 | ||
|  | a57607f728 | ||
|  | a79af2cac0 | ||
|  | be807c5b19 | ||
|  | ae03e7076e | ||
|  | 26e394c398 | ||
|  | 200aa95784 | ||
|  | 4eeabb3dbd | ||
|  | 227bbe4fd8 | ||
|  | 1461a04a3d | ||
|  | 52008dc139 | ||
|  | f2a10052e4 | ||
|  | add64e0cb6 | ||
|  | 14511e2621 | ||
|  | 42e0c93121 | ||
|  | 715bc273ee | ||
|  | 812541870e | ||
|  | 9aa5051826 | ||
|  | 54580b4aeb | ||
|  | 2b1b6091a3 | ||
|  | 74a147ab3f | ||
|  | 07f0595f5a | ||
|  | e3422ea6a5 | ||
|  | f4103c242f | ||
|  | 34fb5e9dd9 | ||
|  | f6cf0670c1 | ||
|  | c7bd036030 | ||
|  | b20c573040 | ||
|  | 6568885c10 | ||
|  | 31237135c5 | ||
|  | d528ed1e97 | ||
|  | bb207340fd | ||
|  | 314e1aeb64 | ||
|  | 9846f7b04f | ||
|  | 6e442e93b8 | ||
|  | fb3c57aab4 | ||
|  | 093b3281fb | ||
|  | 3b027c6c36 | ||
|  | f193309e4c | ||
|  | 7668849a59 | ||
|  | 1350e68c29 | ||
|  | ea63cf76e5 | ||
|  | 674fa8d7e0 | ||
|  | 60a31112ea | ||
|  | 67d8807529 | ||
|  | dda1fd6ea3 | ||
|  | 7a937f1e51 | ||
|  | 187e9138da | ||
|  | b8c9605ae6 | ||
|  | 8a1d8dba94 | ||
|  | b2c87aa22d | ||
|  | 3748482f51 | ||
|  | 1f558e4c58 | ||
|  | a7d31b9811 | ||
|  | 42cc7f16c2 | ||
|  | c0ca7cc27f | ||
|  | 27962726b4 | ||
|  | aeebd3dcc6 | ||
|  | dde8dc90e6 | ||
|  | aa1ec3cf35 | ||
|  | 30ce0a1f01 | ||
|  | 291684f3d8 | ||
|  | 0fed714674 | ||
|  | f2752929ce | ||
|  | cf66b63817 | ||
|  | e387ae39cc | ||
|  | e3483507d0 | ||
|  | 55c6eacf95 | ||
|  | 2ff97bfe83 | ||
|  | 88874ef191 | ||
|  | 74af4484da | ||
|  | c24812dc20 | ||
|  | 0e78b61f4c | ||
|  | 97353e1ee9 | ||
|  | 024ad00229 | ||
|  | c2da1838da | ||
|  | 93d4e603ed | ||
|  | 4197d9d5c7 | ||
|  | a323e56a5a | ||
|  | 6f2100e072 | ||
|  | a2dcb0ebd7 | ||
|  | ef2019d844 | ||
|  | a5adc32d79 | ||
|  | a5f8e80bcc | ||
|  | de3dfc1265 | ||
|  | 487dc56e3c | ||
|  | fd4e630f0f | ||
|  | 008b33efbd | ||
|  | f3e0c43f3b | ||
|  | 9f6ef99ef5 | ||
|  | 5e9d7f39d3 | ||
|  | 0f6950a72e | ||
|  | 87bba8e381 | ||
|  | 837fb0cccd | ||
|  | 0b511e0b55 | ||
|  | 67aa6ac5fc | ||
|  | 6805ce85c8 | ||
|  | b00e11cb6f | ||
|  | 3d9b58ea76 | ||
|  | 02254b2ac4 | ||
|  | 7df8281358 | ||
|  | 3f2a143343 | ||
|  | c8bfc18f83 | ||
|  | 8b3bd59d73 | ||
|  | a6e915371f | ||
|  | f5f1106506 | ||
|  | 5b0c31154e | ||
|  | 70a90c3870 | ||
|  | a10ab896df | ||
|  | 5bc0c3975b | ||
|  | 6e20330424 | ||
|  | 1c1c9704a1 | ||
|  | b7642b5813 | ||
|  | 69583721da | ||
|  | d17c11b8ad | ||
|  | 57daaa24da | ||
|  | da96fd52ca | ||
|  | 0fd088fc59 | ||
|  | dea78f5d30 | ||
|  | aa02febb3f | ||
|  | 84e1c90745 | ||
|  | 7ce2349edc | ||
|  | 6d02269164 | ||
|  | ba323979ff | ||
|  | b1cf324289 | ||
|  | acb34b7861 | ||
|  | ab1cce1fec | ||
|  | 7550799a26 | ||
|  | 6238485d2b | ||
|  | 8059ccad53 | ||
|  | 3896979b6c | ||
|  | 98a978a4d1 | ||
|  | cb333d1c20 | ||
|  | ee1d33cb41 | ||
|  | 1e16f74292 | ||
|  | 8d72d662a0 | ||
|  | f346992500 | ||
|  | 5399fed53b | ||
|  | 1766ac749d | ||
|  | 5b31b22840 | ||
|  | b4c18c9902 | ||
|  | 7491ba5156 | ||
|  | 57d8f4bab7 | ||
|  | 6c0b29ec3d | ||
|  | 91adfe22d7 | ||
|  | 40036caae4 | ||
|  | 5a0aadb425 | ||
|  | d4a8ef2442 | ||
|  | 5555ee6871 | ||
|  | 1ba62b2a4c | ||
|  | 8abf1c3d36 | ||
|  | 22b6131f93 | ||
|  | 8a731dce40 | ||
|  | a18861a4f6 | ||
|  | 87f31c5a3a | ||
|  | ef878fe20f | ||
|  | 168aae1a3d | ||
|  | ed706aa5d3 | ||
|  | fe5a1d8436 | ||
|  | 54d122ccc1 | ||
|  | 945fe52df9 | ||
|  | f1d9203430 | ||
|  | 1dc0720582 | ||
|  | 8dcc19cc63 | ||
|  | d4883af0d0 | ||
|  | 4cb220de66 | ||
|  | 97bcd725ee | ||
|  | 38259f9b39 | ||
|  | 9b1f0d78a5 | ||
|  | 95d7dbc5fc | ||
|  | 920366d287 | ||
|  | 14e26c46fc | ||
|  | c934f556cd | ||
|  | 73901303c5 | ||
|  | bbb22a79eb | ||
|  | 099b072a47 | ||
|  | 0bf3c078cf | ||
|  | 9b45f75b48 | ||
|  | 52914459ea | ||
|  | 446b08aa03 | ||
|  | 08fbc569fe | ||
|  | a8f50416a3 | ||
|  | c5122ddca0 | ||
|  | 1d93bcbb0d | ||
|  | c34f9af62d | ||
|  | 112875fbfd | ||
|  | 2d21456342 | ||
|  | 0363cab870 | ||
|  | 1f708ad712 | ||
|  | 475894525d | ||
|  | 58bad96724 | ||
|  | 02486a432a | ||
|  | 6de21cca78 | ||
|  | 185f7ebeb6 | ||
|  | 1b55aa9691 | ||
|  | 51aa490439 | ||
|  | 4cf2e76430 | ||
|  | 9e34ae3df8 | ||
|  | 6a4f82deae | ||
|  | 0e3173a573 | ||
|  | 2744561346 | ||
|  | 9b8ae96c2e | ||
|  | adb8913b56 | ||
|  | 02237bd280 | ||
|  | 78001ed22c | ||
|  | a568aeda17 | ||
|  | f890e9f995 | ||
|  | 0ddeac79bb | ||
|  | 67ca73820b | ||
|  | 1df8702e16 | ||
|  | 12c4481ac2 | ||
|  | 0f572ec21a | ||
|  | 9c121743d9 | ||
|  | c754eaeb93 | ||
|  | b9e76970f9 | ||
|  | 0a46ec0ab2 | ||
|  | ce39a66934 | ||
|  | d098508e53 | ||
|  | 738a77301a | ||
|  | be0ea5b247 | ||
|  | d33dc8e1d4 | ||
|  | d72b8c411a | ||
|  | 01c347673d | ||
|  | dcc6f23548 | ||
|  | 22c94284ec | ||
|  | 9f1956b632 | ||
|  | 740bce8c80 | ||
|  | 801b526b4a | ||
|  | fde025ad88 | ||
|  | ba61253c94 | ||
|  | bf5032675f | ||
|  | cce8ef50ef | 
							
								
								
									
										14
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -42,17 +42,16 @@ jobs: | |||||||
|       !contains(github.event.head_commit.message, '[force') |       !contains(github.event.head_commit.message, '[force') | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v4 |       - uses: actions/checkout@v4 | ||||||
|  |         with: | ||||||
|  |           fetch-depth: 0 | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0 | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0 | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0 | ||||||
|       - uses: actions/checkout@v4 |  | ||||||
|         with: |  | ||||||
|           fetch-depth: 0 |  | ||||||
|       - id: changed-files |       - id: changed-files | ||||||
|         uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v6.1.0 |         uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v8.16.0 | ||||||
|         with: |         with: | ||||||
|           write-list-to-env: true |           write-list-to-env: true | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v6.1.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v8.16.0 | ||||||
|       - name: "Init" |       - name: "Init" | ||||||
|         run: bash ./scripts/ci/init.sh |         run: bash ./scripts/ci/init.sh | ||||||
|       - name: "Prepare maven cache and check compilation" |       - name: "Prepare maven cache and check compilation" | ||||||
| @@ -146,7 +145,7 @@ jobs: | |||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0 | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0 | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0 | ||||||
|       - uses: Alfresco/ya-pmd-scan@v4.0.0 |       - uses: Alfresco/ya-pmd-scan@v4.3.0 | ||||||
|         with: |         with: | ||||||
|           classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\"" |           classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\"" | ||||||
|  |  | ||||||
| @@ -267,6 +266,7 @@ jobs: | |||||||
|       - name: "Set transformers tag" |       - name: "Set transformers tag" | ||||||
|         run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV |         run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV | ||||||
|       - name: "Set up the environment" |       - name: "Set up the environment" | ||||||
|  |         timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||||||
|         run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d |         run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d | ||||||
|       - name: "Prepare Report Portal" |       - name: "Prepare Report Portal" | ||||||
|         if: github.ref_name == 'master' |         if: github.ref_name == 'master' | ||||||
| @@ -875,6 +875,7 @@ jobs: | |||||||
|             echo "HOSTNAME_VERIFICATION_DISABLED=false" >> "$GITHUB_ENV" |             echo "HOSTNAME_VERIFICATION_DISABLED=false" >> "$GITHUB_ENV" | ||||||
|           fi |           fi | ||||||
|       - name: "Set up the environment" |       - name: "Set up the environment" | ||||||
|  |         timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||||||
|         run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d |         run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d | ||||||
|       - name: "Prepare Report Portal" |       - name: "Prepare Report Portal" | ||||||
|         if: github.ref_name == 'master' |         if: github.ref_name == 'master' | ||||||
| @@ -976,6 +977,7 @@ jobs: | |||||||
|           bash ./scripts/ci/init.sh |           bash ./scripts/ci/init.sh | ||||||
|           bash ./scripts/ci/build.sh |           bash ./scripts/ci/build.sh | ||||||
|       - name: "Set up the environment" |       - name: "Set up the environment" | ||||||
|  |         timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||||||
|         run: | |         run: | | ||||||
|           ${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml |           ${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml | ||||||
|           ${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco" |           ${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco" | ||||||
|   | |||||||
| @@ -147,7 +147,7 @@ | |||||||
|         "filename": ".github/workflows/ci.yml", |         "filename": ".github/workflows/ci.yml", | ||||||
|         "hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39", |         "hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39", | ||||||
|         "is_verified": false, |         "is_verified": false, | ||||||
|         "line_number": 901 |         "line_number": 902 | ||||||
|       } |       } | ||||||
|     ], |     ], | ||||||
|     ".github/workflows/master_release.yml": [ |     ".github/workflows/master_release.yml": [ | ||||||
| @@ -166,7 +166,7 @@ | |||||||
|         "filename": "amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java", |         "filename": "amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/TestData.java", | ||||||
|         "hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8", |         "hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8", | ||||||
|         "is_verified": false, |         "is_verified": false, | ||||||
|         "line_number": 58, |         "line_number": 57, | ||||||
|         "is_secret": false |         "is_secret": false | ||||||
|       } |       } | ||||||
|     ], |     ], | ||||||
| @@ -176,7 +176,7 @@ | |||||||
|         "filename": "amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/retentionschedule/RetentionScheduleStepTests.java", |         "filename": "amps/ags/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/retentionschedule/RetentionScheduleStepTests.java", | ||||||
|         "hashed_secret": "e3557f3b0f2189660980d213f75d1a7828d56af1", |         "hashed_secret": "e3557f3b0f2189660980d213f75d1a7828d56af1", | ||||||
|         "is_verified": false, |         "is_verified": false, | ||||||
|         "line_number": 85, |         "line_number": 83, | ||||||
|         "is_secret": false |         "is_secret": false | ||||||
|       } |       } | ||||||
|     ], |     ], | ||||||
| @@ -731,7 +731,7 @@ | |||||||
|         "filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/AbstractBaseApiTest.java", |         "filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/AbstractBaseApiTest.java", | ||||||
|         "hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997", |         "hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997", | ||||||
|         "is_verified": false, |         "is_verified": false, | ||||||
|         "line_number": 120, |         "line_number": 111, | ||||||
|         "is_secret": false |         "is_secret": false | ||||||
|       } |       } | ||||||
|     ], |     ], | ||||||
| @@ -1273,7 +1273,7 @@ | |||||||
|         "filename": "repository/src/main/resources/alfresco/repository.properties", |         "filename": "repository/src/main/resources/alfresco/repository.properties", | ||||||
|         "hashed_secret": "84551ae5442affc9f1a2d3b4c86ae8b24860149d", |         "hashed_secret": "84551ae5442affc9f1a2d3b4c86ae8b24860149d", | ||||||
|         "is_verified": false, |         "is_verified": false, | ||||||
|         "line_number": 770, |         "line_number": 771, | ||||||
|         "is_secret": false |         "is_secret": false | ||||||
|       } |       } | ||||||
|     ], |     ], | ||||||
| @@ -1627,7 +1627,7 @@ | |||||||
|         "filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/SpringBasedIdentityServiceFacadeUnitTest.java", |         "filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/SpringBasedIdentityServiceFacadeUnitTest.java", | ||||||
|         "hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8", |         "hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8", | ||||||
|         "is_verified": false, |         "is_verified": false, | ||||||
|         "line_number": 46, |         "line_number": 48, | ||||||
|         "is_secret": false |         "is_secret": false | ||||||
|       } |       } | ||||||
|     ], |     ], | ||||||
| @@ -1888,5 +1888,5 @@ | |||||||
|       } |       } | ||||||
|     ] |     ] | ||||||
|   }, |   }, | ||||||
|   "generated_at": "2025-03-31T12:42:09Z" |   "generated_at": "2025-05-15T21:47:13Z" | ||||||
| } | } | ||||||
|   | |||||||
| @@ -126,4 +126,3 @@ Please use [**this guide**](CONTRIBUTING.md) to make a contribution to the proje | |||||||
|  |  | ||||||
| - [Alfresco Content Services Documentation](https://docs.alfresco.com/content-services/latest/) | - [Alfresco Content Services Documentation](https://docs.alfresco.com/content-services/latest/) | ||||||
| - [Alfresco Platform](https://www.hyland.com/en/products/alfresco-platform) | - [Alfresco Platform](https://www.hyland.com/en/products/alfresco-platform) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|    <parent> |    <parent> | ||||||
|       <groupId>org.alfresco</groupId> |       <groupId>org.alfresco</groupId> | ||||||
|       <artifactId>alfresco-community-repo-amps</artifactId> |       <artifactId>alfresco-community-repo-amps</artifactId> | ||||||
|       <version>23.3.15.2-SNAPSHOT</version> |       <version>23.7.0.3</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <modules> |    <modules> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|    <parent> |    <parent> | ||||||
|       <groupId>org.alfresco</groupId> |       <groupId>org.alfresco</groupId> | ||||||
|       <artifactId>alfresco-governance-services-community-parent</artifactId> |       <artifactId>alfresco-governance-services-community-parent</artifactId> | ||||||
|       <version>23.3.15.2-SNAPSHOT</version> |       <version>23.7.0.3</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <modules> |    <modules> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|    <parent> |    <parent> | ||||||
|       <groupId>org.alfresco</groupId> |       <groupId>org.alfresco</groupId> | ||||||
|       <artifactId>alfresco-governance-services-automation-community-repo</artifactId> |       <artifactId>alfresco-governance-services-automation-community-repo</artifactId> | ||||||
|       <version>23.3.15.2-SNAPSHOT</version> |       <version>23.7.0.3</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <build> |    <build> | ||||||
| @@ -98,7 +98,7 @@ | |||||||
|       <dependency> |       <dependency> | ||||||
|          <groupId>com.github.docker-java</groupId> |          <groupId>com.github.docker-java</groupId> | ||||||
|          <artifactId>docker-java</artifactId> |          <artifactId>docker-java</artifactId> | ||||||
|          <version>3.3.6</version> |          <version>3.4.0</version> | ||||||
|          <exclusions> |          <exclusions> | ||||||
|             <exclusion> |             <exclusion> | ||||||
|                <groupId>org.bouncycastle</groupId> |                <groupId>org.bouncycastle</groupId> | ||||||
|   | |||||||
| @@ -26,11 +26,12 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.core; | package org.alfresco.rest.core; | ||||||
|  |  | ||||||
| import lombok.Getter; |  | ||||||
| import org.springframework.beans.factory.annotation.Value; | import org.springframework.beans.factory.annotation.Value; | ||||||
| import org.springframework.context.annotation.Configuration; | import org.springframework.context.annotation.Configuration; | ||||||
| import org.springframework.context.annotation.PropertySource; | import org.springframework.context.annotation.PropertySource; | ||||||
|  |  | ||||||
|  | import lombok.Getter; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Extends {@link RestProperties} to be able to change/add properties |  * Extends {@link RestProperties} to be able to change/add properties | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -27,11 +27,6 @@ | |||||||
| package org.alfresco.rest.core; | package org.alfresco.rest.core; | ||||||
|  |  | ||||||
| import io.restassured.builder.RequestSpecBuilder; | import io.restassured.builder.RequestSpecBuilder; | ||||||
| import lombok.Getter; |  | ||||||
| import org.springframework.beans.factory.annotation.Autowired; |  | ||||||
| import org.springframework.context.annotation.Scope; |  | ||||||
| import org.springframework.http.HttpStatus; |  | ||||||
| import org.springframework.stereotype.Service; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.exception.EmptyJsonResponseException; | import org.alfresco.rest.exception.EmptyJsonResponseException; | ||||||
| import org.alfresco.rest.model.RestErrorModel; | import org.alfresco.rest.model.RestErrorModel; | ||||||
| @@ -43,6 +38,12 @@ import org.alfresco.rest.requests.search.SearchAPI; | |||||||
| import org.alfresco.rest.rm.community.requests.gscore.GSCoreAPI; | import org.alfresco.rest.rm.community.requests.gscore.GSCoreAPI; | ||||||
| import org.alfresco.utility.model.StatusModel; | import org.alfresco.utility.model.StatusModel; | ||||||
| import org.alfresco.utility.model.UserModel; | import org.alfresco.utility.model.UserModel; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.context.annotation.Scope; | ||||||
|  | import org.springframework.http.HttpStatus; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
|  | import lombok.Getter; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Extends {@link RestWrapper} in order to call GS APIs with our own properties |  * Extends {@link RestWrapper} in order to call GS APIs with our own properties | ||||||
| @@ -152,18 +153,15 @@ public class RMRestWrapper | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * You can handle the request sent to server by calling this method. If for example you want to sent multipart form data you can use: |      * You can handle the request sent to server by calling this method. | ||||||
|      *  |      * If for example you want to sent multipart form data you can use: <pre> | ||||||
|      * <pre> |  | ||||||
|      * restClient.configureRequestSpec() |      * restClient.configureRequestSpec() | ||||||
|      *              .addMultiPart("filedata", Utility.getResourceTestDataFile("restapi-resource")) |      *              .addMultiPart("filedata", Utility.getResourceTestDataFile("restapi-resource")) | ||||||
|      *              .addFormParam("renditions", "doclib") |      *              .addFormParam("renditions", "doclib") | ||||||
|      *              .addFormParam("autoRename", true); |      *              .addFormParam("autoRename", true); | ||||||
|      * |      * | ||||||
|      * restClient.withCoreAPI().usingNode(ContentModel.my()).createNode(); |      * restClient.withCoreAPI().usingNode(ContentModel.my()).createNode(); | ||||||
|      * </pre> |      * </pre> This will create the node using the multipart data defined. | ||||||
|      *  |  | ||||||
|      * This will create the node using the multipart data defined. |  | ||||||
|      */ |      */ | ||||||
|     public RequestSpecBuilder configureRequestSpec() |     public RequestSpecBuilder configureRequestSpec() | ||||||
|     { |     { | ||||||
| @@ -173,8 +171,7 @@ public class RMRestWrapper | |||||||
|     /** |     /** | ||||||
|      * Process a response that returns a html |      * Process a response that returns a html | ||||||
|      * |      * | ||||||
|      * @throws EmptyJsonResponseException |      * @throws EmptyJsonResponseException If there is no response from the server. | ||||||
|      *             If there is no response from the server. |  | ||||||
|      */ |      */ | ||||||
|     public RestHtmlResponse processHtmlResponse(RestRequest simpleRequest) |     public RestHtmlResponse processHtmlResponse(RestRequest simpleRequest) | ||||||
|     { |     { | ||||||
|   | |||||||
| @@ -32,10 +32,6 @@ import jakarta.annotation.Resource; | |||||||
|  |  | ||||||
| import lombok.Getter; | import lombok.Getter; | ||||||
| import lombok.Setter; | import lombok.Setter; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; |  | ||||||
| import org.springframework.context.annotation.Scope; |  | ||||||
| import org.springframework.stereotype.Service; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.requests.Node; | import org.alfresco.rest.requests.Node; | ||||||
| import org.alfresco.rest.requests.coreAPI.RestCoreAPI; | import org.alfresco.rest.requests.coreAPI.RestCoreAPI; | ||||||
| import org.alfresco.rest.requests.search.SearchAPI; | import org.alfresco.rest.requests.search.SearchAPI; | ||||||
| @@ -49,14 +45,17 @@ import org.alfresco.rest.rm.community.requests.gscore.api.RMUserAPI; | |||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.RecordCategoryAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.RecordCategoryAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.RetentionScheduleAPI; |  | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.TransferAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.TransferAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.TransferContainerAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.TransferContainerAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI; | ||||||
|  | import org.alfresco.rest.rm.community.requests.gscore.api.RetentionScheduleAPI; | ||||||
| import org.alfresco.utility.data.DataUserAIS; | import org.alfresco.utility.data.DataUserAIS; | ||||||
| import org.alfresco.utility.model.RepoTestModel; | import org.alfresco.utility.model.RepoTestModel; | ||||||
| import org.alfresco.utility.model.UserModel; | import org.alfresco.utility.model.UserModel; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.context.annotation.Scope; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * REST API Factory which provides access to the APIs |  * REST API Factory which provides access to the APIs | ||||||
|   | |||||||
| @@ -44,12 +44,10 @@ public class SearchRequestBuilder extends SearchRequest | |||||||
|     { |     { | ||||||
|         new SearchRequest(); |         new SearchRequest(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Set the sql statement for the SearchRequest |      * Set the sql statement for the SearchRequest | ||||||
|      * |      * | ||||||
|      * @param query |      * @param query sql statement | ||||||
|      *            sql statement |  | ||||||
|      * @return search  request |      * @return search  request | ||||||
|      */ |      */ | ||||||
|     public SearchRequestBuilder setQueryBuilder(RestRequestQueryModel query) |     public SearchRequestBuilder setQueryBuilder(RestRequestQueryModel query) | ||||||
| @@ -61,8 +59,7 @@ public class SearchRequestBuilder extends SearchRequest | |||||||
|     /** |     /** | ||||||
|      * Set the paging statement for the SearchRequest |      * Set the paging statement for the SearchRequest | ||||||
|      * |      * | ||||||
|      * @param paging |      * @param paging pagination requested | ||||||
|      *            pagination requested |  | ||||||
|      * @return search request |      * @return search request | ||||||
|      */ |      */ | ||||||
|     public SearchRequestBuilder setPagingBuilder(Pagination paging) |     public SearchRequestBuilder setPagingBuilder(Pagination paging) | ||||||
| @@ -85,8 +82,7 @@ public class SearchRequestBuilder extends SearchRequest | |||||||
|     /** |     /** | ||||||
|      * Set the requested fields for the SearchRequest |      * Set the requested fields for the SearchRequest | ||||||
|      * |      * | ||||||
|      * @param fields |      * @param fields requested fields | ||||||
|      *            requested fields |  | ||||||
|      * @return search request |      * @return search request | ||||||
|      */ |      */ | ||||||
|     public SearchRequestBuilder setFieldsBuilder(List<String> fields) |     public SearchRequestBuilder setFieldsBuilder(List<String> fields) | ||||||
|   | |||||||
| @@ -26,12 +26,12 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.core.v0; | package org.alfresco.rest.core.v0; | ||||||
|  |  | ||||||
|  | import jakarta.json.Json; | ||||||
|  | import jakarta.json.JsonReader; | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
| import java.io.InputStream; | import java.io.InputStream; | ||||||
| import java.time.format.DateTimeFormatter; | import java.time.format.DateTimeFormatter; | ||||||
| import java.time.format.DateTimeFormatterBuilder; | import java.time.format.DateTimeFormatterBuilder; | ||||||
| import jakarta.json.Json; |  | ||||||
| import jakarta.json.JsonReader; |  | ||||||
|  |  | ||||||
| import org.apache.commons.io.IOUtils; | import org.apache.commons.io.IOUtils; | ||||||
| import org.apache.http.HttpEntity; | import org.apache.http.HttpEntity; | ||||||
| @@ -52,20 +52,20 @@ public class APIUtils | |||||||
| { | { | ||||||
|     /** Logger for this class. */ |     /** Logger for this class. */ | ||||||
|     private static final Logger LOGGER = LoggerFactory.getLogger(APIUtils.class); |     private static final Logger LOGGER = LoggerFactory.getLogger(APIUtils.class); | ||||||
|     /** |     /** The ISO instant formatter that formats or parses an instant in UTC, such as '2011-12-03T10:15:305Z' | ||||||
|      * The ISO instant formatter that formats or parses an instant in UTC, such as '2011-12-03T10:15:305Z' similar with {@link DateTimeFormatter#ISO_INSTANT}, but with only 3 nanoseconds |      * similar with {@link DateTimeFormatter#ISO_INSTANT}, but with only 3 nanoseconds*/ | ||||||
|      */ |     public static final DateTimeFormatter ISO_INSTANT_FORMATTER = | ||||||
|     public static final DateTimeFormatter ISO_INSTANT_FORMATTER = new DateTimeFormatterBuilder().appendInstant(3).toFormatter(); |             new DateTimeFormatterBuilder().appendInstant(3).toFormatter(); | ||||||
|  |  | ||||||
|     /** Private constructor for helper class. */ |     /** Private constructor for helper class. */ | ||||||
|     private APIUtils() |     private APIUtils() | ||||||
|     {} |     { | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Extract the body of a HTTP response as a JSON object. |      * Extract the body of a HTTP response as a JSON object. | ||||||
|      * |      * | ||||||
|      * @param httpResponse |      * @param httpResponse The HTTP response. | ||||||
|      *            The HTTP response. |  | ||||||
|      * @return A JSON representation of the object. |      * @return A JSON representation of the object. | ||||||
|      */ |      */ | ||||||
|     public static JSONObject convertHTTPResponseToJSON(HttpResponse httpResponse) |     public static JSONObject convertHTTPResponseToJSON(HttpResponse httpResponse) | ||||||
| @@ -86,8 +86,7 @@ public class APIUtils | |||||||
|     /** |     /** | ||||||
|      * Util method to extract the message string from the HTTP response |      * Util method to extract the message string from the HTTP response | ||||||
|      * |      * | ||||||
|      * @param httpResponse |      * @param httpResponse http response | ||||||
|      *            http response |  | ||||||
|      * @return error message from the http response |      * @return error message from the http response | ||||||
|      */ |      */ | ||||||
|     public static String extractErrorMessageFromHttpResponse(HttpResponse httpResponse) |     public static String extractErrorMessageFromHttpResponse(HttpResponse httpResponse) | ||||||
|   | |||||||
| @@ -39,6 +39,9 @@ import java.util.HashMap; | |||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
|  |  | ||||||
|  | import org.alfresco.dataprep.AlfrescoHttpClient; | ||||||
|  | import org.alfresco.dataprep.AlfrescoHttpClientFactory; | ||||||
|  | import org.alfresco.dataprep.ContentService; | ||||||
| import org.apache.chemistry.opencmis.client.api.CmisObject; | import org.apache.chemistry.opencmis.client.api.CmisObject; | ||||||
| import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException; | import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException; | ||||||
| import org.apache.http.HttpResponse; | import org.apache.http.HttpResponse; | ||||||
| @@ -61,10 +64,6 @@ import org.slf4j.Logger; | |||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  |  | ||||||
| import org.alfresco.dataprep.AlfrescoHttpClient; |  | ||||||
| import org.alfresco.dataprep.AlfrescoHttpClientFactory; |  | ||||||
| import org.alfresco.dataprep.ContentService; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * The base API class containing common methods for making v0 API requests |  * The base API class containing common methods for making v0 API requests | ||||||
|  * |  * | ||||||
| @@ -99,11 +98,9 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Helper method to extract list of properties values from result. |      * Helper method to extract list of properties values from result. | ||||||
|      * |      * | ||||||
|      * @param result |      * @param result the response | ||||||
|      *            the response |  | ||||||
|      * @return list of specified property values in result |      * @return list of specified property values in result | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for malformed response | ||||||
|      *             for malformed response |  | ||||||
|      */ |      */ | ||||||
|     protected List<String> getPropertyValues(JSONObject result, String propertyName) |     protected List<String> getPropertyValues(JSONObject result, String propertyName) | ||||||
|     { |     { | ||||||
| @@ -159,11 +156,9 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Helper method to extract property values from request result and put them in map as a list that corresponds to a unique property value. |      * Helper method to extract property values from request result and put them in map as a list that corresponds to a unique property value. | ||||||
|      * |      * | ||||||
|      * @param requestResult |      * @param requestResult the request response | ||||||
|      *            the request response |  | ||||||
|      * @return a map containing information about multiple properties values that correspond to a unique one |      * @return a map containing information about multiple properties values that correspond to a unique one | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for malformed response | ||||||
|      *             for malformed response |  | ||||||
|      */ |      */ | ||||||
|     protected Map<String, List<String>> getPropertyValuesByUniquePropertyValue(JSONObject requestResult, String uniqueProperty, List<String> otherProperties) |     protected Map<String, List<String>> getPropertyValuesByUniquePropertyValue(JSONObject requestResult, String uniqueProperty, List<String> otherProperties) | ||||||
|     { |     { | ||||||
| @@ -194,12 +189,11 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Retrieves the nodeRef of an item (category, folder or record) with the given path |      * Retrieves the nodeRef of an item (category, folder or record) with the given path | ||||||
|      * |      * | ||||||
|      * @param username |      * @param username the username | ||||||
|      *            the username |      * @param password the password | ||||||
|      * @param password |      * @param path     the path to the container eg. in case of a category it would be the category name, | ||||||
|      *            the password |      *                 in case of a folder it would be /categoryName/folderName | ||||||
|      * @param path |      *                 when trying to get File Plan, the path would be "" | ||||||
|      *            the path to the container eg. in case of a category it would be the category name, in case of a folder it would be /categoryName/folderName when trying to get File Plan, the path would be "" |  | ||||||
|      * @return the container nodeRef |      * @return the container nodeRef | ||||||
|      */ |      */ | ||||||
|     public String getItemNodeRef(String username, String password, String path) |     public String getItemNodeRef(String username, String password, String path) | ||||||
| @@ -210,12 +204,9 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Retrieve a Cmis object by its path |      * Retrieve a Cmis object by its path | ||||||
|      * |      * | ||||||
|      * @param username |      * @param username the user's username | ||||||
|      *            the user's username |      * @param password its password | ||||||
|      * @param password |      * @param path     the object path | ||||||
|      *            its password |  | ||||||
|      * @param path |  | ||||||
|      *            the object path |  | ||||||
|      * @return the object in case it exists, null if its does not exist |      * @return the object in case it exists, null if its does not exist | ||||||
|      */ |      */ | ||||||
|     protected CmisObject getObjectByPath(String username, String password, String path) |     protected CmisObject getObjectByPath(String username, String password, String path) | ||||||
| @@ -224,8 +215,7 @@ public abstract class BaseAPI | |||||||
|         try |         try | ||||||
|         { |         { | ||||||
|             object = contentService.getCMISSession(username, password).getObjectByPath(path); |             object = contentService.getCMISSession(username, password).getObjectByPath(path); | ||||||
|         } |         } catch (CmisObjectNotFoundException notFoundError) | ||||||
|         catch (CmisObjectNotFoundException notFoundError) |  | ||||||
|         { |         { | ||||||
|             return null; |             return null; | ||||||
|         } |         } | ||||||
| @@ -235,12 +225,9 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Generic faceted request. |      * Generic faceted request. | ||||||
|      * |      * | ||||||
|      * @param username |      * @param username the username | ||||||
|      *            the username |      * @param password the password | ||||||
|      * @param password |      * @param parameters if the request has parameters | ||||||
|      *            the password |  | ||||||
|      * @param parameters |  | ||||||
|      *            if the request has parameters |  | ||||||
|      * @return result object (see API reference for more details), null for any errors |      * @return result object (see API reference for more details), null for any errors | ||||||
|      */ |      */ | ||||||
|     protected JSONObject facetedRequest(String username, String password, List<NameValuePair> parameters, String requestURI) |     protected JSONObject facetedRequest(String username, String password, List<NameValuePair> parameters, String requestURI) | ||||||
| @@ -268,15 +255,10 @@ public abstract class BaseAPI | |||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Helper method for GET requests |      * Helper method for GET requests | ||||||
|      *  |      * @param adminUser user with administrative privileges | ||||||
|      * @param adminUser |      * @param adminPassword password for adminUser | ||||||
|      *            user with administrative privileges |      * @param urlTemplate request URL template | ||||||
|      * @param adminPassword |      * @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i> | ||||||
|      *            password for adminUser |  | ||||||
|      * @param urlTemplate |  | ||||||
|      *            request URL template |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            zero or more parameters used with <i>urlTemplate</i> |  | ||||||
|      */ |      */ | ||||||
|     protected JSONObject doGetRequest(String adminUser, |     protected JSONObject doGetRequest(String adminUser, | ||||||
|         String adminPassword, |         String adminPassword, | ||||||
| @@ -302,15 +284,10 @@ public abstract class BaseAPI | |||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Helper method for Delete requests |      * Helper method for Delete requests | ||||||
|      *  |      * @param adminUser user with administrative privileges | ||||||
|      * @param adminUser |      * @param adminPassword password for adminUser | ||||||
|      *            user with administrative privileges |      * @param urlTemplate request URL template | ||||||
|      * @param adminPassword |      * @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i> | ||||||
|      *            password for adminUser |  | ||||||
|      * @param urlTemplate |  | ||||||
|      *            request URL template |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            zero or more parameters used with <i>urlTemplate</i> |  | ||||||
|      */ |      */ | ||||||
|     protected JSONObject doDeleteRequest(String adminUser, |     protected JSONObject doDeleteRequest(String adminUser, | ||||||
|         String adminPassword, |         String adminPassword, | ||||||
| @@ -336,17 +313,11 @@ public abstract class BaseAPI | |||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Helper method for PUT requests |      * Helper method for PUT requests | ||||||
|      *  |      * @param adminUser user with administrative privileges | ||||||
|      * @param adminUser |      * @param adminPassword password for adminUser | ||||||
|      *            user with administrative privileges |      * @param requestParams zero or more endpoint specific request parameters | ||||||
|      * @param adminPassword |      * @param urlTemplate request URL template | ||||||
|      *            password for adminUser |      * @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i> | ||||||
|      * @param requestParams |  | ||||||
|      *            zero or more endpoint specific request parameters |  | ||||||
|      * @param urlTemplate |  | ||||||
|      *            request URL template |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            zero or more parameters used with <i>urlTemplate</i> |  | ||||||
|      */ |      */ | ||||||
|     protected JSONObject doPutRequest(String adminUser, |     protected JSONObject doPutRequest(String adminUser, | ||||||
|         String adminPassword, |         String adminPassword, | ||||||
| @@ -374,18 +345,12 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Helper method for PUT requests |      * Helper method for PUT requests | ||||||
|      * |      * | ||||||
|      * @param adminUser |      * @param adminUser user with administrative privileges | ||||||
|      *            user with administrative privileges |      * @param adminPassword password for adminUser | ||||||
|      * @param adminPassword |      * @param expectedStatusCode The expected return status code. | ||||||
|      *            password for adminUser |      * @param requestParams zero or more endpoint specific request parameters | ||||||
|      * @param expectedStatusCode |      * @param urlTemplate request URL template | ||||||
|      *            The expected return status code. |      * @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i> | ||||||
|      * @param requestParams |  | ||||||
|      *            zero or more endpoint specific request parameters |  | ||||||
|      * @param urlTemplate |  | ||||||
|      *            request URL template |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            zero or more parameters used with <i>urlTemplate</i> |  | ||||||
|      */ |      */ | ||||||
|     protected HttpResponse doPutJsonRequest(String adminUser, |     protected HttpResponse doPutJsonRequest(String adminUser, | ||||||
|                 String adminPassword, |                 String adminPassword, | ||||||
| @@ -401,22 +366,14 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Helper method for PUT requests |      * Helper method for PUT requests | ||||||
|      * |      * | ||||||
|      * @param adminUser |      * @param adminUser user with administrative privileges | ||||||
|      *            user with administrative privileges |      * @param adminPassword password for adminUser | ||||||
|      * @param adminPassword |      * @param expectedStatusCode The expected return status code. | ||||||
|      *            password for adminUser |      * @param urlStart the start of the URL (for example "alfresco/s/slingshot"). | ||||||
|      * @param expectedStatusCode |      * @param requestParams zero or more endpoint specific request parameters | ||||||
|      *            The expected return status code. |      * @param urlTemplate request URL template | ||||||
|      * @param urlStart |      * @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i> | ||||||
|      *            the start of the URL (for example "alfresco/s/slingshot"). |      * @throws AssertionError if the returned status code is not as expected. | ||||||
|      * @param requestParams |  | ||||||
|      *            zero or more endpoint specific request parameters |  | ||||||
|      * @param urlTemplate |  | ||||||
|      *            request URL template |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            zero or more parameters used with <i>urlTemplate</i> |  | ||||||
|      * @throws AssertionError |  | ||||||
|      *             if the returned status code is not as expected. |  | ||||||
|      */ |      */ | ||||||
|     private HttpResponse doPutJsonRequest(String adminUser, |     private HttpResponse doPutJsonRequest(String adminUser, | ||||||
|                 String adminPassword, |                 String adminPassword, | ||||||
| @@ -442,12 +399,9 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Fill in the parameters for a URL template. |      * Fill in the parameters for a URL template. | ||||||
|      * |      * | ||||||
|      * @param urlStart |      * @param urlStart The start of the URL. | ||||||
|      *            The start of the URL. |      * @param urlTemplate The template. | ||||||
|      * @param urlTemplate |      * @param urlTemplateParams Any parameters that need to be filled into the URL template. | ||||||
|      *            The template. |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            Any parameters that need to be filled into the URL template. |  | ||||||
|      * @return The resultant URL. |      * @return The resultant URL. | ||||||
|      */ |      */ | ||||||
|     private String formatRequestUrl(String urlStart, String urlTemplate, String[] urlTemplateParams) |     private String formatRequestUrl(String urlStart, String urlTemplate, String[] urlTemplateParams) | ||||||
| @@ -462,17 +416,11 @@ public abstract class BaseAPI | |||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Helper method for POST requests |      * Helper method for POST requests | ||||||
|      *  |      * @param adminUser user with administrative privileges | ||||||
|      * @param adminUser |      * @param adminPassword password for adminUser | ||||||
|      *            user with administrative privileges |      * @param requestParams zero or more endpoint specific request parameters | ||||||
|      * @param adminPassword |      * @param urlTemplate request URL template | ||||||
|      *            password for adminUser |      * @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i> | ||||||
|      * @param requestParams |  | ||||||
|      *            zero or more endpoint specific request parameters |  | ||||||
|      * @param urlTemplate |  | ||||||
|      *            request URL template |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            zero or more parameters used with <i>urlTemplate</i> |  | ||||||
|      */ |      */ | ||||||
|     protected JSONObject doPostRequest(String adminUser, |     protected JSONObject doPostRequest(String adminUser, | ||||||
|         String adminPassword, |         String adminPassword, | ||||||
| @@ -500,18 +448,12 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Helper method for POST requests |      * Helper method for POST requests | ||||||
|      * |      * | ||||||
|      * @param adminUser |      * @param adminUser user with administrative privileges | ||||||
|      *            user with administrative privileges |      * @param adminPassword password for adminUser | ||||||
|      * @param adminPassword |      * @param expectedStatusCode The expected return status code. | ||||||
|      *            password for adminUser |      * @param requestParams zero or more endpoint specific request parameters | ||||||
|      * @param expectedStatusCode |      * @param urlTemplate request URL template | ||||||
|      *            The expected return status code. |      * @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i> | ||||||
|      * @param requestParams |  | ||||||
|      *            zero or more endpoint specific request parameters |  | ||||||
|      * @param urlTemplate |  | ||||||
|      *            request URL template |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            zero or more parameters used with <i>urlTemplate</i> |  | ||||||
|      */ |      */ | ||||||
|     protected HttpResponse doPostJsonRequest(String adminUser, |     protected HttpResponse doPostJsonRequest(String adminUser, | ||||||
|                                     String adminPassword, |                                     String adminPassword, | ||||||
| @@ -527,18 +469,12 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Helper method for POST requests to slingshot. |      * Helper method for POST requests to slingshot. | ||||||
|      * |      * | ||||||
|      * @param adminUser |      * @param adminUser user with administrative privileges | ||||||
|      *            user with administrative privileges |      * @param adminPassword password for adminUser | ||||||
|      * @param adminPassword |      * @param expectedStatusCode The expected return status code. | ||||||
|      *            password for adminUser |      * @param requestParams zero or more endpoint specific request parameters | ||||||
|      * @param expectedStatusCode |      * @param urlTemplate request URL template | ||||||
|      *            The expected return status code. |      * @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i> | ||||||
|      * @param requestParams |  | ||||||
|      *            zero or more endpoint specific request parameters |  | ||||||
|      * @param urlTemplate |  | ||||||
|      *            request URL template |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            zero or more parameters used with <i>urlTemplate</i> |  | ||||||
|      */ |      */ | ||||||
|     protected HttpResponse doSlingshotPostJsonRequest(String adminUser, |     protected HttpResponse doSlingshotPostJsonRequest(String adminUser, | ||||||
|                 String adminPassword, |                 String adminPassword, | ||||||
| @@ -554,22 +490,14 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Helper method for POST requests |      * Helper method for POST requests | ||||||
|      * |      * | ||||||
|      * @param adminUser |      * @param adminUser user with administrative privileges | ||||||
|      *            user with administrative privileges |      * @param adminPassword password for adminUser | ||||||
|      * @param adminPassword |      * @param expectedStatusCode The expected return status code. | ||||||
|      *            password for adminUser |      * @param urlStart the start of the URL (for example "alfresco/s/slingshot"). | ||||||
|      * @param expectedStatusCode |      * @param requestParams zero or more endpoint specific request parameters | ||||||
|      *            The expected return status code. |      * @param urlTemplate request URL template | ||||||
|      * @param urlStart |      * @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i> | ||||||
|      *            the start of the URL (for example "alfresco/s/slingshot"). |      * @throws AssertionError if the returned status code is not as expected. | ||||||
|      * @param requestParams |  | ||||||
|      *            zero or more endpoint specific request parameters |  | ||||||
|      * @param urlTemplate |  | ||||||
|      *            request URL template |  | ||||||
|      * @param urlTemplateParams |  | ||||||
|      *            zero or more parameters used with <i>urlTemplate</i> |  | ||||||
|      * @throws AssertionError |  | ||||||
|      *             if the returned status code is not as expected. |  | ||||||
|      */ |      */ | ||||||
|     private HttpResponse doPostJsonRequest(String adminUser, |     private HttpResponse doPostJsonRequest(String adminUser, | ||||||
|                 String adminPassword, |                 String adminPassword, | ||||||
| @@ -601,8 +529,7 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Try to convert the response body to a JSON object. |      * Try to convert the response body to a JSON object. | ||||||
|      * |      * | ||||||
|      * @param response |      * @param response The response. | ||||||
|      *            The response. |  | ||||||
|      * @return The JSON object or null if it was not possible to convert the response. |      * @return The JSON object or null if it was not possible to convert the response. | ||||||
|      */ |      */ | ||||||
|     private JSONObject responseBodyToJson(HttpResponse response) |     private JSONObject responseBodyToJson(HttpResponse response) | ||||||
| @@ -627,22 +554,14 @@ public abstract class BaseAPI | |||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Helper method for handling generic HTTP requests |      * Helper method for handling generic HTTP requests | ||||||
|      *  |      * @param requestType request type (a subclass of {@link HttpRequestBase}) | ||||||
|      * @param requestType |      * @param requestUrl URL the request is to be sent to | ||||||
|      *            request type (a subclass of {@link HttpRequestBase}) |      * @param adminUser user with administrative privileges | ||||||
|      * @param requestUrl |      * @param adminPassword password for adminUser | ||||||
|      *            URL the request is to be sent to |      * @param requestParams endpoint specific request parameters | ||||||
|      * @param adminUser |  | ||||||
|      *            user with administrative privileges |  | ||||||
|      * @param adminPassword |  | ||||||
|      *            password for adminUser |  | ||||||
|      * @param requestParams |  | ||||||
|      *            endpoint specific request parameters |  | ||||||
|      * @return response body |      * @return response body | ||||||
|      * @throws IllegalAccessException |      * @throws IllegalAccessException for invalid <i>requestType</i> | ||||||
|      *             for invalid <i>requestType</i> |      * @throws InstantiationException for invalid <i>requestType</i> | ||||||
|      * @throws InstantiationException |  | ||||||
|      *             for invalid <i>requestType</i> |  | ||||||
|      */ |      */ | ||||||
|     private <T extends HttpRequestBase> JSONObject doRequest( |     private <T extends HttpRequestBase> JSONObject doRequest( | ||||||
|         Class<T> requestType, |         Class<T> requestType, | ||||||
| @@ -767,16 +686,40 @@ public abstract class BaseAPI | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Used to set RM items properties including records, categories and folders |      * Used to set RM items properties | ||||||
|  |      * including records, categories and folders | ||||||
|      */ |      */ | ||||||
|     public enum RMProperty |     public enum RMProperty | ||||||
|     { |     { | ||||||
|         NAME, TITLE, CONTENT, DESCRIPTION, AUTHOR, PHYSICAL_SIZE, NUMBER_OF_COPIES, STORAGE_LOCATION, SHELF, BOX, FILE, ORIGINATOR, ORIGINATING_ORGANIZATION, PUBLICATION_DATE |         NAME, | ||||||
|  |         TITLE, | ||||||
|  |         CONTENT, | ||||||
|  |         DESCRIPTION, | ||||||
|  |         AUTHOR, | ||||||
|  |         PHYSICAL_SIZE, | ||||||
|  |         NUMBER_OF_COPIES, | ||||||
|  |         STORAGE_LOCATION, | ||||||
|  |         SHELF, | ||||||
|  |         BOX, | ||||||
|  |         FILE, | ||||||
|  |         ORIGINATOR, | ||||||
|  |         ORIGINATING_ORGANIZATION, | ||||||
|  |         PUBLICATION_DATE | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public enum RETENTION_SCHEDULE |     public enum RETENTION_SCHEDULE | ||||||
|     { |     { | ||||||
|         NAME, DESCRIPTION, RETENTION_AUTHORITY, RETENTION_INSTRUCTIONS, RETENTION_PERIOD, RETENTION_LOCATION, RETENTION_PERIOD_PROPERTY, RETENTION_GHOST, RETENTION_ELIGIBLE_FIRST_EVENT, RETENTION_EVENTS, COMBINE_DISPOSITION_STEP_CONDITIONS |         NAME, | ||||||
|  |         DESCRIPTION, | ||||||
|  |         RETENTION_AUTHORITY, | ||||||
|  |         RETENTION_INSTRUCTIONS, | ||||||
|  |         RETENTION_PERIOD, | ||||||
|  |         RETENTION_LOCATION, | ||||||
|  |         RETENTION_PERIOD_PROPERTY, | ||||||
|  |         RETENTION_GHOST, | ||||||
|  |         RETENTION_ELIGIBLE_FIRST_EVENT, | ||||||
|  |         RETENTION_EVENTS, | ||||||
|  |         COMBINE_DISPOSITION_STEP_CONDITIONS | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -784,8 +727,14 @@ public abstract class BaseAPI | |||||||
|      */ |      */ | ||||||
|     public enum RM_ACTIONS |     public enum RM_ACTIONS | ||||||
|     { |     { | ||||||
|         EDIT_DISPOSITION_DATE("editDispositionActionAsOfDate"), END_RETENTION("retain"), CUT_OFF("cutoff"), UNDO_CUT_OFF("undoCutoff"), TRANSFER("transfer"), COMPLETE_EVENT("completeEvent"), UNDO_EVENT("undoEvent"), DESTROY("destroy"); |         EDIT_DISPOSITION_DATE("editDispositionActionAsOfDate"), | ||||||
|  |         END_RETENTION("retain"), | ||||||
|  |         CUT_OFF("cutoff"), | ||||||
|  |         UNDO_CUT_OFF("undoCutoff"), | ||||||
|  |         TRANSFER("transfer"), | ||||||
|  |         COMPLETE_EVENT("completeEvent"), | ||||||
|  |         UNDO_EVENT("undoEvent"), | ||||||
|  |         DESTROY("destroy"); | ||||||
|         String action; |         String action; | ||||||
|  |  | ||||||
|         private RM_ACTIONS(String action) |         private RM_ACTIONS(String action) | ||||||
| @@ -801,16 +750,17 @@ public abstract class BaseAPI | |||||||
|  |  | ||||||
|     public enum PermissionType |     public enum PermissionType | ||||||
|     { |     { | ||||||
|         SET_READ, REMOVE_READ, SET_READ_AND_FILE, REMOVE_READ_AND_FILE, |         SET_READ, | ||||||
|  |         REMOVE_READ, | ||||||
|  |         SET_READ_AND_FILE, | ||||||
|  |         REMOVE_READ_AND_FILE, | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Util to return the property value from a map |      * Util to return the property value from a map | ||||||
|      * |      * | ||||||
|      * @param properties |      * @param properties the map containing properties | ||||||
|      *            the map containing properties |      * @param property   to get value for | ||||||
|      * @param property |  | ||||||
|      *            to get value for |  | ||||||
|      * @return the property value |      * @return the property value | ||||||
|      */ |      */ | ||||||
|     public <K extends Enum<?>> String getPropertyValue(Map<K, String> properties, Enum<?> property) |     public <K extends Enum<?>> String getPropertyValue(Map<K, String> properties, Enum<?> property) | ||||||
| @@ -826,14 +776,10 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Retrieves the property value and decides if that gets to be added to the request |      * Retrieves the property value and decides if that gets to be added to the request | ||||||
|      * |      * | ||||||
|      * @param requestParams |      * @param requestParams        the request parameters | ||||||
|      *            the request parameters |      * @param propertyRequestValue the property name in the request, eg. "prop_cm_name" | ||||||
|      * @param propertyRequestValue |      * @param itemProperties       map of item's properties values | ||||||
|      *            the property name in the request, eg. "prop_cm_name" |      * @param property             the property in the property map to check value for | ||||||
|      * @param itemProperties |  | ||||||
|      *            map of item's properties values |  | ||||||
|      * @param property |  | ||||||
|      *            the property in the property map to check value for |  | ||||||
|      * @return the json object used in request with the property with its value added if that is not null or empty |      * @return the json object used in request with the property with its value added if that is not null or empty | ||||||
|      */ |      */ | ||||||
|     protected <K extends Enum<?>> JSONObject addPropertyToRequest(JSONObject requestParams, String propertyRequestValue, Map<K, String> itemProperties, Enum<?> property) throws JSONException |     protected <K extends Enum<?>> JSONObject addPropertyToRequest(JSONObject requestParams, String propertyRequestValue, Map<K, String> itemProperties, Enum<?> property) throws JSONException | ||||||
| @@ -850,14 +796,12 @@ public abstract class BaseAPI | |||||||
|     /** |     /** | ||||||
|      * Deletes the category, folder or record given as parameter |      * Deletes the category, folder or record given as parameter | ||||||
|      * |      * | ||||||
|      * @param username |      * @param username the username with whom the delete is performed | ||||||
|      *            the username with whom the delete is performed |      * @param password the user's password | ||||||
|      * @param password |      * @param itemPath the path to the item eg. in case of a category it would be the "/" + category name, | ||||||
|      *            the user's password |      *                 in case of a folder or subCategory it would be /categoryName/folderName or /categoryName/subCategoryName/ | ||||||
|      * @param itemPath |      *                 in case of a record /categoryName/folderName/recordName | ||||||
|      *            the path to the item eg. in case of a category it would be the "/" + category name, in case of a folder or subCategory it would be /categoryName/folderName or /categoryName/subCategoryName/ in case of a record /categoryName/folderName/recordName |      * @throws AssertionError if the delete was not successful. | ||||||
|      * @throws AssertionError |  | ||||||
|      *             if the delete was not successful. |  | ||||||
|      */ |      */ | ||||||
|     protected void deleteItem(String username, String password, String itemPath) |     protected void deleteItem(String username, String password, String itemPath) | ||||||
|     { |     { | ||||||
|   | |||||||
| @@ -28,8 +28,13 @@ package org.alfresco.rest.core.v0; | |||||||
|  |  | ||||||
| public enum RMEvents | public enum RMEvents | ||||||
| { | { | ||||||
|     ABOLISHED("abolished"), ALL_ALLOWANCES_GRANTED_ARE_TERMINATED("all_allowances_granted_are_terminated"), CASE_CLOSED("case_closed"), DECLASSIFICATION_REVIEW("declassification_review"), OBSOLETE("obsolete"), NO_LONGER_NEEDED("no_longer_needed"), STUDY_COMPLETE("study_complete"); |     ABOLISHED("abolished"), | ||||||
|  |     ALL_ALLOWANCES_GRANTED_ARE_TERMINATED("all_allowances_granted_are_terminated"), | ||||||
|  |     CASE_CLOSED("case_closed"), | ||||||
|  |     DECLASSIFICATION_REVIEW("declassification_review"), | ||||||
|  |     OBSOLETE("obsolete"), | ||||||
|  |     NO_LONGER_NEEDED("no_longer_needed"), | ||||||
|  |     STUDY_COMPLETE("study_complete"); | ||||||
|     private String eventName; |     private String eventName; | ||||||
|  |  | ||||||
|     RMEvents(String eventName) |     RMEvents(String eventName) | ||||||
|   | |||||||
| @@ -30,11 +30,11 @@ import java.util.List; | |||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -35,7 +35,18 @@ package org.alfresco.rest.rm.community.model.audit; | |||||||
|  */ |  */ | ||||||
| public enum AuditEvents | public enum AuditEvents | ||||||
| { | { | ||||||
|     CREATE_PERSON("Create Person", "Create User"), DELETE_PERSON("Delete Person", "Delete User"), CREATE_USER_GROUP("Create User Group", "Create User Group"), DELETE_USER_GROUP("Delete User Group", "Delete User Group"), ADD_TO_USER_GROUP("Add To User Group", "Add To User Group"), REMOVE_FROM_USER_GROUP("Remove From User Group", "Remove From User Group"), LOGIN_UNSUCCESSFUL("Login.Failure", "Login Unsuccessful"), LOGIN_SUCCESSFUL("Login.Success", "Login Successful"), CREATE_HOLD("Create Hold", "Create Hold"), DELETE_HOLD("Delete Hold", "Delete Hold"), ADD_TO_HOLD("Add To Hold", "Add To Hold"), REMOVE_FROM_HOLD("Remove From Hold", "Remove From Hold"); |     CREATE_PERSON("Create Person", "Create User"), | ||||||
|  |     DELETE_PERSON("Delete Person", "Delete User"), | ||||||
|  |     CREATE_USER_GROUP("Create User Group", "Create User Group"), | ||||||
|  |     DELETE_USER_GROUP("Delete User Group", "Delete User Group"), | ||||||
|  |     ADD_TO_USER_GROUP("Add To User Group", "Add To User Group"), | ||||||
|  |     REMOVE_FROM_USER_GROUP("Remove From User Group", "Remove From User Group"), | ||||||
|  |     LOGIN_UNSUCCESSFUL("Login.Failure", "Login Unsuccessful"), | ||||||
|  |     LOGIN_SUCCESSFUL("Login.Success", "Login Successful"), | ||||||
|  |     CREATE_HOLD("Create Hold", "Create Hold"), | ||||||
|  |     DELETE_HOLD("Delete Hold", "Delete Hold"), | ||||||
|  |     ADD_TO_HOLD("Add To Hold", "Add To Hold"), | ||||||
|  |     REMOVE_FROM_HOLD("Remove From Hold", "Remove From Hold"); | ||||||
|  |  | ||||||
|     /** event audited */ |     /** event audited */ | ||||||
|     public final String event; |     public final String event; | ||||||
|   | |||||||
| @@ -29,6 +29,7 @@ package org.alfresco.rest.rm.community.model.common; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|   | |||||||
| @@ -27,10 +27,10 @@ | |||||||
| package org.alfresco.rest.rm.community.model.common; | package org.alfresco.rest.rm.community.model.common; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
|  |  | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -29,14 +29,15 @@ package org.alfresco.rest.rm.community.model.common; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for path parameter |  * POJO for path parameter | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -27,6 +27,7 @@ | |||||||
| package org.alfresco.rest.rm.community.model.common; | package org.alfresco.rest.rm.community.model.common; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|   | |||||||
| @@ -34,8 +34,10 @@ package org.alfresco.rest.rm.community.model.custom; | |||||||
|  */ |  */ | ||||||
| public enum CustomDefinitions | public enum CustomDefinitions | ||||||
| { | { | ||||||
|     ATTACHMENT("Attachment"), MESSAGE("Message"), NEXT_VERSION("Next Version"), RENDITION("Rendition"); |     ATTACHMENT("Attachment"), | ||||||
|  |     MESSAGE("Message"), | ||||||
|  |     NEXT_VERSION("Next Version"), | ||||||
|  |     RENDITION("Rendition"); | ||||||
|     /** |     /** | ||||||
|      * The name of custom reference. |      * The name of custom reference. | ||||||
|      */ |      */ | ||||||
|   | |||||||
| @@ -29,16 +29,17 @@ package org.alfresco.rest.rm.community.model.fileplan; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Path; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Path; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for file plan |  * POJO for file plan | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -34,14 +34,15 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo | |||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for file plan properties |  * POJO for file plan properties | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -36,7 +36,8 @@ public class FilePlanComponentAspects | |||||||
| { | { | ||||||
|     /** Private constructor to prevent instantiation. */ |     /** Private constructor to prevent instantiation. */ | ||||||
|     private FilePlanComponentAspects() |     private FilePlanComponentAspects() | ||||||
|     {} |     { | ||||||
|  |     } | ||||||
|  |  | ||||||
|     // aspect present on completed records |     // aspect present on completed records | ||||||
|     public static final String ASPECTS_COMPLETED_RECORD = "rma:declaredRecord"; |     public static final String ASPECTS_COMPLETED_RECORD = "rma:declaredRecord"; | ||||||
|   | |||||||
| @@ -29,11 +29,11 @@ package org.alfresco.rest.rm.community.model.hold; | |||||||
| import java.util.Objects; | import java.util.Objects; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -27,11 +27,11 @@ | |||||||
| package org.alfresco.rest.rm.community.model.hold; | package org.alfresco.rest.rm.community.model.hold; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.search.RestRequestQueryModel; | import org.alfresco.rest.search.RestRequestQueryModel; | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -26,6 +26,8 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.model.hold; | package org.alfresco.rest.rm.community.model.hold; | ||||||
|  |  | ||||||
|  | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|   | |||||||
| @@ -30,7 +30,6 @@ import lombok.AllArgsConstructor; | |||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -34,4 +34,5 @@ import org.alfresco.rest.core.RestModels; | |||||||
|  * @author Damian Ujma |  * @author Damian Ujma | ||||||
|  */ |  */ | ||||||
| public class HoldBulkStatusCollection extends RestModels<HoldBulkStatusEntry, HoldBulkStatusCollection> | public class HoldBulkStatusCollection extends RestModels<HoldBulkStatusEntry, HoldBulkStatusCollection> | ||||||
| {} | { | ||||||
|  | } | ||||||
|   | |||||||
| @@ -26,12 +26,13 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.model.hold; | package org.alfresco.rest.rm.community.model.hold; | ||||||
|  |  | ||||||
|  | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
| @Builder | @Builder | ||||||
|   | |||||||
| @@ -27,12 +27,12 @@ | |||||||
| package org.alfresco.rest.rm.community.model.hold; | package org.alfresco.rest.rm.community.model.hold; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -34,4 +34,5 @@ import org.alfresco.rest.core.RestModels; | |||||||
|  * @author Damian Ujma |  * @author Damian Ujma | ||||||
|  */ |  */ | ||||||
| public class HoldChildCollection extends RestModels<HoldChildEntry, HoldChildCollection> | public class HoldChildCollection extends RestModels<HoldChildEntry, HoldChildCollection> | ||||||
| {} | { | ||||||
|  | } | ||||||
|   | |||||||
| @@ -27,12 +27,12 @@ | |||||||
| package org.alfresco.rest.rm.community.model.hold; | package org.alfresco.rest.rm.community.model.hold; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -34,4 +34,5 @@ import org.alfresco.rest.core.RestModels; | |||||||
|  * @author Damian Ujma |  * @author Damian Ujma | ||||||
|  */ |  */ | ||||||
| public class HoldCollection extends RestModels<HoldEntry, HoldCollection> | public class HoldCollection extends RestModels<HoldEntry, HoldCollection> | ||||||
| {} | { | ||||||
|  | } | ||||||
|   | |||||||
| @@ -27,12 +27,12 @@ | |||||||
| package org.alfresco.rest.rm.community.model.hold; | package org.alfresco.rest.rm.community.model.hold; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -27,12 +27,12 @@ | |||||||
| package org.alfresco.rest.rm.community.model.hold; | package org.alfresco.rest.rm.community.model.hold; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -27,12 +27,12 @@ | |||||||
| package org.alfresco.rest.rm.community.model.hold; | package org.alfresco.rest.rm.community.model.hold; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -28,11 +28,11 @@ package org.alfresco.rest.rm.community.model.hold.v0; | |||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -29,11 +29,6 @@ package org.alfresco.rest.rm.community.model.record; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import lombok.AllArgsConstructor; |  | ||||||
| import lombok.Builder; |  | ||||||
| import lombok.Data; |  | ||||||
| import lombok.EqualsAndHashCode; |  | ||||||
| import lombok.NoArgsConstructor; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.IRestModel; | import org.alfresco.rest.core.IRestModel; | ||||||
| import org.alfresco.rest.core.assertion.ModelAssertion; | import org.alfresco.rest.core.assertion.ModelAssertion; | ||||||
| @@ -42,6 +37,12 @@ import org.alfresco.rest.model.RestNodeModel; | |||||||
| import org.alfresco.rest.rm.community.model.common.Path; | import org.alfresco.rest.rm.community.model.common.Path; | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
|  | import lombok.AllArgsConstructor; | ||||||
|  | import lombok.Builder; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record |  * POJO for record | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -27,14 +27,15 @@ | |||||||
| package org.alfresco.rest.rm.community.model.record; | package org.alfresco.rest.rm.community.model.record; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for File records |  * POJO for File records | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -27,14 +27,15 @@ | |||||||
| package org.alfresco.rest.rm.community.model.record; | package org.alfresco.rest.rm.community.model.record; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record content field |  * POJO for record content field | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -64,6 +64,7 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo | |||||||
| 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; | ||||||
| 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_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_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_REVIEW_AS_OF; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RMV_VERSIONED; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RMV_VERSIONED; | ||||||
| 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_ROOT_NODE_REF; | ||||||
| @@ -84,12 +85,12 @@ import java.util.List; | |||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Owner; | import org.alfresco.rest.rm.community.model.common.Owner; | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,16 +29,17 @@ package org.alfresco.rest.rm.community.model.recordcategory; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Path; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Path; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record category |  * POJO for record category | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -29,16 +29,17 @@ package org.alfresco.rest.rm.community.model.recordcategory; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Path; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Path; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record category child |  * POJO for record category child | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -27,11 +27,12 @@ | |||||||
| package org.alfresco.rest.rm.community.model.recordcategory; | package org.alfresco.rest.rm.community.model.recordcategory; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import lombok.Data; |  | ||||||
| import lombok.EqualsAndHashCode; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record category child entry |  * POJO for record category child entry | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -32,15 +32,15 @@ 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_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_LOCATION; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER; | 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_ACTION_AS_OF; |  | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_ACTION_NAME; |  | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY; |  | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS; | ||||||
|  | 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_DISPOSITION_PERIOD_EXPRESSION; | ||||||
|  | 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_ACTION_AS_OF; | ||||||
|  | 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_ACTION_NAME; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_EVENTS_ELIGIBLE; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS; | ||||||
| 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_REVIEW_PERIOD; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_REVIEW_PERIOD; | ||||||
| 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_ROOT_NODE_REF; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE; | ||||||
| @@ -51,17 +51,18 @@ import java.util.List; | |||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import com.fasterxml.jackson.databind.annotation.JsonSerialize; | import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||||||
| 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.rest.rm.community.model.common.Owner; | ||||||
| import org.alfresco.rest.rm.community.model.common.ReviewPeriod; | import org.alfresco.rest.rm.community.model.common.ReviewPeriod; | ||||||
| import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer; | import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer; | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
|  | import lombok.AllArgsConstructor; | ||||||
|  | import lombok.Builder; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record category child properties |  * POJO for record category child properties | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -27,12 +27,13 @@ | |||||||
| package org.alfresco.rest.rm.community.model.recordcategory; | package org.alfresco.rest.rm.community.model.recordcategory; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import lombok.Data; |  | ||||||
| import lombok.EqualsAndHashCode; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
| import org.alfresco.rest.rm.community.model.fileplan.FilePlan; | import org.alfresco.rest.rm.community.model.fileplan.FilePlan; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for file plan entry |  * POJO for file plan entry | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -35,22 +35,24 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo | |||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TITLE; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VITAL_RECORD_INDICATOR; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_VITAL_RECORD_INDICATOR; | ||||||
|  |  | ||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import com.fasterxml.jackson.databind.annotation.JsonSerialize; | import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||||||
| 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.rest.rm.community.model.common.Owner; | ||||||
| import org.alfresco.rest.rm.community.model.common.ReviewPeriod; | import org.alfresco.rest.rm.community.model.common.ReviewPeriod; | ||||||
| import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer; | import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer; | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
|  | import lombok.AllArgsConstructor; | ||||||
|  | import lombok.Builder; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record category properties |  * POJO for record category properties | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -29,16 +29,17 @@ package org.alfresco.rest.rm.community.model.recordfolder; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Path; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Path; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record folder |  * POJO for record folder | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -27,15 +27,16 @@ | |||||||
| package org.alfresco.rest.rm.community.model.recordfolder; | package org.alfresco.rest.rm.community.model.recordfolder; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.core.RestModels; | ||||||
|  | import org.alfresco.rest.rm.community.model.record.Record; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; |  | ||||||
| import org.alfresco.rest.rm.community.model.record.Record; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record folder entry |  * POJO for record folder entry | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -33,8 +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_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_LOCATION; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER; | 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 | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS; |         .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_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; | ||||||
| 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_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION; | ||||||
| @@ -48,17 +50,18 @@ import java.util.List; | |||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import com.fasterxml.jackson.databind.annotation.JsonSerialize; | import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||||||
| 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.rest.rm.community.model.common.Owner; | ||||||
| import org.alfresco.rest.rm.community.model.common.ReviewPeriod; | import org.alfresco.rest.rm.community.model.common.ReviewPeriod; | ||||||
| import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer; | import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer; | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
|  | import lombok.AllArgsConstructor; | ||||||
|  | import lombok.Builder; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record folder properties |  * POJO for record folder properties | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -26,12 +26,11 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.model.retentionschedule; | package org.alfresco.rest.rm.community.model.retentionschedule; | ||||||
|  |  | ||||||
| import java.util.List; |  | ||||||
|  |  | ||||||
| import lombok.Data; |  | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; | import org.alfresco.utility.model.TestModel; | ||||||
|  | import lombok.Data; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * retention schedule |  * retention schedule | ||||||
| @@ -53,8 +52,7 @@ public class RetentionSchedule extends TestModel | |||||||
|         return isRecordLevel; |         return isRecordLevel; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public void setIsRecordLevel(boolean recordLevel) |     public void setIsRecordLevel(boolean recordLevel) { | ||||||
|     { |  | ||||||
|         isRecordLevel = recordLevel; |         isRecordLevel = recordLevel; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -27,7 +27,6 @@ | |||||||
| package org.alfresco.rest.rm.community.model.retentionschedule; | package org.alfresco.rest.rm.community.model.retentionschedule; | ||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|   | |||||||
| @@ -27,6 +27,6 @@ | |||||||
| package org.alfresco.rest.rm.community.model.retentionschedule; | package org.alfresco.rest.rm.community.model.retentionschedule; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
| public class RetentionScheduleCollection extends RestModels<RetentionScheduleEntry, RetentionScheduleCollection> | public class RetentionScheduleCollection extends RestModels<RetentionScheduleEntry, RetentionScheduleCollection> | ||||||
| {} | { | ||||||
|  | } | ||||||
|   | |||||||
| @@ -28,9 +28,7 @@ package org.alfresco.rest.rm.community.model.retentionschedule; | |||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
| @Data | @Data | ||||||
| public class RetentionScheduleEntry extends RestModels<RetentionSchedule, RetentionScheduleEntry> | public class RetentionScheduleEntry extends RestModels<RetentionSchedule, RetentionScheduleEntry> | ||||||
| { | { | ||||||
|   | |||||||
| @@ -29,4 +29,5 @@ package org.alfresco.rest.rm.community.model.retentionschedule; | |||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
| public class RetentionScheduleStepCollection extends RestModels<RetentionScheduleStepEntry, RetentionScheduleStepCollection> | public class RetentionScheduleStepCollection extends RestModels<RetentionScheduleStepEntry, RetentionScheduleStepCollection> | ||||||
| {} | { | ||||||
|  | } | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ package org.alfresco.rest.rm.community.model.retentionschedule; | |||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
| @Data | @Data | ||||||
|   | |||||||
| @@ -31,7 +31,26 @@ package org.alfresco.rest.rm.community.model.rules; | |||||||
|  */ |  */ | ||||||
| public enum ActionsOnRule | public enum ActionsOnRule | ||||||
| { | { | ||||||
|     COMPLETE_RECORD("declareRecord"), REOPEN_RECORD("undeclareRecord"), OPEN_RECORD_FOLDER("openRecordFolder"), CLOSE_RECORD_FOLDER("closeRecordFolder"), FILE_TO("fileTo"), COPY_TO("copyTo"), MOVE_TO("moveTo"), LINK_TO("linkTo"), REJECT("reject"), REQUEST_INFORMATION("requestInfo"), COMPLETE_EVENT("completeEvent"), ADD_RECORD_TYPES("addRecordTypes"), EXECUTE_SCRIPT("executeScript"), SEND_EMAIL("sendEmail"), SET_PROPERTY_VALUE_COLL_SITE("set-property-value"), SET_PROPERTY_VALUE_RM("setPropertyValue"), HIDE_RECORD("hide-record"), DECLARE_VERSION_AS_RECORD("declare-as-version-record"), DECLARE_AS_RECORD("create-record"), WORM_LOCK("wormLock"); |     COMPLETE_RECORD("declareRecord"), | ||||||
|  |     REOPEN_RECORD("undeclareRecord"), | ||||||
|  |     OPEN_RECORD_FOLDER("openRecordFolder"), | ||||||
|  |     CLOSE_RECORD_FOLDER("closeRecordFolder"), | ||||||
|  |     FILE_TO("fileTo"), | ||||||
|  |     COPY_TO("copyTo"), | ||||||
|  |     MOVE_TO("moveTo"), | ||||||
|  |     LINK_TO("linkTo"), | ||||||
|  |     REJECT("reject"), | ||||||
|  |     REQUEST_INFORMATION("requestInfo"), | ||||||
|  |     COMPLETE_EVENT("completeEvent"), | ||||||
|  |     ADD_RECORD_TYPES("addRecordTypes"), | ||||||
|  |     EXECUTE_SCRIPT("executeScript"), | ||||||
|  |     SEND_EMAIL("sendEmail"), | ||||||
|  |     SET_PROPERTY_VALUE_COLL_SITE("set-property-value"), | ||||||
|  |     SET_PROPERTY_VALUE_RM("setPropertyValue"), | ||||||
|  |     HIDE_RECORD("hide-record"), | ||||||
|  |     DECLARE_VERSION_AS_RECORD("declare-as-version-record"), | ||||||
|  |     DECLARE_AS_RECORD("create-record"), | ||||||
|  |     WORM_LOCK("wormLock"); | ||||||
|  |  | ||||||
|     private String actionValue; |     private String actionValue; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -31,8 +31,9 @@ package org.alfresco.rest.rm.community.model.rules; | |||||||
|  */ |  */ | ||||||
| public enum ConditionsOnRule | public enum ConditionsOnRule | ||||||
| { | { | ||||||
|     UPDATE("update"), ADDED("inbound"), REMOVED("outbound"); |     UPDATE("update"), | ||||||
|  |     ADDED("inbound"), | ||||||
|  |     REMOVED("outbound"); | ||||||
|     private String whenConditionValue; |     private String whenConditionValue; | ||||||
|  |  | ||||||
|     ConditionsOnRule(String value) |     ConditionsOnRule(String value) | ||||||
|   | |||||||
| @@ -200,3 +200,4 @@ public class RuleDefinition | |||||||
|         return this; |         return this; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -27,14 +27,15 @@ | |||||||
| package org.alfresco.rest.rm.community.model.site; | package org.alfresco.rest.rm.community.model.site; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestSiteModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestSiteModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for RM Site component |  * POJO for RM Site component | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -34,5 +34,6 @@ package org.alfresco.rest.rm.community.model.site; | |||||||
|  */ |  */ | ||||||
| public enum RMSiteCompliance | public enum RMSiteCompliance | ||||||
| { | { | ||||||
|     STANDARD, DOD5015 |     STANDARD, | ||||||
|  |     DOD5015 | ||||||
| } | } | ||||||
|   | |||||||
| @@ -27,8 +27,16 @@ | |||||||
| package org.alfresco.rest.rm.community.model.site; | package org.alfresco.rest.rm.community.model.site; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * RM Site properties from the RM Model Schema "entry": { "id": "string", "guid": "string", "title": "string", "description": "string", "visibility": "{@link org.springframework.social.alfresco.api.entities.Site.Visibility}", "compliance": "{@link RMSiteCompliance}", "role": "{@link org.alfresco.utility.constants.UserRole}" } |  *RM Site properties from the RM Model Schema | ||||||
|  *  |  *"entry": { | ||||||
|  |  *      "id": "string", | ||||||
|  |  *      "guid": "string", | ||||||
|  |  *      "title": "string", | ||||||
|  |  *      "description": "string", | ||||||
|  |  *      "visibility": "{@link org.springframework.social.alfresco.api.entities.Site.Visibility}", | ||||||
|  |  *      "compliance": "{@link RMSiteCompliance}", | ||||||
|  |  *      "role": "{@link org.alfresco.utility.constants.UserRole}" | ||||||
|  |  *} | ||||||
|  * @author Tuna Aksoy |  * @author Tuna Aksoy | ||||||
|  * @author Rodica Sutu |  * @author Rodica Sutu | ||||||
|  * @since 2.6 |  * @since 2.6 | ||||||
|   | |||||||
| @@ -30,15 +30,16 @@ package org.alfresco.rest.rm.community.model.transfer; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for Transfer |  * POJO for Transfer | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -30,16 +30,17 @@ package org.alfresco.rest.rm.community.model.transfer; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Path; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Path; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for transfer child |  * POJO for transfer child | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -31,7 +31,6 @@ import org.alfresco.rest.core.RestModels; | |||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Handle collection of {@link TransferChildEntry} |  * Handle collection of {@link TransferChildEntry} | ||||||
|  *  |  | ||||||
|  * @author Silviu Dinuta |  * @author Silviu Dinuta | ||||||
|  * @since 2.6 |  * @since 2.6 | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -27,15 +27,16 @@ | |||||||
|  |  | ||||||
| package org.alfresco.rest.rm.community.model.transfer; | package org.alfresco.rest.rm.community.model.transfer; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for transfer child entry |  * POJO for transfer child entry | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -64,19 +64,20 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo | |||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_X_RESOLUTION; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_X_RESOLUTION; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_Y_RESOLUTION; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_Y_RESOLUTION; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Owner; | ||||||
|  | import org.alfresco.rest.rm.community.model.common.ReviewPeriod; | ||||||
|  | import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import com.fasterxml.jackson.databind.annotation.JsonSerialize; | import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Owner; |  | ||||||
| import org.alfresco.rest.rm.community.model.common.ReviewPeriod; |  | ||||||
| import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for transfer child properties |  * POJO for transfer child properties | ||||||
|  * |  * | ||||||
| @@ -136,6 +137,7 @@ public class TransferChildProperties extends TestModel | |||||||
|     @JsonProperty (PROPERTIES_ORIGINAL_NAME) |     @JsonProperty (PROPERTIES_ORIGINAL_NAME) | ||||||
|     private String originalName; |     private String originalName; | ||||||
|  |  | ||||||
|  |  | ||||||
|     /*********************************/ |     /*********************************/ | ||||||
|     /** Electronic record parameters */ |     /** Electronic record parameters */ | ||||||
|     /*********************************/ |     /*********************************/ | ||||||
|   | |||||||
| @@ -31,7 +31,6 @@ import org.alfresco.rest.core.RestModels; | |||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Handle collection of {@link TransferEntry} |  * Handle collection of {@link TransferEntry} | ||||||
|  *  |  | ||||||
|  * @author Silviu Dinuta |  * @author Silviu Dinuta | ||||||
|  * @since 2.6 |  * @since 2.6 | ||||||
|  */ |  */ | ||||||
|   | |||||||
| @@ -27,16 +27,17 @@ | |||||||
|  |  | ||||||
| package org.alfresco.rest.rm.community.model.transfer; | package org.alfresco.rest.rm.community.model.transfer; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.core.RestModels; | ||||||
|  | import org.alfresco.rest.rm.community.model.transfercontainer.TransferContainer; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; |  | ||||||
| import org.alfresco.rest.rm.community.model.transfercontainer.TransferContainer; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for transfer entry |  * POJO for transfer entry | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -27,23 +27,24 @@ | |||||||
|  |  | ||||||
| package org.alfresco.rest.rm.community.model.transfer; | package org.alfresco.rest.rm.community.model.transfer; | ||||||
|  |  | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ACCESSION_INDICATOR; |  | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PDF_INDICATOR; |  | ||||||
| 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_ROOT_NODE_REF; | ||||||
|  | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_PDF_INDICATOR; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TRANSFER_LOCATION; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_TRANSFER_LOCATION; | ||||||
|  | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ACCESSION_INDICATOR; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Owner; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Owner; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for Transfer properties |  * POJO for Transfer properties | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -30,15 +30,16 @@ package org.alfresco.rest.rm.community.model.transfercontainer; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for Transfer Container |  * POJO for Transfer Container | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -31,15 +31,16 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo | |||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_IDENTIFIER; | 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 static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_ROOT_NODE_REF; | ||||||
|  |  | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for Transfer Container properties |  * POJO for Transfer Container properties | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -28,17 +28,18 @@ package org.alfresco.rest.rm.community.model.unfiledcontainer; | |||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Path; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Path; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for unfiled container |  * POJO for unfiled container | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -28,19 +28,20 @@ package org.alfresco.rest.rm.community.model.unfiledcontainer; | |||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Path; | ||||||
|  | import org.alfresco.rest.rm.community.model.record.RecordContent; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Path; |  | ||||||
| import org.alfresco.rest.rm.community.model.record.RecordContent; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record category child |  * POJO for record category child | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -27,11 +27,12 @@ | |||||||
| package org.alfresco.rest.rm.community.model.unfiledcontainer; | package org.alfresco.rest.rm.community.model.unfiledcontainer; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
| import lombok.Data; |  | ||||||
| import lombok.EqualsAndHashCode; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RestModels; | import org.alfresco.rest.core.RestModels; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record category child entry |  * POJO for record category child entry | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -61,15 +61,16 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo | |||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | 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.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Owner; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for record category child properties |  * POJO for record category child properties | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -31,14 +31,15 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo | |||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for file plan properties |  * POJO for file plan properties | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -28,18 +28,19 @@ package org.alfresco.rest.rm.community.model.unfiledcontainer; | |||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.model.RestByUserModel; | ||||||
|  | import org.alfresco.rest.rm.community.model.common.Path; | ||||||
|  | import org.alfresco.rest.rm.community.model.record.RecordContent; | ||||||
|  | import org.alfresco.utility.model.TestModel; | ||||||
|  |  | ||||||
| import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.JsonProperty; | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.Builder; | import lombok.Builder; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import lombok.NoArgsConstructor; | import lombok.NoArgsConstructor; | ||||||
|  |  | ||||||
| import org.alfresco.rest.model.RestByUserModel; |  | ||||||
| import org.alfresco.rest.rm.community.model.common.Path; |  | ||||||
| import org.alfresco.rest.rm.community.model.record.RecordContent; |  | ||||||
| import org.alfresco.utility.model.TestModel; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * POJO for unfiled container |  * POJO for unfiled container | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -34,7 +34,9 @@ package org.alfresco.rest.rm.community.model.user; | |||||||
|  */ |  */ | ||||||
| public enum UserPermissions | public enum UserPermissions | ||||||
| { | { | ||||||
|     PERMISSION_FILING("Filing"), PERMISSION_READ_RECORDS("ReadRecords"), PERMISSION_FILE_RECORDS("FileRecords"); |     PERMISSION_FILING("Filing"), | ||||||
|  |     PERMISSION_READ_RECORDS("ReadRecords"), | ||||||
|  |     PERMISSION_FILE_RECORDS("FileRecords"); | ||||||
|  |  | ||||||
|     public final String permissionId; |     public final String permissionId; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -35,7 +35,12 @@ package org.alfresco.rest.rm.community.model.user; | |||||||
|  */ |  */ | ||||||
| public enum UserRoles | public enum UserRoles | ||||||
| { | { | ||||||
|     IN_PLACE_WRITERS("ExtendedWriters", "In-Place Writers"), ROLE_RM_ADMIN("Administrator", "Records Management Administrator"), ROLE_RM_MANAGER("RecordsManager", "Records Management Manager"), ROLE_RM_POWER_USER("PowerUser", "Records Management Power User"), ROLE_RM_SECURITY_OFFICER("SecurityOfficer", "Records Management Security Officer"), ROLE_RM_USER("User", "Records Management User"); |     IN_PLACE_WRITERS("ExtendedWriters", "In-Place Writers"), | ||||||
|  |     ROLE_RM_ADMIN("Administrator", "Records Management Administrator"), | ||||||
|  |     ROLE_RM_MANAGER("RecordsManager", "Records Management Manager"), | ||||||
|  |     ROLE_RM_POWER_USER("PowerUser", "Records Management Power User"), | ||||||
|  |     ROLE_RM_SECURITY_OFFICER("SecurityOfficer", "Records Management Security Officer"), | ||||||
|  |     ROLE_RM_USER("User", "Records Management User"); | ||||||
|  |  | ||||||
|     public final String roleId; |     public final String roleId; | ||||||
|     public final String displayName; |     public final String displayName; | ||||||
| @@ -46,4 +51,5 @@ public enum UserRoles | |||||||
|         this.displayName = displayName; |         this.displayName = displayName; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -29,12 +29,12 @@ package org.alfresco.rest.rm.community.requests; | |||||||
| import static lombok.AccessLevel.PRIVATE; | import static lombok.AccessLevel.PRIVATE; | ||||||
| import static lombok.AccessLevel.PROTECTED; | import static lombok.AccessLevel.PROTECTED; | ||||||
|  |  | ||||||
| import lombok.Getter; |  | ||||||
| import lombok.Setter; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.requests.ModelRequest; | import org.alfresco.rest.requests.ModelRequest; | ||||||
|  |  | ||||||
|  | import lombok.Getter; | ||||||
|  | import lombok.Setter; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Extends {@link ModelRequest} to set {@link RMRestWrapper} |  * Extends {@link ModelRequest} to set {@link RMRestWrapper} | ||||||
|  * |  * | ||||||
|   | |||||||
| @@ -33,8 +33,8 @@ import io.restassured.RestAssured; | |||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestProperties; | import org.alfresco.rest.core.RMRestProperties; | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.requests.RMModelRequest; |  | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.ActionsExecutionAPI; | 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.FilePlanAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.FilesAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.FilesAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.HoldsAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.HoldsAPI; | ||||||
| @@ -43,14 +43,15 @@ import org.alfresco.rest.rm.community.requests.gscore.api.RMUserAPI; | |||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.RecordCategoryAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.RecordCategoryAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.RetentionScheduleAPI; |  | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.TransferAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.TransferAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.TransferContainerAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.TransferContainerAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI; | ||||||
| import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI; | import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI; | ||||||
|  | import org.alfresco.rest.rm.community.requests.gscore.api.RetentionScheduleAPI; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Defines the entire GS Core API {@link http://host:port/gs-api-explorer} select "GS Core API" |  * Defines the entire GS Core API | ||||||
|  |  * {@link http://host:port/gs-api-explorer} select "GS Core API" | ||||||
|  * |  * | ||||||
|  * @author Tuna Aksoy |  * @author Tuna Aksoy | ||||||
|  * @since 2.6 |  * @since 2.6 | ||||||
| @@ -60,10 +61,8 @@ public class GSCoreAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Constructor |      * Constructor | ||||||
|      * |      * | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |      * @param rmRestProperties RM REST Properties | ||||||
|      * @param rmRestProperties |  | ||||||
|      *            RM REST Properties |  | ||||||
|      */ |      */ | ||||||
|     public GSCoreAPI(RMRestWrapper rmRestWrapper, RMRestProperties rmRestProperties) |     public GSCoreAPI(RMRestWrapper rmRestWrapper, RMRestProperties rmRestProperties) | ||||||
|     { |     { | ||||||
| @@ -194,10 +193,7 @@ public class GSCoreAPI extends RMModelRequest | |||||||
|         return new ActionsExecutionAPI(getRmRestWrapper()); |         return new ActionsExecutionAPI(getRmRestWrapper()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public HoldsAPI usingHoldsAPI() |     public HoldsAPI usingHoldsAPI() { return new HoldsAPI(getRmRestWrapper()); } | ||||||
|     { |  | ||||||
|         return new HoldsAPI(getRmRestWrapper()); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     public RetentionScheduleAPI usingRetentionScheduleAPI() |     public RetentionScheduleAPI usingRetentionScheduleAPI() | ||||||
|     { |     { | ||||||
|   | |||||||
| @@ -27,13 +27,13 @@ | |||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import com.google.common.collect.ImmutableMap; | import com.google.common.collect.ImmutableMap; | ||||||
| import lombok.SneakyThrows; |  | ||||||
| import org.json.JSONObject; |  | ||||||
|  |  | ||||||
|  | import lombok.SneakyThrows; | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.rules.ActionsOnRule; | import org.alfresco.rest.rm.community.model.rules.ActionsOnRule; | ||||||
| import org.alfresco.rest.rm.community.requests.RMModelRequest; | import org.alfresco.rest.rm.community.requests.RMModelRequest; | ||||||
| import org.alfresco.utility.model.RepoTestModel; | import org.alfresco.utility.model.RepoTestModel; | ||||||
|  | import org.json.JSONObject; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Produces processed results from Core Actions API calls |  * Produces processed results from Core Actions API calls | ||||||
| @@ -44,8 +44,7 @@ import org.alfresco.utility.model.RepoTestModel; | |||||||
| public class ActionsExecutionAPI extends RMModelRequest | public class ActionsExecutionAPI extends RMModelRequest | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public ActionsExecutionAPI(RMRestWrapper rmRestWrapper) |     public ActionsExecutionAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -55,10 +54,8 @@ public class ActionsExecutionAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Declares and files a document as record to a record folder using v1 actions api |      * Declares and files a document as record to a record folder using v1 actions api | ||||||
|      * |      * | ||||||
|      * @param targetNode |      * @param targetNode      the node on which the action is executed | ||||||
|      *            the node on which the action is executed |      * @param destinationPath the path to the record folder | ||||||
|      * @param destinationPath |  | ||||||
|      *            the path to the record folder |  | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|     public JSONObject declareAndFile(RepoTestModel targetNode, String destinationPath) throws Exception |     public JSONObject declareAndFile(RepoTestModel targetNode, String destinationPath) throws Exception | ||||||
| @@ -71,8 +68,7 @@ public class ActionsExecutionAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Declares a document as record using v1 actions api |      * Declares a document as record using v1 actions api | ||||||
|      * |      * | ||||||
|      * @param targetNode |      * @param targetNode the node on which the action is executed | ||||||
|      *            the node on which the action is executed |  | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|     public JSONObject declareAsRecord(RepoTestModel targetNode) throws Exception |     public JSONObject declareAsRecord(RepoTestModel targetNode) throws Exception | ||||||
| @@ -81,13 +77,12 @@ public class ActionsExecutionAPI extends RMModelRequest | |||||||
|                                  .executeAction(ActionsOnRule.DECLARE_AS_RECORD.getActionValue(), targetNode); |                                  .executeAction(ActionsOnRule.DECLARE_AS_RECORD.getActionValue(), targetNode); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Declares and file a document version as record to a record folder using v1 actions api |      * Declares and file a document version as record to a record folder using v1 actions api | ||||||
|      * |      * | ||||||
|      * @param targetNode |      * @param targetNode      the node on which the action is executed | ||||||
|      *            the node on which the action is executed |      * @param destinationPath the path to the record folder | ||||||
|      * @param destinationPath |  | ||||||
|      *            the path to the record folder |  | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|     public JSONObject declareAndFileVersionAsRecord(RepoTestModel targetNode, String destinationPath) throws Exception |     public JSONObject declareAndFileVersionAsRecord(RepoTestModel targetNode, String destinationPath) throws Exception | ||||||
| @@ -100,8 +95,7 @@ public class ActionsExecutionAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Declares a document version as record using v1 actions api |      * Declares a document version as record using v1 actions api | ||||||
|      * |      * | ||||||
|      * @param targetNode |      * @param targetNode the node on which the action is executed | ||||||
|      *            the node on which the action is executed |  | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|     public JSONObject declareVersionAsRecord(RepoTestModel targetNode) throws Exception |     public JSONObject declareVersionAsRecord(RepoTestModel targetNode) throws Exception | ||||||
| @@ -113,8 +107,7 @@ public class ActionsExecutionAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Add WORM lock to a node using v1 actions api |      * Add WORM lock to a node using v1 actions api | ||||||
|      * |      * | ||||||
|      * @param targetNode |      * @param targetNode the node on which the action is executed | ||||||
|      *            the node on which the action is executed |  | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|     @SneakyThrows |     @SneakyThrows | ||||||
| @@ -127,10 +120,8 @@ public class ActionsExecutionAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * WORM lock a node for a period of days |      * WORM lock a node for a period of days | ||||||
|      * |      * | ||||||
|      * @param targetNode |      * @param targetNode      the node on which the action is executed | ||||||
|      *            the node on which the action is executed |      * @param retentionPeriod the retention period in days for the WORM lock | ||||||
|      * @param retentionPeriod |  | ||||||
|      *            the retention period in days for the WORM lock |  | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|     @SneakyThrows |     @SneakyThrows | ||||||
|   | |||||||
| @@ -26,16 +26,15 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; |  | ||||||
| import static org.springframework.http.HttpMethod.GET; |  | ||||||
| import static org.springframework.http.HttpMethod.POST; |  | ||||||
| import static org.springframework.http.HttpMethod.PUT; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
|  | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
|  | import static org.springframework.http.HttpMethod.GET; | ||||||
|  | import static org.springframework.http.HttpMethod.POST; | ||||||
|  | import static org.springframework.http.HttpMethod.PUT; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.fileplan.FilePlan; | import org.alfresco.rest.rm.community.model.fileplan.FilePlan; | ||||||
| @@ -57,8 +56,7 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Constructor. |      * Constructor. | ||||||
|      * |      * | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public FilePlanAPI(RMRestWrapper rmRestWrapper) |     public FilePlanAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -78,13 +76,10 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets a file plan. |      * Gets a file plan. | ||||||
|      * |      * | ||||||
|      * @param filePlanId |      * @param filePlanId The identifier of a file plan | ||||||
|      *            The identifier of a file plan |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link FilePlan} for the given {@code filePlanId} |      * @return The {@link FilePlan} for the given {@code filePlanId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code filePlanId} is not a valid format</li> |      *  <li>{@code filePlanId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -100,7 +95,8 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|                 GET, |                 GET, | ||||||
|                 "/file-plans/{filePlanId}?{parameters}", |                 "/file-plans/{filePlanId}?{parameters}", | ||||||
|                 filePlanId, |                 filePlanId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -116,13 +112,10 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the children (root categories) of a file plan. |      * Gets the children (root categories) of a file plan. | ||||||
|      * |      * | ||||||
|      * @param filePlanId |      * @param filePlanId The identifier of a file plan | ||||||
|      *            The identifier of a file plan |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link RecordCategoryCollection} for the given {@code filePlanId} |      * @return The {@link RecordCategoryCollection} for the given {@code filePlanId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code filePlanId}</li> |      *  <li>current user does not have permission to read {@code filePlanId}</li> | ||||||
| @@ -137,7 +130,8 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "file-plans/{filePlanId}/categories?{parameters}", |             "file-plans/{filePlanId}/categories?{parameters}", | ||||||
|             filePlanId, |             filePlanId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -154,15 +148,11 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Creates a root record category. |      * Creates a root record category. | ||||||
|      * |      * | ||||||
|      * @param recordCategoryModel |      * @param recordCategoryModel The record category model which holds the information | ||||||
|      *            The record category model which holds the information |      * @param filePlanId The identifier of a file plan | ||||||
|      * @param filePlanId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a file plan |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The created {@link RecordCategory} |      * @return The created {@link RecordCategory} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code filePlanId} is not a valid format or {@code filePlanId} is invalid</li> |      *  <li>{@code filePlanId} is not a valid format or {@code filePlanId} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -182,7 +172,8 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|                 toJson(recordCategoryModel), |                 toJson(recordCategoryModel), | ||||||
|                 "file-plans/{filePlanId}/categories?{parameters}", |                 "file-plans/{filePlanId}/categories?{parameters}", | ||||||
|                 filePlanId, |                 filePlanId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -199,14 +190,10 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Updates a file plan. |      * Updates a file plan. | ||||||
|      * |      * | ||||||
|      * @param filePlanModel |      * @param filePlanModel The file plan  model which holds the information | ||||||
|      *            The file plan model which holds the information |      * @param filePlanId    The identifier of the file plan | ||||||
|      * @param filePlanId |      * @param parameters          The URL parameters to add | ||||||
|      *            The identifier of the file plan |      * @throws RuntimeException for the following cases: | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      *                   <ul> |      *                   <ul> | ||||||
|      *                   <li>the update request is invalid or {@code filePlanId} is not a valid format or {@code filePlanModel} is invalid</li> |      *                   <li>the update request is invalid or {@code filePlanId} is not a valid format or {@code filePlanModel} is invalid</li> | ||||||
|      *                   <li>authentication fails</li> |      *                   <li>authentication fails</li> | ||||||
| @@ -231,15 +218,11 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Creates a hold. |      * Creates a hold. | ||||||
|      * |      * | ||||||
|      * @param holdModel |      * @param holdModel The hold model | ||||||
|      *            The hold model |      * @param filePlanId The identifier of a file plan | ||||||
|      * @param filePlanId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a file plan |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The created {@link Hold} |      * @return The created {@link Hold} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code filePlanId} is not a valid format or {@code filePlanId} is invalid</li> |      *  <li>{@code filePlanId} is not a valid format or {@code filePlanId} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -258,7 +241,8 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|             toJson(holdModel), |             toJson(holdModel), | ||||||
|             "file-plans/{filePlanId}/holds", |             "file-plans/{filePlanId}/holds", | ||||||
|             filePlanId, |             filePlanId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                                           )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -272,13 +256,10 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the holds of a file plan. |      * Gets the holds of a file plan. | ||||||
|      * |      * | ||||||
|      * @param filePlanId |      * @param filePlanId The identifier of a file plan | ||||||
|      *            The identifier of a file plan |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link HoldCollection} for the given {@code filePlanId} |      * @return The {@link HoldCollection} for the given {@code filePlanId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code filePlanId}</li> |      *  <li>current user does not have permission to read {@code filePlanId}</li> | ||||||
| @@ -293,7 +274,8 @@ public class FilePlanAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "file-plans/{filePlanId}/holds?{parameters}", |             "file-plans/{filePlanId}/holds?{parameters}", | ||||||
|             filePlanId, |             filePlanId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                                                    )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
| @@ -26,10 +26,9 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.springframework.http.HttpMethod.POST; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
|  | import static org.springframework.http.HttpMethod.POST; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.record.Record; | import org.alfresco.rest.rm.community.model.record.Record; | ||||||
| @@ -46,8 +45,7 @@ public class FilesAPI extends RMModelRequest<FilesAPI> | |||||||
|     public static final String PARENT_ID_PARAM = "parentId"; |     public static final String PARENT_ID_PARAM = "parentId"; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public FilesAPI(RMRestWrapper rmRestWrapper) |     public FilesAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -57,11 +55,9 @@ public class FilesAPI extends RMModelRequest<FilesAPI> | |||||||
|     /** |     /** | ||||||
|      * Declare file as record |      * Declare file as record | ||||||
|      * |      * | ||||||
|      * @param fileId |      * @param fileId The Id of a file to declare as record | ||||||
|      *            The Id of a file to declare as record |  | ||||||
|      * @return The {@link Record} for created record |      * @return The {@link Record} for created record | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for malformed JSON responses | ||||||
|      *             for malformed JSON responses |  | ||||||
|      */ |      */ | ||||||
|     public Record declareAsRecord(String fileId) |     public Record declareAsRecord(String fileId) | ||||||
|     { |     { | ||||||
| @@ -71,6 +67,8 @@ public class FilesAPI extends RMModelRequest<FilesAPI> | |||||||
|             POST, |             POST, | ||||||
|             "/files/{fileId}/declare?{parameters}", |             "/files/{fileId}/declare?{parameters}", | ||||||
|             fileId, |             fileId, | ||||||
|                 getRmRestWrapper().getParameters())); |             getRmRestWrapper().getParameters() | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -26,17 +26,16 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; |  | ||||||
| import static org.springframework.http.HttpMethod.DELETE; |  | ||||||
| import static org.springframework.http.HttpMethod.GET; |  | ||||||
| import static org.springframework.http.HttpMethod.POST; |  | ||||||
| import static org.springframework.http.HttpMethod.PUT; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
|  | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
|  | import static org.springframework.http.HttpMethod.DELETE; | ||||||
|  | import static org.springframework.http.HttpMethod.GET; | ||||||
|  | import static org.springframework.http.HttpMethod.POST; | ||||||
|  | import static org.springframework.http.HttpMethod.PUT; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.hold.BulkBodyCancel; | import org.alfresco.rest.rm.community.model.hold.BulkBodyCancel; | ||||||
| @@ -69,13 +68,10 @@ public class HoldsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets a hold. |      * Gets a hold. | ||||||
|      * |      * | ||||||
|      * @param holdId |      * @param holdId The identifier of a hold | ||||||
|      *            The identifier of a hold |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link Hold} for the given {@code holdId} |      * @return The {@link Hold} for the given {@code holdId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code holdId} is not a valid format</li> |      *  <li>{@code holdId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -91,7 +87,8 @@ public class HoldsAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "holds/{holdId}?{parameters}", |             "holds/{holdId}?{parameters}", | ||||||
|             holdId, |             holdId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                                         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -107,14 +104,10 @@ public class HoldsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Updates a hold. |      * Updates a hold. | ||||||
|      * |      * | ||||||
|      * @param holdModel |      * @param holdModel     The hold model which holds the information | ||||||
|      *            The hold model which holds the information |      * @param holdId        The identifier of the hold | ||||||
|      * @param holdId |      * @param parameters          The URL parameters to add | ||||||
|      *            The identifier of the hold |      * @throws RuntimeException for the following cases: | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>the update request is invalid or {@code holdId} is not a valid format or {@code holdModel} is invalid</li> |      *  <li>the update request is invalid or {@code holdId} is not a valid format or {@code holdModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -132,7 +125,8 @@ public class HoldsAPI extends RMModelRequest | |||||||
|             toJson(holdModel), |             toJson(holdModel), | ||||||
|             "holds/{holdId}?{parameters}", |             "holds/{holdId}?{parameters}", | ||||||
|             holdId, |             holdId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                                             )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -149,10 +143,8 @@ public class HoldsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Deletes a hold. |      * Deletes a hold. | ||||||
|      * |      * | ||||||
|      * @param holdId |      * @param holdId The identifier of a hold | ||||||
|      *            The identifier of a hold |      * @throws RuntimeException for the following cases: | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code holdId} is not a valid format</li> |      *  <li>{@code holdId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -167,18 +159,16 @@ public class HoldsAPI extends RMModelRequest | |||||||
|         getRmRestWrapper().processEmptyModel(simpleRequest( |         getRmRestWrapper().processEmptyModel(simpleRequest( | ||||||
|             DELETE, |             DELETE, | ||||||
|             "holds/{holdId}", |             "holds/{holdId}", | ||||||
|                 holdId)); |             holdId | ||||||
|  |                                                           )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Deletes a hold and stores a reason for deletion in the audit log. |      * Deletes a hold and stores a reason for deletion in the audit log. | ||||||
|      * |      * | ||||||
|      * @param reason |      * @param reason        The reason for hold deletion | ||||||
|      *            The reason for hold deletion |      * @param holdId        The identifier of a hold | ||||||
|      * @param holdId |      * @throws RuntimeException for the following cases: | ||||||
|      *            The identifier of a hold |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code holdId} is not a valid format or {@code reason} is invalid</li> |      *  <li>{@code holdId} is not a valid format or {@code reason} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -195,21 +185,18 @@ public class HoldsAPI extends RMModelRequest | |||||||
|             POST, |             POST, | ||||||
|             toJson(reason), |             toJson(reason), | ||||||
|             "holds/{holdId}/delete", |             "holds/{holdId}/delete", | ||||||
|                 holdId)); |             holdId | ||||||
|  |                                                           )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Adds the relationship between a child and a parent hold. |      * Adds the relationship between a child and a parent hold. | ||||||
|      * |      * | ||||||
|      * @param holdChild |      * @param holdChild The hold child model | ||||||
|      *            The hold child model |      * @param holdId The identifier of a hold | ||||||
|      * @param holdId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a hold |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The created {@link Hold} |      * @return The created {@link Hold} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code holdId} is not a valid format or {@code holdId} is invalid</li> |      *  <li>{@code holdId} is not a valid format or {@code holdId} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -240,13 +227,10 @@ public class HoldsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the children of a hold. |      * Gets the children of a hold. | ||||||
|      * |      * | ||||||
|      * @param holdId |      * @param holdId The identifier of a hold | ||||||
|      *            The identifier of a hold |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link HoldChildCollection} for the given {@code holdId} |      * @return The {@link HoldChildCollection} for the given {@code holdId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code holdId}</li> |      *  <li>current user does not have permission to read {@code holdId}</li> | ||||||
| @@ -261,7 +245,8 @@ public class HoldsAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "holds/{holdId}/children", |             "holds/{holdId}/children", | ||||||
|             holdId, |             holdId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                                                    )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -275,14 +260,10 @@ public class HoldsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Deletes the relationship between a child and a parent hold. |      * Deletes the relationship between a child and a parent hold. | ||||||
|      * |      * | ||||||
|      * @param holdChildId |      * @param holdChildId The identifier of hold child | ||||||
|      *            The identifier of hold child |      * @param holdId The identifier of a hold | ||||||
|      * @param holdId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a hold |      * @throws RuntimeException for the following cases: | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code holdId} or {@code holdChildId} is invalid</li> |      *  <li>{@code holdId} or {@code holdChildId} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -300,7 +281,8 @@ public class HoldsAPI extends RMModelRequest | |||||||
|             "holds/{holdId}/children/{holdChildId}", |             "holds/{holdId}/children/{holdChildId}", | ||||||
|             holdId, |             holdId, | ||||||
|             holdChildId, |             holdChildId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                           )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -314,15 +296,11 @@ public class HoldsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Starts a bulk process for a hold. |      * Starts a bulk process for a hold. | ||||||
|      * |      * | ||||||
|      * @param holdBulkOperation |      * @param holdBulkOperation The bulk operation details | ||||||
|      *            The bulk operation details |      * @param hold The identifier of a hold | ||||||
|      * @param hold |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a hold |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link HoldBulkOperationEntry} for the started bulk process |      * @return The {@link HoldBulkOperationEntry} for the started bulk process | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code hold} or {@code holdBulkOperation} is invalid</li> |      *  <li>{@code hold} or {@code holdBulkOperation} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -340,7 +318,8 @@ public class HoldsAPI extends RMModelRequest | |||||||
|             toJson(holdBulkOperation), |             toJson(holdBulkOperation), | ||||||
|             "holds/{hold}/bulk", |             "holds/{hold}/bulk", | ||||||
|             hold, |             hold, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                                                           )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -354,15 +333,11 @@ public class HoldsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the status of a bulk process for a hold. |      * Gets the status of a bulk process for a hold. | ||||||
|      * |      * | ||||||
|      * @param holdId |      * @param holdId The identifier of a hold | ||||||
|      *            The identifier of a hold |      * @param holdBulkStatusId The identifier of a bulk status operation | ||||||
|      * @param holdBulkStatusId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a bulk status operation |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link HoldBulkStatus} for the given {@code holdId} and {@code holdBulkStatusId} |      * @return The {@link HoldBulkStatus} for the given {@code holdId} and {@code holdBulkStatusId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code holdId} or {@code holdBulkStatusId} is invalid</li> |      *  <li>{@code holdId} or {@code holdBulkStatusId} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -380,7 +355,8 @@ public class HoldsAPI extends RMModelRequest | |||||||
|             "holds/{holdId}/bulk-statuses/{holdBulkStatusId}", |             "holds/{holdId}/bulk-statuses/{holdBulkStatusId}", | ||||||
|             holdId, |             holdId, | ||||||
|             holdBulkStatusId, |             holdBulkStatusId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                                                    )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -394,13 +370,10 @@ public class HoldsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the statuses of all bulk processes for a hold. |      * Gets the statuses of all bulk processes for a hold. | ||||||
|      * |      * | ||||||
|      * @param holdId |      * @param holdId The identifier of a hold | ||||||
|      *            The identifier of a hold |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link HoldBulkStatusCollection} for the given {@code holdId} |      * @return The {@link HoldBulkStatusCollection} for the given {@code holdId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *     <li>{@code holdId} is invalid</li> |      *     <li>{@code holdId} is invalid</li> | ||||||
|      *     <li>authentication fails</li> |      *     <li>authentication fails</li> | ||||||
| @@ -416,7 +389,8 @@ public class HoldsAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "holds/{holdId}/bulk-statuses", |             "holds/{holdId}/bulk-statuses", | ||||||
|             holdId, |             holdId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                                                              )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -430,16 +404,11 @@ public class HoldsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Cancels a bulk operation for a hold. |      * Cancels a bulk operation for a hold. | ||||||
|      * |      * | ||||||
|      * @param holdId |      * @param holdId The identifier of a hold | ||||||
|      *            The identifier of a hold |      * @param bulkStatusId The identifier of a bulk status operation | ||||||
|      * @param bulkStatusId |      * @param bulkBodyCancel The bulk body cancel model | ||||||
|      *            The identifier of a bulk status operation |      * @param parameters The URL parameters to add | ||||||
|      * @param bulkBodyCancel |      * @throws RuntimeException for the following cases: | ||||||
|      *            The bulk body cancel model |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *     <li>{@code holdId}, {@code bulkStatusId} or {@code bulkBodyCancel} is invalid</li> |      *     <li>{@code holdId}, {@code bulkStatusId} or {@code bulkBodyCancel} is invalid</li> | ||||||
|      *     <li>authentication fails</li> |      *     <li>authentication fails</li> | ||||||
| @@ -459,7 +428,8 @@ public class HoldsAPI extends RMModelRequest | |||||||
|             "holds/{holdId}/bulk-statuses/{bulkStatusId}/cancel", |             "holds/{holdId}/bulk-statuses/{bulkStatusId}/cancel", | ||||||
|             holdId, |             holdId, | ||||||
|             bulkStatusId, |             bulkStatusId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |                                                           )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
| @@ -26,17 +26,16 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
|  | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
|  | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
|  | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
|  | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
| import static org.springframework.http.HttpMethod.DELETE; | import static org.springframework.http.HttpMethod.DELETE; | ||||||
| import static org.springframework.http.HttpMethod.GET; | import static org.springframework.http.HttpMethod.GET; | ||||||
| import static org.springframework.http.HttpMethod.POST; | import static org.springframework.http.HttpMethod.POST; | ||||||
| import static org.springframework.http.HttpMethod.PUT; | import static org.springframework.http.HttpMethod.PUT; | ||||||
| import static org.springframework.http.HttpStatus.OK; | import static org.springframework.http.HttpStatus.OK; | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; |  | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; |  | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; |  | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.site.RMSite; | import org.alfresco.rest.rm.community.model.site.RMSite; | ||||||
| import org.alfresco.rest.rm.community.requests.RMModelRequest; | import org.alfresco.rest.rm.community.requests.RMModelRequest; | ||||||
| @@ -52,8 +51,7 @@ public class RMSiteAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Constructor |      * Constructor | ||||||
|      * |      * | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public RMSiteAPI(RMRestWrapper rmRestWrapper) |     public RMSiteAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -64,8 +62,7 @@ public class RMSiteAPI extends RMModelRequest | |||||||
|      * Get the RM site |      * Get the RM site | ||||||
|      * |      * | ||||||
|      * @return The {@link RMSite} for the given file plan component id |      * @return The {@link RMSite} for the given file plan component id | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li> |      *  <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> |      *  <li>Api Response code 401 If authentication failed</li> | ||||||
| @@ -77,20 +74,20 @@ public class RMSiteAPI extends RMModelRequest | |||||||
|     { |     { | ||||||
|         return getRmRestWrapper().processModel(RMSite.class, simpleRequest( |         return getRmRestWrapper().processModel(RMSite.class, simpleRequest( | ||||||
|                 GET, |                 GET, | ||||||
|                 "gs-sites/rm")); |                 "gs-sites/rm" | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Create the RM site |      * Create the RM site | ||||||
|      * |      * | ||||||
|      * @param rmSiteModel |      * @param rmSiteModel The properties of the rm site to be created | ||||||
|      *            The properties of the rm site to be created |  | ||||||
|      * @return The {@link RMSite} with the given properties |      * @return The {@link RMSite} with the given properties | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>Api Response code 400 Invalid parameter: title, or description exceed the maximum length; or siteBodyCreate invalid</li> |      *  <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</<li>Api Response code 409 RM Site already exists</li> |      *  <li>Api Response code 401 If authentication failed</ | ||||||
|  |      *  <li>Api Response code 409 RM Site already exists</li> | ||||||
|      *  <li>Api Response code default Unexpected error</li> |      *  <li>Api Response code default Unexpected error</li> | ||||||
|      * </ul> |      * </ul> | ||||||
|      */ |      */ | ||||||
| @@ -101,17 +98,17 @@ public class RMSiteAPI extends RMModelRequest | |||||||
|         return getRmRestWrapper().processModel(RMSite.class, requestWithBody( |         return getRmRestWrapper().processModel(RMSite.class, requestWithBody( | ||||||
|                 POST, |                 POST, | ||||||
|                 toJson(rmSiteModel), |                 toJson(rmSiteModel), | ||||||
|                 "gs-sites")); |                 "gs-sites" | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Delete RM site |      * Delete RM site | ||||||
|      *  |      * @throws RuntimeException for the following cases: | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>Api Response code 400 Invalid parameter: DELETE request is supported only for the RM site</li> |      *  <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</<li>Api Response code 403 Current user does not have permission to delete the site that is visible to them.</li> |      *  <li>Api Response code 401 If authentication failed</ | ||||||
|  |      *  <li>Api Response code 403 Current user does not have permission to delete the site that is visible to them.</li> | ||||||
|      *  <li>Api Response code 404 RM site does not exist</li> |      *  <li>Api Response code 404 RM site does not exist</li> | ||||||
|      *  <li>Api Response code default Unexpected error</li> |      *  <li>Api Response code default Unexpected error</li> | ||||||
|      * </ul> |      * </ul> | ||||||
| @@ -120,17 +117,16 @@ public class RMSiteAPI extends RMModelRequest | |||||||
|     { |     { | ||||||
|         getRmRestWrapper().processEmptyModel(simpleRequest( |         getRmRestWrapper().processEmptyModel(simpleRequest( | ||||||
|                 DELETE, |                 DELETE, | ||||||
|                 "gs-sites/rm")); |                 "gs-sites/rm" | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Update RM site |      * Update RM site | ||||||
|      * |      * | ||||||
|      * @param rmSiteModel |      * @param rmSiteModel The properties to be updated | ||||||
|      *            The properties to be updated |  | ||||||
|      * @return The updated {@link RMSite} |      * @return The updated {@link RMSite} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>Api Response code 400 the update request is invalid {@code rmSiteModel} is invalid</li> |      *  <li>Api Response code 400 the update request is invalid {@code rmSiteModel} is invalid</li> | ||||||
|      *  <li>Api Response code 401 If authentication fails</li> |      *  <li>Api Response code 401 If authentication fails</li> | ||||||
| @@ -146,15 +142,15 @@ public class RMSiteAPI extends RMModelRequest | |||||||
|         return getRmRestWrapper().processModel(RMSite.class, requestWithBody( |         return getRmRestWrapper().processModel(RMSite.class, requestWithBody( | ||||||
|                 PUT, |                 PUT, | ||||||
|                 toJson(rmSiteModel), |                 toJson(rmSiteModel), | ||||||
|                 "gs-sites/rm")); |                 "gs-sites/rm" | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Checks if the RM site exists or not |      * Checks if the RM site exists or not | ||||||
|      * |      * | ||||||
|      * @return <code>true</code> if the RM site exists, <code>false</code> otherwise |      * @return <code>true</code> if the RM site exists, <code>false</code> otherwise | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li> |      *  <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> |      *  <li>Api Response code 401 If authentication failed</li> | ||||||
|   | |||||||
| @@ -26,16 +26,17 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static io.restassured.RestAssured.basic; |  | ||||||
| import static io.restassured.RestAssured.given; |  | ||||||
| import static org.jglue.fluentjson.JsonBuilderFactory.buildObject; | import static org.jglue.fluentjson.JsonBuilderFactory.buildObject; | ||||||
| import static org.springframework.http.HttpStatus.OK; | import static org.springframework.http.HttpStatus.OK; | ||||||
|  |  | ||||||
| import com.google.gson.JsonObject; | import com.google.gson.JsonObject; | ||||||
|  |  | ||||||
| import io.restassured.builder.RequestSpecBuilder; | import io.restassured.builder.RequestSpecBuilder; | ||||||
| import io.restassured.http.ContentType; | import io.restassured.http.ContentType; | ||||||
| import io.restassured.response.Response; | import io.restassured.response.Response; | ||||||
| import io.restassured.specification.RequestSpecification; | 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.AlfrescoHttpClient; | ||||||
| import org.alfresco.dataprep.AlfrescoHttpClientFactory; | import org.alfresco.dataprep.AlfrescoHttpClientFactory; | ||||||
| @@ -58,8 +59,7 @@ import org.alfresco.utility.model.UserModel; | |||||||
| public class RMUserAPI extends RMModelRequest | public class RMUserAPI extends RMModelRequest | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public RMUserAPI(RMRestWrapper rmRestWrapper) |     public RMUserAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -68,7 +68,6 @@ public class RMUserAPI extends RMModelRequest | |||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Helper method to obtain {@link AlfrescoHttpClient} |      * Helper method to obtain {@link AlfrescoHttpClient} | ||||||
|      *  |  | ||||||
|      * @return Initialized {@link AlfrescoHttpClient} instance |      * @return Initialized {@link AlfrescoHttpClient} instance | ||||||
|      */ |      */ | ||||||
|     private AlfrescoHttpClient getAlfrescoHttpClient() |     private AlfrescoHttpClient getAlfrescoHttpClient() | ||||||
| @@ -86,12 +85,9 @@ public class RMUserAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Assign RM role to user |      * Assign RM role to user | ||||||
|      * |      * | ||||||
|      * @param userName |      * @param userName User's username | ||||||
|      *            User's username |      * @param userRole User's RM role, one of {@link UserRoles} roles | ||||||
|      * @param userRole |      * @throws RuntimeException for failed requests | ||||||
|      *            User's RM role, one of {@link UserRoles} roles |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for failed requests |  | ||||||
|      */ |      */ | ||||||
|     public void assignRoleToUser(String userName, String userRole) |     public void assignRoleToUser(String userName, String userRole) | ||||||
|     { |     { | ||||||
| @@ -122,13 +118,9 @@ public class RMUserAPI extends RMModelRequest | |||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Helper method to add permission on a component to user |      * Helper method to add permission on a component to user | ||||||
|      *  |      * @param filePlanComponentId The id of the file plan component on which permission should be given | ||||||
|      * @param filePlanComponentId |      * @param user {@link UserModel} for a user to be granted permission | ||||||
|      *            The id of the file plan component on which permission should be given |      * @param permission {@link UserPermissions} to be granted | ||||||
|      * @param user |  | ||||||
|      *            {@link UserModel} for a user to be granted permission |  | ||||||
|      * @param permission |  | ||||||
|      *            {@link UserPermissions} to be granted |  | ||||||
|      */ |      */ | ||||||
|     public void addUserPermission(String filePlanComponentId, UserModel user, UserPermissions permission) |     public void addUserPermission(String filePlanComponentId, UserModel user, UserPermissions permission) | ||||||
|     { |     { | ||||||
| @@ -169,10 +161,9 @@ public class RMUserAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Helper method to set permission inheritance on a file plan component |      * Helper method to set permission inheritance on a file plan component | ||||||
|      * |      * | ||||||
|      * @param filePlanComponentId |      * @param filePlanComponentId The id of the file plan component on which inherited permission should be set | ||||||
|      *            The id of the file plan component on which inherited permission should be set |      * @param isInherited          true if the permission is inherited | ||||||
|      * @param isInherited |      *                             false if the permission inheritance is disabled | ||||||
|      *            true if the permission is inherited false if the permission inheritance is disabled |  | ||||||
|      */ |      */ | ||||||
|     public void setUserPermissionInheritance(String filePlanComponentId, Boolean isInherited) |     public void setUserPermissionInheritance(String filePlanComponentId, Boolean isInherited) | ||||||
|     { |     { | ||||||
| @@ -208,15 +199,13 @@ public class RMUserAPI extends RMModelRequest | |||||||
|         getRmRestWrapper().setStatusCode(Integer.toString(response.getStatusCode())); |         getRmRestWrapper().setStatusCode(Integer.toString(response.getStatusCode())); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Creates a user with the given name using the old APIs |      * Creates a user with the given name using the old APIs | ||||||
|      * |      * | ||||||
|      * @param userName |      * @param userName The user name | ||||||
|      *            The user name |      * @param userPassword The user's password | ||||||
|      * @param userPassword |      * @param userEmail The user's e-mail address | ||||||
|      *            The user's password |  | ||||||
|      * @param userEmail |  | ||||||
|      *            The user's e-mail address |  | ||||||
|      * @return <code>true</code> if the user was created successfully, <code>false</code> otherwise. |      * @return <code>true</code> if the user was created successfully, <code>false</code> otherwise. | ||||||
|      */ |      */ | ||||||
|     public boolean createUser(String userName, String userPassword, String userEmail) |     public boolean createUser(String userName, String userPassword, String userEmail) | ||||||
|   | |||||||
| @@ -26,17 +26,16 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; |  | ||||||
| import static org.springframework.http.HttpMethod.DELETE; |  | ||||||
| import static org.springframework.http.HttpMethod.GET; |  | ||||||
| import static org.springframework.http.HttpMethod.POST; |  | ||||||
| import static org.springframework.http.HttpMethod.PUT; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
|  | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
|  | import static org.springframework.http.HttpMethod.DELETE; | ||||||
|  | import static org.springframework.http.HttpMethod.GET; | ||||||
|  | import static org.springframework.http.HttpMethod.POST; | ||||||
|  | import static org.springframework.http.HttpMethod.PUT; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory; | import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory; | ||||||
| @@ -55,8 +54,7 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Constructor. |      * Constructor. | ||||||
|      * |      * | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public RecordCategoryAPI(RMRestWrapper rmRestWrapper) |     public RecordCategoryAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -66,10 +64,8 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Deletes a record category. |      * Deletes a record category. | ||||||
|      * |      * | ||||||
|      * @param recordCategoryId |      * @param recordCategoryId The identifier of a record category | ||||||
|      *            The identifier of a record category |      * @throws RuntimeException for the following cases: | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code recordCategoryId} is not a valid format</li> |      *  <li>{@code recordCategoryId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -85,7 +81,8 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|         getRmRestWrapper().processEmptyModel(simpleRequest( |         getRmRestWrapper().processEmptyModel(simpleRequest( | ||||||
|                 DELETE, |                 DELETE, | ||||||
|                 "record-categories/{recordCategoryId}", |                 "record-categories/{recordCategoryId}", | ||||||
|                 recordCategoryId)); |                 recordCategoryId | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -101,13 +98,10 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets a record category. |      * Gets a record category. | ||||||
|      * |      * | ||||||
|      * @param recordCategoryId |      * @param recordCategoryId The identifier of a record category | ||||||
|      *            The identifier of a record category |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link RecordCategory} for the given {@code recordCategoryId} |      * @return The {@link RecordCategory} for the given {@code recordCategoryId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code recordCategoryId} is not a valid format</li> |      *  <li>{@code recordCategoryId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -123,7 +117,8 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|                 GET, |                 GET, | ||||||
|                 "record-categories/{recordCategoryId}?{parameters}", |                 "record-categories/{recordCategoryId}?{parameters}", | ||||||
|                 recordCategoryId, |                 recordCategoryId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -140,16 +135,11 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Updates a record category. |      * Updates a record category. | ||||||
|      * |      * | ||||||
|      * @param recordCategoryModel |      * @param recordCategoryModel The record category model which holds the information | ||||||
|      *            The record category model which holds the information |      * @param recordCategoryId The identifier of a record category | ||||||
|      * @param recordCategoryId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a record category |      * @param returns The updated {@link RecordCategory} | ||||||
|      * @param parameters |      * @throws RuntimeException for the following cases: | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @param returns |  | ||||||
|      *            The updated {@link RecordCategory} |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>the update request is invalid or {@code recordCategoryId} is not a valid format or {@code recordCategoryModel} is invalid</li> |      *  <li>the update request is invalid or {@code recordCategoryId} is not a valid format or {@code recordCategoryModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -169,7 +159,8 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|                 toJson(recordCategoryModel), |                 toJson(recordCategoryModel), | ||||||
|                 "record-categories/{recordCategoryId}?{parameters}", |                 "record-categories/{recordCategoryId}?{parameters}", | ||||||
|                 recordCategoryId, |                 recordCategoryId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -185,13 +176,10 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the children of a record category. |      * Gets the children of a record category. | ||||||
|      * |      * | ||||||
|      * @param recordCategoryId |      * @param recordCategoryId The identifier of a record category | ||||||
|      *            The identifier of a record category |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link RecordCategoryChildCollection} for the given {@code recordCategoryId} |      * @return The {@link RecordCategoryChildCollection} for the given {@code recordCategoryId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code recordCategoryId}</li> |      *  <li>current user does not have permission to read {@code recordCategoryId}</li> | ||||||
| @@ -206,7 +194,8 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "record-categories/{recordCategoryId}/children?{parameters}", |             "record-categories/{recordCategoryId}/children?{parameters}", | ||||||
|             recordCategoryId, |             recordCategoryId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -223,15 +212,11 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Creates a record category child. Can be a record category or a record folder. |      * Creates a record category child. Can be a record category or a record folder. | ||||||
|      * |      * | ||||||
|      * @param recordCategoryChildModel |      * @param recordCategoryChildModel The record category child model which holds the information | ||||||
|      *            The record category child model which holds the information |      * @param recordCategoryId The identifier of a record category | ||||||
|      * @param recordCategoryId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a record category |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The created {@link RecordCategoryChild} |      * @return The created {@link RecordCategoryChild} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code recordCategoryId} is not a valid format or {@code recordCategoryChildModel} is invalid</li> |      *  <li>{@code recordCategoryId} is not a valid format or {@code recordCategoryChildModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -251,6 +236,7 @@ public class RecordCategoryAPI extends RMModelRequest | |||||||
|                 toJson(recordCategoryChildModel), |                 toJson(recordCategoryChildModel), | ||||||
|                 "record-categories/{recordCategoryId}/children?{parameters}", |                 "record-categories/{recordCategoryId}/children?{parameters}", | ||||||
|                 recordCategoryId, |                 recordCategoryId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -26,19 +26,18 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; |  | ||||||
| import static org.springframework.http.HttpMethod.DELETE; |  | ||||||
| import static org.springframework.http.HttpMethod.GET; |  | ||||||
| import static org.springframework.http.HttpMethod.POST; |  | ||||||
| import static org.springframework.http.HttpMethod.PUT; |  | ||||||
| import static org.testng.Assert.fail; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
|  | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
|  | import static org.springframework.http.HttpMethod.DELETE; | ||||||
|  | import static org.springframework.http.HttpMethod.GET; | ||||||
|  | import static org.springframework.http.HttpMethod.POST; | ||||||
|  | import static org.springframework.http.HttpMethod.PUT; | ||||||
|  | import static org.testng.Assert.fail; | ||||||
|  |  | ||||||
| import java.io.File; | import java.io.File; | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
| @@ -67,8 +66,7 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Constructor. |      * Constructor. | ||||||
|      * |      * | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public RecordFolderAPI(RMRestWrapper rmRestWrapper) |     public RecordFolderAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -78,10 +76,8 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Deletes a record folder. |      * Deletes a record folder. | ||||||
|      * |      * | ||||||
|      * @param recordFolderId |      * @param recordFolderId The identifier of a record folder | ||||||
|      *            The identifier of a record folder |      * @throws RuntimeException for the following cases: | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code recordFolderId} is not a valid format</li> |      *  <li>{@code recordFolderId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -97,7 +93,8 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|         getRmRestWrapper().processEmptyModel(simpleRequest( |         getRmRestWrapper().processEmptyModel(simpleRequest( | ||||||
|                 DELETE, |                 DELETE, | ||||||
|                 "record-folders/{recordFolderId}", |                 "record-folders/{recordFolderId}", | ||||||
|                 recordFolderId)); |                 recordFolderId | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -113,13 +110,10 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets a record folder. |      * Gets a record folder. | ||||||
|      * |      * | ||||||
|      * @param recordFolderId |      * @param recordFolderId The identifier of a record folder | ||||||
|      *            The identifier of a record folder |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link RecordFolder} for the given {@code recordFolderId} |      * @return The {@link RecordFolder} for the given {@code recordFolderId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code recordFolderId} is not a valid format</li> |      *  <li>{@code recordFolderId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -135,7 +129,8 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|                 GET, |                 GET, | ||||||
|                 "record-folders/{recordFolderId}?{parameters}", |                 "record-folders/{recordFolderId}?{parameters}", | ||||||
|                 recordFolderId, |                 recordFolderId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -152,16 +147,11 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Updates a record folder. |      * Updates a record folder. | ||||||
|      * |      * | ||||||
|      * @param recordFolderModel |      * @param recordFolderModel The record folder model which holds the information | ||||||
|      *            The record folder model which holds the information |      * @param recordFolderId The identifier of a record folder | ||||||
|      * @param recordFolderId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a record folder |      * @param returns The updated {@link RecordFolder} | ||||||
|      * @param parameters |      * @throws RuntimeException for the following cases: | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @param returns |  | ||||||
|      *            The updated {@link RecordFolder} |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>the update request is invalid or {@code recordFolderId} is not a valid format or {@code recordFolderModel} is invalid</li> |      *  <li>the update request is invalid or {@code recordFolderId} is not a valid format or {@code recordFolderModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -181,7 +171,8 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|                 toJson(recordFolderModel), |                 toJson(recordFolderModel), | ||||||
|                 "record-folders/{recordFolderId}?{parameters}", |                 "record-folders/{recordFolderId}?{parameters}", | ||||||
|                 recordFolderId, |                 recordFolderId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -197,13 +188,10 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the children of a record folder. |      * Gets the children of a record folder. | ||||||
|      * |      * | ||||||
|      * @param recordFolderId |      * @param recordFolderId The identifier of a record folder | ||||||
|      *            The identifier of a record folder |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link RecordFolderCollection} for the given {@code recordFolderId} |      * @return The {@link RecordFolderCollection} for the given {@code recordFolderId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code recordFolderId}</li> |      *  <li>current user does not have permission to read {@code recordFolderId}</li> | ||||||
| @@ -218,7 +206,8 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "record-folders/{recordFolderId}/records?{parameters}", |             "record-folders/{recordFolderId}/records?{parameters}", | ||||||
|             recordFolderId, |             recordFolderId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -235,15 +224,11 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Create a record from file resource |      * Create a record from file resource | ||||||
|      * |      * | ||||||
|      * @param recordModel |      * @param recordModel {@link Record} for electronic record to be created | ||||||
|      *            {@link Record} for electronic record to be created |      * @param recordContent {@link File} pointing to the content of the electronic record to be created | ||||||
|      * @param recordContent |      * @param recordFolderId The identifier of a record folder | ||||||
|      *            {@link File} pointing to the content of the electronic record to be created |  | ||||||
|      * @param recordFolderId |  | ||||||
|      *            The identifier of a record folder |  | ||||||
|      * @return newly created {@link Record} |      * @return newly created {@link Record} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for invalid recordModel JSON strings | ||||||
|      *             for invalid recordModel JSON strings |  | ||||||
|      */ |      */ | ||||||
|     public Record createRecord(Record recordModel, String recordFolderId, File recordContent) throws RuntimeException |     public Record createRecord(Record recordModel, String recordFolderId, File recordContent) throws RuntimeException | ||||||
|     { |     { | ||||||
| @@ -256,7 +241,10 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|             fail("Only electronic records are supported"); |             fail("Only electronic records are supported"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         /* For file uploads nodeBodyCreate is ignored hence can't be used. Append all Record fields to the request. */ |         /* | ||||||
|  |          * For file uploads nodeBodyCreate is ignored hence can't be used. Append all Record fields | ||||||
|  |          * to the request. | ||||||
|  |          */ | ||||||
|         RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec(); |         RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec(); | ||||||
|         JsonNode root; |         JsonNode root; | ||||||
|         try |         try | ||||||
| @@ -283,15 +271,11 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Creates a record in a record folder child, i.e. a record. |      * Creates a record in a record folder child, i.e. a record. | ||||||
|      * |      * | ||||||
|      * @param recordModel |      * @param recordModel The record model which holds the information | ||||||
|      *            The record model which holds the information |      * @param recordFolderId The identifier of a record folder | ||||||
|      * @param recordFolderId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a record folder |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The created {@link Record} |      * @return The created {@link Record} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code recordFolderId is not a valid format or {@code recordModel} is invalid</li> |      *  <li>{@code recordFolderId is not a valid format or {@code recordModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -310,6 +294,7 @@ public class RecordFolderAPI extends RMModelRequest | |||||||
|                 toJson(recordModel), |                 toJson(recordModel), | ||||||
|                 "record-folders/{recordFolderId}/records?{parameters}", |                 "record-folders/{recordFolderId}/records?{parameters}", | ||||||
|                 recordFolderId, |                 recordFolderId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -26,25 +26,25 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
|  | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
|  | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
|  | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
|  | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
|  | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
| import static org.springframework.http.HttpMethod.DELETE; | import static org.springframework.http.HttpMethod.DELETE; | ||||||
| import static org.springframework.http.HttpMethod.GET; | import static org.springframework.http.HttpMethod.GET; | ||||||
| import static org.springframework.http.HttpMethod.POST; | import static org.springframework.http.HttpMethod.POST; | ||||||
| import static org.springframework.http.HttpMethod.PUT; | import static org.springframework.http.HttpMethod.PUT; | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; |  | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; |  | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; |  | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; |  | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; |  | ||||||
|  |  | ||||||
| import io.restassured.response.ResponseBody; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.record.Record; | import org.alfresco.rest.rm.community.model.record.Record; | ||||||
| import org.alfresco.rest.rm.community.model.record.RecordBodyFile; | import org.alfresco.rest.rm.community.model.record.RecordBodyFile; | ||||||
| import org.alfresco.rest.rm.community.requests.RMModelRequest; | import org.alfresco.rest.rm.community.requests.RMModelRequest; | ||||||
|  |  | ||||||
|  | import io.restassured.response.ResponseBody; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Records REST API Wrapper |  * Records REST API Wrapper | ||||||
|  * |  * | ||||||
| @@ -54,8 +54,7 @@ import org.alfresco.rest.rm.community.requests.RMModelRequest; | |||||||
| public class RecordsAPI extends RMModelRequest | public class RecordsAPI extends RMModelRequest | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public RecordsAPI(RMRestWrapper rmRestWrapper) |     public RecordsAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -65,11 +64,9 @@ public class RecordsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Get the content for the electronic record |      * Get the content for the electronic record | ||||||
|      * |      * | ||||||
|      * @param recordId |      * @param recordId The id of the electronic record | ||||||
|      *            The id of the electronic record |  | ||||||
|      * @return {@link ResponseBody} representing content for the given record id |      * @return {@link ResponseBody} representing content for the given record id | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      * <li>{@code recordId} has no content</li> |      * <li>{@code recordId} has no content</li> | ||||||
|      * <li> {@code recordId} is not a valid format, or is not a record</li> |      * <li> {@code recordId} is not a valid format, or is not a record</li> | ||||||
| @@ -90,13 +87,10 @@ public class RecordsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * File the record recordId into file plan structure based on the location sent via the request body |      * File the record recordId into file plan structure based on the location sent via the request body | ||||||
|      * |      * | ||||||
|      * @param recordBodyFile |      * @param recordBodyFile The properties where to file the record | ||||||
|      *            The properties where to file the record |      * @param recordId       The id of the record to file | ||||||
|      * @param recordId |  | ||||||
|      *            The id of the record to file |  | ||||||
|      * @return The {@link Record} with the given properties |      * @return The {@link Record} with the given properties | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li> |      *  <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -118,13 +112,10 @@ public class RecordsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * File the record recordId into file plan structure based on the location sent via the request body |      * File the record recordId into file plan structure based on the location sent via the request body | ||||||
|      * |      * | ||||||
|      * @param recordBodyFile |      * @param recordBodyFile The properties where to file the record | ||||||
|      *            The properties where to file the record |      * @param recordId       The id of the record to file | ||||||
|      * @param recordId |  | ||||||
|      *            The id of the record to file |  | ||||||
|      * @return The {@link Record} with the given properties |      * @return The {@link Record} with the given properties | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li> |      *  <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -145,7 +136,8 @@ public class RecordsAPI extends RMModelRequest | |||||||
|             toJson(recordBodyFile), |             toJson(recordBodyFile), | ||||||
|             "/records/{recordId}/file?{parameters}", |             "/records/{recordId}/file?{parameters}", | ||||||
|             recordId, |             recordId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -161,11 +153,9 @@ public class RecordsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Complete the record recordId |      * Complete the record recordId | ||||||
|      * |      * | ||||||
|      * @param recordId |      * @param recordId The id of the record to complete | ||||||
|      *            The id of the record to complete |  | ||||||
|      * @return The completed {@link Record} with the given properties |      * @return The completed {@link Record} with the given properties | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      *                   <ul> |      *                   <ul> | ||||||
|      *                   <li>Invalid parameter: {@code recordId} is not a record</li> |      *                   <li>Invalid parameter: {@code recordId} is not a record</li> | ||||||
|      *                   <li>authentication fails</li> |      *                   <li>authentication fails</li> | ||||||
| @@ -183,16 +173,14 @@ public class RecordsAPI extends RMModelRequest | |||||||
|             POST, |             POST, | ||||||
|             "/records/{recordId}/complete?{parameters}", |             "/records/{recordId}/complete?{parameters}", | ||||||
|             recordId, |             recordId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Deletes a record. |      * Deletes a record. | ||||||
|      * |      * | ||||||
|      * @param recordId |      * @param recordId The identifier of a record | ||||||
|      *            The identifier of a record |      * @throws RuntimeException for the following cases: | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code recordId} is not a valid format</li> |      *  <li>{@code recordId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -208,7 +196,8 @@ public class RecordsAPI extends RMModelRequest | |||||||
|         getRmRestWrapper().processEmptyModel(simpleRequest( |         getRmRestWrapper().processEmptyModel(simpleRequest( | ||||||
|                 DELETE, |                 DELETE, | ||||||
|                 "records/{recordId}", |                 "records/{recordId}", | ||||||
|                 recordId)); |                 recordId | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -224,13 +213,10 @@ public class RecordsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets a record. |      * Gets a record. | ||||||
|      * |      * | ||||||
|      * @param recordId |      * @param recordId The identifier of a record | ||||||
|      *            The identifier of a record |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link Record} for the given {@code recordId} |      * @return The {@link Record} for the given {@code recordId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code recordId} is not a valid format</li> |      *  <li>{@code recordId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -246,7 +232,8 @@ public class RecordsAPI extends RMModelRequest | |||||||
|                 GET, |                 GET, | ||||||
|                 "records/{recordId}?{parameters}", |                 "records/{recordId}?{parameters}", | ||||||
|                 recordId, |                 recordId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -263,15 +250,11 @@ public class RecordsAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Updates a record. |      * Updates a record. | ||||||
|      * |      * | ||||||
|      * @param recordModel |      * @param recordModel The record model which holds the information | ||||||
|      *            The record model which holds the information |      * @param recordId The identifier of a record | ||||||
|      * @param recordId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a record |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The updated {@link Record} |      * @return The updated {@link Record} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>the update request is invalid or {@code recordId} is not a valid format or {@code recordModel} is invalid</li> |      *  <li>the update request is invalid or {@code recordId} is not a valid format or {@code recordModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -291,6 +274,7 @@ public class RecordsAPI extends RMModelRequest | |||||||
|                 toJson(recordModel), |                 toJson(recordModel), | ||||||
|                 "records/{recordId}?{parameters}", |                 "records/{recordId}?{parameters}", | ||||||
|                 recordId, |                 recordId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -26,16 +26,6 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; |  | ||||||
| import static org.springframework.http.HttpMethod.GET; |  | ||||||
| import static org.springframework.http.HttpMethod.POST; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; |  | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; |  | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; |  | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; |  | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; |  | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.retentionschedule.RetentionSchedule; | import org.alfresco.rest.rm.community.model.retentionschedule.RetentionSchedule; | ||||||
| import org.alfresco.rest.rm.community.model.retentionschedule.RetentionScheduleActionDefinition; | import org.alfresco.rest.rm.community.model.retentionschedule.RetentionScheduleActionDefinition; | ||||||
| @@ -43,6 +33,15 @@ import org.alfresco.rest.rm.community.model.retentionschedule.RetentionScheduleC | |||||||
| import org.alfresco.rest.rm.community.model.retentionschedule.RetentionScheduleStepCollection; | import org.alfresco.rest.rm.community.model.retentionschedule.RetentionScheduleStepCollection; | ||||||
| import org.alfresco.rest.rm.community.requests.RMModelRequest; | import org.alfresco.rest.rm.community.requests.RMModelRequest; | ||||||
|  |  | ||||||
|  | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
|  | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
|  | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
|  | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
|  | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
|  | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
|  | import static org.springframework.http.HttpMethod.GET; | ||||||
|  | import static org.springframework.http.HttpMethod.POST; | ||||||
|  |  | ||||||
| public class RetentionScheduleAPI extends RMModelRequest | public class RetentionScheduleAPI extends RMModelRequest | ||||||
| { | { | ||||||
|  |  | ||||||
| @@ -54,18 +53,15 @@ public class RetentionScheduleAPI extends RMModelRequest | |||||||
|         super(rmRestWrapper); |         super(rmRestWrapper); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Creates a retention schedule. |      * Creates a retention schedule. | ||||||
|      * |      * | ||||||
|      * @param retentionScheduleModel |      * @param retentionScheduleModel The retentionSchedule model | ||||||
|      *            The retentionSchedule model |      * @param recordCategoryId The identifier of a record category | ||||||
|      * @param recordCategoryId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a record category |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The created {@link RetentionSchedule} |      * @return The created {@link RetentionSchedule} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code recordCategoryId} is not a valid format or {@code recordCategoryId} is invalid</li> |      *  <li>{@code recordCategoryId} is not a valid format or {@code recordCategoryId} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -84,7 +80,8 @@ public class RetentionScheduleAPI extends RMModelRequest | |||||||
|             toJson(retentionScheduleModel), |             toJson(retentionScheduleModel), | ||||||
|             "record-categories/{recordCategoryId}/retention-schedules", |             "record-categories/{recordCategoryId}/retention-schedules", | ||||||
|             recordCategoryId, |             recordCategoryId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -98,13 +95,10 @@ public class RetentionScheduleAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the retentionSchedule of a record category. |      * Gets the retentionSchedule of a record category. | ||||||
|      * |      * | ||||||
|      * @param recordCategoryId |      * @param recordCategoryId The identifier of a record category | ||||||
|      *            The identifier of a record category |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link RetentionSchedule} for the given {@code recordCategoryId} |      * @return The {@link RetentionSchedule} for the given {@code recordCategoryId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code recordCategoryId}</li> |      *  <li>current user does not have permission to read {@code recordCategoryId}</li> | ||||||
| @@ -119,7 +113,8 @@ public class RetentionScheduleAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "record-categories/{recordCategoryId}/retention-schedules?{parameters}", |             "record-categories/{recordCategoryId}/retention-schedules?{parameters}", | ||||||
|             recordCategoryId, |             recordCategoryId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -133,15 +128,11 @@ public class RetentionScheduleAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Creates a step in the retention schedule. |      * Creates a step in the retention schedule. | ||||||
|      * |      * | ||||||
|      * @param retentionScheduleActionDefinition |      * @param retentionScheduleActionDefinition The retentionScheduleActionDefinition model | ||||||
|      *            The retentionScheduleActionDefinition model |      * @param retentionScheduleId The identifier of a retention schedule id | ||||||
|      * @param retentionScheduleId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a retention schedule id |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The created {@link RetentionScheduleActionDefinition} |      * @return The created {@link RetentionScheduleActionDefinition} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code retentionScheduleId} is not a valid format or {@code retentionScheduleId} is invalid</li> |      *  <li>{@code retentionScheduleId} is not a valid format or {@code retentionScheduleId} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -160,7 +151,8 @@ public class RetentionScheduleAPI extends RMModelRequest | |||||||
|             toJson(retentionScheduleActionDefinition), |             toJson(retentionScheduleActionDefinition), | ||||||
|             "retention-schedules/{retentionScheduleId}/retention-steps", |             "retention-schedules/{retentionScheduleId}/retention-steps", | ||||||
|             retentionScheduleId, |             retentionScheduleId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -174,13 +166,10 @@ public class RetentionScheduleAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the retentionSchedule of a record category. |      * Gets the retentionSchedule of a record category. | ||||||
|      * |      * | ||||||
|      * @param retentionScheduleId |      * @param retentionScheduleId The identifier of a record category | ||||||
|      *            The identifier of a record category |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link RetentionScheduleActionDefinition} for the given {@code recordCategoryId} |      * @return The {@link RetentionScheduleActionDefinition} for the given {@code recordCategoryId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code recordCategoryId}</li> |      *  <li>current user does not have permission to read {@code recordCategoryId}</li> | ||||||
| @@ -195,7 +184,8 @@ public class RetentionScheduleAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "retention-schedules/{retentionScheduleId}/retention-steps?{parameters}", |             "retention-schedules/{retentionScheduleId}/retention-steps?{parameters}", | ||||||
|             retentionScheduleId, |             retentionScheduleId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
| @@ -27,11 +27,10 @@ | |||||||
|  |  | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; |  | ||||||
| import static org.springframework.http.HttpMethod.GET; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
|  | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
|  | import static org.springframework.http.HttpMethod.GET; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.transfer.Transfer; | import org.alfresco.rest.rm.community.model.transfer.Transfer; | ||||||
| @@ -47,8 +46,7 @@ import org.alfresco.rest.rm.community.requests.RMModelRequest; | |||||||
| public class TransferAPI extends RMModelRequest | public class TransferAPI extends RMModelRequest | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public TransferAPI(RMRestWrapper rmRestWrapper) |     public TransferAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -68,13 +66,10 @@ public class TransferAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets a transfer. |      * Gets a transfer. | ||||||
|      * |      * | ||||||
|      * @param transferId |      * @param transferId The identifier of a transfer | ||||||
|      *            The identifier of a transfer |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link Transfer} for the given {@code transferId} |      * @return The {@link Transfer} for the given {@code transferId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code transferId} is not a valid format</li> |      *  <li>{@code transferId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -90,9 +85,9 @@ public class TransferAPI extends RMModelRequest | |||||||
|                 GET, |                 GET, | ||||||
|                 "/transfers/{transferId}?{parameters}", |                 "/transfers/{transferId}?{parameters}", | ||||||
|                 transferId, |                 transferId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * see {@link #getTransfersChildren(String, String)} |      * see {@link #getTransfersChildren(String, String)} | ||||||
|      */ |      */ | ||||||
| @@ -106,13 +101,10 @@ public class TransferAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the children (record folder or record) of a transfer. |      * Gets the children (record folder or record) of a transfer. | ||||||
|      * |      * | ||||||
|      * @param transferId |      * @param transferId The identifier of a transfer | ||||||
|      *            The identifier of a transfer |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link TransferChildCollection} for the given {@code transferId} |      * @return The {@link TransferChildCollection} for the given {@code transferId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code transferId}</li> |      *  <li>current user does not have permission to read {@code transferId}</li> | ||||||
| @@ -127,6 +119,7 @@ public class TransferAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "transfers/{filePlanId}/children?{parameters}", |             "transfers/{filePlanId}/children?{parameters}", | ||||||
|             transferId, |             transferId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -27,15 +27,14 @@ | |||||||
|  |  | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; |  | ||||||
| import static org.springframework.http.HttpMethod.GET; |  | ||||||
| import static org.springframework.http.HttpMethod.PUT; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
|  | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
|  | import static org.springframework.http.HttpMethod.GET; | ||||||
|  | import static org.springframework.http.HttpMethod.PUT; | ||||||
|  |  | ||||||
| import org.alfresco.rest.core.RMRestWrapper; | import org.alfresco.rest.core.RMRestWrapper; | ||||||
| import org.alfresco.rest.rm.community.model.transfer.TransferCollection; | import org.alfresco.rest.rm.community.model.transfer.TransferCollection; | ||||||
| @@ -51,8 +50,7 @@ import org.alfresco.rest.rm.community.requests.RMModelRequest; | |||||||
| public class TransferContainerAPI extends RMModelRequest | public class TransferContainerAPI extends RMModelRequest | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public TransferContainerAPI(RMRestWrapper rmRestWrapper) |     public TransferContainerAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -72,13 +70,10 @@ public class TransferContainerAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets a transfer container. |      * Gets a transfer container. | ||||||
|      * |      * | ||||||
|      * @param transferContainerId |      * @param transferContainerId The identifier of a transfer container | ||||||
|      *            The identifier of a transfer container |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link TransferContainer} for the given {@code transferContainerId} |      * @return The {@link TransferContainer} for the given {@code transferContainerId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code transferContainerId} is not a valid format</li> |      *  <li>{@code transferContainerId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -94,7 +89,8 @@ public class TransferContainerAPI extends RMModelRequest | |||||||
|                 GET, |                 GET, | ||||||
|                 "/transfer-containers/{transferContainerId}?{parameters}", |                 "/transfer-containers/{transferContainerId}?{parameters}", | ||||||
|                 transferContainerId, |                 transferContainerId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -111,16 +107,11 @@ public class TransferContainerAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Updates a transfer container. |      * Updates a transfer container. | ||||||
|      * |      * | ||||||
|      * @param transferContainerModel |      * @param transferContainerModel The transfer container model which holds the information | ||||||
|      *            The transfer container model which holds the information |      * @param transferContainerId The identifier of a transfer container | ||||||
|      * @param transferContainerId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of a transfer container |      * @param returns The updated {@link TransferContainer} | ||||||
|      * @param parameters |      * @throws RuntimeException for the following cases: | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @param returns |  | ||||||
|      *            The updated {@link TransferContainer} |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>the update request is invalid or {@code transferContainerId} is not a valid format or {@code transferContainerModel} is invalid</li> |      *  <li>the update request is invalid or {@code transferContainerId} is not a valid format or {@code transferContainerModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -140,7 +131,8 @@ public class TransferContainerAPI extends RMModelRequest | |||||||
|                 toJson(transferContainerModel), |                 toJson(transferContainerModel), | ||||||
|                 "transfer-containers/{transferContainerId}?{parameters}", |                 "transfer-containers/{transferContainerId}?{parameters}", | ||||||
|                 transferContainerId, |                 transferContainerId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -156,13 +148,10 @@ public class TransferContainerAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the children (transfers) of a transfer container. |      * Gets the children (transfers) of a transfer container. | ||||||
|      * |      * | ||||||
|      * @param transferContainerId |      * @param transferContainerId The identifier of a transfer container | ||||||
|      *            The identifier of a transfer container |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link TransferCollection} for the given {@code transferContainerId} |      * @return The {@link TransferCollection} for the given {@code transferContainerId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code transferContainerId}</li> |      *  <li>current user does not have permission to read {@code transferContainerId}</li> | ||||||
| @@ -177,6 +166,7 @@ public class TransferContainerAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "transfer-containers/{filePlanId}/transfers?{parameters}", |             "transfer-containers/{filePlanId}/transfers?{parameters}", | ||||||
|             transferContainerId, |             transferContainerId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -26,18 +26,17 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; |  | ||||||
| import static org.springframework.http.HttpMethod.GET; |  | ||||||
| import static org.springframework.http.HttpMethod.POST; |  | ||||||
| import static org.springframework.http.HttpMethod.PUT; |  | ||||||
| import static org.testng.Assert.fail; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
|  | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
|  | import static org.springframework.http.HttpMethod.GET; | ||||||
|  | import static org.springframework.http.HttpMethod.POST; | ||||||
|  | import static org.springframework.http.HttpMethod.PUT; | ||||||
|  | import static org.testng.Assert.fail; | ||||||
|  |  | ||||||
| import java.io.File; | import java.io.File; | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
| @@ -45,6 +44,7 @@ import java.util.Iterator; | |||||||
|  |  | ||||||
| import com.fasterxml.jackson.databind.JsonNode; | import com.fasterxml.jackson.databind.JsonNode; | ||||||
| import com.fasterxml.jackson.databind.ObjectMapper; | import com.fasterxml.jackson.databind.ObjectMapper; | ||||||
|  |  | ||||||
| import io.restassured.builder.RequestSpecBuilder; | import io.restassured.builder.RequestSpecBuilder; | ||||||
| import io.restassured.http.ContentType; | import io.restassured.http.ContentType; | ||||||
|  |  | ||||||
| @@ -65,8 +65,7 @@ import org.alfresco.rest.rm.community.util.UnfiledContainerChildMixin; | |||||||
| public class UnfiledContainerAPI extends RMModelRequest | public class UnfiledContainerAPI extends RMModelRequest | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public UnfiledContainerAPI(RMRestWrapper rmRestWrapper) |     public UnfiledContainerAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -86,13 +85,10 @@ public class UnfiledContainerAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets an unfiled record container. |      * Gets an unfiled record container. | ||||||
|      * |      * | ||||||
|      * @param unfiledContainerId |      * @param unfiledContainerId The identifier of a unfiled record container | ||||||
|      *            The identifier of a unfiled record container |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link UnfiledContainer} for the given {@code unfiledContainerId} |      * @return The {@link UnfiledContainer} for the given {@code unfiledContainerId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code unfiledContainerId} is not a valid format</li> |      *  <li>{@code unfiledContainerId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -108,7 +104,8 @@ public class UnfiledContainerAPI extends RMModelRequest | |||||||
|                 GET, |                 GET, | ||||||
|                 "unfiled-containers/{unfiledContainerId}?{parameters}", |                 "unfiled-containers/{unfiledContainerId}?{parameters}", | ||||||
|                 unfiledContainerId, |                 unfiledContainerId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -124,13 +121,10 @@ public class UnfiledContainerAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the children of an unfiled records container |      * Gets the children of an unfiled records container | ||||||
|      * |      * | ||||||
|      * @param unfiledContainerId |      * @param unfiledContainerId The identifier of an unfiled records container | ||||||
|      *            The identifier of an unfiled records container |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link UnfiledContainerChildCollection} for the given {@code unfiledContainerId} |      * @return The {@link UnfiledContainerChildCollection} for the given {@code unfiledContainerId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code unfiledContainerId}</li> |      *  <li>current user does not have permission to read {@code unfiledContainerId}</li> | ||||||
| @@ -145,7 +139,8 @@ public class UnfiledContainerAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "unfiled-containers/{unfiledContainerId}/children?{parameters}", |             "unfiled-containers/{unfiledContainerId}/children?{parameters}", | ||||||
|             unfiledContainerId, |             unfiledContainerId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -162,15 +157,11 @@ public class UnfiledContainerAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Creates an unfiled container child. Can be a record or an unfiled record folder. |      * Creates an unfiled container child. Can be a record or an unfiled record folder. | ||||||
|      * |      * | ||||||
|      * @param unfiledContainerChildModel |      * @param unfiledContainerChildModel The unfiled container child model which holds the information | ||||||
|      *            The unfiled container child model which holds the information |      * @param unfiledContainerId The identifier of an unfiled container | ||||||
|      * @param unfiledContainerId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of an unfiled container |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The created {@link UnfiledContainerChild} |      * @return The created {@link UnfiledContainerChild} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code unfiledContainerId} is not a valid format or {@code unfiledContainerChildModel} is invalid</li> |      *  <li>{@code unfiledContainerId} is not a valid format or {@code unfiledContainerChildModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -190,21 +181,18 @@ public class UnfiledContainerAPI extends RMModelRequest | |||||||
|                 toJson(unfiledContainerChildModel), |                 toJson(unfiledContainerChildModel), | ||||||
|                 "unfiled-containers/{unfiledContainerId}/children?{parameters}", |                 "unfiled-containers/{unfiledContainerId}/children?{parameters}", | ||||||
|                 unfiledContainerId, |                 unfiledContainerId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Create a record from file resource |      * Create a record from file resource | ||||||
|      * |      * | ||||||
|      * @param unfiledContainerChildModel |      * @param unfiledContainerChildModel {@link UnfiledContainerChild} for electronic record to be created | ||||||
|      *            {@link UnfiledContainerChild} for electronic record to be created |      * @param unfiledContainerChildContent {@link File} pointing to the content of the electronic record to be created | ||||||
|      * @param unfiledContainerChildContent |      * @param unfiledContainerId The identifier of a unfiled container | ||||||
|      *            {@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} |      * @return newly created {@link UnfiledContainerChild} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for invalid recordModel JSON strings | ||||||
|      *             for invalid recordModel JSON strings |  | ||||||
|      */ |      */ | ||||||
|     public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, File unfiledContainerChildContent) |     public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, File unfiledContainerChildContent) | ||||||
|     { |     { | ||||||
| @@ -217,7 +205,10 @@ public class UnfiledContainerAPI extends RMModelRequest | |||||||
|             fail("Only electronic records are supported"); |             fail("Only electronic records are supported"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         /* For file uploads nodeBodyCreate is ignored hence can't be used. Append all Record fields to the request. */ |         /* | ||||||
|  |          * For file uploads nodeBodyCreate is ignored hence can't be used. Append all Record fields | ||||||
|  |          * to the request. | ||||||
|  |          */ | ||||||
|         RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec(); |         RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec(); | ||||||
|         JsonNode root; |         JsonNode root; | ||||||
|         try |         try | ||||||
| @@ -255,16 +246,11 @@ public class UnfiledContainerAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Updates an unfiled record container |      * Updates an unfiled record container | ||||||
|      * |      * | ||||||
|      * @param unfiledContainerModel |      * @param unfiledContainerModel The unfiled record container model which holds the information | ||||||
|      *            The unfiled record container model which holds the information |      * @param unfiledContainerId The identifier of an unfiled record container | ||||||
|      * @param unfiledContainerId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of an unfiled record container |      * @param returns The updated {@link UnfiledContainer} | ||||||
|      * @param parameters |      * @throws RuntimeException for the following cases: | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @param returns |  | ||||||
|      *            The updated {@link UnfiledContainer} |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>the update request is invalid or {@code unfiledContainerId} is not a valid format or {@code unfiledContainerModel} is invalid</li> |      *  <li>the update request is invalid or {@code unfiledContainerId} is not a valid format or {@code unfiledContainerModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -284,7 +270,8 @@ public class UnfiledContainerAPI extends RMModelRequest | |||||||
|                 toJson(unfiledContainerModel), |                 toJson(unfiledContainerModel), | ||||||
|                 "unfiled-containers/{unfiledContainerId}?{parameters}", |                 "unfiled-containers/{unfiledContainerId}?{parameters}", | ||||||
|                 unfiledContainerId, |                 unfiledContainerId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -26,19 +26,18 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.rm.community.requests.gscore.api; | package org.alfresco.rest.rm.community.requests.gscore.api; | ||||||
|  |  | ||||||
| import static org.apache.commons.lang3.StringUtils.EMPTY; |  | ||||||
| import static org.springframework.http.HttpMethod.DELETE; |  | ||||||
| import static org.springframework.http.HttpMethod.GET; |  | ||||||
| import static org.springframework.http.HttpMethod.POST; |  | ||||||
| import static org.springframework.http.HttpMethod.PUT; |  | ||||||
| import static org.testng.Assert.fail; |  | ||||||
|  |  | ||||||
| import static org.alfresco.rest.core.RestRequest.requestWithBody; | import static org.alfresco.rest.core.RestRequest.requestWithBody; | ||||||
| import static org.alfresco.rest.core.RestRequest.simpleRequest; | import static org.alfresco.rest.core.RestRequest.simpleRequest; | ||||||
| import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE; | import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.CONTENT_TYPE; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryObject; | ||||||
| import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | import static org.alfresco.rest.rm.community.util.ParameterCheck.mandatoryString; | ||||||
| import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | import static org.alfresco.rest.rm.community.util.PojoUtility.toJson; | ||||||
|  | import static org.apache.commons.lang3.StringUtils.EMPTY; | ||||||
|  | import static org.springframework.http.HttpMethod.DELETE; | ||||||
|  | import static org.springframework.http.HttpMethod.GET; | ||||||
|  | import static org.springframework.http.HttpMethod.POST; | ||||||
|  | import static org.springframework.http.HttpMethod.PUT; | ||||||
|  | import static org.testng.Assert.fail; | ||||||
|  |  | ||||||
| import java.io.File; | import java.io.File; | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
| @@ -65,8 +64,7 @@ import org.alfresco.rest.rm.community.util.UnfiledContainerChildMixin; | |||||||
| public class UnfiledRecordFolderAPI extends RMModelRequest | public class UnfiledRecordFolderAPI extends RMModelRequest | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * @param rmRestWrapper |      * @param rmRestWrapper RM REST Wrapper | ||||||
|      *            RM REST Wrapper |  | ||||||
|      */ |      */ | ||||||
|     public UnfiledRecordFolderAPI(RMRestWrapper rmRestWrapper) |     public UnfiledRecordFolderAPI(RMRestWrapper rmRestWrapper) | ||||||
|     { |     { | ||||||
| @@ -86,13 +84,10 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets an unfiled record folder. |      * Gets an unfiled record folder. | ||||||
|      * |      * | ||||||
|      * @param unfiledRecordFolderId |      * @param unfiledRecordFolderId The identifier of a unfiled record folder | ||||||
|      *            The identifier of a unfiled record folder |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link UnfiledRecordFolder} for the given {@code unfiledRecordFolderId} |      * @return The {@link UnfiledRecordFolder} for the given {@code unfiledRecordFolderId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code unfiledRecordFolderId} is not a valid format</li> |      *  <li>{@code unfiledRecordFolderId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -108,7 +103,8 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|                 GET, |                 GET, | ||||||
|                 "unfiled-record-folders/{unfiledRecordFolderId}?{parameters}", |                 "unfiled-record-folders/{unfiledRecordFolderId}?{parameters}", | ||||||
|                 unfiledRecordFolderId, |                 unfiledRecordFolderId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -124,13 +120,10 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Gets the children of an unfiled record folder |      * Gets the children of an unfiled record folder | ||||||
|      * |      * | ||||||
|      * @param unfiledRecordFolderId |      * @param unfiledRecordFolderId The identifier of an unfiled records folder | ||||||
|      *            The identifier of an unfiled records folder |      * @param parameters The URL parameters to add | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The {@link UnfiledRecordFolderChildCollection} for the given {@code unfiledRecordFolderId} |      * @return The {@link UnfiledRecordFolderChildCollection} for the given {@code unfiledRecordFolderId} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
|      *  <li>current user does not have permission to read {@code unfiledRecordFolderId}</li> |      *  <li>current user does not have permission to read {@code unfiledRecordFolderId}</li> | ||||||
| @@ -145,7 +138,8 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|             GET, |             GET, | ||||||
|             "unfiled-record-folders/{unfiledRecordFolderId}/children?{parameters}", |             "unfiled-record-folders/{unfiledRecordFolderId}/children?{parameters}", | ||||||
|             unfiledRecordFolderId, |             unfiledRecordFolderId, | ||||||
|                 parameters)); |             parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -162,15 +156,11 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Creates an unfiled record folder child. Can be a record or an unfiled record folder. |      * Creates an unfiled record folder child. Can be a record or an unfiled record folder. | ||||||
|      * |      * | ||||||
|      * @param unfiledRecordFolderChildModel |      * @param unfiledRecordFolderChildModel The unfiled folder child model which holds the information | ||||||
|      *            The unfiled folder child model which holds the information |      * @param unfiledRecordFolderId The identifier of an unfiled folder | ||||||
|      * @param unfiledRecordFolderId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of an unfiled folder |  | ||||||
|      * @param parameters |  | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @return The created {@link UnfiledRecordFolderChild} |      * @return The created {@link UnfiledRecordFolderChild} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for the following cases: | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderChildModel} is invalid</li> |      *  <li>{@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderChildModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -190,21 +180,18 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|                 toJson(unfiledRecordFolderChildModel), |                 toJson(unfiledRecordFolderChildModel), | ||||||
|                 "unfiled-record-folders/{unfiledRecordFolderId}/children?{parameters}", |                 "unfiled-record-folders/{unfiledRecordFolderId}/children?{parameters}", | ||||||
|                 unfiledRecordFolderId, |                 unfiledRecordFolderId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Create a record from file resource |      * Create a record from file resource | ||||||
|      * |      * | ||||||
|      * @param unfiledRecordFolderChildModel |      * @param unfiledRecordFolderChildModel {@link UnfiledContainerChild} for electronic record to be created | ||||||
|      *            {@link UnfiledContainerChild} for electronic record to be created |      * @param unfiledRecordFolderChildContent {@link File} pointing to the content of the electronic record to be created | ||||||
|      * @param unfiledRecordFolderChildContent |      * @param unfiledRecordFolderId The identifier of a unfiled record folder | ||||||
|      *            {@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} |      * @return newly created {@link UnfiledContainerChild} | ||||||
|      * @throws RuntimeException |      * @throws RuntimeException for invalid recordModel JSON strings | ||||||
|      *             for invalid recordModel JSON strings |  | ||||||
|      */ |      */ | ||||||
|     public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent) |     public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent) | ||||||
|     { |     { | ||||||
| @@ -217,7 +204,10 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|             fail("Only electronic records are supported"); |             fail("Only electronic records are supported"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         /* For file uploads nodeBodyCreate is ignored hence can't be used. Append all Record fields to the request. */ |         /* | ||||||
|  |          * For file uploads nodeBodyCreate is ignored hence can't be used. Append all Record fields | ||||||
|  |          * to the request. | ||||||
|  |          */ | ||||||
|         RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec(); |         RequestSpecBuilder builder = getRmRestWrapper().configureRequestSpec(); | ||||||
|         JsonNode root; |         JsonNode root; | ||||||
|         try |         try | ||||||
| @@ -255,16 +245,11 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|     /** |     /** | ||||||
|      * Updates an unfiled record folder |      * Updates an unfiled record folder | ||||||
|      * |      * | ||||||
|      * @param unfiledRecordFolderModel |      * @param unfiledRecordFolderModel The unfiled record folder model which holds the information | ||||||
|      *            The unfiled record folder model which holds the information |      * @param unfiledRecordFolderId The identifier of an unfiled record folder | ||||||
|      * @param unfiledRecordFolderId |      * @param parameters The URL parameters to add | ||||||
|      *            The identifier of an unfiled record folder |      * @param returns The updated {@link UnfiledRecordFolder} | ||||||
|      * @param parameters |      * @throws RuntimeException for the following cases: | ||||||
|      *            The URL parameters to add |  | ||||||
|      * @param returns |  | ||||||
|      *            The updated {@link UnfiledRecordFolder} |  | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>the update request is invalid or {@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderModel} is invalid</li> |      *  <li>the update request is invalid or {@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderModel} is invalid</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -284,16 +269,15 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|                 toJson(unfiledRecordFolderModel), |                 toJson(unfiledRecordFolderModel), | ||||||
|                 "unfiled-record-folders/{unfiledRecordFolderId}?{parameters}", |                 "unfiled-record-folders/{unfiledRecordFolderId}?{parameters}", | ||||||
|                 unfiledRecordFolderId, |                 unfiledRecordFolderId, | ||||||
|                 parameters)); |                 parameters | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Deletes an unfiled record folder. |      * Deletes an unfiled record folder. | ||||||
|      * |      * | ||||||
|      * @param unfiledRecordFolderId |      * @param unfiledRecordFolderId The identifier of a unfiled record folder | ||||||
|      *            The identifier of a unfiled record folder |      * @throws RuntimeException for the following cases: | ||||||
|      * @throws RuntimeException |  | ||||||
|      *             for the following cases: |  | ||||||
|      * <ul> |      * <ul> | ||||||
|      *  <li>{@code unfiledRecordFolderId} is not a valid format</li> |      *  <li>{@code unfiledRecordFolderId} is not a valid format</li> | ||||||
|      *  <li>authentication fails</li> |      *  <li>authentication fails</li> | ||||||
| @@ -309,7 +293,8 @@ public class UnfiledRecordFolderAPI extends RMModelRequest | |||||||
|         getRmRestWrapper().processEmptyModel(simpleRequest( |         getRmRestWrapper().processEmptyModel(simpleRequest( | ||||||
|                 DELETE, |                 DELETE, | ||||||
|                 "unfiled-record-folders/{recordFolderId}", |                 "unfiled-record-folders/{recordFolderId}", | ||||||
|                 unfiledRecordFolderId)); |                 unfiledRecordFolderId | ||||||
|  |         )); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -44,10 +44,12 @@ public class CommonTestUtils | |||||||
|  |  | ||||||
|     /** Private constructor to prevent instantiation. */ |     /** Private constructor to prevent instantiation. */ | ||||||
|     private CommonTestUtils() |     private CommonTestUtils() | ||||||
|     {} |     { | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Generate a prefix to namespace the objects in a test class. Note that four random hex digits should be good enough to avoid collisions when running locally and should also be short enough to maintain readability. |      * Generate a prefix to namespace the objects in a test class. Note that four random hex digits should be good enough to avoid | ||||||
|  |      * collisions when running locally and should also be short enough to maintain readability. | ||||||
|      */ |      */ | ||||||
|     public static String generateTestPrefix(Class<?> clazz) |     public static String generateTestPrefix(Class<?> clazz) | ||||||
|     { |     { | ||||||
|   | |||||||
| @@ -41,17 +41,17 @@ import com.github.dockerjava.api.model.Frame; | |||||||
| import com.github.dockerjava.core.DockerClientBuilder; | import com.github.dockerjava.core.DockerClientBuilder; | ||||||
| import com.github.dockerjava.core.command.LogContainerResultCallback; | import com.github.dockerjava.core.command.LogContainerResultCallback; | ||||||
| import com.github.dockerjava.netty.NettyDockerCmdExecFactory; | import com.github.dockerjava.netty.NettyDockerCmdExecFactory; | ||||||
|  |  | ||||||
| import lombok.Getter; | import lombok.Getter; | ||||||
| import lombok.Setter; | import lombok.Setter; | ||||||
| import org.apache.commons.lang.SystemUtils; | import org.alfresco.utility.Utility; | ||||||
|  | import org.apache.commons.lang3.SystemUtils; | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| import org.springframework.beans.factory.annotation.Value; | import org.springframework.beans.factory.annotation.Value; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
| import org.alfresco.utility.Utility; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Helper class for interaction with docker containers |  * Helper class for interaction with docker containers | ||||||
|  * |  * | ||||||
| @@ -89,10 +89,8 @@ public class DockerHelper | |||||||
|     /** |     /** | ||||||
|      * Method for returning logs of docker container |      * Method for returning logs of docker container | ||||||
|      * |      * | ||||||
|      * @param containerId |      * @param containerId - ID of the container | ||||||
|      *            - ID of the container |      * @param timeStamp - get the logs since a specific timestamp | ||||||
|      * @param timeStamp |  | ||||||
|      *            - get the logs since a specific timestamp |  | ||||||
|      * @return list of strings, where every string is log line |      * @return list of strings, where every string is log line | ||||||
|      */ |      */ | ||||||
|     private List<String> getDockerLogs(String containerId, int timeStamp) |     private List<String> getDockerLogs(String containerId, int timeStamp) | ||||||
| @@ -107,7 +105,8 @@ public class DockerHelper | |||||||
|  |  | ||||||
|         try |         try | ||||||
|         { |         { | ||||||
|             logContainerCmd.exec(new LogContainerResultCallback() { |             logContainerCmd.exec(new LogContainerResultCallback() | ||||||
|  |             { | ||||||
|                 @Override |                 @Override | ||||||
|                 public void onNext(Frame item) |                 public void onNext(Frame item) | ||||||
|                 { |                 { | ||||||
| @@ -149,14 +148,14 @@ public class DockerHelper | |||||||
|     /** |     /** | ||||||
|      * Helper method to check if the specified exception is thrown in alfresco logs |      * Helper method to check if the specified exception is thrown in alfresco logs | ||||||
|      * |      * | ||||||
|      * @param expectedException |      * @param expectedException the expected exception to be thrown | ||||||
|      *            the expected exception to be thrown |  | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|     public void checkExceptionIsInAlfrescoLogs(String expectedException) throws Exception |     public void checkExceptionIsInAlfrescoLogs(String expectedException) throws Exception | ||||||
|     { |     { | ||||||
|         //Retry the operation because sometimes it takes few seconds to throw the exception |         //Retry the operation because sometimes it takes few seconds to throw the exception | ||||||
|         Utility.sleep(6000, 30000, () -> { |         Utility.sleep(6000, 30000, () -> | ||||||
|  |         { | ||||||
|             List<String> alfrescoLogs = getAlfrescoLogs(); |             List<String> alfrescoLogs = getAlfrescoLogs(); | ||||||
|             assertTrue(alfrescoLogs.stream().anyMatch(logLine -> logLine.contains(expectedException))); |             assertTrue(alfrescoLogs.stream().anyMatch(logLine -> logLine.contains(expectedException))); | ||||||
|         }); |         }); | ||||||
| @@ -165,8 +164,7 @@ public class DockerHelper | |||||||
|     /** |     /** | ||||||
|      * Method for finding docker containers after the image name |      * Method for finding docker containers after the image name | ||||||
|      * |      * | ||||||
|      * @param imageName |      * @param imageName - the name of the image used by container | ||||||
|      *            - the name of the image used by container |  | ||||||
|      * @return the containers |      * @return the containers | ||||||
|      */ |      */ | ||||||
|     private List<Container> findContainersByImageName(String imageName) |     private List<Container> findContainersByImageName(String imageName) | ||||||
|   | |||||||
| @@ -31,7 +31,9 @@ import com.fasterxml.jackson.annotation.JsonUnwrapped; | |||||||
| import org.alfresco.rest.rm.community.model.record.RecordProperties; | import org.alfresco.rest.rm.community.model.record.RecordProperties; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Mix class for Record POJO class Mix-in annotations are: a way to associate annotations with classes without modifying (target) classes themselves. |  * Mix class for Record POJO class | ||||||
|  |  * Mix-in annotations are: a way to associate annotations with classes | ||||||
|  |  * without modifying (target) classes themselves. | ||||||
|  * |  * | ||||||
|  * @author Rodica Sutu |  * @author Rodica Sutu | ||||||
|  * @since 2.6 |  * @since 2.6 | ||||||
| @@ -39,7 +41,8 @@ import org.alfresco.rest.rm.community.model.record.RecordProperties; | |||||||
| public abstract class FilePlanComponentMixIn | public abstract class FilePlanComponentMixIn | ||||||
| { | { | ||||||
|     /** |     /** | ||||||
|      * Annotation used to indicate that a property should be serialized "unwrapped" Its properties are instead included as properties of its containing Object |      * Annotation used to indicate that a property should be serialized "unwrapped" | ||||||
|  |      * Its properties are instead included as properties of its containing Object | ||||||
|      */ |      */ | ||||||
|     @JsonUnwrapped |     @JsonUnwrapped | ||||||
|     abstract RecordProperties getProperties(); |     abstract RecordProperties getProperties(); | ||||||
|   | |||||||
| @@ -44,12 +44,9 @@ public class ParameterCheck | |||||||
|     /** |     /** | ||||||
|      * Checks if a given {@link String} is blank or not, i.e. not <code>null<code>, "" or " ". |      * Checks if a given {@link String} is blank or not, i.e. not <code>null<code>, "" or " ". | ||||||
|      * |      * | ||||||
|      * @param paramName |      * @param paramName The name of the parameter to check | ||||||
|      *            The name of the parameter to check |      * @param paramValue The value of the parameter to check | ||||||
|      * @param paramValue |      * @throws IllegalArgumentException Throws an exception if the given value is blank | ||||||
|      *            The value of the parameter to check |  | ||||||
|      * @throws IllegalArgumentException |  | ||||||
|      *             Throws an exception if the given value is blank |  | ||||||
|      */ |      */ | ||||||
|     public static void mandatoryString(final String paramName, final String paramValue) throws IllegalArgumentException |     public static void mandatoryString(final String paramName, final String paramValue) throws IllegalArgumentException | ||||||
|     { |     { | ||||||
| @@ -62,12 +59,9 @@ public class ParameterCheck | |||||||
|     /** |     /** | ||||||
|      * Checks if a given {@link Object} is null or not |      * Checks if a given {@link Object} is null or not | ||||||
|      * |      * | ||||||
|      * @param paramName |      * @param paramName The name of the parameter to check | ||||||
|      *            The name of the parameter to check |      * @param object The value of the parameter to check | ||||||
|      * @param object |      * @throws IllegalArgumentException Throws an exception if the given value is null | ||||||
|      *            The value of the parameter to check |  | ||||||
|      * @throws IllegalArgumentException |  | ||||||
|      *             Throws an exception if the given value is null |  | ||||||
|      */ |      */ | ||||||
|     public static void mandatoryObject(final String paramName, final Object object) throws IllegalArgumentException |     public static void mandatoryObject(final String paramName, final Object object) throws IllegalArgumentException | ||||||
|     { |     { | ||||||
|   | |||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user