hudson.plugins.emailext.plugins
Class EmailTrigger

java.lang.Object
  extended by hudson.plugins.emailext.plugins.EmailTrigger
Direct Known Subclasses:
AbortedTrigger, FailureTrigger, FixedTrigger, ImprovementTrigger, NotBuiltTrigger, PreBuildTrigger, RegressionTrigger, StillFailingTrigger, StillUnstableTrigger, SuccessTrigger, UnstableTrigger

public abstract class EmailTrigger
extends Object


Constructor Summary
EmailTrigger()
           
 
Method Summary
 boolean getDefaultSendToDevs()
           
 boolean getDefaultSendToList()
           
 boolean getDefaultSendToRequester()
           
abstract  EmailTriggerDescriptor getDescriptor()
           
 EmailType getEmail()
          Get the email that is with this trigger.
protected  int getNumFailures(hudson.model.AbstractBuild<?,?> build)
          Determine the number of direct failures in the given build.
 boolean isPreBuild()
          Should this trigger run before the build? Defaults to false.
 void setEmail(EmailType email)
           
abstract  boolean trigger(hudson.model.AbstractBuild<?,?> build)
          Implementors of this method need to return true if the conditions to trigger an email have been met.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailTrigger

public EmailTrigger()
Method Detail

trigger

public abstract boolean trigger(hudson.model.AbstractBuild<?,?> build)
Implementors of this method need to return true if the conditions to trigger an email have been met.

Parameters:
build - The Build object after the project has been built
Returns:
true if the conditions have been met to trigger a build of this type

getEmail

public EmailType getEmail()
Get the email that is with this trigger.

Returns:
the email

setEmail

public void setEmail(EmailType email)

getDescriptor

public abstract EmailTriggerDescriptor getDescriptor()

getDefaultSendToList

public boolean getDefaultSendToList()

getDefaultSendToDevs

public boolean getDefaultSendToDevs()

getDefaultSendToRequester

public boolean getDefaultSendToRequester()

getNumFailures

protected int getNumFailures(hudson.model.AbstractBuild<?,?> build)
Determine the number of direct failures in the given build. If it aggregates downstream results, ignore contributed failures. This is because at the time this trigger runs, the current build's aggregated results aren't available yet, but those of the previous build may be.


isPreBuild

public boolean isPreBuild()
Should this trigger run before the build? Defaults to false.



Copyright © 2004-2012. All Rights Reserved.