Class AbstractListProjects
java.lang.Object
com.google.gerrit.server.restapi.project.AbstractListProjects
- All Implemented Interfaces:
RestReadView<TopLevelResource>,RestView<TopLevelResource>,ListProjects
- Direct Known Subclasses:
ListProjectsImpl
Base class for
ListProjects implementations.
Defines the options that are supported by the list projects REST endpoint.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.gerrit.server.restapi.project.ListProjects
ListProjects.FilterType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddShowBranch(String branch) apply(TopLevelResource resource) Process the view operation by reading from the resource.abstract voidsetAll(boolean all) abstract voidabstract voidsetFormat(com.google.gerrit.json.OutputFormat fmt) abstract voidsetGroupUuid(AccountGroup.UUID groupUuid) abstract voidsetLimit(int limit) abstract voidsetMatchPrefix(String matchPrefix) abstract voidsetMatchRegex(String matchRegex) abstract voidsetMatchSubstring(String matchSubstring) abstract voidsetShowDescription(boolean showDescription) abstract voidsetShowTree(boolean showTree) abstract voidsetStart(int start) abstract voidsetState(ProjectState state) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.gerrit.server.restapi.project.ListProjects
apply
-
Constructor Details
-
AbstractListProjects
public AbstractListProjects()
-
-
Method Details
-
setFormat
public abstract void setFormat(com.google.gerrit.json.OutputFormat fmt) - Specified by:
setFormatin interfaceListProjects
-
addShowBranch
- Specified by:
addShowBranchin interfaceListProjects
-
setShowTree
public abstract void setShowTree(boolean showTree) - Specified by:
setShowTreein interfaceListProjects
-
setFilterType
- Specified by:
setFilterTypein interfaceListProjects
-
setShowDescription
public abstract void setShowDescription(boolean showDescription) - Specified by:
setShowDescriptionin interfaceListProjects
-
setAll
public abstract void setAll(boolean all) - Specified by:
setAllin interfaceListProjects
-
setState
- Specified by:
setStatein interfaceListProjects
-
setLimit
public abstract void setLimit(int limit) - Specified by:
setLimitin interfaceListProjects
-
setStart
public abstract void setStart(int start) - Specified by:
setStartin interfaceListProjects
-
setMatchPrefix
- Specified by:
setMatchPrefixin interfaceListProjects
-
setMatchSubstring
- Specified by:
setMatchSubstringin interfaceListProjects
-
setMatchRegex
- Specified by:
setMatchRegexin interfaceListProjects
-
setGroupUuid
- Specified by:
setGroupUuidin interfaceListProjects
-
apply
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 interfaceListProjects- Specified by:
applyin interfaceRestReadView<TopLevelResource>- Parameters:
resource- resource to read- Returns:
- response to return to the client
- Throws:
Exception- the implementation of the view failed. The exception will be logged and HTTP 500 Internal Server Error will be returned to the client.
-