Plugin module Index

What this is

This page lists the plugin modules for Atlassian applications. The idea is for the plugin developer to quickly identify the plugin module they need and give them an outline of what to expect and what they can change.

Each plugin module listed here comes with:

  • A brief description of what it's for
  • Glosses for the crucial configuration elements
  • An example of its use in atlassian-plugin.xml

The name of each module is a link to its full description in the product development hub. If you decide to write one of the modules listed below, you must read the full description at the link to succeed.

Modules common to all applications

These modules are provided by the plugin framework and operate identically in all applications.

Code sharing

The DEVNET:Component and DEVNET: Component Import module types are for modularizing and sharing code within a plugin and between plugins:

Component

Component plugin module

Declares that a class in the plugin is available for dependency injection within that plugin, and optionally, available for dependency injection in other plugins in the application.

Frequently used attributes:

  • class: The class providing the implementation for the component to inject.
  • public: Whether this implementation is available for dependency injection into other plugins, via the DEVNET:Component Import declaration.

Frequently used elements:

  • interface: The interface for the component to inject.

Example 1

1
2
<!-- declare a component for injection in this plugin -->
<component
    key="helloWorldService"
    class="com.myapp.DefaultHelloWorldService">
  <description>Provides hello services.</description>
  <interface>com.myapp.HelloWorldService</interface>
</component>

Example 2

1
2
<!-- declare a component shared with other plugins -->
<component
    key="goodbyeWorldService"
    class="com.myapp.DefaultGoodbyeWorldService"
    public="true">
  <description>Provides goodbye services.</description>
  <interface>com.myapp.GoodbyeWorldService</interface>
</component>

Component Import

Component import plugin module 

Requests that some implementation of a specific interface, exported either by another plugin using a DEVNET:Component declaration or by the host application, be made available for dependency injection into this plugin.

Frequently used attributes:

  • interface: The interface for the component to inject.

Frequently used elements:

  • interface: The interface for the component to inject (identical to the interface attribute).

Example

1
2
<!-- import a component shared by another plugin -->
<component-import
    key="helloWorldService"
    interface="com.myapp.HelloWorldService">
  <description>Provides hello services.</description>
</component>

JEE container integration

Servlet Context Listener

Servlet Context Listener plugin module 

Deploys the specified class as a Java EE servlet context listener.

Frequently used attributes:

  • class: The class to use as a servlet context listener.

Example

1
2
<!-- declare a custom servlet context listener -->
<servlet-context-listener
    key="myServletContextListener"
    interface="com.myapp.MyServletContextListener">
  <description>Custom listener for the servlet context in this application.</description>
</servlet-context-listener>

Servlet Context Parameter

Servlet Context Parameter plugin module 

Sets the specified name and value as a parameter in the Java EE servlet context.

Frequently used elements:

  • param-name: The name of the parameter.
  • param-value: The value of the parameter.

Example

1
2
<!-- declare a custom servlet context parameter -->
<servlet-context-param
    key="myServletContextParam">
  <description>Custom parameter for the servlet context in this application.</description>
  <param-name>myParam</param-name>
  <param-value>myParamValue</param-value>
</servlet-context-param>

Servlet Filter

Servlet Filter plugin module 

Deploys the specified Java EE servlet filter in the product.

Frequently used attributes:

  • class: The class to use as a servlet filter,

Frequently used elements:

  • url-pattern: The URL pattern this servlet filter should be applied to.

Example

1
2
<!-- declare a custom servlet filter -->
<servlet-filter
    key="myServletFilter"
    class="com.myapp.MyServletFilter">
  <description>Custom parameter for the servlet context in this application.</description>
  <url-pattern>/myapp</url-pattern>
</servlet-filter>

Servlet

Servlet plugin module 

Deploys the specified Java EE servlet in the product.

Frequently used attributes:

  • class: The servlet class to use.

Frequently used elements:

  • url-pattern: The URL pattern this servlet should be deployed to.

