Class ProcessRestRepository

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, 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
    • Constructor Detail

      • ProcessRestRepository

        public ProcessRestRepository()
    • Method Detail

      • findAll

        @PreAuthorize("hasAuthority(\'ADMIN\')")
        public org.springframework.data.domain.Page<ProcessRest> findAll​(Context context,
                                                                         org.springframework.data.domain.Pageable pageable)
        Description copied from class: DSpaceRestRepository
        Method to implement to support scroll of entity instances from the collection resource endpoint
        Specified by:
        findAll in class DSpaceRestRepository<ProcessRest,​Integer>
        Parameters:
        context - the dspace context
        pageable - 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 wrong
        AuthorizeException - 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 used
        type - 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 wrong
        AuthorizeException - If something goes wrong
      • 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 of ProcessRest objects based on the Process objects that were in the databank that adhere to these params
        Parameters:
        ePersonUuid - The UUID for the EPerson that started the Process
        scriptName - The name of the Script for which the Process belongs to
        processStatusString - The status of the Process
        pageable - The pageable
        Returns:
        A page of ProcessRest objects adhering to the params
        Throws:
        SQLException - If something goes wrong