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:
Aware,BeanNameAware,org.springframework.data.repository.CrudRepository<ProcessRest,,Integer> org.springframework.data.repository.PagingAndSortingRepository<ProcessRest,,Integer> org.springframework.data.repository.Repository<ProcessRest,Integer>
@Component("system.processes")
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voidMethod to implement to support delete of a single object instanceorg.springframework.data.domain.Page<ProcessRest>Method to implement to support scroll of entity instances from the collection resource endpointorg.springframework.data.domain.Page<ProcessRest>findByCurrentUser(org.springframework.data.domain.Pageable pageable) 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 paramsThe REST model supported by the repositorygetProcessBitstreamByType(Integer processId, String type) Retrieves the Bitstream in the given Process of a given typegetProcessBitstreams(Integer processId) Calls on the getBitstreams method to retrieve all the Bitstreams of this processvoidinit()Methods inherited from class org.dspace.app.rest.repository.DSpaceRestRepository
action, action, count, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAll, findAll, findAllById, findById, patch, patch, put, put, put, put, save, save, saveAll, setBeanName, upload, upload, uploadMethods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
Constructor Details
-
ProcessRestRepository
public ProcessRestRepository()
-
-
Method Details
-
init
-
findOne
@PreAuthorize("hasPermission(#id, \'PROCESS\', \'READ\')") public ProcessRest findOne(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(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:
-
findByCurrentUser
@PreAuthorize("hasAuthority(\'AUTHENTICATED\')") public org.springframework.data.domain.Page<ProcessRest> findByCurrentUser(org.springframework.data.domain.Pageable pageable) -
getProcessBitstreams
public List<BitstreamRest> getProcessBitstreams(Integer processId) throws SQLException, 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 wrongAuthorizeException- If something goes wrong
-
getProcessBitstreamByType
public BitstreamRest getProcessBitstreamByType(Integer processId, String type) throws SQLException, 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 wrongAuthorizeException- If something goes wrong
-
delete
protected void delete(Context context, Integer integer) throws AuthorizeException, RepositoryMethodNotImplementedException Description 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:
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 SQLException Search 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
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<ProcessRest,Integer>
-