Example

1
2
<!-- declare a custom servlet filter -->
<servlet
    key="myServletFilter"
    class="com.myapp.MyServlet">
  <description>Servlet to deploy in this application.</description>
  <url-pattern>/myapp</url-pattern>
</servlet>

User interface

Web Item plugin module

Web Item 

Defines a new link in an application menu.

Frequently used attributes:

Frequently used elements:

  • label: Points to an internationalized resource property that contains the display text of the link.
  • link: Defines where the link should point.

Example

1
2
<!-- declare a web item -->
<web-item
    key="myWebItem"
    section="system.admin/example1">
  <description>Example link appearing in the system admin menu.</description>
  <label key="atlassian.home"/>
  <link>http://atlassian.com</link>
</web-item>

Web Item Provider plugin module

Web Item Provider

Defines a new link provider in an application menu.

Example

1
2
<!-- declare a web item provider -->
<web-item-provider
    key="myWebItemProvider"
    section="system.admin/example1"
    class="com.example.MyWebItemProvider">
</web-item-provider>

Web Section

Web Section plugin module 

Defines a new section in an application menu.

Frequently used attributes:

  • section: The DEVNET:web section to insert this web section into.
  • weight: The order in which this section should appear in the menu relative to other items; heavier weights display lower in the menu.

Frequently used elements:

  • label: Points to an internationalized resource property that contains the user-visible name of this section.

Example

1
2
<!-- declare a web section -->
<web-section
    key="myWebItem"
    location="system.admin"
    weight="100">
  <description>Example web section appearing in the system admin menu.</description>
  <label key="example1.web.section.name"/>
</web-section>

Web Section Provider plugin module

Web Section Provider

Defines a new section provider in an application location.

Example

1
2
<!-- declare a web section provider -->
<web-section-provider
    key="myWebSectionProvider"
    location="system.admin"
    class="com.example.MyWebSectionProvider">
</web-section-provider>

Web Panel

Web Panel plugin module 

Defines a web panel - a set of HTML content that can be inserted verbatim into a page.

Frequently used attributes:

  • location: The product-specific location to insert this web section. Locations are different between products.

Frequently used elements:

  • resource: The HTML resource to use for the panel's contents.

Example

1
2
<!-- declare a web panel -->
<web-panel
    key="myWebPanel"
    location="atl.confluence.comments">
  <description>Example web panel appearing in the Confluence comments.</description>
  <resource name="view" type="velocity" location="templates/comments-web-panel.vm"/>
</web-panel>

Web Panel Renderer

Web Panel Renderer module type 

Defines a custom rendering engine for a <web-panel>.

Frequently used attributes:

  • class: The class that implements the web panel renderer.

Example

1
2
<!-- web panel renderer example -->
<web-panel-renderer
    key="myWebPanelRenderer"
    class="com.myapp.FreemarkerWebPanelRenderer"/>

Web Resource

Web Resource module type

Defines downloadable resources (files) for a plugin, such as CSS or JavaScript files.

Frequently used elements:

  • resource: Specifies the resources that should be made available for download.

Example

1
2
<!-- web resource example -->
<web-resource
    key="myWebResources">
  <resource name="mylib.js" type="download" location="js/mylib.js"/>
  <resource name="mylib2.js" type="download" location="js/mylib2.js"/>
</web-resources>

Web Resource Transformer

Web Resource Transformer module type 

Defines transformers which allow changing web resources before being served to the browser.

Frequently used attributes:

  • class: The class to create and use as a transformer.

Example

1
2
<!-- web resource transformer example -->
<web-resource-transformer
  key="template"
  class="com.atlassian.labs.template.TemplateTransformer" />

Other types

REST 

Exposes data and services as REST resources.

Frequently used attributes:

  • path: Path to the API defined by these resources.
  • version: Version of the REST API being exposed at this path.

Example

1
2
<!-- REST module example -->
<rest
  key="helloWorldRest"
  path="/helloworld"
  version="1.0">
  <description>Provides hello world services.</description>
