Package com.weather.info.service
Interface WeatherService
- All Known Implementing Classes:
WeatherServiceImpl
public interface WeatherService
WeatherService is a interface for the service layer of this application.
This class is responsible to fetch weather information from OpenWeather API and store it in RDBMS.
-
Method Summary
Modifier and TypeMethodDescriptiongetWeatherInformation
(long pincode, String date) This method is responsible to fetch weather information from OpenWeatherAPI and store it in RDBMS.
-
Method Details
-
getWeatherInformation
This method is responsible to fetch weather information from OpenWeatherAPI and store it in RDBMS. This method also performs internal sanity checks on the given input parameters. Returns Weather information from db if already exists in db or fetches, stores and returns the information by calling OpenWeatherAPI.- Parameters:
pincode
- pincode represents the zip code for which the weather information needs to be fetcheddate
- date represents the data for which the weather information needs to be fetched.- Returns:
- Weather information for a pincode for a particular date.
-