TextPrompt Class
- java.
lang. Object - com.
microsoft. bot. dialogs. Dialog - com.
microsoft. bot. dialogs. prompts. Prompt<T> - com.
microsoft. bot. dialogs. prompts. TextPrompt
- com.
- com.
- com.
public class TextPrompt
extends Prompt<java.lang.String>
Prompts the user for text input.
Constructor Summary
| Constructor | Description |
|---|---|
| TextPrompt(String dialogId) |
Initializes a new instance of the TextPrompt class. |
| TextPrompt(String dialogId, PromptValidator<String> validator) |
Initializes a new instance of the TextPrompt class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| protected java.util.concurrent.CompletableFuture<java.lang.Boolean> |
onPreBubbleEvent(DialogContext dc, DialogEvent e)
Called before an event is bubbled to its parent. |
| protected java.util.concurrent.CompletableFuture<java.lang.Void> |
onPrompt(TurnContext turnContext, Map<String,Object> state, PromptOptions options, Boolean isRetry)
Prompts the user for input. |
|
protected
java.util.concurrent.CompletableFuture<Prompt |
onRecognize(TurnContext turnContext, Map<String,Object> state, PromptOptions options)
Attempts to recognize the user's input. |
Methods inherited from Dialog
Methods inherited from Prompt
Methods inherited from java.lang.Object
Constructor Details
TextPrompt
public TextPrompt(String dialogId)
Initializes a new instance of the TextPrompt class.
Parameters:
TextPrompt
public TextPrompt(String dialogId, PromptValidator
Initializes a new instance of the TextPrompt class.
Parameters:
Method Details
onPreBubbleEvent
protected CompletableFuture
Called before an event is bubbled to its parent. This is a good place to perform interception of an event as returning `true` will prevent any further bubbling of the event to the dialogs parents and will also prevent any child dialogs from performing their default processing.
Overrides:
TextPrompt.onPreBubbleEvent(DialogContext dc, DialogEvent e)Parameters:
Returns:
onPrompt
protected CompletableFuture
Prompts the user for input.
Overrides:
TextPrompt.onPrompt(TurnContext turnContext, Map<String,Object> state, PromptOptions options, Boolean isRetry)Parameters:
Returns:
onRecognize
protected CompletableFuture
Attempts to recognize the user's input.
Overrides:
TextPrompt.onRecognize(TurnContext turnContext, Map<String,Object> state, PromptOptions options)Parameters:
Returns: