public class WorldWeatherOnlineDaoImpl extends Object implements IWeatherDao, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean
| Constructor and Description |
|---|
WorldWeatherOnlineDaoImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected List<Location> |
deserializeSearchResults(InputStream inputStream) |
protected Weather |
deserializeWeatherResult(InputStream inputStream,
TemperatureUnit unit) |
void |
destroy() |
Collection<Location> |
find(String location) |
protected Object |
getAndDeserialize(String url,
TemperatureUnit unit) |
Weather |
getWeather(String locationCode,
TemperatureUnit unit)
Gets the weather from an implemented source.
|
String |
getWeatherProviderLink() |
String |
getWeatherProviderName() |
void |
setConnectionTimeout(int connectionTimeout) |
void |
setImageMapping(org.springframework.core.io.Resource imageMapping) |
void |
setKey(String key) |
void |
setReadTimeout(int readTimeout) |
void |
setTimesToRetry(int timesToRetry) |
public void setConnectionTimeout(int connectionTimeout)
public void setReadTimeout(int readTimeout)
public void setTimesToRetry(int timesToRetry)
public void setKey(String key)
public void setImageMapping(org.springframework.core.io.Resource imageMapping)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic Collection<Location> find(String location)
find in interface IWeatherDaolocation - A String representing a location to findpublic Weather getWeather(String locationCode, TemperatureUnit unit)
IWeatherDaogetWeather in interface IWeatherDaolocationCode - A string value representing the location to retrieve weather from.public String getWeatherProviderName()
getWeatherProviderName in interface IWeatherDaopublic String getWeatherProviderLink()
getWeatherProviderLink in interface IWeatherDaoprotected Object getAndDeserialize(String url, TemperatureUnit unit)
protected Weather deserializeWeatherResult(InputStream inputStream, TemperatureUnit unit) throws JAXBException, ParseException
JAXBExceptionParseExceptionprotected List<Location> deserializeSearchResults(InputStream inputStream) throws JAXBException
JAXBExceptionCopyright © 2015 Jasig. All Rights Reserved.