Package org.dspace.app.rest
Class PrimaryBitstreamController
- java.lang.Object
-
- org.dspace.app.rest.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 ObjectThis RestController is responsible for managing primaryBitstreams on bundles. The endpoint can be found at /api/core/bundles/{bundle-uuid}/primaryBitstream
-
-
Constructor Summary
Constructors Constructor Description PrimaryBitstreamController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>createPrimaryBitstream(UUID uuid, javax.servlet.http.HttpServletRequest request)This method creates a primaryBitstream on the given Bundle.org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deletePrimaryBitstream(UUID uuid, javax.servlet.http.HttpServletRequest request)This method deletes the primaryBitstream on the given Bundle.BundleResourceupdatePrimaryBitstream(UUID uuid, javax.servlet.http.HttpServletRequest request)This method updates the primaryBitstream on the given Bundle.
-
-
-
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 setrequest- 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 updatedrequest- 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 deletedrequest- The HttpServletRequest- Returns:
- The Bundle of which the primaryBitstream was deleted
-
-