Package 

Interface IVoiceCommerceApi

  • 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

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • 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.
      • 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.