This is the new server webapp for DSpace 7 built with Spring Boot, MVC + HATEOAS with a focus on the JSON HAL format (formal specification)
This webapp uses the following technologies:
Please note that we don't use Spring Data REST but we mimic as much as possible its architecture and behaviour. We don't use Spring Data REST as we haven't a spring data layer and we want to provide clear separation between the persistence representation and the REST representation
Check the information available on the DSpace Official Wiki page for the DSpace 7 Working Group
DSpace 7 REST: Coding DSpace Objects
The only tested way right now is to run this webapp inside your IDE (Eclipse). Just create a new Tomcat 8 server and deploy the dspace-server-webapp maven module to it.
The dspace.dir is configured in the dspace-server-webapp/src/main/resources/application.properties file currently
dspace.dir = d:/install/dspace7
The modified version of the HAL Browser from https://github.com/mikekelly/hal-browser
We've updated/customized the HAL Browser to integrate better with our authentication system, provide CSRF support, and use a more recent version of its dependencies.
org.dspace.app.rest.Application is the spring boot main class it initializes
- the DSpace kernel
- the dspaceContextListener
- the DSpaceWebappServletFilter
- the dspaceRequestContextFilter
- a custom HAL RelProvider for dspace
org.dspace.app.rest.RestResourceController is the controller responsible to handle all the REST requests (so far) delegating the execution to the right repository depending on the requested resource (REST entity)
org.dspace.app.rest.model is the package where to put all the classes representing DSpace REST resource. The classes should be named with the name of the DSpace perstent class mainly exposed + the Rest suffix (i.e. ItemRest, CollectionRest, etc.)
org.dspace.app.rest.model.hateoas contains the classes specific of the HAL implementation. The most important class is org.dspace.app.rest.model.hateoas.DSpaceResource that wrap a DSpaceRest object adding the support for the links and embedded resources
org.dspace.app.rest.repository contains the implementation of the Repository Design pattern for the Rest Objects
org.dspace.app.rest.converter contains the converters from/to DSpace persistent entities (Item, Collection, etc.) to their equivalent REST object (ItemRest, CollectionRest, etc.)