Class ListProjects
- java.lang.Object
- 
- com.google.gerrit.server.restapi.project.ListProjects
 
- 
- All Implemented Interfaces:
- RestReadView<TopLevelResource>,- RestView<TopLevelResource>
 
 public class ListProjects extends Object implements RestReadView<TopLevelResource> List projects visible to the calling user.Implement GET /projects/, without aquery=parameter.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classListProjects.FilterType
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedListProjects(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)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddShowBranch(String branch)SortedMap<String,ProjectInfo>apply()Response<Object>apply(TopLevelResource resource)Process the view operation by reading from the resource.SortedMap<String,ProjectInfo>display(PrintWriter stdout)voiddisplayToStream(OutputStream displayOutputStream)com.google.gerrit.json.OutputFormatgetFormat()List<String>getShowBranch()booleanisShowDescription()booleanisShowTree()voidsetAll(boolean all)voidsetFilterType(ListProjects.FilterType type)ListProjectssetFormat(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 Detail- 
ListProjects@Inject protected ListProjects(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) 
 
- 
 - 
Method Detail- 
addShowBranchpublic void addShowBranch(String branch) 
 - 
setShowTreepublic void setShowTree(boolean showTree) 
 - 
setFilterTypepublic void setFilterType(ListProjects.FilterType type) 
 - 
setShowDescriptionpublic void setShowDescription(boolean showDescription) 
 - 
setAllpublic void setAll(boolean all) 
 - 
setStatepublic void setState(ProjectState state) 
 - 
setLimitpublic void setLimit(int limit) 
 - 
setStartpublic void setStart(int start) 
 - 
setMatchPrefixpublic void setMatchPrefix(String matchPrefix) 
 - 
setMatchSubstringpublic void setMatchSubstring(String matchSubstring) 
 - 
setMatchRegexpublic void setMatchRegex(String matchRegex) 
 - 
setGroupUuidpublic void setGroupUuid(AccountGroup.UUID groupUuid) 
 - 
isShowTreepublic boolean isShowTree() 
 - 
isShowDescriptionpublic boolean isShowDescription() 
 - 
getFormatpublic com.google.gerrit.json.OutputFormat getFormat() 
 - 
setFormatpublic ListProjects setFormat(com.google.gerrit.json.OutputFormat fmt) 
 - 
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- RestReadView<TopLevelResource>
- 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
 
 - 
applypublic SortedMap<String,ProjectInfo> apply() throws BadRequestException, PermissionBackendException 
 - 
displayToStreampublic void displayToStream(OutputStream displayOutputStream) throws BadRequestException, PermissionBackendException 
 - 
displaypublic SortedMap<String,ProjectInfo> display(PrintWriter stdout) throws BadRequestException, PermissionBackendException 
 
- 
 
-