Class PromotedBuildParameterDefinition
java.lang.Object
hudson.model.ParameterDefinition
hudson.model.SimpleParameterDefinition
hudson.plugins.promoted_builds.parameters.PromotedBuildParameterDefinition
- All Implemented Interfaces:
ExtensionPoint
,Describable<ParameterDefinition>
,Serializable
Defines a parameter that allows the user to select a promoted build
from a drop down list.
Remarks on addressing:
Starting from TODO, the field also supports folders and the relative addressing (JENKINS-25011).
See ItemPathResolver.getByPath(java.lang.String, hudson.model.Item, java.lang.Class)
for the documentation.
- Author:
- Pete Hayes
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.ParameterDefinition
ParameterDefinition.ParameterDescriptor
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.model.ParameterDefinition
LIST
-
Constructor Summary
ConstructorDescriptionPromotedBuildParameterDefinition
(String name, String jobName, String process, String description) -
Method Summary
Modifier and TypeMethodDescriptioncopyWithDefaultValue
(ParameterValue defaultValue) createValue
(String value) createValue
(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject jo) Deprecated.Absolute path to the item starting from the root element.Gets a list of promoted builds for the project.Methods inherited from class hudson.model.SimpleParameterDefinition
createValue, createValue
Methods inherited from class hudson.model.ParameterDefinition
all, equals, getDescription, getDescriptor, getFormattedDescription, getName, getType, hashCode, isValid, setDescription
-
Constructor Details
-
PromotedBuildParameterDefinition
-
-
Method Details
-
createValue
public PromotedBuildParameterValue createValue(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject jo) - Specified by:
createValue
in classParameterDefinition
-
createValue
- Specified by:
createValue
in classSimpleParameterDefinition
-
getDefaultParameterValue
- Overrides:
getDefaultParameterValue
in classParameterDefinition
-
copyWithDefaultValue
- Overrides:
copyWithDefaultValue
in classParameterDefinition
-
getJobName
Absolute path to the item starting from the root element. -
getProcess
-
getBuilds
Deprecated.This method retrieves the base item for relative addressing from theStaplerRequest
. The relative addressing may be malfunctional if you use this method outsideStaplerRequest
s. UsegetRuns(hudson.model.Item)
insteadGets a list of promoted builds for the project.- Returns:
- List of
AbstractBuild
s, which have been promoted
-
getRuns
Gets a list of promoted builds for the project.- Parameters:
base
- Base item for the relative addressing- Returns:
- List of
AbstractBuild
s, which have been promoted. May return an empty list ifJenkins
instance is not ready - Since:
- 2.22
-
StaplerRequest
.