ComponentDialog Klasse

public class ComponentDialog
extends DialogContainer

Eine Dialog, die aus anderen Dialogfeldern besteht. Ein Komponentendialogfeld verfügt über eine innere DialogSet und DialogContext, die einen inneren Dialogstapel bereitstellt, der im übergeordneten Dialogfeld ausgeblendet ist.

Feldzusammenfassung

Modifizierer und Typ Feld und Beschreibung
static final java.lang.String PERSISTEDDIALOGSTATE

Die ID für den permanenten Dialogfeldstatus.

Zusammenfassung zum Konstruktor

Konstruktor Beschreibung
ComponentDialog(String dialogId)

Initialisiert eine neue Instanz der ComponentDialog Klasse.

Methodenzusammenfassung

Modifizierer und Typ Methode und Beschreibung
ComponentDialog addDialog(Dialog dialog)

Fügt dem Komponentendialogfeld eine neue Dialog hinzu und gibt die aktualisierte Komponente zurück.

java.util.concurrent.CompletableFuture<DialogTurnResult> beginDialog(DialogContext outerDc, Object options)

Wird aufgerufen, wenn das Dialogfeld gestartet und auf den Dialogstapel des übergeordneten Elements verschoben wird.

java.util.concurrent.CompletableFuture<DialogTurnResult> continueDialog(DialogContext outerDc)

Wird aufgerufen, wenn das Dialogfeld _fortsetzung_ ist, wobei es sich um das aktive Dialogfeld handelt und der Benutzer mit einer neuen Aktivität antwortet.

DialogContext createChildContext(DialogContext dc)

Erstellt eine innere DialogContext .

protected java.util.concurrent.CompletableFuture<DialogTurnResult> endComponent(DialogContext outerDc, Object result)

Beendet das Komponentendialogfeld im Kontext des übergeordneten Elements.

java.util.concurrent.CompletableFuture<java.lang.Void> endDialog(TurnContext turnContext, DialogInstance instance, DialogReason reason)

Wird aufgerufen, wenn das Dialogfeld beendet wird.

protected java.util.concurrent.CompletableFuture<java.lang.Void> ensureInitialized(DialogContext outerDc)

Stellt sicher, dass das Dialogfeld initialisiert wird.

java.lang.String getInitialDialogId()

Ruft die ID ab, die dem anfänglichen Dialogfeld zugewiesen ist.

protected java.util.concurrent.CompletableFuture<DialogTurnResult> onBeginDialog(DialogContext innerDc, Object options)

Wird aufgerufen, wenn das Dialogfeld gestartet und auf den Dialogstapel des übergeordneten Elements verschoben wird.

protected java.util.concurrent.CompletableFuture<DialogTurnResult> onContinueDialog(DialogContext innerDc)

Wird aufgerufen, wenn das Dialogfeld _fortsetzung_ ist, wobei es sich um das aktive Dialogfeld handelt und der Benutzer mit einer neuen Aktivität antwortet.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onEndDialog(TurnContext context, DialogInstance instance, DialogReason reason)

Wird aufgerufen, wenn das Dialogfeld beendet wird.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onInitialize(DialogContext dc)

Initiliziert das Dialogfeld.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onRepromptDialog(TurnContext turnContext, DialogInstance instance)

Wird aufgerufen, wenn das Dialogfeld den Benutzer zur Eingabe erneut auffordert.

java.util.concurrent.CompletableFuture<java.lang.Void> repromptDialog(TurnContext turnContext, DialogInstance instance)

Wird aufgerufen, wenn das Dialogfeld den Benutzer zur Eingabe erneut auffordert.

java.util.concurrent.CompletableFuture<DialogTurnResult> resumeDialog(DialogContext outerDc, DialogReason reason, Object result)

Wird aufgerufen, wenn ein untergeordnetes Dialogfeld im Dialogstapel des übergeordneten Elements diese Drehung abgeschlossen hat und dieses Steuerelement an diese Dialogfeldkomponente zurückgibt.

