Package ai.tock.bot.definition
Interface StoryHandlerDefinition
-
- All Implemented Interfaces:
-
ai.tock.bot.engine.BotBus,ai.tock.bot.engine.Bus,ai.tock.bot.engine.I18nTranslator,ai.tock.translator.I18nKeyProvider
public interface StoryHandlerDefinition implements BotBus
Story handler definitions are used in StoryHandler to provide custom context and to manage specific connector behaviour.
Implementations should usually use StoryHandlerDefinitionBase.
-
-
Method Summary
Modifier and Type Method Description abstract Unithandle()The main method to implement. UnitanswerWith(CharSequence default, Function0<Object> messageProvider)Answers with the specified parameters. ConnectorStoryHandler<?>getConnector()-
Methods inherited from class ai.tock.bot.engine.BotBus
booleanChoice, changeContextValue, changeContextValue, changeEntityText, changeEntityValue, changeEntityValue, changeEntityValue, changeUserLocale, choice, contextValue, contextValue, createMetric, defaultDelay, end, end, end, end, end, end, end, endRawText, entityText, entityText, entityValue, entityValue, entityValueDetails, entityValueDetails, getAction, getBotDefinition, getBusContextValue, getBusContextValue, getConnectorData, getContextId, getCurrentDialog, getCurrentIntent, getDialog, getEntities, getI18nProvider, getNextUserActionState, getStep, getStepName, getStory, getTest, getTrackedStoryId, getUnderlyingConnector, getUserPreferences, getUserText, getUserTimeline, handleAndSwitchStory, hasActionEntity, hasActionEntity, hasChoiceValue, i18n, i18nKey, i18nKey, isChoiceAction, isCompatibleWith, isFeatureEnabled, isIntent, markAsUnknown, nlpStats, reloadProfile, removeAllEntityValues, removeEntityValue, removeEntityValue, resetDialogState, send, send, send, send, send, send, send, send, setBusContextValue, setBusContextValue, setI18nProvider, setNextUserActionState, setStep, setStory, skipAnswer, switchStory, withMessage, withNotificationType, withPriority, withVisibility -
Methods inherited from class ai.tock.translator.I18nKeyProvider
i18n -
Methods inherited from class ai.tock.bot.engine.Bus
getApplicationId, getBotId, getCurrentAnswerIndex, getIntent, getUserId, sendDebugData, sendRawText, withMessage, withMessage -
Methods inherited from class ai.tock.bot.engine.I18nTranslator
getSourceConnectorType, getTargetConnectorType, getUserInterfaceType, getUserLocale, translate, translate, translate, translateAndReturnBlankAsNull -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
answerWith
Unit answerWith(CharSequence default, Function0<Object> messageProvider)
Answers with the specified parameters.
- Parameters:
default- used if messageProvider returns nullmessageProvider- provides the answer - a message or a list of messages
-
getConnector
ConnectorStoryHandler<?> getConnector()
-
-
-
-