use of com.google.gerrit.extensions.events.GitReferenceUpdatedListener in project gerrit by GerritCodeReview.
the class GitReferenceUpdated method fire.
private void fire(Project.NameKey project, String ref, ObjectId oldObjectId, ObjectId newObjectId, ReceiveCommand.Type type, AccountInfo updater) {
if (!listeners.iterator().hasNext()) {
return;
}
ObjectId o = oldObjectId != null ? oldObjectId : ObjectId.zeroId();
ObjectId n = newObjectId != null ? newObjectId : ObjectId.zeroId();
Event event = new Event(project, ref, o.name(), n.name(), type, updater);
for (GitReferenceUpdatedListener l : listeners) {
try {
l.onGitReferenceUpdated(event);
} catch (Exception e) {
util.logEventListenerError(this, l, e);
}
}
}
Aggregations