public abstract class SimpleParameterDefinition extends ParameterDefinition
ParameterDefinition
whose value can be represented in a context-independent single string token.ParameterDefinition.ParameterDescriptor
ExtensionPoint.LegacyInstancesAreScopedToHudson
LIST
Modifier | Constructor and Description |
---|---|
protected |
SimpleParameterDefinition(String name) |
protected |
SimpleParameterDefinition(String name,
String description)
Deprecated.
Prefer
SimpleParameterDefinition(String) with a DataBoundConstructor and allow ParameterDefinition.setDescription(java.lang.String) to be used as needed |
Modifier and Type | Method and Description |
---|---|
ParameterValue |
createValue(CLICommand command,
String value)
Create a parameter value from the string given in the CLI.
|
ParameterValue |
createValue(org.kohsuke.stapler.StaplerRequest req)
Create a parameter value from a GET with query string.
|
abstract ParameterValue |
createValue(String value)
Creates a
ParameterValue from the string representation. |
all, copyWithDefaultValue, createValue, equals, getDefaultParameterValue, getDescription, getDescriptor, getFormattedDescription, getName, getType, hashCode, isValid, setDescription
protected SimpleParameterDefinition(String name)
@Deprecated protected SimpleParameterDefinition(String name, String description)
SimpleParameterDefinition(String)
with a DataBoundConstructor
and allow ParameterDefinition.setDescription(java.lang.String)
to be used as neededpublic abstract ParameterValue createValue(String value)
ParameterValue
from the string representation.public final ParameterValue createValue(org.kohsuke.stapler.StaplerRequest req)
ParameterDefinition
Unlike ParameterDefinition.createValue(StaplerRequest, JSONObject)
, this method is intended to support
the programmatic POST-ing of the build URL. This form is less expressive (as it doesn't support
the tree form), but it's more scriptable.
If a ParameterDefinition
can't really support this mode of creating a value,
you may just always return null.
createValue
in class ParameterDefinition
public final ParameterValue createValue(CLICommand command, String value) throws IOException, InterruptedException
ParameterDefinition
createValue
in class ParameterDefinition
command
- This is the command that got the parameter.AbortException
- If the CLI processing should be aborted. Hudson will report the error message
without stack trace, and then exits this command. Useful for graceful termination.IOException
InterruptedException
Copyright © 2004–2021. All rights reserved.