</rest>

Gadget

Gadgets 

Defines an Atlassian gadget provided by this plugin.

Frequently used attributes:

  • location: Path to the gadget XML specification in this plugin.

Example

1
2
<!-- gadget module example -->
<gadget
  key="myGadget"
  location="gadgets/public/myGadget.xml"/>

Product-specific modules

These modules are unique to the product they originate in.

JIRA

Adding custom remote APIs

SOAP

SOAP plugin module 

JIRA's SOAP and XML-RPC remote APIs will be deprecated in JIRA 6.0.

Read the announcement for more information.

Adds custom SOAP services to JIRA in addition to the builtin SOAP services

Frequently used attributes:

  • class: The SOAP service implementing the published interface (see below).

Frequently used elements:

  • service-path: The path (under /rpc/soap) the service will be published at.
  • published-interface: The interface implemented by the service class and exposed to the end user.

Example

1
2
<rpc-soap
  key="mySoapService"
  class="com.myapp.MySoapServiceImpl">
    <description>Custom SOAP services for this installation.</description>
    <service-path>customsoap-v1</service-path>
    <published-interface>
        com.myapp.MySoapService
    </published-interface>
</rpc-soap>

XML-RPC

XML-RPC plugin module 

JIRA's SOAP and XML-RPC remote APIs will be deprecated in JIRA 6.0.

Read the announcement for more information.

Adds custom XML-RPC services to JIRA in addition to the builtin XML-RPC service

Frequently used attributes:

  • class: The class to publish as an XML-RPC service

Frequently used elements:

  • service-path: The path (under /rpc/xmlrpc) the service will be published at.

Example

1
2
<rpc-xmlrpc
  key="myXmlRpcService"
  class="com.myapp.MyXmlRpcService">
    <description>Custom XML-RPC services for this installation.</description>
    <service-path>custom-xmlrpc</service-path>
</rpc-xmlrpc>

Adding operations to tabs, views or screens

Project tab panel

Project tab panel plugin module 

Adds new tabs to the Browse Projects page. 

Frequently used attributes:

  • class: The class implementing the project tab panel.

Frequently used elements:

  • label: The user-visible name of the label on the page. Can be specified directly in the element content or picked up from the i18n resource by attribute key.
  • order: The order in which the label should appear in the menu.
  • resource (velocity): The template which renders the HTML for the project tab.
  • resource (i18n): The .properties file containing i18n values for user-visible text.

Example

1
2
<project-tabpanel key="roadmap-panel" name="Road Map Panel"
  class="com.atlassian.jira.plugin.projectpanel.impl.VersionsProjectTabPanel">
    <description key="projectpanels.roadmap.description">
      A roadmap of the upcoming versions in this project.
    </description>
    <label key="common.concepts.roadmap" />
    <order>20</order>
    <resource type="velocity" name="view"
      location="templates/plugins/jira/projectpanels/roadmap-panel.vm" />
    <resource type="i18n" name="i18n"
      location="com.atlassian.jira.plugins.projectpanels.roadmap" />
</project-tabpanel>

Component tab panel

Component tab panel plugin module 

Adds new tabs to the Browse Component page. 

Frequently used attributes:

  • class: The class implementing the component tab panel.

Frequently used elements:

  • label: The user-visible name of the label on the page. Can be specified directly in the element content or picked up from the i18n resource by attribute key.
  • order: The order in which the label should appear in the menu.
  • resource (velocity): The template which renders the HTML for the component tab.
  • resource (i18n): The .properties file containing i18n values for user-visible text.

Example

1
2
<!-- module example -->
<component-tabpanel
  key="component-openissues-panel"
  i18n-name-key="componentpanels.openissues.name"
  name="Open Issues Panel"
  class="com.atlassian.jira.plugin.componentpanel.impl.GenericTabPanel">
    <description
      key="componentpanels.openissues.description">
      Show the open issues for this component.
    </description>
    <label key="common.concepts.openissues"/>
    <order>10</order>
    <resource type="velocity" name="view"
      location="templates/plugins/jira/projectentitypanels/openissues-component-panel.vm"/>
    <resource type="i18n" name="i18n"
      location="com.atlassian.jira.plugins.componentpanels.openissues"/>
</component-tabpanel>

Version tab panel

Version tab panel plugin module 

Adds new tabs to the Browse Version page. 

Frequently used attributes:

  • class: The class implementing the version tab panel.

Frequently used elements:

  • label: The user-visible name of the label on the page. Can be specified directly in the element content or picked up from the i18n resource by attribute key.
  • order: The order in which the label should appear in the menu.
  • resource (velocity): The template which renders the HTML for the version tab.
  • resource (i18n): The .properties file containing i18n values for user-visible text.

Example

1
2
<!-- module example -->
<version-tabpanel
  key="version-openissues-panel"
  i18n-name-key="versionpanels.openissues.name"
  name="Open Issues Panel"
  class="com.atlassian.jira.plugin.versionpanel.impl.GenericTabPanel">
    <description key="versionpanels.openissues.description">Show the open issues for this version.</description>
    <label key="common.concepts.openissues"/>
    <order>10</order>
    <resource type="velocity" name="view"
      location="templates/plugins/jira/projectentitypanels/openissues-version-panel.vm"/>
    <resource type="i18n" name="i18n" location="com.atlassian.jira.plugins.versionpanels.openissues"/>
</version-tabpanel>

Issue tab panel

Issue tab panel plugin module 

Adds new tabs to the View Issue panel. 

Frequently used attributes:

  • class: The class implementing the issue tab panel.

Frequently used elements:

  • label: The user-visible name of the label on the page.
  • resource: The template which renders the HTML for the issue tab.

Example

1
2
<!-- issue tab panel example -->
<issue-tabpanel
  key="environment-tabpanel"
  name="Environment Tab Panel"
  class="com.icontact.jira.environmentmanor.issuetabpanels.EnvironmentPanelPlugin">
   <description>Show Environment Status and controls in an issue tab panel.</description>
   <label>Environment Control Panel</label>
   <resource type="velocity" name="view"
     location="templates/plugins/environmentmanor/issuetabpanels/environment.vm"/>
</issue-tabpanel>

Search request view

Search request view plugin module 

Allows display of search results in the issue navigator in custom formats (such as XML or MS Excel format).

Frequently used attributes:

  • class: The class implementing the search request view.
  • contentType: The MIME content type to return when displaying this view.

Frequently used elements:

  • resource (header): The header to render for this view.
  • resource (singleissue): What to render for each individual issue in this view.
  • resource (footer): The footer to render for this view.

Example

1
2
<!-- search request view example -->
<search-request-view
  key="simple-searchrequest-xml"
  name="Simple XML"
  class="com.atlassian.jira.sample.searchrequest.SimpleSearchRequestXmlView"
  state='enabled'
  fileExtension="xml"
  contentType="text/xml">
    <resource type="velocity" name="header" location="templates/searchrequest-xml-header.vm"/>
    <resource type="velocity" name="singleissue" location="templates/searchrequest-xml-singleissue.vm"/>
    <resource type="velocity" name="footer" location="templates/searchrequest-xml-footer.vm"/>
    <order>100</order>
</search-request-view>

Custom workflow operations

Workflow conditions+Modules#WorkflowPluginModules-Conditions) 

Workflow conditions plugin module 

Checks whether a user can perform a workflow transition.

Frequently used attributes:

  • class: The class implementing the workflow condition (usually a builtin product class rather than one the plugin developer writes)

Frequently used elements:

  • condition-class: The class implementing the condition's logic.
  • resource: Renders the view for the condition.

Example

