Dashboard > blojsom 3.0 > ... > Plugins > Feed Import Plugin
  blojsom 3.0 Log In   View a printable version of the current page.  
  Feed Import Plugin
Added by David Czarnecki, last edited by David Czarnecki on Oct 06, 2006  (view change)
Labels: 

Plugin Availability

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

Description

This plugin allows you to import entries from a syndication feed into your blog. This is useful if you are migrating your blog from another software package to blojsom.

The underlying library ROME currently handles the following syndication formats.

ROME is an open source (Apache license) set of Atom/RSS Java utilities that make it easy to work in Java with most syndication formats:

RSS 0.90, RSS 0.91 Netscape, RSS 0.91 Userland, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom 0.3, and Atom 1.0

Installation and Setup

After downloading the blojsom add-on bundle, copy the blojsom-addon-plugins-{version}.jar, content-0.4.1.jar, jdom-1.0.jar, and rome-0.8.jar file into your /WEB-INF/lib directory.

Add the following to your /WEB-INF/classes/blojsom-plugins.xml file.

<bean id="feed-import" class="org.blojsom.plugin.syndication.FeedImportPlugin" init-method="init" destroy-method="destroy">
        <property name="servletConfig">
            <ref bean="servletConfigFactoryBean"/>
        </property>
        <property name="authorizationProvider">
            <ref bean="authorizationProvider"/>
        </property>
        <property name="resourceManager">
            <ref bean="resourceManager"/>
        </property>        
        <property name="fetcher">
            <ref bean="fetcher"/>
        </property>
    </bean>

Required Permissions

A user must have the following permissions in order to use this plugin.

feed_import_permission

Usage

Log in to the administration console. The syndication feed import page is available under Plugin Settings | Configure Plugins.

You can submit a URL to the syndication feed you would like to import. The following sections describe the blojsom namespace additions that you can use in your syndication feed for individual items.

Syndication Feed Additions

Namespace Declaration

The following namespace declaration is required in the opening element for your syndication feed.

xmlns:blojsom="http://rome.dev.java.net/module/blojsom/1.0"

For example, in your RSS 2.0 feed:

<rss version="2.0" xmlns:blojsom="http://rome.dev.java.net/module/blojsom/1.0">

Simple Item-level Element Additions

Item Description Example
<blojsom:author> Author of the entry. <blojsom:author>david</blojsom:author>
<blojsom:postSlug> Shorthand title of the entry. <blojsom:postSlug>Great Entry</blojsom:postSlug>
<blojsom:allowsComments> Value of "true" or "false" if comments are allowed on the entry. <blojsom:allowsComments>true</blojsom:allowsComments>
<blojsom:allowsTrackbacks> Value of "true" or "false" if trackbacks are allowed on the entry. <blojsom:allowsTrackbacks>true</blojsom:allowsTrackbacks>
<blojsom:allowsPingbacks> Value of "true" or "false" if pingbacks are allowed on the entry. <blojsom:allowsPingbacks>true</blojsom:allowsPingbacks>

Complex Item-level Element Additions

Meta-data

Item Description
<blojsom:metadataItems> Meta-data items for the entry.
<blojsom:metadata> Individual meta-data item for the entry.
<blojsom:key> Key for meta-data item.
<blojsom:value> Value for the meta-data item.

Example

<blojsom:metadataItems>
                <blojsom:metadata>
                    <blojsom:key>foo</blojsom:key>
                    <blojsom:value>bar</blojsom:value>
                </blojsom:metadata>
                <blojsom:metadata>
                    <blojsom:key>baz</blojsom:key>
                    <blojsom:value>raz</blojsom:value>
                </blojsom:metadata>
            </blojsom:metadataItems>

Comments

Item Description
<blojsom:comments> Element for comments for the entry.
<blojsom:comment> Element for an individual comment for the entry.
<blojsom:commentAuthor> Comment author.
<blojsom:commentAuthorEmail> Comment author e-mail.
<blojsom:commentAuthorURL> Comment author URL.
<blojsom:commentText> Comment text.
<blojsom:commentIP> IP address of comment.
<blojsom:commentStatus> Comment status.
<blojsom:commentDate> RFC-822 date of the comment.
<blojsom:commentMetadata> Meta-data items of the comment.
<blojsom:metadata> Individual meta-data item for the comment.
<blojsom:key> Key for meta-data item.
<blojsom:value> Value for the meta-data item.

Example:

<blojsom:comments>
                <blojsom:comment>
                    <blojsom:commentAuthor>John Doe</blojsom:commentAuthor>
                    <blojsom:commentAuthorEmail></blojsom:commentAuthorEmail>
                    <blojsom:commentAuthorURL>http://www.johndoe.com/blog/</blojsom:commentAuthorURL>
                    <blojsom:commentText>This is a great comment!</blojsom:commentText>
                    <blojsom:commentIP>127.0.0.1</blojsom:commentIP>
                    <blojsom:commentStatus>approved</blojsom:commentStatus>
                    <blojsom:commentDate>Wed, 26 Apr 2006 02:22:20 -0400</blojsom:commentDate>
                </blojsom:comment>
            </blojsom:comments>

Trackbacks

Item Description
<blojsom:trackbacks> Element for trackbacks for the entry.
<blojsom:trackback> Element for an individual trackback for the entry.
<blojsom:trackbackTitle> Trackback title.
<blojsom:trackbackExcerpt> Trackback excerpt.
<blojsom:trackbackUrl> Trackback URL.
<blojsom:trackbackBlogName> Trackback blog name.
<blojsom:trackbackIP> IP address of trackback.
<blojsom:trackbackStatus> Trackback status.
<blojsom:trackbackDate> RFC-822 date of the trackback.
<blojsom:trackbackMetadata> Meta-data items of the trackback.
<blojsom:metadata> Individual meta-data item for the trackback.
<blojsom:key> Key for meta-data item.
<blojsom:value> Value for the meta-data item.

Example:

<blojsom:trackbacks>
                <blojsom:trackback>
                    <blojsom:trackbackTitle>Trackback title</blojsom:trackbackTitle>
                    <blojsom:trackbackExcerpt>Trackback excerpt</blojsom:trackbackExcerpt>
                    <blojsom:trackbackUrl>http://www.foo.com</blojsom:trackbackUrl>
                    <blojsom:trackbackBlogName>Foo Blog</blojsom:trackbackBlogName>
                    <blojsom:trackbackIP>127.0.0.1</blojsom:trackbackIP>
                    <blojsom:trackbackStatus>approved</blojsom:trackbackStatus>
                    <blojsom:trackbackDate>Wed, 26 Apr 2006 02:22:20 -0400</blojsom:trackbackDate>
			    <blojsom:trackbackMetadata>
		                <blojsom:metadata>
		                    <blojsom:key>trackback-metadata-key1</blojsom:key>
		                    <blojsom:value>trackback-metadata-value1</blojsom:value>
		                </blojsom:metadata>
		                <blojsom:metadata>
		                    <blojsom:key>trackback-metadata-key2</blojsom:key>
		                    <blojsom:value>trackback-metadatavalue2</blojsom:value>
		                </blojsom:metadata>
		            </blojsom:trackbackMetadata>
                </blojsom:trackback>
            </blojsom:trackbacks>

Pingbacks

Item Description
<blojsom:pingbacks> Element for pingbacks for the entry.
<blojsom:pingback> Element for an individual pingback for the entry.
<blojsom:pingbackTitle> Pingback title.
<blojsom:pingbackExcerpt> Pingback excerpt.
<blojsom:pingbackUrl> Pingback URL.
<blojsom:pingbackBlogName> Pingback blog name.
<blojsom:pingbackIP> IP address of pingback.
<blojsom:pingbackStatus> Pingback status.
<blojsom:pingbackDate> RFC-822 date of the pingback.
<blojsom:pingbackSourceURI> Source URI of the pingback.
<blojsom:pingbackTargetURI> Target URI of the pingback.
<blojsom:pingbackMetadata> Meta-data items of the pingback.
<blojsom:metadata> Individual meta-data item for the pingback.
<blojsom:key> Key for meta-data item.
<blojsom:value> Value for the meta-data item.

Example:

<blojsom:pingbacks>
                <blojsom:pingback>
                    <blojsom:pingbackTitle>Pingback title</blojsom:pingbackTitle>
                    <blojsom:pingbackExcerpt>Pingback excerpt</blojsom:pingbackExcerpt>
                    <blojsom:pingbackUrl>http://www.foo.com</blojsom:pingbackUrl>
                    <blojsom:pingbackBlogName>Foo blog</blojsom:pingbackBlogName>
                    <blojsom:pingbackIP>127.0.0.1</blojsom:pingbackIP>
                    <blojsom:pingbackStatus>approved</blojsom:pingbackStatus>
                    <blojsom:pingbackDate>Wed, 26 Apr 2006 02:22:20 -0400</blojsom:pingbackDate>
                    <blojsom:pingbackSourceURI>http://foo.com</blojsom:pingbackSourceURI>
                    <blojsom:pingbackTargetURI>http://www.bar.com</blojsom:pingbackTargetURI>
	                    <blojsom:pingbackMetadata>
		                <blojsom:metadata>
		                    <blojsom:key>pingback-metadata-key1</blojsom:key>
		                    <blojsom:value>pingback-metadata-value1</blojsom:value>
		                </blojsom:metadata>
		                <blojsom:metadata>
		                    <blojsom:key>pingback-metadata-key2</blojsom:key>
		                    <blojsom:value>pingback-metadata-value2</blojsom:value>
		                </blojsom:metadata>
		            </blojsom:pingbackMetadata>
                </blojsom:pingback>
            </blojsom:pingbacks>

RSS 2.0 Example Feed

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