Interface GroupSelectorField

All Known Implementing Classes:
MultiGroupCFType, MultiSelectCFType, SelectCFType

public interface GroupSelectorField

An interface that can be implemented by a custom field type. By implementing this interface a custom field type lets JIRA 'know' that it can potentially be used as a 'Group Selector'. JIRA then uses this field in places where a group selector can be shown. For example:

A Group Selector is any field that can return a Group or a group name (String) as its value.

If a CustomFieldType implements this interface it should return values as objects of one of the following types:

For example, a Multi Select custom field is a Group Selector as the values it returns are a Collection of Strings. These strings must represent group names. It is up to JIRA Administrator to ensure that the when the Multi Select custom field's options are defined, that all of them map exactly to a group name.

Method Summary getQueryForGroup(String fieldID, String groupName)
          This method should be implemented in your custom type to return a Query.

Method Detail

getQueryForGroup getQueryForGroup(String fieldID,
                                                String groupName)
This method should be implemented in your custom type to return a Query. Generally you should return a TermQuery in the form of fieldName:groupName. However some custom fields, such as (@Link SelectCFType) manipulate the field identifiers and values before storing in the index. In cases like this you will have to implement the method such that it searches the correct fields.

fieldID - the id of the custom field
groupName - the name of the group to filter on
the (@Link Query) to pass to the searcher

Copyright © 2002-2012 Atlassian. All Rights Reserved.