1
2
<!-- workflow condition example -->
<workflow-condition key="onlyassignee-condition"
  name="Only Assignee Condition"
  i18n-name-key="admin.workflow.condition.onlyassignee.display.name"
  class="com.atlassian.jira.plugin.workflow.WorkflowAllowOnlyAssigneeConditionFactoryImpl">
    <description key="admin.workflow.condition.onlyassignee">Condition to allow only the assignee to execute a transition.</description>
    <condition-class>com.atlassian.jira.workflow.condition.AllowOnlyAssignee</condition-class>
    <resource type="velocity" name="view"
        location="templates/jira/workflow/com/atlassian/jira/plugin/onlyassignee-condition-view.vm"/>
</workflow-condition>

Workflow validators

Workflow validators plugin module 

Checks that the data supplied to a workflow transition is valid.

Frequently used attributes:

  • class: The class implementing the workflow validator (usually a builtin product class rather than one the plugin developer writes)

Frequently used elements:

  • validator-class: The class implementing the validator's logic.
  • resource: Renders the view for the condition.

Example

1
2
<!-- workflow validator example -->
<workflow-validator
  key="permission-validator"
  name="Permission Validator"
  class="com.atlassian.jira.plugin.workflow.WorkflowPermissionValidatorPluginFactory">
    <description>Validates that the user has a permission.</description>
    <validator-class>
        com.atlassian.jira.workflow.validator.PermissionValidator
    </validator-class>
    <resource type="velocity" name="view"
        location="templates/jira/.../permission-validator-view.vm"/>
    <resource type="velocity" name="input-parameters"
        location="templates/jira/.../permission-validator-input-params.vm"/>
</workflow-validator>

Workflow functions

Workflow functions plugin module 

Performs actions after a workflow transition has executed.

Frequently used attributes:

  • class: The class implementing the workflow function (usually a builtin product class rather than one the plugin developer writes)

Frequently used elements:

  • function-class: The class implementing the function's logic.
  • resource: Renders the view for the condition.

Example

1
2
<!-- workflow function example -->
<workflow-function key="update-issue-field-function"
  name="Update Issue Field"
  class="com.atlassian.jira.plugin.workflow.UpdateIssueFieldFunctionPluginFactory">
    <description>Updates a simple issue field to a given value.</description>
    <function-class>
        com.atlassian.jira.workflow.function.issue.UpdateIssueFieldFunction
    </function-class>
    <orderable>true</orderable>
    <unique>false</unique>
    <deletable>true</deletable>
    <resource type="velocity" name="view"
        location="templates/jira/.../update-issue-field-function-view.vm"/>
    <resource type="velocity" name="input-parameters"
        location="templates/jira/.../update-issue-field-function-input-params.vm"/>
</workflow-function>

Custom fields

Custom field types

Custom field types plugin module 

Defines a custom field and its type.

Frequently used attributes:

  • class: The class that implements the custom field and its behaviors.

Frequently used elements:

  • resource (view): Template for rendering this custom field on the View Issue page.
  • resource (edit-userpicker): Template for rendering this custom field on the Create/Edit Issue page.
  • resource (xml): Template for rendering this custom field in XML.

Example

1
2
<!-- custom field type example -->
<customfield-type key="userpicker" name="User Picker"
class="com.atlassian.jira.issue.customfields.impl.UserCFType">
   <description>
      Choose a user from the user base via a popup picker window.
   </description>
   <resource type="velocity" name="view"
     location="templates/plugins/fields/view-user.vm" />
   <resource type="velocity" name="edit"
     location="templates/plugins/fields/edit-userpicker.vm" />
   <resource type="velocity" name="xml"
     location="templates/plugins/fields/xml-user.vm" />
</customfield-type>

Custom field searchers

Custom field searchers plugin module 

Defines a search method for indexing a custom field.

Frequently used attributes:

  • class: The class implementing this custom field searcher.

Frequently used elements:

  • valid-customfield-type: Defines the custom field this searcher applies to.
  • resource: Renders this searcher on the issue navigator search form.

Example

