use of com.google.gerrit.server.data.SubmitRecordAttribute in project gerrit by GerritCodeReview.
the class EventFactory method addSubmitRecords.
/**
* Add submitRecords to an existing ChangeAttribute.
*
* @param ca
* @param submitRecords
*/
public void addSubmitRecords(ChangeAttribute ca, List<SubmitRecord> submitRecords) {
ca.submitRecords = new ArrayList<>();
for (SubmitRecord submitRecord : submitRecords) {
SubmitRecordAttribute sa = new SubmitRecordAttribute();
sa.status = submitRecord.status.name();
if (submitRecord.status != SubmitRecord.Status.RULE_ERROR) {
addSubmitRecordLabels(submitRecord, sa);
}
ca.submitRecords.add(sa);
}
// Remove empty lists so a confusing label won't be displayed in the output.
if (ca.submitRecords.isEmpty()) {
ca.submitRecords = null;
}
}
Aggregations