@InjectableComponent public class

JqlSelectOptionsUtil

extends Object
java.lang.Object
   ↳ com.atlassian.jira.jql.util.JqlSelectOptionsUtil

Class Overview

Contains utility methods for processing select option clauses

Summary

Public Constructors
JqlSelectOptionsUtil(OptionsManager optionsManager, FieldConfigSchemeManager fieldConfigSchemeManager, FieldConfigSchemeClauseContextUtil fieldConfigSchemeClauseContextUtil)
Public Methods
Option getOptionById(Long optionId)
List<Option> getOptions(CustomField customField, QueryContext queryContext, QueryLiteral literal, boolean checkOptionIds)
Returns the options that are represented by the QueryLiteral that are visible in the QueryContext for a particular CustomField.
List<Option> getOptions(CustomField customField, QueryLiteral literal, boolean checkOptionIds)
Returns all the options possible represented by the QueryLiteral for a particular CustomField.
List<Option> getOptions(CustomField customField, ApplicationUser user, QueryLiteral literal, boolean checkOptionIds)
Returns the options that are represented by the QueryLiteral that are visible to the User on the CustomField.
List<Option> getOptionsForScheme(FieldConfigScheme fieldConfigScheme)
Retreives all the options for the FieldConfigScheme.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JqlSelectOptionsUtil (OptionsManager optionsManager, FieldConfigSchemeManager fieldConfigSchemeManager, FieldConfigSchemeClauseContextUtil fieldConfigSchemeClauseContextUtil)

Public Methods

public Option getOptionById (Long optionId)

Parameters
optionId the id of the option
Returns

public List<Option> getOptions (CustomField customField, QueryContext queryContext, QueryLiteral literal, boolean checkOptionIds)

Returns the options that are represented by the QueryLiteral that are visible in the QueryContext for a particular CustomField.

Parameters
customField the customField to retreive options from
queryContext the context to check if the Options are visible in
literal the literal to search for Options for
checkOptionIds If true, the method tries to resolve long literals to option Ids before option values, and vice versa for string literals. If false, literals are only resolved to option values.
Returns
  • the list of found options, empty literals are ignored; never null.

public List<Option> getOptions (CustomField customField, QueryLiteral literal, boolean checkOptionIds)

Returns all the options possible represented by the QueryLiteral for a particular CustomField.

Parameters
customField the customField to retreive options from
literal the literal to find options for
checkOptionIds If true, the method tries to resolve long literals to option Ids before option values, and vice versa for string literals. If false, literals are only resolved to option values.
Returns
  • the list of found options, it will contain only a single null if the literal is empty.

public List<Option> getOptions (CustomField customField, ApplicationUser user, QueryLiteral literal, boolean checkOptionIds)

Returns the options that are represented by the QueryLiteral that are visible to the User on the CustomField.

Parameters
customField the customField to retreive options from
user the User to check if the option is visible to
literal the literal to search for Options for
checkOptionIds If true, the method tries to resolve long literals to option Ids before option values, and vice versa for string literals. If false, literals are only resolved to option values.
Returns
  • the list of found options, empty literals are ignored; never null.

public List<Option> getOptionsForScheme (FieldConfigScheme fieldConfigScheme)

Retreives all the options for the FieldConfigScheme.

Parameters
fieldConfigScheme the config scheme to retrieve the options from.
Returns