-
- 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classStoryHandlerDefinitionBase.Companion
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StoryHandlerDefinitionBase(BotBus bus)
-
Method Summary
-
Methods inherited from class ai.tock.bot.definition.StoryHandlerDefinitionBase
answerWith, booleanChoice, changeContextValue, changeContextValue, changeEntityText, changeEntityValue, changeEntityValue, changeEntityValue, choice, contextValue, contextValue, defaultDelay, end, end, end, end, end, end, end, endRawText, entityText, entityText, entityValue, entityValue, entityValueDetails, entityValueDetails, getBusContextValue, getBusContextValue, handleAndSwitchStory, hasActionEntity, hasActionEntity, hasChoiceValue, i18n, i18nKey, isChoiceAction, isFeatureEnabled, isIntent, markAsUnknown, nlpStats, reloadProfile, removeAllEntityValues, removeEntityValue, removeEntityValue, resetDialogState, send, send, send, send, send, send, send, setBusContextValue, setBusContextValue, skipAnswer, switchStory, withMessage, withNotificationType, withPriority, withVisibility -
Methods inherited from class ai.tock.bot.engine.I18nTranslator
i18n -
Methods inherited from class ai.tock.bot.engine.BotBus
sendRawText, withMessage, withMessage -
Methods inherited from class ai.tock.bot.engine.Bus
translate, translate, translate, translateAndReturnBlankAsNull -
Methods inherited from class ai.tock.translator.I18nKeyProvider
equals, hashCode, toString -
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
-
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.
-
getConnectorType
final ConnectorType getConnectorType()
Shortcut for BotBus.targetConnectorType.
-
getConnector
T getConnector()
-
getBotDefinition
BotDefinition getBotDefinition()
-
getUserTimeline
UserTimeline getUserTimeline()
-
getCurrentDialog
Dialog getCurrentDialog()
-
getCurrentIntent
IntentAware getCurrentIntent()
-
getConnectorData
ConnectorData getConnectorData()
-
getUserPreferences
UserPreferences getUserPreferences()
-
getUnderlyingConnector
Connector getUnderlyingConnector()
-
getEntities
Map<String, EntityStateValue> getEntities()
-
getI18nProvider
I18nKeyProvider getI18nProvider()
-
getNextUserActionState
NextUserActionState getNextUserActionState()
-
getStep
StoryStep<out StoryHandlerDefinition> getStep()
-
getStepName
String getStepName()
-
getUserText
String getUserText()
-
getContextId
String getContextId()
-
getApplicationId
String getApplicationId()
-
getIntent
IntentAware getIntent()
-
getCurrentAnswerIndex
Integer getCurrentAnswerIndex()
-
getUserLocale
Locale getUserLocale()
-
getUserInterfaceType
UserInterfaceType getUserInterfaceType()
-
getTargetConnectorType
ConnectorType getTargetConnectorType()
-
setI18nProvider
Unit setI18nProvider(I18nKeyProvider i18nProvider)
-
setNextUserActionState
Unit setNextUserActionState(NextUserActionState nextUserActionState)
-
setStep
Unit setStep(StoryStep<out StoryHandlerDefinition> step)
-
-
-
-