Update web UI to use /review

Instead of using the older style JSON-RPC interface, publish comments
with the new /review REST API. Inline comment drafts are still stored
in the database and published by setting drafts to 'PUBLISH' rather
than the default 'DELETE'.

The SSH review command is also updated to use the same backend.

Change-Id: I690c04ba20c4f3371e352be3f30ef53f1eaa74e9
This commit is contained in:
Shawn O. Pearce
2012-11-22 22:31:55 -08:00
parent 54746efe95
commit 8c850ece60
9 changed files with 71 additions and 436 deletions

View File

@@ -18,17 +18,16 @@ import com.google.gerrit.common.audit.Audit;
import com.google.gerrit.common.auth.SignInRequired;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.AccountDiffPreference;
import com.google.gerrit.reviewdb.client.ApprovalCategoryValue;
import com.google.gerrit.reviewdb.client.Change;
import com.google.gerrit.reviewdb.client.Patch;
import com.google.gerrit.reviewdb.client.Patch.Key;
import com.google.gerrit.reviewdb.client.PatchLineComment;
import com.google.gerrit.reviewdb.client.PatchSet;
import com.google.gerrit.reviewdb.client.Patch.Key;
import com.google.gwtjsonrpc.common.AsyncCallback;
import com.google.gwtjsonrpc.common.RemoteJsonService;
import com.google.gwtjsonrpc.common.RpcImpl;
import com.google.gwtjsonrpc.common.VoidResult;
import com.google.gwtjsonrpc.common.RpcImpl.Version;
import com.google.gwtjsonrpc.common.VoidResult;
import java.util.List;
import java.util.Set;
@@ -65,12 +64,6 @@ public interface PatchDetailService extends RemoteJsonService {
@SignInRequired
void deleteDraftPatchSet(PatchSet.Id psid, AsyncCallback<ChangeDetail> callback);
@Audit
@SignInRequired
void publishComments(PatchSet.Id psid, String message,
Set<ApprovalCategoryValue.Id> approvals,
AsyncCallback<VoidResult> callback);
@Audit
@SignInRequired
void addReviewers(Change.Id id, List<String> reviewers, boolean confirmed,