-
- All Implemented Interfaces:
-
ai.tock.bot.definition.StoryStep
public interface StoryDataStep<T extends StoryHandlerDefinition, TD extends Object, D extends Object> implements StoryStep<T>
A step that can have specific preconditions and can use input data object in handler.
-
-
Method Summary
Modifier and Type Method Description Function1<T, Object>answer()The custom answer for this step. Function2<T, TD, Boolean>selectFromBusAndData()Does this Step has to be selected from the Bus? Function2<T, TD, D>checkPreconditions()Checks preconditions - if BotBus.end is called, StoryHandlerDefinition.handle is not called and the handling of bot answer is over. Function2<T, D, Object>handler()The custom handler for this step. abstract StringgetName()The name of the step. IntentAwaregetBaseIntent()IntentAwaregetIntent()Set<IntentAware>getOtherStarterIntents()Set<IntentAware>getSecondaryIntents()Set<StoryStep<T>>getChildren()BooleangetHasNoChildren()EntityStepSelectiongetEntityStepSelection()-
Methods inherited from class ai.tock.bot.definition.StoryDataStep
selectFromAction, selectFromActionAndEntityStepSelection, selectFromBus, selectFromDialog, selectFromDialogAndEntityStepSelection, supportIntent, supportStarterIntent -
Methods inherited from class ai.tock.bot.definition.StoryStep
equals, hashCode, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
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.
-
selectFromBusAndData
Function2<T, TD, Boolean> selectFromBusAndData()
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.
-
checkPreconditions
Function2<T, TD, D> checkPreconditions()
Checks preconditions - if BotBus.end is called, StoryHandlerDefinition.handle is not called and the handling of bot answer is over. Returned data is used in subsequent call of handler if not null
else StoryHandlerBase.checkPreconditions returned data is used.
-
handler
Function2<T, D, Object> handler()
The custom handler 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.
-
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()
-
-
-
-