Interface QuestionAnswerService


public interface QuestionAnswerService
  • Method Details

    • getAnswerDescription

      String getAnswerDescription(Long answerId)
      This service retrieves the description of an answer. If the answer id is null, this method will throw an IllegalArgumentException. This method, only supports retrieving descriptions where isAnswerDescriptionRetrievalSupported(Long) returns true. Note: that some answer may not have a description configured. This can result in a null return value.
      Parameters:
      answerId - the answer id. Cannot be null.
      Returns:
      the description or null
      Throws:
      IllegalArgumentException - if the answer id is null
      UnsupportedOperationException - if description retrieval is not supported
    • isAnswerDescriptionRetrievalSupported

      boolean isAnswerDescriptionRetrievalSupported(Long answerId)
      This method returns true if a answer description retrieval is supported for a specific answer. If the answer id is null, this method will throw an IllegalArgumentException.
      Parameters:
      answerId - the answer id. Cannot be null
      Returns:
      true if answer description retrieval is supported
      Throws:
      IllegalArgumentException - if the answer id is null
    • findQuestionnaireById

      QuestionnaireContract findQuestionnaireById(Long id)
      This method finds a Questionnaire by id. If no Questionnaire is found, then null is returned If the questionnaire id is null, this method will throw an IllegalArgumentException.
      Parameters:
      id - the questionnaire id
      Returns:
      Questionnaire or null
      Throws:
      IllegalArgumentException - if the Questionnaire id is null
    • findQuestionById

      QuestionContract findQuestionById(Long id)
      This method finds a Question by id. If no Question is found, then null is returned If the question id is null, this method will throw an IllegalArgumentException.
      Parameters:
      id - the questionnaire id
      Returns:
      Questionnaire or null
      Throws:
      IllegalArgumentException - if the Questionnaire id is null