Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IControlManager

Manages a skill built with Controls.

This is the minimal definition required by the Runtime (ControlHandler) See ControlManager for the actual class used by implementations.

Hierarchy

  • IControlManager

Implemented by

Methods

createControlTree

  • Creates the tree of controls to handle state management and dialog decisions for the skill.

    Usage:

    • A single control is legal and will suffice for small skills. For larger skills a tree of controls structured using @see ContainerControl will help manage skill complexity.

    • In advanced scenarios with dynamic control tree shapes, this method should produce only the static section of the tree. The dynamic portion is expected to produce a tree that is identical to the tree at the end of the previous turn. The serializable control state can be inspected as necessary.

    • If state objects are re-established during this method, the subsequent

    Returns IControl

    A Control that is either a single @see Control or a @see ContainerControl that is the root of a tree.

Optional handleInternalError

  • Custom handling of a internal error.

    Parameters

    • input: IControlInput | undefined

      ControlInput object or undefined if an error occurs early in processing

    • error: any

      Error object

    • responseBuilder: ControlResponseBuilder

      Response builder

    Returns void

loadControlStateMap

  • loadControlStateMap(handlerInput: HandlerInput): Promise<object>
  • Parameters

    • handlerInput: HandlerInput

    Returns Promise<object>

reestablishControlStates

  • reestablishControlStates(rootControl: IControl, stateMap: object): void
  • Parameters

    • rootControl: IControl
    • stateMap: object
      • [key: string]: any

    Returns void

render

  • Builds the response.

    Parameters

    Returns void | Promise<void>

saveControlStateMap

  • saveControlStateMap(state: any, handlerInput: HandlerInput): Promise<void>
  • Parameters

    • state: any
    • handlerInput: HandlerInput

    Returns Promise<void>