Package com.google.gerrit.server.change
Class ListRevisionDrafts
- java.lang.Object
-
- com.google.gerrit.server.change.ListRevisionDrafts
-
- All Implemented Interfaces:
RestReadView<RevisionResource>
,RestView<RevisionResource>
- Direct Known Subclasses:
ListRevisionComments
public class ListRevisionDrafts extends Object implements RestReadView<RevisionResource>
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.inject.Provider<com.google.gerrit.server.change.CommentJson>
commentJson
protected CommentsUtil
commentsUtil
protected com.google.inject.Provider<ReviewDb>
db
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,List<CommentInfo>>
apply(RevisionResource rsrc)
Process the view operation by reading from the resource.List<CommentInfo>
getComments(RevisionResource rsrc)
protected boolean
includeAuthorInfo()
protected Iterable<Comment>
listComments(RevisionResource rsrc)
-
-
-
Field Detail
-
db
protected final com.google.inject.Provider<ReviewDb> db
-
commentJson
protected final com.google.inject.Provider<com.google.gerrit.server.change.CommentJson> commentJson
-
commentsUtil
protected final CommentsUtil commentsUtil
-
-
Method Detail
-
listComments
protected Iterable<Comment> listComments(RevisionResource rsrc) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
includeAuthorInfo
protected boolean includeAuthorInfo()
-
apply
public Map<String,List<CommentInfo>> apply(RevisionResource rsrc) throws com.google.gwtorm.server.OrmException
Description copied from interface:RestReadView
Process the view operation by reading from the resource.- Specified by:
apply
in interfaceRestReadView<RevisionResource>
- Parameters:
rsrc
- resource to read.- Returns:
- result to return to the client. Use
BinaryResult
to avoid automatic conversion to JSON. - Throws:
com.google.gwtorm.server.OrmException
-
getComments
public List<CommentInfo> getComments(RevisionResource rsrc) throws com.google.gwtorm.server.OrmException
- Throws:
com.google.gwtorm.server.OrmException
-
-