Migration to Ektorp and refactoring of the database layer
A summary of the changes:
- CouchDB4J has been replaced by Ektorp.
- CouchDBDao has been split up into multiple repositories: One for each entity.
- Jackson is used instead of JSON-lib for POJO <-> JSON (de)serialization.
- Jackson's
@JsonView's are used to mark which properties are (de)serialized for the API and/or CouchDB - A lot of persistence code could be simplified since serialization is handled automatically by the
ObjectMapper.
- Jackson's
- Entities and related Classes have been renamed:
-
Content<-Question/SkillQuestion/LecturerQuestion -
Comment<-FeedbackQuestion/AudienceQuestion
-
- CouchDB design docs can now be automatically created by the backend if necessary. They are included as JavaScript code which is parsed and transformed to JSON at startup using Java's
ScriptEngine. -
MediaTypes for API versioning have been introduced:-
vnd.de.thm.arsnova.v2+json: the format as used in ARSnova 2.x -
vnd.de.thm.arsnova.v3+json:- ISO 8601 dates instead of timestamps
-
idinstead of_id,revisioninstead of_rev
-
-
api.indent-response-bodycan be set in configuration for pretty responses for API debugging. - Empty (e.g.
null) entity properties are ignored for serialization
Edited by Daniel Gerhardt