Package nz.org.riskscape.wizard
Class BaseQuestionSet
java.lang.Object
nz.org.riskscape.wizard.BaseQuestionSet
- All Implemented Interfaces:
QuestionSet
- Direct Known Subclasses:
DefaultQuestionSet2,EmptyQuestionSet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final Stringprotected final Stringprotected final SurveyFields inherited from interface nz.org.riskscape.wizard.QuestionSet
FINAL_QUESTION, SKIP, UNASSIGNED -
Constructor Summary
ConstructorsConstructorDescriptionBaseQuestionSet(String name, String discriminator, Survey survey) Construct a question set where the name is used for the i18n look up and the id is set as the name plus an integer disriminator, e.g.BaseQuestionSet(String id, Survey survey) Construct a question set where the id is used for the i18n look up. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleangetDescription(Locale locale) A human-friendly description for this QuestionSetgetId()getName()A human-friendly title for this QuestionSetinthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.wizard.QuestionSet
getPhase, getPipelineChange, getQuestions
-
Field Details
-
name
-
discriminator
-
id
-
survey
-
-
Constructor Details
-
BaseQuestionSet
Construct a question set where the id is used for the i18n look up.
-
BaseQuestionSet
Construct a question set where the name is used for the i18n look up and the id is set as the name plus an integer disriminator, e.g.
{name: reports, discriminator: 2}would give an id ofreports-2
-
-
Method Details
-
getDescription
Description copied from interface:QuestionSetA human-friendly description for this QuestionSet
- Specified by:
getDescriptionin interfaceQuestionSet
-
getTitle
Description copied from interface:QuestionSetA human-friendly title for this QuestionSet
- Specified by:
getTitlein interfaceQuestionSet
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getName
- Specified by:
getNamein interfaceQuestionSet
-
getId
- Specified by:
getIdin interfaceQuestionSet- Returns:
- a String that uniquely identifies this QuestionSet TODO this might become a name and end up being a weak identifier, as the name is probably only unique within the context of a survey
-
getSurvey
- Specified by:
getSurveyin interfaceQuestionSet- Returns:
- the survey to which this set belongs
-