From 4915678c5018018ba312d3b174e5914d2831951a Mon Sep 17 00:00:00 2001 From: jamal-khey Date: Wed, 8 Nov 2023 15:36:02 +0100 Subject: [PATCH] set inUpstreamBuiltParentNode to false by default (#446) set all end points that use inUpstreamBuiltParentNode=true as a default value to'true' Signed-off-by: jamal-khey --- .../study/server/StudyController.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/gridsuite/study/server/StudyController.java b/src/main/java/org/gridsuite/study/server/StudyController.java index aafa24a7e..32e8d949d 100644 --- a/src/main/java/org/gridsuite/study/server/StudyController.java +++ b/src/main/java/org/gridsuite/study/server/StudyController.java @@ -367,7 +367,7 @@ public ResponseEntity> getVoltageLevelBuses( @PathVariable("studyUuid") UUID studyUuid, @PathVariable("nodeUuid") UUID nodeUuid, @PathVariable("voltageLevelId") String voltageLevelId, - @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode) { + @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getVoltageLevelBuses(studyUuid, nodeUuid, voltageLevelId, inUpstreamBuiltParentNode)); } @@ -378,7 +378,7 @@ public ResponseEntity> getVoltageLevelBusbarSections( @PathVariable("studyUuid") UUID studyUuid, @PathVariable("nodeUuid") UUID nodeUuid, @PathVariable("voltageLevelId") String voltageLevelId, - @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode) { + @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getVoltageLevelBusbarSections(studyUuid, nodeUuid, voltageLevelId, inUpstreamBuiltParentNode)); } @@ -389,7 +389,7 @@ public ResponseEntity getHvdcLineShuntCompensators( @PathVariable("studyUuid") UUID studyUuid, @PathVariable("nodeUuid") UUID nodeUuid, @PathVariable("hvdcId") String hvdcId, - @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode) { + @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode) { String hvdcInfos = studyService.getHvdcLineShuntCompensators(studyUuid, nodeUuid, inUpstreamBuiltParentNode, hvdcId); return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(hvdcInfos); } @@ -423,7 +423,7 @@ public ResponseEntity getNetworkElementsIds( @PathVariable("studyUuid") UUID studyUuid, @PathVariable("nodeUuid") UUID nodeUuid, @Parameter(description = "Substations id") @RequestParam(name = "substationsIds", required = false) List substationsIds, - @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode, + @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode, @Parameter(description = "equipment type") @RequestParam(name = "equipmentType") String equipmentType) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getNetworkElementsIds(studyUuid, nodeUuid, substationsIds, inUpstreamBuiltParentNode, equipmentType)); @@ -436,7 +436,7 @@ public ResponseEntity getSubstationMapData( @Parameter(description = "study uuid") @PathVariable("studyUuid") UUID studyUuid, @Parameter(description = "node uuid") @PathVariable("nodeUuid") UUID nodeUuid, @Parameter(description = "substation Id") @PathVariable("substationId") String substationId, - @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode) { + @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getSubstationMapData(studyUuid, nodeUuid, substationId, inUpstreamBuiltParentNode)); } @@ -450,7 +450,7 @@ public ResponseEntity getNetworkElementsInfos( @Parameter(description = "Substations id") @RequestParam(name = "substationsIds", required = false) List substationsIds, @Parameter(description = "Element type") @RequestParam(name = "elementType") String elementType, @Parameter(description = "Info type") @RequestParam(name = "infoType") String infoType, - @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode) { + @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getNetworkElementsInfos(studyUuid, nodeUuid, substationsIds, elementType, infoType, inUpstreamBuiltParentNode)); } @@ -464,7 +464,7 @@ public ResponseEntity getNetworkElementInfos( @Parameter(description = "Element id") @PathVariable("elementId") String elementId, @Parameter(description = "Element type") @RequestParam(name = "elementType") String elementType, @Parameter(description = "Info type") @RequestParam(name = "infoType") String infoType, - @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode) { + @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getNetworkElementInfos(studyUuid, nodeUuid, elementType, infoType, elementId, inUpstreamBuiltParentNode)); } @@ -490,7 +490,7 @@ public ResponseEntity getVoltageLevelsAndEquipments( @PathVariable("studyUuid") UUID studyUuid, @PathVariable("nodeUuid") UUID nodeUuid, @Parameter(description = "Substations id") @RequestParam(name = "substationId", required = false) List substationsIds, - @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode) { + @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getVoltageLevelsAndEquipment(studyUuid, nodeUuid, substationsIds, inUpstreamBuiltParentNode)); } @@ -503,7 +503,7 @@ public ResponseEntity getVoltageLevelEquipments( @PathVariable("nodeUuid") UUID nodeUuid, @Parameter(description = "voltage level id") @PathVariable("voltageLevelId") String voltageLevelId, @Parameter(description = "Substations id") @RequestParam(name = "substationId", required = false) List substationsIds, - @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode) { + @Parameter(description = "Should get in upstream built node ?") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getVoltageLevelEquipments(studyUuid, nodeUuid, substationsIds, inUpstreamBuiltParentNode, voltageLevelId)); } @@ -1139,7 +1139,7 @@ public ResponseEntity> searchEquipments( @Parameter(description = "Node uuid") @PathVariable("nodeUuid") UUID nodeUuid, @Parameter(description = "User input") @RequestParam(value = "userInput") String userInput, @Parameter(description = "What against to match") @RequestParam(value = "fieldSelector") EquipmentInfosService.FieldSelector fieldSelector, - @Parameter(description = "Should search in upstream built node") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "true") boolean inUpstreamBuiltParentNode, + @Parameter(description = "Should search in upstream built node") @RequestParam(value = "inUpstreamBuiltParentNode", required = false, defaultValue = "false") boolean inUpstreamBuiltParentNode, @Parameter(description = "Equipment type") @RequestParam(value = "equipmentType", required = false) String equipmentType) { return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON) .body(studyService.searchEquipments(studyUuid, nodeUuid, userInput, fieldSelector, equipmentType, inUpstreamBuiltParentNode));