com.atlassian.jira.jql.util
Interface JqlStringSupport

All Known Implementing Classes:
JqlStringSupportImpl

public interface JqlStringSupport

A utility code to help dealing with JQL strings.

Since:
v4.0

Method Summary
 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()
           
 

Method Detail

encodeStringValue

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.

encodeValue

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.

encodeFunctionArgument

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.

encodeFunctionName

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.

encodeFieldName

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.

generateJqlString

String generateJqlString(Query query)
Generates a JQL string representation for the passed query. The JQL string is always generated, that is, Query.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.

generateJqlString

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.

getJqlReservedWords

Set<String> getJqlReservedWords()
Returns:
all the reserved words for the JQL language.


Copyright © 2002-2012 Atlassian. All Rights Reserved.