void setInitialDialogId(String withInitialDialogId)

Legt die ID fest, die dem anfänglichen Dialogfeld zugewiesen ist.

Geerbte Methoden von Dialog

Geerbte Methoden von DialogContainer

Geerbte Methoden von java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Felddetails

PERSISTEDDIALOGSTATE

public static final String PERSISTEDDIALOGSTATE

Die ID für den permanenten Dialogfeldstatus.

Details zum Konstruktor

ComponentDialog

public ComponentDialog(String dialogId)

Initialisiert eine neue Instanz der ComponentDialog Klasse.

Parameter:

dialogId - Der D, der dem neuen Dialogfeld innerhalb des übergeordneten Dialogfeldsatzes zugewiesen werden soll.

Details zur Methode

addDialog

public ComponentDialog addDialog(Dialog dialog)

Fügt dem Komponentendialogfeld eine neue Dialog hinzu und gibt die aktualisierte Komponente zurück.

Parameter:

dialog - Das hinzuzufügende Dialogfeld.

Gibt zurück:

Die ComponentDialog nach Abschluss des Vorgangs.
     The added dialog's <xref uid="com.microsoft.bot.dialogs.Dialog.telemetryClient" data-throw-if-not-resolved="false" data-raw-source="Dialog#telemetryClient"></xref> is set to the
     <xref uid="com.microsoft.bot.dialogs.DialogContainer.telemetryClient" data-throw-if-not-resolved="false" data-raw-source="DialogContainer#telemetryClient"></xref> of the component dialog.

beginDialog

public CompletableFuture beginDialog(DialogContext outerDc, Object options)

Wird aufgerufen, wenn das Dialogfeld gestartet und auf den Dialogstapel des übergeordneten Elements verschoben wird.

Überschreibt:

ComponentDialog.beginDialog(DialogContext outerDc, Object options)

Parameter:

outerDc - Das übergeordnete DialogContext für die aktuelle Unterhaltungswende.
options - Optional, erste Informationen, die an das Dialogfeld übergeben werden sollen.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.
     If the task is successful, the result indicates whether the dialog is
     still active after the turn has been processed by the dialog.

continueDialog

public CompletableFuture continueDialog(DialogContext outerDc)

Wird aufgerufen, wenn das Dialogfeld _fortsetzung_ ist, wobei es sich um das aktive Dialogfeld handelt und der Benutzer mit einer neuen Aktivität antwortet.

Überschreibt:

ComponentDialog.continueDialog(DialogContext outerDc)

Parameter:

outerDc - Das übergeordnete DialogContext für die aktuelle Unterhaltungswende.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.
     If the task is successful, the result indicates whether the dialog is
     still active after the turn has been processed by the dialog. The
     result may also contain a return value. If this method is *not*
     overridden, the component dialog calls the
     <xref uid="com.microsoft.bot.dialogs.DialogContext.continueDialog*" data-throw-if-not-resolved="false" data-raw-source="DialogContext#continueDialog(CancellationToken)"></xref> method on its
     inner dialog context. If the inner dialog stack is empty, the
     component dialog ends, and if a <xref uid="com.microsoft.bot.dialogs.DialogTurnResult.result" data-throw-if-not-resolved="false" data-raw-source="DialogTurnResult#result"></xref> is
     available, the component dialog uses that as its return value.

createChildContext

public DialogContext createChildContext(DialogContext dc)

Erstellt eine innere DialogContext .

Überschreibt:

ComponentDialog.createChildContext(DialogContext dc)

Parameter:

dc - Das übergeordnete DialogContext .

Gibt zurück:

Der erstellte Dialogkontext.

endComponent

protected CompletableFuture endComponent(DialogContext outerDc, Object result)

Beendet das Komponentendialogfeld im Kontext des übergeordneten Elements.

Parameter:

outerDc - Das übergeordnete DialogContext für die aktuelle Unterhaltungswende.
result - Optionaler Wert, der von der Dialogkomponente in den übergeordneten Kontext zurückgegeben werden soll.

