Package org.dspace.app.rest.repository
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-
Field Summary
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<BitstreamRest>getFilesFromProcess(jakarta.servlet.http.HttpServletRequest request, Integer processId, org.springframework.data.domain.Pageable optionalPageable, Projection projection) This method will retrieve all the files from the processgetResource(jakarta.servlet.http.HttpServletRequest request, String processId, String fileType, org.springframework.data.domain.Pageable pageable, Projection projection) This method will retrieve a bitstream for the given processId for the given fileTypeMethods 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
-
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 requestprocessId- The processId for the Process to useoptionalPageable- Pageable if applicableprojection- Projection if applicable- Returns:
- A list of
BitstreamRestobjects filled - Throws:
SQLException- If something goes wrongAuthorizeException- 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 requestprocessId- The processId for the process to search infileType- The filetype that the bitstream has to bepageable- Pageable if applicableprojection- The current projection- Returns:
- The BitstreamRest object that corresponds with the Process and type
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-