public static class StoryDataStep.DefaultImpls
A step that can have specific preconditions and can use input data object in handler.
@NotNull public static kotlin.jvm.functions.Function1<T,java.lang.Object> answer(StoryDataStep<T,D> $this)
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.
@NotNull public static kotlin.jvm.functions.Function1<ai.tock.bot.engine.BotBus,D> checkPreconditions(StoryDataStep<T,D> $this)
Checks preconditions - if BotBus.end is called,
StoryHandlerDefinition.handle is not called and the handling of bot answer is over.
BotBus.end,
StoryHandlerDefinition.handle@NotNull public static kotlin.jvm.functions.Function2<T,D,java.lang.Object> handler(StoryDataStep<T,D> $this)
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.
@NotNull public static IntentAware getBaseIntent(StoryDataStep<T,D> $this)
Returns intent or the StoryDefinition.mainIntent if intent is null.
intent,
StoryDefinition.mainIntent,
intent@Nullable public static IntentAware getIntent(StoryDataStep<T,D> $this)
The main intent of the step.
If not null and if the current intent is equals to intent,
this step will be automatically selected to be the current step.
intent@NotNull public static java.util.Set<ai.tock.bot.definition.IntentAware> getOtherStarterIntents(StoryDataStep<T,D> $this)
Same behaviour than intent in the rare case when the step handle more than one intent.
intent@NotNull public static java.util.Set<ai.tock.bot.definition.IntentAware> getSecondaryIntents(StoryDataStep<T,D> $this)
The secondary intents of this step. If detected and if the current step is this step, the current step remains this step.
public static boolean select(StoryDataStep<T,D> $this, @NotNull UserTimeline userTimeline, @NotNull Dialog dialog, @NotNull Action action, @Nullable Intent intent)
Does this Step has to be automatically selected? if returns true, the step is selected.
public static boolean supportStarterIntent(StoryDataStep<T,D> $this, @NotNull Intent i)
Does this step support this intent as starter intent?
public static boolean supportIntent(StoryDataStep<T,D> $this, @NotNull Intent i)
Does this step support this intent?
@NotNull public static java.util.Set<ai.tock.bot.definition.StoryStep> getChildren(StoryDataStep<T,D> $this)
The optional children of the step.