Creating an Admin Task
This tutorial applies to Confluence 5.0.
Level of experience:
Intermediate. Our tutorials are classified as 'beginner', 'intermediate' and 'advanced'. This one is at 'intermediate' level. If you have never developed a plugin before, you may find this one a bit difficult.
An Admin Task is visible on the console when the admin clicks the cog, then Administration:
On this page:
If you are unfamiliar with plugin development, we recommend that you read the guide to developing with the Atlassian Plugin SDK before you read this document. You may also want to read Common Coding Tasks for an overview of the plugin framework. Some experience with Maven is assumed for plugin development. If you haven't used Maven before, you may want to read the Maven documentation to familiarise yourself with it.
An admin task is configured like this:
Admin tasks have a few components:
|Component||Description||Available for core tasks||
Available for plugins
See example below and on Web Item Plugin Module for details about each tag
|Checkbox||The administrator can mark tasks as viewed, so they appear in "View all completed tasks". Some tasks should not be dismissed and have no checkbox.||Optional||Mandatory|
|Title||Bold line of text.||Use <label>|
|Description||Gray text under the title.||Use <description>|
|Current Value||Some tasks are associated to one or several values which are displayed under the description.||Plugins can't display the current value of the task.|
|Configure||An edit icon with a link labelled "Configure". The url is chosen by the plugin.||Plugins can't rename the title of the link. Alternatively, plugins can use the description to redirect to their screen and not use the link. Use <link>.|
|Condition||The task only appears on the Admin Console if some conditions are fulfilled.||If the condition is false, the task is not displayed at all, even in "completed tasks". Use <condition>.|
Download the example from BitBucket
The source for this tutorial is available on BitBucket: https://bitbucket.org/atlassianlabs/confluence-5.0-plugin-points
Create a Confluence plugin
Create a Confluence plugin using the SDK:
If you encounter issues creating the Confluence plugin, please review the Beginner tutorials and/or submit issues to the AMPS bugtracker.
Add the WebItem for the task
In atlassian-plugin.xml, add the following item:
Add the translations in plugin-i18n.properties:
Write a condition for your task
In the file src/main/java/com/atlassian/examples/DefaultMailServerExistsCondition.java, add the following code:
Launch your plugin
After running atlas-run, Confluence should start with the new Admin Task. You're done!
Plugin Metadata Files used by UPM and Marketplace