Package org.dspace.app.rest
Class BitstreamRestController
java.lang.Object
org.dspace.app.rest.BitstreamRestController
@RestController
@RequestMapping("/api/core/bitstreams/{uuid:[0-9a-fxA-FX]{8}-[0-9a-fxA-FX]{4}-[0-9a-fxA-FX]{4}-[0-9a-fxA-FX]{4}-[0-9a-fxA-FX]{12}}")
public class BitstreamRestController
extends Object
This is a specialized controller to provide access to the bitstream binary
content
The mapping for requested endpoint try to resolve a valid UUID, for example
https://<dspace.server.url>/api/core/bitstreams/26453b4d-e513-44e8-8d5b-395f62972eff/content
- Author:
- Andrea Bollini (andrea.bollini at 4science.it), Tom Desair (tom dot desair at atmire dot com), Frederic Van Reet (frederic dot vanreet at atmire dot com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntityretrieve(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) updateBitstreamFormat(UUID uuid, javax.servlet.http.HttpServletRequest request) This method will update the bitstream format of the bitstream that corresponds to the provided bitstream uuid.
-
Constructor Details
-
BitstreamRestController
public BitstreamRestController()
-
-
Method Details
-
retrieve
@PreAuthorize("hasPermission(#uuid, \'BITSTREAM\', \'READ\')") @RequestMapping(method={GET,HEAD}, value="content") public org.springframework.http.ResponseEntity retrieve(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws IOException, SQLException, AuthorizeException -
updateBitstreamFormat
@RequestMapping(method=PUT, consumes="text/uri-list", value="format") @PreAuthorize("hasPermission(#uuid, \'BITSTREAM\',\'WRITE\')") @PostAuthorize("returnObject != null") public BitstreamResource updateBitstreamFormat(@PathVariable UUID uuid, javax.servlet.http.HttpServletRequest request) throws SQLException This method will update the bitstream format of the bitstream that corresponds to the provided bitstream uuid.- Parameters:
uuid- The UUID of the bitstream for which to update the bitstream formatrequest- The request object- Returns:
- The wrapped resource containing the bitstream which in turn contains the bitstream format
- Throws:
SQLException- If something goes wrong in the database
-