Package org.dspace.app.rest.repository
Class ProcessRestRepository
- java.lang.Object
-
- org.dspace.app.rest.repository.AbstractDSpaceRestRepository
-
- org.dspace.app.rest.repository.DSpaceRestRepository<ProcessRest,Integer>
-
- org.dspace.app.rest.repository.ProcessRestRepository
-
- All Implemented Interfaces:
org.springframework.data.repository.CrudRepository<ProcessRest,Integer>,org.springframework.data.repository.PagingAndSortingRepository<ProcessRest,Integer>,org.springframework.data.repository.Repository<ProcessRest,Integer>
@Component("system.process") public class ProcessRestRepository extends DSpaceRestRepository<ProcessRest,Integer>The repository for the Process workload
-
-
Field Summary
-
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils
-
-
Constructor Summary
Constructors Constructor Description ProcessRestRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddelete(org.dspace.core.Context context, Integer integer)Method to implement to support delete of a single object instanceorg.springframework.data.domain.Page<ProcessRest>findAll(org.dspace.core.Context context, org.springframework.data.domain.Pageable pageable)Method to implement to support scroll of entity instances from the collection resource endpointProcessRestfindOne(org.dspace.core.Context context, Integer id)Method to implement to support retrieval of a specific REST object instanceorg.springframework.data.domain.Page<ProcessRest>findProcessesByProperty(UUID ePersonUuid, String scriptName, String processStatusString, org.springframework.data.domain.Pageable pageable)Search method that will take Parameters and return a list ofProcessRestobjects based on theProcessobjects that were in the databank that adhere to these paramsClass<ProcessRest>getDomainClass()The REST model supported by the repositoryBitstreamRestgetProcessBitstreamByType(Integer processId, String type)Retrieves the Bitstream in the given Process of a given typeList<BitstreamRest>getProcessBitstreams(Integer processId)Calls on the getBitstreams method to retrieve all the Bitstreams of this process-
Methods inherited from class org.dspace.app.rest.repository.DSpaceRestRepository
action, action, count, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAll, findAll, findAllById, findById, patch, patch, put, put, put, put, save, save, saveAll, upload, upload, upload
-
Methods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
-
-
-
Method Detail
-
findOne
@PreAuthorize("hasPermission(#id, \'PROCESS\', \'READ\')") public ProcessRest findOne(org.dspace.core.Context context, Integer id)Description copied from class:DSpaceRestRepositoryMethod to implement to support retrieval of a specific REST object instance- Specified by:
findOnein classDSpaceRestRepository<ProcessRest,Integer>- Parameters:
context- the dspace contextid- the rest object id- Returns:
- the REST object identified by its ID
-
findAll
@PreAuthorize("hasAuthority(\'ADMIN\')") public org.springframework.data.domain.Page<ProcessRest> findAll(org.dspace.core.Context context, org.springframework.data.domain.Pageable pageable)Description copied from class:DSpaceRestRepositoryMethod to implement to support scroll of entity instances from the collection resource endpoint- Specified by:
findAllin classDSpaceRestRepository<ProcessRest,Integer>- Parameters:
context- the dspace contextpageable- object embedding the requested pagination info- Returns:
-
getProcessBitstreams
public List<BitstreamRest> getProcessBitstreams(Integer processId) throws SQLException, org.dspace.authorize.AuthorizeException
Calls on the getBitstreams method to retrieve all the Bitstreams of this process- Parameters:
processId- The processId of the Process to retrieve the Bitstreams for- Returns:
- The list of Bitstreams of the given Process
- Throws:
SQLException- If something goes wrongorg.dspace.authorize.AuthorizeException- If something goes wrong
-
getProcessBitstreamByType
public BitstreamRest getProcessBitstreamByType(Integer processId, String type) throws SQLException, org.dspace.authorize.AuthorizeException
Retrieves the Bitstream in the given Process of a given type- Parameters:
processId- The processId of the Process to be usedtype- The type of bitstreams to be returned, if null it'll return all the bitstreams- Returns:
- The bitstream for the given parameters
- Throws:
SQLException- If something goes wrongorg.dspace.authorize.AuthorizeException- If something goes wrong
-
delete
protected void delete(org.dspace.core.Context context, Integer integer) throws org.dspace.authorize.AuthorizeException, RepositoryMethodNotImplementedExceptionDescription copied from class:DSpaceRestRepositoryMethod to implement to support delete of a single object instance- Overrides:
deletein classDSpaceRestRepository<ProcessRest,Integer>- Parameters:
context- the dspace contextinteger- the id of the rest object to delete- Throws:
org.dspace.authorize.AuthorizeExceptionRepositoryMethodNotImplementedException- returned by the default implementation when the operation is not supported for the entity
-
findProcessesByProperty
@PreAuthorize("hasAuthority(\'ADMIN\')") public org.springframework.data.domain.Page<ProcessRest> findProcessesByProperty(UUID ePersonUuid, String scriptName, String processStatusString, org.springframework.data.domain.Pageable pageable) throws SQLExceptionSearch method that will take Parameters and return a list ofProcessRestobjects based on theProcessobjects that were in the databank that adhere to these params- Parameters:
ePersonUuid- The UUID for the EPerson that started the ProcessscriptName- The name of the Script for which the Process belongs toprocessStatusString- The status of the Processpageable- The pageable- Returns:
- A page of
ProcessRestobjects adhering to the params - Throws:
SQLException- If something goes wrong
-
getDomainClass
public Class<ProcessRest> getDomainClass()
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<ProcessRest,Integer>
-
-