6
6
*/
7
7
package org .gridsuite .voltageinit .server .service ;
8
8
9
- import lombok .Getter ;
9
+ import lombok .AllArgsConstructor ;
10
+ import lombok .Data ;
11
+ import lombok .NonNull ;
10
12
13
+ import java .util .HashMap ;
11
14
import java .util .Map ;
12
- import java .util .Objects ;
13
15
import java .util .UUID ;
14
16
15
17
/**
16
18
* @author Etienne Homer <etienne.homer at rte-france.com>
17
19
*/
18
- @ Getter
20
+ @ Data
21
+ @ AllArgsConstructor
19
22
public class VoltageInitRunContext {
20
23
24
+ @ NonNull
21
25
private final UUID networkUuid ;
22
26
23
27
private final String variantId ;
@@ -36,15 +40,7 @@ public class VoltageInitRunContext {
36
40
37
41
private final Map <String , Double > voltageLevelsIdsRestricted ;
38
42
39
- public VoltageInitRunContext (UUID networkUuid , String variantId , String receiver , UUID reportUuid , String reporterId , String reportType , String userId , UUID parametersUuid , Map <String , Double > voltageLevelsIdsRestricted ) {
40
- this .networkUuid = Objects .requireNonNull (networkUuid );
41
- this .variantId = variantId ;
42
- this .receiver = receiver ;
43
- this .reportUuid = reportUuid ;
44
- this .reporterId = reporterId ;
45
- this .reportType = reportType ;
46
- this .userId = userId ;
47
- this .parametersUuid = parametersUuid ;
48
- this .voltageLevelsIdsRestricted = voltageLevelsIdsRestricted ;
43
+ public VoltageInitRunContext (@ NonNull UUID networkUuid , String variantId , String receiver , UUID reportUuid , String reporterId , String reportType , String userId , UUID parametersUuid ) {
44
+ this (networkUuid , variantId , receiver , reportUuid , reporterId , reportType , userId , parametersUuid , new HashMap <>());
49
45
}
50
46
}
0 commit comments