Class ProcessFilesLinkRepository

java.lang.Object
org.dspace.app.rest.repository.AbstractDSpaceRestRepository
org.dspace.app.rest.repository.ProcessFilesLinkRepository
All Implemented Interfaces:
LinkRestRepository

@Component("system.processes.files") public class ProcessFilesLinkRepository extends AbstractDSpaceRestRepository implements LinkRestRepository
This is the LinkRestRepository implementation that takes care of retrieving the list of Bitstream objects for the Process endpoints
  • Constructor Details

    • ProcessFilesLinkRepository

      public ProcessFilesLinkRepository()
  • Method Details

    • getFilesFromProcess

      @PreAuthorize("hasPermission(#processId, \'PROCESS\', \'READ\')") public org.springframework.data.domain.Page<BitstreamRest> getFilesFromProcess(@Nullable jakarta.servlet.http.HttpServletRequest request, Integer processId, @Nullable org.springframework.data.domain.Pageable optionalPageable, Projection projection) throws SQLException, AuthorizeException
      This method will retrieve all the files from the process
      Parameters:
      request - The current request
      processId - The processId for the Process to use
      optionalPageable - Pageable if applicable
      projection - Projection if applicable
      Returns:
      A list of BitstreamRest objects filled
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - If something goes wrong
    • getResource

      @PreAuthorize("hasPermission(#processId, \'PROCESS\', \'READ\')") public BitstreamRest getResource(jakarta.servlet.http.HttpServletRequest request, String processId, String fileType, org.springframework.data.domain.Pageable pageable, Projection projection) throws SQLException, AuthorizeException
      This method will retrieve a bitstream for the given processId for the given fileType
      Parameters:
      request - The current request
      processId - The processId for the process to search in
      fileType - The filetype that the bitstream has to be
      pageable - Pageable if applicable
      projection - The current projection
      Returns:
      The BitstreamRest object that corresponds with the Process and type
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - If something goes wrong