Merge "Support notify option for delete vote REST endpoint"

This commit is contained in:
Dave Borowitz
2016-06-21 14:55:45 +00:00
committed by Gerrit Code Review
7 changed files with 149 additions and 16 deletions

View File

@@ -0,0 +1,27 @@
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.extensions.api.changes;
import com.google.gerrit.extensions.api.changes.ReviewInput.NotifyHandling;
import com.google.gerrit.extensions.restapi.DefaultInput;
/** Input passed to {@code DELETE /changes/[id]/reviewers/[id]/votes/[label]}. */
public class DeleteVoteInput {
@DefaultInput
public String label;
/** Who to send email notifications to after vote is deleted. */
public NotifyHandling notify = NotifyHandling.ALL;
}

View File

@@ -23,6 +23,7 @@ public interface ReviewerApi {
Map<String, Short> votes() throws RestApiException;
void deleteVote(String label) throws RestApiException;
void deleteVote(DeleteVoteInput input) throws RestApiException;
void remove() throws RestApiException;
/**
@@ -40,6 +41,11 @@ public interface ReviewerApi {
throw new NotImplementedException();
}
@Override
public void deleteVote(DeleteVoteInput input) throws RestApiException {
throw new NotImplementedException();
}
@Override
public void remove() throws RestApiException {
throw new NotImplementedException();