1
2
<!-- custom field searcher example -->
<customfield-searcher key="userpickersearcher" name="User Picker Searcher"
class="com.atlassian.jira.issue.customfields.searchers.UserPickerSearcher">
   <description>
      Allow to search for a user using a userpicker.
   </description>
   <resource type="velocity" name="search"
     location="templates/plugins/fields/search-userpicker.vm" />
   <valid-customfield-type
     package="com.atlassian.jira.plugin.system.customfieldtypes" key="userpicker" />
</customfield-searcher>

Other types

Reports

Reports plugin module 

Defines a report in JIRA.

Frequently used attributes:

  • class: The class implementing this report.

Frequently used elements:

  • label: The user-visible name of the label on the page.
  • resource (view): Renders the HTML version of the report.
  • resource (i18n): Provides the i18n values for the keys in the report displays.
  • properties: Properties this report requires to run correctly.

Example

1
2
<!-- report example -->
<report key="time-tracking"
  name="Time Tracking Report"
  class="com.atlassian.jira.plugin.report.impl.TimeTrackingReport">
    <description key="report.timetracking.description">
        This report shows the time tracking details for a specific project.
    </description>
    <label key="report.timetracking.label" />
    <resource type="velocity" name="view"
        location="templates/plugins/jira/reports/time-tracking-report.vm" />
    <resource type="i18n" name="i18n"
        location="com.atlassian.jira.plugins.reports.timetracking" />
    <properties>
        <property>
            <key>versionId</key>
            <name>common.concepts.version</name>
            <description>report.timetracking.version.description</description>
            <type>select</type>
            <values class="com.atlassian.jira.portal.VersionOptionalValuesGenerator"/>
        </property>
    </properties>
</report>

Custom actions

Custom actions plugin module 

Defines custom WebWork actions (functionality that can be triggered by visiting a URL) or overrides an existing JIRA action.

Frequently used elements:

  • actions: Defines the WebWork actions this module will provide

Example

1
2
<!-- webwork example -->
<webwork1
  key="qquserissue"
  name="Quick Create User Issue"
  class="java.lang.Object">
    <actions>
        <action
          name="com.atlassian.jira.toolkit.action.QuickCreateUserIssueAction"
          alias="QuickCreateUserIssue">
            <view name="createuserissue">/templates/quickcreateuser.vm</view>
        </action>
    </actions>
</webwork1>

JQL functions

JQL functions plugin module 

Defines new functions for use in the JIRA Query Language (JQL).

Frequently used attributes:

  • class: The class implementing the JQL function logic.

Frequently used elements:

Example

1
2
<!-- jql example -->
<jql-function
  key="role-members"
  i18n-name-key="rolefunc.name"
  name="Role Members Function"
  class="com.atlassian.example.jira.jqlfunc.RoleFunction">
    <resource type="i18n" name="i18n"
      location="com.atlassian.example.jira.jqlfunc.RoleFunction" />
    <description key="rolefunc.description">
      JQL function to return the members of a particular role
    </description>
</jql-function>

Confluence

Custom remote APIs

SOAP

SOAP plugins 

Adds custom SOAP services to Confluence in addition to the builtin SOAP services.

Frequently used attributes:

  • class: The SOAP service implementing the published interface (see below).

Frequently used elements:

  • service-path: The path (under /rpc/soap) the service will be published at.
  • published-interface: The interface implemented by the service class and exposed to the end user.

Example

1
2
<!-- SOAP example -->
<rpc-soap
  key="mySoapService"
  class="com.myapp.MySoapServiceImpl">
    <description>Custom SOAP services for this installation.</description>
    <service-path>customsoap-v1</service-path>
    <published-interface>
        com.myapp.MySoapService
    </published-interface>
</rpc-soap>

XML-RPC

XML-RPC module 

Adds custom XML-RPC services to Confluence in addition to the builtin XML-RPC service.

Frequently used attributes:

  • class: The class to publish as an XML-RPC service

