org.activemath.studentmodel2
Class AffectiveModelManager

java.lang.Object
  extended by org.activemath.studentmodel2.AffectiveModelManager

public class AffectiveModelManager
extends Object

Manages affective models for each user.


Field Summary
protected static Category log
           
 
Method Summary
 void clear()
          Clear all models, reset the complete affective model
 void createNewAffectiveModel(String userId)
           
 void destroyAffectiveModel(String userId)
          Removes an existing affective model of a user
 AffectiveModel getAffectiveModel(String userId)
           
static AffectiveModelManager getInstance()
           
 void handleResult(ExerciseResult r)
          Updates the affective model based on an exercise result (does nothing if the affective model is disabled)
 boolean hasModel(String userId)
           
 boolean isEnabled()
           
 void setAffectiveModel(String userId, AffectiveModel am)
          Stores an affective model for the specified user.
 void setEnabled(boolean enabled)
          Whether to enable or disable the affective model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Category log
Method Detail

getInstance

public static AffectiveModelManager getInstance()
Returns:
Returns the instance (singleton)

hasModel

public boolean hasModel(String userId)
Parameters:
userId -
Returns:
True if an affective model for this user is available

getAffectiveModel

public AffectiveModel getAffectiveModel(String userId)
Parameters:
userId -
Returns:
null if affective model does not exist, otherwise the affective model of the user

createNewAffectiveModel

public void createNewAffectiveModel(String userId)

setAffectiveModel

public void setAffectiveModel(String userId,
                              AffectiveModel am)
Stores an affective model for the specified user. Does nothing if the affective model is disabled.

Parameters:
userId -
am -
See Also:
isEnabled()

destroyAffectiveModel

public void destroyAffectiveModel(String userId)
Removes an existing affective model of a user

Parameters:
userId -

clear

public void clear()
Clear all models, reset the complete affective model


setEnabled

public void setEnabled(boolean enabled)
Whether to enable or disable the affective model

Parameters:
enabled -

isEnabled

public boolean isEnabled()
Returns:
True, if the affective model is enabled
See Also:
setEnabled(boolean)

handleResult

public void handleResult(ExerciseResult r)
Updates the affective model based on an exercise result (does nothing if the affective model is disabled)

Parameters:
r -
See Also:
isEnabled()