Ejemplo n.º 1
0
 @Override
 protected void configure() {
   DynamicSet.bind(binder(), UploadValidationListener.class).to(DisplayMotd.class);
   bind(OnStartStop.class).in(Scopes.SINGLETON);
   bind(LifecycleListener.class).annotatedWith(UniqueAnnotations.create()).to(OnStartStop.class);
   bind(MotdConfig.class).to(MotdFileBasedConfig.class);
 }
Ejemplo n.º 2
0
  @Override
  protected void configureServlets() {
    // Gerrit-CI project-specific settings page
    DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("projects"));

    /*
     * Jenkins jobs REST API
     * This regex is intended to match /jobs/${projectName}.
     */
    serveRegex("/jobs/[^\\/]+$").with(JobsServlet.class);
    serve("/settings").with(ConfigServlet.class);
  }
Ejemplo n.º 3
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.º 4
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.º 5
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");
     }
   }
 }
 @Override
 protected void configure() {
   DynamicSet.bind(binder(), ChangeListener.class).to(ChangeUpdatedListener.class);
   factory(ReviewersByBlame.Factory.class);
 }