This page last changed on Nov 05, 2009 by smaddox.

This page tells you how to add your gadget to an Atlassian application (JIRA, Confluence, etc) as a plugin. In short, you will add a <gadget> module type to your atlassian-plugin.xml file.

On this page:

Prerequisites

This list of prerequisites is incomplete
TO DO: We need to add instructions for configuring specific Atlassian applications to support AGSL-1.

Purpose of the Gadget Module Type

Gadget plugin modules enable you to add your gadget to an Atlassian application (JIRA, Confluence, etc) as a plugin. Your gadget can then make use of the application's remote API to fetch data and interact with the application.

Configuration

The element for the Gadget plugin module is gadget. It allows the following attributes for configuration:

Attributes

Name Required Description Default
key The key attribute is a standard module key, so it is required and must be unique within the plugin across all module types. Atlassian Gadgets does not use this key for anything special, so you can choose any key you like.  
location The location attribute can be either the relative path to a resource within the plugin, or the absolute URL of an externally-hosted gadget.  

Example

The syntax of the module type is:

<atlassian-plugin name="Hello World" key="example.plugin.helloworld" plugins-version="2">
  <plugin-info>
    <description>A basic gadget module</description>
    <vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/>
    <version>1.0</version>
  </plugin-info>

  <gadget key="unique-gadget-key" location="path/to/gadget.xml"/>

</atlassian-plugin>

URL for Published Gadgets

Gadgets published by an Atlassian container (such as JIRA or Confluence) are provided by the REST plugin module built into the Atlassian Gadgets framework. The URL of published gadgets has the following format — with context:

http://my-server.com:port/my-context/rest/gadgets/1.0/g/my-plugin.key:my-gadget/my-path/my-gadget.xml

Or without context:

http://my-app.my-server.com:port/rest/gadgets/1.0/g/my-plugin.key:my-gadget/my-path/my-gadget.xml

Example:

http://mycompany.com/jira/rest/gadgets/1.0/g/com.atlassian.streams.streams-jira-plugin:activitystream-gadget/gadgets/activitystream-gadget.xml
RELATED TOPICS

Creating your Gadget XML Specification
Writing an Atlassian Gadget
Overview of REST Implementation using the REST Plugin Module Type
REST Plugin Module Type
Gadgets and Dashboards Development Hub

Document generated by Confluence on Nov 22, 2009 17:46