Skip to content

Commit

Permalink
Signed-off-by: Rehili Ghazwa <[email protected]>
Browse files Browse the repository at this point in the history
add InjectionSvAttributes to grounds
  • Loading branch information
ghazwarhili committed Jun 3, 2024
1 parent 6cb404f commit b9c1537
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,15 @@ public ResponseEntity<Void> deleteGround(@Parameter(description = "Network ID",
return ResponseEntity.ok().build();
}

@PutMapping(value = "/{networkId}/grounds/sv")
@Operation(summary = "Update grounds SV")
@ApiResponses(@ApiResponse(responseCode = "201", description = "Successfully update grounds SV"))
public ResponseEntity<Void> updatesGroundsSv(@Parameter(description = "Network ID", required = true) @PathVariable("networkId") UUID networkId,
@Parameter(description = "ground SV resources", required = true) @RequestBody List<Resource<InjectionSvAttributes>> groundResources) {

return updateAll(resources -> repository.updateGroundsSv(networkId, resources), groundResources);
}

// buses

@PostMapping(value = "/{networkId}/configured-buses")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,10 @@ public void updateGrounds(UUID networkUuid, List<Resource<GroundAttributes>> res
updateIdentifiables(networkUuid, resources, mappings.getGroundMappings(), VOLTAGE_LEVEL_ID_COLUMN);
}

public void updateGroundsSv(UUID networkUuid, List<Resource<InjectionSvAttributes>> resources) {
updateInjectionsSv(networkUuid, resources, GROUND_TABLE);
}

public void deleteGround(UUID networkUuid, int variantNum, String groundId) {
deleteIdentifiable(networkUuid, variantNum, groundId, GROUND_TABLE);
}
Expand Down

0 comments on commit b9c1537

Please sign in to comment.