public class

GroupSelectorUtils

extends Object
java.lang.Object
   ↳ com.atlassian.jira.security.util.GroupSelectorUtils

Class Overview

Utility class for mapping group custom field values to the corresponding groups and/or users.

Summary

Public Constructors
GroupSelectorUtils(FieldManager fieldManager, UserUtil userUtil, GroupManager groupManager)
Public Methods
List<Field> getCustomFieldsSpecifyingGroups()
Get all custom fields that could possibly be identifying a group.
Set<User> getUsers(Object groupCustomFieldRawValue)
Set<User> getUsers(Issue issue, String customFieldId)
Get users from a group chosen by a Group Selector custom field, in a certain issue.
boolean isUserInCustomFieldGroup(Issue issue, CustomField field, User user)
Determines if a user is a member of a group specified by a custom field value.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public GroupSelectorUtils (FieldManager fieldManager, UserUtil userUtil, GroupManager groupManager)

Public Methods

public List<Field> getCustomFieldsSpecifyingGroups ()

Get all custom fields that could possibly be identifying a group. For example, select-lists, text fields.

Returns
  • list of Field objects, never null

public Set<User> getUsers (Object groupCustomFieldRawValue)

public Set<User> getUsers (Issue issue, String customFieldId)

Get users from a group chosen by a Group Selector custom field, in a certain issue.

Parameters
issue The current issue
customFieldId Id of GroupSelectorField.
Returns

public boolean isUserInCustomFieldGroup (Issue issue, CustomField field, User user)

Determines if a user is a member of a group specified by a custom field value.

Parameters
issue The current issue
field The custom field specifying the group(s). Eg. a select-list.
user The user we wish to check for
Returns
  • If user is in one of the groups specified by the custom field.