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

Plugin Availability

The Import Tool plugin is available in the blojsom add-on bundle. This is a separate download from the blojsom.war file.

Description

This is a wrapper for the Velocity Import Tool where an object is added to the context so that you can retrieve URLs in your templates.

Installation and Setup

After downloading the blojsom add-on bundle, copy the blojsom-addon-plugins-{version}.jar and velocity-tools-1.1.jar file into your /WEB-INF/lib directory.

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

<bean id="import-tool" class="org.blojsom.plugin.tools.ImportToolPlugin" init-method="init" destroy-method="destroy"/>

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

Usage and URL Parameters

There are no URL parameters to control the operation of the Import Tool 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_PLUGIN_IMPORT_TOOL Output org.apache.velocity.tools.view.tools.ImportTool object You may then make use of the read method in your templates to read a value from a URL and insert its contents as a String in your template.

Usage

This is some part of my template where I want to insert the contents of another URL. 
$BLOJSOM_PLUGIN_IMPORT_TOOL.read("http://some.url.com")
And this is more of my template.

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