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.process.files") public class ProcessFilesLinkRepository extends AbstractDSpaceRestRepository implements LinkRestRepositoryThis is theLinkRestRepositoryimplementation that takes care of retrieving the list ofBitstreamobjects for the Process endpoints
-
-
Field Summary
-
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils
-
-
Constructor Summary
Constructors Constructor Description ProcessFilesLinkRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.domain.Page<BitstreamRest>getFilesFromProcess(javax.servlet.http.HttpServletRequest request, Integer processId, org.springframework.data.domain.Pageable optionalPageable, Projection projection)This method will retrieve all the files from the processBitstreamRestgetResource(javax.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 fileType-
Methods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dspace.app.rest.repository.LinkRestRepository
isEmbeddableRelation
-
-
-
-
Method Detail
-
getFilesFromProcess
@PreAuthorize("hasAuthority(\'ADMIN\')") public org.springframework.data.domain.Page<BitstreamRest> getFilesFromProcess(@Nullable javax.servlet.http.HttpServletRequest request, Integer processId, @Nullable org.springframework.data.domain.Pageable optionalPageable, Projection projection) throws SQLException, AuthorizeExceptionThis 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(javax.servlet.http.HttpServletRequest request, String processId, String fileType, org.springframework.data.domain.Pageable pageable, Projection projection) throws SQLException, AuthorizeExceptionThis 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
-
-