Describe the current behavior
An Identifiable id cannot be updated.
Describe the expected behavior
An Identifiable id can be updated.
Describe the motivation
For some use cases, for instance to follow a naming strategy, when a voltage level structure is changed, some identifiable id should be updated to follow a given naming strategy. For that we need a function to be able to update its id.
It is needed for any Identifiable class.
We can also think about a utility method that could be called to clean the naming of the identifiables according to a given naming strategy (or the default one). For instance to be called after a voltage level topology is completely changed.
- at least add a
setId method (this behavior is already implemented in BoundaryLineImpl - see replaceId)
- add TCK tests for the custom IIDM implementations (such as powsybl-network-store)
Extra Information
A AbstractIdentifiable::replaceId method already exists but is only implemented in BoundaryLineImpl.
We can replace this method by:
- renaming it to
setId
- move it to the Identifiable interface
- implement it in the
AbstractIdentifiable class
Need to add TCK tests to be sure to implement it also in the network-store or other implementation.
Describe the current behavior
An
Identifiableid cannot be updated.Describe the expected behavior
An
Identifiableid can be updated.Describe the motivation
For some use cases, for instance to follow a naming strategy, when a voltage level structure is changed, some identifiable id should be updated to follow a given naming strategy. For that we need a function to be able to update its id.
It is needed for any
Identifiableclass.We can also think about a utility method that could be called to clean the naming of the identifiables according to a given naming strategy (or the default one). For instance to be called after a voltage level topology is completely changed.
setIdmethod (this behavior is already implemented in BoundaryLineImpl - seereplaceId)Extra Information
A
AbstractIdentifiable::replaceIdmethod already exists but is only implemented inBoundaryLineImpl.We can replace this method by:
setIdAbstractIdentifiableclassNeed to add TCK tests to be sure to implement it also in the network-store or other implementation.