Class TelegramUIServiceImpl

java.lang.Object
my.uum.service.impl.TelegramUIServiceImpl
All Implemented Interfaces:
TelegramUIService

public class TelegramUIServiceImpl extends Object implements TelegramUIService
Implementation of the TelegramUIService interface for handling Telegram UI operations.
  • Constructor Details

    • TelegramUIServiceImpl

      public TelegramUIServiceImpl(MessagingService messagingService, WeatherService weatherService)
      Constructor to initialize the TelegramUIServiceImpl with necessary services.
      Parameters:
      messagingService - the messaging service to use for sending messages
      weatherService - the weather service to use for retrieving weather data
  • Method Details

    • showMainMenu

      public void showMainMenu(String chatId)
      Shows the main menu to the user.
      Specified by:
      showMainMenu in interface TelegramUIService
      Parameters:
      chatId - the ID of the chat to send the menu to
    • showStatesList

      public void showStatesList(String chatId)
      Shows the list of states to the user.
      Specified by:
      showStatesList in interface TelegramUIService
      Parameters:
      chatId - the ID of the chat to send the list to
    • showStateOptions

      public void showStateOptions(String chatId, String state)
      Shows the options for a specific state to the user.
      Specified by:
      showStateOptions in interface TelegramUIService
      Parameters:
      chatId - the ID of the chat to send the options to
      state - the state for which to show the options
    • showDistrictsForState

      public void showDistrictsForState(String chatId, String state)
      Shows the list of districts for a specific state to the user.
      Specified by:
      showDistrictsForState in interface TelegramUIService
      Parameters:
      chatId - the ID of the chat to send the list to
      state - the state for which to show the districts
    • showCitiesForState

      public void showCitiesForState(String chatId, String state)
      Shows the list of cities for a specific state to the user.
      Specified by:
      showCitiesForState in interface TelegramUIService
      Parameters:
      chatId - the ID of the chat to send the list to
      state - the state for which to show the cities
    • showWeatherResult

      public void showWeatherResult(String chatId, String location, String weatherInfo)
      Shows the weather result for a specific location to the user.
      Specified by:
      showWeatherResult in interface TelegramUIService
      Parameters:
      chatId - the ID of the chat to send the weather result to
      location - the location for which to show the weather result
      weatherInfo - the weather information to display
    • findStateForLocation

      public String findStateForLocation(String location)
      Finds the state for a given location.
      Specified by:
      findStateForLocation in interface TelegramUIService
      Parameters:
      location - the location to find the state for
      Returns:
      the state for the given location, or null if not found