Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.gridsuite.study.server.StudyApi;
import org.gridsuite.study.server.StudyConstants.*;
import org.gridsuite.study.server.StudyException;
import org.gridsuite.study.server.StudyException.Type;
import org.gridsuite.study.server.dto.*;
Expand Down Expand Up @@ -600,6 +599,19 @@ public ResponseEntity<String> getVoltageLevelEquipments(
return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(studyService.getVoltageLevelEquipments(nodeUuid, rootNetworkUuid, inUpstreamBuiltParentNode, voltageLevelId));
}

@GetMapping(value = "/studies/{studyUuid}/root-networks/{rootNetworkUuid}/nodes/{nodeUuid}/network-map/voltage-levels/{voltageLevelId}/connections")
@Operation(summary = "Get voltage level equipments")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Voltage level equipments")})
public ResponseEntity<String> getVoltageLevelConnections(
@PathVariable("studyUuid") UUID studyUuid,
@PathVariable("rootNetworkUuid") UUID rootNetworkUuid,
@PathVariable("nodeUuid") UUID nodeUuid,
@Parameter(description = "voltage level id") @PathVariable("voltageLevelId") String voltageLevelId,
@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.getVoltageLevelConnections(nodeUuid, rootNetworkUuid, inUpstreamBuiltParentNode, voltageLevelId));
}

@GetMapping(value = "/studies/{studyUuid}/root-networks/{rootNetworkUuid}/nodes/{nodeUuid}/network-map/all")
@Operation(summary = "Get Network equipments description")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "The list of equipments data")})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,13 @@ public String getVoltageLevelEquipments(UUID nodeUuid, UUID rootNetworkUuid, boo
null, equipmentPath);
}

public String getVoltageLevelConnections(UUID nodeUuid, UUID rootNetworkUuid, boolean inUpstreamBuiltParentNode, String voltageLevelId) {
UUID nodeUuidToSearchIn = getNodeUuidToSearchIn(nodeUuid, rootNetworkUuid, inUpstreamBuiltParentNode);
String equipmentPath = "voltage-levels" + StudyConstants.DELIMITER + voltageLevelId + StudyConstants.DELIMITER + "connections";
return networkMapService.getEquipmentsMapData(rootNetworkService.getNetworkUuid(rootNetworkUuid), networkModificationTreeService.getVariantId(nodeUuidToSearchIn, rootNetworkUuid),
null, equipmentPath);
}

public String getHvdcLineShuntCompensators(UUID nodeUuid, UUID rootNetworkUuid, boolean inUpstreamBuiltParentNode, String hvdcId) {
UUID nodeUuidToSearchIn = getNodeUuidToSearchIn(nodeUuid, rootNetworkUuid, inUpstreamBuiltParentNode);
UUID networkUuid = rootNetworkService.getNetworkUuid(rootNetworkUuid);
Expand Down