DialogInstance Class

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

public class DialogInstance

Contains state information associated with a Dialog on a dialog stack.

Constructor Summary

Constructor Description
DialogInstance()

Creates a DialogInstance with id and state.

DialogInstance(String withId, Map<String,Object> withState)

Creates a DialogInstance with id and state.

Method Summary

Modifier and Type Method and Description
java.lang.String getId()

Gets the ID of the dialog.

int getStackIndex()

Gets stack index.

java.util.Map<java.lang.String,java.lang.Object> getState()

Gets the instance's persisted state.

java.lang.String getVersion()

Gets version string.

void setId(String withId)

Sets the ID of the dialog.

void setStackIndex(int withStackIndex)

Sets stack index.

void setState(Map<String,Object> withState)

Sets the instance's persisted state.

void setVersion(String withVersion)

Sets version string.

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

DialogInstance

public DialogInstance()

Creates a DialogInstance with id and state.

DialogInstance

public DialogInstance(String withId, Map withState)

Creates a DialogInstance with id and state.

Parameters:

withId - The id
withState - The state.

Method Details

getId

public String getId()

Gets the ID of the dialog.

Returns:

The dialog id.

getStackIndex

public int getStackIndex()

Gets stack index. Positive values are indexes within the current DC and negative values are indexes in the parent DC.

Returns:

Positive values are indexes within the current DC and negative values are indexes in the parent DC.

getState

public Map getState()

Gets the instance's persisted state.

Returns:

The instance's persisted state.

getVersion

public String getVersion()

Gets version string.

Returns:

Unique string from the dialog this dialoginstance is tracking which is used to identify when a dialog has changed in way that should emit an event for changed content.

setId

public void setId(String withId)

Sets the ID of the dialog.

Parameters:

withId - The dialog id.

setStackIndex

public void setStackIndex(int withStackIndex)

Sets stack index. Positive values are indexes within the current DC and negative values are indexes in the parent DC.

Parameters:

withStackIndex - Positive values are indexes within the current DC and negative values are indexes in the parent DC.

setState

public void setState(Map withState)

Sets the instance's persisted state.

Parameters:

withState - The instance's persisted state.

setVersion

public void setVersion(String withVersion)

Sets version string.

Parameters:

withVersion - Unique string from the dialog this dialoginstance is tracking which is used to identify when a dialog has changed in way that should emit an event for changed content.

Applies to