Class ManualCondition
java.lang.Object
hudson.plugins.promoted_builds.PromotionCondition
hudson.plugins.promoted_builds.conditions.ManualCondition
- All Implemented Interfaces:
ExtensionPoint
,Describable<PromotionCondition>
- Direct Known Subclasses:
JobDslManualCondition
PromotionCondition
that requires manual promotion.- Author:
- Kohsuke Kawaguchi, Peter Hayes
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
static final class
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapprove
(AbstractBuild<?, ?> build, PromotionProcess promotionProcess) approve
(AbstractBuild<?, ?> build, PromotionProcess promotionProcess, List<ParameterValue> paramValues) boolean
canApprove
(PromotionProcess promotionProcess, 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, PromotionProcess promotionProcess, AbstractBuild<?, ?> build) Web method to handle the approval action submitted by the user.getParameterDefinition
(String name) Gets theParameterDefinition
of the given name, if any.getUsers()
boolean
boolean
isMet
(PromotionProcess promotionProcess, AbstractBuild<?, ?> build) Checks if the promotion criteria is met.void
Methods inherited from class hudson.plugins.promoted_builds.PromotionCondition
all, getApplicableTriggers, getDescriptor, isMet
-
Field Details
-
MISSING_USER_ID_DISPLAY_STRING
- See Also:
-
-
Constructor Details
-
ManualCondition
public ManualCondition()
-
-
Method Details
-
getUsers
-
setUsers
-
getParameterDefinitions
-
getParameterDefinition
Gets theParameterDefinition
of the given name, if any. -
getUsersAsSet
-
isMet
Description copied from class:PromotionCondition
Checks if the promotion criteria is met.- Overrides:
isMet
in classPromotionCondition
- Parameters:
promotionProcess
- The promotion process being evaluated for qualificationbuild
- 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
Verifies that the currently logged in user (or anonymous) has permission to approve the promotion and that the promotion has not already been approved. -
isInUsersList
public boolean isInUsersList() -
isInGroupList
public boolean isInGroupList() -
approve
@CheckForNull public Future<Promotion> approve(AbstractBuild<?, ?> build, PromotionProcess promotionProcess, List<ParameterValue> paramValues) throws IOException- Throws:
IOException
-
createDefaultValues
-
approve
public Future<Promotion> approve(AbstractBuild<?, ?> build, PromotionProcess promotionProcess) throws IOException- Throws:
IOException
-
doApprove
@POST public void doApprove(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @AncestorInPath PromotionProcess promotionProcess, @AncestorInPath AbstractBuild<?, ?> build) throws IOException, javax.servlet.ServletExceptionWeb method to handle the approval action submitted by the user.- Throws:
IOException
javax.servlet.ServletException
-