Package io.jenkins.plugins.restlistparam
Class RestMultiListParameterDefinition
java.lang.Object
hudson.model.ParameterDefinition
hudson.model.SimpleParameterDefinition
io.jenkins.plugins.restlistparam.AbstractRestListParameterDefinition
io.jenkins.plugins.restlistparam.RestMultiListParameterDefinition
- All Implemented Interfaces:
ExtensionPoint,Describable<ParameterDefinition>,Serializable
A parameter whose value is an ordered list of entries chosen from a REST endpoint's response.
It stays a SimpleParameterDefinition, so string input from the CLI, the remote API
and the Pipeline build step is read by createValue(String) with
MultiValueCodec.parse(String). The remote API therefore takes the list as one Json array;
core rejects a repeated query parameter name.
- 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 io.jenkins.plugins.restlistparam.AbstractRestListParameterDefinition
configFields inherited from class hudson.model.ParameterDefinition
LIST -
Constructor Summary
ConstructorsConstructorDescriptionRestMultiListParameterDefinition(String name, String description, String restEndpoint, String credentialId, MimeType mimeType, String valueExpression, String displayExpression) RestMultiListParameterDefinition(String name, String description, String restEndpoint, String credentialId, MimeType mimeType, String valueExpression, String displayExpression, ValueOrder valueOrder, String filter, Integer cacheTime, String defaultValue, boolean allowEmptyValue) -
Method Summary
Modifier and TypeMethodDescriptioncopyWithDefaultValue(ParameterValue defaultValue) createValue(String value) createValue(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject jo) Reads the build form, which submits a<select multiple>as a Json array of the selected options' values.booleangetUnmatchedDefaults(List<ValueItem> values) The default values that match no fetched entry's display value.inthashCode()booleanisDefaultSelected(ValueItem item) booleanisValid(ParameterValue value) Methods inherited from class io.jenkins.plugins.restlistparam.AbstractRestListParameterDefinition
createLoader, createLoader, entryValuesFor, getCacheTime, getCredentialId, getCustomHeaders, getCustomValueLabel, getDefaultValue, getDisplayExpression, getErrorMsg, getFilter, getMimeType, getPagination, getRestEndpoint, getValueExpression, getValueOrder, getValues, isAllowEmptyValue, isEnableValidation, setAllowEmptyValue, setCacheTime, setCustomHeaders, setDefaultValue, setDisplayExpression, setEnableValidation, setFilter, setPagination, setValueOrderMethods inherited from class hudson.model.SimpleParameterDefinition
createValue, createValueMethods inherited from class hudson.model.ParameterDefinition
all, createValue, createValue, getDefaultParameterValue, getDescription, getDescriptor, getFormattedDescription, getName, getType, setDescription
-
Constructor Details
-
RestMultiListParameterDefinition
-
RestMultiListParameterDefinition
-
-
Method Details
-
isDefaultSelected
- Specified by:
isDefaultSelectedin classAbstractRestListParameterDefinition- Parameters:
item- A fetched entry- Returns:
- Whether the entry's display value is one of the default values
-
getUnmatchedDefaults
The default values that match no fetched entry's display value. They are offered as preselected free-form entries when validation is disabled, and ignored when it is enabled.- Parameters:
values- The entries already fetched for this form- Returns:
- The unmatched, non-empty default values in order, or an empty list when validation is enabled
-
copyWithDefaultValue
- Overrides:
copyWithDefaultValuein classParameterDefinition
-
createValue
- Specified by:
createValuein classSimpleParameterDefinition
-
createValue
public ParameterValue createValue(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject jo) Reads the build form, which submits a<select multiple>as a Json array of the selected options' values. A string is read with the string input rule; an absent value is the empty list.- Overrides:
createValuein classParameterDefinition
-
isValid
- Overrides:
isValidin classParameterDefinition
-
hashCode
public int hashCode()- Overrides:
hashCodein classParameterDefinition
-
equals
- Overrides:
equalsin classParameterDefinition
-