Skip to content

Commit

Permalink
set inUpstreamBuiltParentNode to false by default (#446)
Browse files Browse the repository at this point in the history
set all end points that use inUpstreamBuiltParentNode=true as a default value to'true'
Signed-off-by: jamal-khey <[email protected]>
  • Loading branch information
jamal-khey authored Nov 8, 2023
1 parent 0022dd9 commit 4915678
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main/java/org/gridsuite/study/server/StudyController.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public ResponseEntity<List<IdentifiableInfos>> 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));
}

Expand All @@ -378,7 +378,7 @@ public ResponseEntity<List<IdentifiableInfos>> 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));
}

Expand All @@ -389,7 +389,7 @@ public ResponseEntity<String> 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);
}
Expand Down Expand Up @@ -423,7 +423,7 @@ public ResponseEntity<String> getNetworkElementsIds(
@PathVariable("studyUuid") UUID studyUuid,
@PathVariable("nodeUuid") UUID nodeUuid,
@Parameter(description = "Substations id") @RequestParam(name = "substationsIds", required = false) List<String> 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));
Expand All @@ -436,7 +436,7 @@ public ResponseEntity<String> 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));
}
Expand All @@ -450,7 +450,7 @@ public ResponseEntity<String> getNetworkElementsInfos(
@Parameter(description = "Substations id") @RequestParam(name = "substationsIds", required = false) List<String> 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));
}
Expand All @@ -464,7 +464,7 @@ public ResponseEntity<String> 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));
}
Expand All @@ -490,7 +490,7 @@ public ResponseEntity<String> getVoltageLevelsAndEquipments(
@PathVariable("studyUuid") UUID studyUuid,
@PathVariable("nodeUuid") UUID nodeUuid,
@Parameter(description = "Substations id") @RequestParam(name = "substationId", required = false) List<String> 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));
}
Expand All @@ -503,7 +503,7 @@ public ResponseEntity<String> getVoltageLevelEquipments(
@PathVariable("nodeUuid") UUID nodeUuid,
@Parameter(description = "voltage level id") @PathVariable("voltageLevelId") String voltageLevelId,
@Parameter(description = "Substations id") @RequestParam(name = "substationId", required = false) List<String> 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));
}
Expand Down Expand Up @@ -1139,7 +1139,7 @@ public ResponseEntity<List<EquipmentInfos>> 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));
Expand Down

0 comments on commit 4915678

Please sign in to comment.