public interface

JqlStringSupport

com.atlassian.jira.jql.util.JqlStringSupport
Known Indirect Subclasses

Class Overview

A utility code to help dealing with JQL strings.

Summary

Public Methods
String encodeFieldName(String fieldName)
Encode the passed string into a safe JQL field name.
String encodeFunctionArgument(String argument)
Encode the passed string into a safe JQL function argument.
String encodeFunctionName(String functionName)
Encode the passed string into a safe JQL function name.
String encodeStringValue(String value)
Encode the passed string value into a safe JQL value if necessary.
String encodeValue(String value)
Encode the passed string value into a safe JQL value if necessary.
String generateJqlString(Clause clause)
Generates a JQL string representation for the passed clause.
String generateJqlString(Query query)
Generates a JQL string representation for the passed query.
Set<String> getJqlReservedWords()

Public Methods

public String encodeFieldName (String fieldName)

Encode the passed string into a safe JQL field name. This value will not be encoded if it is not already safe.

Parameters
fieldName the string to encode.
Returns
  • the encoded string.

public String encodeFunctionArgument (String argument)

Encode the passed string into a safe JQL function argument. The value will not be encoded if it is already safe.

Parameters
argument the string to encode.
Returns
  • the encoded string.

public String encodeFunctionName (String functionName)

Encode the passed string into a safe JQL function name. This value will not be encoded if it is not already safe.

Parameters
functionName the string to encode.
Returns
  • the encoded string.

public String encodeStringValue (String value)

Encode the passed string value into a safe JQL value if necessary. The value will not be encoded if it is already safe.

Parameters
value the value to encode.
Returns
  • the encoded string.

public String encodeValue (String value)

Encode the passed string value into a safe JQL value if necessary. The value will not be encoded if it is already safe. This is different to encodeStringValue(String) since it will not add quotes around long values.

Parameters
value the value to encode.
Returns
  • the encoded string.

public String generateJqlString (Clause clause)

Generates a JQL string representation for the passed clause. The returned JQL is automatically escaped as necessary.

Parameters
clause the clause. Cannot be null.
Returns
  • the generated JQL string representation of the passed clause.

public String generateJqlString (Query query)

Generates a JQL string representation for the passed query. The JQL string is always generated, that is, getQueryString() is completely ignored if it exists. The returned JQL is automatically escaped as necessary.

Parameters
query the query. Cannot be null.
Returns
  • the generated JQL string representation of the passed query.

public Set<String> getJqlReservedWords ()

Returns
  • all the reserved words for the JQL language.