DialogTurnResult Class

  • java.lang.Object
    • com.microsoft.bot.dialogs.DialogTurnResult

public class DialogTurnResult

Result returned to the caller of one of the various stack manipulation methods.

Constructor Summary

Constructor Description
DialogTurnResult(DialogTurnStatus withStatus)

Creates a DialogTurnResult with a status.

DialogTurnResult(DialogTurnStatus withStatus, Object withResult)

Creates a DialogTurnResult with a status and result.

Method Summary

Modifier and Type Method and Description
java.lang.Object getResult()

Gets or sets the result returned by a dialog that was just ended.

DialogTurnStatus getStatus()

Gets the current status of the stack.

boolean hasParentEnded()

Indicates whether a DialogCommand has ended its parent container and the parent should not perform any further processing.

void setParentEnded(boolean withParentEnded)

Sets whether a DialogCommand has ended its parent container and the parent should not perform any further processing.

void setResult(Object withResult)

Sets the result returned by a dialog that was just ended.

void setStatus(DialogTurnStatus withStatus)

Sets the current status of the stack.

Methods inherited from 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

Constructor Details

DialogTurnResult

public DialogTurnResult(DialogTurnStatus withStatus)

Creates a DialogTurnResult with a status.

Parameters:

withStatus - The dialog status.

DialogTurnResult

public DialogTurnResult(DialogTurnStatus withStatus, Object withResult)

Creates a DialogTurnResult with a status and result.

Parameters:

withStatus - The dialog status.
withResult - The result.

Method Details

getResult

public Object getResult()

Gets or sets the result returned by a dialog that was just ended.

This will only be populated in certain cases: - The bot calls `DialogContext.BeginDialogAsync()` to start a new dialog and the dialog ends immediately.

- The bot calls `DialogContext.ContinueDialogAsync()` and a dialog that was active ends.

In all cases where it's populated, {@link "DialogContext.ActiveDialog"} will be `null`.

Returns:

The result returned by a dialog that was just ended.

getStatus

public DialogTurnStatus getStatus()

Gets the current status of the stack.

Returns:

The current status of the stack.

hasParentEnded

public boolean hasParentEnded()

Indicates whether a DialogCommand has ended its parent container and the parent should not perform any further processing.

Returns:

Whether a DialogCommand has ended its parent container and the parent should not perform any further processing.

setParentEnded

public void setParentEnded(boolean withParentEnded)

Sets whether a DialogCommand has ended its parent container and the parent should not perform any further processing.

Parameters:

withParentEnded - Whether a DialogCommand has ended its parent container and the parent should not perform any further processing.

setResult

public void setResult(Object withResult)

Sets the result returned by a dialog that was just ended.

Parameters:

withResult - The result returned by a dialog that was just ended.

setStatus

public void setStatus(DialogTurnStatus withStatus)

Sets the current status of the stack.

Parameters:

withStatus - The current status of the stack.

Applies to