Class ListChangeDrafts
- java.lang.Object
-
- com.google.gerrit.server.restapi.change.ListChangeDrafts
-
- All Implemented Interfaces:
RestReadView<ChangeResource>
,RestView<ChangeResource>
- Direct Known Subclasses:
ListChangeComments
public class ListChangeDrafts extends Object implements RestReadView<ChangeResource>
-
-
Field Summary
Fields Modifier and Type Field Description protected ChangeData.Factory
changeDataFactory
protected com.google.inject.Provider<CommentJson>
commentJson
protected CommentsUtil
commentsUtil
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,List<CommentInfo>>
apply(ChangeResource rsrc)
Process the view operation by reading from the resource.List<CommentInfo>
getComments(ChangeResource rsrc)
protected boolean
includeAuthorInfo()
protected Iterable<Comment>
listComments(ChangeResource rsrc)
boolean
requireAuthentication()
-
-
-
Field Detail
-
changeDataFactory
protected final ChangeData.Factory changeDataFactory
-
commentJson
protected final com.google.inject.Provider<CommentJson> commentJson
-
commentsUtil
protected final CommentsUtil commentsUtil
-
-
Method Detail
-
listComments
protected Iterable<Comment> listComments(ChangeResource rsrc)
-
includeAuthorInfo
protected boolean includeAuthorInfo()
-
requireAuthentication
public boolean requireAuthentication()
-
apply
public Map<String,List<CommentInfo>> apply(ChangeResource rsrc) throws AuthException, PermissionBackendException
Description copied from interface:RestReadView
Process the view operation by reading from the resource.- Specified by:
apply
in interfaceRestReadView<ChangeResource>
- Parameters:
rsrc
- resource to read.- Returns:
- result to return to the client. Use
BinaryResult
to avoid automatic conversion to JSON. - Throws:
AuthException
- the client is not permitted to access this view.PermissionBackendException
-
getComments
public List<CommentInfo> getComments(ChangeResource rsrc) throws AuthException, PermissionBackendException
-
-