Dashboard > blojsom 3.0 > ... > Plugins > Weather Plugin
  blojsom 3.0 Log In   View a printable version of the current page.  
  Weather Plugin
Added by David Czarnecki, last edited by David Czarnecki on Jul 10, 2007
Labels: 
(None)

Description

This plugin will retrieve the weather forecast for a given weather station code and make it available for display in your templates. Values for temperature, wind, visibility, etc are available.

Availability

This plugin is available as of blojsom 2.23.

Installation and Setup

In your /WEB-INF/classes/blojsom-plugins.xml file, add the following:

<bean id="weather" class="org.blojsom.plugin.weather.WeatherPlugin" init-method="init" destroy-method="destroy">
    </bean>

You may then add "weather" to the end one of the flavor-based plugin chains.

The following properties can be set from Weblog Settings | Properties | Set Property

Parameter Required Default value Description
weather-station-code true   The weather staton id to retrieve the forecast for. Example: KSQL is San Carlos, CA.
weather-provider true org.blojsom.plugin.weather.beans.NWSInformation Class that actually retrieves and parses the weather feed. A default provider for the National Weather Service's XML Feeds in included and will be used is non is specified.

NOTE: You can find your weather station code by visiting the National Weather Service

The Weather plugin poll time which specifies when its internal thread wakes up and checks the weather forecast setup for each user is configured in /WEB-INF/web.xml.

<init-param>
    <param-name>plugin-weather-poll-time</param-name>
    <param-value>time specified in seconds</param-value>
</init-param>

If this parameter is not found in /WEB-INF/web.xml, a default value of 60 minutes will be used for the poll time.

Usage and URL Parameters

There are no URL parameters to control the operation of the Weather plugin.

Context Attributes and Types

The following table describes the context attributes that are available and their associated type.

Context key Input or Output Type Description
BLOJSOM_WEATHER_INFORMATION Output org.blojsom.plugin.weather.beans.WeatherInformation You may then make use of the WeatherInformation object in your templates.

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators