Creates an instance of a Control Manager.
props
The complete props used during construction.
The custom props provided during construction
Default key name used to store control state data between turns.
Builds interaction model content required by the Control tree.
Usage:
The imDataMap has 'en-US' modelData registered by default
The developer may configure and register additional imDataMap
instances to support additional locales
If imDataMap doesn't have data for the requested locale a
LocaleNotSupportedError
will be thrown
Interaction Model Generator
Creates a tree of controls to handle state management and dialog decisions for the skill.
Usage:
Each control in the tree can and should be created with empty state.
In advanced scenarios the tree shape may change as the skill session
progresses. Dynamic controls should be rebuilt during
ControlManager.reestablishControlStates()
.
A Control
, typically a ContainerControl
, that is the root of a tree.
Handles an internal error.
This is intended for logging, reporting and perhaps mentioning the situation to the user. The user session will be automatically closed.
Default: The error object is converted into an object with enumerable properties and logged at logLevel=error
Input
Error
Response builder
Load the control state map from durable storage.
Default: loads from Session Attributes.
Reestablish the state of all controls.
Purpose:
createControlTree
)Notes:
Render an APL template.
Input
Response builder
Saves the control state map for use in subsequent turns of this session.
Default: saves to the Session Attributes.
Merges the user-provided props with the default props.
Any property defined by the user-provided data overrides the defaults.
ControlManager used to render APL in Component Mode.