Class BundleRestRepository

    • Constructor Detail

      • BundleRestRepository

        public BundleRestRepository​(BundleService dsoService)
    • Method Detail

      • findOne

        @PreAuthorize("hasPermission(#id, \'BUNDLE\', \'READ\')")
        public BundleRest findOne​(Context context,
                                  UUID id)
        Description copied from class: DSpaceRestRepository
        Method to implement to support retrieval of a specific REST object instance
        Specified by:
        findOne in class DSpaceRestRepository<BundleRest,​UUID>
        Parameters:
        context - the dspace context
        id - the rest object id
        Returns:
        the REST object identified by its ID
      • findAll

        public org.springframework.data.domain.Page<BundleRest> findAll​(Context context,
                                                                        org.springframework.data.domain.Pageable pageable)
        Description copied from class: DSpaceRestRepository
        Method to implement to support scroll of entity instances from the collection resource endpoint
        Specified by:
        findAll in class DSpaceRestRepository<BundleRest,​UUID>
        Parameters:
        context - the dspace context
        pageable - object embedding the requested pagination info
        Returns:
      • patch

        @PreAuthorize("hasPermission(#uuid, \'BUNDLE\', \'WRITE\')")
        protected void patch​(Context context,
                             javax.servlet.http.HttpServletRequest request,
                             String apiCategory,
                             String model,
                             UUID uuid,
                             Patch patch)
                      throws AuthorizeException,
                             SQLException
        Apply a patch operation to a bundle
        Overrides:
        patch in class DSpaceRestRepository<BundleRest,​UUID>
        Parameters:
        context - The context
        request - The http request
        apiCategory - The API category e.g. "api"
        model - The DSpace model e.g. "metadatafield"
        uuid - The UUID of the bundle to perform patch operations on
        patch - The JSON Patch (https://tools.ietf.org/html/rfc6902) operation
        Throws:
        AuthorizeException
        SQLException
      • uploadBitstream

        public BitstreamRest uploadBitstream​(Context context,
                                             Bundle bundle,
                                             String fileName,
                                             InputStream fileInputStream,
                                             String properties)
        Method to upload a bitstream to a bundle.
        Parameters:
        context - The context
        bundle - The bundle where the bitstream should be stored
        fileName - The filename as it was uploaded
        fileInputStream - The input stream used to create the bitstream
        properties - The properties to be assigned to the bitstream
        Returns:
        The uploaded bitstream