Skip to content
Success

Changes

Summary

  1. Implement model deletion in the Model Manager (commit: d221b61) (details)
  2. Expose #getProviders(String modelPackageUri, String model) from the twin (commit: 6eebd84) (details)
Commit d221b6126804814251557f7d4cda8d11e7c9300d by Tim Ward
Implement model deletion in the Model Manager

The model manager API provides a deletion method, but this was not implemented. This commit implements deletion logic, which delegates to the Model Nexus. The Model Nexus:

1. Finds the Model
2. If found it deletes any and all providers using the model, then it deletes the model from its owning EPackage
3. If the EPackage is now empty of models then the EPackage is removed from the Model Nexus

The ModelImpl has also been updated to check the the model is still registered before allowing any action. This prevents deleted models from being used after they are deleted.

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: d221b61)
The file was modified core/impl/src/main/java/org/eclipse/sensinact/core/model/impl/ModelImpl.java (diff)
The file was modified core/impl/src/main/java/org/eclipse/sensinact/core/model/nexus/ModelNexus.java (diff)
The file was modified core/impl/src/test/java/org/eclipse/sensinact/core/model/impl/ModelBuildingTest.java (diff)
The file was modified core/impl/src/test/java/org/eclipse/sensinact/core/model/nexus/impl/NexusTest.java (diff)
The file was modified core/impl/src/main/java/org/eclipse/sensinact/core/model/impl/SensinactModelManagerImpl.java (diff)
Commit 6eebd84301fc3794c5a9dd773c3bcde0d8733afe by Tim Ward
Expose #getProviders(String modelPackageUri, String model) from the twin

The method getProviders(String, String) existed in the EMF Twin, but not the base twin. As we already use the model package uri extensively in that interface we should expose it here as well.

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: 6eebd84)
The file was modified core/api/src/main/java/org/eclipse/sensinact/core/twin/SensinactDigitalTwin.java (diff)