Search in sources :

Example 1 with WarningStatusChecker

use of org.eyeseetea.malariacare.layout.adapters.survey.navigation.status.WarningStatusChecker in project pictureapp by EyeSeeTea.

the class NavigationBuilder method annotateWarning.

/**
     * Annotates  the questions involved in this warning
     */
private void annotateWarning(QuestionNode warningNode) {
    //Not a warning -> done
    if (warningNode.getQuestion().getOutput() != Constants.WARNING) {
        return;
    }
    WarningStatusChecker warningStatusChecker = (WarningStatusChecker) warningNode.getStatusChecker();
    Question questionWithThreshold = warningStatusChecker.getQuestionToSubscribeFromThreshold();
    Question questionWithOption = warningStatusChecker.getQuestionToSubscribeFromOption();
    addWarning(questionWithThreshold, warningNode);
    addWarning(questionWithOption, warningNode);
}
Also used : Question(org.eyeseetea.malariacare.data.database.model.Question) WarningStatusChecker(org.eyeseetea.malariacare.layout.adapters.survey.navigation.status.WarningStatusChecker)

Aggregations

Question (org.eyeseetea.malariacare.data.database.model.Question)1 WarningStatusChecker (org.eyeseetea.malariacare.layout.adapters.survey.navigation.status.WarningStatusChecker)1