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 protectedQueryProjects(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.QueryProjectswithLimit(int limit)QueryProjectswithQuery(String query)QueryProjectswithStart(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:RestReadViewProcess the view operation by reading from the resource.- Specified by:
applyin interfaceRestReadView<TopLevelResource>- Parameters:
resource- resource to read.- Returns:
- result to return to the client. Use
BinaryResultto 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
-
-