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

java.lang.Object
  extended by com.atlassian.jira.issue.search.searchers.impl.AbstractIssueSearcher
      extended by com.atlassian.jira.issue.search.searchers.impl.AbstractUserSearcher
          extended by com.atlassian.jira.issue.customfields.searchers.UserPickerGroupSearcher
All Implemented Interfaces:
CustomFieldSearcher, SortableCustomFieldSearcher, CustomFieldStattable, Field, IssueSearcher, Comparable

public class UserPickerGroupSearcher
extends AbstractUserSearcher
implements CustomFieldSearcher, CustomFieldStattable, SortableCustomFieldSearcher


Field Summary
protected  CustomFieldSearcherModuleDescriptor moduleDescriptor
           
 
Fields inherited from class com.atlassian.jira.issue.search.searchers.impl.AbstractUserSearcher
applicationProperties, searchService, SELECT_LIST_GROUP, SELECT_LIST_NONE, SELECT_LIST_USER
 
Fields inherited from class com.atlassian.jira.issue.search.searchers.impl.AbstractIssueSearcher
authenticationContext, EDIT_TEMPLATE_SUFFIX, field, VIEW_TEMPLATE_SUFFIX
 
Fields inherited from interface com.atlassian.jira.issue.search.searchers.IssueSearcher
I18N_BUNDLE, log
 
Constructor Summary
UserPickerGroupSearcher(UserConverter userConverter, JiraAuthenticationContext authenticationContext, ApplicationProperties applicationProperties, UserPickerSearchService searchService, FieldVisibilityBean fieldVisibilityBean)
           
 
Method Summary
protected  CustomField getCustomField()
           
 CustomFieldSearcherModuleDescriptor getDescriptor()
           
 String getId()
          Returns field ID
 String getName()
          Returns field name
 String getNameKey()
          Returns null
protected  String getNoneValue()
          Returns "should_never_be_selected" string
 List getRelatedIndexers()
          Returns a list of FieldIndexer objects.
 List getSelectListOptions()
          Returns a list of select box options
 LuceneFieldSorter getSorter(CustomField customField)
           
 StatisticsMapper getStatisticsMapper(CustomField customField)
           
 Object getStringValue(CustomField customField, FieldValuesHolder fieldValuesHolder)
          Throws UnsupportedOperationException
 String getUserField()
          Returns field ID
protected  String getUserGroupSearchParamName()
          Returns field ID + GROUP_INDEX_SUFFIX
protected  String getUserSearchParamName()
          Returns field ID
 String getUserSelect()
          Returns field ID + "Select"
 Object getValue(CustomField customField, FieldValuesHolder fieldValuesHolder)
          Throws UnsupportedOperationException
 void index(org.apache.lucene.document.Document doc, CustomField field, Object value)
           
 void init(CustomFieldSearcherModuleDescriptor customFieldSearcherModuleDescriptor)
           
 void init(SearchableField field)
          Checks if the field is instance of CustomField and initializes it, otherwise throws IllegalArgumentException.
 boolean isShown(SearchContext searchContext)
          Checks if the searcher should be shown in this context
 
Methods inherited from class com.atlassian.jira.issue.search.searchers.impl.AbstractUserSearcher
getEditHtml, getI18nBean, getLinkedGroup, getLinkedUser, getQuerySnippet, getTextForuser, getVelocityParams, getViewHtml, isRevelentForSeachRequest, populateFromParams, populateFromSearchRequest, populateSearchRequest, validateParams
 
Methods inherited from class com.atlassian.jira.issue.search.searchers.impl.AbstractIssueSearcher
compareTo, equals, getI18n, hashCode, hasPermission, register, renderEditTemplate, renderViewTemplate, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.search.searchers.IssueSearcher
getEditHtml, getQuerySnippet, getViewHtml, isRevelentForSeachRequest, populateFromParams, populateFromSearchRequest, populateSearchRequest, register, validateParams
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

moduleDescriptor

protected CustomFieldSearcherModuleDescriptor moduleDescriptor
Constructor Detail

