Interface AutoCompleteJsonGenerator
- All Known Implementing Classes:
DefaultAutoCompleteJsonGenerator
public interface AutoCompleteJsonGenerator
Used to generate JSON objects for the JQL autocomplete.
- Since:
- v4.0
-
Method Summary
Modifier and TypeMethodDescriptiongetVisibleFieldNamesJson
(ApplicationUser user, Locale locale) Will return an array of JSON objects containing the field names that the user can see, listed in alphabetical order.getVisibleFunctionNamesJson
(ApplicationUser user, Locale locale) Will return an array of JSON objects containing the functions names that are available in the system, listed in alphabetical order.
-
Method Details
-
getVisibleFieldNamesJson
Will return an array of JSON objects containing the field names that the user can see, listed in alphabetical order.The JSON object will contain: value: value that will be autocompleted displayName: the html escaped display name for the value auto (optional) : if present indicates that the field can have values autocompleted orderable (optional) : if present indicates that the field can participate in the order by clause cfid (optional) : if present indicates that the field is a custom field that can be referenced by cf[xxxxx]
- Parameters:
user
- that the page is being rendered for.locale
- the locale of the user.- Returns:
- JSON string as described above.
- Throws:
JSONException
- if there is a problem generating the JSON object
-
getVisibleFunctionNamesJson
Will return an array of JSON objects containing the functions names that are available in the system, listed in alphabetical order.The JSON object will contain: value: value that will be autocompleted displayName: the html escaped display name for the value isList (optional) : true if the function generates a list of values, used to determine if it can work with the in operators.
- Parameters:
user
- that the page is being rendered for.locale
- the locale of the user.- Returns:
- JSON string as described above
- Throws:
JSONException
- if there is a problem generating the JSON object
-
getJqlReservedWordsJson
- Returns:
- a JSON array that contains strings that are the JQL reserved words.
- Throws:
JSONException
- if there is a problem generating the JSON object
-