Frequently used elements:

  • service-path: The path (under /rpc/xmlrpc) the service will be published at.

Example

1
2
<rpc-xmlrpc
  key="myXmlRpcService"
  class="com.myapp.MyXmlRpcService">
    <description>Custom XML-RPC services for this installation.</description>
    <service-path>custom-xmlrpc</service-path>
</rpc-xmlrpc>

Custom markup

User macros

User macros module 

Defines simple user macros as plugin modules without requiring any new Java code. 

Frequently used elements:

  • template: The body of the user macro (in HTML). Can access the Velocity context.

Example

1
2
<!-- user macro example -->
<user-macro
  name='helloworld'
  key='helloworld'>
    <description>Hello, user macro</description>
    <template><![CDATA[Hello, $body!]]></template>
</user-macro>

Custom macros

Macro Module 

Defines a macro -- a piece of code that can be invoked from inside a page. Usually this code is replaced in the rendered page by its output.

Frequently used attributes:

  • class: The class implementing the macro

Frequently used elements:

Example

1
2
<!-- macro example -->
<macro
  name='tasklist'
  class='com.atlassian.confluence.extra.tasklist.TaskListMacro'
     key='tasklist'>
    <description>Creates a very simple task list, with user checkable tasks</description>
</macro>

Code formatting

Code formatting module 

Adds support for new languages to the builtin code macro.

Frequently used attributes:

  • class: Class implementing the new code formatter.

Example

1
2
<!-- code formatter example -->
<codeformatter
  name="ruby"
  key="ruby"
  class="com.example.confluence.formatters.RubyFormatter">
    <description>Code formatter for the Ruby programming language</description>
</codeformatter>

System tasks

Job

Job module 

Adds repeatable tasks to Confluence which can be scheduled by triggers.

Frequently used attributes:

  • class: Class implementing the job.

Example

1
2
<!-- job example -->
<job
  key="myJob"
  name="My Job"
  class="com.example.myplugin.jobs.MyJob"/>

Lifecycle

Lifecycle module 

Adds tasks to be run on Confluence startup and shutdown.

Frequently used attributes:

  • class: Implements the lifecycle module for startup or shutdown.

Example

1
2
<!-- lifecycle example -->
<lifecycle
  key="frobozz"
  name="Frobozz Service"
  class="com.example.frobozz.Lifecycle"
  sequence="1200">
    <description>Start and stop the Frobozz service</description>
</lifecycle>

Triggers

Trigger module 

Schedules DEVNET:jobs to run.

Frequently used elements:

  • job: The key of the job module to schedule.
  • schedule: When to run the job. Can be expressed as a cron job or by repeat intervals.

Example

1
2
<!-- trigger example -->
<trigger
  key="myTrigger"
  name="My Trigger">
   <job key="myJob" />
   <schedule
     repeat-interval="3600000"
     repeat-count="5" />
</trigger>

Look and feel

Decorators

Decorator module 

Allows the user to add Sitemesh Velocity decorators around Confluence pages.

Frequently used attributes:

  • page: Name of the Velocity template to render as the decorator.

Frequently used elements:

  • pattern: The URL pattern for which pages should have this decorator applied.

Example

