Package com.atlassian.jira.jql.parser
Class DefaultJqlQueryParser
java.lang.Object
com.atlassian.jira.jql.parser.DefaultJqlQueryParser
- All Implemented Interfaces:
JqlQueryParser
An implementation of
JqlQueryParser that implements the query parser using ANTLR.- Since:
- v4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValidFieldName(String fieldName) Determines whether or not the passed string is a valid JQL field name.booleanisValidFunctionArgument(String argument) Determines whether or not the passed string is a valid JQL function argument.booleanisValidFunctionName(String functionName) Determines whether or not the passed string is a valid JQL function name.booleanisValidValue(String value) Determines whether or not the passed string is a valid JQL value.static voidfinal QueryparseQuery(String jqlQuery) Parse the passed JQL string into its SearchQuery representation.
-
Constructor Details
-
DefaultJqlQueryParser
public DefaultJqlQueryParser()
-
-
Method Details
-
parseQuery
Description copied from interface:JqlQueryParserParse the passed JQL string into its SearchQuery representation.- Specified by:
parseQueryin interfaceJqlQueryParser- Parameters:
jqlQuery- the JQL string to parse. Must not benullor blank.- Returns:
- the Query representation of the passed jql string. Never null.
- Throws:
JqlParseException- if an error occurs while parsing the query.
-
isValidFieldName
Description copied from interface:JqlQueryParserDetermines whether or not the passed string is a valid JQL field name.- Specified by:
isValidFieldNamein interfaceJqlQueryParser- Parameters:
fieldName- the field name to check.- Returns:
- true if the passed string is a valid field name or false otherwise.
-
isValidFunctionArgument
Description copied from interface:JqlQueryParserDetermines whether or not the passed string is a valid JQL function argument.- Specified by:
isValidFunctionArgumentin interfaceJqlQueryParser- Parameters:
argument- the function argument to check.- Returns:
- true if the passed function argument is valid or false otherwise.
-
isValidFunctionName
Description copied from interface:JqlQueryParserDetermines whether or not the passed string is a valid JQL function name.- Specified by:
isValidFunctionNamein interfaceJqlQueryParser- Parameters:
functionName- the function name to check.- Returns:
- true if the passed function name is valid or false otherwise.
-
isValidValue
Description copied from interface:JqlQueryParserDetermines whether or not the passed string is a valid JQL value.- Specified by:
isValidValuein interfaceJqlQueryParser- Parameters:
value- the value to check.- Returns:
- true if the passed value is valid or false otherwise.
-
main
- Throws:
IOException
-