Class ListProjectsImpl
java.lang.Object
com.google.gerrit.server.restapi.project.AbstractListProjects
com.google.gerrit.server.restapi.project.ListProjectsImpl
- All Implemented Interfaces:
- RestReadView<TopLevelResource>,- RestView<TopLevelResource>,- ListProjects
List projects visible to the calling user.
 
Implement GET /projects/, without a query= parameter.
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.google.gerrit.server.restapi.project.ListProjectsListProjects.FilterType
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedListProjectsImpl(CurrentUser currentUser, ProjectCache projectCache, GroupResolver groupResolver, GroupControl.Factory groupControlFactory, GitRepositoryManager repoManager, PermissionBackend permissionBackend, ProjectNode.Factory projectNodeFactory, WebLinks webLinks, com.google.inject.Provider<QueryProjects> queryProjectsProvider, org.eclipse.jgit.lib.Config config, com.google.gerrit.index.project.ProjectIndexCollection projectIndexes) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddShowBranch(String branch) apply()apply(TopLevelResource resource) Process the view operation by reading from the resource.display(PrintWriter stdout) voiddisplayToStream(OutputStream displayOutputStream) com.google.gerrit.json.OutputFormatbooleanbooleanvoidsetAll(boolean all) voidvoidsetFormat(com.google.gerrit.json.OutputFormat fmt) voidsetGroupUuid(AccountGroup.UUID groupUuid) voidsetLimit(int limit) voidsetMatchPrefix(String matchPrefix) voidsetMatchRegex(String matchRegex) voidsetMatchSubstring(String matchSubstring) voidsetShowDescription(boolean showDescription) voidsetShowTree(boolean showTree) voidsetStart(int start) voidsetState(ProjectState state) 
- 
Constructor Details- 
ListProjectsImpl@Inject protected ListProjectsImpl(CurrentUser currentUser, ProjectCache projectCache, GroupResolver groupResolver, GroupControl.Factory groupControlFactory, GitRepositoryManager repoManager, PermissionBackend permissionBackend, ProjectNode.Factory projectNodeFactory, WebLinks webLinks, com.google.inject.Provider<QueryProjects> queryProjectsProvider, org.eclipse.jgit.lib.Config config, com.google.gerrit.index.project.ProjectIndexCollection projectIndexes) 
 
- 
- 
Method Details- 
setFormatpublic void setFormat(com.google.gerrit.json.OutputFormat fmt) - Specified by:
- setFormatin interface- ListProjects
- Specified by:
- setFormatin class- AbstractListProjects
 
- 
addShowBranch- Specified by:
- addShowBranchin interface- ListProjects
- Specified by:
- addShowBranchin class- AbstractListProjects
 
- 
setShowTreepublic void setShowTree(boolean showTree) - Specified by:
- setShowTreein interface- ListProjects
- Specified by:
- setShowTreein class- AbstractListProjects
 
- 
setFilterType- Specified by:
- setFilterTypein interface- ListProjects
- Specified by:
- setFilterTypein class- AbstractListProjects
 
- 
setShowDescriptionpublic void setShowDescription(boolean showDescription) - Specified by:
- setShowDescriptionin interface- ListProjects
- Specified by:
- setShowDescriptionin class- AbstractListProjects
 
- 
setAllpublic void setAll(boolean all) - Specified by:
- setAllin interface- ListProjects
- Specified by:
- setAllin class- AbstractListProjects
 
- 
setState- Specified by:
- setStatein interface- ListProjects
- Specified by:
- setStatein class- AbstractListProjects
 
- 
setLimitpublic void setLimit(int limit) - Specified by:
- setLimitin interface- ListProjects
- Specified by:
- setLimitin class- AbstractListProjects
 
- 
setStartpublic void setStart(int start) - Specified by:
- setStartin interface- ListProjects
- Specified by:
- setStartin class- AbstractListProjects
 
- 
setMatchPrefix- Specified by:
- setMatchPrefixin interface- ListProjects
- Specified by:
- setMatchPrefixin class- AbstractListProjects
 
- 
setMatchSubstring- Specified by:
- setMatchSubstringin interface- ListProjects
- Specified by:
- setMatchSubstringin class- AbstractListProjects
 
- 
setMatchRegex- Specified by:
- setMatchRegexin interface- ListProjects
- Specified by:
- setMatchRegexin class- AbstractListProjects
 
- 
setGroupUuid- Specified by:
- setGroupUuidin interface- ListProjects
- Specified by:
- setGroupUuidin class- AbstractListProjects
 
- 
getShowBranch
- 
isShowTreepublic boolean isShowTree()
- 
isShowDescriptionpublic boolean isShowDescription()
- 
getFormatpublic com.google.gerrit.json.OutputFormat getFormat()
- 
applypublic Response<Object> apply(TopLevelResource resource) throws BadRequestException, PermissionBackendException Description copied from interface:RestReadViewProcess the view operation by reading from the resource.The value of the returned response is automatically converted to JSON unless it is a BinaryResult.The returned response defines the status code that is returned to the client. For RestReadViews this is usually 200 OK, but other 2XX or 3XX status codes are also possible (e.g.Response.Redirectcan be returned for302 Found).Throwing a subclass of RestApiExceptionresults in a 4XX response to the client. For any other exception the client will get a500 Internal Server Errorresponse.- Specified by:
- applyin interface- ListProjects
- Specified by:
- applyin interface- RestReadView<TopLevelResource>
- Overrides:
- applyin class- AbstractListProjects
- Parameters:
- resource- resource to read
- Returns:
- response to return to the client
- Throws:
- BadRequestException- the request was incorrectly specified and cannot be handled by this view.
- PermissionBackendException
 
- 
apply
- 
displayToStreampublic void displayToStream(OutputStream displayOutputStream) throws BadRequestException, PermissionBackendException 
- 
display@CanIgnoreReturnValue public SortedMap<String,ProjectInfo> display(PrintWriter stdout) throws BadRequestException, PermissionBackendException 
 
-