Gibt zurück:

Eine Aufgabe, die die auszuführende Arbeitswarteschlange darstellt.
     If the task is successful, the result indicates that the dialog ended
     after the turn was processed by the dialog. In general, the parent
     context is the dialog or bot turn handler that started the dialog. If
     the parent is a dialog, the stack calls the parent's
     <xref uid="com.microsoft.bot.dialogs.Dialog.resumeDialog(com.microsoft.bot.dialogs.DialogContext,com.microsoft.bot.dialogs.DialogReason,java.lang.Object)" data-throw-if-not-resolved="false" data-raw-source="Dialog#resumeDialog(DialogContext, DialogReason, Object)"></xref>
     method to return a result to the parent dialog. If the parent dialog
     does not implement `ResumeDialog`, then the parent will end, too, and
     the result is passed to the next parent context, if one exists. The
     returned <xref uid="com.microsoft.bot.dialogs.DialogTurnResult" data-throw-if-not-resolved="false" data-raw-source="DialogTurnResult"></xref> contains the return value in its
     <xref uid="com.microsoft.bot.dialogs.DialogTurnResult.result" data-throw-if-not-resolved="false" data-raw-source="DialogTurnResult#result"></xref> property.

endDialog

public CompletableFuture endDialog(TurnContext turnContext, DialogInstance instance, DialogReason reason)

Wird aufgerufen, wenn das Dialogfeld beendet wird.

Überschreibt:

ComponentDialog.endDialog(TurnContext turnContext, DialogInstance instance, DialogReason reason)

Parameter:

turnContext - Das Kontextobjekt für diese Drehung.
instance - Statusinformationen, die der Instanz dieses Komponentendialogfelds im Dialogstapel des übergeordneten Elements zugeordnet sind.
reason - Grund, warum das Dialogfeld beendet wurde.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.
     When this method is called from the parent dialog's context, the
     component dialog cancels all of the dialogs on its inner dialog stack
     before ending.

ensureInitialized

protected CompletableFuture ensureInitialized(DialogContext outerDc)

Stellt sicher, dass das Dialogfeld initialisiert wird.

Parameter:

outerDc - Die äußere DialogContext .

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.

getInitialDialogId

public String getInitialDialogId()

Ruft die ID ab, die dem anfänglichen Dialogfeld zugewiesen ist.

Gibt zurück:

der InitialDialogId-Wert als Zeichenfolge.

onBeginDialog

protected CompletableFuture onBeginDialog(DialogContext innerDc, Object options)

Wird aufgerufen, wenn das Dialogfeld gestartet und auf den Dialogstapel des übergeordneten Elements verschoben wird.

Parameter:

innerDc - Die innere DialogContext für die aktuelle Unterhaltungswende.
options - Optional, erste Informationen, die an das Dialogfeld übergeben werden sollen.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.
     If the task is successful, the result indicates whether the dialog is
     still active after the turn has been processed by the dialog. By
     default, this calls the
     <xref uid="com.microsoft.bot.dialogs.Dialog.beginDialog(com.microsoft.bot.dialogs.DialogContext,java.lang.Object)" data-throw-if-not-resolved="false" data-raw-source="Dialog#beginDialog(DialogContext, Object)"></xref> method of the
     component dialog's initial dialog, as defined by
     InitialDialogId . Override this method in a derived class to
     implement interrupt logic.

onContinueDialog

protected CompletableFuture onContinueDialog(DialogContext innerDc)

Wird aufgerufen, wenn das Dialogfeld _fortsetzung_ ist, wobei es sich um das aktive Dialogfeld handelt und der Benutzer mit einer neuen Aktivität antwortet.

Parameter:

