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
Modifier and TypeClassDescriptionstatic enum
Comparison operators that are supported by the asker.static interface
static enum
Represents 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
Fields inherited from class nz.org.riskscape.wizard.ask.ExpressionAsker
expressionMessages
Fields inherited from class nz.org.riskscape.wizard.ask.BaseAsker
enumTranslator, translationContext
-
Constructor Summary
ConstructorDescriptionBooleanExpressionAsker
(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 String
askInteractively
(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, getValueChoices
Methods 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:ExpressionAsker
Build an expression interactively in the wizard, i.e. user picks what attribute to use, how to transform it, etc.
- Overrides:
askInteractively
in classExpressionAsker
-
ask
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.wizard.Answer.Response> ask(AskRequest input) 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- Overrides:
ask
in classExpressionAsker
-