Class QueryProjects
- java.lang.Object
-
- com.google.gerrit.server.restapi.project.QueryProjects
-
- All Implemented Interfaces:
RestReadView<TopLevelResource>
,RestView<TopLevelResource>
public class QueryProjects extends Object implements RestReadView<TopLevelResource>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
QueryProjects(com.google.gerrit.index.project.ProjectIndexCollection indexes, ProjectQueryBuilder queryBuilder, ProjectQueryProcessor queryProcessor, ProjectJson json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ProjectInfo>
apply()
List<ProjectInfo>
apply(TopLevelResource resource)
Process the view operation by reading from the resource.QueryProjects
withLimit(int limit)
QueryProjects
withQuery(String query)
QueryProjects
withStart(int start)
-
-
-
Constructor Detail
-
QueryProjects
@Inject protected QueryProjects(com.google.gerrit.index.project.ProjectIndexCollection indexes, ProjectQueryBuilder queryBuilder, ProjectQueryProcessor queryProcessor, ProjectJson json)
-
-
Method Detail
-
withQuery
public QueryProjects withQuery(String query)
-
withLimit
public QueryProjects withLimit(int limit)
-
withStart
public QueryProjects withStart(int start)
-
apply
public List<ProjectInfo> apply(TopLevelResource resource) throws BadRequestException, MethodNotAllowedException
Description copied from interface:RestReadView
Process the view operation by reading from the resource.- Specified by:
apply
in interfaceRestReadView<TopLevelResource>
- Parameters:
resource
- resource to read.- Returns:
- result to return to the client. Use
BinaryResult
to avoid automatic conversion to JSON. - Throws:
BadRequestException
- the request was incorrectly specified and cannot be handled by this view.MethodNotAllowedException
-
apply
public List<ProjectInfo> apply() throws BadRequestException, MethodNotAllowedException
-
-