org.jasig.portlet.weather.dao.yahoo
Class YahooWeatherDaoImpl
java.lang.Object
org.jasig.portlet.weather.dao.yahoo.YahooWeatherDaoImpl
- All Implemented Interfaces:
- IWeatherDao, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
public class YahooWeatherDaoImpl
- extends java.lang.Object
- implements IWeatherDao, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
YahooWeatherDaoImpl
public YahooWeatherDaoImpl()
setWeatherParsingService
public void setWeatherParsingService(IYahooWeatherParsingService parser)
setLocationParsingService
public void setLocationParsingService(IYahooLocationParsingService parser)
setKey
public void setKey(java.lang.String key)
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
setReadTimeout
public void setReadTimeout(int readTimeout)
setTimesToRetry
public void setTimesToRetry(int timesToRetry)
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
destroy
public void destroy()
throws java.lang.Exception
- Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
- Throws:
java.lang.Exception
find
public java.util.Collection<Location> find(java.lang.String location)
- Specified by:
find in interface IWeatherDao
- 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.
getWeather
public Weather getWeather(java.lang.String locationCode,
TemperatureUnit unit)
- Description copied from interface:
IWeatherDao
- Gets the weather from an implemented source.
- Specified by:
getWeather in interface IWeatherDao
- Parameters:
locationCode - A string value representing the location to retrieve weather
from.
- Returns:
- A Weather object representing the current weather and an optional
forecast.
getWeatherProviderName
public java.lang.String getWeatherProviderName()
- Specified by:
getWeatherProviderName in interface IWeatherDao
getWeatherProviderLink
public java.lang.String getWeatherProviderLink()
- Specified by:
getWeatherProviderLink in interface IWeatherDao
getAndDeserialize
protected java.lang.Object getAndDeserialize(java.lang.String url)
Copyright © 2010 Jasig. All Rights Reserved.