Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Remaining MQTTSubmodelRepo Methods #544

Conversation

ShehriyarShariq-Fraunhofer
Copy link
Contributor

@ShehriyarShariq-Fraunhofer ShehriyarShariq-Fraunhofer commented Nov 26, 2024

Implemented eventing logic + tests for:

  1. patchSubmodelElements
  2. setFileValue
  3. deleteFileValue

Closes #428

@@ -9,5 +9,8 @@ This feature provides hierarchical MQTT eventing for a multitude of events:
| SubmodelElement Created | sm-repository/$repoId/submodels/$submodelIdBase64URLEncoded/submodelElements/$idShortPath/created | Created SubmodelElement JSON |
| SubmodelElement Updated | sm-repository/$repoId/submodels/$submodelIdBase64URLEncoded/submodelElements/$idShortPath/updated | Updated SubmodelElement JSON |
| SubmodelElement Deleted | sm-repository/$repoId/submodels/$submodelIdBase64URLEncoded/submodelElements/$idShortPath/deleted | Deleted SubmodelElement JSON |
| SubmodelElements Patched | sm-repository/$repoId/submodels/$submodelIdBase64URLEncoded/submodelElements/patched | Patched SubmodelElements JSON |
| FileValue Updated | sm-repository/$repoId/submodels/$submodelIdBase64URLEncoded/submodelElements/$idShortPath/fileValue/$fileName/updated | Updated SubmodelElement JSON |
Copy link
Member

@mateusmolina-iese mateusmolina-iese Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please change the topic to match the spec [1, 2] (.../$idShortPath/attachment/updated and /deleted)? Also, no need for the $fileName in the topic itself.

[1] https://app.swaggerhub.com/apis/Plattform_i40/SubmodelServiceSpecification/V3.0.1_SSP-001#/Submodel%20API/PutFileByPath
[2] https://app.swaggerhub.com/apis/Plattform_i40/SubmodelServiceSpecification/V3.0.1_SSP-001#/Submodel%20API/DeleteFileByPath

@Override
public void patchSubmodelElements(String submodelId, List<SubmodelElement> submodelElementList) {
decorated.patchSubmodelElements(submodelId, submodelElementList);
List<SubmodelElement> patchedSubmodelElements = decorated.getSubmodelElements(submodelId, PaginationInfo.NO_LIMIT).getResult();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason to use the NO_LIMIT request to get the patched submodel elements again? They are already being passed as parameter.

@aaronzi aaronzi merged commit 2c68a75 into eclipse-basyx:main Dec 6, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement remaining MqttSubmodelRepository methods
3 participants