Interactions-HSG / yggdrasil

A framework for programming distributed hypermedia environments for autonomous agents.
https://interactions-hsg.github.io/yggdrasil/
Apache License 2.0
7 stars 8 forks source link

Feature/rest compatible templates #2

Closed phil9987 closed 4 years ago

phil9987 commented 4 years ago

Instead of having @Action annotation in templates, Yggdrasil now provides @RequestMapping annotation which takes two arguments: path and httpMethod This allows full support for RESTful interactions with webArtifacts compared to having RPC like @Action annotation which was statically associated to a PUT httpMethod.

I adapted the home-automation example from Simon Bienz accordingly on the dev-branch (I intentionally didn't change the master branch because I was not sure whether this has been used in a publication): https://github.com/Interactions-HSG/wot-search-home-automation/tree/dev

I tried to make the template path configurable, s.t. it can be located outside of the yggdrasil folder. However, I did not find a simple solution for this yet and decided to keep the templates inside of the yggdrasil repo for now.

Sidenotes: