|
4 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this
|
5 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
6 | 6 | */
|
7 |
| -package org.gridsuite.study.server; |
| 7 | +package org.gridsuite.study.server.controller; |
8 | 8 |
|
9 | 9 | import com.fasterxml.jackson.databind.JsonNode;
|
10 | 10 | import com.powsybl.iidm.network.ThreeSides;
|
|
18 | 18 |
|
19 | 19 | import org.apache.commons.lang3.StringUtils;
|
20 | 20 | import org.gridsuite.modification.dto.ModificationInfos;
|
| 21 | +import org.gridsuite.study.server.StudyApi; |
| 22 | +import org.gridsuite.study.server.StudyException; |
21 | 23 | import org.gridsuite.study.server.StudyException.Type;
|
22 | 24 | import org.gridsuite.study.server.dto.*;
|
23 | 25 | import org.gridsuite.study.server.dto.dynamicmapping.MappingInfos;
|
@@ -386,7 +388,7 @@ public ResponseEntity<byte[]> getVoltageLevelDiagram(
|
386 | 388 | @Parameter(description = "diagonalLabel") @RequestParam(name = "diagonalLabel", defaultValue = "false") boolean diagonalLabel,
|
387 | 389 | @Parameter(description = "topologicalColoring") @RequestParam(name = "topologicalColoring", defaultValue = "false") boolean topologicalColoring,
|
388 | 390 | @Parameter(description = "component library name") @RequestParam(name = "componentLibrary", required = false) String componentLibrary,
|
389 |
| - @Parameter(description = "Sld display mode") @RequestParam(name = "sldDisplayMode", defaultValue = "STATE_VARIABLE") StudyConstants.SldDisplayMode sldDisplayMode, |
| 391 | + @Parameter(description = "Sld display mode") @RequestParam(name = "sldDisplayMode", defaultValue = "STATE_VARIABLE") SldDisplayMode sldDisplayMode, |
390 | 392 | @Parameter(description = "language") @RequestParam(name = "language", defaultValue = "en") String language) {
|
391 | 393 | DiagramParameters diagramParameters = DiagramParameters.builder()
|
392 | 394 | .useName(useName)
|
@@ -420,7 +422,7 @@ public ResponseEntity<String> getVoltageLevelDiagramAndMetadata(
|
420 | 422 | @Parameter(description = "diagonalLabel") @RequestParam(name = "diagonalLabel", defaultValue = "false") boolean diagonalLabel,
|
421 | 423 | @Parameter(description = "topologicalColoring") @RequestParam(name = "topologicalColoring", defaultValue = "false") boolean topologicalColoring,
|
422 | 424 | @Parameter(description = "component library name") @RequestParam(name = "componentLibrary", required = false) String componentLibrary,
|
423 |
| - @Parameter(description = "Sld display mode") @RequestParam(name = "sldDisplayMode", defaultValue = "STATE_VARIABLE") StudyConstants.SldDisplayMode sldDisplayMode, |
| 425 | + @Parameter(description = "Sld display mode") @RequestParam(name = "sldDisplayMode", defaultValue = "STATE_VARIABLE") SldDisplayMode sldDisplayMode, |
424 | 426 | @Parameter(description = "language") @RequestParam(name = "language", defaultValue = "en") String language) {
|
425 | 427 | DiagramParameters diagramParameters = DiagramParameters.builder()
|
426 | 428 | .useName(useName)
|
@@ -626,7 +628,7 @@ public ResponseEntity<Void> moveModification(@PathVariable("studyUuid") UUID stu
|
626 | 628 | @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "The modification list has been updated.")})
|
627 | 629 | public ResponseEntity<Void> moveOrCopyModifications(@PathVariable("studyUuid") UUID studyUuid,
|
628 | 630 | @PathVariable("nodeUuid") UUID nodeUuid,
|
629 |
| - @RequestParam("action") StudyConstants.ModificationsActionType action, |
| 631 | + @RequestParam("action") ModificationsActionType action, |
630 | 632 | @Nullable @RequestParam("originNodeUuid") UUID originNodeUuid,
|
631 | 633 | @RequestBody List<UUID> modificationsToCopyUuidList,
|
632 | 634 | @RequestHeader(HEADER_USER_ID) String userId) {
|
@@ -845,41 +847,6 @@ public ResponseEntity<StudyVoltageInitParameters> getVoltageInitParameters(
|
845 | 847 | return ResponseEntity.ok().body(studyService.getVoltageInitParameters(studyUuid));
|
846 | 848 | }
|
847 | 849 |
|
848 |
| - @GetMapping(value = "/studies/{studyUuid}/spreadsheet-config-collection") |
849 |
| - @Operation(summary = "Get study spreadsheet config collection") |
850 |
| - @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "The spreadsheet config collection")}) |
851 |
| - public ResponseEntity<String> getSpreadsheetConfigCollection( |
852 |
| - @PathVariable("studyUuid") UUID studyUuid) { |
853 |
| - return ResponseEntity.ok().body(studyService.getSpreadsheetConfigCollection(studyUuid)); |
854 |
| - } |
855 |
| - |
856 |
| - @PutMapping(value = "/studies/{studyUuid}/spreadsheet-config-collection") |
857 |
| - @Operation(summary = "Update study's spreadsheet config collection, with replace or append mode") |
858 |
| - @ApiResponses(value = { |
859 |
| - @ApiResponse(responseCode = "200", description = "The updated spreadsheet config collection"), |
860 |
| - @ApiResponse(responseCode = "404", description = "The study or the collection doesn't exist") |
861 |
| - }) |
862 |
| - public ResponseEntity<String> updateStudySpreadsheetConfigCollection( |
863 |
| - @PathVariable("studyUuid") UUID studyUuid, |
864 |
| - @RequestParam("collectionUuid") UUID collectionUuid, |
865 |
| - @RequestParam(value = "append", required = false, defaultValue = "false") Boolean appendMode) { |
866 |
| - return ResponseEntity.ok().body(studyService.updateStudySpreadsheetConfigCollection(studyUuid, collectionUuid, appendMode)); |
867 |
| - } |
868 |
| - |
869 |
| - @PostMapping(value = "/studies/{studyUuid}/spreadsheet-config-collection") |
870 |
| - @Operation(summary = "Set spreadsheet config collection on study, reset to default one if empty body") |
871 |
| - @ApiResponses(value = { |
872 |
| - @ApiResponse(responseCode = "200", description = "The spreadsheet config collection is set"), |
873 |
| - @ApiResponse(responseCode = "204", description = "Reset with user profile cannot be done") |
874 |
| - }) |
875 |
| - public ResponseEntity<Void> setSpreadsheetConfigCollection( |
876 |
| - @PathVariable("studyUuid") UUID studyUuid, |
877 |
| - @RequestBody(required = false) String configCollection, |
878 |
| - @RequestHeader(HEADER_USER_ID) String userId) { |
879 |
| - return studyService.setSpreadsheetConfigCollection(studyUuid, configCollection, userId) ? |
880 |
| - ResponseEntity.noContent().build() : ResponseEntity.ok().build(); |
881 |
| - } |
882 |
| - |
883 | 850 | @GetMapping(value = "/export-network-formats")
|
884 | 851 | @Operation(summary = "get the available export format")
|
885 | 852 | @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "The available export format")})
|
|
0 commit comments