-
- All Implemented Interfaces:
public class AlexaTockMapperAn Alexa model to Tock model mapper. Provided via addAlexaConnector.alexaTockMapper parameter.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringapplicationId
-
Constructor Summary
Constructors Constructor Description AlexaTockMapper(String applicationId)
-
Method Summary
Modifier and Type Method Description final StringgetApplicationId()StringalexaIntentToTockIntent(IntentRequest request, BotDefinition botDefinition)Returns a Tock intent from an Alexa intent. EntityalexaEntityToTockEntity(IntentRequest request, String intent, String slot, BotDefinition botDefinition)Returns a Tock entity from an Alexa slot. NlpEntityValuealexaEntityToTockEntityValue(IntentRequest request, String intent, Slot slot, BotDefinition botDefinition, Integer index)Returns a Tock NlpEntityValue from an Alexa slot. Map<String, Slot>getSlots(IntentRequest request)Gets slots from the intent request. StartSessionEventtoStartSessionEvent(SpeechletRequestEnvelope<SessionStartedRequest> requestEnvelope)Returns a StartSessionEvent from an Alexa SessionStartedRequest. EndSessionEventtoEndSessionEvent(SpeechletRequestEnvelope<SessionEndedRequest> requestEnvelope)Returns a EndSessionEvent from an Alexa SessionEndedRequest. EventtoEvent(String userId, IntentRequest request, BotDefinition botDefinition)Returns an Event from an Alexa IntentRequest. -
-
Constructor Detail
-
AlexaTockMapper
AlexaTockMapper(String applicationId)
-
-
Method Detail
-
getApplicationId
final String getApplicationId()
-
alexaIntentToTockIntent
String alexaIntentToTockIntent(IntentRequest request, BotDefinition botDefinition)
Returns a Tock intent from an Alexa intent.
-
alexaEntityToTockEntity
Entity alexaEntityToTockEntity(IntentRequest request, String intent, String slot, BotDefinition botDefinition)
Returns a Tock entity from an Alexa slot.
-
alexaEntityToTockEntityValue
NlpEntityValue alexaEntityToTockEntityValue(IntentRequest request, String intent, Slot slot, BotDefinition botDefinition, Integer index)
Returns a Tock NlpEntityValue from an Alexa slot.
-
toStartSessionEvent
StartSessionEvent toStartSessionEvent(SpeechletRequestEnvelope<SessionStartedRequest> requestEnvelope)
Returns a StartSessionEvent from an Alexa SessionStartedRequest.
-
toEndSessionEvent
EndSessionEvent toEndSessionEvent(SpeechletRequestEnvelope<SessionEndedRequest> requestEnvelope)
Returns a EndSessionEvent from an Alexa SessionEndedRequest.
-
-
-
-