public class WorldWeatherOnlineDaoImpl extends java.lang.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 java.util.List<Location> |
deserializeSearchResults(java.io.InputStream inputStream) |
protected Weather |
deserializeWeatherResult(java.io.InputStream inputStream,
TemperatureUnit unit) |
void |
destroy() |
java.util.Collection<Location> |
find(java.lang.String location) |
protected java.lang.Object |
getAndDeserialize(java.lang.String url,
TemperatureUnit unit) |
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 |
setImageMapping(org.springframework.core.io.Resource imageMapping) |
void |
setKey(java.lang.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(java.lang.String key)
public void setImageMapping(org.springframework.core.io.Resource imageMapping)
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic void destroy()
throws java.lang.Exception
destroy in interface org.springframework.beans.factory.DisposableBeanjava.lang.Exceptionpublic java.util.Collection<Location> find(java.lang.String location)
find in interface IWeatherDaolocation - A String representing a location to findpublic Weather getWeather(java.lang.String locationCode, TemperatureUnit unit)
IWeatherDaogetWeather in interface IWeatherDaolocationCode - A string value representing the location to retrieve weather from.public java.lang.String getWeatherProviderName()
getWeatherProviderName in interface IWeatherDaopublic java.lang.String getWeatherProviderLink()
getWeatherProviderLink in interface IWeatherDaoprotected java.lang.Object getAndDeserialize(java.lang.String url,
TemperatureUnit unit)
protected Weather deserializeWeatherResult(java.io.InputStream inputStream, TemperatureUnit unit) throws javax.xml.bind.JAXBException, java.text.ParseException
javax.xml.bind.JAXBExceptionjava.text.ParseExceptionprotected java.util.List<Location> deserializeSearchResults(java.io.InputStream inputStream) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionCopyright © 2018 Jasig. All Rights Reserved.