Package ai.tock.bot.definition
Class StoryDataStepBase
-
- All Implemented Interfaces:
-
ai.tock.bot.definition.StoryDataStep,ai.tock.bot.definition.StoryStep
public abstract class StoryDataStepBase<T extends StoryHandlerDefinition, TD extends Object, D extends Object> implements StoryDataStep<T, TD, D>
Base class for StoryDataStep implementations.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final IntentAwarebaseIntentprivate final IntentAwareintentprivate final Set<IntentAware>otherStarterIntentsprivate final Set<IntentAware>secondaryIntentsprivate final Set<StoryStep<T>>childrenprivate final BooleanhasNoChildrenprivate final EntityStepSelectionentityStepSelectionprivate final List<StoryDefinitionStepMetric>metrics
-
Method Summary
Modifier and Type Method Description StringgetName()final Function2<TD, T, Boolean>select()final Function2<T, TD, D>setup()final Function2<T, D, Object>reply()final Objectexecute(T storyDef, TD configuration)final Function2<T, TD, Boolean>selectFromBusAndData()Does this Step has to be selected from the Bus? final Function2<T, TD, D>checkPreconditions()Checks preconditions - if BotBus. final Function2<T, D, Object>handler()The custom handler for this step. -
Methods inherited from class ai.tock.bot.definition.StoryStep
getBaseIntent, getChildren, getEntityStepSelection, getHasNoChildren, getIntent, getMetrics, getOtherStarterIntents, getSecondaryIntents, selectFromAction, selectFromActionAndEntityStepSelection, selectFromBus, selectFromDialog, selectFromDialogAndEntityStepSelection, supportIntent, supportStarterIntent -
Methods inherited from class ai.tock.bot.definition.StoryDataStep
answer -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
selectFromBusAndData
final 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
final 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.
-
-
-
-