Class WorkflowItemRestRepository

    • Field Detail

      • xmlWorkflowItemService

        @Autowired
        protected org.dspace.xmlworkflow.storedcomponents.service.XmlWorkflowItemService xmlWorkflowItemService
      • workflowFactory

        @Autowired
        protected org.dspace.xmlworkflow.factory.XmlWorkflowFactory workflowFactory
    • Constructor Detail

      • WorkflowItemRestRepository

        public WorkflowItemRestRepository()
                                   throws org.dspace.app.util.SubmissionConfigReaderException
        Throws:
        org.dspace.app.util.SubmissionConfigReaderException
    • Method Detail

      • findOne

        @PreAuthorize("hasPermission(#id, \'WORKFLOWITEM\', \'READ\')")
        public WorkflowItemRest 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<WorkflowItemRest,​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<WorkflowItemRest> 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<WorkflowItemRest,​Integer>
        Parameters:
        context - the dspace context
        pageable - object embedding the requested pagination info
        Returns:
      • findBySubmitter

        @PreAuthorize("hasAuthority(\'ADMIN\')")
        public org.springframework.data.domain.Page<WorkflowItemRest> findBySubmitter​(UUID submitterID,
                                                                                      org.springframework.data.domain.Pageable pageable)
      • createAndReturn

        protected WorkflowItemRest createAndReturn​(org.dspace.core.Context context,
                                                   List<String> stringList)
        Description copied from class: DSpaceRestRepository
        Method to implement to support the creation of a new instance. Usually require to retrieve the http request from the thread bound attribute
        Overrides:
        createAndReturn in class DSpaceRestRepository<WorkflowItemRest,​Integer>
        Parameters:
        context - the dspace context
        stringList - The list of Strings that will be used as data for the object that's to be created This list is retrieved from the uri-list body
        Returns:
        the created REST object
      • patch

        public void patch​(org.dspace.core.Context context,
                          javax.servlet.http.HttpServletRequest request,
                          String apiCategory,
                          String model,
                          Integer id,
                          Patch patch)
                   throws SQLException,
                          org.dspace.authorize.AuthorizeException
        Description copied from class: DSpaceRestRepository
        Method to implement to allow partial update of the REST object via JSON Patch
        Overrides:
        patch in class DSpaceRestRepository<WorkflowItemRest,​Integer>
        request - the http request
        id - the ID of the target REST object
        patch - the JSON Patch (https://tools.ietf.org/html/rfc6902) operation
        Throws:
        SQLException
        org.dspace.authorize.AuthorizeException
      • findByItemUuid

        public WorkflowItemRest findByItemUuid​(UUID itemUuid,
                                               org.springframework.data.domain.Pageable pageable)
        This is a search method that will return the WorkflowItemRest object found through the UUID of an item. It'll find the Item through the given UUID and try to resolve the WorkflowItem relevant for that item and return it. It'll return a 401/403 if the current user isn't allowed to view the WorkflowItem. It'll return a 204 if nothing was found
        Parameters:
        itemUuid - The UUID for the Item to be used
        pageable - The pageable if present
        Returns:
        The resulting WorkflowItemRest object