Skip to content

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

| 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

4 participants