DialogSet Class
- java.
lang. Object - com.
microsoft. bot. dialogs. DialogSet
- com.
public class DialogSet
A collection of Dialog objects that can all call each other.
Constructor Summary
| Constructor | Description |
|---|---|
| DialogSet() |
Creates a Dialog |
| DialogSet(StatePropertyAccessor<DialogState> withDialogState) |
Initializes a new instance of the Dialog |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Dialog |
add(Dialog dialog)
Adds a new dialog to the set and returns the set to allow fluent chaining. |
|
java.util.concurrent.CompletableFuture<Dialog |
createContext(TurnContext turnContext)
Creates a Dialog |
| Dialog |
find(String dialogId)
Searches the current Dialog |
| java.util.Collection<Dialog> |
getDialogs()
Returns a collection of Dialogs in this Dialog |
|
Bot |
getTelemetryClient()
Gets the Bot |
| java.lang.String |
getVersion()
Gets a unique string which represents the combined versions of all dialogs in this dialogset. |
| void |
setTelemetryClient(BotTelemetryClient withBotTelemetryClient)
Sets the Bot |
Methods inherited from java.lang.Object
Constructor Details
DialogSet
public DialogSet()
Creates a DialogSet without state.
DialogSet
public DialogSet(StatePropertyAccessor
Initializes a new instance of the DialogSet class.
To start and control the dialogs in this dialog set, create a DialogContext and use its methods to start, continue, or end dialogs. To create a dialog context, call createContext(TurnContext).
Parameters:
Method Details
add
public DialogSet add(Dialog dialog)
Adds a new dialog to the set and returns the set to allow fluent chaining. If the Dialog.Id being added already exists in the set, the dialogs id will be updated to include a suffix which makes it unique. So adding 2 dialogs named "duplicate" to the set would result in the first one having an id of "duplicate" and the second one having an id of "duplicate2".
Parameters:
Returns:
createContext
public CompletableFuture
Creates a DialogContext which can be used to work with the dialogs in the DialogSet.
Parameters:
Returns:
find
public Dialog find(String dialogId)
Searches the current DialogSet for a Dialog by its ID.
Parameters:
Returns:
getDialogs
public Collection
getTelemetryClient
public BotTelemetryClient getTelemetryClient()
Gets the BotTelemetryClient to use for logging.
Returns:
getVersion
public String getVersion()
Gets a unique string which represents the combined versions of all dialogs in this dialogset.
Returns:
setTelemetryClient
public void setTelemetryClient(BotTelemetryClient withBotTelemetryClient)
Sets the BotTelemetryClient to use for logging.
When this property is set, it sets the Dialog.TelemetryClient of each dialog in the set to the new value.
Parameters: