@ThreadSafe public final class

DefaultJqlQueryParser

extends Object
implements JqlQueryParser
java.lang.Object
   ↳ com.atlassian.jira.jql.parser.DefaultJqlQueryParser

Class Overview

An implementation of JqlQueryParser that implements the query parser using ANTLR.

Summary

Public Constructors
DefaultJqlQueryParser()
Public Methods
boolean isValidFieldName(String fieldName)
Determines whether or not the passed string is a valid JQL field name.
boolean isValidFunctionArgument(String argument)
Determines whether or not the passed string is a valid JQL function argument.
boolean isValidFunctionName(String functionName)
Determines whether or not the passed string is a valid JQL function name.
boolean isValidValue(String value)
Determines whether or not the passed string is a valid JQL value.
static void main(String[] args)
final Query parseQuery(String jqlQuery)
Parse the passed JQL string into its SearchQuery representation.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.jql.parser.JqlQueryParser

Public Constructors

public DefaultJqlQueryParser ()

Public Methods

public boolean isValidFieldName (String fieldName)

Determines whether or not the passed string is a valid JQL field name.

Parameters
fieldName the field name to check.
Returns
  • true if the passed string is a valid field name or false otherwise.

public boolean isValidFunctionArgument (String argument)

Determines whether or not the passed string is a valid JQL function argument.

Parameters
argument the function argument to check.
Returns
  • true if the passed function argument is valid or false otherwise.

public boolean isValidFunctionName (String functionName)

Determines whether or not the passed string is a valid JQL function name.

Parameters
functionName the function name to check.
Returns
  • true if the passed function name is valid or false otherwise.

public boolean isValidValue (String value)

Determines whether or not the passed string is a valid JQL value.

Parameters
value the value to check.
Returns
  • true if the passed value is valid or false otherwise.

public static void main (String[] args)

Throws
IOException

public final Query parseQuery (String jqlQuery)

Parse the passed JQL string into its SearchQuery representation.

Parameters
jqlQuery the JQL string to parse. Must not be null or blank.
Returns
  • the Query representation of the passed jql string. Never null.