-
Notifications
You must be signed in to change notification settings - Fork 530
Refactor services dealing with Metadataschemas MetadataFields and Bitstreamformats #685
Description
Metadataschemas MetadataFields and Bitstreamformats all use custom response models and services.
This was necessary when they were originally added, because the object cache and dataservices would only support DSpaceObjects.
Now, however you can use dataservices for anything with a self link so we should refactor the responses and services for Metadataschemas MetadataFields and Bitstreamformats formats to use:
- dataservices
- the DSOResponseParsingSerivce and DSOSuccesssResponse (we'll want to rename them to ObjectParsingService and ObjectSuccessResponse)
- and the object-cache.
The idea is that we store the objects in the cache, keep only the links to them in the DSOSuccesssResponse, and retrieve them using a dataservice. Most of this should happen almost automatically.
This way we can remove a good chunk of duplicated code and unnecessary classes for requests, responses and responseparsers, and we ensure that upcoming improvements to the object cache benefit these objects as well.
Estimated amount of effort: 16h