public class

DeterminedProjectsInQueryVisitor

extends Object
implements ClauseVisitor<R>
java.lang.Object
   ↳ com.atlassian.jira.issue.search.optimizers.DeterminedProjectsInQueryVisitor

Class Overview

A visitor that checks if we can determine any projects from the given query. It visits the given query recursively and each of the visits returns true if any projects could be determined.

For 'or' clause each of its subclauses visits must return true in order to determine project(s) from the whole clause. For 'and' at least one of its subclauses visits must return true in order to determine project(s).

All subclauses always need to be visited no matter what the results is so all projects are collected.

Summary

Constants
String PROJECT_CLAUSE_NAME
Fields
public static final ImmutableList<Operator> ALLOWED_OPERATORS
public final Builder<String> projectsSetBuilder
Public Constructors
DeterminedProjectsInQueryVisitor()
Public Methods
Set<String> getDeterminedProjects()
Boolean visit(OrClause orClause)
Visit called when accepting a OrClause.
Boolean visit(NotClause notClause)
Visit called when accepting a NotClause.
Boolean visit(AndClause andClause)
Visit called when accepting a AndClause.
Boolean visit(TerminalClause terminalClause)
Visit called when accepting a TerminalClause.
Boolean visit(ChangedClause changedClause)
Visit called when accepting a ChangedClause.
Boolean visit(WasClause wasClause)
Visit called when accepting a WasClause.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.query.clause.ClauseVisitor

Constants

public static final String PROJECT_CLAUSE_NAME

Constant Value: "project"

Fields

public static final ImmutableList<Operator> ALLOWED_OPERATORS

public final Builder<String> projectsSetBuilder

Public Constructors

public DeterminedProjectsInQueryVisitor ()

Public Methods

public Set<String> getDeterminedProjects ()

public Boolean visit (OrClause orClause)

Visit called when accepting a OrClause.

Parameters
orClause the node being visited.
Returns
  • The return type specified by the visitor.

public Boolean visit (NotClause notClause)

Visit called when accepting a NotClause.

Parameters
notClause the node being visited.
Returns
  • The return type specified by the visitor.

public Boolean visit (AndClause andClause)

Visit called when accepting a AndClause.

Parameters
andClause the node being visited.
Returns
  • The return type specified by the visitor.

public Boolean visit (TerminalClause terminalClause)

Visit called when accepting a TerminalClause.

Parameters
terminalClause the node being visited.
Returns
  • The return type specified by the visitor.

public Boolean visit (ChangedClause changedClause)

Visit called when accepting a ChangedClause.

Parameters
changedClause the node being visited.
Returns
  • The return type specified by the visitor.

public Boolean visit (WasClause wasClause)

Visit called when accepting a WasClause.

Parameters
wasClause the node being visited.
Returns
  • The return type specified by the visitor.