Class PrimaryBitstreamController


  • @RestController
    @RequestMapping("/api/core/bundles/{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}}/primaryBitstream")
    public class PrimaryBitstreamController
    extends Object
    This RestController is responsible for managing primaryBitstreams on bundles. The endpoint can be found at /api/core/bundles/{bundle-uuid}/primaryBitstream
    • Constructor Detail

      • PrimaryBitstreamController

        public PrimaryBitstreamController()
    • Method Detail

      • createPrimaryBitstream

        @PreAuthorize("hasPermission(#uuid, \'BUNDLE\', \'WRITE\')")
        @RequestMapping(method=POST,
                        consumes="text/uri-list")
        public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> createPrimaryBitstream​(@PathVariable
                                                                                                                                  UUID uuid,
                                                                                                                                  javax.servlet.http.HttpServletRequest request)
        This method creates a primaryBitstream on the given Bundle.
        curl -i -X POST "http://{dspace.server.url}/api/core/bundles/{bundle-uuid}/primaryBitstream" -H "Content-type:text/uri-list" -d "https://{dspace.server.url}/api/core/bitstreams/{bitstream-uuid}"
        Parameters:
        uuid - The UUID of the Bundle on which the primaryBitstream will be set
        request - The HttpServletRequest
        Returns:
        The Bundle on which the primaryBitstream was set
      • updatePrimaryBitstream

        @PreAuthorize("hasPermission(#uuid, \'BUNDLE\', \'WRITE\')")
        @RequestMapping(method=PUT,
                        consumes="text/uri-list")
        public BundleResource updatePrimaryBitstream​(@PathVariable
                                                     UUID uuid,
                                                     javax.servlet.http.HttpServletRequest request)
        This method updates the primaryBitstream on the given Bundle.
        curl -i -X PUT "http://{dspace.server.url}/api/core/bundles/{bundle-uuid}/primaryBitstream" -H "Content-type:text/uri-list" -d "https://{dspace.server.url}/api/core/bitstreams/{bitstream-uuid}"
        Parameters:
        uuid - The UUID of the Bundle of which the primaryBitstream will be updated
        request - The HttpServletRequest
        Returns:
        The Bundle of which the primaryBitstream was updated
      • deletePrimaryBitstream

        @PreAuthorize("hasPermission(#uuid, \'BUNDLE\', \'WRITE\')")
        @RequestMapping(method=DELETE)
        public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deletePrimaryBitstream​(@PathVariable
                                                                                                                                  UUID uuid,
                                                                                                                                  javax.servlet.http.HttpServletRequest request)
        This method deletes the primaryBitstream on the given Bundle.
        curl -i -X DELETE "http://{dspace.server.url}/api/core/bundles/{bundle-uuid}/primaryBitstream"
        Parameters:
        uuid - The UUID of the Bundle of which the primaryBitstream will be deleted
        request - The HttpServletRequest
        Returns:
        The Bundle of which the primaryBitstream was deleted