public class ProjectSearchRequestServiceImpl extends Object implements ProjectSearchRequestService
Constructor and Description |
---|
ProjectSearchRequestServiceImpl(PermissionManager permissionManager,
ProjectPropertyService projectPropertyService,
I18nHelper.BeanFactory i18nFactory,
SearchRequestService searchRequestService) |
Modifier and Type | Method and Description |
---|---|
ServiceOutcome<List<SearchRequest>> |
associateSearchRequestsWithProject(ApplicationUser user,
Project project,
Long... searchRequestIds)
For a given project this method will associated the provided search requests such that they will be returned by
subsequent calls to
ProjectSearchRequestService.getSearchRequestsForProject(ApplicationUser, Project) . |
List<SearchRequest> |
getSearchRequestsForProject(ApplicationUser user,
Project project)
Retrieves all search requests for a given project that the user is allowed to see.
|
public ProjectSearchRequestServiceImpl(PermissionManager permissionManager, ProjectPropertyService projectPropertyService, I18nHelper.BeanFactory i18nFactory, SearchRequestService searchRequestService)
public ServiceOutcome<List<SearchRequest>> associateSearchRequestsWithProject(ApplicationUser user, @Nonnull Project project, Long... searchRequestIds)
ProjectSearchRequestService
ProjectSearchRequestService.getSearchRequestsForProject(ApplicationUser, Project)
.
The user performing this operation must have rights to ProjectAction.EDIT_PROJECT_CONFIG
,
otherwise this this method will return an error result.
If a search request cannot be found by its id it will simply not be associated with the project.
associateSearchRequestsWithProject
in interface ProjectSearchRequestService
user
- The user performing this operationproject
- The project to associate the search requests withsearchRequestIds
- A list of search requests to associatepublic List<SearchRequest> getSearchRequestsForProject(ApplicationUser user, @Nonnull Project project)
ProjectSearchRequestService
ProjectAction.VIEW_ISSUES
permission this method should
return an empty list.getSearchRequestsForProject
in interface ProjectSearchRequestService
user
- The user performing this operationproject
- The project that search requests are associated withCopyright © 2002-2021 Atlassian. All Rights Reserved.