mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-24 14:32:01 +00:00
Compare commits
360 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
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')
|
||||
steps:
|
||||
- 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/free-hosted-runner-disk-space@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
|
||||
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:
|
||||
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"
|
||||
run: bash ./scripts/ci/init.sh
|
||||
- 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/free-hosted-runner-disk-space@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:
|
||||
classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\""
|
||||
|
||||
@@ -267,6 +266,7 @@ jobs:
|
||||
- name: "Set transformers tag"
|
||||
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||
- name: "Set up the environment"
|
||||
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
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
@@ -875,6 +875,7 @@ jobs:
|
||||
echo "HOSTNAME_VERIFICATION_DISABLED=false" >> "$GITHUB_ENV"
|
||||
fi
|
||||
- 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
|
||||
- name: "Prepare Report Portal"
|
||||
if: github.ref_name == 'master'
|
||||
@@ -976,6 +977,7 @@ jobs:
|
||||
bash ./scripts/ci/init.sh
|
||||
bash ./scripts/ci/build.sh
|
||||
- name: "Set up the environment"
|
||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||
run: |
|
||||
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
|
||||
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
||||
|
@@ -147,7 +147,7 @@
|
||||
"filename": ".github/workflows/ci.yml",
|
||||
"hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39",
|
||||
"is_verified": false,
|
||||
"line_number": 901
|
||||
"line_number": 902
|
||||
}
|
||||
],
|
||||
".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",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 58,
|
||||
"line_number": 57,
|
||||
"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",
|
||||
"hashed_secret": "e3557f3b0f2189660980d213f75d1a7828d56af1",
|
||||
"is_verified": false,
|
||||
"line_number": 85,
|
||||
"line_number": 83,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -731,7 +731,7 @@
|
||||
"filename": "remote-api/src/test/java/org/alfresco/rest/api/tests/AbstractBaseApiTest.java",
|
||||
"hashed_secret": "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
"is_verified": false,
|
||||
"line_number": 120,
|
||||
"line_number": 111,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1273,7 +1273,7 @@
|
||||
"filename": "repository/src/main/resources/alfresco/repository.properties",
|
||||
"hashed_secret": "84551ae5442affc9f1a2d3b4c86ae8b24860149d",
|
||||
"is_verified": false,
|
||||
"line_number": 770,
|
||||
"line_number": 771,
|
||||
"is_secret": false
|
||||
}
|
||||
],
|
||||
@@ -1627,7 +1627,7 @@
|
||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/SpringBasedIdentityServiceFacadeUnitTest.java",
|
||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||
"is_verified": false,
|
||||
"line_number": 46,
|
||||
"line_number": 48,
|
||||
"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 Platform](https://www.hyland.com/en/products/alfresco-platform)
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>23.3.14.1</version>
|
||||
<version>23.6.0.1</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>23.3.14.1</version>
|
||||
<version>23.6.0.1</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>23.3.14.1</version>
|
||||
<version>23.6.0.1</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
@@ -98,7 +98,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.docker-java</groupId>
|
||||
<artifactId>docker-java</artifactId>
|
||||
<version>3.3.6</version>
|
||||
<version>3.4.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
|
@@ -26,11 +26,12 @@
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Extends {@link RestProperties} to be able to change/add properties
|
||||
*
|
||||
|
@@ -27,11 +27,6 @@
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
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.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.utility.model.StatusModel;
|
||||
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
|
||||
@@ -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:
|
||||
*
|
||||
* <pre>
|
||||
* 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>
|
||||
* restClient.configureRequestSpec()
|
||||
* .addMultiPart("filedata", Utility.getResourceTestDataFile("restapi-resource"))
|
||||
* .addFormParam("renditions", "doclib")
|
||||
* .addFormParam("autoRename", true);
|
||||
*
|
||||
* restClient.withCoreAPI().usingNode(ContentModel.my()).createNode();
|
||||
* </pre>
|
||||
*
|
||||
* This will create the node using the multipart data defined.
|
||||
* </pre> This will create the node using the multipart data defined.
|
||||
*/
|
||||
public RequestSpecBuilder configureRequestSpec()
|
||||
{
|
||||
@@ -173,8 +171,7 @@ public class RMRestWrapper
|
||||
/**
|
||||
* Process a response that returns a html
|
||||
*
|
||||
* @throws EmptyJsonResponseException
|
||||
* If there is no response from the server.
|
||||
* @throws EmptyJsonResponseException If there is no response from the server.
|
||||
*/
|
||||
public RestHtmlResponse processHtmlResponse(RestRequest simpleRequest)
|
||||
{
|
||||
|
@@ -32,10 +32,6 @@ import jakarta.annotation.Resource;
|
||||
|
||||
import lombok.Getter;
|
||||
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.coreAPI.RestCoreAPI;
|
||||
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.RecordFolderAPI;
|
||||
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.TransferContainerAPI;
|
||||
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.RetentionScheduleAPI;
|
||||
import org.alfresco.utility.data.DataUserAIS;
|
||||
import org.alfresco.utility.model.RepoTestModel;
|
||||
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
|
||||
|
@@ -44,12 +44,10 @@ public class SearchRequestBuilder extends SearchRequest
|
||||
{
|
||||
new SearchRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the sql statement for the SearchRequest
|
||||
*
|
||||
* @param query
|
||||
* sql statement
|
||||
* @param query sql statement
|
||||
* @return search request
|
||||
*/
|
||||
public SearchRequestBuilder setQueryBuilder(RestRequestQueryModel query)
|
||||
@@ -61,8 +59,7 @@ public class SearchRequestBuilder extends SearchRequest
|
||||
/**
|
||||
* Set the paging statement for the SearchRequest
|
||||
*
|
||||
* @param paging
|
||||
* pagination requested
|
||||
* @param paging pagination requested
|
||||
* @return search request
|
||||
*/
|
||||
public SearchRequestBuilder setPagingBuilder(Pagination paging)
|
||||
@@ -85,8 +82,7 @@ public class SearchRequestBuilder extends SearchRequest
|
||||
/**
|
||||
* Set the requested fields for the SearchRequest
|
||||
*
|
||||
* @param fields
|
||||
* requested fields
|
||||
* @param fields requested fields
|
||||
* @return search request
|
||||
*/
|
||||
public SearchRequestBuilder setFieldsBuilder(List<String> fields)
|
||||
|
@@ -26,12 +26,12 @@
|
||||
*/
|
||||
package org.alfresco.rest.core.v0;
|
||||
|
||||
import jakarta.json.Json;
|
||||
import jakarta.json.JsonReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeFormatterBuilder;
|
||||
import jakarta.json.Json;
|
||||
import jakarta.json.JsonReader;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.http.HttpEntity;
|
||||
@@ -52,20 +52,20 @@ public class APIUtils
|
||||
{
|
||||
/** Logger for this 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' similar with {@link DateTimeFormatter#ISO_INSTANT}, but with only 3 nanoseconds
|
||||
*/
|
||||
public static final DateTimeFormatter ISO_INSTANT_FORMATTER = new DateTimeFormatterBuilder().appendInstant(3).toFormatter();
|
||||
/** 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*/
|
||||
public static final DateTimeFormatter ISO_INSTANT_FORMATTER =
|
||||
new DateTimeFormatterBuilder().appendInstant(3).toFormatter();
|
||||
|
||||
/** Private constructor for helper class. */
|
||||
private APIUtils()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the body of a HTTP response as a JSON object.
|
||||
*
|
||||
* @param httpResponse
|
||||
* The HTTP response.
|
||||
* @param httpResponse The HTTP response.
|
||||
* @return A JSON representation of the object.
|
||||
*/
|
||||
public static JSONObject convertHTTPResponseToJSON(HttpResponse httpResponse)
|
||||
@@ -86,8 +86,7 @@ public class APIUtils
|
||||
/**
|
||||
* Util method to extract the message string from the HTTP response
|
||||
*
|
||||
* @param httpResponse
|
||||
* http response
|
||||
* @param httpResponse http response
|
||||
* @return error message from the http response
|
||||
*/
|
||||
public static String extractErrorMessageFromHttpResponse(HttpResponse httpResponse)
|
||||
|
@@ -39,6 +39,9 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
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.commons.exceptions.CmisObjectNotFoundException;
|
||||
import org.apache.http.HttpResponse;
|
||||
@@ -61,10 +64,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
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
|
||||
*
|
||||
@@ -99,11 +98,9 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Helper method to extract list of properties values from result.
|
||||
*
|
||||
* @param result
|
||||
* the response
|
||||
* @param result the response
|
||||
* @return list of specified property values in result
|
||||
* @throws RuntimeException
|
||||
* for malformed response
|
||||
* @throws RuntimeException for malformed response
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param requestResult
|
||||
* the request response
|
||||
* @param requestResult the request response
|
||||
* @return a map containing information about multiple properties values that correspond to a unique one
|
||||
* @throws RuntimeException
|
||||
* for malformed response
|
||||
* @throws RuntimeException for malformed response
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param username
|
||||
* the username
|
||||
* @param password
|
||||
* the password
|
||||
* @param path
|
||||
* 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 ""
|
||||
* @param username the username
|
||||
* @param password the password
|
||||
* @param path 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
|
||||
*/
|
||||
public String getItemNodeRef(String username, String password, String path)
|
||||
@@ -210,12 +204,9 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Retrieve a Cmis object by its path
|
||||
*
|
||||
* @param username
|
||||
* the user's username
|
||||
* @param password
|
||||
* its password
|
||||
* @param path
|
||||
* the object path
|
||||
* @param username the user's username
|
||||
* @param password its password
|
||||
* @param path the object path
|
||||
* @return the object in case it exists, null if its does not exist
|
||||
*/
|
||||
protected CmisObject getObjectByPath(String username, String password, String path)
|
||||
@@ -224,8 +215,7 @@ public abstract class BaseAPI
|
||||
try
|
||||
{
|
||||
object = contentService.getCMISSession(username, password).getObjectByPath(path);
|
||||
}
|
||||
catch (CmisObjectNotFoundException notFoundError)
|
||||
} catch (CmisObjectNotFoundException notFoundError)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -235,12 +225,9 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Generic faceted request.
|
||||
*
|
||||
* @param username
|
||||
* the username
|
||||
* @param password
|
||||
* the password
|
||||
* @param parameters
|
||||
* if the request has parameters
|
||||
* @param username the username
|
||||
* @param password the password
|
||||
* @param parameters if the request has parameters
|
||||
* @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)
|
||||
@@ -268,15 +255,10 @@ public abstract class BaseAPI
|
||||
|
||||
/**
|
||||
* Helper method for GET requests
|
||||
*
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @param urlTemplate
|
||||
* request URL template
|
||||
* @param urlTemplateParams
|
||||
* zero or more parameters used with <i>urlTemplate</i>
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param urlTemplate request URL template
|
||||
* @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i>
|
||||
*/
|
||||
protected JSONObject doGetRequest(String adminUser,
|
||||
String adminPassword,
|
||||
@@ -302,15 +284,10 @@ public abstract class BaseAPI
|
||||
|
||||
/**
|
||||
* Helper method for Delete requests
|
||||
*
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @param urlTemplate
|
||||
* request URL template
|
||||
* @param urlTemplateParams
|
||||
* zero or more parameters used with <i>urlTemplate</i>
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param urlTemplate request URL template
|
||||
* @param urlTemplateParams zero or more parameters used with <i>urlTemplate</i>
|
||||
*/
|
||||
protected JSONObject doDeleteRequest(String adminUser,
|
||||
String adminPassword,
|
||||
@@ -336,17 +313,11 @@ public abstract class BaseAPI
|
||||
|
||||
/**
|
||||
* Helper method for PUT requests
|
||||
*
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @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>
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @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,
|
||||
String adminPassword,
|
||||
@@ -374,18 +345,12 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Helper method for PUT requests
|
||||
*
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @param expectedStatusCode
|
||||
* The expected return status code.
|
||||
* @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>
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param expectedStatusCode The expected return status code.
|
||||
* @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,
|
||||
String adminPassword,
|
||||
@@ -401,22 +366,14 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Helper method for PUT requests
|
||||
*
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @param expectedStatusCode
|
||||
* The expected return status code.
|
||||
* @param urlStart
|
||||
* the start of the URL (for example "alfresco/s/slingshot").
|
||||
* @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.
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param expectedStatusCode The expected return status code.
|
||||
* @param urlStart the start of the URL (for example "alfresco/s/slingshot").
|
||||
* @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,
|
||||
String adminPassword,
|
||||
@@ -442,12 +399,9 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Fill in the parameters for a URL template.
|
||||
*
|
||||
* @param urlStart
|
||||
* The start of the URL.
|
||||
* @param urlTemplate
|
||||
* The template.
|
||||
* @param urlTemplateParams
|
||||
* Any parameters that need to be filled into the URL template.
|
||||
* @param urlStart The start of the URL.
|
||||
* @param urlTemplate The template.
|
||||
* @param urlTemplateParams Any parameters that need to be filled into the URL template.
|
||||
* @return The resultant URL.
|
||||
*/
|
||||
private String formatRequestUrl(String urlStart, String urlTemplate, String[] urlTemplateParams)
|
||||
@@ -462,17 +416,11 @@ public abstract class BaseAPI
|
||||
|
||||
/**
|
||||
* Helper method for POST requests
|
||||
*
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @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>
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @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,
|
||||
String adminPassword,
|
||||
@@ -500,18 +448,12 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Helper method for POST requests
|
||||
*
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @param expectedStatusCode
|
||||
* The expected return status code.
|
||||
* @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>
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param expectedStatusCode The expected return status code.
|
||||
* @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,
|
||||
String adminPassword,
|
||||
@@ -527,18 +469,12 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Helper method for POST requests to slingshot.
|
||||
*
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @param expectedStatusCode
|
||||
* The expected return status code.
|
||||
* @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>
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param expectedStatusCode The expected return status code.
|
||||
* @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,
|
||||
String adminPassword,
|
||||
@@ -554,22 +490,14 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Helper method for POST requests
|
||||
*
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @param expectedStatusCode
|
||||
* The expected return status code.
|
||||
* @param urlStart
|
||||
* the start of the URL (for example "alfresco/s/slingshot").
|
||||
* @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.
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param expectedStatusCode The expected return status code.
|
||||
* @param urlStart the start of the URL (for example "alfresco/s/slingshot").
|
||||
* @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,
|
||||
String adminPassword,
|
||||
@@ -601,8 +529,7 @@ public abstract class BaseAPI
|
||||
/**
|
||||
* Try to convert the response body to a JSON object.
|
||||
*
|
||||
* @param response
|
||||
* The response.
|
||||
* @param response The response.
|
||||
* @return The JSON object or null if it was not possible to convert the response.
|
||||
*/
|
||||
private JSONObject responseBodyToJson(HttpResponse response)
|
||||
@@ -627,22 +554,14 @@ public abstract class BaseAPI
|
||||
|
||||
/**
|
||||
* Helper method for handling generic HTTP requests
|
||||
*
|
||||
* @param requestType
|
||||
* request type (a subclass of {@link HttpRequestBase})
|
||||
* @param requestUrl
|
||||
* URL the request is to be sent to
|
||||
* @param adminUser
|
||||
* user with administrative privileges
|
||||
* @param adminPassword
|
||||
* password for adminUser
|
||||
* @param requestParams
|
||||
* endpoint specific request parameters
|
||||
* @param requestType request type (a subclass of {@link HttpRequestBase})
|
||||
* @param requestUrl URL the request is to be sent to
|
||||
* @param adminUser user with administrative privileges
|
||||
* @param adminPassword password for adminUser
|
||||
* @param requestParams endpoint specific request parameters
|
||||
* @return response body
|
||||
* @throws IllegalAccessException
|
||||
* for invalid <i>requestType</i>
|
||||
* @throws InstantiationException
|
||||
* for invalid <i>requestType</i>
|
||||
* @throws IllegalAccessException for invalid <i>requestType</i>
|
||||
* @throws InstantiationException for invalid <i>requestType</i>
|
||||
*/
|
||||
private <T extends HttpRequestBase> JSONObject doRequest(
|
||||
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
|
||||
{
|
||||
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
|
||||
{
|
||||
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
|
||||
{
|
||||
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;
|
||||
|
||||
private RM_ACTIONS(String action)
|
||||
@@ -801,16 +750,17 @@ public abstract class BaseAPI
|
||||
|
||||
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
|
||||
*
|
||||
* @param properties
|
||||
* the map containing properties
|
||||
* @param property
|
||||
* to get value for
|
||||
* @param properties the map containing properties
|
||||
* @param property to get value for
|
||||
* @return the property value
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param requestParams
|
||||
* the request parameters
|
||||
* @param propertyRequestValue
|
||||
* the property name in the request, eg. "prop_cm_name"
|
||||
* @param itemProperties
|
||||
* map of item's properties values
|
||||
* @param property
|
||||
* the property in the property map to check value for
|
||||
* @param requestParams the request parameters
|
||||
* @param propertyRequestValue the property name in the request, eg. "prop_cm_name"
|
||||
* @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
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param username
|
||||
* the username with whom the delete is performed
|
||||
* @param password
|
||||
* the user's password
|
||||
* @param itemPath
|
||||
* 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.
|
||||
* @param username the username with whom the delete is performed
|
||||
* @param password the user's password
|
||||
* @param itemPath 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.
|
||||
*/
|
||||
protected void deleteItem(String username, String password, String itemPath)
|
||||
{
|
||||
|
@@ -28,8 +28,13 @@ package org.alfresco.rest.core.v0;
|
||||
|
||||
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;
|
||||
|
||||
RMEvents(String eventName)
|
||||
|
@@ -30,11 +30,11 @@ import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
|
@@ -35,7 +35,18 @@ package org.alfresco.rest.rm.community.model.audit;
|
||||
*/
|
||||
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 */
|
||||
public final String event;
|
||||
|
@@ -29,6 +29,7 @@ package org.alfresco.rest.rm.community.model.common;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
@@ -27,10 +27,10 @@
|
||||
package org.alfresco.rest.rm.community.model.common;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
|
@@ -29,14 +29,15 @@ package org.alfresco.rest.rm.community.model.common;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for path parameter
|
||||
*
|
||||
|
@@ -27,6 +27,7 @@
|
||||
package org.alfresco.rest.rm.community.model.common;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
@@ -34,8 +34,10 @@ package org.alfresco.rest.rm.community.model.custom;
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
|
@@ -29,16 +29,17 @@ package org.alfresco.rest.rm.community.model.fileplan;
|
||||
import java.util.List;
|
||||
|
||||
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.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
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
|
||||
*
|
||||
|
@@ -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 com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for file plan properties
|
||||
*
|
||||
|
@@ -36,7 +36,8 @@ public class FilePlanComponentAspects
|
||||
{
|
||||
/** Private constructor to prevent instantiation. */
|
||||
private FilePlanComponentAspects()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
// aspect present on completed records
|
||||
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 com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
|
@@ -27,11 +27,11 @@
|
||||
package org.alfresco.rest.rm.community.model.hold;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.search.RestRequestQueryModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
|
@@ -26,6 +26,8 @@
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.model.hold;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
@@ -30,7 +30,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
|
@@ -34,4 +34,5 @@ import org.alfresco.rest.core.RestModels;
|
||||
* @author Damian Ujma
|
||||
*/
|
||||
public class HoldBulkStatusCollection extends RestModels<HoldBulkStatusEntry, HoldBulkStatusCollection>
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
@@ -26,12 +26,13 @@
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.model.hold;
|
||||
|
||||
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.RestModels;
|
||||
|
||||
@Builder
|
||||
|
@@ -27,12 +27,12 @@
|
||||
package org.alfresco.rest.rm.community.model.hold;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
|
@@ -34,4 +34,5 @@ import org.alfresco.rest.core.RestModels;
|
||||
* @author Damian Ujma
|
||||
*/
|
||||
public class HoldChildCollection extends RestModels<HoldChildEntry, HoldChildCollection>
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
@@ -27,12 +27,12 @@
|
||||
package org.alfresco.rest.rm.community.model.hold;
|
||||
|
||||
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.RestModels;
|
||||
|
||||
/**
|
||||
|
@@ -34,4 +34,5 @@ import org.alfresco.rest.core.RestModels;
|
||||
* @author Damian Ujma
|
||||
*/
|
||||
public class HoldCollection extends RestModels<HoldEntry, HoldCollection>
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
@@ -27,12 +27,12 @@
|
||||
package org.alfresco.rest.rm.community.model.hold;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
|
@@ -27,12 +27,12 @@
|
||||
package org.alfresco.rest.rm.community.model.hold;
|
||||
|
||||
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.RestModels;
|
||||
|
||||
/**
|
||||
|
@@ -27,12 +27,12 @@
|
||||
package org.alfresco.rest.rm.community.model.hold;
|
||||
|
||||
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.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.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
|
@@ -29,11 +29,6 @@ package org.alfresco.rest.rm.community.model.record;
|
||||
import java.util.List;
|
||||
|
||||
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.assertion.ModelAssertion;
|
||||
@@ -42,6 +37,12 @@ import org.alfresco.rest.model.RestNodeModel;
|
||||
import org.alfresco.rest.rm.community.model.common.Path;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* POJO for record
|
||||
*
|
||||
|
@@ -27,14 +27,15 @@
|
||||
package org.alfresco.rest.rm.community.model.record;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for File records
|
||||
*
|
||||
|
@@ -27,14 +27,15 @@
|
||||
package org.alfresco.rest.rm.community.model.record;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* 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_EXPRESSION;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RESOLUTION_UNIT;
|
||||
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_REVIEW_AS_OF;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RMV_VERSIONED;
|
||||
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.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.rm.community.model.common.Owner;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
|
@@ -29,16 +29,17 @@ package org.alfresco.rest.rm.community.model.recordcategory;
|
||||
import java.util.List;
|
||||
|
||||
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.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
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
|
||||
*
|
||||
|
@@ -29,16 +29,17 @@ package org.alfresco.rest.rm.community.model.recordcategory;
|
||||
import java.util.List;
|
||||
|
||||
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.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
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
|
||||
*
|
||||
|
@@ -27,11 +27,12 @@
|
||||
package org.alfresco.rest.rm.community.model.recordcategory;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 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_LOCATION;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_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_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_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_ROOT_NODE_REF;
|
||||
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.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.ReviewPeriod;
|
||||
import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer;
|
||||
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
|
||||
*
|
||||
|
@@ -27,12 +27,13 @@
|
||||
package org.alfresco.rest.rm.community.model.recordcategory;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 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_VITAL_RECORD_INDICATOR;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
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.ReviewPeriod;
|
||||
import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer;
|
||||
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
|
||||
*
|
||||
|
@@ -29,16 +29,17 @@ package org.alfresco.rest.rm.community.model.recordfolder;
|
||||
import java.util.List;
|
||||
|
||||
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.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
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
|
||||
*
|
||||
|
@@ -27,15 +27,16 @@
|
||||
package org.alfresco.rest.rm.community.model.recordfolder;
|
||||
|
||||
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.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
import org.alfresco.rest.rm.community.model.record.Record;
|
||||
|
||||
/**
|
||||
* 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_LOCATION;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_OWNER;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields
|
||||
.PROPERTIES_RECORD_SEARCH_DISPOSITION_AUTHORITY;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields
|
||||
.PROPERTIES_RECORD_SEARCH_DISPOSITION_INSTRUCTIONS;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_HAS_DISPOSITION_SCHEDULE;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD;
|
||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentFields.PROPERTIES_RECORD_SEARCH_VITAL_RECORD_REVIEW_PERIOD_EXPRESSION;
|
||||
@@ -48,17 +50,18 @@ import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
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.ReviewPeriod;
|
||||
import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer;
|
||||
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
|
||||
*
|
||||
|
@@ -26,12 +26,11 @@
|
||||
*/
|
||||
package org.alfresco.rest.rm.community.model.retentionschedule;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* retention schedule
|
||||
@@ -53,8 +52,7 @@ public class RetentionSchedule extends TestModel
|
||||
return isRecordLevel;
|
||||
}
|
||||
|
||||
public void setIsRecordLevel(boolean recordLevel)
|
||||
{
|
||||
public void setIsRecordLevel(boolean recordLevel) {
|
||||
isRecordLevel = recordLevel;
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@
|
||||
package org.alfresco.rest.rm.community.model.retentionschedule;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
@@ -27,6 +27,6 @@
|
||||
package org.alfresco.rest.rm.community.model.retentionschedule;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
@Data
|
||||
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;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
@Data
|
||||
|
@@ -31,7 +31,26 @@ package org.alfresco.rest.rm.community.model.rules;
|
||||
*/
|
||||
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;
|
||||
|
||||
|
@@ -31,8 +31,9 @@ package org.alfresco.rest.rm.community.model.rules;
|
||||
*/
|
||||
public enum ConditionsOnRule
|
||||
{
|
||||
UPDATE("update"), ADDED("inbound"), REMOVED("outbound");
|
||||
|
||||
UPDATE("update"),
|
||||
ADDED("inbound"),
|
||||
REMOVED("outbound");
|
||||
private String whenConditionValue;
|
||||
|
||||
ConditionsOnRule(String value)
|
||||
|
@@ -200,3 +200,4 @@ public class RuleDefinition
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -27,14 +27,15 @@
|
||||
package org.alfresco.rest.rm.community.model.site;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.model.RestSiteModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.model.RestSiteModel;
|
||||
|
||||
/**
|
||||
* POJO for RM Site component
|
||||
*
|
||||
|
@@ -34,5 +34,6 @@ package org.alfresco.rest.rm.community.model.site;
|
||||
*/
|
||||
public enum RMSiteCompliance
|
||||
{
|
||||
STANDARD, DOD5015
|
||||
STANDARD,
|
||||
DOD5015
|
||||
}
|
||||
|
@@ -27,8 +27,16 @@
|
||||
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 Rodica Sutu
|
||||
* @since 2.6
|
||||
|
@@ -30,15 +30,16 @@ package org.alfresco.rest.rm.community.model.transfer;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.model.RestByUserModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.model.RestByUserModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for Transfer
|
||||
*
|
||||
|
@@ -30,16 +30,17 @@ package org.alfresco.rest.rm.community.model.transfer;
|
||||
import java.util.List;
|
||||
|
||||
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.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
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
|
||||
*
|
||||
|
@@ -31,7 +31,6 @@ import org.alfresco.rest.core.RestModels;
|
||||
|
||||
/**
|
||||
* Handle collection of {@link TransferChildEntry}
|
||||
*
|
||||
* @author Silviu Dinuta
|
||||
* @since 2.6
|
||||
*/
|
||||
|
@@ -27,15 +27,16 @@
|
||||
|
||||
package org.alfresco.rest.rm.community.model.transfer;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
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.RestModels;
|
||||
|
||||
/**
|
||||
* 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_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.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.ReviewPeriod;
|
||||
import org.alfresco.rest.rm.community.util.ReviewPeriodSerializer;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for transfer child properties
|
||||
*
|
||||
@@ -136,6 +137,7 @@ public class TransferChildProperties extends TestModel
|
||||
@JsonProperty (PROPERTIES_ORIGINAL_NAME)
|
||||
private String originalName;
|
||||
|
||||
|
||||
/*********************************/
|
||||
/** Electronic record parameters */
|
||||
/*********************************/
|
||||
|
@@ -31,7 +31,6 @@ import org.alfresco.rest.core.RestModels;
|
||||
|
||||
/**
|
||||
* Handle collection of {@link TransferEntry}
|
||||
*
|
||||
* @author Silviu Dinuta
|
||||
* @since 2.6
|
||||
*/
|
||||
|
@@ -27,16 +27,17 @@
|
||||
|
||||
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 lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
import org.alfresco.rest.rm.community.model.transfercontainer.TransferContainer;
|
||||
|
||||
/**
|
||||
* POJO for transfer entry
|
||||
*
|
||||
|
@@ -27,23 +27,24 @@
|
||||
|
||||
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_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_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_ACCESSION_INDICATOR;
|
||||
|
||||
import org.alfresco.rest.rm.community.model.common.Owner;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
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.rm.community.model.common.Owner;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for Transfer properties
|
||||
*
|
||||
|
@@ -30,15 +30,16 @@ package org.alfresco.rest.rm.community.model.transfercontainer;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.model.RestByUserModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.model.RestByUserModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* 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_ROOT_NODE_REF;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for Transfer Container properties
|
||||
*
|
||||
|
@@ -28,17 +28,18 @@ package org.alfresco.rest.rm.community.model.unfiledcontainer;
|
||||
|
||||
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 lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
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
|
||||
*
|
||||
|
@@ -28,19 +28,20 @@ package org.alfresco.rest.rm.community.model.unfiledcontainer;
|
||||
|
||||
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.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
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
|
||||
*
|
||||
|
@@ -27,11 +27,12 @@
|
||||
package org.alfresco.rest.rm.community.model.unfiledcontainer;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 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.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.rm.community.model.common.Owner;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.rest.rm.community.model.common.Owner;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for record 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.JsonProperty;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* POJO for file plan properties
|
||||
*
|
||||
|
@@ -28,18 +28,19 @@ package org.alfresco.rest.rm.community.model.unfiledcontainer;
|
||||
|
||||
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 lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
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
|
||||
*
|
||||
|
@@ -34,7 +34,9 @@ package org.alfresco.rest.rm.community.model.user;
|
||||
*/
|
||||
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;
|
||||
|
||||
|
@@ -35,7 +35,12 @@ package org.alfresco.rest.rm.community.model.user;
|
||||
*/
|
||||
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 displayName;
|
||||
@@ -46,4 +51,5 @@ public enum UserRoles
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -29,12 +29,12 @@ package org.alfresco.rest.rm.community.requests;
|
||||
import static lombok.AccessLevel.PRIVATE;
|
||||
import static lombok.AccessLevel.PROTECTED;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import org.alfresco.rest.core.RMRestWrapper;
|
||||
import org.alfresco.rest.requests.ModelRequest;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 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.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.RMModelRequest;
|
||||
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.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.RecordFolderAPI;
|
||||
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.TransferContainerAPI;
|
||||
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.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
|
||||
* @since 2.6
|
||||
@@ -60,10 +61,8 @@ public class GSCoreAPI extends RMModelRequest
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestProperties
|
||||
* RM REST Properties
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
* @param rmRestProperties RM REST Properties
|
||||
*/
|
||||
public GSCoreAPI(RMRestWrapper rmRestWrapper, RMRestProperties rmRestProperties)
|
||||
{
|
||||
@@ -194,10 +193,7 @@ public class GSCoreAPI extends RMModelRequest
|
||||
return new ActionsExecutionAPI(getRmRestWrapper());
|
||||
}
|
||||
|
||||
public HoldsAPI usingHoldsAPI()
|
||||
{
|
||||
return new HoldsAPI(getRmRestWrapper());
|
||||
}
|
||||
public HoldsAPI usingHoldsAPI() { return new HoldsAPI(getRmRestWrapper()); }
|
||||
|
||||
public RetentionScheduleAPI usingRetentionScheduleAPI()
|
||||
{
|
||||
|
@@ -27,13 +27,13 @@
|
||||
package org.alfresco.rest.rm.community.requests.gscore.api;
|
||||
|
||||
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.rm.community.model.rules.ActionsOnRule;
|
||||
import org.alfresco.rest.rm.community.requests.RMModelRequest;
|
||||
import org.alfresco.utility.model.RepoTestModel;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/**
|
||||
* Produces processed results from Core Actions API calls
|
||||
@@ -44,8 +44,7 @@ import org.alfresco.utility.model.RepoTestModel;
|
||||
public class ActionsExecutionAPI extends RMModelRequest
|
||||
{
|
||||
/**
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param targetNode
|
||||
* the node on which the action is executed
|
||||
* @param destinationPath
|
||||
* the path to the record folder
|
||||
* @param targetNode the node on which the action is executed
|
||||
* @param destinationPath the path to the record folder
|
||||
* @throws Exception
|
||||
*/
|
||||
public JSONObject declareAndFile(RepoTestModel targetNode, String destinationPath) throws Exception
|
||||
@@ -71,8 +68,7 @@ public class ActionsExecutionAPI extends RMModelRequest
|
||||
/**
|
||||
* Declares a document as record using v1 actions api
|
||||
*
|
||||
* @param targetNode
|
||||
* the node on which the action is executed
|
||||
* @param targetNode the node on which the action is executed
|
||||
* @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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Declares and file a document version as record to a record folder using v1 actions api
|
||||
*
|
||||
* @param targetNode
|
||||
* the node on which the action is executed
|
||||
* @param destinationPath
|
||||
* the path to the record folder
|
||||
* @param targetNode the node on which the action is executed
|
||||
* @param destinationPath the path to the record folder
|
||||
* @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
|
||||
*
|
||||
* @param targetNode
|
||||
* the node on which the action is executed
|
||||
* @param targetNode the node on which the action is executed
|
||||
* @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
|
||||
*
|
||||
* @param targetNode
|
||||
* the node on which the action is executed
|
||||
* @param targetNode the node on which the action is executed
|
||||
* @throws Exception
|
||||
*/
|
||||
@SneakyThrows
|
||||
@@ -127,10 +120,8 @@ public class ActionsExecutionAPI extends RMModelRequest
|
||||
/**
|
||||
* WORM lock a node for a period of days
|
||||
*
|
||||
* @param targetNode
|
||||
* the node on which the action is executed
|
||||
* @param retentionPeriod
|
||||
* the retention period in days for the WORM lock
|
||||
* @param targetNode the node on which the action is executed
|
||||
* @param retentionPeriod the retention period in days for the WORM lock
|
||||
* @throws Exception
|
||||
*/
|
||||
@SneakyThrows
|
||||
|
@@ -26,16 +26,15 @@
|
||||
*/
|
||||
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.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;
|
||||
import static org.springframework.http.HttpMethod.PUT;
|
||||
|
||||
import org.alfresco.rest.core.RMRestWrapper;
|
||||
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
|
||||
@@ -57,8 +56,7 @@ public class FilePlanAPI extends RMModelRequest
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public FilePlanAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -78,13 +76,10 @@ public class FilePlanAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets a file plan.
|
||||
*
|
||||
* @param filePlanId
|
||||
* The identifier of a file plan
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param filePlanId The identifier of a file plan
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link FilePlan} for the given {@code filePlanId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code filePlanId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -100,7 +95,8 @@ public class FilePlanAPI extends RMModelRequest
|
||||
GET,
|
||||
"/file-plans/{filePlanId}?{parameters}",
|
||||
filePlanId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,13 +112,10 @@ public class FilePlanAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the children (root categories) of a file plan.
|
||||
*
|
||||
* @param filePlanId
|
||||
* The identifier of a file plan
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param filePlanId The identifier of a file plan
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link RecordCategoryCollection} for the given {@code filePlanId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code filePlanId}</li>
|
||||
@@ -137,7 +130,8 @@ public class FilePlanAPI extends RMModelRequest
|
||||
GET,
|
||||
"file-plans/{filePlanId}/categories?{parameters}",
|
||||
filePlanId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,15 +148,11 @@ public class FilePlanAPI extends RMModelRequest
|
||||
/**
|
||||
* Creates a root record category.
|
||||
*
|
||||
* @param recordCategoryModel
|
||||
* The record category model which holds the information
|
||||
* @param filePlanId
|
||||
* The identifier of a file plan
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordCategoryModel The record category model which holds the information
|
||||
* @param filePlanId The identifier of a file plan
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The created {@link RecordCategory}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code filePlanId} is not a valid format or {@code filePlanId} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -182,7 +172,8 @@ public class FilePlanAPI extends RMModelRequest
|
||||
toJson(recordCategoryModel),
|
||||
"file-plans/{filePlanId}/categories?{parameters}",
|
||||
filePlanId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -199,14 +190,10 @@ public class FilePlanAPI extends RMModelRequest
|
||||
/**
|
||||
* Updates a file plan.
|
||||
*
|
||||
* @param filePlanModel
|
||||
* The file plan model which holds the information
|
||||
* @param filePlanId
|
||||
* The identifier of the file plan
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param filePlanModel The file plan model which holds the information
|
||||
* @param filePlanId The identifier of the file plan
|
||||
* @param parameters The URL parameters to add
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>the update request is invalid or {@code filePlanId} is not a valid format or {@code filePlanModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -231,15 +218,11 @@ public class FilePlanAPI extends RMModelRequest
|
||||
/**
|
||||
* Creates a hold.
|
||||
*
|
||||
* @param holdModel
|
||||
* The hold model
|
||||
* @param filePlanId
|
||||
* The identifier of a file plan
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param holdModel The hold model
|
||||
* @param filePlanId The identifier of a file plan
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The created {@link Hold}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code filePlanId} is not a valid format or {@code filePlanId} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -258,7 +241,8 @@ public class FilePlanAPI extends RMModelRequest
|
||||
toJson(holdModel),
|
||||
"file-plans/{filePlanId}/holds",
|
||||
filePlanId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -272,13 +256,10 @@ public class FilePlanAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the holds of a file plan.
|
||||
*
|
||||
* @param filePlanId
|
||||
* The identifier of a file plan
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param filePlanId The identifier of a file plan
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link HoldCollection} for the given {@code filePlanId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code filePlanId}</li>
|
||||
@@ -293,7 +274,8 @@ public class FilePlanAPI extends RMModelRequest
|
||||
GET,
|
||||
"file-plans/{filePlanId}/holds?{parameters}",
|
||||
filePlanId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -26,10 +26,9 @@
|
||||
*/
|
||||
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.rm.community.util.ParameterCheck.mandatoryString;
|
||||
import static org.springframework.http.HttpMethod.POST;
|
||||
|
||||
import org.alfresco.rest.core.RMRestWrapper;
|
||||
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";
|
||||
|
||||
/**
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public FilesAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -57,11 +55,9 @@ public class FilesAPI extends RMModelRequest<FilesAPI>
|
||||
/**
|
||||
* Declare file as record
|
||||
*
|
||||
* @param fileId
|
||||
* The Id of a file to declare as record
|
||||
* @param fileId The Id of a file to declare as record
|
||||
* @return The {@link Record} for created record
|
||||
* @throws RuntimeException
|
||||
* for malformed JSON responses
|
||||
* @throws RuntimeException for malformed JSON responses
|
||||
*/
|
||||
public Record declareAsRecord(String fileId)
|
||||
{
|
||||
@@ -71,6 +67,8 @@ public class FilesAPI extends RMModelRequest<FilesAPI>
|
||||
POST,
|
||||
"/files/{fileId}/declare?{parameters}",
|
||||
fileId,
|
||||
getRmRestWrapper().getParameters()));
|
||||
getRmRestWrapper().getParameters()
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -26,17 +26,16 @@
|
||||
*/
|
||||
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.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.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.rm.community.model.hold.BulkBodyCancel;
|
||||
@@ -69,13 +68,10 @@ public class HoldsAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets a hold.
|
||||
*
|
||||
* @param holdId
|
||||
* The identifier of a hold
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param holdId The identifier of a hold
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link Hold} for the given {@code holdId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code holdId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -91,7 +87,8 @@ public class HoldsAPI extends RMModelRequest
|
||||
GET,
|
||||
"holds/{holdId}?{parameters}",
|
||||
holdId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,14 +104,10 @@ public class HoldsAPI extends RMModelRequest
|
||||
/**
|
||||
* Updates a hold.
|
||||
*
|
||||
* @param holdModel
|
||||
* The hold model which holds the information
|
||||
* @param holdId
|
||||
* The identifier of the hold
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param holdModel The hold model which holds the information
|
||||
* @param holdId The identifier of the hold
|
||||
* @param parameters The URL parameters to add
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>the update request is invalid or {@code holdId} is not a valid format or {@code holdModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -132,7 +125,8 @@ public class HoldsAPI extends RMModelRequest
|
||||
toJson(holdModel),
|
||||
"holds/{holdId}?{parameters}",
|
||||
holdId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,10 +143,8 @@ public class HoldsAPI extends RMModelRequest
|
||||
/**
|
||||
* Deletes a hold.
|
||||
*
|
||||
* @param holdId
|
||||
* The identifier of a hold
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param holdId The identifier of a hold
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code holdId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -167,18 +159,16 @@ public class HoldsAPI extends RMModelRequest
|
||||
getRmRestWrapper().processEmptyModel(simpleRequest(
|
||||
DELETE,
|
||||
"holds/{holdId}",
|
||||
holdId));
|
||||
holdId
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a hold and stores a reason for deletion in the audit log.
|
||||
*
|
||||
* @param reason
|
||||
* The reason for hold deletion
|
||||
* @param holdId
|
||||
* The identifier of a hold
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param reason The reason for hold deletion
|
||||
* @param holdId The identifier of a hold
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code holdId} is not a valid format or {@code reason} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -195,21 +185,18 @@ public class HoldsAPI extends RMModelRequest
|
||||
POST,
|
||||
toJson(reason),
|
||||
"holds/{holdId}/delete",
|
||||
holdId));
|
||||
holdId
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the relationship between a child and a parent hold.
|
||||
*
|
||||
* @param holdChild
|
||||
* The hold child model
|
||||
* @param holdId
|
||||
* The identifier of a hold
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param holdChild The hold child model
|
||||
* @param holdId The identifier of a hold
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The created {@link Hold}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code holdId} is not a valid format or {@code holdId} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -240,13 +227,10 @@ public class HoldsAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the children of a hold.
|
||||
*
|
||||
* @param holdId
|
||||
* The identifier of a hold
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param holdId The identifier of a hold
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link HoldChildCollection} for the given {@code holdId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code holdId}</li>
|
||||
@@ -261,7 +245,8 @@ public class HoldsAPI extends RMModelRequest
|
||||
GET,
|
||||
"holds/{holdId}/children",
|
||||
holdId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,14 +260,10 @@ public class HoldsAPI extends RMModelRequest
|
||||
/**
|
||||
* Deletes the relationship between a child and a parent hold.
|
||||
*
|
||||
* @param holdChildId
|
||||
* The identifier of hold child
|
||||
* @param holdId
|
||||
* The identifier of a hold
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param holdChildId The identifier of hold child
|
||||
* @param holdId The identifier of a hold
|
||||
* @param parameters The URL parameters to add
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code holdId} or {@code holdChildId} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -300,7 +281,8 @@ public class HoldsAPI extends RMModelRequest
|
||||
"holds/{holdId}/children/{holdChildId}",
|
||||
holdId,
|
||||
holdChildId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -314,15 +296,11 @@ public class HoldsAPI extends RMModelRequest
|
||||
/**
|
||||
* Starts a bulk process for a hold.
|
||||
*
|
||||
* @param holdBulkOperation
|
||||
* The bulk operation details
|
||||
* @param hold
|
||||
* The identifier of a hold
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param holdBulkOperation The bulk operation details
|
||||
* @param hold The identifier of a hold
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link HoldBulkOperationEntry} for the started bulk process
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code hold} or {@code holdBulkOperation} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -340,7 +318,8 @@ public class HoldsAPI extends RMModelRequest
|
||||
toJson(holdBulkOperation),
|
||||
"holds/{hold}/bulk",
|
||||
hold,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -354,15 +333,11 @@ public class HoldsAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the status of a bulk process for a hold.
|
||||
*
|
||||
* @param holdId
|
||||
* The identifier of a hold
|
||||
* @param holdBulkStatusId
|
||||
* The identifier of a bulk status operation
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param holdId The identifier of a hold
|
||||
* @param holdBulkStatusId 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}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code holdId} or {@code holdBulkStatusId} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -380,7 +355,8 @@ public class HoldsAPI extends RMModelRequest
|
||||
"holds/{holdId}/bulk-statuses/{holdBulkStatusId}",
|
||||
holdId,
|
||||
holdBulkStatusId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -394,13 +370,10 @@ public class HoldsAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the statuses of all bulk processes for a hold.
|
||||
*
|
||||
* @param holdId
|
||||
* The identifier of a hold
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param holdId The identifier of a hold
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link HoldBulkStatusCollection} for the given {@code holdId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code holdId} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -416,7 +389,8 @@ public class HoldsAPI extends RMModelRequest
|
||||
GET,
|
||||
"holds/{holdId}/bulk-statuses",
|
||||
holdId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -430,16 +404,11 @@ public class HoldsAPI extends RMModelRequest
|
||||
/**
|
||||
* Cancels a bulk operation for a hold.
|
||||
*
|
||||
* @param holdId
|
||||
* The identifier of a hold
|
||||
* @param bulkStatusId
|
||||
* The identifier of a bulk status operation
|
||||
* @param bulkBodyCancel
|
||||
* The bulk body cancel model
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param holdId The identifier of a hold
|
||||
* @param bulkStatusId The identifier of a bulk status operation
|
||||
* @param bulkBodyCancel The bulk body cancel model
|
||||
* @param parameters The URL parameters to add
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code holdId}, {@code bulkStatusId} or {@code bulkBodyCancel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -459,7 +428,8 @@ public class HoldsAPI extends RMModelRequest
|
||||
"holds/{holdId}/bulk-statuses/{bulkStatusId}/cancel",
|
||||
holdId,
|
||||
bulkStatusId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -26,17 +26,16 @@
|
||||
*/
|
||||
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.GET;
|
||||
import static org.springframework.http.HttpMethod.POST;
|
||||
import static org.springframework.http.HttpMethod.PUT;
|
||||
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.rm.community.model.site.RMSite;
|
||||
import org.alfresco.rest.rm.community.requests.RMModelRequest;
|
||||
@@ -52,8 +51,7 @@ public class RMSiteAPI extends RMModelRequest
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public RMSiteAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -64,8 +62,7 @@ public class RMSiteAPI extends RMModelRequest
|
||||
* Get the RM site
|
||||
*
|
||||
* @return The {@link RMSite} for the given file plan component id
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li>
|
||||
* <li>Api Response code 401 If authentication failed</li>
|
||||
@@ -77,20 +74,20 @@ public class RMSiteAPI extends RMModelRequest
|
||||
{
|
||||
return getRmRestWrapper().processModel(RMSite.class, simpleRequest(
|
||||
GET,
|
||||
"gs-sites/rm"));
|
||||
"gs-sites/rm"
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the RM site
|
||||
*
|
||||
* @param rmSiteModel
|
||||
* The properties of the rm site to be created
|
||||
* @param rmSiteModel The properties of the rm site to be created
|
||||
* @return The {@link RMSite} with the given properties
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>Api Response code 400 Invalid parameter: title, or description exceed the maximum length; or siteBodyCreate invalid</li>
|
||||
* <li>Api Response code 401 If authentication failed</<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>
|
||||
* </ul>
|
||||
*/
|
||||
@@ -101,17 +98,17 @@ public class RMSiteAPI extends RMModelRequest
|
||||
return getRmRestWrapper().processModel(RMSite.class, requestWithBody(
|
||||
POST,
|
||||
toJson(rmSiteModel),
|
||||
"gs-sites"));
|
||||
"gs-sites"
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete RM site
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>Api Response code 400 Invalid parameter: DELETE request is supported only for the RM site</li>
|
||||
* <li>Api Response code 401 If authentication failed</<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 default Unexpected error</li>
|
||||
* </ul>
|
||||
@@ -120,17 +117,16 @@ public class RMSiteAPI extends RMModelRequest
|
||||
{
|
||||
getRmRestWrapper().processEmptyModel(simpleRequest(
|
||||
DELETE,
|
||||
"gs-sites/rm"));
|
||||
"gs-sites/rm"
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update RM site
|
||||
*
|
||||
* @param rmSiteModel
|
||||
* The properties to be updated
|
||||
* @param rmSiteModel The properties to be updated
|
||||
* @return The updated {@link RMSite}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>Api Response code 400 the update request is invalid {@code rmSiteModel} is invalid</li>
|
||||
* <li>Api Response code 401 If authentication fails</li>
|
||||
@@ -146,15 +142,15 @@ public class RMSiteAPI extends RMModelRequest
|
||||
return getRmRestWrapper().processModel(RMSite.class, requestWithBody(
|
||||
PUT,
|
||||
toJson(rmSiteModel),
|
||||
"gs-sites/rm"));
|
||||
"gs-sites/rm"
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the RM site exists or not
|
||||
*
|
||||
* @return <code>true</code> if the RM site exists, <code>false</code> otherwise
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>Api Response code 400 Invalid parameter: GET request is supported only for the RM site</li>
|
||||
* <li>Api Response code 401 If authentication failed</li>
|
||||
|
@@ -26,16 +26,17 @@
|
||||
*/
|
||||
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.springframework.http.HttpStatus.OK;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import io.restassured.builder.RequestSpecBuilder;
|
||||
import io.restassured.http.ContentType;
|
||||
import io.restassured.response.Response;
|
||||
import io.restassured.specification.RequestSpecification;
|
||||
import static io.restassured.RestAssured.basic;
|
||||
import static io.restassured.RestAssured.given;
|
||||
|
||||
import org.alfresco.dataprep.AlfrescoHttpClient;
|
||||
import org.alfresco.dataprep.AlfrescoHttpClientFactory;
|
||||
@@ -58,8 +59,7 @@ import org.alfresco.utility.model.UserModel;
|
||||
public class RMUserAPI extends RMModelRequest
|
||||
{
|
||||
/**
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public RMUserAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -68,7 +68,6 @@ public class RMUserAPI extends RMModelRequest
|
||||
|
||||
/**
|
||||
* Helper method to obtain {@link AlfrescoHttpClient}
|
||||
*
|
||||
* @return Initialized {@link AlfrescoHttpClient} instance
|
||||
*/
|
||||
private AlfrescoHttpClient getAlfrescoHttpClient()
|
||||
@@ -86,12 +85,9 @@ public class RMUserAPI extends RMModelRequest
|
||||
/**
|
||||
* Assign RM role to user
|
||||
*
|
||||
* @param userName
|
||||
* User's username
|
||||
* @param userRole
|
||||
* User's RM role, one of {@link UserRoles} roles
|
||||
* @throws RuntimeException
|
||||
* for failed requests
|
||||
* @param userName User's username
|
||||
* @param userRole User's RM role, one of {@link UserRoles} roles
|
||||
* @throws RuntimeException for failed requests
|
||||
*/
|
||||
public void assignRoleToUser(String userName, String userRole)
|
||||
{
|
||||
@@ -122,13 +118,9 @@ public class RMUserAPI extends RMModelRequest
|
||||
|
||||
/**
|
||||
* 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 user
|
||||
* {@link UserModel} for a user to be granted permission
|
||||
* @param permission
|
||||
* {@link UserPermissions} to be granted
|
||||
* @param filePlanComponentId The id of the file plan component on which permission should be given
|
||||
* @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)
|
||||
{
|
||||
@@ -169,10 +161,9 @@ public class RMUserAPI extends RMModelRequest
|
||||
/**
|
||||
* Helper method to set permission inheritance on a file plan component
|
||||
*
|
||||
* @param filePlanComponentId
|
||||
* The id of the file plan component on which inherited permission should be set
|
||||
* @param isInherited
|
||||
* true if the permission is inherited false if the permission inheritance is disabled
|
||||
* @param filePlanComponentId The id of the file plan component on which inherited permission should be set
|
||||
* @param isInherited true if the permission is inherited
|
||||
* false if the permission inheritance is disabled
|
||||
*/
|
||||
public void setUserPermissionInheritance(String filePlanComponentId, Boolean isInherited)
|
||||
{
|
||||
@@ -208,15 +199,13 @@ public class RMUserAPI extends RMModelRequest
|
||||
getRmRestWrapper().setStatusCode(Integer.toString(response.getStatusCode()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a user with the given name using the old APIs
|
||||
*
|
||||
* @param userName
|
||||
* The user name
|
||||
* @param userPassword
|
||||
* The user's password
|
||||
* @param userEmail
|
||||
* The user's e-mail address
|
||||
* @param userName The user name
|
||||
* @param userPassword 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.
|
||||
*/
|
||||
public boolean createUser(String userName, String userPassword, String userEmail)
|
||||
|
@@ -26,17 +26,16 @@
|
||||
*/
|
||||
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.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.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.rm.community.model.recordcategory.RecordCategory;
|
||||
@@ -55,8 +54,7 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public RecordCategoryAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -66,10 +64,8 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
/**
|
||||
* Deletes a record category.
|
||||
*
|
||||
* @param recordCategoryId
|
||||
* The identifier of a record category
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param recordCategoryId The identifier of a record category
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordCategoryId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -85,7 +81,8 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
getRmRestWrapper().processEmptyModel(simpleRequest(
|
||||
DELETE,
|
||||
"record-categories/{recordCategoryId}",
|
||||
recordCategoryId));
|
||||
recordCategoryId
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,13 +98,10 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets a record category.
|
||||
*
|
||||
* @param recordCategoryId
|
||||
* The identifier of a record category
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordCategoryId The identifier of a record category
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link RecordCategory} for the given {@code recordCategoryId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordCategoryId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -123,7 +117,8 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
GET,
|
||||
"record-categories/{recordCategoryId}?{parameters}",
|
||||
recordCategoryId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -140,16 +135,11 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
/**
|
||||
* Updates a record category.
|
||||
*
|
||||
* @param recordCategoryModel
|
||||
* The record category model which holds the information
|
||||
* @param recordCategoryId
|
||||
* The identifier of a record category
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param returns
|
||||
* The updated {@link RecordCategory}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param recordCategoryModel The record category model which holds the information
|
||||
* @param recordCategoryId The identifier of a record category
|
||||
* @param parameters The URL parameters to add
|
||||
* @param returns The updated {@link RecordCategory}
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>the update request is invalid or {@code recordCategoryId} is not a valid format or {@code recordCategoryModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -169,7 +159,8 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
toJson(recordCategoryModel),
|
||||
"record-categories/{recordCategoryId}?{parameters}",
|
||||
recordCategoryId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -185,13 +176,10 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the children of a record category.
|
||||
*
|
||||
* @param recordCategoryId
|
||||
* The identifier of a record category
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordCategoryId The identifier of a record category
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link RecordCategoryChildCollection} for the given {@code recordCategoryId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code recordCategoryId}</li>
|
||||
@@ -206,7 +194,8 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
GET,
|
||||
"record-categories/{recordCategoryId}/children?{parameters}",
|
||||
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.
|
||||
*
|
||||
* @param recordCategoryChildModel
|
||||
* The record category child model which holds the information
|
||||
* @param recordCategoryId
|
||||
* The identifier of a record category
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordCategoryChildModel The record category child model which holds the information
|
||||
* @param recordCategoryId The identifier of a record category
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The created {@link RecordCategoryChild}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordCategoryId} is not a valid format or {@code recordCategoryChildModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -251,6 +236,7 @@ public class RecordCategoryAPI extends RMModelRequest
|
||||
toJson(recordCategoryChildModel),
|
||||
"record-categories/{recordCategoryId}/children?{parameters}",
|
||||
recordCategoryId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@@ -26,19 +26,18 @@
|
||||
*/
|
||||
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.simpleRequest;
|
||||
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.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.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.IOException;
|
||||
@@ -67,8 +66,7 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public RecordFolderAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -78,10 +76,8 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Deletes a record folder.
|
||||
*
|
||||
* @param recordFolderId
|
||||
* The identifier of a record folder
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param recordFolderId The identifier of a record folder
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordFolderId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -97,7 +93,8 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
getRmRestWrapper().processEmptyModel(simpleRequest(
|
||||
DELETE,
|
||||
"record-folders/{recordFolderId}",
|
||||
recordFolderId));
|
||||
recordFolderId
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,13 +110,10 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets a record folder.
|
||||
*
|
||||
* @param recordFolderId
|
||||
* The identifier of a record folder
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordFolderId The identifier of a record folder
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link RecordFolder} for the given {@code recordFolderId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordFolderId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -135,7 +129,8 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
GET,
|
||||
"record-folders/{recordFolderId}?{parameters}",
|
||||
recordFolderId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -152,16 +147,11 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Updates a record folder.
|
||||
*
|
||||
* @param recordFolderModel
|
||||
* The record folder model which holds the information
|
||||
* @param recordFolderId
|
||||
* The identifier of a record folder
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param returns
|
||||
* The updated {@link RecordFolder}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param recordFolderModel The record folder model which holds the information
|
||||
* @param recordFolderId The identifier of a record folder
|
||||
* @param parameters The URL parameters to add
|
||||
* @param returns The updated {@link RecordFolder}
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>the update request is invalid or {@code recordFolderId} is not a valid format or {@code recordFolderModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -181,7 +171,8 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
toJson(recordFolderModel),
|
||||
"record-folders/{recordFolderId}?{parameters}",
|
||||
recordFolderId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -197,13 +188,10 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the children of a record folder.
|
||||
*
|
||||
* @param recordFolderId
|
||||
* The identifier of a record folder
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordFolderId The identifier of a record folder
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link RecordFolderCollection} for the given {@code recordFolderId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code recordFolderId}</li>
|
||||
@@ -218,7 +206,8 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
GET,
|
||||
"record-folders/{recordFolderId}/records?{parameters}",
|
||||
recordFolderId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -235,15 +224,11 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Create a record from file resource
|
||||
*
|
||||
* @param recordModel
|
||||
* {@link Record} for electronic record to be created
|
||||
* @param recordContent
|
||||
* {@link File} pointing to the content of the electronic record to be created
|
||||
* @param recordFolderId
|
||||
* The identifier of a record folder
|
||||
* @param recordModel {@link Record} for electronic record to be created
|
||||
* @param recordContent {@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}
|
||||
* @throws RuntimeException
|
||||
* for invalid recordModel JSON strings
|
||||
* @throws RuntimeException for invalid recordModel JSON strings
|
||||
*/
|
||||
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");
|
||||
}
|
||||
|
||||
/* 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();
|
||||
JsonNode root;
|
||||
try
|
||||
@@ -283,15 +271,11 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Creates a record in a record folder child, i.e. a record.
|
||||
*
|
||||
* @param recordModel
|
||||
* The record model which holds the information
|
||||
* @param recordFolderId
|
||||
* The identifier of a record folder
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordModel The record model which holds the information
|
||||
* @param recordFolderId The identifier of a record folder
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The created {@link Record}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordFolderId is not a valid format or {@code recordModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -310,6 +294,7 @@ public class RecordFolderAPI extends RMModelRequest
|
||||
toJson(recordModel),
|
||||
"record-folders/{recordFolderId}/records?{parameters}",
|
||||
recordFolderId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@@ -26,25 +26,25 @@
|
||||
*/
|
||||
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.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.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.rm.community.model.record.Record;
|
||||
import org.alfresco.rest.rm.community.model.record.RecordBodyFile;
|
||||
import org.alfresco.rest.rm.community.requests.RMModelRequest;
|
||||
|
||||
import io.restassured.response.ResponseBody;
|
||||
|
||||
/**
|
||||
* Records REST API Wrapper
|
||||
*
|
||||
@@ -54,8 +54,7 @@ import org.alfresco.rest.rm.community.requests.RMModelRequest;
|
||||
public class RecordsAPI extends RMModelRequest
|
||||
{
|
||||
/**
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public RecordsAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -65,11 +64,9 @@ public class RecordsAPI extends RMModelRequest
|
||||
/**
|
||||
* Get the content for the electronic record
|
||||
*
|
||||
* @param recordId
|
||||
* The id of the electronic record
|
||||
* @param recordId The id of the electronic record
|
||||
* @return {@link ResponseBody} representing content for the given record id
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordId} has no content</li>
|
||||
* <li> {@code recordId} is not a valid format, or is not a record</li>
|
||||
@@ -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
|
||||
*
|
||||
* @param recordBodyFile
|
||||
* The properties where to file the record
|
||||
* @param recordId
|
||||
* The id of the record to file
|
||||
* @param recordBodyFile The properties where to file the record
|
||||
* @param recordId The id of the record to file
|
||||
* @return The {@link Record} with the given properties
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -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
|
||||
*
|
||||
* @param recordBodyFile
|
||||
* The properties where to file the record
|
||||
* @param recordId
|
||||
* The id of the record to file
|
||||
* @param recordBodyFile The properties where to file the record
|
||||
* @param recordId The id of the record to file
|
||||
* @return The {@link Record} with the given properties
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>Invalid parameter: {@code recordBodyFile} is not a valid format,{@code recordId} is not a record</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -145,7 +136,8 @@ public class RecordsAPI extends RMModelRequest
|
||||
toJson(recordBodyFile),
|
||||
"/records/{recordId}/file?{parameters}",
|
||||
recordId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,11 +153,9 @@ public class RecordsAPI extends RMModelRequest
|
||||
/**
|
||||
* Complete the record recordId
|
||||
*
|
||||
* @param recordId
|
||||
* The id of the record to complete
|
||||
* @param recordId The id of the record to complete
|
||||
* @return The completed {@link Record} with the given properties
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>Invalid parameter: {@code recordId} is not a record</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -183,16 +173,14 @@ public class RecordsAPI extends RMModelRequest
|
||||
POST,
|
||||
"/records/{recordId}/complete?{parameters}",
|
||||
recordId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a record.
|
||||
*
|
||||
* @param recordId
|
||||
* The identifier of a record
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param recordId The identifier of a record
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -208,7 +196,8 @@ public class RecordsAPI extends RMModelRequest
|
||||
getRmRestWrapper().processEmptyModel(simpleRequest(
|
||||
DELETE,
|
||||
"records/{recordId}",
|
||||
recordId));
|
||||
recordId
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -224,13 +213,10 @@ public class RecordsAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets a record.
|
||||
*
|
||||
* @param recordId
|
||||
* The identifier of a record
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordId The identifier of a record
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link Record} for the given {@code recordId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -246,7 +232,8 @@ public class RecordsAPI extends RMModelRequest
|
||||
GET,
|
||||
"records/{recordId}?{parameters}",
|
||||
recordId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -263,15 +250,11 @@ public class RecordsAPI extends RMModelRequest
|
||||
/**
|
||||
* Updates a record.
|
||||
*
|
||||
* @param recordModel
|
||||
* The record model which holds the information
|
||||
* @param recordId
|
||||
* The identifier of a record
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordModel The record model which holds the information
|
||||
* @param recordId The identifier of a record
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The updated {@link Record}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>the update request is invalid or {@code recordId} is not a valid format or {@code recordModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -291,6 +274,7 @@ public class RecordsAPI extends RMModelRequest
|
||||
toJson(recordModel),
|
||||
"records/{recordId}?{parameters}",
|
||||
recordId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@@ -26,16 +26,6 @@
|
||||
*/
|
||||
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.rm.community.model.retentionschedule.RetentionSchedule;
|
||||
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.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
|
||||
{
|
||||
|
||||
@@ -54,18 +53,15 @@ public class RetentionScheduleAPI extends RMModelRequest
|
||||
super(rmRestWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a retention schedule.
|
||||
*
|
||||
* @param retentionScheduleModel
|
||||
* The retentionSchedule model
|
||||
* @param recordCategoryId
|
||||
* The identifier of a record category
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param retentionScheduleModel The retentionSchedule model
|
||||
* @param recordCategoryId The identifier of a record category
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The created {@link RetentionSchedule}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code recordCategoryId} is not a valid format or {@code recordCategoryId} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -84,7 +80,8 @@ public class RetentionScheduleAPI extends RMModelRequest
|
||||
toJson(retentionScheduleModel),
|
||||
"record-categories/{recordCategoryId}/retention-schedules",
|
||||
recordCategoryId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,13 +95,10 @@ public class RetentionScheduleAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the retentionSchedule of a record category.
|
||||
*
|
||||
* @param recordCategoryId
|
||||
* The identifier of a record category
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param recordCategoryId The identifier of a record category
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link RetentionSchedule} for the given {@code recordCategoryId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code recordCategoryId}</li>
|
||||
@@ -119,7 +113,8 @@ public class RetentionScheduleAPI extends RMModelRequest
|
||||
GET,
|
||||
"record-categories/{recordCategoryId}/retention-schedules?{parameters}",
|
||||
recordCategoryId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,15 +128,11 @@ public class RetentionScheduleAPI extends RMModelRequest
|
||||
/**
|
||||
* Creates a step in the retention schedule.
|
||||
*
|
||||
* @param retentionScheduleActionDefinition
|
||||
* The retentionScheduleActionDefinition model
|
||||
* @param retentionScheduleId
|
||||
* The identifier of a retention schedule id
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param retentionScheduleActionDefinition The retentionScheduleActionDefinition model
|
||||
* @param retentionScheduleId The identifier of a retention schedule id
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The created {@link RetentionScheduleActionDefinition}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code retentionScheduleId} is not a valid format or {@code retentionScheduleId} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -160,7 +151,8 @@ public class RetentionScheduleAPI extends RMModelRequest
|
||||
toJson(retentionScheduleActionDefinition),
|
||||
"retention-schedules/{retentionScheduleId}/retention-steps",
|
||||
retentionScheduleId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,13 +166,10 @@ public class RetentionScheduleAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the retentionSchedule of a record category.
|
||||
*
|
||||
* @param retentionScheduleId
|
||||
* The identifier of a record category
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param retentionScheduleId The identifier of a record category
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link RetentionScheduleActionDefinition} for the given {@code recordCategoryId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code recordCategoryId}</li>
|
||||
@@ -195,7 +184,8 @@ public class RetentionScheduleAPI extends RMModelRequest
|
||||
GET,
|
||||
"retention-schedules/{retentionScheduleId}/retention-steps?{parameters}",
|
||||
retentionScheduleId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -27,11 +27,10 @@
|
||||
|
||||
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.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.rm.community.model.transfer.Transfer;
|
||||
@@ -47,8 +46,7 @@ import org.alfresco.rest.rm.community.requests.RMModelRequest;
|
||||
public class TransferAPI extends RMModelRequest
|
||||
{
|
||||
/**
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public TransferAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -68,13 +66,10 @@ public class TransferAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets a transfer.
|
||||
*
|
||||
* @param transferId
|
||||
* The identifier of a transfer
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param transferId The identifier of a transfer
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link Transfer} for the given {@code transferId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code transferId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -90,9 +85,9 @@ public class TransferAPI extends RMModelRequest
|
||||
GET,
|
||||
"/transfers/{transferId}?{parameters}",
|
||||
transferId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* see {@link #getTransfersChildren(String, String)}
|
||||
*/
|
||||
@@ -106,13 +101,10 @@ public class TransferAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the children (record folder or record) of a transfer.
|
||||
*
|
||||
* @param transferId
|
||||
* The identifier of a transfer
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param transferId The identifier of a transfer
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link TransferChildCollection} for the given {@code transferId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code transferId}</li>
|
||||
@@ -127,6 +119,7 @@ public class TransferAPI extends RMModelRequest
|
||||
GET,
|
||||
"transfers/{filePlanId}/children?{parameters}",
|
||||
transferId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@@ -27,15 +27,14 @@
|
||||
|
||||
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.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.PUT;
|
||||
|
||||
import org.alfresco.rest.core.RMRestWrapper;
|
||||
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
|
||||
{
|
||||
/**
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public TransferContainerAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -72,13 +70,10 @@ public class TransferContainerAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets a transfer container.
|
||||
*
|
||||
* @param transferContainerId
|
||||
* The identifier of a transfer container
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param transferContainerId The identifier of a transfer container
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link TransferContainer} for the given {@code transferContainerId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code transferContainerId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -94,7 +89,8 @@ public class TransferContainerAPI extends RMModelRequest
|
||||
GET,
|
||||
"/transfer-containers/{transferContainerId}?{parameters}",
|
||||
transferContainerId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,16 +107,11 @@ public class TransferContainerAPI extends RMModelRequest
|
||||
/**
|
||||
* Updates a transfer container.
|
||||
*
|
||||
* @param transferContainerModel
|
||||
* The transfer container model which holds the information
|
||||
* @param transferContainerId
|
||||
* The identifier of a transfer container
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param returns
|
||||
* The updated {@link TransferContainer}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param transferContainerModel The transfer container model which holds the information
|
||||
* @param transferContainerId The identifier of a transfer container
|
||||
* @param parameters The URL parameters to add
|
||||
* @param returns The updated {@link TransferContainer}
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>the update request is invalid or {@code transferContainerId} is not a valid format or {@code transferContainerModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -140,7 +131,8 @@ public class TransferContainerAPI extends RMModelRequest
|
||||
toJson(transferContainerModel),
|
||||
"transfer-containers/{transferContainerId}?{parameters}",
|
||||
transferContainerId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,13 +148,10 @@ public class TransferContainerAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the children (transfers) of a transfer container.
|
||||
*
|
||||
* @param transferContainerId
|
||||
* The identifier of a transfer container
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param transferContainerId The identifier of a transfer container
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link TransferCollection} for the given {@code transferContainerId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code transferContainerId}</li>
|
||||
@@ -177,6 +166,7 @@ public class TransferContainerAPI extends RMModelRequest
|
||||
GET,
|
||||
"transfer-containers/{filePlanId}/transfers?{parameters}",
|
||||
transferContainerId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@@ -26,18 +26,17 @@
|
||||
*/
|
||||
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.simpleRequest;
|
||||
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.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;
|
||||
import static org.springframework.http.HttpMethod.PUT;
|
||||
import static org.testng.Assert.fail;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -45,6 +44,7 @@ import java.util.Iterator;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import io.restassured.builder.RequestSpecBuilder;
|
||||
import io.restassured.http.ContentType;
|
||||
|
||||
@@ -65,8 +65,7 @@ import org.alfresco.rest.rm.community.util.UnfiledContainerChildMixin;
|
||||
public class UnfiledContainerAPI extends RMModelRequest
|
||||
{
|
||||
/**
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public UnfiledContainerAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -86,13 +85,10 @@ public class UnfiledContainerAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets an unfiled record container.
|
||||
*
|
||||
* @param unfiledContainerId
|
||||
* The identifier of a unfiled record container
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param unfiledContainerId The identifier of a unfiled record container
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link UnfiledContainer} for the given {@code unfiledContainerId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code unfiledContainerId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -108,7 +104,8 @@ public class UnfiledContainerAPI extends RMModelRequest
|
||||
GET,
|
||||
"unfiled-containers/{unfiledContainerId}?{parameters}",
|
||||
unfiledContainerId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,13 +121,10 @@ public class UnfiledContainerAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the children of an unfiled records container
|
||||
*
|
||||
* @param unfiledContainerId
|
||||
* The identifier of an unfiled records container
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param unfiledContainerId The identifier of an unfiled records container
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link UnfiledContainerChildCollection} for the given {@code unfiledContainerId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code unfiledContainerId}</li>
|
||||
@@ -145,7 +139,8 @@ public class UnfiledContainerAPI extends RMModelRequest
|
||||
GET,
|
||||
"unfiled-containers/{unfiledContainerId}/children?{parameters}",
|
||||
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.
|
||||
*
|
||||
* @param unfiledContainerChildModel
|
||||
* The unfiled container child model which holds the information
|
||||
* @param unfiledContainerId
|
||||
* The identifier of an unfiled container
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param unfiledContainerChildModel The unfiled container child model which holds the information
|
||||
* @param unfiledContainerId The identifier of an unfiled container
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The created {@link UnfiledContainerChild}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code unfiledContainerId} is not a valid format or {@code unfiledContainerChildModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -190,21 +181,18 @@ public class UnfiledContainerAPI extends RMModelRequest
|
||||
toJson(unfiledContainerChildModel),
|
||||
"unfiled-containers/{unfiledContainerId}/children?{parameters}",
|
||||
unfiledContainerId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a record from file resource
|
||||
*
|
||||
* @param unfiledContainerChildModel
|
||||
* {@link UnfiledContainerChild} for electronic record to be created
|
||||
* @param unfiledContainerChildContent
|
||||
* {@link File} pointing to the content of the electronic record to be created
|
||||
* @param unfiledContainerId
|
||||
* The identifier of a unfiled container
|
||||
* @param unfiledContainerChildModel {@link UnfiledContainerChild} for electronic record to be created
|
||||
* @param unfiledContainerChildContent {@link File} pointing to the content of the electronic record to be created
|
||||
* @param unfiledContainerId The identifier of a unfiled container
|
||||
* @return newly created {@link UnfiledContainerChild}
|
||||
* @throws RuntimeException
|
||||
* for invalid recordModel JSON strings
|
||||
* @throws RuntimeException for invalid recordModel JSON strings
|
||||
*/
|
||||
public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledContainerChildModel, String unfiledContainerId, File unfiledContainerChildContent)
|
||||
{
|
||||
@@ -217,7 +205,10 @@ public class UnfiledContainerAPI extends RMModelRequest
|
||||
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();
|
||||
JsonNode root;
|
||||
try
|
||||
@@ -255,16 +246,11 @@ public class UnfiledContainerAPI extends RMModelRequest
|
||||
/**
|
||||
* Updates an unfiled record container
|
||||
*
|
||||
* @param unfiledContainerModel
|
||||
* The unfiled record container model which holds the information
|
||||
* @param unfiledContainerId
|
||||
* The identifier of an unfiled record container
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param returns
|
||||
* The updated {@link UnfiledContainer}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param unfiledContainerModel The unfiled record container model which holds the information
|
||||
* @param unfiledContainerId The identifier of an unfiled record container
|
||||
* @param parameters The URL parameters to add
|
||||
* @param returns The updated {@link UnfiledContainer}
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>the update request is invalid or {@code unfiledContainerId} is not a valid format or {@code unfiledContainerModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -284,7 +270,8 @@ public class UnfiledContainerAPI extends RMModelRequest
|
||||
toJson(unfiledContainerModel),
|
||||
"unfiled-containers/{unfiledContainerId}?{parameters}",
|
||||
unfiledContainerId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -26,19 +26,18 @@
|
||||
*/
|
||||
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.simpleRequest;
|
||||
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.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.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.IOException;
|
||||
@@ -65,8 +64,7 @@ import org.alfresco.rest.rm.community.util.UnfiledContainerChildMixin;
|
||||
public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
{
|
||||
/**
|
||||
* @param rmRestWrapper
|
||||
* RM REST Wrapper
|
||||
* @param rmRestWrapper RM REST Wrapper
|
||||
*/
|
||||
public UnfiledRecordFolderAPI(RMRestWrapper rmRestWrapper)
|
||||
{
|
||||
@@ -86,13 +84,10 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets an unfiled record folder.
|
||||
*
|
||||
* @param unfiledRecordFolderId
|
||||
* The identifier of a unfiled record folder
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param unfiledRecordFolderId The identifier of a unfiled record folder
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link UnfiledRecordFolder} for the given {@code unfiledRecordFolderId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code unfiledRecordFolderId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -108,7 +103,8 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
GET,
|
||||
"unfiled-record-folders/{unfiledRecordFolderId}?{parameters}",
|
||||
unfiledRecordFolderId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,13 +120,10 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Gets the children of an unfiled record folder
|
||||
*
|
||||
* @param unfiledRecordFolderId
|
||||
* The identifier of an unfiled records folder
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param unfiledRecordFolderId The identifier of an unfiled records folder
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The {@link UnfiledRecordFolderChildCollection} for the given {@code unfiledRecordFolderId}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>authentication fails</li>
|
||||
* <li>current user does not have permission to read {@code unfiledRecordFolderId}</li>
|
||||
@@ -145,7 +138,8 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
GET,
|
||||
"unfiled-record-folders/{unfiledRecordFolderId}/children?{parameters}",
|
||||
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.
|
||||
*
|
||||
* @param unfiledRecordFolderChildModel
|
||||
* The unfiled folder child model which holds the information
|
||||
* @param unfiledRecordFolderId
|
||||
* The identifier of an unfiled folder
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param unfiledRecordFolderChildModel The unfiled folder child model which holds the information
|
||||
* @param unfiledRecordFolderId The identifier of an unfiled folder
|
||||
* @param parameters The URL parameters to add
|
||||
* @return The created {@link UnfiledRecordFolderChild}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderChildModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -190,21 +180,18 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
toJson(unfiledRecordFolderChildModel),
|
||||
"unfiled-record-folders/{unfiledRecordFolderId}/children?{parameters}",
|
||||
unfiledRecordFolderId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a record from file resource
|
||||
*
|
||||
* @param unfiledRecordFolderChildModel
|
||||
* {@link UnfiledContainerChild} for electronic record to be created
|
||||
* @param unfiledRecordFolderChildContent
|
||||
* {@link File} pointing to the content of the electronic record to be created
|
||||
* @param unfiledRecordFolderId
|
||||
* The identifier of a unfiled record folder
|
||||
* @param unfiledRecordFolderChildModel {@link UnfiledContainerChild} for electronic record to be created
|
||||
* @param unfiledRecordFolderChildContent {@link File} pointing to the content of the electronic record to be created
|
||||
* @param unfiledRecordFolderId The identifier of a unfiled record folder
|
||||
* @return newly created {@link UnfiledContainerChild}
|
||||
* @throws RuntimeException
|
||||
* for invalid recordModel JSON strings
|
||||
* @throws RuntimeException for invalid recordModel JSON strings
|
||||
*/
|
||||
public UnfiledContainerChild uploadRecord(UnfiledContainerChild unfiledRecordFolderChildModel, String unfiledRecordFolderId, File unfiledRecordFolderChildContent)
|
||||
{
|
||||
@@ -217,7 +204,10 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
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();
|
||||
JsonNode root;
|
||||
try
|
||||
@@ -255,16 +245,11 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
/**
|
||||
* Updates an unfiled record folder
|
||||
*
|
||||
* @param unfiledRecordFolderModel
|
||||
* The unfiled record folder model which holds the information
|
||||
* @param unfiledRecordFolderId
|
||||
* The identifier of an unfiled record folder
|
||||
* @param parameters
|
||||
* The URL parameters to add
|
||||
* @param returns
|
||||
* The updated {@link UnfiledRecordFolder}
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param unfiledRecordFolderModel The unfiled record folder model which holds the information
|
||||
* @param unfiledRecordFolderId The identifier of an unfiled record folder
|
||||
* @param parameters The URL parameters to add
|
||||
* @param returns The updated {@link UnfiledRecordFolder}
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>the update request is invalid or {@code unfiledRecordFolderId} is not a valid format or {@code unfiledRecordFolderModel} is invalid</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -284,16 +269,15 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
toJson(unfiledRecordFolderModel),
|
||||
"unfiled-record-folders/{unfiledRecordFolderId}?{parameters}",
|
||||
unfiledRecordFolderId,
|
||||
parameters));
|
||||
parameters
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an unfiled record folder.
|
||||
*
|
||||
* @param unfiledRecordFolderId
|
||||
* The identifier of a unfiled record folder
|
||||
* @throws RuntimeException
|
||||
* for the following cases:
|
||||
* @param unfiledRecordFolderId The identifier of a unfiled record folder
|
||||
* @throws RuntimeException for the following cases:
|
||||
* <ul>
|
||||
* <li>{@code unfiledRecordFolderId} is not a valid format</li>
|
||||
* <li>authentication fails</li>
|
||||
@@ -309,7 +293,8 @@ public class UnfiledRecordFolderAPI extends RMModelRequest
|
||||
getRmRestWrapper().processEmptyModel(simpleRequest(
|
||||
DELETE,
|
||||
"unfiled-record-folders/{recordFolderId}",
|
||||
unfiledRecordFolderId));
|
||||
unfiledRecordFolderId
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -44,10 +44,12 @@ public class CommonTestUtils
|
||||
|
||||
/** Private constructor to prevent instantiation. */
|
||||
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)
|
||||
{
|
||||
|
@@ -41,8 +41,10 @@ import com.github.dockerjava.api.model.Frame;
|
||||
import com.github.dockerjava.core.DockerClientBuilder;
|
||||
import com.github.dockerjava.core.command.LogContainerResultCallback;
|
||||
import com.github.dockerjava.netty.NettyDockerCmdExecFactory;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.apache.commons.lang.SystemUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -50,8 +52,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.alfresco.utility.Utility;
|
||||
|
||||
/**
|
||||
* Helper class for interaction with docker containers
|
||||
*
|
||||
@@ -89,10 +89,8 @@ public class DockerHelper
|
||||
/**
|
||||
* Method for returning logs of docker container
|
||||
*
|
||||
* @param containerId
|
||||
* - ID of the container
|
||||
* @param timeStamp
|
||||
* - get the logs since a specific timestamp
|
||||
* @param containerId - ID of the container
|
||||
* @param timeStamp - get the logs since a specific timestamp
|
||||
* @return list of strings, where every string is log line
|
||||
*/
|
||||
private List<String> getDockerLogs(String containerId, int timeStamp)
|
||||
@@ -107,7 +105,8 @@ public class DockerHelper
|
||||
|
||||
try
|
||||
{
|
||||
logContainerCmd.exec(new LogContainerResultCallback() {
|
||||
logContainerCmd.exec(new LogContainerResultCallback()
|
||||
{
|
||||
@Override
|
||||
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
|
||||
*
|
||||
* @param expectedException
|
||||
* the expected exception to be thrown
|
||||
* @param expectedException the expected exception to be thrown
|
||||
* @throws Exception
|
||||
*/
|
||||
public void checkExceptionIsInAlfrescoLogs(String expectedException) throws 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();
|
||||
assertTrue(alfrescoLogs.stream().anyMatch(logLine -> logLine.contains(expectedException)));
|
||||
});
|
||||
@@ -165,8 +164,7 @@ public class DockerHelper
|
||||
/**
|
||||
* Method for finding docker containers after the image name
|
||||
*
|
||||
* @param imageName
|
||||
* - the name of the image used by container
|
||||
* @param imageName - the name of the image used by container
|
||||
* @return the containers
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @since 2.6
|
||||
@@ -39,7 +41,8 @@ import org.alfresco.rest.rm.community.model.record.RecordProperties;
|
||||
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
|
||||
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 " ".
|
||||
*
|
||||
* @param paramName
|
||||
* The name of the parameter to check
|
||||
* @param paramValue
|
||||
* The value of the parameter to check
|
||||
* @throws IllegalArgumentException
|
||||
* Throws an exception if the given value is blank
|
||||
* @param paramName The name of the parameter to check
|
||||
* @param paramValue 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
|
||||
{
|
||||
@@ -62,12 +59,9 @@ public class ParameterCheck
|
||||
/**
|
||||
* Checks if a given {@link Object} is null or not
|
||||
*
|
||||
* @param paramName
|
||||
* The name of the parameter to check
|
||||
* @param object
|
||||
* The value of the parameter to check
|
||||
* @throws IllegalArgumentException
|
||||
* Throws an exception if the given value is null
|
||||
* @param paramName The name of the parameter to check
|
||||
* @param object 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
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user