Class ProcessFileTypesLinkRepository

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

@Component("system.processes.filetypes") public class ProcessFileTypesLinkRepository extends AbstractDSpaceRestRepository implements LinkRestRepository
This LinkRepository will deal with calls to the /filetypes endpoint of a given Process. It'll retrieve all the bitstreams for the given Process and return a ProcessFileTypesRest object that holds a list of Strings where each String represents a unique fileType of the Bitstreams for that Process
  • Constructor Details

    • ProcessFileTypesLinkRepository

      public ProcessFileTypesLinkRepository()
  • Method Details

    • getFileTypesFromProcess

      @PreAuthorize("hasPermission(#processId, \'PROCESS\', \'READ\')") public ProcessFileTypesRest getFileTypesFromProcess(@Nullable jakarta.servlet.http.HttpServletRequest request, Integer processId, @Nullable org.springframework.data.domain.Pageable optionalPageable, Projection projection) throws SQLException, AuthorizeException
      This will be the admin only endpoint that returns the ProcessFileTypesRest constructed with the values found in the Bitstreams of the Process with the given ProcessId
      Parameters:
      request - The relevant request
      processId - The processId of the Process to be used
      optionalPageable - Paging if applicable
      projection - The current projection
      Returns:
      The ProcessFileTypesRest created from the Bitstreams of the given Process
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - If something goes wrong