Package com.atlassian.jira.issue.search
Class DefaultSearchRequestFactory
java.lang.Object
com.atlassian.jira.issue.search.DefaultSearchRequestFactory
- All Implemented Interfaces:
SearchRequestFactory
Default Implementation for SearchRequestFactory
- Since:
- v3.13
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultSearchRequestFactory(IssueSearcherManager issueSearcherManager, SearchSortUtil searchSortUtil, SearchService searchService) -
Method Summary
Modifier and TypeMethodDescriptioncreateFromParameters(SearchRequest oldSearchRequest, ApplicationUser 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.createFromQuery(SearchRequest oldSearchRequest, ApplicationUser 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.
-
Constructor Details
-
DefaultSearchRequestFactory
public DefaultSearchRequestFactory(IssueSearcherManager issueSearcherManager, SearchSortUtil searchSortUtil, SearchService searchService)
-
-
Method Details
-
createFromParameters
public SearchRequest createFromParameters(SearchRequest oldSearchRequest, ApplicationUser searchUser, ActionParams actionParameters) Description copied from interface:SearchRequestFactoryTakes a user and a raw map of request parameters that are used to create an object representation of the search request.- Specified by:
createFromParametersin interfaceSearchRequestFactory- Parameters:
oldSearchRequest- The original SearchRequest, if provided will be cloned as the basis for the new search request. The search requestsQuerywill 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 searchingactionParameters- The raw request parameters that will be passed through theSearchInputTransformer.populateFromParams(ApplicationUser, com.atlassian.jira.issue.transport.FieldValuesHolder, com.atlassian.jira.issue.transport.ActionParams)andSearchInputTransformer.getSearchClause(ApplicationUser, com.atlassian.jira.issue.transport.FieldValuesHolder)methods to create a search clause. The parameters will also be used to create anOrderByclause via theSearchSortUtil.getOrderByClause(java.util.Map)call. Must not be null.- Returns:
- a new SearchRequest based off given parameters.
-
createFromQuery
public SearchRequest createFromQuery(SearchRequest oldSearchRequest, ApplicationUser searchUser, Query query) Description copied from interface:SearchRequestFactoryTakes a user, a SearchQuery and an original search request that are used to create an object representation of the search request.- Specified by:
createFromQueryin interfaceSearchRequestFactory- Parameters:
oldSearchRequest- The original SearchRequest, if provided will be cloned as the basis for the new search request. The search requestsQuerywill 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 searchingquery- the query that defines the search requests where and order by clauses.- Returns:
- a new SearchRequest based off given parameters.
-