innerDc - Die innere DialogContext für die aktuelle Unterhaltungswende.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.
     If the task is successful, the result indicates whether the dialog is
     still active after the turn has been processed by the dialog. The
     result may also contain a return value. By default, this calls the
     currently active inner dialog's
     <xref uid="com.microsoft.bot.dialogs.Dialog.continueDialog(com.microsoft.bot.dialogs.DialogContext)" data-throw-if-not-resolved="false" data-raw-source="Dialog#continueDialog(DialogContext)"></xref> method. Override this
     method in a derived class to implement interrupt logic.

onEndDialog

protected CompletableFuture onEndDialog(TurnContext context, DialogInstance instance, DialogReason reason)

Wird aufgerufen, wenn das Dialogfeld beendet wird.

Parameter:

context - Das Kontextobjekt für diese Drehung.
instance - Statusinformationen, die dem inneren Dialogstapel dieses Komponentendialogfelds zugeordnet sind.
reason - Grund, warum das Dialogfeld beendet wurde.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.
     Override this method in a derived class to implement any additional
     logic that should happen at the component level, after all inner
     dialogs have been canceled.

onInitialize

protected CompletableFuture onInitialize(DialogContext dc)

Initiliziert das Dialogfeld.

Parameter:

dc - Die zu initialisierende DialogContext.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.

onRepromptDialog

protected CompletableFuture onRepromptDialog(TurnContext turnContext, DialogInstance instance)

Wird aufgerufen, wenn das Dialogfeld den Benutzer zur Eingabe erneut auffordert.

Parameter:

turnContext - Das Kontextobjekt für diese Drehung.
instance - Statusinformationen, die dem inneren Dialogstapel dieses Komponentendialogfelds zugeordnet sind.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.
     Override this method in a derived class to implement any additional
     logic that should happen at the component level, after the re-prompt
     operation completes for the inner dialog.

repromptDialog

public CompletableFuture repromptDialog(TurnContext turnContext, DialogInstance instance)

Wird aufgerufen, wenn das Dialogfeld den Benutzer zur Eingabe erneut auffordert.

Überschreibt:

ComponentDialog.repromptDialog(TurnContext turnContext, DialogInstance instance)

Parameter:

turnContext - Das Kontextobjekt für diese Drehung.
instance - Statusinformationen für dieses Dialogfeld.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.

resumeDialog

public CompletableFuture resumeDialog(DialogContext outerDc, DialogReason reason, Object result)

Wird aufgerufen, wenn ein untergeordnetes Dialogfeld im Dialogstapel des übergeordneten Elements diese Drehung abgeschlossen hat und dieses Steuerelement an diese Dialogfeldkomponente zurückgibt.

Überschreibt:

ComponentDialog.resumeDialog(DialogContext outerDc, DialogReason reason, Object result)

Parameter:

outerDc - Die DialogContext für die aktuelle Unterhaltungswende.
reason - Grund, warum das Dialogfeld fortgesetzt wurde.
result - Optionaler Wert, der aus dem aufgerufenen Dialogfeld zurückgegeben wurde. Der Typ des zurückgegebenen Werts hängt vom untergeordneten Dialogfeld ab.

Gibt zurück:

Eine CompletableFuture, die den hronösen Vorgang darstellt.
     If the task is successful, the result indicates whether this dialog
     is still active after this dialog turn has been processed. Generally,
     the child dialog was started with a call to
     BeginDialog(DialogContext, Object) in the parent's context.
     However, if the <xref uid="com.microsoft.bot.dialogs.DialogContext.replaceDialog(java.lang.String,java.lang.Object)" data-throw-if-not-resolved="false" data-raw-source="DialogContext#replaceDialog(String, Object)"></xref>
     method is called, the logical child dialog may be different than the
     original. If this method is *not* overridden, the dialog
     automatically calls its RepromptDialog(TurnContext,
     DialogInstance) when the user replies.

setInitialDialogId

public void setInitialDialogId(String withInitialDialogId)

Legt die ID fest, die dem anfänglichen Dialogfeld zugewiesen ist.

Parameter:

withInitialDialogId - Der InitialDialogId-Wert.

Gilt für: