Class 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 Detail

      • BitstreamRestController

        public BitstreamRestController()
    • Method Detail

      • 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 format
        request - 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