1
2
<!-- decorator example -->
<decorator
  name="myDecorator"
  page="myDecorator.vmd"
  key="myDecorator">
    <description>My sample decorator.</description>
    <pattern>/plugins/sampleplugin/*</pattern>
</decorator>

Language

Language module 

Defines new languages for the Confluence UI.

Frequently used attributes:

  • language: The language defined by this module (must exist in java.util.Locale)
  • country: The country this language is intended for

Frequently used elements:

  • resource (download): Defines a flag image to show for this resource.

Example

1
2
<!-- language example -->
<language
  name="German"
  key="de_DE"
  language="de"
  country="DE">
    <resource
      name="de_DE.gif"
      type="download"
      location="templates/languages/de_DE/de_DE.gif">
        <property
          key="content-type"
          value="image/gif"/>
    </resource>
</language>

Theme

Theme module 

Defines a new theme (of stylesheets and images) for Confluence.

Frequently used attributes:

  • class: The class implementing the theme. (Don't change this.)

Frequently used elements:

  • resource (download): CSS stylesheets implementing the theme (and images)
  • resource (icon): Theme icon image used in the Choose Theme menu.

Example

1
2
<!-- theme example -->
<theme
  key="simple-theme"
  name="Simple Demo Theme"
  class="com.atlassian.confluence.themes.BasicTheme">
    <resource type="download"
      name="default-theme.css"
      location="/includes/css/default-theme.css"/>
    <resource type="download"
      name="image-theme.css"
      location="image-theme.css"/>
    <resource type="download"
      name="home-16.png"
      location="home-16.png"/>
    <resource key="icon"
      name="themeicon.gif"
      type="download"
      location="your-theme-icon.gif"/>
</theme>

Keyboard shortcuts

Keyboard shortcuts module 

Defines a keyboard shortcut within Confluence.

Frequently used elements:

  • order: The order in which this shortcut appears in the Keyboard Shortcuts dialog box.
  • description: A human-readable description of this shortcut.
  • shortcut: The keyboard shortcut keystroke sequence.
  • operation: The target of the keyboard shortcut.
  • context: Which pages this shortcut will be active on.

Example

1
2
<!-- keyboard shortcut example -->
<keyboard-shortcut
  key="goto.space"
  i18n-name="admin.keyboard.shortcut.goto.space.name"
  name="Browse Space">
    <order>20</order>
    <description key="admin.keyboard.shortcut.goto.space.desc">Browse Space</description>
    <shortcut>gs</shortcut>
    <operation type="followLink">#space-pages-link</operation>
    <context>global</context>
</keyboard-shortcut>

Custom actions

Struts

Struts module 

Defines new Struts actions, adding URL-addressable functionality to Confluence.

Frequently used elements:
The body of the <struts> element contains Struts action markup. An example is below.

Example

1
2
<!-- struts example -->
<struts
  name="livesearchaction"
  key="livesearchaction">
    <package
      name="livesearch"
      extends="default"
      namespace="/plugins/livesearch">
        <default-interceptor-ref name="defaultStack" />

        <action name="livesearch"
          class="com.atlassian.confluence.extra.livesearch.LiveSearchAction">
            <result name="success" type="velocity">
              /templates/extra/livesearch/livesearchaction.vm
            </result>
        </action>
    </package>
</struts>

Other types

Search index extractor

Extractor module 

Defines an extractor for adding information to the Confluence search index.

Frequently used attributes:

  • class: The class implementing the extractor.
  • priority: The order in which the extractor is run; lower-priority extractors run first.

Example

1
2
<!-- extractor example -->
<extractor
  name="Page Metadata Extractor"
  key="pageMetadataExtractor"
  class="com.atlassian.confluence.extra.extractor.PageMetadataExtractor"
  priority="1000">
    <description>Extracts certain keys from a page's metadata and adds them to the search index.</description>
</extractor>

Path converters

Path converter module 

Defines path converters which provide custom path mapping in a plugin.

Frequently used attributes:

  • class: The class implementing the path converter.
  • weight: The order in which this path converter is executed relative to any other converters.

Example

1
2
<!-- path converter example -->
<path-converter
  weight="10"
  key="example-converter"
  class="com.mycompany.confluence.plugin.ExamplePathConverter"/>

Velocity context

Velocity context module 

Defines new components to be added to the Confluence Velocity context.

Frequently used attributes:

  • class: The class representing the component to be added.
  • context-key: The Velocity variable that will be created to reference this component.

Example

1
2
<!-- velocity context example -->
<velocity-context-item
  key="myVelocityHelper"
  name="My Plugin's Velocity Helper"
  context-key="myVelocityHelper"
  class="com.example.myplugin.helpers.MyVelocityHelper" />

Rate this page: