hudson.plugins.promoted_builds.conditions
Class ManualCondition

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

public class ManualCondition
extends PromotionCondition

PromotionCondition that requires manual promotion.

Author:
Kohsuke Kawaguchi, Peter Hayes

Nested Class Summary
static class ManualCondition.Badge
           
static class ManualCondition.DescriptorImpl
           
static class ManualCondition.ManualApproval
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
ManualCondition()
           
 
Method Summary
 boolean canApprove(PromotionProcess promotionProcess, hudson.model.AbstractBuild<?,?> build)
          Verifies that the currently logged in user (or anonymous) has permission to approve the promotion and that the promotion has not already been approved.
 void doApprove(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, java.lang.String jobName, int buildNumber, java.lang.String promotionName)
          Web method to handle the approval action submitted by the user.
 hudson.model.ParameterDefinition getParameterDefinition(java.lang.String name)
          Gets the ParameterDefinition of the given name, if any.
 java.util.List<hudson.model.ParameterDefinition> getParameterDefinitions()
           
 java.lang.String getUsers()
           
 java.util.Set<java.lang.String> getUsersAsSet()
           
 PromotionBadge isMet(PromotionProcess promotionProcess, hudson.model.AbstractBuild<?,?> build)
          Checks if the promotion criteria is met.
 
Methods inherited from class hudson.plugins.promoted_builds.PromotionCondition
all, getApplicableTriggers, getDescriptor, isMet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManualCondition

public ManualCondition()
Method Detail

getUsers

public java.lang.String getUsers()

getParameterDefinitions

public java.util.List<hudson.model.ParameterDefinition> getParameterDefinitions()

getParameterDefinition

public hudson.model.ParameterDefinition getParameterDefinition(java.lang.String name)
Gets the ParameterDefinition of the given name, if any.


getUsersAsSet

public java.util.Set<java.lang.String> getUsersAsSet()

isMet

public PromotionBadge isMet(PromotionProcess promotionProcess,
                            hudson.model.AbstractBuild<?,?> build)
Description copied from class: PromotionCondition
Checks if the promotion criteria is met.

Overrides:
isMet in class PromotionCondition
Parameters:
promotionProcess - The promotion process being evaluated for qualification
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.

canApprove

public boolean canApprove(PromotionProcess promotionProcess,
                          hudson.model.AbstractBuild<?,?> build)
Verifies that the currently logged in user (or anonymous) has permission to approve the promotion and that the promotion has not already been approved.


doApprove

public void doApprove(org.kohsuke.stapler.StaplerRequest req,
                      org.kohsuke.stapler.StaplerResponse rsp,
                      @QueryParameter(value="job")
                      java.lang.String jobName,
                      @QueryParameter(value="buildNumber")
                      int buildNumber,
                      @QueryParameter(value="promotion")
                      java.lang.String promotionName)
               throws java.io.IOException,
                      javax.servlet.ServletException
Web method to handle the approval action submitted by the user.

Throws:
java.io.IOException
javax.servlet.ServletException


Copyright © 2004-2011. All Rights Reserved.