com.atlassian.jira.issue.search
Class DefaultSearchRequestFactory

java.lang.Object
  extended by com.atlassian.jira.issue.search.DefaultSearchRequestFactory
All Implemented Interfaces:
SearchRequestFactory

public class DefaultSearchRequestFactory
extends Object
implements SearchRequestFactory

Default Implementation for SearchRequestFactory

Since:
v3.13

Constructor Summary
DefaultSearchRequestFactory(IssueSearcherManager issueSearcherManager, SearchSortUtil searchSortUtil, SearchService searchService)
           
 
Method Summary
 SearchRequest createFromParameters(SearchRequest oldSearchRequest, com.atlassian.crowd.embedded.api.User searchUser, ActionParams actionParameters)
          Takes a user and a raw map of request parameters that are used to create an object representation of the search request.
 SearchRequest createFromQuery(SearchRequest oldSearchRequest, com.atlassian.crowd.embedded.api.User searchUser, Query query)
          Takes a user, a SearchQuery and an original search request that are used to create an object representation of the search request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSearchRequestFactory

public DefaultSearchRequestFactory(IssueSearcherManager issueSearcherManager,
                                   SearchSortUtil searchSortUtil,
                                   SearchService searchService)
Method Detail

createFromParameters

public SearchRequest createFromParameters(SearchRequest oldSearchRequest,
                                          com.atlassian.crowd.embedded.api.User searchUser,
                                          ActionParams actionParameters)
Description copied from interface: SearchRequestFactory
Takes a user and a raw map of request parameters that are used to create an object representation of the search request.

Specified by:
createFromParameters in interface SearchRequestFactory
Parameters:
oldSearchRequest - The original SearchRequest, if provided will be cloned as the basis for the new search request. The search requests Query will always be populated from the passed in parameters. If this is the same as the oldSearchRequest then the new search requests modified flag will be false. This can be null.
searchUser - The user that is searching
actionParameters - The raw request parameters that will be passed through the SearchInputTransformer.populateFromParams(User,com.atlassian.jira.issue.transport.FieldValuesHolder,com.atlassian.jira.issue.transport.ActionParams) and SearchInputTransformer.getSearchClause(User,com.atlassian.jira.issue.transport.FieldValuesHolder) methods to create a search clause. The parameters will also be used to create an OrderBy clause via the SearchSortUtil.getOrderByClause(java.util.Map) call. Must not be null.
Returns:
a new SearchRequest based off given parameters.

createFromQuery

public SearchRequest createFromQuery(SearchRequest oldSearchRequest,
                                     com.atlassian.crowd.embedded.api.User searchUser,
                                     Query query)
Description copied from interface: SearchRequestFactory
Takes a user, a SearchQuery and an original search request that are used to create an object representation of the search request.

Specified by:
createFromQuery in interface SearchRequestFactory
Parameters:
oldSearchRequest - The original SearchRequest, if provided will be cloned as the basis for the new search request. The search requests Query will always be populated from the passed in parameters. If this is the same as the oldSearchRequest then the new search requests modified flag will be false. This can be null.
searchUser - The user that is searching
query - the query that defines the search requests where and order by clauses.
Returns:
a new SearchRequest based off given parameters.


Copyright © 2002-2014 Atlassian. All Rights Reserved.