Package org.ametys.plugins.survey.answer
Class ProcessInputAction.SurveyInputAnswer
- java.lang.Object
-
- org.ametys.plugins.survey.data.SurveyAnswer
-
- org.ametys.plugins.survey.answer.ProcessInputAction.SurveyInputAnswer
-
- Enclosing class:
- ProcessInputAction
public class ProcessInputAction.SurveyInputAnswer extends SurveyAnswer
Class representing a survey answer, i.e. the response of a user to a question of the survey.
-
-
Field Summary
Fields Modifier and Type Field Description protected SurveyQuestion
_question
The question.protected Map<String,Set<String>>
_values
The answer values.-
Fields inherited from class org.ametys.plugins.survey.data.SurveyAnswer
_questionId, _value
-
-
Constructor Summary
Constructors Constructor Description SurveyInputAnswer()
Build a SurveyAnswer object.SurveyInputAnswer(SurveyQuestion question, Map<String,Set<String>> values)
Build a SurveyAnswer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SurveyQuestion
getQuestion()
Get the question.String
getQuestionId()
Get the questionId.String
getValue()
Get the value.Map<String,Set<String>>
getValuesMap()
Get the values.void
setQuestion(SurveyQuestion question)
Set the question.void
setQuestionId(String questionId)
Set the questionId.void
setValue(String value)
Set the value.void
setValueMap(Map<String,Set<String>> values)
Set the values.
-
-
-
Constructor Detail
-
SurveyInputAnswer
public SurveyInputAnswer()
Build a SurveyAnswer object.
-
SurveyInputAnswer
public SurveyInputAnswer(SurveyQuestion question, Map<String,Set<String>> values)
Build a SurveyAnswer object.- Parameters:
question
- the question ID.values
- the answer value.
-
-
Method Detail
-
getQuestion
public SurveyQuestion getQuestion()
Get the question.- Returns:
- the question
-
setQuestion
public void setQuestion(SurveyQuestion question)
Set the question.- Parameters:
question
- the question to set
-
getQuestionId
public String getQuestionId()
Description copied from class:SurveyAnswer
Get the questionId.- Overrides:
getQuestionId
in classSurveyAnswer
- Returns:
- the questionId
-
setQuestionId
public void setQuestionId(String questionId)
Description copied from class:SurveyAnswer
Set the questionId.- Overrides:
setQuestionId
in classSurveyAnswer
- Parameters:
questionId
- the questionId to set
-
getValuesMap
public Map<String,Set<String>> getValuesMap()
Get the values.- Returns:
- the values
-
setValueMap
public void setValueMap(Map<String,Set<String>> values)
Set the values.- Parameters:
values
- the values to set
-
getValue
public String getValue()
Description copied from class:SurveyAnswer
Get the value.- Overrides:
getValue
in classSurveyAnswer
- Returns:
- the value
-
setValue
public void setValue(String value)
Description copied from class:SurveyAnswer
Set the value.- Overrides:
setValue
in classSurveyAnswer
- Parameters:
value
- the value to set
-
-