com.atlassian.jira.web.component.jql
Class DefaultAutoCompleteJsonGenerator

java.lang.Object
  extended by com.atlassian.jira.web.component.jql.DefaultAutoCompleteJsonGenerator
All Implemented Interfaces:
AutoCompleteJsonGenerator

public class DefaultAutoCompleteJsonGenerator
extends java.lang.Object
implements AutoCompleteJsonGenerator

Since:
v4.0

Constructor Summary
DefaultAutoCompleteJsonGenerator(SearchHandlerManager searchHandlerManager, JqlStringSupport jqlStringSupport, FieldManager fieldManager, JqlFunctionHandlerRegistry jqlFunctionHandlerRegistry)
           
 
Method Summary
 java.lang.String getJqlReservedWordsJson()
           
 java.lang.String getVisibleFieldNamesJson(com.opensymphony.user.User user, java.util.Locale locale)
          Will return an array of JSON objects containing the field names that the user can see, listed in alphabetical order.
 java.lang.String getVisibleFunctionNamesJson(com.opensymphony.user.User user, java.util.Locale locale)
          Will return an array of JSON objects containing the functions names that are available in the system, listed in alphabetical order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAutoCompleteJsonGenerator

public DefaultAutoCompleteJsonGenerator(SearchHandlerManager searchHandlerManager,
                                        JqlStringSupport jqlStringSupport,
                                        FieldManager fieldManager,
                                        JqlFunctionHandlerRegistry jqlFunctionHandlerRegistry)
Method Detail

getVisibleFieldNamesJson

public java.lang.String getVisibleFieldNamesJson(com.opensymphony.user.User user,
                                                 java.util.Locale locale)
                                          throws JSONException
Description copied from interface: AutoCompleteJsonGenerator
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]

Specified by:
getVisibleFieldNamesJson in interface AutoCompleteJsonGenerator
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

public java.lang.String getVisibleFunctionNamesJson(com.opensymphony.user.User user,
                                                    java.util.Locale locale)
                                             throws JSONException
Description copied from interface: AutoCompleteJsonGenerator
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.

Specified by:
getVisibleFunctionNamesJson in interface AutoCompleteJsonGenerator
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

public java.lang.String getJqlReservedWordsJson()
                                         throws JSONException
Specified by:
getJqlReservedWordsJson in interface AutoCompleteJsonGenerator
Returns:
a JSON array that contains strings that are the JQL reserved words.
Throws:
JSONException - if there is a problem generating the JSON object


Copyright © 2002-2010 Atlassian. All Rights Reserved.