powsybl-core icon indicating copy to clipboard operation
powsybl-core copied to clipboard

Replace contingencyId by contingencyIds for ContingencyContext

Open EtienneLt opened this issue 11 months ago • 2 comments

Please check if the PR fulfills these requirements

  • [x] The commit message follows our guidelines
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem? No

What kind of change does this PR introduce? Feature

What is the new behavior (if this is a feature change)? Contingency context can now reference several contingencies.

Does this PR introduce a breaking change or deprecate an API?

  • [X] Yes
  • [ ] No

If yes, please check if the following requirements are fulfilled

  • [X] The Breaking Change or Deprecated label has been added
  • [ ] The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

  • ContingencyContext.getContingencyId() returning a unique String was replaced by ContingencyContext.getContingencyIds() returning a list of Strings.

  • An exception is now thrown when a ContigencyContext has contingency ids but is not declared of SPECIFIC type. Previously it was ambiguous as it could be either interpreted as a specific contingency context or as one of the declared type.

EtienneLt avatar Mar 19 '24 14:03 EtienneLt