com.atlassian.jira.issue.search
Interface SearchRequestManager

All Superinterfaces:
SharedEntityAccessor<SearchRequest>
All Known Implementing Classes:
DefaultSearchRequestManager

public interface SearchRequestManager
extends SharedEntityAccessor<SearchRequest>

This manager is responsible for SearchRequests. SearchRequests encapsulate all information used for searches in the issue navigator.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.SharedEntityAccessor
SharedEntityAccessor.Factory, SharedEntityAccessor.RetrievalDescriptor
 
Method Summary
 SearchRequest create(SearchRequest request)
          Takes a SearchRequest, user, name of search request and description and persists the XML representation of the SearchRequest object to the database along with the rest of the details
 void delete(java.lang.Long id)
          Removes the SearchRequest GenericValue from the database based on its id
 java.util.Collection<SearchRequest> getAllOwnedSearchRequests(com.opensymphony.user.User user)
          Retrieves a collection of SearchRequest objects that a user created.
 SearchRequest getOwnedSearchRequestByName(com.opensymphony.user.User author, java.lang.String name)
          Find a search request given the author and the request name.
 SearchRequest getRequest(com.opensymphony.user.User searcher, java.lang.Long id)
          Deprecated. since v3.13. Use SearchRequestService.getFilter(com.atlassian.jira.bc.JiraServiceContext, Long)
 SearchRequest getSearchRequest(com.opensymphony.user.User searcher, java.lang.Long id)
          Deprecated. since v3.13. Use SearchRequestService.getFilter(com.atlassian.jira.bc.JiraServiceContext, Long)
 SearchRequest getSearchRequestById(com.opensymphony.user.User user, java.lang.Long id)
          Return the search request as stored in the database
 java.lang.String getSearchRequestOwnerUserName(java.lang.Long id)
          Return the owner of the passed SearchRequest.
 java.util.List<SearchRequest> getVisibleRequests(com.opensymphony.user.User user)
          Deprecated. since v3.13. Use SearchRequestService.getFavouriteFilters(com.opensymphony.user.User) or search functions
 SharedEntitySearchResult<SearchRequest> search(SharedEntitySearchParameters searchParameters, com.opensymphony.user.User user, int pagePosition, int pageWidth)
          Search for the SearchRequests that match the passed searchParameters.
 SearchRequest update(SearchRequest request)
          Updates an existing search request in the database.
 
Methods inherited from interface com.atlassian.jira.sharing.SharedEntityAccessor
adjustFavouriteCount, get, get, getAll, getAllIndexableSharedEntities, getSharedEntity, getSharedEntity, getType, hasPermissionToUse
 

Method Detail

getAllOwnedSearchRequests

java.util.Collection<SearchRequest> getAllOwnedSearchRequests(com.opensymphony.user.User user)
Retrieves a collection of SearchRequest objects that a user created.

Parameters:
user - The user who created the SearchRequests
Returns:
Collection of all SearchRequest that user created.

getOwnedSearchRequestByName

SearchRequest getOwnedSearchRequestByName(com.opensymphony.user.User author,
                                          java.lang.String name)
Find a search request given the author and the request name.

Parameters:
author - The author of the SearchRequest
name - The name of the SearchRequest
Returns:
The SearchRequest, or null if there is no matching request

getSearchRequestById

SearchRequest getSearchRequestById(com.opensymphony.user.User user,
                                   java.lang.Long id)
Return the search request as stored in the database

Parameters:
user - The user to check shares with
id - The id of the filter
Returns:
The SearchRequest, or null if the request id does not exist

getSearchRequestOwnerUserName

java.lang.String getSearchRequestOwnerUserName(java.lang.Long id)
Return the owner of the passed SearchRequest. This is mainly used for permission checks.

Parameters:
id - the identifier of the SearchRequest.
Returns:
the username of the owner of the SearchRequest. Null is returned if the SearchRequest does not exist.

create

SearchRequest create(SearchRequest request)
Takes a SearchRequest, user, name of search request and description and persists the XML representation of the SearchRequest object to the database along with the rest of the details

Parameters:
request - SearchResult that should be persisted
Returns:
SearchRequest object that was persisted to the database

update

SearchRequest update(SearchRequest request)
Updates an existing search request in the database.

Parameters:
request - the request to persist
Returns:
A SearchRequest that was persisted to the database

delete

void delete(java.lang.Long id)
Removes the SearchRequest GenericValue from the database based on its id

Parameters:
id - of the search request to be removed from storage

getVisibleRequests

@Deprecated
java.util.List<SearchRequest> getVisibleRequests(com.opensymphony.user.User user)
Deprecated. since v3.13. Use SearchRequestService.getFavouriteFilters(com.opensymphony.user.User) or search functions

Return a list of all search requests visible to a given user.

Parameters:
user - The user to find search requests for
Returns:
A list of visible search requests

getRequest

@Deprecated
SearchRequest getRequest(com.opensymphony.user.User searcher,
                                    java.lang.Long id)
Deprecated. since v3.13. Use SearchRequestService.getFilter(com.atlassian.jira.bc.JiraServiceContext, Long)

Find a search request given the searcher and the search request ID.

Parameters:
searcher - The user to check permissions for.
id - The id of the SearchRequest
Returns:
The SearchRequest, or null if there is no matching request for this searcher.

getSearchRequest

@Deprecated
SearchRequest getSearchRequest(com.opensymphony.user.User searcher,
                                          java.lang.Long id)
Deprecated. since v3.13. Use SearchRequestService.getFilter(com.atlassian.jira.bc.JiraServiceContext, Long)

Find a search request given the searcher and the search request ID.

Parameters:
searcher - The user to check permissions for.
id - The id of the SearchRequest
Returns:
The SearchRequest, or null if there is no matching request for this searcher.

search

SharedEntitySearchResult<SearchRequest> search(SharedEntitySearchParameters searchParameters,
                                               com.opensymphony.user.User user,
                                               int pagePosition,
                                               int pageWidth)
Search for the SearchRequests that match the passed searchParameters. The result can be paged so that a subset of the results can be returned.

Parameters:
searchParameters - the searchParameters to query.
user - the user performing the search.
pagePosition - the page to return.
pageWidth - the number of results per page.
Returns:
the result of the search.


Copyright © 2002-2010 Atlassian. All Rights Reserved.