org.activemath.webapp.ws.delegation.siette
Class SietteDelegation

java.lang.Object
  extended by org.activemath.webapp.ws.delegation.DelegationGuide
      extended by org.activemath.webapp.ws.delegation.siette.SietteDelegation

public class SietteDelegation
extends DelegationGuide

Siette Delegation Logic Implemented independently of parent DelegationGuide for now to get a workable review demo....


Nested Class Summary
 
Nested classes/interfaces inherited from class org.activemath.webapp.ws.delegation.DelegationGuide
DelegationGuide.GuideService
 
Field Summary
protected  URL activityServerUrl
           
protected  org.apache.xmlrpc.XmlRpcClient activityServiceClient
           
protected  URL guideServiceUrl
           
protected static org.apache.commons.logging.Log log
           
protected  String pathToComeBack
           
protected  String resourceActivityId
           
static String SIETTE_DELEGATION_GUIDE
           
protected  SietteCallback sietteCallback
           
protected  String userName
           
 
Fields inherited from class org.activemath.webapp.ws.delegation.DelegationGuide
activityFinished, currentStatus, guideService, lastModified, score
 
Constructor Summary
SietteDelegation(URL activityServerUrl, String activityId, String userName, String pathToComeBack, AppSession appSession)
          Constructs a delegation-guide which stores params and registers itself.
 
Method Summary
protected  Map activityFinished(Hashtable args)
          Called by the activity server through SietteCallback xml-rpc
 URL cancelActivity()
           
 void checkAvailability()
           
 List getAssessmentResult()
           
 String getLanguage()
           
protected  URL getUrlToComeBack()
           
 User getUser()
           
 String giveURLAfterExerciseFinished(double score)
           
protected  void removeGuideService()
           
 URL sendWishToStart()
          Invokes the start for delegation and returns the URL to send the learner to as well.
 void setLanguage(String language)
           
 void setPathToComeBack(String path)
           
 void setUser(User user)
           
 
Methods inherited from class org.activemath.webapp.ws.delegation.DelegationGuide
createGuideService, getCurrentStatus, getLastModified, getScore, isActivityFinished, updateStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

SIETTE_DELEGATION_GUIDE

public static final String SIETTE_DELEGATION_GUIDE
See Also:
Constant Field Values

activityServerUrl

protected URL activityServerUrl

resourceActivityId

protected String resourceActivityId

userName

protected String userName

pathToComeBack

protected String pathToComeBack

guideServiceUrl

protected URL guideServiceUrl

sietteCallback

protected SietteCallback sietteCallback

activityServiceClient

protected org.apache.xmlrpc.XmlRpcClient activityServiceClient
Constructor Detail

SietteDelegation

public SietteDelegation(URL activityServerUrl,
                        String activityId,
                        String userName,
                        String pathToComeBack,
                        AppSession appSession)
Constructs a delegation-guide which stores params and registers itself.

Parameters:
activityServerUrl - the URL to the activity server
activityId - the ID of the activity to be started
userName - the user-name with which ity will happen
pathToComeBack - the relative url-to-come-back if already known (relative to the service-URL) (??)
Method Detail

getLanguage

public String getLanguage()

setLanguage

public void setLanguage(String language)

setUser

public void setUser(User user)

getUser

public User getUser()

getAssessmentResult

public List getAssessmentResult()

sendWishToStart

public URL sendWishToStart()
Invokes the start for delegation and returns the URL to send the learner to as well.

Overrides:
sendWishToStart in class DelegationGuide
Returns:

activityFinished

protected Map activityFinished(Hashtable args)
Called by the activity server through SietteCallback xml-rpc

Overrides:
activityFinished in class DelegationGuide
Parameters:
args - should contain: user resourceId score
Returns:
a map with at least urlToComeBack (to be resolved along the URL to call the service here)

checkAvailability

public void checkAvailability()
                       throws org.apache.xmlrpc.XmlRpcException
Overrides:
checkAvailability in class DelegationGuide
Throws:
org.apache.xmlrpc.XmlRpcException

cancelActivity

public URL cancelActivity()
Overrides:
cancelActivity in class DelegationGuide

setPathToComeBack

public void setPathToComeBack(String path)
Overrides:
setPathToComeBack in class DelegationGuide

getUrlToComeBack

protected URL getUrlToComeBack()
Overrides:
getUrlToComeBack in class DelegationGuide

giveURLAfterExerciseFinished

public String giveURLAfterExerciseFinished(double score)
Returns:
The URL that informs Siette of the result of the last exercise and asks it to perform the next exercise

removeGuideService

protected void removeGuideService()
Overrides:
removeGuideService in class DelegationGuide