|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.TriggerContext
public class TriggerContext
This bean contains information to the
GerritCause
about what other builds were involved in the same event.
For backwards compatibility reasons this class is serialized by the help of the
XStream converter TriggerContextConverter
so any future additions to this class need to be handled in that class as well or it won't be serialized correctly.
Constructor Summary | |
---|---|
TriggerContext()
Default constructor. |
|
TriggerContext(hudson.model.AbstractBuild thisBuild,
PatchsetCreated event,
List<TriggeredItemEntity> others)
standard constructor. |
|
TriggerContext(PatchsetCreated event)
Standard constructor. |
Method Summary | |
---|---|
void |
addOtherBuild(hudson.model.AbstractBuild build)
Adds a build to the list of other builds if it doesn't exist in the list. |
void |
addOtherProject(hudson.model.AbstractProject project)
Adds a project to the list of other projects if it doesn't exist in the list. |
PatchsetCreated |
getEvent()
The event for this context. |
List<hudson.model.AbstractBuild> |
getOtherBuilds()
Gets all the other builds in this context. |
List<hudson.model.AbstractProject> |
getOtherProjects()
Gets all the other projects in this context. |
List<TriggeredItemEntity> |
getOthers()
A list of builds that were triggered by the same event as "this" build. |
TriggeredItemEntity |
getThisBuild()
The build that this context represents. |
boolean |
hasOthers()
Tells if there are any other builds or projects in this context. |
void |
setOthers(List<TriggeredItemEntity> otherBuilds)
A list of builds that were triggered by the same event as "this" build. |
void |
setThisBuild(hudson.model.AbstractBuild thisBuild)
The build that this context represents. |
void |
setThisBuild(TriggeredItemEntity thisBuild)
The build that this context represents. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TriggerContext(hudson.model.AbstractBuild thisBuild, PatchsetCreated event, List<TriggeredItemEntity> others)
thisBuild
- this build.event
- the event for this context.others
- the other building and untriggered builds.public TriggerContext(PatchsetCreated event)
event
- the event for this context.public TriggerContext()
Method Detail |
---|
public List<TriggeredItemEntity> getOthers()
public void setOthers(List<TriggeredItemEntity> otherBuilds)
TriggeredItemEntity.getBuild()
== null.
Do not use this method unless you are a serializer,
use addOtherBuild(hudson.model.AbstractBuild)
for adding builds.
otherBuilds
- the builds.public TriggeredItemEntity getThisBuild()
public void setThisBuild(TriggeredItemEntity thisBuild)
thisBuild
- the build.public void setThisBuild(hudson.model.AbstractBuild thisBuild)
thisBuild
- the build.public PatchsetCreated getEvent()
public void addOtherBuild(hudson.model.AbstractBuild build)
build
- the build to add.getOtherBuilds()
public void addOtherProject(hudson.model.AbstractProject project)
project
- the project to add.getOtherProjects()
public boolean hasOthers()
getOtherBuilds()
,
getOtherProjects()
public List<hudson.model.AbstractBuild> getOtherBuilds()
public List<hudson.model.AbstractProject> getOtherProjects()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |