View Javadoc

1    package org.telscenter.pas.otrunk.skeleton.controllers;
2   
3   import org.telscenter.pas.otrunk.skeleton.steps.OTBrowseWeb;
4   import org.telscenter.pas.otrunk.skeleton.steps.OTStudentAssessment;
5   import org.telscenter.pas.steps.BrowseWeb;
6   import org.telscenter.pas.steps.JaxbQtiStudentAssessment;
7   
8   /***
9    * Controller for student assessment steps
10   * 
11   * @author aperritano
12   *
13   */
14  public class OTStudentAssessmentController extends OTAssessmentController {
15  
16  	public static Class[] realObjectClasses = { JaxbQtiStudentAssessment.class };
17  	public static Class otObjectClass = OTStudentAssessment.class;
18  
19  	
20  	//TODO: do not define these
21  	public void loadRealObject(Object realObject) {
22  		super.loadRealObject(realObject);
23  
24  		JaxbQtiStudentAssessment studentAssess = (JaxbQtiStudentAssessment) realObject;
25  		OTStudentAssessment otStudentAssess = (OTStudentAssessment) otObject;
26  		
27  		//property
28  		studentAssess.setIntroductionHtml(otStudentAssess.getIntroductionHtml());
29  	}
30  
31  	public void registerRealObject(Object realObject) {
32  	}
33  
34  	/***
35  	 * Saves the real object
36  	 */
37  	public void saveRealObject(Object realObject) {
38  		super.saveRealObject(realObject);
39  		
40  		JaxbQtiStudentAssessment studentAssess = (JaxbQtiStudentAssessment) realObject;
41  	
42  		OTStudentAssessment otStudentAssess = (OTStudentAssessment)otObject;
43  		
44  		otStudentAssess.setIntroductionHtml(studentAssess.getIntroductionHtml());
45  	}
46  
47  }