Class PickQuestionSetAsker

java.lang.Object
nz.org.riskscape.wizard.ask.BaseAsker
nz.org.riskscape.wizard.ask.PickQuestionSetAsker
All Implemented Interfaces:
Asker

public class PickQuestionSetAsker extends BaseAsker

Asker that presents the user with a list of possible question sets to answer next.

  • Constructor Details

    • PickQuestionSetAsker

      public PickQuestionSetAsker(nz.org.riskscape.engine.i18n.TranslationContext context)
  • Method Details

    • getChoices

      public static List<Choice<nz.org.riskscape.wizard.Question>> getChoices(Locale locale, List<nz.org.riskscape.wizard.Question> availableQuestions)
    • canAsk

      public boolean canAsk(nz.org.riskscape.wizard.bld.IncrementalBuildState buildState, nz.org.riskscape.wizard.Question question)
      Description copied from interface: Asker

      Determine whether this Asker is relevant for the given Question and IncrementalBuildState

      Returns:
      true if this Asker can and should drive the cli to answer the given Question.
    • ask

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.wizard.Answer.Response> ask(AskRequest request)
      Description copied from class: BaseAsker

      Get a bound value from the user - note that the response's original input is returned from BaseAsker.askUnbound(AskRequest). This is partly here because the original API exposed this method on the interface, and keeping this method here keeps the refactoring/change noise down to a minimum while allowing the interface to change in the way we want to preserve the right amount of encapsulation

      Specified by:
      ask in class BaseAsker