Package ai.tock.bot.definition
Class DefinitionBuildersKt
-
- All Implemented Interfaces:
public final class DefinitionBuildersKt
-
-
Method Summary
Modifier and Type Method Description final static SimpleBotDefinitionbot(String botId, List<StoryDefinition> stories, String namespace, String nlpModelName, StoryDefinition unknownStory, IntentAware hello, IntentAware goodbye, IntentAware noInput, IntentAware botDisabled, IntentAware botEnabled, IntentAware userLocation, IntentAware handleAttachment, EventListener eventListener, StoryDefinition keywordStory, DialogFlowDefinition conversation, Function1<Action, Unit> botEnabledListener)Creates a new bot. final static StoryDefinitionBasestory(SimpleStoryHandlerBase handler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface)Creates a new story. final static StoryDefinitionBasestory(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface, Function1<BotBus, Unit> handler)Creates a new story. final static <T extends StoryHandlerDefinition> StoryDefinitionBasestory(StoryHandlerBase<T> handler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface)Creates a new story. final static StoryDefinitionBasestory(IntentAware intent, StoryHandler storyHandler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface)Creates a new story from a StoryHandler. final static <T extends StoryHandlerDefinition, D extends Any> StoryDefinitionBasestoryDataDefWithSteps(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface, HandlerStoryDefinitionCreator<T> handlerDefCreator, Function1<BotBus, D> preconditionsChecker)Creates a new story. final static <T extends StoryHandlerDefinition> StoryDefinitionBasestoryDef(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface, HandlerStoryDefinitionCreator<T> handlerDefCreator, Function1<BotBus, Unit> preconditionsChecker)Creates a new story. final static <T extends StoryHandlerDefinition, S extends Enum<S>, StoryStep<out StoryHandlerDefinition>, D extends Any> StoryDefinitionBasestoryDataDefWithSteps(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface, HandlerStoryDefinitionCreator<T> handlerDefCreator, Function1<BotBus, D> preconditionsChecker)Creates a new story. final static <T extends StoryHandlerDefinition, S extends Enum<S>, StoryStep<out StoryHandlerDefinition>> StoryDefinitionBasestoryDefWithSteps(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface, HandlerStoryDefinitionCreator<T> handlerDefCreator, Function1<BotBus, Unit> preconditionsChecker)Creates a new story. final static <T extends Enum<T>, StoryStep<out StoryHandlerDefinition>> StoryDefinitionBasestoryWithSteps(StoryHandlerBase<?> handler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface)Creates a new story from a StoryHandlerBase. final static <T extends Enum<T>, StoryStep<out StoryHandlerDefinition>> StoryDefinitionBasestoryWithSteps(IntentAware intent, StoryHandler storyHandler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface)Creates a new story from a StoryHandler. final static <T extends Enum<T>, StoryStep<out StoryHandlerDefinition>> StoryDefinitionBasestoryWithSteps(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface, Function1<BotBus, Unit> handler)Creates a new story. final static Unitnotify(String applicationId, String namespace, String botId, PlayerId recipientId, IntentAware intent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, NotifyBotStateModifier stateModifier, ActionNotificationType notificationType, Function1<Throwable, Unit> errorListener)Sends a notification to a connector. -
-
Method Detail
-
bot
final static SimpleBotDefinition bot(String botId, List<StoryDefinition> stories, String namespace, String nlpModelName, StoryDefinition unknownStory, IntentAware hello, IntentAware goodbye, IntentAware noInput, IntentAware botDisabled, IntentAware botEnabled, IntentAware userLocation, IntentAware handleAttachment, EventListener eventListener, StoryDefinition keywordStory, DialogFlowDefinition conversation, Function1<Action, Unit> botEnabledListener)
Creates a new bot.
-
story
final static StoryDefinitionBase story(SimpleStoryHandlerBase handler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface)
Creates a new story.
-
story
final static StoryDefinitionBase story(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface, Function1<BotBus, Unit> handler)
Creates a new story.
-
story
final static <T extends StoryHandlerDefinition> StoryDefinitionBase story(StoryHandlerBase<T> handler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface)
Creates a new story.
-
story
final static StoryDefinitionBase story(IntentAware intent, StoryHandler storyHandler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface)
Creates a new story from a StoryHandler.
-
storyDataDefWithSteps
final static <T extends StoryHandlerDefinition, D extends Any> StoryDefinitionBase storyDataDefWithSteps(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface, HandlerStoryDefinitionCreator<T> handlerDefCreator, Function1<BotBus, D> preconditionsChecker)
Creates a new story.
-
storyDef
final static <T extends StoryHandlerDefinition> StoryDefinitionBase storyDef(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<StoryStep<out StoryHandlerDefinition>> steps, UserInterfaceType unsupportedUserInterface, HandlerStoryDefinitionCreator<T> handlerDefCreator, Function1<BotBus, Unit> preconditionsChecker)
Creates a new story.
-
storyDataDefWithSteps
final static <T extends StoryHandlerDefinition, S extends Enum<S>, StoryStep<out StoryHandlerDefinition>, D extends Any> StoryDefinitionBase storyDataDefWithSteps(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface, HandlerStoryDefinitionCreator<T> handlerDefCreator, Function1<BotBus, D> preconditionsChecker)
Creates a new story.
-
storyDefWithSteps
final static <T extends StoryHandlerDefinition, S extends Enum<S>, StoryStep<out StoryHandlerDefinition>> StoryDefinitionBase storyDefWithSteps(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface, HandlerStoryDefinitionCreator<T> handlerDefCreator, Function1<BotBus, Unit> preconditionsChecker)
Creates a new story.
-
storyWithSteps
final static <T extends Enum<T>, StoryStep<out StoryHandlerDefinition>> StoryDefinitionBase storyWithSteps(StoryHandlerBase<?> handler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface)
Creates a new story from a StoryHandlerBase.
-
storyWithSteps
final static <T extends Enum<T>, StoryStep<out StoryHandlerDefinition>> StoryDefinitionBase storyWithSteps(IntentAware intent, StoryHandler storyHandler, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface)
Creates a new story from a StoryHandler.
-
storyWithSteps
final static <T extends Enum<T>, StoryStep<out StoryHandlerDefinition>> StoryDefinitionBase storyWithSteps(String intentName, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, UserInterfaceType unsupportedUserInterface, Function1<BotBus, Unit> handler)
Creates a new story.
-
notify
final static Unit notify(String applicationId, String namespace, String botId, PlayerId recipientId, IntentAware intent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters, NotifyBotStateModifier stateModifier, ActionNotificationType notificationType, Function1<Throwable, Unit> errorListener)
Sends a notification to a connector. A Bus is created and the corresponding story is called.
- Parameters:
applicationId- the configuration connector idnamespace- the configuration namespacebotId- the configuration botIdrecipientId- the recipient identifierintent- the notification intentstep- the optional step targetparameters- the optional parametersstateModifier- allow the notification to bypass current user statenotificationType- the notification type if anyerrorListener- called when a message has not been delivered
-
-
-
-