DialogTurnResult Class
- java.
lang. Object - com.
microsoft. bot. dialogs. DialogTurnResult
- com.
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 Dialog |
| DialogTurnResult(DialogTurnStatus withStatus, Object withResult) |
Creates a Dialog |
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. |
|
Dialog |
getStatus()
Gets the current status of the stack. |
| boolean |
hasParentEnded()
Indicates whether a Dialog |
| void |
setParentEnded(boolean withParentEnded)
Sets whether a Dialog |
| 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
Constructor Details
DialogTurnResult
public DialogTurnResult(DialogTurnStatus withStatus)
Creates a DialogTurnResult with a status.
Parameters:
DialogTurnResult
public DialogTurnResult(DialogTurnStatus withStatus, Object withResult)
Creates a DialogTurnResult with a status and result.
Parameters:
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:
getStatus
public DialogTurnStatus getStatus()
Gets the current status of the stack.
Returns:
hasParentEnded
public boolean hasParentEnded()
Indicates whether a DialogCommand has ended its parent container and the parent should not perform any further processing.
Returns:
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:
setResult
public void setResult(Object withResult)
Sets the result returned by a dialog that was just ended.
Parameters:
setStatus
public void setStatus(DialogTurnStatus withStatus)
Sets the current status of the stack.
Parameters: