Class ProcessRestRepository

    • Constructor Detail

      • ProcessRestRepository

        public ProcessRestRepository()
    • Method Detail

      • findOne

        @PreAuthorize("hasPermission(#id, \'PROCESS\', \'READ\')")
        public ProcessRest findOne​(org.dspace.core.Context context,
                                   Integer id)
        Description copied from class: DSpaceRestRepository
        Method to implement to support retrieval of a specific REST object instance
        Specified by:
        findOne in class DSpaceRestRepository<ProcessRest,​Integer>
        Parameters:
        context - the dspace context
        id - 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: 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:
      • 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 wrong
        org.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 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
        org.dspace.authorize.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