Package com.google.gerrit.server
Class PublishCommentsOp
java.lang.Object
com.google.gerrit.server.PublishCommentsOp
- All Implemented Interfaces:
BatchUpdateOp
,RepoOnlyOp
A
BatchUpdateOp
that can be used to publish draft comments
This class uses the PublishCommentUtil
to publish draft comments and fires the
necessary event for this.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPublishCommentsOp
(ChangeNotes.Factory changeNotesFactory, CommentAdded commentAdded, DraftCommentsReader draftCommentsReader, EmailReviewComments.Factory email, PatchSetUtil psUtil, PublishCommentUtil publishCommentUtil, ChangeMessagesUtil changeMessagesUtil, PatchSet.Id psId, Project.NameKey projectNameKey) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Override this method to do something after the update e.g.boolean
Override this method to modify a change.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.update.RepoOnlyOp
updateRepo
-
Constructor Details
-
PublishCommentsOp
@Inject public PublishCommentsOp(ChangeNotes.Factory changeNotesFactory, CommentAdded commentAdded, DraftCommentsReader draftCommentsReader, EmailReviewComments.Factory email, PatchSetUtil psUtil, PublishCommentUtil publishCommentUtil, ChangeMessagesUtil changeMessagesUtil, PatchSet.Id psId, Project.NameKey projectNameKey)
-
-
Method Details
-
updateChange
public boolean updateChange(ChangeContext ctx) throws ResourceConflictException, UnprocessableEntityException, IOException, PatchListNotAvailableException, CommentsRejectedException Description copied from interface:BatchUpdateOp
Override this method to modify a change.- Specified by:
updateChange
in interfaceBatchUpdateOp
- Parameters:
ctx
- context- Returns:
- whether anything was changed that might require a write to the metadata storage.
- Throws:
ResourceConflictException
UnprocessableEntityException
IOException
PatchListNotAvailableException
CommentsRejectedException
-
postUpdate
Description copied from interface:RepoOnlyOp
Override this method to do something after the update e.g. send email or run hooks- Specified by:
postUpdate
in interfaceRepoOnlyOp
- Parameters:
ctx
- context
-