@NonInjectableComponent public class

CascadingSelectCustomFieldClauseContextFactory

extends Object
implements ClauseContextFactory
java.lang.Object
   ↳ com.atlassian.jira.jql.context.CascadingSelectCustomFieldClauseContextFactory

Class Overview

The context calculation for cascading select. This context factory is slightly inconsistent from others in JIRA. In other fields it is true that context(field in (a, c)) = context(field = a or field = c). We decided not to enforce this for the cascading select because it uses encoded query literals to represent a single query. For example, the query "field in cascadeoption(p1, NONE)" will actually return "QueryLiteral(id(p1))", "QueryLiteral(-id(p1child1))", "QueryLiteral(-id(p1child2))",...,"QueryLiteral(-id(p1childn))". In this case we look at every literal when calculating the context rather than at each literal indivuidally so that we can produce a some useful context.

Summary

Public Constructors
CascadingSelectCustomFieldClauseContextFactory(CustomField customField, ContextSetUtil contextSetUtil, JqlSelectOptionsUtil jqlSelectOptionsUtil, FieldConfigSchemeClauseContextUtil fieldConfigSchemeClauseContextUtil, JqlOperandResolver jqlOperandResolver, JqlCascadingSelectLiteralUtil jqlCascadingSelectLiteralUtil, OperatorUsageValidator operatorUsageValidator)
Public Methods
ClauseContext getClauseContext(ApplicationUser searcher, TerminalClause terminalClause)
Generates a clause context for the associated handler.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.jql.context.ClauseContextFactory

Public Constructors

public CascadingSelectCustomFieldClauseContextFactory (CustomField customField, ContextSetUtil contextSetUtil, JqlSelectOptionsUtil jqlSelectOptionsUtil, FieldConfigSchemeClauseContextUtil fieldConfigSchemeClauseContextUtil, JqlOperandResolver jqlOperandResolver, JqlCascadingSelectLiteralUtil jqlCascadingSelectLiteralUtil, OperatorUsageValidator operatorUsageValidator)

Public Methods

public ClauseContext getClauseContext (ApplicationUser searcher, TerminalClause terminalClause)

Generates a clause context for the associated handler. If the clause context could not be determined for any reason, this will return the Global Clause Context.

Parameters
searcher the user who is performing the search
terminalClause the clause for which this factory is generating a context.
Returns
  • ClauseContext that contains the implied and explicit project and issue types that this clause is in context for.