-
Notifications
You must be signed in to change notification settings - Fork 43
Migration guide v4.8.0
Sylvain Leclerc edited this page Mar 16, 2022
·
6 revisions
Implementation-specific parameters must now define their support for reading/writing in
the corresponding LoadFlowProvider
implementation.
This allows to have a stronger link between a loadflow implementation and its parameters,
and to rely on only one service implementation, instead of 3 before, which makes the implementation
more clear.
More specifically, LoadFlowParameters.ConfigLoader
and JsonLoadFlowParameters.ExtensionSerializer
service interfaces have been removed.
You need to move the corresponding implementation code into the following new methods:
public class MyLoadFlow implements LoadFlowProvider {
// run method implementation
...
// Return your JSON serializer
Optional<ExtensionJsonSerializer> getSpecificParametersSerializer() {
return Optional.of(new MyParametersSerializer());
}
// Load from config
Optional<Extension<LoadFlowParameters>> loadSpecificParameters(PlatformConfig config) {
return MyParameters.load(config); // typically implemented in the extension class
}
}