Class CascadingSelectCustomFieldIndexer
java.lang.Object
com.atlassian.jira.search.issue.index.indexers.impl.BaseCustomFieldIndexer
com.atlassian.jira.search.issue.index.indexers.impl.CascadingSelectCustomFieldIndexer
- All Implemented Interfaces:
CustomFieldIndexer,FieldIndexer,FieldWithVisibilityIndexer
public class CascadingSelectCustomFieldIndexer
extends BaseCustomFieldIndexer
implements FieldWithVisibilityIndexer
This indexer contains two inner class indexers: one for indexing Child Options and another for indexing Combined (Parent and Child) Options.
Each field uses a different name for indexing; however, we want them to be indexed together when CascadingSelectCustomFieldIndexer.indexFields() is called.
Therefore, the inner class indexers should only be invoked by CascadingSelectCustomFieldIndexer.indexFields() and not from outside this class.
- Since:
- 10.7
-
Field Summary
FieldsFields inherited from class com.atlassian.jira.search.issue.index.indexers.impl.BaseCustomFieldIndexer
customField, fieldFields inherited from interface com.atlassian.jira.search.issue.index.indexers.FieldIndexer
LABELS_NO_VALUE_INDEX_VALUE, NO_VALUE_INDEX_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionCascadingSelectCustomFieldIndexer(FieldVisibilityManager fieldVisibilityManager, CustomField customField) -
Method Summary
Modifier and TypeMethodDescriptionDeclares the fields to be added to the index schemavoidindexFieldsWithVisibility(FieldValueCollector collector, Issue issue, CustomFieldPrefetchedData prefetchedData, boolean visible) Enforce implementing indexFieldWithVisibility instead of indexFields.booleanUsed to declare how the indexer handles nulls.Methods inherited from class com.atlassian.jira.search.issue.index.indexers.impl.BaseCustomFieldIndexer
getCustomField, getId, indexField, isFieldVisibleAndInScopeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.search.issue.index.indexers.FieldIndexer
getId, isFieldVisibleAndInScopeMethods inherited from interface com.atlassian.jira.search.issue.index.indexers.FieldWithVisibilityIndexer
indexFields
-
Field Details
-
CHILD_INDEX_SUFFIX
- See Also:
-
PARENT_AND_CHILD_INDEX_SUFFIX
- See Also:
-
PARENT_AND_CHILD_INDEX_SEPARATOR
- See Also:
-
-
Constructor Details
-
CascadingSelectCustomFieldIndexer
public CascadingSelectCustomFieldIndexer(FieldVisibilityManager fieldVisibilityManager, CustomField customField)
-
-
Method Details
-
getFields
Description copied from interface:FieldIndexerDeclares the fields to be added to the index schema- Specified by:
getFieldsin interfaceFieldIndexer- Overrides:
getFieldsin classBaseCustomFieldIndexer
-
indexFieldsWithVisibility
public void indexFieldsWithVisibility(FieldValueCollector collector, Issue issue, CustomFieldPrefetchedData prefetchedData, boolean visible) Description copied from interface:FieldWithVisibilityIndexerEnforce implementing indexFieldWithVisibility instead of indexFields.- Specified by:
indexFieldsWithVisibilityin interfaceFieldIndexer- Specified by:
indexFieldsWithVisibilityin interfaceFieldWithVisibilityIndexer- Parameters:
collector- the collector for collecting indexed valuesissue- that is having a document created from.prefetchedData- if the custom field type implementedCustomFieldType.getNonNullCustomFieldProvider()this reference will hold the matching value returned fromNonNullCustomFieldProvider.getCustomFieldInfo(List <Issue>)*
-
skipsIndexingNull
public boolean skipsIndexingNull()Description copied from interface:FieldIndexerUsed to declare how the indexer handles nulls.- Specified by:
skipsIndexingNullin interfaceFieldIndexer- Returns:
- true if the indexer doesn't do anything when the field value is null
-