Package nz.org.riskscape.wizard.ask
Class BooleanExpressionAsker
java.lang.Object
nz.org.riskscape.wizard.ask.BaseAsker
nz.org.riskscape.wizard.ask.ExpressionAsker
nz.org.riskscape.wizard.ask.BooleanExpressionAsker
- All Implemented Interfaces:
Asker
Asker for getting an answer that is a boolean yielding Expression, such as for a
filter condition.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumComparison operators that are supported by the asker.static interfacestatic enumRepresents the user choice in how to answer the attribute value part of the question, should there be a lot of potential values in a list.Nested classes/interfaces inherited from class nz.org.riskscape.wizard.ask.ExpressionAsker
ExpressionAsker.AnswerType -
Field Summary
FieldsFields inherited from class nz.org.riskscape.wizard.ask.ExpressionAsker
expressionMessagesFields inherited from class nz.org.riskscape.wizard.ask.BaseAsker
enumTranslator, translationContext -
Constructor Summary
ConstructorsConstructorDescriptionBooleanExpressionAsker(nz.org.riskscape.engine.i18n.TranslationContext messageSource) -
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.wizard.Answer.Response>ask(AskRequest input) Get a bound value from the user - note that the response's original input is returned fromBaseAsker.askUnbound(AskRequest).protected StringaskInteractively(CliPrompter cliPrompter, nz.org.riskscape.wizard.ExpressionHelper helper) Build an expression interactively in the wizard, i.e.Methods inherited from class nz.org.riskscape.wizard.ask.ExpressionAsker
canAsk, getAllowedExpressionTypes, getAttributeChoices, getValueChoicesMethods inherited from class nz.org.riskscape.wizard.ask.BaseAsker
askUnbound, getChoices, getLocale, getMessage, getMessageSource, getOptionalMessage, pickChoice, toChoice
-
Field Details
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE- See Also:
-
-
Constructor Details
-
BooleanExpressionAsker
public BooleanExpressionAsker(nz.org.riskscape.engine.i18n.TranslationContext messageSource)
-
-
Method Details
-
askInteractively
protected String askInteractively(CliPrompter cliPrompter, nz.org.riskscape.wizard.ExpressionHelper helper) Description copied from class:ExpressionAskerBuild an expression interactively in the wizard, i.e. user picks what attribute to use, how to transform it, etc.
- Overrides:
askInteractivelyin classExpressionAsker
-
ask
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.wizard.Answer.Response> ask(AskRequest input) Description copied from class:BaseAskerGet 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- Overrides:
askin classExpressionAsker
-