org.sakaiproject.tool.assessment.data.ifc.assessment
Interface SecureDeliveryModuleIfc


public interface SecureDeliveryModuleIfc

Author:
Luis Camargo (lcamargo@respondus.com)

Method Summary
 String decryptPassword(String password)
          Decrypts the passoword passed as parameter.
 String encryptPassword(String password)
          Encrypts the password passed as parameter.
 String getHTMLFragment(PublishedAssessmentIfc assessment, javax.servlet.http.HttpServletRequest request, SecureDeliveryServiceAPI.Phase phase, SecureDeliveryServiceAPI.PhaseStatus status, Locale locale)
          Returns the HTML fragment to be inserted during delivery
 String getInitialHTMLFragment(javax.servlet.http.HttpServletRequest request, Locale locale)
          Returns the initial HTML fragment to be inserted on the assessment list
 String getModuleName(Locale locale)
           
 String getTitleDecoration(Locale locale)
           
 boolean initialize()
          This method is called by the SecureDeliveryService after the module is loaded from the plugin jar.
 boolean isEnabled()
           
 boolean validateContext(Object context)
          Validates the context object passed as parameter.
 SecureDeliveryServiceAPI.PhaseStatus validatePhase(SecureDeliveryServiceAPI.Phase phase, PublishedAssessmentIfc assessment, javax.servlet.http.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()

getModuleName

String getModuleName(Locale locale)

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,
                                                   javax.servlet.http.HttpServletRequest request)
Validates the phase.

Parameters:
phase -
assessment -
request -
Returns:

getInitialHTMLFragment

String getInitialHTMLFragment(javax.servlet.http.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,
                       javax.servlet.http.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_FRAGMENT
locale -
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


Copyright © 2005-2012 Sakai Project. All Rights Reserved.