UserPickerGroupSearcher

public UserPickerGroupSearcher(UserConverter userConverter,
                               JiraAuthenticationContext authenticationContext,
                               ApplicationProperties applicationProperties,
                               UserPickerSearchService searchService,
                               FieldVisibilityBean fieldVisibilityBean)
Method Detail

init

public void init(SearchableField field)
Checks if the field is instance of CustomField and initializes it, otherwise throws IllegalArgumentException.

Specified by:
init in interface IssueSearcher
Overrides:
init in class AbstractIssueSearcher
Parameters:
field - field to initialize

getSelectListOptions

public List getSelectListOptions()
Returns a list of select box options

Specified by:
getSelectListOptions in class AbstractUserSearcher
Returns:
a list of select box options

getUserField

public String getUserField()
Returns field ID

Specified by:
getUserField in class AbstractUserSearcher
Returns:
field ID

getUserSelect

public String getUserSelect()
Returns field ID + "Select"

Specified by:
getUserSelect in class AbstractUserSearcher
Returns:
field ID + "Select"

getNoneValue

protected String getNoneValue()
Returns "should_never_be_selected" string

Specified by:
getNoneValue in class AbstractUserSearcher
Returns:
"should_never_be_selected"

getUserGroupSearchParamName

protected String getUserGroupSearchParamName()
Returns field ID + GROUP_INDEX_SUFFIX

Specified by:
getUserGroupSearchParamName in class AbstractUserSearcher
Returns:
field ID + GROUP_INDEX_SUFFIX

getUserSearchParamName

protected String getUserSearchParamName()
Returns field ID

Specified by:
getUserSearchParamName in class AbstractUserSearcher
Returns:
field ID

getId

public String getId()
Returns field ID

Specified by:
getId in interface Field
Returns:
field ID

getName

public String getName()
Returns field name

Specified by:
getName in interface Field
Overrides:
getName in class AbstractIssueSearcher
Returns:
field name

getNameKey

public String getNameKey()
Returns null

Specified by:
getNameKey in interface Field
Returns:
null

getRelatedIndexers

public List getRelatedIndexers()
Description copied from interface: IssueSearcher
Returns a list of FieldIndexer objects. The objects should be initialised and ready for action

Specified by:
getRelatedIndexers in interface IssueSearcher
Returns:
List of FieldIndexer objects. Must not be null. Return Collections.EMPTY_LIST if not available

index

public void index(org.apache.lucene.document.Document doc,
                  CustomField field,
                  Object value)

getCustomField

protected CustomField getCustomField()

getStatisticsMapper

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

getSorter

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

init

public void init(CustomFieldSearcherModuleDescriptor customFieldSearcherModuleDescriptor)
Specified by:
init in interface CustomFieldSearcher

getDescriptor

public CustomFieldSearcherModuleDescriptor getDescriptor()
Specified by:
getDescriptor in interface CustomFieldSearcher

getStringValue

public Object getStringValue(CustomField customField,
                             FieldValuesHolder fieldValuesHolder)
Throws UnsupportedOperationException

Specified by:
getStringValue in interface CustomFieldSearcher
Parameters:
customField - not used
fieldValuesHolder - not used
Returns:
nothing, throws UnsupportedOperationException

getValue

public Object getValue(CustomField customField,
                       FieldValuesHolder fieldValuesHolder)
Throws UnsupportedOperationException

Specified by:
getValue in interface CustomFieldSearcher
Parameters:
customField - not used
fieldValuesHolder - not used
Returns:
nothing, throws UnsupportedOperationException

isShown

public boolean isShown(SearchContext searchContext)
Description copied from interface: IssueSearcher
Checks if the searcher should be shown in this context

Specified by:
isShown in interface IssueSearcher
Overrides:
isShown in class AbstractIssueSearcher
Parameters:
searchContext - the context of the search (i.e. projects and issue types selected)
Returns:
true if the searcher will appear in the issue navigator


Copyright © 2002-2008 Atlassian. All Rights Reserved.