public final class EventListener extends Object implements com.sonymobile.tools.gerrit.gerritevents.GerritEventListener
GerritTrigger
.Modifier and Type | Method and Description |
---|---|
protected hudson.model.ParametersAction |
createParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
hudson.model.Job project)
Creates a ParameterAction and fills it with the project's default parameters + the Standard Gerrit parameters.
|
boolean |
equals(Object obj) |
void |
gerritEvent(com.sonymobile.tools.gerrit.gerritevents.dto.events.CommentAdded event)
Called when a CommentAdded event arrives.
|
void |
gerritEvent(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event) |
void |
gerritEvent(ManualPatchsetCreated event)
Called when a ManualPatchsetCreated event arrives.
|
int |
hashCode() |
protected void |
schedule(GerritTrigger t,
GerritCause cause,
com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Schedules a build with parameters from the event.
|
protected void |
schedule(GerritTrigger t,
GerritCause cause,
com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event,
hudson.model.Job project)
Schedules a build with parameters from the event.
|
protected Future |
schedule(hudson.model.Job theJob,
int quitePeriod,
GerritCause cause,
BadgeAction badgeAction,
hudson.model.ParametersAction parameters)
Schedules a build of a job.
|
public void gerritEvent(com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent event)
gerritEvent
in interface com.sonymobile.tools.gerrit.gerritevents.GerritEventListener
public void gerritEvent(ManualPatchsetCreated event)
event
- the eventpublic void gerritEvent(com.sonymobile.tools.gerrit.gerritevents.dto.events.CommentAdded event)
event
- the event.protected void schedule(GerritTrigger t, GerritCause cause, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
job
as the project to build.t
- the trigger configcause
- the cause of the build.event
- the event.protected void schedule(GerritTrigger t, GerritCause cause, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, hudson.model.Job project)
t
- the trigger configcause
- the cause of the build.event
- the event.project
- the project to build.protected Future schedule(hudson.model.Job theJob, int quitePeriod, GerritCause cause, BadgeAction badgeAction, hudson.model.ParametersAction parameters)
Added here to facilitate unit testing.
theJob
- The job.quitePeriod
- Quite period.cause
- Build cause.badgeAction
- build badge action.parameters
- Build parameters.protected hudson.model.ParametersAction createParameters(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, hudson.model.Job project)
event
- the event.project
- the project.Copyright © 2004-2016. All Rights Reserved.