Interface ContentReviewQueueService


  • public interface ContentReviewQueueService
    • Method Detail

      • queueContent

        void queueContent​(Integer providerId,
                          String userId,
                          String siteId,
                          String taskId,
                          List<org.sakaiproject.content.api.ContentResource> content)
                   throws QueueException
        Queue a content item that will later be sent to the content review service when the Content Review Process Job is run.
        Parameters:
        providerId - the id of content review implementation
        userId - the user id associated with the item to be reviewed
        siteId - the site id associated with the item to be reviewed
        taskId - the task id associated with the item to reviewed
        content - a java.util.List of the items to be reviewed
        Throws:
        QueueException
      • getReviewStatus

        @Deprecated
        Long getReviewStatus​(Integer providerId,
                             String contentId)
                      throws QueueException
        Deprecated.
        Use getQueuedItem method to get ContentReviewItem object
        Get the current status of the content item org.sakaiproject.contentreview.dao.ContentReviewConstants
        Parameters:
        providerId - the id of content review implementation
        contentId - the id of the content item
        Returns:
        a java.lang.Long
        Throws:
        QueueException
      • getDateQueued

        @Deprecated
        Date getDateQueued​(Integer providerId,
                           String contentId)
                    throws QueueException
        Deprecated.
        Use getQueuedItem method to get ContentReviewItem object
        Get when the content item was first queued.
        Parameters:
        providerId - the id of content review implementation
        contentId - the id of the content item
        Returns:
        a java.util.Date
        Throws:
        QueueException
      • getContentReviewItems

        List<ContentReviewItem> getContentReviewItems​(Integer providerId,
                                                      String siteId,
                                                      String taskId)
        Get the items for a site or a task.
        Parameters:
        providerId - the id of content review implementation
        siteId - the site id associated with the item to be reviewed
        taskId - the task id associated with the item to reviewed
        Returns:
        a java.util.List<ContentReviewItem>
      • getQueuedItem

        Optional<ContentReviewItem> getQueuedItem​(Integer providerId,
                                                  String contentId)
        Get an item that has been queued and contentId.
        Parameters:
        providerId - the id of content review implementation
        contentId - the id of the content item
        Returns:
        Optional<ContentReviewItem>
      • getQueuedItemByExternalId

        Optional<ContentReviewItem> getQueuedItemByExternalId​(Integer providerId,
                                                              String externalId)
        Get an item that has been queued via external ID.
        Parameters:
        providerId - the id of content review implementation
        externalId - the external id of the content item
        Returns:
        Optional<ContentReviewItem>
      • getQueuedNotSubmittedItems

        List<ContentReviewItem> getQueuedNotSubmittedItems​(Integer providerId)
        Get items queued but have not yet been submitted to the content review service
        Parameters:
        providerId - the id of content review implementation
        Returns:
        List<ContentReviewItem>
      • getNextItemInQueueToSubmit

        Optional<ContentReviewItem> getNextItemInQueueToSubmit​(Integer providerId)
        Get the next item in the queue to be submitted to the content review service
        Parameters:
        providerId - the id of content review implementation
        Returns:
        Optional<ContentReviewItem>
      • getAwaitingReports

        List<ContentReviewItem> getAwaitingReports​(Integer providerId)
        Get items awaiting a report from the content review service
        Parameters:
        providerId - the id of content review implementation
        Returns:
        List<ContentReviewItem>
      • resetUserDetailsLockedItems

        void resetUserDetailsLockedItems​(Integer providerId,
                                         String userId)
        Sets the items to be retried for a specific user and a status of ContentReviewConstants
        Parameters:
        providerId - the id of content review implementation
        userId - the user id for which items to reset
      • removeFromQueue

        void removeFromQueue​(Integer providerId,
                             String contentId)
        Remove an item from queue
        Parameters:
        providerId - the id of content review implementation
        contentId - the id of the content item
      • getAllContentReviewItemsGroupedBySiteAndTask

        List<ContentReviewItem> getAllContentReviewItemsGroupedBySiteAndTask​(Integer providerId)
        Gets all items grouped by site and task
        Parameters:
        providerId - the id of content review implementation
        Returns:
        List<ContentReviewItem>
      • getContentReviewItemsGroupedBySite

        List<String> getContentReviewItemsGroupedBySite​(Integer providerId)
        Gets all items grouped by site, order by most recent items descending
        Parameters:
        providerId - the id of content review implementation
        Returns:
        List<String> list containing siteIds ordered by most recently used sites