Package org.gitlab4j.api
Class SearchApi
- java.lang.Object
-
- org.gitlab4j.api.AbstractApi
-
- org.gitlab4j.api.SearchApi
-
- All Implemented Interfaces:
org.gitlab4j.models.Constants
public class SearchApi extends AbstractApi
This class provides an entry point to all the GitLab API Search API calls.- See Also:
- Search API
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.gitlab4j.models.Constants
org.gitlab4j.models.Constants.ActionType, org.gitlab4j.models.Constants.ApplicationScope, org.gitlab4j.models.Constants.ArchiveFormat, org.gitlab4j.models.Constants.AutoCancelPendingPipelines, org.gitlab4j.models.Constants.AutoDevopsDeployStrategy, org.gitlab4j.models.Constants.BuildGitStrategy, org.gitlab4j.models.Constants.CommitBuildState, org.gitlab4j.models.Constants.ContributorOrderBy, org.gitlab4j.models.Constants.DefaultBranchProtectionLevel, org.gitlab4j.models.Constants.DeploymentOrderBy, org.gitlab4j.models.Constants.DeploymentStatus, org.gitlab4j.models.Constants.DeployTokenScope, org.gitlab4j.models.Constants.Encoding, org.gitlab4j.models.Constants.EpicOrderBy, org.gitlab4j.models.Constants.EventScope, org.gitlab4j.models.Constants.GroupOrderBy, org.gitlab4j.models.Constants.GroupSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.ImpersonationState, org.gitlab4j.models.Constants.IssueOrderBy, org.gitlab4j.models.Constants.IssueScope, org.gitlab4j.models.Constants.IssueState, org.gitlab4j.models.Constants.JobScope, org.gitlab4j.models.Constants.LineType, org.gitlab4j.models.Constants.MergeRequestOrderBy, org.gitlab4j.models.Constants.MergeRequestScope, org.gitlab4j.models.Constants.MergeRequestSearchIn, org.gitlab4j.models.Constants.MergeRequestState, org.gitlab4j.models.Constants.MilestoneState, org.gitlab4j.models.Constants.PackageOrderBy, org.gitlab4j.models.Constants.PackageStatus, org.gitlab4j.models.Constants.PipelineOrderBy, org.gitlab4j.models.Constants.PipelineScope, org.gitlab4j.models.Constants.PipelineSource, org.gitlab4j.models.Constants.ProjectAccessTokenScope, org.gitlab4j.models.Constants.ProjectCreationLevel, org.gitlab4j.models.Constants.ProjectFeatureVisibilityAccessLevel, org.gitlab4j.models.Constants.ProjectOrderBy, org.gitlab4j.models.Constants.ProjectSearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SearchScope<T extends java.lang.Object>, org.gitlab4j.models.Constants.SortOrder, org.gitlab4j.models.Constants.SquashOption, org.gitlab4j.models.Constants.StateEvent, org.gitlab4j.models.Constants.SubgroupCreationLevel, org.gitlab4j.models.Constants.TagOrderBy, org.gitlab4j.models.Constants.TargetType, org.gitlab4j.models.Constants.TodoAction, org.gitlab4j.models.Constants.TodoState, org.gitlab4j.models.Constants.TodoType, org.gitlab4j.models.Constants.TokenType
-
-
Field Summary
-
Fields inherited from class org.gitlab4j.api.AbstractApi
gitLabApi
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> java.util.List<T>
globalSearch(org.gitlab4j.models.Constants.SearchScope<T> scope, java.lang.String search)
Search globally across the GitLab instance.<T> Pager<T>
globalSearch(org.gitlab4j.models.Constants.SearchScope<T> scope, java.lang.String search, int itemsPerPage)
Search globally across the GitLab instance.<T> java.util.stream.Stream<T>
globalSearchStream(org.gitlab4j.models.Constants.SearchScope<T> scope, java.lang.String search)
Search globally across the GitLab instance.<T> java.util.List<T>
groupSearch(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.GroupSearchScope<T> scope, java.lang.String search)
Search within the specified group.<T> Pager<T>
groupSearch(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.GroupSearchScope<T> scope, java.lang.String search, int itemsPerPage)
Search within the specified group.<T> java.util.stream.Stream<T>
groupSearchStream(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.GroupSearchScope<T> scope, java.lang.String search)
Search within the specified group.<T> java.util.List<T>
projectSearch(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search)
Search within the specified project.<T> Pager<T>
projectSearch(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search, int itemsPerPage)
Search within the specified project.<T> java.util.List<T>
projectSearch(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search, java.lang.String ref)
Search within the specified project.<T> Pager<T>
projectSearch(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search, java.lang.String ref, int itemsPerPage)
Search within the specified project.<T> java.util.stream.Stream<T>
projectSearchStream(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search)
Search within the specified project.<T> java.util.stream.Stream<T>
projectSearchStream(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search, java.lang.String ref)
Search within the specified project.-
Methods inherited from class org.gitlab4j.api.AbstractApi
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getNamespaceIdOrPath, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, patch, patch, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, putWithFormData, upload, upload, upload, upload, urlEncode, validate
-
-
-
-
Constructor Detail
-
SearchApi
public SearchApi(GitLabApi gitLabApi)
-
-
Method Detail
-
globalSearch
public <T> java.util.List<T> globalSearch(org.gitlab4j.models.Constants.SearchScope<T> scope, java.lang.String search) throws GitLabApiException
Search globally across the GitLab instance.GitLab Endpoint: POST /search?scope=:scope&search=:search-query
- Parameters:
scope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs, userssearch
- the search query- Returns:
- a List containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
globalSearchStream
public <T> java.util.stream.Stream<T> globalSearchStream(org.gitlab4j.models.Constants.SearchScope<T> scope, java.lang.String search) throws GitLabApiException
Search globally across the GitLab instance.GitLab Endpoint: POST /search?scope=:scope&search=:search-query
- Parameters:
scope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs, userssearch
- the search query- Returns:
- a Stream containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
globalSearch
public <T> Pager<T> globalSearch(org.gitlab4j.models.Constants.SearchScope<T> scope, java.lang.String search, int itemsPerPage) throws GitLabApiException
Search globally across the GitLab instance.GitLab Endpoint: POST /search?scope=:scope&search=:search-query
- Parameters:
scope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, snippet_titles, snippet_blobs, userssearch
- the search queryitemsPerPage
- the number of items that will be fetched per page- Returns:
- a Pager containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
groupSearch
public <T> java.util.List<T> groupSearch(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.GroupSearchScope<T> scope, java.lang.String search) throws GitLabApiException
Search within the specified group. If a user is not a member of a group and the group is private, a request on that group will result to a 404 status code.GitLab Endpoint: POST /groups/:groupId/search?scope=:scope&search=:search-query
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, userssearch
- the search query- Returns:
- a List containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
groupSearchStream
public <T> java.util.stream.Stream<T> groupSearchStream(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.GroupSearchScope<T> scope, java.lang.String search) throws GitLabApiException
Search within the specified group. If a user is not a member of a group and the group is private, a request on that group will result to a 404 status code.GitLab Endpoint: POST /groups/:groupId/search?scope=:scope&search=:search-query
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, userssearch
- the search query- Returns:
- a Stream containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
groupSearch
public <T> Pager<T> groupSearch(java.lang.Object groupIdOrPath, org.gitlab4j.models.Constants.GroupSearchScope<T> scope, java.lang.String search, int itemsPerPage) throws GitLabApiException
Search within the specified group. If a user is not a member of a group and the group is private, a request on that group will result to a 404 status code.GitLab Endpoint: POST /groups/:groupId/search?scope=:scope&search=:search-query
- Parameters:
groupIdOrPath
- the group ID, path of the group, or a Group instance holding the group ID or path, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: projects, issues, merge_requests, milestones, userssearch
- the search queryitemsPerPage
- the number of items that will be fetched per page- Returns:
- a Pager containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearch
public <T> java.util.List<T> projectSearch(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search) throws GitLabApiException
Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search query- Returns:
- a List containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearch
public <T> java.util.List<T> projectSearch(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search, java.lang.String ref) throws GitLabApiException
Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query&ref=ref
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search queryref
- the name of a repository branch or tag to search on. The project’s default branch is used by default. This is only applicable for scopes: commits, blobs, and wiki_blobs.- Returns:
- a List containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearchStream
public <T> java.util.stream.Stream<T> projectSearchStream(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search) throws GitLabApiException
Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search query- Returns:
- a Stream containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearchStream
public <T> java.util.stream.Stream<T> projectSearchStream(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search, java.lang.String ref) throws GitLabApiException
Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /projects/:projectId/search?scope=:scope&search=:search-query&ref=ref
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search queryref
- the name of a repository branch or tag to search on. The project’s default branch is used by default. This is only applicable for scopes: commits, blobs, and wiki_blobs.- Returns:
- a Stream containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearch
public <T> Pager<T> projectSearch(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search, int itemsPerPage) throws GitLabApiException
Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /project/:projectId/search?scope=:scope&search=:search-query
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search queryitemsPerPage
- the number of items that will be fetched per page- Returns:
- a Pager containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
projectSearch
public <T> Pager<T> projectSearch(java.lang.Object projectIdOrPath, org.gitlab4j.models.Constants.ProjectSearchScope<T> scope, java.lang.String search, java.lang.String ref, int itemsPerPage) throws GitLabApiException
Search within the specified project. If a user is not a member of a project and the project is private, a request on that project will result to a 404 status code.GitLab Endpoint: POST /project/:projectId/search?scope=:scope&search=:search-query&ref=ref
- Parameters:
projectIdOrPath
- the project in the form of an Long(ID), String(path), or Project instance, requiredscope
- search the expression within the specified scope. Currently these scopes are supported: issues, merge_requests, milestones, notes, wiki_blobs, commits, blobs, userssearch
- the search queryref
- the name of a repository branch or tag to search on. The project’s default branch is used by default. This is only applicable for scopes: commits, blobs, and wiki_blobs.itemsPerPage
- the number of items that will be fetched per page- Returns:
- a Pager containing the object type specified by the scope
- Throws:
GitLabApiException
- if any exception occurs- Since:
- GitLab 10.5
-
-