org.jasig.portlet.weather.dao
Interface IWeatherDao

All Known Implementing Classes:
WorldWeatherOnlineDaoImpl, YahooWeatherDaoImpl

public interface IWeatherDao

Weather data access interface. Implement this interface to retrieve weather information from source.

Version:
$Id: IWeatherDao.java 22379 2010-11-15 22:19:56Z edalquist $
Author:
Dustin Schultz

Method Summary
 Collection<Location> find(String location)
           
 Weather getWeather(String locationCode, TemperatureUnit unit)
          Gets the weather from an implemented source.
 String getWeatherProviderLink()
           
 String getWeatherProviderName()
           
 

Method Detail

getWeather

@Cacheable(cacheName="weatherDataCache",
           exceptionCacheName="weatherDataErrorCache",
           selfPopulating=true)
Weather getWeather(String locationCode,
                             TemperatureUnit unit)
Gets the weather from an implemented source.

Parameters:
locationCode - A string value representing the location to retrieve weather from.
metric - A boolean value representing metric or not.
Returns:
A Weather object representing the current weather and an optional forecast.

find

@Cacheable(cacheName="weatherSearchCache",
           exceptionCacheName="weatherSearchErrorCache",
           selfPopulating=true)
Collection<Location> find(String location)
Parameters:
location - A String representing a location to find
Returns:
A collection of locations representing the possible location or an empty or null collection representing location not found.

getWeatherProviderName

String getWeatherProviderName()

getWeatherProviderLink

String getWeatherProviderLink()


Copyright © 2011 Jasig. All Rights Reserved.