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 void
addShowBranch
(String branch) apply
(TopLevelResource resource) Process the view operation by reading from the resource.abstract void
setAll
(boolean all) abstract void
abstract void
setFormat
(com.google.gerrit.json.OutputFormat fmt) abstract void
setGroupUuid
(AccountGroup.UUID groupUuid) abstract void
setLimit
(int limit) abstract void
setMatchPrefix
(String matchPrefix) abstract void
setMatchRegex
(String matchRegex) abstract void
setMatchSubstring
(String matchSubstring) abstract void
setShowDescription
(boolean showDescription) abstract void
setShowTree
(boolean showTree) abstract void
setStart
(int start) abstract void
setState
(ProjectState state) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
setFormat
in interfaceListProjects
-
addShowBranch
- Specified by:
addShowBranch
in interfaceListProjects
-
setShowTree
public abstract void setShowTree(boolean showTree) - Specified by:
setShowTree
in interfaceListProjects
-
setFilterType
- Specified by:
setFilterType
in interfaceListProjects
-
setShowDescription
public abstract void setShowDescription(boolean showDescription) - Specified by:
setShowDescription
in interfaceListProjects
-
setAll
public abstract void setAll(boolean all) - Specified by:
setAll
in interfaceListProjects
-
setState
- Specified by:
setState
in interfaceListProjects
-
setLimit
public abstract void setLimit(int limit) - Specified by:
setLimit
in interfaceListProjects
-
setStart
public abstract void setStart(int start) - Specified by:
setStart
in interfaceListProjects
-
setMatchPrefix
- Specified by:
setMatchPrefix
in interfaceListProjects
-
setMatchSubstring
- Specified by:
setMatchSubstring
in interfaceListProjects
-
setMatchRegex
- Specified by:
setMatchRegex
in interfaceListProjects
-
setGroupUuid
- Specified by:
setGroupUuid
in interfaceListProjects
-
apply
Description copied from interface:RestReadView
Process 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.Redirect
can be returned for302 Found
).Throwing a subclass of
RestApiException
results in a 4XX response to the client. For any other exception the client will get a500 Internal Server Error
response.- Specified by:
apply
in interfaceListProjects
- Specified by:
apply
in interfaceRestReadView<TopLevelResource>
- Parameters:
resource
- resource to read- Returns:
- response to return to the client
- Throws:
AuthException
- the caller is not permitted to access this view.BadRequestException
- the request was incorrectly specified and cannot be handled by this view.ResourceConflictException
- the resource state does not permit this view to make the changes at this time.Exception
- the implementation of the view failed. The exception will be logged and HTTP 500 Internal Server Error will be returned to the client.
-