Package my.uum.service.impl
Class TelegramUIServiceImpl
java.lang.Object
my.uum.service.impl.TelegramUIServiceImpl
- All Implemented Interfaces:
TelegramUIService
Implementation of the TelegramUIService interface for handling Telegram UI operations.
-
Constructor Summary
ConstructorsConstructorDescriptionTelegramUIServiceImpl(MessagingService messagingService, WeatherService weatherService) Constructor to initialize the TelegramUIServiceImpl with necessary services. -
Method Summary
Modifier and TypeMethodDescriptionfindStateForLocation(String location) Finds the state for a given location.voidshowCitiesForState(String chatId, String state) Shows the list of cities for a specific state to the user.voidshowDistrictsForState(String chatId, String state) Shows the list of districts for a specific state to the user.voidshowMainMenu(String chatId) Shows the main menu to the user.voidshowStateOptions(String chatId, String state) Shows the options for a specific state to the user.voidshowStatesList(String chatId) Shows the list of states to the user.voidshowWeatherResult(String chatId, String location, String weatherInfo) Shows the weather result for a specific location to the user.
-
Constructor Details
-
TelegramUIServiceImpl
Constructor to initialize the TelegramUIServiceImpl with necessary services.- Parameters:
messagingService- the messaging service to use for sending messagesweatherService- the weather service to use for retrieving weather data
-
-
Method Details
-
showMainMenu
Shows the main menu to the user.- Specified by:
showMainMenuin interfaceTelegramUIService- Parameters:
chatId- the ID of the chat to send the menu to
-
showStatesList
Shows the list of states to the user.- Specified by:
showStatesListin interfaceTelegramUIService- Parameters:
chatId- the ID of the chat to send the list to
-
showStateOptions
Shows the options for a specific state to the user.- Specified by:
showStateOptionsin interfaceTelegramUIService- Parameters:
chatId- the ID of the chat to send the options tostate- the state for which to show the options
-
showDistrictsForState
Shows the list of districts for a specific state to the user.- Specified by:
showDistrictsForStatein interfaceTelegramUIService- Parameters:
chatId- the ID of the chat to send the list tostate- the state for which to show the districts
-
showCitiesForState
Shows the list of cities for a specific state to the user.- Specified by:
showCitiesForStatein interfaceTelegramUIService- Parameters:
chatId- the ID of the chat to send the list tostate- the state for which to show the cities
-
showWeatherResult
Shows the weather result for a specific location to the user.- Specified by:
showWeatherResultin interfaceTelegramUIService- Parameters:
chatId- the ID of the chat to send the weather result tolocation- the location for which to show the weather resultweatherInfo- the weather information to display
-
findStateForLocation
Finds the state for a given location.- Specified by:
findStateForLocationin interfaceTelegramUIService- Parameters:
location- the location to find the state for- Returns:
- the state for the given location, or null if not found
-