|
34 | 34 | import jakarta.enterprise.context.ApplicationScoped;
|
35 | 35 | import jakarta.inject.Inject;
|
36 | 36 | import jakarta.interceptor.Interceptors;
|
37 |
| -import jakarta.validation.constraints.NotNull; |
38 | 37 | import jakarta.ws.rs.BadRequestException;
|
39 | 38 | import jakarta.ws.rs.HttpMethod;
|
40 | 39 | import jakarta.ws.rs.NotAllowedException;
|
@@ -216,7 +215,7 @@ public ArtifactMetaData getArtifactMetaData(String groupId, String artifactId) {
|
216 | 215 | @Override
|
217 | 216 | @Audited(extractParameters = {"0", KEY_GROUP_ID, "1", KEY_ARTIFACT_ID, "2", KEY_EDITABLE_METADATA})
|
218 | 217 | @Authorized(style = AuthorizedStyle.GroupAndArtifact, level = AuthorizedLevel.Write)
|
219 |
| - public void updateArtifactMetaData(String groupId, String artifactId, EditableMetaData data) { |
| 218 | + public void updateArtifactMetaData(String groupId, String artifactId, EditableArtifactMetaData data) { |
220 | 219 | requireParameter("groupId", groupId);
|
221 | 220 | requireParameter("artifactId", artifactId);
|
222 | 221 |
|
@@ -267,6 +266,19 @@ public GroupMetaData getGroupById(String groupId) {
|
267 | 266 | public void deleteGroupById(String groupId) {
|
268 | 267 | storage.deleteGroup(groupId);
|
269 | 268 | }
|
| 269 | + |
| 270 | + /** |
| 271 | + * @see io.apicurio.registry.rest.v3.GroupsResource#updateGroupById(java.lang.String, io.apicurio.registry.rest.v3.beans.EditableGroupMetaData) |
| 272 | + */ |
| 273 | + @Override |
| 274 | + public void updateGroupById(String groupId, EditableGroupMetaData data) { |
| 275 | + requireParameter("groupId", groupId); |
| 276 | + |
| 277 | + EditableGroupMetaDataDto dto = new EditableGroupMetaDataDto(); |
| 278 | + dto.setDescription(data.getDescription()); |
| 279 | + dto.setLabels(data.getLabels()); |
| 280 | + storage.updateGroupMetaData(new GroupId(groupId).getRawGroupIdWithNull(), dto); |
| 281 | + } |
270 | 282 |
|
271 | 283 | @Override
|
272 | 284 | @Authorized(style = AuthorizedStyle.None, level = AuthorizedLevel.Read)
|
@@ -551,12 +563,12 @@ public VersionMetaData getArtifactVersionMetaData(String groupId, String artifac
|
551 | 563 | }
|
552 | 564 |
|
553 | 565 | /**
|
554 |
| - * @see io.apicurio.registry.rest.v3.GroupsResource#updateArtifactVersionMetaData(java.lang.String, java.lang.String, java.lang.String, io.apicurio.registry.rest.v3.beans.EditableMetaData) |
| 566 | + * @see io.apicurio.registry.rest.v3.GroupsResource#updateArtifactVersionMetaData(java.lang.String, java.lang.String, java.lang.String, io.apicurio.registry.rest.v3.beans.EditableArtifactMetaData) |
555 | 567 | */
|
556 | 568 | @Override
|
557 | 569 | @Audited(extractParameters = {"0", KEY_GROUP_ID, "1", KEY_ARTIFACT_ID, "2", KEY_VERSION, "3", KEY_EDITABLE_METADATA})
|
558 | 570 | @Authorized(style = AuthorizedStyle.GroupAndArtifact, level = AuthorizedLevel.Write)
|
559 |
| - public void updateArtifactVersionMetaData(String groupId, String artifactId, String versionExpression, EditableMetaData data) { |
| 571 | + public void updateArtifactVersionMetaData(String groupId, String artifactId, String versionExpression, EditableArtifactMetaData data) { |
560 | 572 | requireParameter("groupId", groupId);
|
561 | 573 | requireParameter("artifactId", artifactId);
|
562 | 574 | requireParameter("versionExpression", versionExpression);
|
@@ -1022,10 +1034,13 @@ public ArtifactBranch getArtifactBranch(String groupId, String artifactId, Strin
|
1022 | 1034 | }
|
1023 | 1035 |
|
1024 | 1036 |
|
| 1037 | + /** |
| 1038 | + * @see io.apicurio.registry.rest.v3.GroupsResource#createOrUpdateArtifactBranch(java.lang.String, java.lang.String, java.lang.String, java.lang.String) |
| 1039 | + */ |
1025 | 1040 | @Override
|
1026 | 1041 | @Audited(extractParameters = {"0", KEY_GROUP_ID, "1", KEY_ARTIFACT_ID, "2", "branch_id", "3", KEY_VERSION}) // TODO
|
1027 | 1042 | @Authorized(style = AuthorizedStyle.GroupAndArtifact, level = AuthorizedLevel.Write)
|
1028 |
| - public ArtifactBranch createOrUpdateArtifactBranch(String groupId, String artifactId, String rawBranchId, @NotNull String version) { |
| 1043 | + public ArtifactBranch createOrUpdateArtifactBranch(String groupId, String artifactId, String rawBranchId, String version) { |
1029 | 1044 | requireParameter("groupId", groupId);
|
1030 | 1045 | requireParameter("artifactId", artifactId);
|
1031 | 1046 | requireParameter("branchId", rawBranchId);
|
@@ -1053,7 +1068,7 @@ public ArtifactBranch createOrUpdateArtifactBranch(String groupId, String artifa
|
1053 | 1068 | @Override
|
1054 | 1069 | @Audited(extractParameters = {"0", KEY_GROUP_ID, "1", KEY_ARTIFACT_ID, "2", "branch_id", "3", "branch"}) // TODO
|
1055 | 1070 | @Authorized(style = AuthorizedStyle.GroupAndArtifact, level = AuthorizedLevel.Write)
|
1056 |
| - public ArtifactBranch createOrReplaceArtifactBranch(String groupId, String artifactId, String rawBranchId, @NotNull ArtifactBranch branch) { |
| 1071 | + public ArtifactBranch createOrReplaceArtifactBranch(String groupId, String artifactId, String rawBranchId, ArtifactBranch branch) { |
1057 | 1072 | requireParameter("groupId", groupId);
|
1058 | 1073 | requireParameter("artifactId", artifactId);
|
1059 | 1074 | requireParameter("branchId", rawBranchId);
|
|
0 commit comments