com.atlassian.jira.issue.search
Interface SearchRequestManager

All Superinterfaces:
SharedEntityAccessor
All Known Implementing Classes:
DefaultSearchRequestManager

public interface SearchRequestManager
extends SharedEntityAccessor

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(Long id)
          Removes the SearchRequest GenericValue from the database based on its id
 Collection getAllOwnedSearchRequests(User user)
          Retrieves a collection of SearchRequest objects that a user created.
 SearchRequest getOwnedSearchRequestByName(User author, String name)
          Find a search request given the author and the request name.
 SearchRequest getRequest(User searcher, Long id)
          Deprecated. since v3.13. Use SearchRequestService.getFilter(com.atlassian.jira.bc.JiraServiceContext, Long)
 List getRequests()
          Deprecated. since v3.13. Use SearchRequestService.getFavouriteFilters(com.opensymphony.user.User) or search functions
 Collection getRequests(User author)
          Deprecated. since v3.13. Use SearchRequestService.getFavouriteFilters(com.opensymphony.user.User) or search functions
 SearchRequest getSearchRequest(User searcher, Long id)
          Deprecated. since v3.13. Use SearchRequestService.getFilter(com.atlassian.jira.bc.JiraServiceContext, Long)
 SearchRequest getSearchRequestById(User user, Long id)
          Return the search request as stored in the database
 String getSearchRequestOwnerUserName(Long id)
          Return the owner of the passed SearchRequest.
 List getVisibleRequests(User user)
          Deprecated. since v3.13. Use SearchRequestService.getFavouriteFilters(com.opensymphony.user.User) or search functions
 SharedEntitySearchResult search(SharedEntitySearchParameters searchParameters, 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, getAll, getSharedEntity, getSharedEntity, getType, hasPermissionToUse
 

Method Detail

getAllOwnedSearchRequests

Collection getAllOwnedSearchRequests(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(User author,
                                          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(User user,
                                   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

String getSearchRequestOwnerUserName(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(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

List getVisibleRequests(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

SearchRequest getRequest(User searcher,
                         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

SearchRequest getSearchRequest(User searcher,
                               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.

getRequests

List getRequests()
                 throws org.ofbiz.core.entity.GenericEntityException
Deprecated. since v3.13. Use SearchRequestService.getFavouriteFilters(com.opensymphony.user.User) or search functions

Retrieves all the SearchRequest GenericValues

Returns:
Returns a list of searchRequest GenericValues
Throws:
org.ofbiz.core.entity.GenericEntityException - thrown if error occurs in database

getRequests

Collection getRequests(User author)
Deprecated. since v3.13. Use SearchRequestService.getFavouriteFilters(com.opensymphony.user.User) or search functions

Retrieves all the SearchRequest GenericValues from a particular user

Parameters:
author - to retrieve all the SearchRequests for
Returns:
Returns a list of searchRequest GenericValues. Empty list if none exists

search

SharedEntitySearchResult search(SharedEntitySearchParameters searchParameters,
                                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-2008 Atlassian. All Rights Reserved.