-
- All Implemented Interfaces:
public interface IVoiceCommerceApi
This interface represents the entry point to the voice service feature. It expose to the clients all the needed information for being able to search and reserve parking or order food.
All clients should use the implementation of this interface for interacting with voice feature
-
-
Method Summary
Modifier and Type Method Description abstract Unit
init(IVoiceContextProvider contextProvider, IVoiceUserServiceProvider userServiceProvider)
This method initialize the voice service. abstract Unit
addListener(VoiceTypeListener type, VoiceListener listener)
This method registers a listener which will be notified when a specific data will change Client is responsible for calling this method for being able to receive data abstract Unit
removeListener(VoiceListener listener)
This method will remove the specified listener. abstract Unit
startVoice()
This method will start the voice flow. abstract Unit
stopVoice()
This method will stop the voice TODO Think about how stop will work in TNNLU and in Novo context abstract Brand
getSearchedBrand()
Returns the searched brand, if already selected, and in FOOD domain Otherwise returns null abstract Unit
updateLocalContext(LocalContext context)
This method will update the local context. abstract IVoiceUpdateSettings
getUpdateSettingsInstance()
This method provides a concrete implementation object of the IVoiceUpdateSettings api. abstract Unit
cleanupVoiceSession()
This method will reset the current voice session. abstract Unit
resetVoicePlugin()
This method will reset the current plugin to the default one. -
-
Method Detail
-
init
abstract Unit init(IVoiceContextProvider contextProvider, IVoiceUserServiceProvider userServiceProvider)
This method initialize the voice service. Before interacting with voice service, the client is responsible to call this method
- Parameters:
contextProvider
- The context dependency required by voice service for proper running.userServiceProvider
- The user dependency required by voice service for proper running.
-
addListener
abstract Unit addListener(VoiceTypeListener type, VoiceListener listener)
This method registers a listener which will be notified when a specific data will change Client is responsible for calling this method for being able to receive data
- Parameters:
type
- The type of the listener that should be registered.listener
- The listener that corresponds with the given type.
-
removeListener
abstract Unit removeListener(VoiceListener listener)
This method will remove the specified listener. Once removed, no data will be received by the client.
- Parameters:
listener
- The listener that should be removed.
-
startVoice
abstract Unit startVoice()
This method will start the voice flow.
-
stopVoice
abstract Unit stopVoice()
This method will stop the voice TODO Think about how stop will work in TNNLU and in Novo context
-
getSearchedBrand
abstract Brand getSearchedBrand()
Returns the searched brand, if already selected, and in FOOD domain Otherwise returns null
-
updateLocalContext
abstract Unit updateLocalContext(LocalContext context)
This method will update the local context.
This method is used for "multi-model" feature.Client is responsible to call this method for being able to switch context from touch to voice and vice versa. This method should be called almost for each "touch" action
- Parameters:
context
- The context for the current flow step.
-
getUpdateSettingsInstance
abstract IVoiceUpdateSettings getUpdateSettingsInstance()
This method provides a concrete implementation object of the IVoiceUpdateSettings api. This concrete reference should be used by the client for notifying the voice service if some of the required data changed
-
cleanupVoiceSession
abstract Unit cleanupVoiceSession()
This method will reset the current voice session.
Client is responsible to call this method every time when he wants to start a fresh voice flow.
-
resetVoicePlugin
abstract Unit resetVoicePlugin()
This method will reset the current plugin to the default one.
-
-
-
-