com.atlassian.jira.issue.search.quicksearch
Class VersionQuickSearchHandler

java.lang.Object
  extended by com.atlassian.jira.issue.search.quicksearch.SingleWordQuickSearchHandler
      extended by com.atlassian.jira.issue.search.quicksearch.PrefixedSingleWordQuickSearchHandler
          extended by com.atlassian.jira.issue.search.quicksearch.VersionQuickSearchHandler
All Implemented Interfaces:
QuickSearchHandler
Direct Known Subclasses:
FixForQuickSearchHandler, RaisedInVersionQuickSearchHandler

public abstract class VersionQuickSearchHandler
extends PrefixedSingleWordQuickSearchHandler

Note that this handler needs to run after the Project Handler has run.

You can use wildcards '*' and '?' to match multiple versions. Example: '2*' will match versions '2', '2.1', '2.2' and '2.2.2'


Constructor Summary
VersionQuickSearchHandler(VersionManager versionManager, ProjectManager projectManager, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext)
           
 
Method Summary
static List getAllVersionIdsMatchingSubstring(Collection<Version> versions, String name)
          Return
protected abstract  String getPrefix()
          Gets the prefix this quick search handler handles
protected abstract  String getSearchParamName()
           
protected  Map handleWordSuffix(String versionRegexp, QuickSearchResult searchResult)
          Handle the word suffix (original word without the prefix)
 
Methods inherited from class com.atlassian.jira.issue.search.quicksearch.PrefixedSingleWordQuickSearchHandler
handleWord
 
Methods inherited from class com.atlassian.jira.issue.search.quicksearch.SingleWordQuickSearchHandler
getByName, modifySearchResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionQuickSearchHandler

public VersionQuickSearchHandler(VersionManager versionManager,
                                 ProjectManager projectManager,
                                 PermissionManager permissionManager,
                                 JiraAuthenticationContext authenticationContext)
Method Detail

handleWordSuffix

protected Map handleWordSuffix(String versionRegexp,
                               QuickSearchResult searchResult)
Description copied from class: PrefixedSingleWordQuickSearchHandler
Handle the word suffix (original word without the prefix)

Specified by:
handleWordSuffix in class PrefixedSingleWordQuickSearchHandler
Parameters:
versionRegexp - the original word minus the prefix
searchResult - search result
Returns:
Map of search parameters

getAllVersionIdsMatchingSubstring

public static List getAllVersionIdsMatchingSubstring(Collection<Version> versions,
                                                     String name)
Return

Parameters:
versions - The collection of versions to limit from
name - A name which can include wildcards (eg '*' or '?')
Returns:
A list of versionIds (as Strings) that match this parameter

getPrefix

protected abstract String getPrefix()
Description copied from class: PrefixedSingleWordQuickSearchHandler
Gets the prefix this quick search handler handles

Specified by:
getPrefix in class PrefixedSingleWordQuickSearchHandler
Returns:
handled prefix

getSearchParamName

protected abstract String getSearchParamName()


Copyright © 2002-2011 Atlassian. All Rights Reserved.