Ejemplo n.º 1
0
 public void fire(Change change, PatchSet ps, Account restorer, String reason, Timestamp when) {
   if (!listeners.iterator().hasNext()) {
     return;
   }
   try {
     fire(
         util.changeInfo(change),
         util.revisionInfo(change.getProject(), ps),
         util.accountInfo(restorer),
         reason,
         when);
   } catch (PatchListNotAvailableException | GpgException | IOException | OrmException e) {
     log.error("Couldn't fire event", e);
   }
 }
Ejemplo n.º 2
0
 public void fire(
     ChangeInfo change,
     RevisionInfo revision,
     AccountInfo restorer,
     String reason,
     Timestamp when) {
   if (!listeners.iterator().hasNext()) {
     return;
   }
   Event event = new Event(change, revision, restorer, reason, when);
   for (ChangeRestoredListener l : listeners) {
     try {
       l.onChangeRestored(event);
     } catch (Exception e) {
       log.warn("Error in event listener", e);
     }
   }
 }
Ejemplo n.º 3
0
 public void fire(
     ChangeInfo change,
     RevisionInfo revision,
     AccountInfo reviewer,
     AccountInfo adder,
     Timestamp when) {
   if (!listeners.iterator().hasNext()) {
     return;
   }
   Event event = new Event(change, revision, reviewer, adder, when);
   for (ReviewerAddedListener l : listeners) {
     try {
       l.onReviewerAdded(event);
     } catch (Exception e) {
       log.warn("Error in event listener, e");
     }
   }
 }