public static final class Model.Feature extends Object
Features are not attached hierarchically to any Model.Frame
or Model.Node
, but they may specify a node as a source and/or one as a
destination.
The source node is used by the dialogue policy to choose among features
with the same name; for example, an app that performs two different kinds
of search might have two features named select
; the policy would
attempt to match the user's current node against each feature's source
field to determine which feature to trigger.
The destination node determines the state of the conversation after successful execution of the feature.
A host app is instructed to execute a feature by the ACTION
event; when the execution is complete, the app should call completeTurn()
.
Constructor and Description |
---|
Feature()
No-arg constructor used by Gson deserialization.
|
Modifier and Type | Method and Description |
---|---|
String |
getDestination() |
String |
getId() |
String |
getName() |
Prompt[] |
getPrompts() |
Model.Rule[] |
getRules() |
String |
getSource() |
Prompt |
randomPrompt() |
boolean |
requiresConfirmation() |
public String getSource()
public String getDestination()
public String getId()
public String getName()
public Prompt[] getPrompts()
public Model.Rule[] getRules()
public Prompt randomPrompt()
null
if no
prompts are associated with it.public boolean requiresConfirmation()
true
if this state requires confirmation before
leaving (if a node) or executing (if a feature).Copyright © 2021. All rights reserved.