asterics / AsTeRICS

The Assistive Technology Rapid Integration & Construction Set
http://www.asterics.eu
Other
57 stars 27 forks source link

added generic method "storeData", which is used by "storeModel", adde… #169

Closed klues closed 7 years ago

klues commented 7 years ago

…d new REST-method to store arbitary data

deinhofer commented 7 years ago

Please construct the path to the data file like it is done in the current master in storeModel:

ResourceRegistry.toFile(ResourceRegistry.getInstance().getResource(filename, RES_TYPE.MODEL))

just replace the RES_TYPE with RES_TYPE.DATA

This automatically resolves the path to the data subfolder or any other folder if it is mapped to a different location. For writing you can also use the IOUtils class from apache commons, which is available as library within the ARE.jar

deinhofer commented 7 years ago

very cool that we have this method now!! :+1: Please don't forget to update documenation and libraries and examples as with all new REST functions

klues commented 7 years ago

maybe we should add an extra REST-method for saving webapp-data or general data to ARE/data-folder, see https://github.com/asterics/AsTeRICS/issues/163#issuecomment-337874810