com.atlassian.jira.issue.customfields.searchers
Class MultiSelectSearcher

java.lang.Object
  extended by com.atlassian.jira.issue.customfields.searchers.BaseCustomFieldSearcher
      extended by com.atlassian.jira.issue.customfields.searchers.AbstractCustomFieldSearcher
          extended by com.atlassian.jira.issue.customfields.searchers.MultiSelectSearcher
All Implemented Interfaces:
CustomFieldSearcher, SortableCustomFieldSearcher, CustomFieldStattable, Field, IssueSearcher, Comparable

public class MultiSelectSearcher
extends AbstractCustomFieldSearcher
implements CustomFieldStattable, SortableCustomFieldSearcher


Field Summary
 
Fields inherited from class com.atlassian.jira.issue.customfields.searchers.BaseCustomFieldSearcher
authenticationContext, customField, descriptor, log
 
Fields inherited from interface com.atlassian.jira.issue.search.searchers.IssueSearcher
I18N_BUNDLE
 
Constructor Summary
MultiSelectSearcher(SelectConverter selectConverter, FieldVisibilityBean fieldVisibilityBean)
           
 
Method Summary
 CustomFieldParams getParamsFromSearchRequest(CustomField customField, SearchRequest searchRequest)
           
 String getQuerySnippet(CustomField customField, SearchRequest searchRequest)
          Returns a query string that can be interpreted by the IssueNavigator action to execute this as a search request.
 LuceneFieldSorter getSorter(CustomField customField)
           
 StatisticsMapper getStatisticsMapper(CustomField customField)
           
 Object getStringValue(CustomField customField, FieldValuesHolder fieldValuesHolder)
           
 Object getValue(CustomField customField, FieldValuesHolder fieldValuesHolder)
           
 void index(org.apache.lucene.document.Document doc, CustomField field, Object value)
          Add index to the given Document object.
 List makeSearchParameters(CustomField field, CustomFieldParams customFieldParams)
           
 void validateParams(SearchContext searchContext, FieldValuesHolder fieldValuesHolder, I18nHelper i18nHelper, ErrorCollection errors)
          You probably do not want to override this.
 
Methods inherited from class com.atlassian.jira.issue.customfields.searchers.AbstractCustomFieldSearcher
getEditHtml, getI18n, getQuerySnippet, getRelatedIndexers, getViewHtml, isExistsInSeachRequest, isRevelentForSeachRequest, populateFromParams, populateFromParams, populateFromSearchRequest, populateSearchRequest, validateParams
 
Methods inherited from class com.atlassian.jira.issue.customfields.searchers.BaseCustomFieldSearcher
compareTo, getDescriptor, getId, getName, getNameKey, init, init, isShown, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiSelectSearcher

public MultiSelectSearcher(SelectConverter selectConverter,
                           FieldVisibilityBean fieldVisibilityBean)
Method Detail

validateParams

public void validateParams(SearchContext searchContext,
                           FieldValuesHolder fieldValuesHolder,
                           I18nHelper i18nHelper,
                           ErrorCollection errors)
Description copied from class: AbstractCustomFieldSearcher
You probably do not want to override this. It merely calls the AbstractCustomFieldSearcher.validateParams(com.atlassian.jira.issue.fields.CustomField, com.atlassian.jira.issue.search.SearchContext, com.atlassian.jira.issue.transport.FieldValuesHolder, com.atlassian.jira.util.I18nHelper, com.atlassian.jira.util.ErrorCollection) with the right CustomField.

Specified by:
validateParams in interface IssueSearcher
Overrides:
validateParams in class AbstractCustomFieldSearcher
Parameters:
searchContext - the search context for the search being validated.
fieldValuesHolder - contains values populated by the searchers

makeSearchParameters

public List makeSearchParameters(CustomField field,
                                 CustomFieldParams customFieldParams)
Specified by:
makeSearchParameters in class AbstractCustomFieldSearcher
customFieldParams - must never be null
Returns:
List of SearchParameters.

getParamsFromSearchRequest

public CustomFieldParams getParamsFromSearchRequest(CustomField customField,
                                                    SearchRequest searchRequest)
Specified by:
getParamsFromSearchRequest in class AbstractCustomFieldSearcher

getStringValue

public Object getStringValue(CustomField customField,
                             FieldValuesHolder fieldValuesHolder)
Specified by:
getStringValue in interface CustomFieldSearcher
Overrides:
getStringValue in class BaseCustomFieldSearcher

getValue

public Object getValue(CustomField customField,
                       FieldValuesHolder fieldValuesHolder)
Specified by:
getValue in interface CustomFieldSearcher
Overrides:
getValue in class BaseCustomFieldSearcher

index

public void index(org.apache.lucene.document.Document doc,
                  CustomField field,
                  Object value)
Description copied from class: AbstractCustomFieldSearcher
Add index to the given Document object. The "value" is/are the value object (s) returned from the CustomFieldType.

Specified by:
index in class AbstractCustomFieldSearcher

getQuerySnippet

public String getQuerySnippet(CustomField customField,
                              SearchRequest searchRequest)
Description copied from class: AbstractCustomFieldSearcher
Returns a query string that can be interpreted by the IssueNavigator action to execute this as a search request. The query string can then be used to partially reconstruct the searchRequest being passed i. The returned query string should be encoded using JiraUrlCodec.encode(java.lang.String) and begin with an &.

Specified by:
getQuerySnippet in class AbstractCustomFieldSearcher
Parameters:
customField - - custom field call this method
searchRequest - - the search request to get the url parameters from
Returns:
String encoded query string

getStatisticsMapper

public StatisticsMapper getStatisticsMapper(CustomField customField)
Specified by:
getStatisticsMapper in interface CustomFieldStattable

getSorter

public LuceneFieldSorter getSorter(CustomField customField)
Specified by:
getSorter in interface SortableCustomFieldSearcher


Copyright © 2002-2009 Atlassian. All Rights Reserved.