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
 java.util.Collection<Location> find(java.lang.String location)
           
 Weather getWeather(java.lang.String locationCode, TemperatureUnit unit)
          Gets the weather from an implemented source.
 java.lang.String getWeatherProviderLink()
           
 java.lang.String getWeatherProviderName()
           
 

Method Detail

getWeather

@Cacheable(cacheName="weatherDataCache",
           exceptionCacheName="weatherDataErrorCache",
           selfPopulating=true)
Weather getWeather(java.lang.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)
java.util.Collection<Location> find(java.lang.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

java.lang.String getWeatherProviderName()

getWeatherProviderLink

java.lang.String getWeatherProviderLink()


Copyright © 2010 Jasig. All Rights Reserved.