Quick Filter Rule Type Module

Available:

Bamboo 5.12.0 and later

On this page:

Purpose of this Module Type

This plugin module allows creating custom types of rules used within Bamboo quick filters.

For more details, see the quick filters documentation.

Configuration

The root element for the Quick Filter Rule Type module is quickFilterRuleType. It allows the following attributes and child elements for configuration:

Attributes

Name

Required

Description

Default

class

(tick)

The class which implements this plugin module. The class you need to provide depends on the module type. For example, Confluence theme, layout and colour-scheme modules can use classes already provided in Confluence. So you can write a theme-plugin without any Java code. But for macro and listener modules you need to write your own implementing class and include it in your plugin. See the plugin framework guide to creating plugin module instances.

N/A

key

(tick)

The unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code or JavaScript resources.

<component-import key="appProps" interface="com.atlassian.sal.api.ApplicationProperties"/>

In the example, appProps is the key for this particular module declaration, for component-import, in this case.

N/A

Elements

Name

Required

Description

Default

resource

(tick)

Using the "edit" attribute it is possible to provide a template for editing your rule type configuration.

N/A

Interface

Quick Filter Rule Type modules must implement the QuickFilterRuleType interface. Modules may also extend AbstractQuickFilterRuleType for additional utilities. However, the latter is not part of Bamboo API and may change without notice.

Example

Plugin Descriptor

Here is an example atlassian-plugin.xml file containing a Quick Filter Rule Type module:

<atlassian-plugin name="Quick Filter Rule Type module test" key="quickFilter.ruleType.test"> 
  <plugin-info> 
    <description>Quick Filter Rule Type module test</description> 
    <vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/> 
    <version>1.0</version> 
  </plugin-info> 

  <!-- rule type matching plan's name against a regular expression -->
  <quickFilterRuleType key="bamboo.quickFilter.rules.nameMatcher" class="com.atlassian.bamboo.quickfilter.rule.plugin.NameMatcherRuleType">
    <resource type="freemarker" name="edit" location="com/atlassian/bamboo/quickfilter/rule/editNameMatcherRule.ftl"/>
  </quickFilterRuleType>
</atlassian-plugin> 

Freemarker Edit Template

[@s.textfield labelKey='quick.filters.rules.plugin.nameMatcher.regex'
    name='quick.filters.rules.plugin.nameMatcher.regex'
    cssClass="long-field"
    required=true /]
Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport