Interface SecureDeliveryModuleIfc
-
public interface SecureDeliveryModuleIfc- Author:
- Luis Camargo (lcamargo@respondus.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringdecryptPassword(String password)Decrypts the passoword passed as parameter.StringencryptPassword(String password)Encrypts the password passed as parameter.default Optional<String>getAlternativeDeliveryUrl(Long assessmentId, String uid)Returns an absolute URL to an alternative location to take the assessment.StringgetHTMLFragment(PublishedAssessmentIfc assessment, HttpServletRequest request, SecureDeliveryServiceAPI.Phase phase, SecureDeliveryServiceAPI.PhaseStatus status, Locale locale)Returns the HTML fragment to be inserted during deliveryStringgetInitialHTMLFragment(HttpServletRequest request, Locale locale)Returns the initial HTML fragment to be inserted on the assessment listdefault Optional<String>getInstructorReviewUrl(Long assessmentId, String studentId)Returns an absolute URL to an alternative location to review the student's taking of the proctored assessment.StringgetModuleName(Locale locale)StringgetTitleDecoration(Locale locale)booleaninitialize()This method is called by the SecureDeliveryService after the module is loaded from the plugin jar.booleanisEnabled()default booleanisEnabled(Long assessmentId)Returns whether the SecureDelivery service is implemented for this one assessment Some institutions may want to limit what assessments or sites are allowed to use the service.booleanvalidateContext(Object context)Validates the context object passed as parameter.SecureDeliveryServiceAPI.PhaseStatusvalidatePhase(SecureDeliveryServiceAPI.Phase phase, PublishedAssessmentIfc assessment, HttpServletRequest request)Validates the phase.
-
-
-
Method Detail
-
initialize
boolean initialize()
This method is called by the SecureDeliveryService after the module is loaded from the plugin jar.- Parameters:
logFactory-- Returns:
- true if the module initialized successfully. If this method returns false, the module won't be available for selection.
-
isEnabled
boolean isEnabled()
-
getTitleDecoration
String getTitleDecoration(Locale locale)
- Parameters:
locale-- Returns:
- the string for the given locale to be appended to the assessment title when the asssessment is configured to require the use of this module
-
validatePhase
SecureDeliveryServiceAPI.PhaseStatus validatePhase(SecureDeliveryServiceAPI.Phase phase, PublishedAssessmentIfc assessment, HttpServletRequest request)
Validates the phase.- Parameters:
phase-assessment-request-- Returns:
-
getInitialHTMLFragment
String getInitialHTMLFragment(HttpServletRequest request, Locale locale)
Returns the initial HTML fragment to be inserted on the assessment list- Parameters:
request-locale-- Returns:
-
getHTMLFragment
String getHTMLFragment(PublishedAssessmentIfc assessment, HttpServletRequest request, SecureDeliveryServiceAPI.Phase phase, SecureDeliveryServiceAPI.PhaseStatus status, Locale locale)
Returns the HTML fragment to be inserted during delivery- Parameters:
assessment-request-fragmentId- one of SecureDeliveryServiceAPI.SUCCESS_FRAGMENT or SecureDeliveryServiceAPI.FAILURE_FRAGMENTlocale-- Returns:
-
validateContext
boolean validateContext(Object context)
Validates the context object passed as parameter.- Parameters:
context-- Returns:
-
encryptPassword
String encryptPassword(String password)
Encrypts the password passed as parameter. The encryption method is up to the module implementation.- Parameters:
password-- Returns:
- the encrypted password
-
decryptPassword
String decryptPassword(String password)
Decrypts the passoword passed as parameter. The encryption method is up to the module implementation.- Parameters:
password-- Returns:
- the plain text password
-
getAlternativeDeliveryUrl
default Optional<String> getAlternativeDeliveryUrl(Long assessmentId, String uid)
Returns an absolute URL to an alternative location to take the assessment. For example, a cloud proctoring company could use this URL to embed the Samigo assessment in an iframe.- Parameters:
assessmentId-uid-- Returns:
-
getInstructorReviewUrl
default Optional<String> getInstructorReviewUrl(Long assessmentId, String studentId)
Returns an absolute URL to an alternative location to review the student's taking of the proctored assessment.- Parameters:
assessmentId-studentId- (internal user id)- Returns:
-
isEnabled
default boolean isEnabled(Long assessmentId)
Returns whether the SecureDelivery service is implemented for this one assessment Some institutions may want to limit what assessments or sites are allowed to use the service.- Parameters:
assessment-- Returns:
-
-