@Singleton public class SearchResource extends Object
Constructor and Description |
---|
SearchResource(AdministrationConfigurationAccessor administrationConfigurationAccessor,
BambooUserManager bambooUserManager,
CachedPlanManager cachedPlanManager,
CustomVariableContext customVariableContext,
DeploymentVersionService deploymentVersionService,
DeploymentProjectService deploymentProjectService,
GravatarService gravatarService,
ExtendedAuthorManager authorManager,
PlanRestService planRestService,
ProjectsRestService projectsRestService,
com.atlassian.sal.api.message.I18nResolver i18nResolver) |
Modifier and Type | Method and Description |
---|---|
protected Predicate<ImmutablePlan> |
filterPlans(String searchTerm,
boolean fuzzySearch) |
SearchResultsList |
searchAuthors(String searchTerm,
boolean unlinkedOnly,
javax.ws.rs.core.UriInfo uriInfo)
A starts-with search of authors based on their authorname,
|
SearchResultsList |
searchBranches(String masterPlanKey,
boolean includeMasterBranch,
Integer releasedInDeployment,
String searchTerm,
boolean fuzzySearch,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.HttpHeaders httpHeaders,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Performs a "starts with" search against full plan branch name and full plan branch key.
|
SearchResultsList |
searchDeployments(String searchTerm,
String requiredPermission,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.HttpHeaders httpHeaders,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Performs a contains search against deployment project name.
|
SearchResultsList |
searchJobs(String planKey,
String searchTerm,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.HttpHeaders httpHeaders,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Performs a "starts with" search against full job name and full job key.
|
SearchResultsList |
searchPlans(String searchTerm,
boolean fuzzySearch,
String planType,
String requiredPermission,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.HttpHeaders httpHeaders,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Performs a "starts with" search against full plan name and full plan key.
|
SearchResultsList |
searchProjects(String searchTerm,
String requiredPermission,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.HttpHeaders httpHeaders,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Performs a contains search against project name.
|
SearchResultsList |
searchStages(String planKey,
String stageId,
String searchTerm,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.HttpHeaders httpHeaders,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Performs a "starts with" search against full job name and full job key.
|
SearchResultsList |
searchUsers(String searchTerm,
boolean includeAvatars,
javax.ws.rs.core.UriInfo uriInfo)
A starts-with search of users based on their username, full-name and if allowed email address.
|
SearchResultsList |
searchVersions(String searchTerm,
long deploymentProjectId,
String branchKey,
boolean chronologicalOrder,
javax.ws.rs.core.UriInfo uriInfo,
javax.ws.rs.core.HttpHeaders httpHeaders,
com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
Performs a contains search against a version name.
|
public SearchResource(AdministrationConfigurationAccessor administrationConfigurationAccessor, BambooUserManager bambooUserManager, CachedPlanManager cachedPlanManager, CustomVariableContext customVariableContext, DeploymentVersionService deploymentVersionService, DeploymentProjectService deploymentProjectService, GravatarService gravatarService, ExtendedAuthorManager authorManager, PlanRestService planRestService, ProjectsRestService projectsRestService, com.atlassian.sal.api.message.I18nResolver i18nResolver)
public SearchResultsList searchUsers(String searchTerm, boolean includeAvatars, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
searchTerm
- Mandatory. The term to search for in users.includeAvatars
- if true will include avatar urls in the response. If gravatar is not enabled, no urls will be returneduriInfo
- SearchResultsList
of UserSearchResult
Exception
public SearchResultsList searchAuthors(String searchTerm, boolean unlinkedOnly, @Context javax.ws.rs.core.UriInfo uriInfo) throws Exception
searchTerm
- Mandatory. The term to search for in authors.unlinkedOnly
- if true will only include authors which are not currently linked to a user.uriInfo
- SearchResultsList
of AuthorSearchResult
Exception
public SearchResultsList searchPlans(String searchTerm, boolean fuzzySearch, String planType, String requiredPermission, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
searchTerm
- to search for. OptionalfuzzySearch
- whether the search should be more relaxed when matching results. Default is false.planType
- type of the plan to return (PlanType
. OptionalrequiredPermission
- only return those plans that querying user has permission to (BambooPermission
. Default is READ.uriInfo
- httpHeaders
- authenticationContext
- SearchResultsList
of PlanSearchResult
public SearchResultsList searchJobs(String planKey, String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
planKey
- planKey for plan where jobs will be searched forsearchTerm
- to search for. OptionaluriInfo
- httpHeaders
- authenticationContext
- SearchResultsList
of PlanSearchResult
public SearchResultsList searchStages(String planKey, String stageId, String searchTerm, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
planKey
- planKey for plan where jobs will be searched forsearchTerm
- to search for. OptionaluriInfo
- httpHeaders
- authenticationContext
- SearchResultsList
of PlanSearchResult
public SearchResultsList searchBranches(String masterPlanKey, boolean includeMasterBranch, Integer releasedInDeployment, String searchTerm, boolean fuzzySearch, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
searchTerm
- to search for. OptionalfuzzySearch
- whether the search should be more relaxed when matching results. Default is false.includeMasterBranch
- should master branch be included into result. OptionalreleasedInDeployment
- id of deployment project - will return only branches that are released in this deployment. OptionaluriInfo
- httpHeaders
- authenticationContext
- SearchResultsList
of PlanSearchResult
public SearchResultsList searchProjects(String searchTerm, String requiredPermission, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
searchTerm
- to search for. OptionalrequiredPermission
- only return those projects that querying user has permission to (BambooPermission
. Default is READ.uriInfo
- httpHeaders
- authenticationContext
- SearchResultsList
of ProjectSearchResult
public SearchResultsList searchDeployments(String searchTerm, String requiredPermission, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
searchTerm
- to search for. OptionalrequiredPermission
- only return those deployment projects that querying user has permission to (BambooPermission
. Default is READ.uriInfo
- httpHeaders
- authenticationContext
- SearchResultsList
of ProjectSearchResult
public SearchResultsList searchVersions(String searchTerm, long deploymentProjectId, String branchKey, boolean chronologicalOrder, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context com.atlassian.plugins.rest.common.security.AuthenticationContext authenticationContext)
searchTerm
- to search for. OptionaldeploymentProjectId
- The deployment project to search under.branchKey
- narrow the search to releases created out of the branch. OptionaluriInfo
- httpHeaders
- authenticationContext
- SearchResultsList
of DeploymentVersionSearchResult
protected Predicate<ImmutablePlan> filterPlans(String searchTerm, boolean fuzzySearch)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.