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


Constructor Summary
YahooWeatherDaoImpl()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 java.util.Collection<Location> find(java.lang.String location)
           
protected  java.lang.Object getAndDeserialize(java.lang.String url)
           
 Weather getWeather(java.lang.String locationCode, TemperatureUnit unit)
          Gets the weather from an implemented source.
 java.lang.String getWeatherProviderLink()
           
 java.lang.String getWeatherProviderName()
           
 void setConnectionTimeout(int connectionTimeout)
           
 void setKey(java.lang.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(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.