Class DefaultJqlQueryParser

java.lang.Object
com.atlassian.jira.jql.parser.DefaultJqlQueryParser
All Implemented Interfaces:
JqlQueryParser

@ThreadSafe public final class DefaultJqlQueryParser extends Object implements JqlQueryParser
An implementation of JqlQueryParser that implements the query parser using ANTLR.
Since:
v4.0
  • Constructor Details

    • DefaultJqlQueryParser

      public DefaultJqlQueryParser()
  • Method Details

    • parseQuery

      public final Query parseQuery(String jqlQuery) throws JqlParseException
      Description copied from interface: JqlQueryParser
      Parse the passed JQL string into its SearchQuery representation.
      Specified by:
      parseQuery in interface JqlQueryParser
      Parameters:
      jqlQuery - the JQL string to parse. Must not be null or blank.
      Returns:
      the Query representation of the passed jql string. Never null.
      Throws:
      JqlParseException - if an error occurs while parsing the query.
    • isValidFieldName

      public boolean isValidFieldName(String fieldName)
      Description copied from interface: JqlQueryParser
      Determines whether or not the passed string is a valid JQL field name.
      Specified by:
      isValidFieldName in interface JqlQueryParser
      Parameters:
      fieldName - the field name to check.
      Returns:
      true if the passed string is a valid field name or false otherwise.
    • isValidFunctionArgument

      public boolean isValidFunctionArgument(String argument)
      Description copied from interface: JqlQueryParser
      Determines whether or not the passed string is a valid JQL function argument.
      Specified by:
      isValidFunctionArgument in interface JqlQueryParser
      Parameters:
      argument - the function argument to check.
      Returns:
      true if the passed function argument is valid or false otherwise.
    • isValidFunctionName

      public boolean isValidFunctionName(String functionName)
      Description copied from interface: JqlQueryParser
      Determines whether or not the passed string is a valid JQL function name.
      Specified by:
      isValidFunctionName in interface JqlQueryParser
      Parameters:
      functionName - the function name to check.
      Returns:
      true if the passed function name is valid or false otherwise.
    • isValidValue

      public boolean isValidValue(String value)
      Description copied from interface: JqlQueryParser
      Determines whether or not the passed string is a valid JQL value.
      Specified by:
      isValidValue in interface JqlQueryParser
      Parameters:
      value - the value to check.
      Returns:
      true if the passed value is valid or false otherwise.
    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException