Package com.atlassian.jira.jql.context
Class CascadingSelectCustomFieldClauseContextFactory
java.lang.Object
com.atlassian.jira.jql.context.CascadingSelectCustomFieldClauseContextFactory
- All Implemented Interfaces:
ClauseContextFactory
@NonInjectableComponent
public class CascadingSelectCustomFieldClauseContextFactory
extends Object
implements ClauseContextFactory
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.
- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionCascadingSelectCustomFieldClauseContextFactory(CustomField customField, ContextSetUtil contextSetUtil, JqlSelectOptionsUtil jqlSelectOptionsUtil, FieldConfigSchemeClauseContextUtil fieldConfigSchemeClauseContextUtil, JqlOperandResolver jqlOperandResolver, JqlCascadingSelectLiteralUtil jqlCascadingSelectLiteralUtil, OperatorUsageValidator operatorUsageValidator) -
Method Summary
Modifier and TypeMethodDescriptiongetClauseContext(ApplicationUser searcher, TerminalClause terminalClause) Generates a clause context for the associated handler.
-
Constructor Details
-
CascadingSelectCustomFieldClauseContextFactory
public CascadingSelectCustomFieldClauseContextFactory(CustomField customField, ContextSetUtil contextSetUtil, JqlSelectOptionsUtil jqlSelectOptionsUtil, FieldConfigSchemeClauseContextUtil fieldConfigSchemeClauseContextUtil, JqlOperandResolver jqlOperandResolver, JqlCascadingSelectLiteralUtil jqlCascadingSelectLiteralUtil, OperatorUsageValidator operatorUsageValidator)
-
-
Method Details
-
getClauseContext
Description copied from interface:ClauseContextFactoryGenerates 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.- Specified by:
getClauseContextin interfaceClauseContextFactory- Parameters:
searcher- the user who is performing the searchterminalClause- 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.
-