ChoicePrompt クラス
- java.
lang. Object - com.
microsoft. bot. dialogs. Dialog - com.
microsoft. bot. dialogs. prompts. Prompt<T> - com.
microsoft. bot. dialogs. prompts. ChoicePrompt
- com.
- com.
- com.
public class ChoicePrompt
extends Prompt<FoundChoice>
選択肢の一覧から選択するようにユーザーに求めます。
コンストラクターの概要
| コンストラクター | 説明 |
|---|---|
| ChoicePrompt(String dialogId) |
ChoicePrompt クラスの新しいインスタンスを初期化します。 |
| ChoicePrompt(String dialogId, PromptValidator<FoundChoice> validator, String defaultLocale) |
ChoicePrompt クラスの新しいインスタンスを初期化します。 |
| ChoicePrompt(String dialogId, Map<String,ChoiceFactoryOptions> choiceDefaults, PromptValidator<FoundChoice> validator, String defaultLocale) |
ChoicePrompt クラスの新しいインスタンスを初期化します。 |
メソッドの概要
| 修飾子と型 | メソッドと説明 |
|---|---|
|
Choice |
getChoiceOptions()
ChoiceFactory に渡され、ユーザーに表示される選択肢のスタイルを調整するために使用される追加のオプションを取得します。 |
| java.lang.String |
getDefaultLocale()
プロンプトの言語固有の動作を決定するために使用する既定のロケールを設定または設定します。 |
|
Find |
getRecognizerOptions()
基になる {@link Choice |
|
List |
getStyle()
ユーザーにプロンプトを表示するときに使用するスタイルを取得します。 |
| protected java.util.concurrent.CompletableFuture<java.lang.Void> |
onPrompt(TurnContext turnContext, Map<String,Object> state, PromptOptions options, Boolean isRetry)
ユーザーに入力を求めます。 |
|
protected
java.util.concurrent.CompletableFuture<Prompt |
onRecognize(TurnContext turnContext, Map<String,Object> state, PromptOptions options)
ユーザーの入力を認識しようとします。 |
| void |
setChoiceOptions(ChoiceFactoryOptions choiceOptions)
ChoiceFactory に渡される追加のオプションを設定し、ユーザーに表示される選択肢のスタイルを調整するために使用します。 |
| void |
setDefaultLocale(String defaultLocale)
プロンプトの言語固有の動作を決定するために使用する既定のロケールを設定します。 |
| void |
setRecognizerOptions(FindChoicesOptions recognizerOptions)
基になる {@link Choice |
| void |
setStyle(ListStyle style)
ユーザーにプロンプトを表示するときに使用するスタイルを設定します。 |
メソッドの継承元: Dialog
メソッドの継承元: Prompt
メソッドの継承元: java.lang.Object
コンストラクターの詳細
ChoicePrompt
public ChoicePrompt(String dialogId)
ChoicePrompt クラスの新しいインスタンスを初期化します。
パラメーター:
ChoicePrompt
public ChoicePrompt(String dialogId, PromptValidator
ChoicePrompt クラスの新しいインスタンスを初期化します。
パラメーター:
The value of <xref uid="" data-throw-if-not-resolved="false" data-raw-source="dialogId"></xref> must be unique within the
<xref uid="com.microsoft.bot.dialogs.DialogSet" data-throw-if-not-resolved="false" data-raw-source="DialogSet"></xref> or <xref uid="com.microsoft.bot.dialogs.ComponentDialog" data-throw-if-not-resolved="false" data-raw-source="ComponentDialog"></xref> to which
the prompt is added. If the <xref uid="com.microsoft.bot.schema.Activity.locale" data-throw-if-not-resolved="false" data-raw-source="Activity#locale"></xref> of
the <xref uid="com.microsoft.bot.dialogs.DialogContext" data-throw-if-not-resolved="false" data-raw-source="DialogContext"></xref> .<xref uid="com.microsoft.bot.dialogs.DialogContext.context" data-throw-if-not-resolved="false" data-raw-source="DialogContext#context"></xref>
.<xref uid="" data-throw-if-not-resolved="false" data-raw-source="ITurnContext#activity"></xref> is specified, then that
local is used to determine language specific behavior;
otherwise the <xref uid="" data-throw-if-not-resolved="false" data-raw-source="defaultLocale"></xref> is used. US-English
is the used if no language or default locale is
available, or if the language or locale is not otherwise
supported.
ChoicePrompt
public ChoicePrompt(String dialogId, Map
ChoicePrompt クラスの新しいインスタンスを初期化します。
パラメーター:
メソッドの詳細
getChoiceOptions
public ChoiceFactoryOptions getChoiceOptions()
ChoiceFactory に渡され、ユーザーに表示される選択肢のスタイルを調整するために使用される追加のオプションを取得します。
戻り値:
getDefaultLocale
public String getDefaultLocale()
プロンプトの言語固有の動作を決定するために使用する既定のロケールを設定または設定します。
戻り値:
getRecognizerOptions
public FindChoicesOptions getRecognizerOptions()
基になる {@link ChoiceRecognizers#recognizeChoices(String, IList{Choice}, FindChoicesOptions)} メソッドに渡される追加のオプションを取得または設定します。
戻り値:
getStyle
public ListStyle getStyle()
ユーザーにプロンプトを表示するときに使用するスタイルを取得します。
戻り値:
onPrompt
protected CompletableFuture
ユーザーに入力を求めます。
上書き:
ChoicePrompt.onPrompt(TurnContext turnContext, Map<String,Object> state, PromptOptions options, Boolean isRetry)パラメーター:
戻り値:
onRecognize
protected CompletableFuture
ユーザーの入力を認識しようとします。
上書き:
ChoicePrompt.onRecognize(TurnContext turnContext, Map<String,Object> state, PromptOptions options)パラメーター:
戻り値:
setChoiceOptions
public void setChoiceOptions(ChoiceFactoryOptions choiceOptions)
ChoiceFactory に渡される追加のオプションを設定し、ユーザーに表示される選択肢のスタイルを調整するために使用します。
パラメーター:
setDefaultLocale
public void setDefaultLocale(String defaultLocale)
プロンプトの言語固有の動作を決定するために使用する既定のロケールを設定します。
パラメーター:
setRecognizerOptions
public void setRecognizerOptions(FindChoicesOptions recognizerOptions)
基になる {@link ChoiceRecognizers#recognizeChoices(String, IList{Choice}, FindChoicesOptions)} メソッドに渡される追加のオプションを取得または設定します。
パラメーター:
setStyle
public void setStyle(ListStyle style)
ユーザーにプロンプトを表示するときに使用するスタイルを設定します。
パラメーター: