-
Notifications
You must be signed in to change notification settings - Fork 0
refactor topology infos and create new endpoint #298
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
Conversation
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
src/main/java/org/gridsuite/network/map/dto/utils/TopologyUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/network/map/NetworkMapController.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/network/map/NetworkMapController.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/network/map/dto/definition/topology/TopologyInfos.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/network/map/dto/definition/topology/TopologyInfos.java
Outdated
Show resolved
Hide resolved
src/main/java/org/gridsuite/network/map/dto/definition/topology/TopologyInfos.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
src/main/java/org/gridsuite/network/map/dto/definition/voltagelevel/VoltageLevelFormInfos.java
Show resolved
Hide resolved
|
#303 I'd like to propose this PR for the refacto |
voltage level form refacto
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
| @GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/feeder-bays-and-bus-bar-sections", produces = APPLICATION_JSON_VALUE) | ||
| @Operation(summary = "get feeder bays and bus bar sections information") | ||
| @ApiResponses(value = {@ApiResponse(responseCode = "200", description = " feeder bays and bus bar sections information retrieved")}) | ||
| public FeederBaysBusBarSectionsInfos getMoveVoltageLevelFeederBaysInfos(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid, |
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.
| public FeederBaysBusBarSectionsInfos getMoveVoltageLevelFeederBaysInfos(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid, | |
| public FeederBaysBusBarSectionsInfos getFeederBaysInfos(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid, |
| .open(sw.isOpen()) | ||
| .build())); | ||
| return switchInfosList; | ||
| public FeederBaysBusBarSectionsInfos getMoveVoltageLevelFeederBaysInfos(UUID networkUuid, String voltageLevelId, String variantId) { |
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.
| public FeederBaysBusBarSectionsInfos getMoveVoltageLevelFeederBaysInfos(UUID networkUuid, String voltageLevelId, String variantId) { | |
| public FeederBaysBusBarSectionsInfos getFeederBaysInfos(UUID networkUuid, String voltageLevelId, String variantId) { |
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.
It's better that the network-map-server doesn't have network-modification notions
| builder.isBusbarSectionPositionFound(vlTopologyInfos.isBusbarSectionPositionFound()); | ||
| builder.busBarSectionInfos(vlTopologyInfos.getBusBarSectionInfosGrouped()); | ||
| builder.feederBaysInfos(getFeederBaysInfos(voltageLevel)); | ||
| VoltageLevelFormInfos busBarSectionsInfos = getVoltageLevelBusBarSectionsInfos(voltageLevel); |
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.
Weird code here. If we work with VoltageLevelFormInfos only, it's cleaner to do something like:
voltageLevelFormInfos.setTopologyInfos() in replacement of all this code
| var extension = bbs.getExtension(BusbarSectionPosition.class); | ||
| if (extension == null) { | ||
| return VoltageLevelFormInfos.builder() | ||
| .busbarCount(1) |
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.
Those values are ok ?
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.
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.
When the extension is null, we return the default values
VoltageLevelFormInfos.builder()
.busbarCount(1)
.sectionCount(1)
.topologyKind(NODE_BREAKER)
.switchKinds(Collections.emptyList())
.isSymmetrical(false)
.build();
src/main/java/org/gridsuite/network/map/dto/mapper/VoltageLevelInfosMapper.java
Outdated
Show resolved
Hide resolved
|



No description provided.