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 ClassesNested classes/interfaces inherited from class hudson.model.ParameterDefinition
ParameterDefinition.ParameterDescriptorNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.ParameterDefinition
LIST -
Constructor Summary
ConstructorsConstructorDescriptionPromotedBuildParameterDefinition(String name, String jobName, String process, String description) -
Method Summary
Modifier and TypeMethodDescriptioncopyWithDefaultValue(ParameterValue defaultValue) createValue(String value) createValue(org.kohsuke.stapler.StaplerRequest2 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, createValueMethods inherited from class hudson.model.ParameterDefinition
all, createValue, createValue, equals, getDescription, getDescriptor, getFormattedDescription, getName, getType, hashCode, isValid, setDescription
-
Constructor Details
-
PromotedBuildParameterDefinition
-
-
Method Details
-
createValue
public PromotedBuildParameterValue createValue(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject jo) - Overrides:
createValuein classParameterDefinition
-
createValue
- Specified by:
createValuein classSimpleParameterDefinition
-
getDefaultParameterValue
- Overrides:
getDefaultParameterValuein classParameterDefinition
-
copyWithDefaultValue
- Overrides:
copyWithDefaultValuein 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 theStaplerRequest2. The relative addressing may be malfunctional if you use this method outsideStaplerRequest2s. UsegetRuns(hudson.model.Item)insteadGets a list of promoted builds for the project.- Returns:
- List of
AbstractBuilds, 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
AbstractBuilds, which have been promoted. May return an empty list ifJenkinsinstance is not ready - Since:
- 2.22
-
StaplerRequest2.