@InjectableComponent public class

FieldConfigSchemeClauseContextUtil

extends Object
java.lang.Object
   ↳ com.atlassian.jira.jql.context.FieldConfigSchemeClauseContextUtil

Class Overview

A utlitilty class for generating the clause context specified by a FieldConfigScheme, taking into account what is visible to the searcher.

Summary

Public Constructors
FieldConfigSchemeClauseContextUtil(IssueTypeSchemeManager issueTypeSchemeManager, ConstantsManager constantsManager, PermissionManager permissionManager, ProjectFactory projectFactory)
Public Methods
ClauseContext getContextForConfigScheme(ApplicationUser searcher, FieldConfigScheme fieldConfigScheme)
Given a FieldConfigScheme determines the ClauseContext specified by it, taking into account what is visible to the searcher User
FieldConfigScheme getFieldConfigSchemeFromContext(QueryContext queryContext, CustomField customField)
Finds the most specific FieldConfigScheme associated with a CustomField that is viewable from the given QueryContext.
boolean isConfigSchemeVisibleUnderContext(QueryContext queryContext, FieldConfigScheme fieldConfigScheme)
Checks if the FieldConfigScheme is visible under the given QueryContext
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FieldConfigSchemeClauseContextUtil (IssueTypeSchemeManager issueTypeSchemeManager, ConstantsManager constantsManager, PermissionManager permissionManager, ProjectFactory projectFactory)

Public Methods

public ClauseContext getContextForConfigScheme (ApplicationUser searcher, FieldConfigScheme fieldConfigScheme)

Given a FieldConfigScheme determines the ClauseContext specified by it, taking into account what is visible to the searcher User

Parameters
searcher the user the ClauseContext is generated for
fieldConfigScheme the config scheme the ClauseContext is generated for
Returns

public FieldConfigScheme getFieldConfigSchemeFromContext (QueryContext queryContext, CustomField customField)

Finds the most specific FieldConfigScheme associated with a CustomField that is viewable from the given QueryContext. The "Most Specific" means it will always return a FieldConfigScheme with a defined project context if available, otherwise it will return the FieldConfigScheme with the global context (if visible). If no FieldConfigScheme is visible under the QueryContext null is returned.

Parameters
queryContext The QueryContext to find the most specific visible FieldConfigScheme for.
customField The custom field to retreive FieldConfigSchemes from.
Returns

public boolean isConfigSchemeVisibleUnderContext (QueryContext queryContext, FieldConfigScheme fieldConfigScheme)

Checks if the FieldConfigScheme is visible under the given QueryContext

Parameters
queryContext the QueryContext of the search and user.
fieldConfigScheme the scheme to to check is visible
Returns