@@ -303,19 +303,6 @@ public ResponseEntity<Void> updateContingencyList(
303
303
return ResponseEntity .ok ().build ();
304
304
}
305
305
306
- @ PutMapping (value = "/explore/composite-modification/{id}" , consumes = MediaType .APPLICATION_JSON_VALUE )
307
- @ Operation (summary = "Modify a composite modification" )
308
- @ ApiResponses (value = {@ ApiResponse (responseCode = "200" , description = "The composite modification has been modified successfully" )})
309
- @ PreAuthorize ("@authorizationService.isAuthorized(#userId, #id, null, T(org.gridsuite.explore.server.dto.PermissionType).WRITE)" )
310
- public ResponseEntity <Void > updateCompositeModification (
311
- @ PathVariable UUID id ,
312
- @ RequestParam (name = "name" ) String name ,
313
- @ RequestHeader (QUERY_PARAM_USER_ID ) String userId ) {
314
-
315
- exploreService .updateCompositeModification (id , userId , name );
316
- return ResponseEntity .ok ().build ();
317
- }
318
-
319
306
@ PostMapping (value = "/explore/parameters" , consumes = MediaType .APPLICATION_JSON_VALUE )
320
307
@ Operation (summary = "create parameters" )
321
308
@ ApiResponses (value = {@ ApiResponse (responseCode = "200" , description = "parameters creation request delegated to corresponding server" )})
@@ -354,6 +341,19 @@ public ResponseEntity<Void> duplicateDiagramConfig(@RequestParam("duplicateFrom"
354
341
return ResponseEntity .ok ().build ();
355
342
}
356
343
344
+ @ PutMapping (value = "/explore/diagram-config/{id}" , consumes = MediaType .APPLICATION_JSON_VALUE )
345
+ @ Operation (summary = "Modify a diagram config" )
346
+ @ ApiResponses (value = {@ ApiResponse (responseCode = "204" , description = "Diagram config has been successfully modified" )})
347
+ @ PreAuthorize ("@authorizationService.isAuthorized(#userId, #id, null, T(org.gridsuite.explore.server.dto.PermissionType).WRITE)" )
348
+ public ResponseEntity <Void > updateDiagramConfig (@ PathVariable UUID id ,
349
+ @ RequestBody String diagramConfig ,
350
+ @ RequestHeader (QUERY_PARAM_USER_ID ) String userId ,
351
+ @ RequestParam (QUERY_PARAM_NAME ) String name ,
352
+ @ RequestParam (QUERY_PARAM_DESCRIPTION ) String description ) {
353
+ exploreService .updateDiagramConfig (id , diagramConfig , userId , name , description );
354
+ return ResponseEntity .noContent ().build ();
355
+ }
356
+
357
357
@ PutMapping (value = "/explore/parameters/{id}" , consumes = MediaType .APPLICATION_JSON_VALUE )
358
358
@ Operation (summary = "Modify parameters" )
359
359
@ ApiResponses (value = {@ ApiResponse (responseCode = "200" , description = "parameters have been successfully modified" )})
@@ -362,8 +362,9 @@ public ResponseEntity<Void> updateParameters(@PathVariable UUID id,
362
362
@ RequestBody String parameters ,
363
363
@ RequestParam (name = QUERY_PARAM_TYPE , defaultValue = "" ) ParametersType parametersType ,
364
364
@ RequestHeader (QUERY_PARAM_USER_ID ) String userId ,
365
- @ RequestParam ("name" ) String name ) {
366
- exploreService .updateParameters (id , parameters , parametersType , userId , name );
365
+ @ RequestParam (QUERY_PARAM_NAME ) String name ,
366
+ @ RequestParam (QUERY_PARAM_DESCRIPTION ) String description ) {
367
+ exploreService .updateParameters (id , parameters , parametersType , userId , name , description );
367
368
return ResponseEntity .ok ().build ();
368
369
}
369
370
@@ -425,8 +426,9 @@ public ResponseEntity<Void> createSpreadsheetConfigCollectionFromConfigIds(@Requ
425
426
public ResponseEntity <Void > updateSpreadsheetConfig (@ PathVariable UUID id ,
426
427
@ RequestBody String spreadsheetConfigDto ,
427
428
@ RequestHeader (QUERY_PARAM_USER_ID ) String userId ,
428
- @ RequestParam ("name" ) String name ) {
429
- exploreService .updateSpreadsheetConfig (id , spreadsheetConfigDto , userId , name );
429
+ @ RequestParam (QUERY_PARAM_NAME ) String name ,
430
+ @ RequestParam (QUERY_PARAM_DESCRIPTION ) String description ) {
431
+ exploreService .updateSpreadsheetConfig (id , spreadsheetConfigDto , userId , name , description );
430
432
return ResponseEntity .noContent ().build ();
431
433
}
432
434
@@ -437,8 +439,9 @@ public ResponseEntity<Void> updateSpreadsheetConfig(@PathVariable UUID id,
437
439
public ResponseEntity <Void > updateSpreadsheetConfigCollection (@ PathVariable UUID id ,
438
440
@ RequestBody String spreadsheetConfigCollectionDto ,
439
441
@ RequestHeader (QUERY_PARAM_USER_ID ) String userId ,
440
- @ RequestParam ("name" ) String name ) {
441
- exploreService .updateSpreadsheetConfigCollection (id , spreadsheetConfigCollectionDto , userId , name );
442
+ @ RequestParam (QUERY_PARAM_NAME ) String name ,
443
+ @ RequestParam (QUERY_PARAM_DESCRIPTION ) String description ) {
444
+ exploreService .updateSpreadsheetConfigCollection (id , spreadsheetConfigCollectionDto , userId , name , description );
442
445
return ResponseEntity .noContent ().build ();
443
446
}
444
447
@@ -477,6 +480,19 @@ public ResponseEntity<Void> createCompositeModification(@RequestBody List<UUID>
477
480
return ResponseEntity .ok ().build ();
478
481
}
479
482
483
+ @ PutMapping (value = "/explore/composite-modifications/{id}" , consumes = MediaType .APPLICATION_JSON_VALUE )
484
+ @ Operation (summary = "Modify a composite modification" )
485
+ @ ApiResponses (value = {@ ApiResponse (responseCode = "200" , description = "The composite modification has been modified successfully" )})
486
+ @ PreAuthorize ("@authorizationService.isAuthorized(#userId, #id, null, T(org.gridsuite.explore.server.dto.PermissionType).WRITE)" )
487
+ public ResponseEntity <Void > updateCompositeNetworkModification (@ PathVariable UUID id ,
488
+ @ RequestBody List <UUID > modificationUuids ,
489
+ @ RequestHeader (QUERY_PARAM_USER_ID ) String userId ,
490
+ @ RequestParam (QUERY_PARAM_NAME ) String name ,
491
+ @ RequestParam (QUERY_PARAM_DESCRIPTION ) String description ) {
492
+ exploreService .updateCompositeModification (id , modificationUuids , userId , name , description );
493
+ return ResponseEntity .ok ().build ();
494
+ }
495
+
480
496
@ PostMapping (value = "/explore/composite-modifications" , params = "duplicateFrom" )
481
497
@ Operation (summary = "duplicate modification element" )
482
498
@ ApiResponses (value = {@ ApiResponse (responseCode = "200" , description = "Composite modification has been duplicated and corresponding element created in the directory" )})
0 commit comments