org.jasig.portlet.weather.dao.yahoo
Class YahooWeatherDaoImpl

java.lang.Object
  extended by 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 Object
implements IWeatherDao, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean


Constructor Summary
YahooWeatherDaoImpl()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 Collection<Location> find(String location)
           
protected  Object getAndDeserialize(String url)
           
 Weather getWeather(String locationCode, TemperatureUnit unit)
          Gets the weather from an implemented source.
 String getWeatherProviderLink()
           
 String getWeatherProviderName()
           
 void setConnectionTimeout(int connectionTimeout)
           
 void setKey(String key)
           
 void setLocationParsingService(IYahooLocationParsingService parser)
           
 void setReadTimeout(int readTimeout)
           
 void setTimesToRetry(int timesToRetry)
           
 void setWeatherParsingService(IYahooWeatherParsingService parser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YahooWeatherDaoImpl

public YahooWeatherDaoImpl()
Method Detail

setWeatherParsingService

public void setWeatherParsingService(IYahooWeatherParsingService parser)

setLocationParsingService

public void setLocationParsingService(IYahooLocationParsingService parser)

setKey

public void setKey(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 Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
Exception

find

public Collection<Location> find(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(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 String getWeatherProviderName()
Specified by:
getWeatherProviderName in interface IWeatherDao

getWeatherProviderLink

public String getWeatherProviderLink()
Specified by:
getWeatherProviderLink in interface IWeatherDao

getAndDeserialize

protected Object getAndDeserialize(String url)


Copyright © 2011 Jasig. All Rights Reserved.