View Javadoc

1   /***
2    * Copyright (c) 2007 Regents of the University of California (Regents). Created
3    * by TELS, Graduate School of Education, University of California at Berkeley.
4    *
5    * This software is distributed under the GNU Lesser General Public License, v2.
6    *
7    * Permission is hereby granted, without written agreement and without license
8    * or royalty fees, to use, copy, modify, and distribute this software and its
9    * documentation for any purpose, provided that the above copyright notice and
10   * the following two paragraphs appear in all copies of this software.
11   *
12   * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
13   * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
14   * PURPOSE. THE SOFTWAREAND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED
15   * HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE
16   * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17   *
18   * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
19   * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
20   * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
21   * REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22   */
23  package org.telscenter.pas.service;
24  
25  import net.sf.sail.core.beans.Pod;
26  import net.sf.sail.core.entity.IAgent;
27  import net.sf.sail.core.entity.Rim;
28  
29  import org.telscenter.pas.steps.domain.PlainTextTeacherComments;
30  import org.telscenter.pas.steps.domain.TeacherComments;
31  
32  /***
33   * Provides interface for accessing teacher's comments to the student
34   * 
35   * @author Hiroki Terashima
36   * @version $Id: $
37   */
38  public class TeacherCommentsService {
39  
40  	/***
41  	 * @param rim the rim to get the comments from
42  	 * @param agent
43  	 * @return TeacherComments
44  	 */
45  	public TeacherComments getTeacherComments(Rim<String> rim, IAgent agent) {
46  		// TODO: Hiroki T implement this method once Scott C. makes 
47  		// data available in rim/sock
48  
49  		// below is dummy implementation
50  		TeacherComments comments = new PlainTextTeacherComments();
51  		comments.setValue("[RIM] Hi there. I think you totally misread the instructions. " +
52  				"Please re-do this problem.");
53  		return comments;
54  	}
55  	
56  	/***
57  	 * @param pod the pod to get the comments from
58  	 * @param agent
59  	 * @return TeacherComments
60  	 */	
61  	public TeacherComments getTeacherComments(Pod pod, IAgent agent) {
62  		// TODO: Hiroki T implement this method once Scott C. makes 
63  		// data available in rim/sock
64  
65  		// below is dummy implementation
66  		TeacherComments comments = new PlainTextTeacherComments();
67  		comments.setValue("[POD] Hi there. I think you totally misread the instructions. " +
68  				"Please re-do this problem.");
69  		return comments;		
70  	}
71  }