Package org.dspace.app.rest.repository
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-
Field Summary
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFileTypesFromProcess(jakarta.servlet.http.HttpServletRequest request, Integer processId, org.springframework.data.domain.Pageable optionalPageable, Projection projection) This will be the admin only endpoint that returns theProcessFileTypesRestconstructed with the values found in the Bitstreams of the Process with the given ProcessIdMethods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dspace.app.rest.repository.LinkRestRepository
isEmbeddableRelation
-
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 theProcessFileTypesRestconstructed with the values found in the Bitstreams of the Process with the given ProcessId- Parameters:
request- The relevant requestprocessId- The processId of the Process to be usedoptionalPageable- Paging if applicableprojection- The current projection- Returns:
- The
ProcessFileTypesRestcreated from the Bitstreams of the given Process - Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-