public abstract class BaseContentReviewService extends Object implements ContentReviewService
| Modifier and Type | Class and Description |
|---|---|
static interface |
BaseContentReviewService.LastErrorUpdater
Functional interface for updateLastError
|
| Modifier and Type | Field and Description |
|---|---|
protected PreferencesService |
preferencesService |
protected ServerConfigurationService |
serverConfigurationService |
| Constructor and Description |
|---|
BaseContentReviewService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowSubmissionsOnBehalf() |
protected Object |
createFormattedMessageXML(Document document,
String key,
Object... args)
Creates XML that represents calls to ResourceLoader.getFormattedMessage().
|
protected String |
createLastError(BaseContentReviewService.LastErrorUpdater leu)
Create's an XML model that represents calls to ResourceLoader.getFormattedMessage(...).
|
String |
getLocalizedLastError(ContentReviewItem item) |
protected ResourceLoader |
getResourceLoader()
The Resource Loader specific to the content-review service implementation
|
protected String |
getResourceLoaderName()
Gets the name of the resource loader's file.
|
String |
getReviewReport(String contentId,
String assignmentRef,
String userId) |
String |
getReviewReportInstructor(String contentId,
String assignmentRef,
String userId) |
String |
getReviewReportRedirectUrl(String contentId,
String assignmentRef,
String userId,
String contextId,
boolean isInstructor) |
String |
getReviewReportStudent(String contentId,
String assignmentRef,
String userId) |
Instant |
getUserEULATimestamp(String userId) |
String |
getUserEULAVersion(String userId) |
String |
getWebhookUrl(Optional<String> customParam) |
protected void |
setLastError(ContentReviewItem item,
BaseContentReviewService.LastErrorUpdater leu)
Sets the ContentReviewItem's lastError property to the result of createLastError(leu).
|
protected void |
setLastError(ContentReviewItem item,
Exception e)
Convenience method:
If the Exception is an instance of ContentReviewProviderException, the item's lastError is set to the exception's I18nXml;
otherwise it falls back to getLocalizedMessage()
|
protected void |
setLastError(ContentReviewItem item,
Exception e,
BaseContentReviewService.LastErrorUpdater leu)
If the Exception is an instance of ContentReviewProviderException, the item's lastError is set to the exception's I18nXml;
otherwise it falls back to leu;
if leu is null, it falls back to getLocalizedMessage()
|
void |
updateUserEULATimestamp(String userId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallowAllContent, allowResubmission, checkForReports, createAssignment, getAcceptableExtensionsToMimeTypes, getAcceptableFileTypesToExtensions, getAllContentReviewItems, getAssignment, getContentReviewItemByContentId, getDateQueued, getDateSubmitted, getEndUserLicenseAgreementLink, getEndUserLicenseAgreementTimestamp, getEndUserLicenseAgreementVersion, getIconCssClassforScore, getLocalizedStatusMessage, getLocalizedStatusMessage, getLocalizedStatusMessage, getProviderId, getReportList, getReportList, getReviewError, getReviewScore, getReviewStatus, getServiceName, isAcceptableContent, isSiteAcceptable, processQueue, queueContent, removeFromQueue, resetUserDetailsLockedItems, syncRosters, webhookEventprotected PreferencesService preferencesService
protected ServerConfigurationService serverConfigurationService
public Instant getUserEULATimestamp(String userId)
getUserEULATimestamp in interface ContentReviewServicepublic String getUserEULAVersion(String userId)
getUserEULAVersion in interface ContentReviewServicepublic void updateUserEULATimestamp(String userId)
updateUserEULATimestamp in interface ContentReviewServicepublic String getReviewReport(String contentId, String assignmentRef, String userId) throws QueueException, ReportException
getReviewReport in interface ContentReviewServiceQueueExceptionReportExceptionpublic String getReviewReportInstructor(String contentId, String assignmentRef, String userId) throws QueueException, ReportException
getReviewReportInstructor in interface ContentReviewServiceQueueExceptionReportExceptionpublic String getReviewReportStudent(String contentId, String assignmentRef, String userId) throws QueueException, ReportException
getReviewReportStudent in interface ContentReviewServiceQueueExceptionReportExceptionpublic String getReviewReportRedirectUrl(String contentId, String assignmentRef, String userId, String contextId, boolean isInstructor)
getReviewReportRedirectUrl in interface ContentReviewServiceprotected Object createFormattedMessageXML(Document document, String key, Object... args)
protected void setLastError(ContentReviewItem item, BaseContentReviewService.LastErrorUpdater leu)
protected void setLastError(ContentReviewItem item, Exception e)
protected void setLastError(ContentReviewItem item, Exception e, BaseContentReviewService.LastErrorUpdater leu)
protected String createLastError(BaseContentReviewService.LastErrorUpdater leu)
public String getLocalizedLastError(ContentReviewItem item)
getLocalizedLastError in interface ContentReviewServiceprotected ResourceLoader getResourceLoader()
protected String getResourceLoaderName()
public boolean allowSubmissionsOnBehalf()
allowSubmissionsOnBehalf in interface ContentReviewServiceCopyright © 2003–2020 Sakai Project. All rights reserved.