Package com.atlassian.jira.jql.util
Class JqlSelectOptionsUtil
java.lang.Object
com.atlassian.jira.jql.util.JqlSelectOptionsUtil
Contains utility methods for processing select option clauses
- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionJqlSelectOptionsUtil(OptionsManager optionsManager, FieldConfigSchemeManager fieldConfigSchemeManager, FieldConfigSchemeClauseContextUtil fieldConfigSchemeClauseContextUtil) -
Method Summary
Modifier and TypeMethodDescriptiongetOptionById(Long optionId) getOptions(CustomField customField, QueryContext queryContext, QueryLiteral literal, boolean checkOptionIds) Returns the options that are represented by theQueryLiteralthat are visible in theQueryContextfor a particularCustomField.getOptions(CustomField customField, QueryLiteral literal, boolean checkOptionIds) Returns all the options possible represented by theQueryLiteralfor a particularCustomField.getOptions(CustomField customField, ApplicationUser user, QueryLiteral literal, boolean checkOptionIds) Returns the options that are represented by theQueryLiteralthat are visible to theUseron theCustomField.getOptionsForScheme(FieldConfigScheme fieldConfigScheme) Retreives all the options for theFieldConfigScheme.
-
Constructor Details
-
JqlSelectOptionsUtil
public JqlSelectOptionsUtil(OptionsManager optionsManager, FieldConfigSchemeManager fieldConfigSchemeManager, FieldConfigSchemeClauseContextUtil fieldConfigSchemeClauseContextUtil)
-
-
Method Details
-
getOptions
public List<Option> getOptions(CustomField customField, QueryContext queryContext, QueryLiteral literal, boolean checkOptionIds) Returns the options that are represented by theQueryLiteralthat are visible in theQueryContextfor a particularCustomField.- Parameters:
customField- the customField to retreive options fromqueryContext- the context to check if theOptions are visible inliteral- the literal to search forOptions forcheckOptionIds- 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.
-
getOptions
public List<Option> getOptions(CustomField customField, ApplicationUser user, QueryLiteral literal, boolean checkOptionIds) Returns the options that are represented by theQueryLiteralthat are visible to theUseron theCustomField.- Parameters:
customField- the customField to retreive options fromuser- the User to check if the option is visible toliteral- the literal to search forOptions forcheckOptionIds- 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.
-
getOptionById
- Parameters:
optionId- the id of the option- Returns:
- the
Optionfound or null.
-
getOptions
public List<Option> getOptions(CustomField customField, QueryLiteral literal, boolean checkOptionIds) Returns all the options possible represented by theQueryLiteralfor a particularCustomField.- Parameters:
customField- the customField to retreive options fromliteral- the literal to find options forcheckOptionIds- 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.
-
getOptionsForScheme
Retreives all the options for theFieldConfigScheme.- Parameters:
fieldConfigScheme- the config scheme to retrieve the options from.- Returns:
- the options for the
FieldConfigSchemein a mutableList; never null.
-