vle.web
Class VLEAnnotationController
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
vle.web.VLEAnnotationController
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class VLEAnnotationController
- extends javax.servlet.http.HttpServlet
Controllers for handling Annotation GET and POST
- Author:
- hirokiterashima, geoffreykwan
- See Also:
- Serialized Form
|
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
doGetJSON(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle GETing of Annotations. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
static Annotation |
getCRaterAnnotation(Long nodeStateId,
String runId,
Long stepWorkId,
String annotationType,
String cRaterScoringUrl,
String cRaterClientId)
Returns a CRater Annotation based on parameters, if exists. |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VLEAnnotationController
public VLEAnnotationController()
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
doGetJSON
public void doGetJSON(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Handle GETing of Annotations.
This includes GETing CRater Annotations, which involves POSTing to the
CRater server (if needed).
- Parameters:
request - response -
- Throws:
javax.servlet.ServletException
IOException
getCRaterAnnotation
public static Annotation getCRaterAnnotation(Long nodeStateId,
String runId,
Long stepWorkId,
String annotationType,
String cRaterScoringUrl,
String cRaterClientId)
- Returns a CRater Annotation based on parameters, if exists. If not, makes a request to the
CRater server to get automated feedback and saves it as an Annotation.
Also updates/appends to an already-existing CRater Annotation if needed.
- Parameters:
request - runId - stepWorkIdStr - annotationType - cRaterScoringUrl - cRaterClientId - stepWorkId -
- Returns:
- CRater annotation for the specified stepwork, or null if there was an error getting the CRater response
Copyright © 2012. All Rights Reserved.