-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changes from 10 commits
a9a1f94
c4bc80e
a91ae9d
93adb0d
3c938cf
2185fd8
5aff44e
3b88f5f
82a74de
90955a5
855dffa
245493c
75b7027
ad70f5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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")}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the same for contained |
||
public ResponseEntity<List<Object>> getCompositeModificationContent(@PathVariable("id") UUID compositeModificationId) { | ||
return ResponseEntity.ok() | ||
.contentType(MediaType.APPLICATION_JSON) | ||
.body(directoryService.getCompositeModificationContent(compositeModificationId)); | ||
} | ||
|
||
@PutMapping(value = "/explore/filters/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) | ||
@Operation(summary = "Modify a filter") | ||
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "The filter has been successfully modified")}) | ||
|
@@ -271,6 +280,18 @@ public ResponseEntity<Void> updateContingencyList( | |
return ResponseEntity.ok().build(); | ||
} | ||
|
||
@PutMapping(value = "/explore/composite-modification/{id}", consumes = MediaType.APPLICATION_JSON_VALUE) | ||
@Operation(summary = "Modify a composite modification") | ||
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "The composite modification has been modified successfully")}) | ||
public ResponseEntity<Void> updateCompositeModification( | ||
@PathVariable UUID id, | ||
@RequestParam(name = "name") String name, | ||
@RequestHeader(QUERY_PARAM_USER_ID) String userId) { | ||
|
||
exploreService.updateCompositeModification(id, userId, name); | ||
return ResponseEntity.ok().build(); | ||
} | ||
|
||
@PostMapping(value = "/explore/parameters", consumes = MediaType.APPLICATION_JSON_VALUE) | ||
@Operation(summary = "create parameters") | ||
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "parameters creation request delegated to corresponding server")}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,6 +241,10 @@ private IDirectoryElementsService getGenericService(String type) { | |
return iDirectoryElementsService; | ||
} | ||
|
||
public List<Object> getCompositeModificationContent(UUID compositeModificationId) { | ||
return ((NetworkModificationService) getGenericService(MODIFICATION)).getCompositeModificationContent(compositeModificationId); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this function in directoryService ? it is not about cases There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True. I moved it. |
||
|
||
public List<ElementAttributes> getElementsMetadata(List<UUID> ids, List<String> elementTypes, | ||
List<String> equipmentTypes) { | ||
Map<String, List<ElementAttributes>> elementAttributesListByType = getElementsInfos(ids, elementTypes) | ||
|
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.
get the network modifications infos related to the composite modification
or something else
"contained in a" is not correct
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 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.