-
Notifications
You must be signed in to change notification settings - Fork 2
add netmod description #894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
|
|
||
| @Transactional | ||
| public void updateNetworkModificationsDescription(UUID studyUuid, UUID nodeUuid, UUID modificationUuid, String userId, String description) { | ||
| List<UUID> childrenUuids = networkModificationTreeService.getChildrenUuids(nodeUuid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this code is used in many others endpoint can we share it in a method ? if it is possible ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s possible but delicate because these uses are similar but not identical. By example mine doesn't use the groupUuid and, more importantly, doesn't invalidate the nodes.
So I don't think that this is really worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 have been merged here : f972646
The third (stashed) has not been merged with the others yet because it is a bit more dangerous. Maybe in a next small technical ticket.
| @PutMapping(value = "/studies/{studyUuid}/nodes/{nodeUuid}/network-modifications", params = "description") | ||
| @Operation(summary = "Update the description of a network modification") | ||
| @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Update the description of a network modification"), @ApiResponse(responseCode = "404", description = "The study/node is not found")}) | ||
| public ResponseEntity<Void> updateNetworkModificationDescription(@Parameter(description = "Study UUID") @PathVariable("studyUuid") UUID studyUuid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as for the other PR. Why do we add a new endpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both have been merged here : f972646
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
…-netmod-description
EtienneLt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small things
| @Parameter(description = "New activated value") @RequestParam(name = "activated", required = true) Boolean activated, | ||
| @RequestHeader(HEADER_USER_ID) String userId) { | ||
| @PutMapping(value = "/studies/{studyUuid}/nodes/{nodeUuid}/network-modifications") | ||
| @Operation(summary = "Updates the metadata of a network modification") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Operation(summary = "Updates the metadata of a network modification") | |
| @Operation(summary = "Updates metadata of a network modification") |
small thing
src/test/java/org/gridsuite/study/server/NetworkModificationUnitTest.java
Show resolved
Hide resolved
EtienneLt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test OK code OK
|



PR Summary
intermediary class in order to call the network modification description updater in network-modification-server : gridsuite/network-modification-server#743