Class BundlePrimaryBitstreamLinkRepository

    • Constructor Detail

      • BundlePrimaryBitstreamLinkRepository

        public BundlePrimaryBitstreamLinkRepository()
    • Method Detail

      • getPrimaryBitstream

        @PreAuthorize("hasPermission(#bundleId, \'BUNDLE\', \'READ\')")
        public BitstreamRest getPrimaryBitstream​(@Nullable
                                                 javax.servlet.http.HttpServletRequest request,
                                                 UUID bundleId,
                                                 @Nullable
                                                 org.springframework.data.domain.Pageable optionalPageable,
                                                 Projection projection)
        Retrieves the primaryBitstream of a Bundle. Returns null if Bundle doesn't have a primaryBitstream.
        curl -X GET "http://{dspace.server.url}/api/core/bundles/{bundle-uuid}/primaryBitstream"
        Parameters:
        request - The HttpServletRequest if relevant
        bundleId - The UUID of the Bundle
        optionalPageable - The pageable if relevant
        projection - The projection to use
        Returns:
        The primaryBitstream, or null if not found
      • createPrimaryBitstream

        @PreAuthorize("hasPermission(#bundleId, \'BUNDLE\', \'WRITE\')")
        public BundleRest createPrimaryBitstream​(Context context,
                                                 UUID bundleId,
                                                 Bitstream bitstream,
                                                 Projection projection)
        Sets a primaryBitstream on a Bundle.
        Parameters:
        context - The current DSpace context
        bundleId - The UUID of the Bundle
        bitstream - The Bitstream to use as primaryBitstream
        projection - The projection to use
        Returns:
        The Bundle
      • updatePrimaryBitstream

        @PreAuthorize("hasPermission(#bundleId, \'BUNDLE\', \'WRITE\')")
        public BundleRest updatePrimaryBitstream​(Context context,
                                                 UUID bundleId,
                                                 Bitstream bitstream,
                                                 Projection projection)
        Updates a primaryBitstream on a Bundle.
        Parameters:
        context - The current DSpace context
        bundleId - The UUID of the Bundle
        bitstream - The Bitstream to use as primaryBitstream
        projection - The projection to use
        Returns:
        The Bundle
      • deletePrimaryBitstream

        @PreAuthorize("hasPermission(#bundleId, \'BUNDLE\', \'WRITE\')")
        public void deletePrimaryBitstream​(Context context,
                                           UUID bundleId)
        Deletes the primaryBitstream on a Bundle.
        Parameters:
        context - The current DSpace context
        bundleId - The UUID of the Bundle