com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier
Class GerritNotifier

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.GerritNotifier

public class GerritNotifier
extends Object

Start position that notifies Gerrit of events.

Author:
Robert Sandell <robert.sandell@sonyericsson.com>

Constructor Summary
GerritNotifier(IGerritHudsonTriggerConfig config, GerritCmdRunner cmdRunner)
          Constructor.
GerritNotifier(IGerritHudsonTriggerConfig config, GerritCmdRunner cmdRunner, hudson.model.Hudson hudson)
          Constructor for testing.
 
Method Summary
 void buildCompleted(BuildMemory.MemoryImprint memoryImprint, hudson.model.TaskListener listener)
          Generates the build-completed command based on configured templates and build-values and sends it to Gerrit.
 void buildStarted(hudson.model.AbstractBuild build, hudson.model.TaskListener taskListener, GerritTriggeredEvent event, BuildsStartedStats stats)
          Generates the build-started command based on configured templates and build-values and sends it to Gerrit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GerritNotifier

public GerritNotifier(IGerritHudsonTriggerConfig config,
                      GerritCmdRunner cmdRunner)
Constructor.

Parameters:
config - the config.
cmdRunner - the command-runner.

GerritNotifier

public GerritNotifier(IGerritHudsonTriggerConfig config,
                      GerritCmdRunner cmdRunner,
                      hudson.model.Hudson hudson)
Constructor for testing.

Parameters:
config - the config.
cmdRunner - the command-runner.
hudson - the hudson instance.
Method Detail

buildStarted

public void buildStarted(hudson.model.AbstractBuild build,
                         hudson.model.TaskListener taskListener,
                         GerritTriggeredEvent event,
                         BuildsStartedStats stats)
Generates the build-started command based on configured templates and build-values and sends it to Gerrit.

Parameters:
build - the build.
taskListener - the taskListener.
event - the event.
stats - the stats.

buildCompleted

public void buildCompleted(BuildMemory.MemoryImprint memoryImprint,
                           hudson.model.TaskListener listener)
Generates the build-completed command based on configured templates and build-values and sends it to Gerrit.

Parameters:
memoryImprint - the memory of all the builds for an event.
listener - the taskListener.


Copyright © 2004-2013. All Rights Reserved.