com.atlassian.jira.issue.index.indexers.impl
Class UserFieldIndexer

java.lang.Object
  extended by com.atlassian.jira.issue.index.indexers.impl.BaseFieldIndexer
      extended by com.atlassian.jira.issue.index.indexers.impl.UserFieldIndexer
All Implemented Interfaces:
FieldIndexer
Direct Known Subclasses:
AssigneeIndexer, ReporterIndexer, VoterIndexer, WatcherIndexer

public abstract class UserFieldIndexer
extends BaseFieldIndexer

Abstract FieldIndexer that has helper methods to index usernames in a case-insensitive manner consistent with what Crowd Embedded does.

Since:
v5.0

Field Summary
 
Fields inherited from interface com.atlassian.jira.issue.index.indexers.FieldIndexer
LABELS_NO_VALUE_INDEX_VALUE, NO_VALUE_INDEX_VALUE
 
Constructor Summary
protected UserFieldIndexer(FieldVisibilityManager fieldVisibilityManager)
           
 
Method Summary
protected  void indexUsername(org.apache.lucene.document.Document doc, String indexField, String username, Issue issue)
          Lowercase the passed username in a manner consistent with Crowd Embedded's case-insensitivity and add it to the passed document.
protected  void indexUsernameWithDefault(org.apache.lucene.document.Document doc, String indexField, String username, String defaultValue, Issue issue)
          Index a single username field (case folded), with a default if the field is not set
 
Methods inherited from class com.atlassian.jira.issue.index.indexers.impl.BaseFieldIndexer
compareTo, equals, hashCode, indexDateField, indexDependentEntities, indexFoldedKeyword, indexKeyword, indexKeywordWithDefault, indexKeywordWithDefault, indexLocalDateField, indexLongAsKeyword, indexLongAsPaddedKeywordWithDefault, indexLongAsPaddedKeywordWithDefault, indexText, indexTextForSorting, isFieldVisibleAndInScope
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.index.indexers.FieldIndexer
addIndex, getDocumentFieldId, getId
 

Constructor Detail

UserFieldIndexer

protected UserFieldIndexer(FieldVisibilityManager fieldVisibilityManager)
Method Detail

indexUsername

protected void indexUsername(org.apache.lucene.document.Document doc,
                             String indexField,
                             String username,
                             Issue issue)
Lowercase the passed username in a manner consistent with Crowd Embedded's case-insensitivity and add it to the passed document.

Parameters:
doc - the document to add the field to.
indexField - the document field name.
username - the username to index. This value will be folded before adding it to the document.
issue - the issue that defines the context and contains the value we are indexing.
See Also:
CaseFolding.foldUsername(String)

indexUsernameWithDefault

protected void indexUsernameWithDefault(org.apache.lucene.document.Document doc,
                                        String indexField,
                                        String username,
                                        String defaultValue,
                                        Issue issue)
Index a single username field (case folded), with a default if the field is not set



Copyright © 2002-2012 Atlassian. All Rights Reserved.