[MDSAL-846] Unify (DOM)DataTreeIdentifier layout Created: 09/Dec/23 Updated: 10/Dec/23 Resolved: 10/Dec/23 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding API, DOM API |
| Affects Version/s: | None |
| Fix Version/s: | 13.0.0 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | NMDA support |
| Description |
|
DOMDataTreeIdentifier and DataTreeIdentifier are almost equivalent, except their instantiation differs – for the worse, as DOMDataTreeIdentifier exposes its constructor. We should really tie them together with an mdsal.common.api construct: public interface LogicalDatastorePath<T extends LogicalDatastorePath<T, P>, P extends HierarchicalIdentifier<P>> extends HierarchicalIdentifier<T> { LogicalDatastoreType datastore(); P path(); @Override default boolean contains(final T other) { return datastore() == other.datastore() && path().contains(other.path()); } } This will pave the way towards evolving these constructs, as now they have a common property: they bind a LogicalDatastoreType with their domain's instance-identifier representation. |