com.atlassian.jira.issue.customfields.searchers
Class VersionSearcher.VersionLuceneFieldSorter

java.lang.Object
  extended by com.atlassian.jira.issue.statistics.AbstractVersionStatisticsMapper
      extended by com.atlassian.jira.issue.customfields.searchers.VersionSearcher.VersionLuceneFieldSorter
All Implemented Interfaces:
LuceneFieldSorter, StatisticsMapper
Enclosing class:
VersionSearcher

static class VersionSearcher.VersionLuceneFieldSorter
extends AbstractVersionStatisticsMapper
implements StatisticsMapper


Constructor Summary
VersionSearcher.VersionLuceneFieldSorter(VersionManager versionManager, CustomField customField)
           
 
Method Summary
 String getDocumentConstant()
          Get the constant that this field is indexed with.
protected  SearchContext getSearchContextFromField()
           
 SearchRequest getSearchUrlSuffix(Object value, SearchRequest searchRequest)
          Get a suffix for the issue navigator, which allows for filtering on this value.
protected  SearchParameter getVersionParameter(Long value)
           
 boolean isFieldAlwaysPartOfAnIssue()
          Check if the field is always part of an issues data.
 
Methods inherited from class com.atlassian.jira.issue.statistics.AbstractVersionStatisticsMapper
equals, getComparator, getProjectParameter, getValueFromLuceneField, hashCode, isValidValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.statistics.StatisticsMapper
isValidValue
 
Methods inherited from interface com.atlassian.jira.issue.search.LuceneFieldSorter
equals, getComparator, getValueFromLuceneField, hashCode
 

Constructor Detail

VersionSearcher.VersionLuceneFieldSorter

public VersionSearcher.VersionLuceneFieldSorter(VersionManager versionManager,
                                                CustomField customField)
Method Detail

isFieldAlwaysPartOfAnIssue

public boolean isFieldAlwaysPartOfAnIssue()
Description copied from interface: StatisticsMapper
Check if the field is always part of an issues data. This should only return false in the case of a custom field where the value does not have to be set for each issue.

Specified by:
isFieldAlwaysPartOfAnIssue in interface StatisticsMapper
Overrides:
isFieldAlwaysPartOfAnIssue in class AbstractVersionStatisticsMapper
Returns:
true if this mapper will always be part of an issues data

getSearchUrlSuffix

public SearchRequest getSearchUrlSuffix(Object value,
                                        SearchRequest searchRequest)
Description copied from interface: StatisticsMapper
Get a suffix for the issue navigator, which allows for filtering on this value.

eg. a project field would return a SearchRequest object who's getQueryString method will produce pid=10240

Note that values returned from implementations should return values that are URLEncoded.

Specified by:
getSearchUrlSuffix in interface StatisticsMapper
Overrides:
getSearchUrlSuffix in class AbstractVersionStatisticsMapper
Parameters:
value - This is the same value that will be returned from LuceneFieldSorter.getValueFromLuceneField(String)
searchRequest - is the search request that should be used as the base of the newly generated SearchRequest object. If this parameter is null then the return type will also be null.
Returns:
a SearchRequest object that will generate the correct issue navigator url to search the correct statistics set, null otherwise.
See Also:
URLEncoder.encode(String)

getSearchContextFromField

protected SearchContext getSearchContextFromField()

getVersionParameter

protected SearchParameter getVersionParameter(Long value)
Specified by:
getVersionParameter in class AbstractVersionStatisticsMapper

getDocumentConstant

public String getDocumentConstant()
Description copied from interface: LuceneFieldSorter
Get the constant that this field is indexed with.

Specified by:
getDocumentConstant in interface LuceneFieldSorter
Specified by:
getDocumentConstant in class AbstractVersionStatisticsMapper
See Also:
IssueDocument, CustomFieldSearcher


Copyright © 2002-2007 Atlassian. All Rights Reserved.