Skip to content
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

get composite modification content endpoint #102

Merged
merged 14 commits into from
Nov 13, 2024

Conversation

Mathieu-Deharbe
Copy link
Contributor

Mathieu-Deharbe and others added 9 commits October 22, 2024 16:53
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
@@ -249,6 +249,15 @@ public ResponseEntity<List<ElementAttributes>> getElementsMetadata(@RequestParam
return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(directoryService.getElementsMetadata(ids, elementTypes, equipmentTypes));
}

@GetMapping(value = "/explore/composite-modification/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
@Operation(summary = "get the network modifications infos contained in a composite modification")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get the network modifications infos related to the composite modification
or something else
"contained in a" is not correct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree. I understand that in the database or java class they are related, but everything is related in that sense.

In the conceptual sense, though, a composite modification is a container of other network modifications, isn't it ? "Related" is true but I think this is too vague.

@@ -249,6 +249,15 @@ public ResponseEntity<List<ElementAttributes>> getElementsMetadata(@RequestParam
return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(directoryService.getElementsMetadata(ids, elementTypes, equipmentTypes));
}

@GetMapping(value = "/explore/composite-modification/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
@Operation(summary = "get the network modifications infos contained in a composite modification")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Infos from all the contained network modifications")})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same for contained

@@ -241,6 +241,10 @@ private IDirectoryElementsService getGenericService(String type) {
return iDirectoryElementsService;
}

public List<Object> getCompositeModificationContent(UUID compositeModificationId) {
return ((NetworkModificationService) getGenericService(MODIFICATION)).getCompositeModificationContent(compositeModificationId);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this function in directoryService ? it is not about cases
it should be in exploreservice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I moved it.

@ghazwarhili
Copy link
Contributor

Note in general:
Pay attention to function naming; sometimes you use metadata, other times content, a mix of both, like InfosContent ...

@Mathieu-Deharbe
Copy link
Contributor Author

Mathieu-Deharbe commented Oct 30, 2024

Note in general: Pay attention to function naming; sometimes you use metadata, other times content, a mix of both, like InfosContent ...

Indeed. I started with Metadata but decided to change because metadata is already used by the class ModificationMetadata in the network modification server.

I am going to remove all the references to metadata. I have not found any in this PR though.

Mathieu-Deharbe and others added 3 commits October 30, 2024 10:55
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
Signed-off-by: Mathieu DEHARBE <mathieu.deharbe@rte-france.com>
@Mathieu-Deharbe Mathieu-Deharbe merged commit c47b3c6 into main Nov 13, 2024
3 checks passed
@Mathieu-Deharbe Mathieu-Deharbe deleted the get-composite-modification-content branch November 13, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants