Skip to content
Snippets Groups Projects
Commit 8391fea8 authored by Julian Hochstetter's avatar Julian Hochstetter
Browse files

Task #4040: getUserAnswer: add JavaDoc

parent 70bfd7c6
Branches
Tags
No related merge requests found
...@@ -35,6 +35,7 @@ import org.springframework.web.bind.annotation.ResponseBody; ...@@ -35,6 +35,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import de.thm.arsnova.entities.Answer; import de.thm.arsnova.entities.Answer;
import de.thm.arsnova.entities.Question; import de.thm.arsnova.entities.Question;
import de.thm.arsnova.exceptions.ForbiddenException;
import de.thm.arsnova.exceptions.NotFoundException; import de.thm.arsnova.exceptions.NotFoundException;
import de.thm.arsnova.services.IQuestionService; import de.thm.arsnova.services.IQuestionService;
import de.thm.arsnova.services.IUserService; import de.thm.arsnova.services.IUserService;
...@@ -129,6 +130,19 @@ public class QuestionController extends AbstractController { ...@@ -129,6 +130,19 @@ public class QuestionController extends AbstractController {
return answers; return answers;
} }
/**
* returns a JSON document which represents the given answer of a question.
* @param sessionKey
* Session Keyword to which the question belongs to
* @param questionId
* CouchDB Question ID for which the given answer should be
* retrieved
* @return JSON Document of {@link Answer} or {@link NotFoundException}
* @throws NotFoundException if
* wrong session, wrong question or no answer was given by the
* current user
* @throws ForbiddenException if not logged in
*/
@RequestMapping(value="/session/{sessionKey}/question/{questionId}/myanswer", method=RequestMethod.GET) @RequestMapping(value="/session/{sessionKey}/question/{questionId}/myanswer", method=RequestMethod.GET)
@ResponseBody @ResponseBody
public Answer getMyAnswer(@PathVariable String sessionKey, @PathVariable String questionId, HttpServletResponse response) { public Answer getMyAnswer(@PathVariable String sessionKey, @PathVariable String questionId, HttpServletResponse response) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment