Atom Publishing Protocol (APP) Plugin

Name Atom Publishing Protocol Plugin
Vendor Zohar Melamed (Website)
Authors Zohar Melamed
Homepage http://confluence.atlassian.com/display/CODEGEIST/Atom+Publishing+Protocol+%28APP%29+Plugin
Issue Management n/a
Categories Remote Access
Version 0.2
Availability Confluence v2.4.5 to v2.9-m5
State Beta
Support Unsupported Plugins
License Freeware / Open Source (BSD)
Price Free
Release Docs http://confluence.atlassian.com/display/CODEGEIST/Atom+Publishing+Protocol+%28APP%29+Plugin
Java API Docs n/a
Download Source http://svn.atlassian.com/svn/public/contrib/confluence/confluence-atom-publishing-plugin/
Download JAR confluence-atom-publishing-0.2.jar

Description/Features

The Atom Publishing Protocol (APP) is an application-level protocol
for publishing and editing Web resources. The protocol is based on
HTTP transfer of Atom-formatted representations. The Atom format is
documented in the Atom Syndication Format RFC4287.

Protocol Model

The Atom Publishing Protocol uses HTTP methods to author Member
Resources as follows:

  • GET is used to retrieve a representation of a known resource. ( currently the plugin supports pages and news )
  • POST is used to create a new, dynamically-named, resource. When
    the client submits non-Atom-Entry representations to a Collection
    for creation, two resources are always created - a Media Entry for
    the requested resource, and a Media Link Entry for metadata (in
    Atom Entry format) about the resource.
  • PUT is used to update a known resource.
  • DELETE is used to remove a known resource.

This plugin makes confluence content available via the atom publishing protocol - http://www.ietf.org/html.charters/atompub-charter.html
APP is emerging as the leading content publishing api and there are a host of clients on the way.

Usage

Once deployed the plugin exposes the Service Document (the entry point for clients ) at http://your-confluence-server:your-port/plugins/servlet/app
currenty resources are provided in raw wiki markup and accepted in wiki format with a "text" content type or html/xhtml with the "xhtml" or "html" content types
further work is required to provide a seamless wiki<->xhtml translation.

Testing

Simplest way to test is by using wget :

C:\dev\apps\confluence-2.4.5-std\bin>wget  -O - http://localhost:8086/plugins/servlet/app/

--13:15:19--  http://localhost:8086/plugins/servlet/app/
           => `-'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8086... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [CODEGEIST:application/atomsvc+xml]

    [CODEGEIST:<=>                                                                          ] 0             --.--K/s             <
?xml version="1.0" encoding="UTF-8"?>
<app:service xmlns:app="http://purl.org/atom/app#">
  <app:workspace xmlns:atom="http://www.w3.org/2005/Atom" atom:type="text">
    <atom:title>Demonstration Space</atom:title>
    <app:collection href="http://localhost:8086/plugins/servlet/app/ds/pages" atom:type="text">
      <atom:title>pages</atom:title>
      <app:accept>entry</app:accept>
    </app:collection>
    <app:collection href="http://localhost:8086/plugins/servlet/app/ds/news" atom:type="text">
      <atom:title>news</atom:title>
      <app:accept>entry</app:accept>
    </app:collection>
  </app:workspace>
  <app:workspace xmlns:atom="http://www.w3.org/2005/Atom" atom:type="text">
    <atom:title>Space Cadets</atom:title>
    <app:collection href="http://localhost:8086/plugins/servlet/app/SCD/pages" atom:type="text">
      <atom:title>pages</atom:title>
      <app:accept>entry</app:accept>
    </app:collection>
    <app:collection href="http://localhost:8086/plugins/servlet/app/SCD/news" atom:type="text">
      <atom:title>news</atom:title>
      <app:accept>entry</app:accept>
    </app:collection>
  </app:workspace>
</app:service>


    [CODEGEIST: <=>                                                                         ] 1,180         --.--K/s

13:15:20 (21.09 MB/s) - `-' saved [CODEGEIST:1180]

The above service document describes 2 workspaces ( a workspace mapps to a confluence space ), each with two collections - "pages" and "news"

you can retrieve a collection using the href attribute specified by the service document - lets get the collection of pages for the Deomonstration Space:

wget  -O - http://localhost:8086/plugins/servlet/app/ds/pages


Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8086... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [CODEGEIST:application/atom+xml]

<?xml version="1.0" encoding="UTF-8"?>

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/">

  <title>pages</title>

  <link rel="self" href="http://localhost:8086/plugins/servlet/app/ds/pages" />

  <author>

    <name>admin</name>

  </author>

  <id>http://localhost:8086/display/dspages</id>

  <updated>2007-04-27T18:56:26Z</updated>

  <entry>

    <title>Thumbnail gallery</title>

    <link rel="alternate" href="http://localhost:8086/display/ds/Thumbnail+gallery" />

    <link rel="edit" href="http://localhost:8086/plugins/servlet/app/ds/pages/32770" />

    <author>

      <name>admin</name>

    </author>

    <id>http://localhost:8086/plugins/servlet/app/ds/pages/32770</id>

    <updated>2007-04-27T18:56:27Z</updated>

    <published>2004-11-21T18:44:10Z</published>

    <summary type="text">Images look very effective when included within Confluence. We've provided thumbnail and thumbnail gallery macro http://confluence.atlassian.com/display/DOC/GalleryMacro functionality.   Confluence builds a gallery of thumbnailed images, to the page, by use of the gallery macro. .   Including ...</summary>

  </entry>

  <entry>

    <title>Tasklist</title>

    <link rel="alternate" href="http://localhost:8086/display/ds/Tasklist" />

    <link rel="edit" href="http://localhost:8086/plugins/servlet/app/ds/pages/32771" />

    <author>

      <name>admin</name>

    </author>

    <id>http://localhost:8086/plugins/servlet/app/ds/pages/32771</id>

    <updated>2007-04-27T18:56:27Z</updated>

    <published>2004-11-21T15:57:13Z</published>

    <summary type="text">More information about the tasklist macro is available at Tasklist macro http://confluence.atlassian.com/display/CONFEXT/TaskListMacro   The tasklist macro comes packaged with Confluence (since version 1.3). It allows you to create lists of tasks which need to be performed and keeps ...</summary>

  </entry>

 contd....

</feed>

The result is a std Atom 1.0 feed of all the pages in the space.
To get a single page we use the edit link of the entry :

C:\dev\apps\confluence-2.4.5-std\bin>wget  -O - http://localhost:8086/plugins/servlet/app/ds/pages/32788
--13:23:15--  http://localhost:8086/plugins/servlet/app/ds/pages/32788
           => `-'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8086... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [CODEGEIST:application/atom+xml]

    [CODEGEIST:<=>                                                                          ] 0             --.--K/s             <
entry xmlns="http://www.w3.org/2005/Atom">
  <title>Jira integration</title>
  <link rel="alternate" href="http://localhost:8086/display/ds/Jira+integration" />
  <link rel="edit" href="http://localhost:8086/plugins/servlet/app/ds/pages/32788" />
  <author>
    <name>admin</name>
  </author>
  <id>http://localhost:8086/plugins/servlet/app/ds/pages/32788</id>
  <updated>2007-04-27T18:56:27Z</updated>
  <published>2004-11-18T01:59:25Z</published>
  <content type="text">{panel}
Below you will find a brief introduction to Jira. For more information on Atlassian's founding product please see the [J
ira webpage|http://atlassian.com/software/jira] for more information or, alternatively, learn [how to pronounce "Jira" |
http://atlassian.com/software/jira/docs/latest/faq.html#what_does_jira_mean]
{panel}

{excerpt}
Jira is Atlassian's issue tracking system. Confluence can watch issues created within Jira, allowing the integration of
a content management solution with an issue tracking system.
{excerpt}

{jiraissues:url=http://jira.atlassian.com/secure/IssueNavigator.jspa?view=rss&amp;order=DESC&amp;tempMax=25&amp;reset=tr
ue|columns=type;key;summary;priority;assignee;status|cache=no}</content>
  <summary type="text">Below you will find a brief introduction to Jira. For more information on Atlassian's founding pr
oduct please see the Jira webpage http://atlassian.com/software/jira for more information or, alternatively, learn how t
o pronounce "Jira" http://atlassian.com/software/jira ...</summary>
    [CODEGEIST: <=>                                                                         ] 1,542         --.--K/s

To try the protocol with a GUI client get the python based APP Test Client from http://bitworking.org/projects/apptestclient/

Releases

0.1

Changes
basic protocol working
Support for news and pages
Known Issues
No security support
NPE on creating news items

Screenshots

Showing two GUI connected to the confluence demo space.

Labels

codegeist_2007_confluence codegeist_2007_confluence Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.