Interface StoryStep
-
- All Implemented Interfaces:
public interface StoryStep<T extends StoryHandlerDefinition>A step is a part of a StoryDefinition. Used to manage workflow in a StoryHandler.
-
-
Method Summary
Modifier and Type Method Description Function1<T, Object>answer()The custom answer for this step. Function1<BotBus, Boolean>selectFromBus()Does this Step has to be selected from the Bus? BooleanselectFromAction(UserTimeline userTimeline, Dialog dialog, Action action, Intent intent)Does this Step has to be automatically selected from the action context? BooleanselectFromDialog(UserTimeline userTimeline, Dialog dialog, Intent intent)Does this Step has to be automatically selected from the dialog context? BooleanselectFromActionAndEntityStepSelection(Action action, Intent intent)Does this step hast to be selected from its entityStepSelection? BooleanselectFromDialogAndEntityStepSelection(Dialog dialog, Intent intent)Does this step hast to be selected from its entityStepSelection? BooleansupportStarterIntent(Intent i)Does this step support this intent as starter intent? BooleansupportIntent(Intent i)Does this step support this intent? abstract StringgetName()The name of the step. IntentAwaregetBaseIntent()IntentAwaregetIntent()Set<IntentAware>getOtherStarterIntents()Set<IntentAware>getSecondaryIntents()Set<StoryStep<T>>getChildren()BooleangetHasNoChildren()EntityStepSelectiongetEntityStepSelection()List<StoryDefinitionStepMetric>getMetrics()-
-
Method Detail
-
answer
Function1<T, Object> answer()
The custom answer for this step. When returning a null value, it means that the step is not able to answer to the current request.
Default implementation returns null.
-
selectFromBus
Function1<BotBus, Boolean> selectFromBus()
Does this Step has to be selected from the Bus? This method is called if StoryHandlerBase.checkPreconditions does not call BotBus.end. If this functions returns true, the step is selected and remaining steps are not tested.
-
selectFromAction
Boolean selectFromAction(UserTimeline userTimeline, Dialog dialog, Action action, Intent intent)
Does this Step has to be automatically selected from the action context? if returns true, the step is selected.
-
selectFromDialog
Boolean selectFromDialog(UserTimeline userTimeline, Dialog dialog, Intent intent)
Does this Step has to be automatically selected from the dialog context? if returns true, the step is selected.
-
selectFromActionAndEntityStepSelection
Boolean selectFromActionAndEntityStepSelection(Action action, Intent intent)
Does this step hast to be selected from its entityStepSelection? Returns null if there is no entityStepSelection.
-
selectFromDialogAndEntityStepSelection
Boolean selectFromDialogAndEntityStepSelection(Dialog dialog, Intent intent)
Does this step hast to be selected from its entityStepSelection? Returns null if there is no entityStepSelection.
-
supportStarterIntent
Boolean supportStarterIntent(Intent i)
Does this step support this intent as starter intent?
-
supportIntent
Boolean supportIntent(Intent i)
Does this step support this intent?
-
getBaseIntent
IntentAware getBaseIntent()
-
getIntent
IntentAware getIntent()
-
getOtherStarterIntents
Set<IntentAware> getOtherStarterIntents()
-
getSecondaryIntents
Set<IntentAware> getSecondaryIntents()
-
getChildren
Set<StoryStep<T>> getChildren()
-
getHasNoChildren
Boolean getHasNoChildren()
-
getEntityStepSelection
EntityStepSelection getEntityStepSelection()
-
getMetrics
List<StoryDefinitionStepMetric> getMetrics()
-
-
-
-