Class AnswerController

java.lang.Object
com.amos2020.javabackend.rest_service.controller.AnswerController

@Service
public class AnswerController
extends java.lang.Object
  • Field Details

  • Constructor Details

  • Method Details

    • getAllAnswersByInterviewId

      public java.util.List<BasicAnswerResponse> getAllAnswersByInterviewId​(int interviewId) throws javassist.NotFoundException
      Get all answers for an interview
      Parameters:
      interviewId - int
      Returns:
      List of Answers
      Throws:
      javassist.NotFoundException - If interview can not be found
    • getAllAnswers

      public java.util.List<BasicAnswerResponse> getAllAnswers() throws java.lang.Exception
      Get all answers
      Returns:
      List of Answers
      Throws:
      java.lang.Exception
    • getAnswerByIds

      public BasicAnswerResponse getAnswerByIds​(int interviewId, int questionId) throws javassist.NotFoundException
      Get an answer by interview id and question id
      Parameters:
      interviewId - int
      questionId - int
      Returns:
      Answer
      Throws:
      javassist.NotFoundException - If interview id or question id is invalid and can not be found
    • createAnswer

      public BasicAnswerResponse createAnswer​(int interviewId, int questionId) throws javassist.NotFoundException
      Create a new answer
      Parameters:
      interviewId - int
      questionId - int
      Returns:
      Created Answer
      Throws:
      javassist.NotFoundException - If interview or question can not be found
    • updateAnswer

      public BasicAnswerResponse updateAnswer​(int interviewId, int questionId, java.lang.Boolean result, java.lang.Boolean responsible, java.lang.Boolean documentation, java.lang.Boolean procedure, java.lang.String reason, java.lang.String proof, java.lang.String annotation) throws javassist.NotFoundException
      Update an existing answer
      Parameters:
      interviewId - int
      questionId - int
      result - bool
      responsible - bool
      documentation - bool
      procedure - bool
      reason - String
      proof - String
      annotation - String
      Returns:
      Updated Answer
      Throws:
      javassist.NotFoundException - If an id is invalid and can not be found