org.sakaiproject.contentreview.service
Interface ContentReviewService


public interface ContentReviewService

ContentReview Service manages submission to the Content review queue and retrieving reports from the service

Author:
David Jaka, David Horwitz

Method Summary
 boolean allowResubmission()
          Does the service support resubmissions?
 void checkForReports()
          Check for reports for all submitted items that don't have reports yet
 void createAssignment(String siteId, String taskId, Map extraAsnnOpts)
          This is a vendor specific method needed for some deep integrations (such as A2) to pre provision assignments on an external content checking system.
 List<ContentReviewItem> getAllContentReviewItems(String siteId, String taskId)
          This is a complement to getReportList, except that it returns all ContentReviewItems for a site and task, rather than just the ones whose reports have been completed.
 Map getAssignment(String siteId, String taskId)
          This is a vendor specific method to allow getting information about a particular assignment in an external plagiarism checking system.
 Date getDateQueued(String contextId)
          The date an item was queued
 Date getDateSubmitted(String contextId)
          The date an item was submitted to the queue
 String getIconUrlforScore(Long score)
          Get a icon URL that for a specific score
 String getLocalizedStatusMessage(String messageCode)
          Get a status message for a submission in the locale of the current user
 String getLocalizedStatusMessage(String messageCode, Locale locale)
          Get a status message for a submission in the locale specified
 String getLocalizedStatusMessage(String messageCode, String userRef)
          Get a status message for a submission in the locale of the specified user
 List<ContentReviewItem> getReportList(String siteId)
          Get a list of reports for all tasks in a site
 List<ContentReviewItem> getReportList(String siteId, String taskId)
          Get a list of reports for a task
 String getReviewError(String contentId)
          Deprecated. use getLocalizedStatusMessage(String)
 String getReviewReport(String contentId)
          Get the URL of the report
 String getReviewReportInstructor(String contentId)
          Get the URL for a report constructed for an Instructor
 String getReviewReportStudent(String contentId)
          Get the URL of a report constructed for a student
 int getReviewScore(String contentId)
          Retrieve a score for a specific item
 Long getReviewStatus(String contentId)
          Get the status of a submission
 String getServiceName()
          Return the Name of the Service Implementation for Display Purposes
 boolean isAcceptableContent(org.sakaiproject.content.api.ContentResource resource)
          Is the content resource of an type that can be accepted by the service implementation
 boolean isSiteAcceptable(org.sakaiproject.site.api.Site site)
          Can this site make use of the content review service
 void processQueue()
          Proccess all pending jobs in the Queue
 void queueContent(String userId, String siteId, String taskId, String contentId)
          Add an item to the Queue for Submission to Turnitin
 void removeFromQueue(String ContentId)
          Remove an item from the review Queue
 void resetUserDetailsLockedItems(String userId)
          Reset the Items for a specific user that where locked because of incomplete user details
 

Method Detail

queueContent

void queueContent(String userId,
                  String siteId,
                  String taskId,
                  String contentId)
                  throws QueueException
Add an item to the Queue for Submission to Turnitin

Parameters:
userID - if nulll current user is used
SiteId - is null current site is used
Entity - reference to the task this is for
Reference - to the content object that should be submitted
Throws:
QueueException

getReviewScore

int getReviewScore(String contentId)
                   throws QueueException,
                          ReportException,
                          Exception
Retrieve a score for a specific item

Parameters:
contentId -
Returns:
the origionality score
Throws:
QueueException
ReportException
Exception

getReviewReport

String getReviewReport(String contentId)
                       throws QueueException,
                              ReportException
Get the URL of the report

Parameters:
contentId -
Returns:
the url
Throws:
QueueException
ReportException - * * @deprecated since Nov 2007, use getReviewReportInstructor(String contentId) or getReviewReportInstructor(String contentId)

getReviewReportStudent

String getReviewReportStudent(String contentId)
                              throws QueueException,
                                     ReportException
Get the URL of a report constructed for a student

Parameters:
contentId -
Returns:
Throws:
QueueException
ReportException

getReviewReportInstructor

String getReviewReportInstructor(String contentId)
                                 throws QueueException,
                                        ReportException
Get the URL for a report constructed for an Instructor

Parameters:
contentId -
Returns:
Throws:
QueueException
ReportException

getReviewStatus

Long getReviewStatus(String contentId)
                     throws QueueException
Get the status of a submission

Parameters:
contentId -
Returns:
Throws:
QueueException

getDateQueued

Date getDateQueued(String contextId)
                   throws QueueException
The date an item was queued

Parameters:
contextId -
Returns:
Throws:
QueueException

getDateSubmitted

Date getDateSubmitted(String contextId)
                      throws QueueException,
                             SubmissionException
The date an item was submitted to the queue

Parameters:
contextId -
Returns:
Throws:
QueueException
SubmissionException

processQueue

void processQueue()
Proccess all pending jobs in the Queue


checkForReports

void checkForReports()
Check for reports for all submitted items that don't have reports yet


getReportList

List<ContentReviewItem> getReportList(String siteId,
                                      String taskId)
                                      throws QueueException,
                                             SubmissionException,
                                             ReportException
Get a list of reports for a task

Parameters:
siteId -
taskId -
Returns:
Throws:
QueueException
SubmissionException
ReportException

getReportList

List<ContentReviewItem> getReportList(String siteId)
                                      throws QueueException,
                                             SubmissionException,
                                             ReportException
Get a list of reports for all tasks in a site

Parameters:
siteId -
Returns:
Throws:
QueueException
SubmissionException
ReportException

getAllContentReviewItems

List<ContentReviewItem> getAllContentReviewItems(String siteId,
                                                 String taskId)
                                                 throws QueueException,
                                                        SubmissionException,
                                                        ReportException
This is a complement to getReportList, except that it returns all ContentReviewItems for a site and task, rather than just the ones whose reports have been completed. This is the result of running into leaky abstraction problems while working on Assignments 2, namely that we need to make the pretty little color coded bars for an entire class for a given assignment, and if some of them had issues we need to present a fine grained error message (such as, your paper was less than 2 paragraphs, or your paper was the wrong file type). This requires another property method, but rather than add a getErrorCode(String contentId) method it's more efficient to add this so we can get the whole lot in one DB query, rather than lookup the special case failures.

Parameters:
siteId -
taskId -
Returns:
Throws:
QueueException
SubmissionException
ReportException

getServiceName

String getServiceName()
Return the Name of the Service Implementation for Display Purposes


resetUserDetailsLockedItems

void resetUserDetailsLockedItems(String userId)
Reset the Items for a specific user that where locked because of incomplete user details

Parameters:
userId -

isAcceptableContent

boolean isAcceptableContent(org.sakaiproject.content.api.ContentResource resource)
Is the content resource of an type that can be accepted by the service implementation

Parameters:
resource -
Returns:

isSiteAcceptable

boolean isSiteAcceptable(org.sakaiproject.site.api.Site site)
Can this site make use of the content review service

Parameters:
site -
Returns:

getIconUrlforScore

String getIconUrlforScore(Long score)
Get a icon URL that for a specific score

Parameters:
score -
Returns:

allowResubmission

boolean allowResubmission()
Does the service support resubmissions?

Returns:

removeFromQueue

void removeFromQueue(String ContentId)
Remove an item from the review Queue

Parameters:
ContentId -

getLocalizedStatusMessage

String getLocalizedStatusMessage(String messageCode,
                                 String userRef)
Get a status message for a submission in the locale of the specified user

Parameters:
messageCode -
userRef -
Returns:

getLocalizedStatusMessage

String getLocalizedStatusMessage(String messageCode)
Get a status message for a submission in the locale of the current user

Parameters:
messageCode -
Returns:

getReviewError

String getReviewError(String contentId)
Deprecated. use getLocalizedStatusMessage(String)

Get a error report for a Specific method

Parameters:
contentId -
Returns:

getLocalizedStatusMessage

String getLocalizedStatusMessage(String messageCode,
                                 Locale locale)
Get a status message for a submission in the locale specified

Parameters:
messageCode -
locale -
Returns:

getAssignment

Map getAssignment(String siteId,
                  String taskId)
                  throws SubmissionException,
                         TransientSubmissionException
This is a vendor specific method to allow getting information about a particular assignment in an external plagiarism checking system. The method returns a Map of keys and properties since they may differ between implementations. In the Turnitin implementation this provides all the return information that comes over the wire from their Fid4 Fcmd7 function which can be referenced from their API Documentation. This method may be necessary for deeper integrations (A2), but could tie your code to a particular implementation.

Parameters:
siteId -
taskId -
Returns:
Throws:
SubmissionException
TransientSubmissionException

createAssignment

void createAssignment(String siteId,
                      String taskId,
                      Map extraAsnnOpts)
                      throws SubmissionException,
                             TransientSubmissionException
This is a vendor specific method needed for some deep integrations (such as A2) to pre provision assignments on an external content checking system. The method takes in a Map which can take varying keys and values depending on implementation. For the Turnitin implementation these keys map to some input parameters for Fid4 Fcmd 2/3. These can be seen in Turnitin's API documentation. Using this method will likely tie you to a particular Content Review implementation.

Parameters:
siteId -
taskId -
extraAsnnOpts -
Throws:
SubmissionException
TransientSubmissionException


Copyright © 2003-2013 Sakai Project. All Rights Reserved.