1 package org.telscenter.pas.steps.actions; 2 3 import java.awt.event.ActionEvent; 4 import java.util.HashMap; 5 import java.util.Map; 6 7 import net.sf.sail.core.entity.ISock; 8 9 import org.imsglobal.xsd.imsqti_v2p0.AssessmentItemType; 10 import org.imsglobal.xsd.imsqti_v2p0.ResponseDeclarationType; 11 import org.telscenter.pas.steps.JaxbQtiStep; 12 13 14 /*** 15 * TODO revisit the factoring of this 16 * 17 * @author aperritano, turadg 18 */ 19 public class JaxbQtiNoteSaveAction extends NoteSaveAction { 20 21 private AssessmentItemType assessmentItem; 22 23 private Map<ResponseDeclarationType, ISock<String>> responseDeclarationToSocks = new HashMap<ResponseDeclarationType, ISock<String>>(); 24 25 private Map<String, Object> responses = new HashMap<String, Object>(); 26 27 public JaxbQtiNoteSaveAction(AssessmentItemType assessmentItem, Map<String, Object> responses, Map<ResponseDeclarationType, ISock<String>> responseDeclarationToSocks) { 28 this.assessmentItem = assessmentItem; 29 this.responses = responses; 30 this.responseDeclarationToSocks = responseDeclarationToSocks; 31 } 32 33 public void actionPerformed(ActionEvent e) { 34 super.actionPerformed(e); 35 } 36 37 public boolean isSaved() { 38 return saved; 39 } 40 41 /*** 42 * Saves all the responses to rims 43 * 44 * @param clientProperty 45 */ 46 protected void doSave() { 47 JaxbQtiStep.saveAssessmentItem(assessmentItem, responses, responseDeclarationToSocks); 48 } 49 50 }