Display submit type in the change info block
This is a preparation for a Prolog based submit type rule which will compute submit type for each change. In this first step we simply return the project-wide default submit type for each change. Change-Id: I38745e544b215197074ce1fb8d6b106f3c1c1e56 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
This commit is contained in:
committed by
Gerrit Code Review
parent
edb573adbb
commit
dad5620441
@@ -17,6 +17,7 @@ package com.google.gerrit.common.data;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.ChangeMessage;
|
||||
import com.google.gerrit.reviewdb.client.PatchSet;
|
||||
import com.google.gerrit.reviewdb.client.Project;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -40,6 +41,7 @@ public class ChangeDetail {
|
||||
protected List<PatchSet> patchSets;
|
||||
protected List<ApprovalDetail> approvals;
|
||||
protected List<SubmitRecord> submitRecords;
|
||||
protected Project.SubmitType submitType;
|
||||
protected boolean canSubmit;
|
||||
protected List<ChangeMessage> messages;
|
||||
protected PatchSet.Id currentPatchSetId;
|
||||
@@ -187,6 +189,14 @@ public class ChangeDetail {
|
||||
return submitRecords;
|
||||
}
|
||||
|
||||
public void setSubmitType(Project.SubmitType submitType) {
|
||||
this.submitType = submitType;
|
||||
}
|
||||
|
||||
public Project.SubmitType getSubmitType() {
|
||||
return submitType;
|
||||
}
|
||||
|
||||
public boolean isCurrentPatchSet(final PatchSetDetail detail) {
|
||||
return currentPatchSetId != null
|
||||
&& detail.getPatchSet().getId().equals(currentPatchSetId);
|
||||
|
||||
Reference in New Issue
Block a user