Class ProcessFileTypesLinkRepository

  • All Implemented Interfaces:
    LinkRestRepository

    @Component("system.process.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 Detail

      • ProcessFileTypesLinkRepository

        public ProcessFileTypesLinkRepository()
    • Method Detail

      • getFileTypesFromProcess

        @PreAuthorize("hasAuthority(\'ADMIN\')")
        public ProcessFileTypesRest getFileTypesFromProcess​(@Nullable
                                                            javax.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