Package ai.tock.bot.definition
Class StoryHandlerDefinitionBase
-
- All Implemented Interfaces:
-
ai.tock.bot.definition.StoryHandlerDefinition,ai.tock.bot.engine.BotBus,ai.tock.bot.engine.Bus,ai.tock.bot.engine.I18nTranslator,ai.tock.translator.I18nKeyProvider
public abstract class StoryHandlerDefinitionBase<T extends ConnectorStoryHandlerBase<?>> implements BotBus, StoryHandlerDefinition
Base implementation of StoryHandlerDefinition.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StoryHandlerDefinitionBase(BotBus bus)
-
Method Summary
Modifier and Type Method Description final ConnectorTypegetConnectorType()Shortcut for BotBus.targetConnectorType. TgetConnector()final TgetC()final BotBusgetBus()Unitanswer()The method to implement if there is no StoryStep in the StoryDefinition or when current StoryStep is null Unithandle()Default implementation redirect to answer. TfindConnector(ConnectorType connectorType)Method to override in order to provide ConnectorStoryHandler. TfindConnector(String connectorId)Method to override in order to provide ConnectorStoryHandler. -
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.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 ai.tock.translator.I18nKeyProvider
i18n -
Methods inherited from class ai.tock.bot.definition.StoryHandlerDefinition
answerWith -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
StoryHandlerDefinitionBase
StoryHandlerDefinitionBase(BotBus bus)
-
-
Method Detail
-
getConnectorType
final ConnectorType getConnectorType()
Shortcut for BotBus.targetConnectorType.
-
getConnector
T getConnector()
-
answer
Unit answer()
The method to implement if there is no StoryStep in the StoryDefinition or when current StoryStep is null
-
findConnector
T findConnector(ConnectorType connectorType)
Method to override in order to provide ConnectorStoryHandler. Default implementation use annotations annotated with @ConnectorHandler.
-
findConnector
T findConnector(String connectorId)
Method to override in order to provide ConnectorStoryHandler. Default implementation use annotations annotated with @ConnectorIdHandlers.
-
-
-
-