hudson.plugins.promoted_builds
Class PromotionCondition

java.lang.Object
  extended by hudson.plugins.promoted_builds.PromotionCondition
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<PromotionCondition>
Direct Known Subclasses:
DownstreamPassCondition, ManualCondition

public abstract class PromotionCondition
extends java.lang.Object
implements hudson.ExtensionPoint, hudson.model.Describable<PromotionCondition>

Extension point for defining a promotion criteria.

Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
PromotionCondition()
           
 
Method Summary
static hudson.DescriptorExtensionList<PromotionCondition,PromotionConditionDescriptor> all()
          Returns all the registered PromotionConditionDescriptors.
static java.util.List<PromotionConditionDescriptor> getApplicableTriggers(hudson.model.AbstractProject<?,?> p)
          Returns a subset of PromotionConditionDescriptors that applys to the given project.
 PromotionConditionDescriptor getDescriptor()
           
abstract  PromotionBadge isMet(hudson.model.AbstractBuild<?,?> build)
          Checks if the promotion criteria is met.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PromotionCondition

public PromotionCondition()
Method Detail

isMet

public abstract PromotionBadge isMet(hudson.model.AbstractBuild<?,?> build)
Checks if the promotion criteria is met.

Parameters:
build - The build for which the promotion is considered.
Returns:
non-null if the promotion condition is met. This object is then recorded so that we know how a build was promoted. Null if otherwise, meaning it shouldn't be promoted.

getDescriptor

public PromotionConditionDescriptor getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<PromotionCondition>

all

public static hudson.DescriptorExtensionList<PromotionCondition,PromotionConditionDescriptor> all()
Returns all the registered PromotionConditionDescriptors.


getApplicableTriggers

public static java.util.List<PromotionConditionDescriptor> getApplicableTriggers(hudson.model.AbstractProject<?,?> p)
Returns a subset of PromotionConditionDescriptors that applys to the given project.



Copyright © 2009. All Rights Reserved.