Class CascadeChoiceParameter

All Implemented Interfaces:
ExtensionPoint, Describable<ParameterDefinition>, Serializable, CascadableParameter<Map<Object,Object>>, ScriptableParameter<Map<Object,Object>>, UnoChoiceParameter

public class CascadeChoiceParameter extends AbstractCascadableParameter

A choice parameter, that gets updated when another parameter changes. The simplest use case for this, would be having a list of states, and when the user selected a state it would trigger an update of the city fields.

The state parameter would be a choice parameter, and the city parameter would be a cascade choice parameter, that referenced the former.

Its options are retrieved from the evaluation of a Groovy script.

Since:
0.1
Author:
Bruno P. Kinoshita
See Also:
  • Constructor Details

    • CascadeChoiceParameter

      @Deprecated public CascadeChoiceParameter(String name, String description, Script script, String choiceType, String referencedParameters, Boolean filterable)
      Deprecated.
      see JENKINS-32149
      Constructor called from Jelly with parameters.
      Parameters:
      name - name
      description - description
      script - script
      choiceType - choice type
      referencedParameters - referenced parameters
      filterable - filter flag
    • CascadeChoiceParameter

      @Deprecated public CascadeChoiceParameter(String name, String description, String randomName, Script script, String choiceType, String referencedParameters, Boolean filterable)
      Deprecated.
      see JENKINS-31625
      Constructor called from Jelly with parameters.
      Parameters:
      name - name
      description - description
      randomName - parameter random generated name (uuid)
      script - script
      choiceType - choice type
      referencedParameters - referenced parameters
      filterable - filter flag
    • CascadeChoiceParameter

      @DataBoundConstructor public CascadeChoiceParameter(String name, String description, String randomName, Script script, String choiceType, String referencedParameters, Boolean filterable, Integer filterLength)
      Constructor called from Jelly with parameters.
      Parameters:
      name - name
      description - description
      randomName - parameter random generated name (uuid)
      script - script
      choiceType - choice type
      referencedParameters - referenced parameters
      filterable - filter flag
      filterLength - filter length
  • Method Details

    • getChoiceType

      public String getChoiceType()
      Description copied from class: AbstractUnoChoiceParameter

      Gets the choice type.

      This method can be called from Javascript

      Specified by:
      getChoiceType in class AbstractUnoChoiceParameter
      Returns:
      choice type
    • getFilterable

      public boolean getFilterable()
      Get the filter flag.
      Returns:
      filter flag
    • getFilterLength

      public Integer getFilterLength()
      Get the filter length.
      Returns:
      filter length