This page last changed on Jun 29, 2009 by rosie@atlassian.com.

When plugin authors create pages in FishEye and Crucible, they may need to be aware of decorators.

On this page:

What is a Decorator?

A decorator creates standard parts of the page and inserts the content created by a plugin servlet in the appropriate place. For example, the atl.general decorator provides the standard header and footer, while the atl.admin decorator also provides the left hand column of administration links, with the plugin generated content in a section to its right.

So, a servlet which is rendering a URL from a web item in the system.admin location would request the atl.admin decorator.

All servlet plugins whose response is rendered as a Fisheye/Crucible page should specify a decorator in the response. Meta tags in the head of the HTML page are used to choose a decorator and provide it with any parameters it needs.

Decorator Code Example

The decorator name and parameters are given thus:

<head>
...
  <meta name='decorator' content='fisheye.userprofile.tab'/>
  <meta name='profile.tab.key' content='com.atlassian.crucible.example.plugin.event.crucible-example-event-plugin:test-profile-tab'/>
...
</head>

The value given by the content parameter of the profile.tab.key is the plugin module key of the web-item which creates the tab we want, shown as selected when this page is rendered.

Table of Decorator Parameters

Decorator Description Parameters
atl.general Provides standard header and footer. None
atl.admin Provides left hand column of administration links. None
fisheye.userprofile.tab Content rendered as a single tab on the user profile page. profile.tab.key The plugin module key of the web item which created the tab.
crucible.review.tab Content rendered as a single tab on the review page. review.permId The permId of the review being displayed. profile.tab.key The plugin module key of the web item which created the tab.

In the table above, crucible.review.tab only applies when creating plugins for Crucible.

Document generated by Confluence on Jul 06, 2009 21:40