Class DeleteVoteOp
- java.lang.Object
-
- com.google.gerrit.server.restapi.change.DeleteVoteOp
-
- All Implemented Interfaces:
BatchUpdateOp
,RepoOnlyOp
public class DeleteVoteOp extends Object implements BatchUpdateOp
Updates the storage to delete vote(s).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DeleteVoteOp.Factory
Factory to createDeleteVoteOp
instances.
-
Constructor Summary
Constructors Constructor Description DeleteVoteOp(ProjectCache projectCache, ApprovalsUtil approvalsUtil, PatchSetUtil psUtil, ChangeMessagesUtil cmUtil, VoteDeleted voteDeleted, DeleteVoteSender.Factory deleteVoteSenderFactory, DeleteVoteControl deleteVoteControl, MessageIdGenerator messageIdGenerator, RemoveReviewerControl removeReviewerControl, Project.NameKey projectName, AccountState reviewerToDeleteVoteFor, String label, DeleteVoteInput input, boolean enforcePermissions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
postUpdate(PostUpdateContext ctx)
Override this method to do something after the update e.g.boolean
updateChange(ChangeContext ctx)
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 Detail
-
DeleteVoteOp
@Inject public DeleteVoteOp(ProjectCache projectCache, ApprovalsUtil approvalsUtil, PatchSetUtil psUtil, ChangeMessagesUtil cmUtil, VoteDeleted voteDeleted, DeleteVoteSender.Factory deleteVoteSenderFactory, DeleteVoteControl deleteVoteControl, MessageIdGenerator messageIdGenerator, RemoveReviewerControl removeReviewerControl, Project.NameKey projectName, AccountState reviewerToDeleteVoteFor, String label, DeleteVoteInput input, boolean enforcePermissions)
-
-
Method Detail
-
updateChange
public boolean updateChange(ChangeContext ctx) throws AuthException, ResourceNotFoundException, IOException, PermissionBackendException
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:
AuthException
ResourceNotFoundException
IOException
PermissionBackendException
-
postUpdate
public void postUpdate(PostUpdateContext ctx)
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
-
-