public class ManualPatchsetCreated extends com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetCreated implements GerritEventLifecycle
Constructor and Description |
---|
ManualPatchsetCreated()
Default Constructor.
|
ManualPatchsetCreated(net.sf.json.JSONObject change,
net.sf.json.JSONObject patch,
String userName)
Standard Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(GerritEventLifecycleListener listener)
Adds the listener to the list of listeners.
|
void |
fireAllBuildsCompleted()
Fires the event
GerritEventLifecycleListener.allBuildsCompleted(GerritEvent) . |
void |
fireBuildCompleted(Run build)
Fires the event
GerritEventLifecycleListener.buildCompleted(GerritEvent, Run) . |
void |
fireBuildStarted(Run build)
Fires the event
GerritEventLifecycleListener.buildStarted(GerritEvent, Run) . |
void |
fireProjectTriggered(Job project)
Fires the event
GerritEventLifecycleListener.projectTriggered(GerritEvent, Job) . |
void |
fireTriggerScanDone()
Fires the event
GerritEventLifecycleListener.triggerScanDone(GerritEvent) . |
void |
fireTriggerScanStarting()
Fires the event
GerritEventLifecycleListener.triggerScanStarting(GerritEvent) . |
void |
fromJson(net.sf.json.JSONObject change,
net.sf.json.JSONObject patch)
Sets the relevant values from the JSONObjects.
|
com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent |
getEvent()
The event associated with the lifecycle.
|
protected List<GerritEventLifecycleListener> |
getListeners()
Gets a copy of the internal transient list of listeners.
|
String |
getUserName()
The name of the user who "created" the event.
|
boolean |
removeListener(GerritEventLifecycleListener listener)
Removes the listener from the list of listeners.
|
void |
setUserName(String userName)
The name of the user who "created" the event.
|
String |
toString() |
fromJson, getEventType, getModifiedProject, getModifiedRef, isScorable
equals, getChange, getFiles, getPatchSet, hashCode, setChange, setPatchset
public ManualPatchsetCreated()
public ManualPatchsetCreated(net.sf.json.JSONObject change, net.sf.json.JSONObject patch, String userName)
change
- JSONObject containing the change information.patch
- JSONObject containing the patchSet information.userName
- the user that manually fired the Gerrit event.public void fromJson(net.sf.json.JSONObject change, net.sf.json.JSONObject patch)
change
- the change info.patch
- the patchSet info.public String getUserName()
public void setUserName(String userName)
userName
- the userName.public String toString()
toString
in class com.sonymobile.tools.gerrit.gerritevents.dto.events.PatchsetCreated
public com.sonymobile.tools.gerrit.gerritevents.dto.GerritEvent getEvent()
GerritEventLifecycle
getEvent
in interface GerritEventLifecycle
public void addListener(GerritEventLifecycleListener listener)
GerritEventLifecycle
addListener
in interface GerritEventLifecycle
listener
- the listener to add.public boolean removeListener(GerritEventLifecycleListener listener)
GerritEventLifecycle
removeListener
in interface GerritEventLifecycle
listener
- the listener to remove.List.remove(java.lang.Object)
public void fireTriggerScanStarting()
GerritEventLifecycle
GerritEventLifecycleListener.triggerScanStarting(GerritEvent)
.fireTriggerScanStarting
in interface GerritEventLifecycle
public void fireTriggerScanDone()
GerritEventLifecycle
GerritEventLifecycleListener.triggerScanDone(GerritEvent)
.fireTriggerScanDone
in interface GerritEventLifecycle
public void fireProjectTriggered(Job project)
GerritEventLifecycle
GerritEventLifecycleListener.projectTriggered(GerritEvent, Job)
.fireProjectTriggered
in interface GerritEventLifecycle
project
- the project that is triggered.public void fireBuildStarted(Run build)
GerritEventLifecycle
GerritEventLifecycleListener.buildStarted(GerritEvent, Run)
.fireBuildStarted
in interface GerritEventLifecycle
build
- the build that has started.public void fireBuildCompleted(Run build)
GerritEventLifecycle
GerritEventLifecycleListener.buildCompleted(GerritEvent, Run)
.fireBuildCompleted
in interface GerritEventLifecycle
build
- the build that is completed.public void fireAllBuildsCompleted()
GerritEventLifecycle
GerritEventLifecycleListener.allBuildsCompleted(GerritEvent)
.fireAllBuildsCompleted
in interface GerritEventLifecycle
protected List<GerritEventLifecycleListener> getListeners()
Copyright © 2016–2019. All rights reserved.