@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,
boolean searchAtShortPlanNameOnly) |
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 masterPlanKeyStr,
boolean includeMasterBranch,
Integer releasedInDeployment,
String searchTerm,
boolean fuzzySearch,
boolean searchByBranchNameOnly,
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 returnedSearchResultsList
of UserSearchResult
Exception
public SearchResultsList searchAuthors(String searchTerm, boolean unlinkedOnly, @Context javax.ws.rs.core.UriInfo uriInfo)
searchTerm
- Mandatory. The term to search for in authors.unlinkedOnly
- if true will only include authors which are not currently linked to a user.SearchResultsList
of AuthorSearchResult
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.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. OptionalSearchResultsList
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. OptionalSearchResultsList
of PlanSearchResult
public SearchResultsList searchBranches(String masterPlanKeyStr, boolean includeMasterBranch, Integer releasedInDeployment, String searchTerm, boolean fuzzySearch, boolean searchByBranchNameOnly, @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. OptionalsearchByBranchNameOnly
- whether the search should only use branch names of plan branches. Default includes the VCS branch name into the fuzzy search.releasedInDeployment
- id of deployment project - will return only branches that are released in this deployment. OptionalSearchResultsList
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.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.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. OptionalSearchResultsList
of DeploymentVersionSearchResult
protected Predicate<ImmutablePlan> filterPlans(String searchTerm, boolean fuzzySearch, boolean searchAtShortPlanNameOnly)
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.