public class DefaultAutoCompleteJsonGenerator extends Object implements AutoCompleteJsonGenerator
Constructor and Description |
---|
DefaultAutoCompleteJsonGenerator(SearchHandlerManager searchHandlerManager,
JqlStringSupport jqlStringSupport,
FieldManager fieldManager,
JqlFunctionHandlerRegistry jqlFunctionHandlerRegistry) |
Modifier and Type | Method and Description |
---|---|
String |
getJqlReservedWordsJson() |
String |
getVisibleFieldNamesJson(ApplicationUser user,
Locale locale)
Will return an array of JSON objects containing the field names that the user can see, listed in alphabetical order.
|
String |
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.
|
public DefaultAutoCompleteJsonGenerator(SearchHandlerManager searchHandlerManager, JqlStringSupport jqlStringSupport, FieldManager fieldManager, JqlFunctionHandlerRegistry jqlFunctionHandlerRegistry)
public String getVisibleFieldNamesJson(ApplicationUser user, Locale locale) throws JSONException
AutoCompleteJsonGenerator
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]
getVisibleFieldNamesJson
in interface AutoCompleteJsonGenerator
user
- that the page is being rendered for.locale
- the locale of the user.JSONException
- if there is a problem generating the JSON objectpublic String getVisibleFunctionNamesJson(ApplicationUser user, Locale locale) throws JSONException
AutoCompleteJsonGenerator
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.
getVisibleFunctionNamesJson
in interface AutoCompleteJsonGenerator
user
- that the page is being rendered for.locale
- the locale of the user.JSONException
- if there is a problem generating the JSON objectpublic String getJqlReservedWordsJson() throws JSONException
getJqlReservedWordsJson
in interface AutoCompleteJsonGenerator
JSONException
- if there is a problem generating the JSON objectCopyright © 2002-2015 Atlassian. All Rights Reserved.