com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.manual
Class TriggerMonitor.EventState

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.manual.TriggerMonitor.EventState
Enclosing class:
TriggerMonitor

public static class TriggerMonitor.EventState
extends Object

State information about an event.


Method Summary
 String getBallColor()
          Returns the appropriate ball color for the current status of this event and its builds.
 List<TriggeredItemEntity> getBuilds()
          Gets the builds that has started for this event.
 PatchsetCreated getEvent()
          The event.
 boolean isAllBuildsCompleted()
          If all builds started by this event has completed.
 boolean isReallyAllBuildsCompleted()
          Goes through the list of builds and checks if anyone is still building.
 boolean isTriggerScanDone()
          If all the active triggers in the system has been notified about this event.
 boolean isTriggerScanStarted()
          If the active triggers in the system has started to be notified.
 boolean isUnTriggered()
          If no active triggers where interested in this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBallColor

public String getBallColor()
Returns the appropriate ball color for the current status of this event and its builds.

Returns:
the path to the image of the ball.
See Also:
Result.color, BallColor.getImage()

isUnTriggered

public boolean isUnTriggered()
If no active triggers where interested in this event. Determined by: isTriggerScanDone() && getBuilds().size() <= 0 unless not isTriggerScanStarted().

Returns:
true if so.

getEvent

public PatchsetCreated getEvent()
The event.

Returns:
the event.

isTriggerScanStarted

public boolean isTriggerScanStarted()
If the active triggers in the system has started to be notified.

Returns:
true if so.

isTriggerScanDone

public boolean isTriggerScanDone()
If all the active triggers in the system has been notified about this event.

Returns:
true if so.

isAllBuildsCompleted

public boolean isAllBuildsCompleted()
If all builds started by this event has completed.

Returns:
true if so.

getBuilds

public List<TriggeredItemEntity> getBuilds()
Gets the builds that has started for this event.

Returns:
the builds.

isReallyAllBuildsCompleted

public boolean isReallyAllBuildsCompleted()
Goes through the list of builds and checks if anyone is still building. Even though the event TriggerMonitor.allBuildsCompleted(PatchsetCreated) has been called that only applies to non silent builds, an extra check is needed.

Returns:
true if all builds has completed.


Copyright © 2004-2013. All Rights Reserved.