Skip to content
Success

Changes

Summary

  1. Include the model name in topic notifications (commit: 9d68852) (details)
  2. use real eClass from service not from reference (commit: 4410aac) (details)
  3. fixed NPE due to missing service EClass (commit: a648fd6) (details)
  4. Implement model deletion in the Model Manager (commit: d221b61) (details)
  5. Add support for nullable data which should not create a resource (commit: 068be10) (details)
  6. Reinstate final modifier for GenericDto (commit: 61101a6) (details)
  7. Fix missing check in SetValueCommand (commit: c9be1b3) (details)
Commit 9d68852a61656138c22694f9e0988f6b0a9a1e95 by timothyjward
Include the model name in topic notifications

Filtering at the model level is extremely useful as it permits efficient tracking of multiple providers using the same model. The model URI is required to ensure strict uniqueness, however the model uri is difficult to represent in topic syntax, and would need large amounts of escaping. The trade off is therefore to allow the model name to be used in the topic for rapid checking, with the filter being available for more precise matching if needed.

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: 9d68852)
The file was modifiedcore/api/src/main/java/org/eclipse/sensinact/core/notification/LifecycleNotification.java
The file was modifiednorthbound/websocket/src/main/java/org/eclipse/sensinact/northbound/ws/impl/WebSocketEndpoint.java
The file was modifiedsouthbound/virtual/virtual-temperature-sensor/src/main/java/org/eclipse/sensinact/gateway/southbound/virtual/temperature/VirtualTemperatureDto.java
The file was modifiedcore/api/src/main/java/org/eclipse/sensinact/core/notification/ResourceActionNotification.java
The file was modifiednorthbound/rest/src/test/java/org/eclipse/sensinact/northbound/rest/integration/notification/ResourceNotificationsTest.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/notification/impl/NotificationSenderTest.java
The file was modifiednorthbound/rest/src/main/java/org/eclipse/sensinact/northbound/rest/impl/RestNorthbound.java
The file was modifiedcore/api/src/main/java/org/eclipse/sensinact/core/notification/ResourceMetaDataNotification.java
The file was modifiedcore/api/src/main/java/org/eclipse/sensinact/core/notification/ResourceDataNotification.java
The file was modifiednorthbound/session/session-impl/src/test/java/org/eclipse/sensinact/nortbound/session/integration/SessionSubscribeTest.java
Commit 4410aac42c5a5724db1a96b563512940ce02aeb6 by Guido Grune
use real eClass from service not from reference

Signed-off-by: Guido Grune <g.grune@datainmotion.com>
(commit: 4410aac)
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/integration/EMFUpdateServiceTest.java
The file was modifiedcore/models/provider/src/main/resources/model/sensinact.ecore
The file was modifiedcore/models/provider/src/main/resources/model/sensinact.genmodel
Commit a648fd6334494a065bf1355a64b37a945dcffeed by j.albert
fixed NPE due to missing service EClass

Signed-off-by: Juergen Albert <j.albert@data-in-motion.biz>
(commit: a648fd6)
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/impl/ModelBuilderImpl.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/integration/EMFUpdateServiceTest.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/impl/ModelImpl.java
The file was modifiedcore/api/src/main/java/org/eclipse/sensinact/core/model/Model.java
The file was addedcore/emf-api/src/main/java/org/eclipse/sensinact/core/emf/model/EMFServiceBuilder.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/impl/SetValueCommand.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/impl/ServiceBuilderImpl.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/impl/SensinactModelManagerImpl.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/nexus/ModelNexus.java
The file was addedcore/emf-api/src/main/java/org/eclipse/sensinact/core/emf/model/EMFService.java
The file was addedcore/emf-api/src/main/java/org/eclipse/sensinact/core/emf/model/EMFModel.java
The file was addedcore/emf-api/src/main/java/org/eclipse/sensinact/core/emf/model/EMFModelBuilder.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/impl/ServiceImpl.java
The file was modifiedcore/emf-api/src/main/java/org/eclipse/sensinact/core/emf/model/SensinactEMFModelManager.java
Commit d221b6126804814251557f7d4cda8d11e7c9300d by timothyjward
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 modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/impl/ModelImpl.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/impl/SensinactModelManagerImpl.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/model/impl/ModelBuildingTest.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/model/nexus/impl/NexusTest.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/model/nexus/ModelNexus.java
Commit 068be1017ad07f297a0316652e66e9dec2412304 by timothyjward
Add support for nullable data which should not create a resource

In some cases null is a valid value to return, but should not be used to initialize a resource. For example if a DTO contains some optional resources which may never be set for some providers, but will be set for others, and those resources may be null, then this was not previously possible

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: 068be10)
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/command/impl/WhiteboardImplTest.java
The file was modifiedcore/annotation/src/main/java/org/eclipse/sensinact/core/annotation/dto/NullAction.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/dto/impl/AbstractUpdateDto.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/extract/impl/CustomBaseValueDtoExtractorTest.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/extract/impl/AnnotationMapping.java
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/extract/impl/GenericDtoExtractorTest.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/extract/impl/EMFGenericDtoDataExtractor.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/impl/SetValueCommand.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/extract/impl/GenericDtoDataExtractor.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/whiteboard/impl/SensinactWhiteboard.java
Commit 61101a6c9a361235909f11624cf1e8ea199fb126 by timothyjward
Reinstate final modifier for GenericDto

The EMF dto altered the GenericDto so that it could extend it. The GenericDto was intentionally final to prevent usage mistakes in the API. There are few fields and we should copy them.

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: 61101a6)
The file was modifiedcore/api/src/main/java/org/eclipse/sensinact/core/push/dto/GenericDto.java
The file was modifiedcore/emf-api/src/main/java/org/eclipse/sensinact/core/emf/dto/EMFGenericDto.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/extract/impl/EMFGenericDtoDataExtractor.java
Commit c9be1b379b44dcb0c5400ff44d4664ab3202c764 by timothyjward
Fix missing check in SetValueCommand

The UPDATE_IF_PRESENT logic would always run even if the data value was not null. This has been fixed and regression tests added for all NullAction behaviours.

Signed-off-by: Tim Ward <timothyjward@apache.org>
(commit: c9be1b3)
The file was modifiedcore/impl/src/test/java/org/eclipse/sensinact/core/integration/DataUpdateServiceTest.java
The file was modifiedcore/impl/src/main/java/org/eclipse/sensinact/core/impl/SetValueCommand.java