public static class StoryStep.DefaultImpls
A step (the implementation is usually an enum) is a part of a interface StoryDefinition.
Used to manage workflow in a interface StoryHandler.
interface StoryDefinition,
interface StoryHandler@NotNull public static kotlin.jvm.functions.Function1<T,java.lang.Object> answer(StoryStep<T> $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 IntentAware getBaseIntent(StoryStep<T> $this)
Returns intent or the StoryDefinition.mainIntent if intent is null.
intent,
StoryDefinition.mainIntent,
intent@Nullable public static IntentAware getIntent(StoryStep<T> $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(StoryStep<T> $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(StoryStep<T> $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(StoryStep<T> $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(StoryStep<T> $this, @NotNull Intent i)
Does this step support this intent as starter intent?
public static boolean supportIntent(StoryStep<T> $this, @NotNull Intent i)
Does this step support this intent?
@NotNull public static java.util.Set<ai.tock.bot.definition.StoryStep> getChildren(StoryStep<T> $this)
The optional children of the step.