Interface QuestionAnswerService
-
public interface QuestionAnswerService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description QuestionContractfindQuestionById(Long id)This method finds a Question by id.QuestionnaireContractfindQuestionnaireById(Long id)This method finds a Questionnaire by id.StringgetAnswerDescription(Long answerId)This service retrieves the description of an answer.booleanisAnswerDescriptionRetrievalSupported(Long answerId)This method returns true if a answer description retrieval is supported for a specific answer.
-
-
-
Method Detail
-
getAnswerDescription
String getAnswerDescription(Long answerId)
This service retrieves the description of an answer. If the answer id is null, this method will throw anIllegalArgumentException. This method, only supports retrieving descriptions whereisAnswerDescriptionRetrievalSupported(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 nullUnsupportedOperationException- 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 anIllegalArgumentException.- 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 anIllegalArgumentException.- 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 anIllegalArgumentException.- Parameters:
id- the questionnaire id- Returns:
- Questionnaire or null
- Throws:
IllegalArgumentException- if the Questionnaire id is null
-
-